Skip to content

Commit 15a54f5

Browse files
authored
Merge branch 'can1357:main' into main
2 parents 8e754e3 + a5a6888 commit 15a54f5

4,963 files changed

Lines changed: 466788 additions & 807665 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.bazelrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Bazel build configuration for the omp-natives NAPI addon pipeline.
2-
# Cross targets, ISA variants, and release codegen are encoded in the
2+
# Cross targets, the x64 ISA floor, and release codegen are encoded in the
33
# //:natives-* addon targets (bazel/defs.bzl transition), so a bare
44
# `bazel build //:natives-<target>` is always release-grade.
55

‎.fallowrc.jsonc‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
// Embedded HTML asset shipped as a static template, not a code module.
2424
"packages/coding-agent/src/export/html/template.js",
2525
// Generated/owned upstream — see packages/catalog/scripts/generate-models.ts.
26-
"packages/catalog/src/models.json"
26+
"packages/catalog/src/models.json",
27+
// Generated from the RPC wire schema.
28+
"packages/coding-agent/src/modes/rpc/wire/rpc-wire.generated.ts",
29+
// Vendored from openai-node; kept byte-close to upstream.
30+
"packages/ai/src/providers/openai-responses-wire.ts",
31+
"packages/ai/src/providers/openai-chat-wire.ts"
2732
],
2833
"ignoreImports": true
2934
},

‎.github/actions/native-artifacts/action.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "Install native addon artifacts"
22
description: >
33
Downloads the native addons built once by the native_addons jobs and
4-
installs exact targets without invoking Bazel. The linux-x64 pair ships as
4+
installs exact targets without invoking Bazel. The linux-x64 addon ships as
55
its own small `natives-linux-x64` artifact; the rest (`native-addons`) is
66
fetched only when a requested target needs it.
77
@@ -33,13 +33,13 @@ runs:
3333
rest=false
3434
for t in "${targets[@]}"; do
3535
case "$t" in
36-
linux-x64-baseline|linux-x64-modern) x64=true ;;
36+
linux-x64) x64=true ;;
3737
*) rest=true ;;
3838
esac
3939
done
4040
# ci.yml uploads `native-addons` on non-PR events only.
4141
if [ "$rest" = true ] && [ "$GITHUB_EVENT_NAME" = pull_request ]; then
42-
echo "::error::PR runs only publish natives-linux-x64; targets outside linux-x64-baseline/linux-x64-modern are unavailable: $NATIVE_TARGETS"
42+
echo "::error::PR runs only publish natives-linux-x64; targets outside linux-x64 are unavailable: $NATIVE_TARGETS"
4343
exit 1
4444
fi
4545
echo "x64=$x64" >> "$GITHUB_OUTPUT"

‎.github/workflows/ci.yml‎

Lines changed: 81 additions & 46 deletions
Large diffs are not rendered by default.

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ pi-*.html
6868
.close_issue.sh
6969

7070
# Generated files
71+
*.d.md.ts
7172
packages/coding-agent/export-assets/
73+
packages/coding-agent/src/export/html/viewer.generated.json
7274
packages/coding-agent/src/tools/browser/relay/extension.generated.json
7375
packages/natives/npm/
7476
/runs/

‎AGENTS.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,12 @@ Rules for TS code:
200200
- Equal-rank rule overlaps throw `AmbiguousOverlapError` at resolve time; fix with an explicit `priority=` in KDL, not code.
201201
- After editing rules: `bun run gen:compat` and commit `rules.json` alongside the `.kdl` change.
202202

203+
## Shell Command Behavior Lives in the Builtins
204+
205+
**NEVER pattern-match bash command text in TypeScript** to detect, rewrite, or annotate what a command does (flag misuse, argument quirks, output fixes). Regexes and tokenizers over the raw string miss quoting, expansion, variables, aliases, and wrappers (`xargs`, `timeout`), and drift from the utility's real argument model.
206+
207+
Fix the command in its Rust builtin, `crates/builtins/src/<cmd>.rs`: `rewrite_argv` sees the expanded argv before clap parses it and can refuse with a usage error; `run` owns output and diagnostics. Derive flag facts (which options take values, aliases) from the utility's clap `Command`, never a copied table. Example: `refuse_grep_recursion` in `crates/builtins/src/rg.rs` rejects grep-style `rg -rn`.
208+
203209
## Generated Files
204210

205211
**NEVER edit `packages/catalog/src/models.json` directly.** It is generated from upstream sources (stencil.so, provider catalog discovery, OpenCode docs) by `packages/catalog/scripts/generate-models.ts` and the descriptors/resolvers in `packages/catalog/src/provider-models/`. Hand-edits get overwritten on the next regen. The same applies to `packages/catalog/src/compat/rules.json`, compiled from the KDL tree by `bun run gen:compat`.

‎BUILD.bazel‎

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ exports_files([
1414
"rustfmt.toml",
1515
])
1616
_ADDONS = {
17-
"linux-x64-baseline": ("//bazel/platforms:linux-x64-baseline", "pi_natives.linux-x64-baseline.node"),
18-
"linux-x64-modern": ("//bazel/platforms:linux-x64-modern", "pi_natives.linux-x64-modern.node"),
17+
"linux-x64": ("//bazel/platforms:linux-x64", "pi_natives.linux-x64.node"),
1918
"linux-arm64": ("//bazel/platforms:linux-arm64", "pi_natives.linux-arm64.node"),
20-
"linux-musl-x64-baseline": ("//bazel/platforms:linux-musl-x64-baseline", "pi_natives.linux-x64-baseline.node"),
19+
"linux-musl-x64": ("//bazel/platforms:linux-musl-x64", "pi_natives.linux-x64.node"),
2120
"linux-musl-arm64": ("//bazel/platforms:linux-musl-arm64", "pi_natives.linux-arm64.node"),
22-
"darwin-x64-baseline": ("//bazel/platforms:darwin-x64-baseline", "pi_natives.darwin-x64-baseline.node"),
21+
"darwin-x64": ("//bazel/platforms:darwin-x64", "pi_natives.darwin-x64.node"),
2322
"darwin-arm64": ("//bazel/platforms:darwin-arm64", "pi_natives.darwin-arm64.node"),
24-
"win32-x64-baseline": ("//bazel/platforms:win32-x64-baseline", "pi_natives.win32-x64-baseline.node"),
23+
"win32-x64": ("//bazel/platforms:win32-x64", "pi_natives.win32-x64.node"),
2524
"win32-arm64": ("//bazel/platforms:win32-arm64", "pi_natives.win32-arm64.node"),
2625
}
2726

@@ -41,21 +40,20 @@ filegroup(
4140
name = "natives-all",
4241
srcs = [
4342
":natives-darwin-arm64",
44-
":natives-darwin-x64-baseline",
43+
":natives-darwin-x64",
4544
":natives-linux-arm64",
4645
":natives-linux-musl-arm64",
47-
":natives-linux-musl-x64-baseline",
48-
":natives-linux-x64-baseline",
49-
":natives-linux-x64-modern",
46+
":natives-linux-musl-x64",
47+
":natives-linux-x64",
5048
":natives-win32-arm64",
51-
":natives-win32-x64-baseline",
49+
":natives-win32-x64",
5250
],
5351
)
5452

5553
filegroup(
5654
name = "natives-darwin-all",
5755
srcs = [
5856
":natives-darwin-arm64",
59-
":natives-darwin-x64-baseline",
57+
":natives-darwin-x64",
6058
],
6159
)

0 commit comments

Comments
 (0)