@cnwenf/occ 2.1.289 → 2.1.291
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 +4 -4
- package/dist/cli.js +43 -2
- 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.218
|
|
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.219` — 2.1.218 fully aligned, 2.1.219 partial per OCC-39 gap report). 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.219` (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 |
|
|
@@ -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.219` (partial)**.
|
|
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.291","BINARY_NAME":"occ","BUILD_TIME":"2026-07-30T17:31:04.907Z","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;
|
|
@@ -57625,6 +57625,7 @@ var init_sandboxTypes = __esm(() => {
|
|
|
57625
57625
|
allowedDomains: exports_external.array(exports_external.string()).optional(),
|
|
57626
57626
|
deniedDomains: exports_external.array(exports_external.string()).optional().describe("Domains to block even when a broader allowedDomains wildcard would otherwise permit them."),
|
|
57627
57627
|
allowManagedDomainsOnly: exports_external.boolean().optional().describe("When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. " + "User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."),
|
|
57628
|
+
strictAllowlist: exports_external.boolean().optional().describe("When true, the sandbox runtime deterministically denies hosts not in allowedDomains instead of prompting. " + "Enforced for sandboxed commands only \u2014 in-process tools such as WebFetch are not gated by this setting. " + "Only honored from user, managed/policy, or CLI (--settings) settings \u2014 " + "project settings (.claude/settings.json and .claude/settings.local.json) are ignored."),
|
|
57628
57629
|
allowUnixSockets: exports_external.array(exports_external.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),
|
|
57629
57630
|
allowAllUnixSockets: exports_external.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),
|
|
57630
57631
|
allowLocalBinding: exports_external.boolean().optional(),
|
|
@@ -59376,7 +59377,11 @@ var init_types2 = __esm(() => {
|
|
|
59376
59377
|
message: 'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'
|
|
59377
59378
|
}));
|
|
59378
59379
|
DeniedMcpServerEntrySchema = lazySchema(() => exports_external.object({
|
|
59379
|
-
serverName: exports_external.string().
|
|
59380
|
+
serverName: exports_external.string().min(1, "Server name must be non-empty").refine((name) => name.trim().length > 0, {
|
|
59381
|
+
message: "Server name must not be whitespace-only"
|
|
59382
|
+
}).refine((name) => name === name.trim(), {
|
|
59383
|
+
message: "Server name has leading or trailing whitespace and will never match (names are compared verbatim)"
|
|
59384
|
+
}).optional().describe("Name of the MCP server that is explicitly blocked"),
|
|
59380
59385
|
serverCommand: exports_external.array(exports_external.string()).min(1, "Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for blocked stdio servers"),
|
|
59381
59386
|
serverUrl: exports_external.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')
|
|
59382
59387
|
}).refine((data) => {
|
|
@@ -100633,6 +100638,7 @@ var init_modelCost = __esm(() => {
|
|
|
100633
100638
|
inputTokens: 3,
|
|
100634
100639
|
outputTokens: 15,
|
|
100635
100640
|
promptCacheWriteTokens: 3.75,
|
|
100641
|
+
promptCacheWrite1hTokens: 6,
|
|
100636
100642
|
promptCacheReadTokens: 0.3,
|
|
100637
100643
|
webSearchRequests: 0.01
|
|
100638
100644
|
};
|
|
@@ -100640,6 +100646,7 @@ var init_modelCost = __esm(() => {
|
|
|
100640
100646
|
inputTokens: 15,
|
|
100641
100647
|
outputTokens: 75,
|
|
100642
100648
|
promptCacheWriteTokens: 18.75,
|
|
100649
|
+
promptCacheWrite1hTokens: 30,
|
|
100643
100650
|
promptCacheReadTokens: 1.5,
|
|
100644
100651
|
webSearchRequests: 0.01
|
|
100645
100652
|
};
|
|
@@ -100647,6 +100654,7 @@ var init_modelCost = __esm(() => {
|
|
|
100647
100654
|
inputTokens: 5,
|
|
100648
100655
|
outputTokens: 25,
|
|
100649
100656
|
promptCacheWriteTokens: 6.25,
|
|
100657
|
+
promptCacheWrite1hTokens: 10,
|
|
100650
100658
|
promptCacheReadTokens: 0.5,
|
|
100651
100659
|
webSearchRequests: 0.01
|
|
100652
100660
|
};
|
|
@@ -100654,6 +100662,7 @@ var init_modelCost = __esm(() => {
|
|
|
100654
100662
|
inputTokens: 30,
|
|
100655
100663
|
outputTokens: 150,
|
|
100656
100664
|
promptCacheWriteTokens: 37.5,
|
|
100665
|
+
promptCacheWrite1hTokens: 60,
|
|
100657
100666
|
promptCacheReadTokens: 3,
|
|
100658
100667
|
webSearchRequests: 0.01
|
|
100659
100668
|
};
|
|
@@ -100661,6 +100670,7 @@ var init_modelCost = __esm(() => {
|
|
|
100661
100670
|
inputTokens: 10,
|
|
100662
100671
|
outputTokens: 50,
|
|
100663
100672
|
promptCacheWriteTokens: 12.5,
|
|
100673
|
+
promptCacheWrite1hTokens: 20,
|
|
100664
100674
|
promptCacheReadTokens: 1,
|
|
100665
100675
|
webSearchRequests: 0.01
|
|
100666
100676
|
};
|
|
@@ -100668,6 +100678,7 @@ var init_modelCost = __esm(() => {
|
|
|
100668
100678
|
inputTokens: 0.8,
|
|
100669
100679
|
outputTokens: 4,
|
|
100670
100680
|
promptCacheWriteTokens: 1,
|
|
100681
|
+
promptCacheWrite1hTokens: 1.6,
|
|
100671
100682
|
promptCacheReadTokens: 0.08,
|
|
100672
100683
|
webSearchRequests: 0.01
|
|
100673
100684
|
};
|
|
@@ -100675,6 +100686,7 @@ var init_modelCost = __esm(() => {
|
|
|
100675
100686
|
inputTokens: 1,
|
|
100676
100687
|
outputTokens: 5,
|
|
100677
100688
|
promptCacheWriteTokens: 1.25,
|
|
100689
|
+
promptCacheWrite1hTokens: 2,
|
|
100678
100690
|
promptCacheReadTokens: 0.1,
|
|
100679
100691
|
webSearchRequests: 0.01
|
|
100680
100692
|
};
|
|
@@ -201061,6 +201073,7 @@ Usage notes:
|
|
|
201061
201073
|
// src/utils/sandbox/sandbox-adapter.ts
|
|
201062
201074
|
var exports_sandbox_adapter = {};
|
|
201063
201075
|
__export(exports_sandbox_adapter, {
|
|
201076
|
+
shouldEnforceStrictAllowlist: () => shouldEnforceStrictAllowlist,
|
|
201064
201077
|
shouldAllowManagedSandboxDomainsOnly: () => shouldAllowManagedSandboxDomainsOnly,
|
|
201065
201078
|
resolveSandboxFilesystemPath: () => resolveSandboxFilesystemPath,
|
|
201066
201079
|
resolvePathPatternForSandbox: () => resolvePathPatternForSandbox,
|
|
@@ -201108,6 +201121,14 @@ function resolveSandboxFilesystemPath(pattern, source) {
|
|
|
201108
201121
|
function shouldAllowManagedSandboxDomainsOnly() {
|
|
201109
201122
|
return getSettingsForSource("policySettings")?.sandbox?.network?.allowManagedDomainsOnly === true;
|
|
201110
201123
|
}
|
|
201124
|
+
function shouldEnforceStrictAllowlist() {
|
|
201125
|
+
const honoredSources = [
|
|
201126
|
+
"userSettings",
|
|
201127
|
+
"flagSettings",
|
|
201128
|
+
"policySettings"
|
|
201129
|
+
];
|
|
201130
|
+
return honoredSources.some((source) => getSettingsForSource(source)?.sandbox?.network?.strictAllowlist === true);
|
|
201131
|
+
}
|
|
201111
201132
|
function shouldAllowManagedReadPathsOnly() {
|
|
201112
201133
|
return getSettingsForSource("policySettings")?.sandbox?.filesystem?.allowManagedReadPathsOnly === true;
|
|
201113
201134
|
}
|
|
@@ -201469,6 +201490,10 @@ async function initialize3(sandboxAskCallback) {
|
|
|
201469
201490
|
logForDebugging(`[sandbox] Blocked network request to ${hostPattern.host} (allowManagedDomainsOnly)`);
|
|
201470
201491
|
return false;
|
|
201471
201492
|
}
|
|
201493
|
+
if (shouldEnforceStrictAllowlist()) {
|
|
201494
|
+
logForDebugging(`[sandbox] Blocked network request to ${hostPattern.host} (strictAllowlist)`);
|
|
201495
|
+
return false;
|
|
201496
|
+
}
|
|
201472
201497
|
return sandboxAskCallback(hostPattern);
|
|
201473
201498
|
} : undefined;
|
|
201474
201499
|
initializationPromise2 = (async () => {
|
|
@@ -452643,6 +452668,11 @@ var init_coreSchemas = __esm(() => {
|
|
|
452643
452668
|
name: exports_external.string(),
|
|
452644
452669
|
status: exports_external.string()
|
|
452645
452670
|
})),
|
|
452671
|
+
mcp_server_errors: exports_external.array(exports_external.object({
|
|
452672
|
+
name: exports_external.string(),
|
|
452673
|
+
type: exports_external.string(),
|
|
452674
|
+
message: exports_external.string()
|
|
452675
|
+
})).optional().describe("@internal MCP server config errors collected during connection"),
|
|
452646
452676
|
model: exports_external.string(),
|
|
452647
452677
|
permissionMode: PermissionModeSchema(),
|
|
452648
452678
|
slash_commands: exports_external.array(exports_external.string()),
|
|
@@ -738433,6 +738463,8 @@ function sdkCompatToolName(name3) {
|
|
|
738433
738463
|
function buildSystemInitMessage(inputs) {
|
|
738434
738464
|
const settings = getSettings_DEPRECATED();
|
|
738435
738465
|
const outputStyle = settings?.outputStyle ?? DEFAULT_OUTPUT_STYLE_NAME;
|
|
738466
|
+
const mcpClientNames = new Set(inputs.mcpClients.map((client8) => client8.name));
|
|
738467
|
+
const filteredMcpServerErrors = inputs.mcpServerErrors.filter((error52) => !mcpClientNames.has(error52.name));
|
|
738436
738468
|
const initMessage = {
|
|
738437
738469
|
type: "system",
|
|
738438
738470
|
subtype: "init",
|
|
@@ -738443,6 +738475,13 @@ function buildSystemInitMessage(inputs) {
|
|
|
738443
738475
|
name: client8.name,
|
|
738444
738476
|
status: client8.type
|
|
738445
738477
|
})),
|
|
738478
|
+
...filteredMcpServerErrors.length > 0 && {
|
|
738479
|
+
mcp_server_errors: filteredMcpServerErrors.map((error52) => ({
|
|
738480
|
+
name: error52.name,
|
|
738481
|
+
type: error52.type,
|
|
738482
|
+
message: error52.message
|
|
738483
|
+
}))
|
|
738484
|
+
},
|
|
738446
738485
|
model: inputs.model,
|
|
738447
738486
|
permissionMode: inputs.permissionMode,
|
|
738448
738487
|
slash_commands: inputs.commands.filter((c9) => c9.userInvocable !== false).map((c9) => c9.name),
|
|
@@ -742881,6 +742920,7 @@ function useReplBridge(messages, setMessages, abortControllerRef, commands7, mai
|
|
|
742881
742920
|
handleRef.current?.writeSdkMessages([buildSystemInitMessage({
|
|
742882
742921
|
tools: [],
|
|
742883
742922
|
mcpClients: [],
|
|
742923
|
+
mcpServerErrors: [],
|
|
742884
742924
|
model: mainLoopModelRef.current,
|
|
742885
742925
|
permissionMode: state_0.toolPermissionContext.mode,
|
|
742886
742926
|
commands: commandsRef.current.filter(isBridgeSafeCommand),
|
|
@@ -814885,6 +814925,7 @@ class QueryEngine {
|
|
|
814885
814925
|
yield buildSystemInitMessage({
|
|
814886
814926
|
tools,
|
|
814887
814927
|
mcpClients,
|
|
814928
|
+
mcpServerErrors: [],
|
|
814888
814929
|
model: mainLoopModel,
|
|
814889
814930
|
permissionMode: initialAppState.toolPermissionContext.mode,
|
|
814890
814931
|
commands: commands7,
|