@cnwenf/occ 2.1.341 → 2.1.342
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/cli.js +15 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/@cnwenf/occ)
|
|
6
6
|
[](./LICENSE)
|
|
7
7
|
[](https://bun.sh/)
|
|
8
|
-
[](https://docs.anthropic.com/en/docs/claude-code)
|
|
9
9
|
|
|
10
10
|
[简体中文](./README.zh-CN.md) · **English**
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
## What is OCC
|
|
15
15
|
|
|
16
|
-
**Open C Code (OCC)** is an open-source coding agent. Its capabilities are aligned with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (currently tracking `2.1.
|
|
16
|
+
**Open C Code (OCC)** is an open-source coding agent. Its capabilities are aligned with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (currently tracking `2.1.276` — 2.1.276 fully aligned; 2.1.271–2.1.275 partial: the latest OCC-90 round landed the byte-verified 2.1.276 advisor proxy-400 fix — advisor-model resolution now gated on a first-party `ANTHROPIC_BASE_URL` (official module #489 `!Ia()||` gate), the growthbook experiment key corrected to `tengu_sage_compass2`, strict firstParty advisor enablement with the `CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL` env override and the `_CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL` arm — plus removal of the dead `src/services/api/src/` stub tree and a full 96-entry triage of 2.1.275, per `docs/upstream-version-gap-occ129.md`; prior rounds landed the 2.1.274 MCP auth-stub description secret-leak fix (byte-verified display-sanitizer family port) with NO-OP behavioral verification of the 2.1.274 bash special-variable and worktree nested-expansion hardening (OCC-127), the 2.1.273 gateway-hint request headers, the spinner doubled-ellipsis guard, the shell-mode `!` insert fix, and the subshell-hidden dangerous-`rm` bypass fix, per `docs/upstream-version-gap-occ127.md`; still not landed from the 2.1.270→2.1.272 delta: `/config` panel fullscreen mouse support (PORTABLE-LARGE) and the spinner status ladder (STAGED), plus the pre-existing sandbox per-command `allowed_domains` gap; prior alignment through 2.1.270 landed via OCC-122/OCC-123/OCC-84/OCC-124/OCC-85/OCC-125/OCC-126). The code is fully open, auditable, backdoor-free, and your data stays under your control.
|
|
17
17
|
|
|
18
18
|
If you worry that a closed-source CLI might hide backdoors, or that your code and credentials are uploaded to unauditable services, OCC is for you: all source is open and unobfuscated, the build is reproducible from source, and API credentials are sent only to endpoints you configure.
|
|
19
19
|
|
|
@@ -62,7 +62,7 @@ Requires a valid Anthropic API Key (or AWS Bedrock / Google Vertex / Azure Found
|
|
|
62
62
|
| **Auditability** | Line-by-line reviewable | No |
|
|
63
63
|
| **Telemetry** | Minimal (analytics stubbed) | Standard |
|
|
64
64
|
| **Data sovereignty** | Credentials stay on your machine; requests only to endpoints you configure | Anthropic endpoints |
|
|
65
|
-
| **Capability parity** | Tracks CC `2.1.
|
|
65
|
+
| **Capability parity** | Tracks CC `2.1.276` (2.1.276 fully aligned; 2.1.271–2.1.275 partial) | Reference implementation |
|
|
66
66
|
| **Providers** | Anthropic Direct, Bedrock, Vertex, Azure | Anthropic, Bedrock, Vertex |
|
|
67
67
|
| **Cost** | Free & open-source (MIT) | Subscription |
|
|
68
68
|
| **Build** | Reproducible from source | N/A |
|
|
@@ -143,7 +143,7 @@ Requires [Bun](https://bun.sh/) >= 1.3.11 (use `bun upgrade` — older Bun cause
|
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
145
|
bun install
|
|
146
|
-
bun run dev # run from source; version prints 2.1.
|
|
146
|
+
bun run dev # run from source; version prints 2.1.276 (dev polyfill; build overrides with pkg.version) when working
|
|
147
147
|
bun run build # output: dist/cli.js (~26 MB, single-file bundle)
|
|
148
148
|
bun test # test suite (Bun test runner)
|
|
149
149
|
bun run lint # Biome lint (formatter disabled to avoid large diffs)
|
|
@@ -157,7 +157,7 @@ For architecture, entry/bootstrap, tool system, UI layer, and module-status deta
|
|
|
157
157
|
|
|
158
158
|
## Status
|
|
159
159
|
|
|
160
|
-
- Tracks Claude Code **`2.1.
|
|
160
|
+
- Tracks Claude Code **`2.1.276`** (2.1.276 fully aligned; 2.1.271–2.1.275 partial — the latest OCC-90 round landed the byte-verified 2.1.276 advisor proxy-400 fix (first-party `ANTHROPIC_BASE_URL` gate on advisor resolution, `tengu_sage_compass2` growthbook key, strict firstParty enablement, `_CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL` arm) and removed the dead `src/services/api/src/` stub tree — see `docs/upstream-version-gap-occ129.md`; prior rounds landed the 2.1.274 MCP auth-stub description secret-leak fix with NO-OP verification of the bash special-variable and worktree nested-expansion hardening (OCC-127, `docs/upstream-version-gap-occ127.md`), the 2.1.273 gateway-hint request headers, the spinner doubled-ellipsis guard, the shell-mode `!` insert fix, and the subshell-hidden dangerous-`rm` bypass fix; still not landed from the 2.1.270→2.1.272 delta: `/config` fullscreen mouse support (PORTABLE-LARGE) and the spinner status ladder (STAGED), plus the pre-existing sandbox per-command `allowed_domains` gap; prior alignment through 2.1.270 landed via OCC-122/OCC-123/OCC-84, OCC-124 + OCC-85, OCC-125, and OCC-126 — see `docs/upstream-version-gap-occ124.md`, `docs/upstream-version-gap-occ125.md`, and `docs/upstream-version-gap-occ126.md`).
|
|
161
161
|
- Published to npm as [`@cnwenf/occ`](https://www.npmjs.com/package/@cnwenf/occ).
|
|
162
162
|
- Many modules are intentionally stubbed or feature-flagged off — see "Disabled / stubbed" above.
|
|
163
163
|
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
globalThis.MACRO={"VERSION":"2.1.
|
|
2
|
+
globalThis.MACRO={"VERSION":"2.1.342","BINARY_NAME":"occ","BUILD_TIME":"2026-09-18T19:34:48.042Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
|
|
3
3
|
// @bun
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -96737,6 +96737,9 @@ function getAPIProviderForStatsig() {
|
|
|
96737
96737
|
return getAPIProvider();
|
|
96738
96738
|
}
|
|
96739
96739
|
function isFirstPartyAnthropicBaseUrl() {
|
|
96740
|
+
if (isEnvTruthy(process.env._CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL)) {
|
|
96741
|
+
return true;
|
|
96742
|
+
}
|
|
96740
96743
|
const baseUrl = process.env.ANTHROPIC_BASE_URL;
|
|
96741
96744
|
if (!baseUrl) {
|
|
96742
96745
|
return true;
|
|
@@ -264309,15 +264312,21 @@ function isAdvisorBlock(param) {
|
|
|
264309
264312
|
return param.type === "advisor_tool_result" || param.type === "server_tool_use" && param.name === "advisor";
|
|
264310
264313
|
}
|
|
264311
264314
|
function getAdvisorConfig() {
|
|
264312
|
-
return getFeatureValue_CACHED_MAY_BE_STALE("
|
|
264315
|
+
return getFeatureValue_CACHED_MAY_BE_STALE("tengu_sage_compass2", {});
|
|
264313
264316
|
}
|
|
264314
264317
|
function isAdvisorEnabled() {
|
|
264315
264318
|
if (isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_ADVISOR_TOOL)) {
|
|
264316
264319
|
return false;
|
|
264317
264320
|
}
|
|
264318
|
-
if (
|
|
264321
|
+
if (getAPIProvider() !== "firstParty") {
|
|
264322
|
+
return false;
|
|
264323
|
+
}
|
|
264324
|
+
if (isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)) {
|
|
264319
264325
|
return false;
|
|
264320
264326
|
}
|
|
264327
|
+
if (isEnvTruthy(process.env.CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL)) {
|
|
264328
|
+
return true;
|
|
264329
|
+
}
|
|
264321
264330
|
return getAdvisorConfig().enabled ?? false;
|
|
264322
264331
|
}
|
|
264323
264332
|
function canUserConfigureAdvisor() {
|
|
@@ -264366,8 +264375,8 @@ Give the advice serious weight. If you follow a step and it fails empirically, o
|
|
|
264366
264375
|
If you've already retrieved data pointing one way and the advisor points another: don't silently switch. Surface the conflict in one more advisor call -- "I found X, you suggest Y, which constraint breaks the tie?" The advisor saw your evidence but may have underweighted it; a reconcile call is cheaper than committing to the wrong branch.`;
|
|
264367
264376
|
var init_advisor = __esm(() => {
|
|
264368
264377
|
init_growthbook();
|
|
264369
|
-
init_betas2();
|
|
264370
264378
|
init_envUtils();
|
|
264379
|
+
init_providers();
|
|
264371
264380
|
init_settings2();
|
|
264372
264381
|
});
|
|
264373
264382
|
|
|
@@ -634936,7 +634945,7 @@ async function* queryModel(messages, systemPrompt, thinkingConfig, tools, signal
|
|
|
634936
634945
|
betas.push(ADVISOR_BETA_HEADER);
|
|
634937
634946
|
}
|
|
634938
634947
|
let advisorModel;
|
|
634939
|
-
if (isAgenticQuery && isAdvisorEnabled()) {
|
|
634948
|
+
if (isAgenticQuery && isAdvisorEnabled() && isFirstPartyAnthropicBaseUrl()) {
|
|
634940
634949
|
let advisorOption = options.advisorModel;
|
|
634941
634950
|
const advisorExperiment = getExperimentAdvisorModels();
|
|
634942
634951
|
if (advisorExperiment !== undefined) {
|
|
@@ -832330,7 +832339,7 @@ var _FEATURE_ALLOWLIST = new Set([
|
|
|
832330
832339
|
var feature2 = (name3) => _FEATURE_ALLOWLIST.has(name3);
|
|
832331
832340
|
if (typeof globalThis.MACRO === "undefined") {
|
|
832332
832341
|
globalThis.MACRO = {
|
|
832333
|
-
VERSION: "2.1.
|
|
832342
|
+
VERSION: "2.1.276",
|
|
832334
832343
|
BINARY_NAME: "occ",
|
|
832335
832344
|
BUILD_TIME: new Date().toISOString(),
|
|
832336
832345
|
FEEDBACK_CHANNEL: "",
|