@cnwenf/occ 2.1.289 → 2.1.290

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.
Files changed (2) hide show
  1. package/dist/cli.js +29 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- globalThis.MACRO={"VERSION":"2.1.289","BINARY_NAME":"occ","BUILD_TIME":"2026-07-28T17:56:28.643Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
2
+ globalThis.MACRO={"VERSION":"2.1.290","BINARY_NAME":"occ","BUILD_TIME":"2026-07-29T17:58:05.806Z","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;
@@ -59376,7 +59376,11 @@ var init_types2 = __esm(() => {
59376
59376
  message: 'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'
59377
59377
  }));
59378
59378
  DeniedMcpServerEntrySchema = lazySchema(() => exports_external.object({
59379
- serverName: exports_external.string().regex(/^[a-zA-Z0-9_-]+$/, "Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that is explicitly blocked"),
59379
+ serverName: exports_external.string().min(1, "Server name must be non-empty").refine((name) => name.trim().length > 0, {
59380
+ message: "Server name must not be whitespace-only"
59381
+ }).refine((name) => name === name.trim(), {
59382
+ message: "Server name has leading or trailing whitespace and will never match (names are compared verbatim)"
59383
+ }).optional().describe("Name of the MCP server that is explicitly blocked"),
59380
59384
  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
59385
  serverUrl: exports_external.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')
59382
59386
  }).refine((data) => {
@@ -100633,6 +100637,7 @@ var init_modelCost = __esm(() => {
100633
100637
  inputTokens: 3,
100634
100638
  outputTokens: 15,
100635
100639
  promptCacheWriteTokens: 3.75,
100640
+ promptCacheWrite1hTokens: 6,
100636
100641
  promptCacheReadTokens: 0.3,
100637
100642
  webSearchRequests: 0.01
100638
100643
  };
@@ -100640,6 +100645,7 @@ var init_modelCost = __esm(() => {
100640
100645
  inputTokens: 15,
100641
100646
  outputTokens: 75,
100642
100647
  promptCacheWriteTokens: 18.75,
100648
+ promptCacheWrite1hTokens: 30,
100643
100649
  promptCacheReadTokens: 1.5,
100644
100650
  webSearchRequests: 0.01
100645
100651
  };
@@ -100647,6 +100653,7 @@ var init_modelCost = __esm(() => {
100647
100653
  inputTokens: 5,
100648
100654
  outputTokens: 25,
100649
100655
  promptCacheWriteTokens: 6.25,
100656
+ promptCacheWrite1hTokens: 10,
100650
100657
  promptCacheReadTokens: 0.5,
100651
100658
  webSearchRequests: 0.01
100652
100659
  };
@@ -100654,6 +100661,7 @@ var init_modelCost = __esm(() => {
100654
100661
  inputTokens: 30,
100655
100662
  outputTokens: 150,
100656
100663
  promptCacheWriteTokens: 37.5,
100664
+ promptCacheWrite1hTokens: 60,
100657
100665
  promptCacheReadTokens: 3,
100658
100666
  webSearchRequests: 0.01
100659
100667
  };
@@ -100661,6 +100669,7 @@ var init_modelCost = __esm(() => {
100661
100669
  inputTokens: 10,
100662
100670
  outputTokens: 50,
100663
100671
  promptCacheWriteTokens: 12.5,
100672
+ promptCacheWrite1hTokens: 20,
100664
100673
  promptCacheReadTokens: 1,
100665
100674
  webSearchRequests: 0.01
100666
100675
  };
@@ -100668,6 +100677,7 @@ var init_modelCost = __esm(() => {
100668
100677
  inputTokens: 0.8,
100669
100678
  outputTokens: 4,
100670
100679
  promptCacheWriteTokens: 1,
100680
+ promptCacheWrite1hTokens: 1.6,
100671
100681
  promptCacheReadTokens: 0.08,
100672
100682
  webSearchRequests: 0.01
100673
100683
  };
@@ -100675,6 +100685,7 @@ var init_modelCost = __esm(() => {
100675
100685
  inputTokens: 1,
100676
100686
  outputTokens: 5,
100677
100687
  promptCacheWriteTokens: 1.25,
100688
+ promptCacheWrite1hTokens: 2,
100678
100689
  promptCacheReadTokens: 0.1,
100679
100690
  webSearchRequests: 0.01
100680
100691
  };
@@ -452643,6 +452654,11 @@ var init_coreSchemas = __esm(() => {
452643
452654
  name: exports_external.string(),
452644
452655
  status: exports_external.string()
452645
452656
  })),
452657
+ mcp_server_errors: exports_external.array(exports_external.object({
452658
+ name: exports_external.string(),
452659
+ type: exports_external.string(),
452660
+ message: exports_external.string()
452661
+ })).optional().describe("@internal MCP server config errors collected during connection"),
452646
452662
  model: exports_external.string(),
452647
452663
  permissionMode: PermissionModeSchema(),
452648
452664
  slash_commands: exports_external.array(exports_external.string()),
@@ -738433,6 +738449,8 @@ function sdkCompatToolName(name3) {
738433
738449
  function buildSystemInitMessage(inputs) {
738434
738450
  const settings = getSettings_DEPRECATED();
738435
738451
  const outputStyle = settings?.outputStyle ?? DEFAULT_OUTPUT_STYLE_NAME;
738452
+ const mcpClientNames = new Set(inputs.mcpClients.map((client8) => client8.name));
738453
+ const filteredMcpServerErrors = inputs.mcpServerErrors.filter((error52) => !mcpClientNames.has(error52.name));
738436
738454
  const initMessage = {
738437
738455
  type: "system",
738438
738456
  subtype: "init",
@@ -738443,6 +738461,13 @@ function buildSystemInitMessage(inputs) {
738443
738461
  name: client8.name,
738444
738462
  status: client8.type
738445
738463
  })),
738464
+ ...filteredMcpServerErrors.length > 0 && {
738465
+ mcp_server_errors: filteredMcpServerErrors.map((error52) => ({
738466
+ name: error52.name,
738467
+ type: error52.type,
738468
+ message: error52.message
738469
+ }))
738470
+ },
738446
738471
  model: inputs.model,
738447
738472
  permissionMode: inputs.permissionMode,
738448
738473
  slash_commands: inputs.commands.filter((c9) => c9.userInvocable !== false).map((c9) => c9.name),
@@ -742881,6 +742906,7 @@ function useReplBridge(messages, setMessages, abortControllerRef, commands7, mai
742881
742906
  handleRef.current?.writeSdkMessages([buildSystemInitMessage({
742882
742907
  tools: [],
742883
742908
  mcpClients: [],
742909
+ mcpServerErrors: [],
742884
742910
  model: mainLoopModelRef.current,
742885
742911
  permissionMode: state_0.toolPermissionContext.mode,
742886
742912
  commands: commandsRef.current.filter(isBridgeSafeCommand),
@@ -814885,6 +814911,7 @@ class QueryEngine {
814885
814911
  yield buildSystemInitMessage({
814886
814912
  tools,
814887
814913
  mcpClients,
814914
+ mcpServerErrors: [],
814888
814915
  model: mainLoopModel,
814889
814916
  permissionMode: initialAppState.toolPermissionContext.mode,
814890
814917
  commands: commands7,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cnwenf/occ",
3
- "version": "2.1.289",
3
+ "version": "2.1.290",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "bin": {