@opencow-ai/opencow-agent-sdk 0.4.14 → 0.4.15

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/dist/cli.mjs CHANGED
@@ -94698,7 +94698,7 @@ function printStartupScreen() {
94698
94698
  const sLen = ` ● ${sL} Ready — type /help to begin`.length;
94699
94699
  out.push(boxRow(sRow, W2, sLen));
94700
94700
  out.push(`${rgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET}`);
94701
- out.push(` ${DIM}${rgb(...DIMCOL)}opencow ${RESET}${rgb(...ACCENT)}v${"0.4.14"}${RESET}`);
94701
+ out.push(` ${DIM}${rgb(...DIMCOL)}opencow ${RESET}${rgb(...ACCENT)}v${"0.4.15"}${RESET}`);
94702
94702
  out.push("");
94703
94703
  process.stdout.write(out.join(`
94704
94704
  `) + `
@@ -244619,7 +244619,7 @@ function getAnthropicEnvMetadata() {
244619
244619
  function getBuildAgeMinutes() {
244620
244620
  if (false)
244621
244621
  ;
244622
- const buildTime = new Date("2026-07-07T07:10:57.155Z").getTime();
244622
+ const buildTime = new Date("2026-07-07T09:41:37.769Z").getTime();
244623
244623
  if (isNaN(buildTime))
244624
244624
  return;
244625
244625
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -246193,6 +246193,27 @@ function isResultSuccessful(message, stopReason = null) {
246193
246193
  }
246194
246194
  return stopReason === "end_turn";
246195
246195
  }
246196
+ function buildErrorDuringExecutionDiagnostic({
246197
+ resultType,
246198
+ lastContentType,
246199
+ stopReason
246200
+ }) {
246201
+ return `${ERROR_DURING_EXECUTION_DIAGNOSTIC_PREFIX} result_type=${resultType} last_content_type=${lastContentType} stop_reason=${stopReason}`;
246202
+ }
246203
+ function buildErrorDuringExecutionErrors({
246204
+ recentErrors,
246205
+ stopReason
246206
+ }) {
246207
+ const visibleErrors = recentErrors.filter((error41) => !error41.startsWith(ERROR_DURING_EXECUTION_DIAGNOSTIC_PREFIX));
246208
+ if (visibleErrors.length > 0)
246209
+ return visibleErrors;
246210
+ if (stopReason === "tool_use") {
246211
+ return [
246212
+ "The upstream model requested a tool but did not produce a final assistant response after the tool result."
246213
+ ];
246214
+ }
246215
+ return ["The upstream model stopped before producing a final assistant response."];
246216
+ }
246196
246217
  function normalizeUserMessageForSdk(message) {
246197
246218
  const content = message.content;
246198
246219
  if (!Array.isArray(content))
@@ -246497,7 +246518,7 @@ function extractCliName(command) {
246497
246518
  }
246498
246519
  return;
246499
246520
  }
246500
- var ASK_READ_FILE_STATE_CACHE_SIZE = 10, MAX_TOOL_PROGRESS_TRACKING_ENTRIES = 100, TOOL_PROGRESS_THROTTLE_MS = 30000, toolProgressLastSentTime, STRIPPED_COMMANDS;
246521
+ var ASK_READ_FILE_STATE_CACHE_SIZE = 10, ERROR_DURING_EXECUTION_DIAGNOSTIC_PREFIX = "[ede_diagnostic]", MAX_TOOL_PROGRESS_TRACKING_ENTRIES = 100, TOOL_PROGRESS_THROTTLE_MS = 30000, toolProgressLastSentTime, STRIPPED_COMMANDS;
246501
246522
  var init_queryHelpers = __esm(() => {
246502
246523
  init_last();
246503
246524
  init_state();
@@ -480054,7 +480075,7 @@ function buildPrimarySection() {
480054
480075
  }, undefined, false, undefined, this);
480055
480076
  return [{
480056
480077
  label: "Version",
480057
- value: "0.4.14"
480078
+ value: "0.4.15"
480058
480079
  }, {
480059
480080
  label: "Session name",
480060
480081
  value: nameValue
@@ -536377,7 +536398,7 @@ var init_bridge_kick = __esm(() => {
536377
536398
  var call58 = async () => {
536378
536399
  return {
536379
536400
  type: "text",
536380
- value: `${"99.0.0"} (built ${"2026-07-07T07:10:57.155Z"})`
536401
+ value: `${"99.0.0"} (built ${"2026-07-07T09:41:37.769Z"})`
536381
536402
  };
536382
536403
  }, version2, version_default;
536383
536404
  var init_version = __esm(() => {
@@ -558487,7 +558508,7 @@ function WelcomeV2() {
558487
558508
  dimColor: true,
558488
558509
  children: [
558489
558510
  "v",
558490
- "0.4.14",
558511
+ "0.4.15",
558491
558512
  " "
558492
558513
  ]
558493
558514
  }, undefined, true, undefined, this)
@@ -558687,7 +558708,7 @@ function WelcomeV2() {
558687
558708
  dimColor: true,
558688
558709
  children: [
558689
558710
  "v",
558690
- "0.4.14",
558711
+ "0.4.15",
558691
558712
  " "
558692
558713
  ]
558693
558714
  }, undefined, true, undefined, this)
@@ -558913,7 +558934,7 @@ function AppleTerminalWelcomeV2(t0) {
558913
558934
  dimColor: true,
558914
558935
  children: [
558915
558936
  "v",
558916
- "0.4.14",
558937
+ "0.4.15",
558917
558938
  " "
558918
558939
  ]
558919
558940
  }, undefined, true, undefined, this);
@@ -559167,7 +559188,7 @@ function AppleTerminalWelcomeV2(t0) {
559167
559188
  dimColor: true,
559168
559189
  children: [
559169
559190
  "v",
559170
- "0.4.14",
559191
+ "0.4.15",
559171
559192
  " "
559172
559193
  ]
559173
559194
  }, undefined, true, undefined, this);
@@ -570390,6 +570411,17 @@ class QueryEngine {
570390
570411
  };
570391
570412
  return;
570392
570413
  }
570414
+ const recentErrors = (() => {
570415
+ const all4 = getInMemoryErrors();
570416
+ const start = errorLogWatermark ? all4.lastIndexOf(errorLogWatermark) + 1 : 0;
570417
+ return all4.slice(start).map((_) => _.error);
570418
+ })();
570419
+ const edeDiagnostic = buildErrorDuringExecutionDiagnostic({
570420
+ resultType: edeResultType,
570421
+ lastContentType: edeLastContentType,
570422
+ stopReason: lastStopReason
570423
+ });
570424
+ logForDebugging2(edeDiagnostic, { level: "warn" });
570393
570425
  yield {
570394
570426
  type: "result",
570395
570427
  subtype: "error_during_execution",
@@ -570405,14 +570437,10 @@ class QueryEngine {
570405
570437
  permission_denials: this.permissionDenials,
570406
570438
  fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
570407
570439
  uuid: randomUUID46(),
570408
- errors: (() => {
570409
- const all4 = getInMemoryErrors();
570410
- const start = errorLogWatermark ? all4.lastIndexOf(errorLogWatermark) + 1 : 0;
570411
- return [
570412
- `[ede_diagnostic] result_type=${edeResultType} last_content_type=${edeLastContentType} stop_reason=${lastStopReason}`,
570413
- ...all4.slice(start).map((_) => _.error)
570414
- ];
570415
- })()
570440
+ errors: buildErrorDuringExecutionErrors({
570441
+ recentErrors,
570442
+ stopReason: lastStopReason
570443
+ })
570416
570444
  };
570417
570445
  return;
570418
570446
  }
@@ -580035,7 +580063,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
580035
580063
  pendingHookMessages
580036
580064
  }, renderAndRun);
580037
580065
  }
580038
- }).version("0.4.14 (OpenCow)", "-v, --version", "Output the version number");
580066
+ }).version("0.4.15 (OpenCow)", "-v, --version", "Output the version number");
580039
580067
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
580040
580068
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
580041
580069
  if (canUserConfigureAdvisor()) {
@@ -580681,7 +580709,7 @@ if (false) {}
580681
580709
  async function main2() {
580682
580710
  const args = process.argv.slice(2);
580683
580711
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
580684
- console.log(`${"0.4.14"} (OpenCow)`);
580712
+ console.log(`${"0.4.15"} (OpenCow)`);
580685
580713
  return;
580686
580714
  }
580687
580715
  if (args.includes("--provider")) {
@@ -580799,4 +580827,4 @@ async function main2() {
580799
580827
  }
580800
580828
  main2();
580801
580829
 
580802
- //# debugId=C329783BF76928B664756E2164756E21
580830
+ //# debugId=B3DC484465E4B22564756E2164756E21
package/dist/client.js CHANGED
@@ -233960,6 +233960,27 @@ function isResultSuccessful(message, stopReason = null) {
233960
233960
  }
233961
233961
  return stopReason === "end_turn";
233962
233962
  }
233963
+ function buildErrorDuringExecutionDiagnostic({
233964
+ resultType,
233965
+ lastContentType,
233966
+ stopReason
233967
+ }) {
233968
+ return `${ERROR_DURING_EXECUTION_DIAGNOSTIC_PREFIX} result_type=${resultType} last_content_type=${lastContentType} stop_reason=${stopReason}`;
233969
+ }
233970
+ function buildErrorDuringExecutionErrors({
233971
+ recentErrors,
233972
+ stopReason
233973
+ }) {
233974
+ const visibleErrors = recentErrors.filter((error41) => !error41.startsWith(ERROR_DURING_EXECUTION_DIAGNOSTIC_PREFIX));
233975
+ if (visibleErrors.length > 0)
233976
+ return visibleErrors;
233977
+ if (stopReason === "tool_use") {
233978
+ return [
233979
+ "The upstream model requested a tool but did not produce a final assistant response after the tool result."
233980
+ ];
233981
+ }
233982
+ return ["The upstream model stopped before producing a final assistant response."];
233983
+ }
233963
233984
  function normalizeUserMessageForSdk(message) {
233964
233985
  const content = message.content;
233965
233986
  if (!Array.isArray(content))
@@ -234147,7 +234168,7 @@ async function* handleOrphanedPermission(orphanedPermission, tools, mutableMessa
234147
234168
  }
234148
234169
  }
234149
234170
  }
234150
- var MAX_TOOL_PROGRESS_TRACKING_ENTRIES = 100, TOOL_PROGRESS_THROTTLE_MS = 30000, toolProgressLastSentTime, STRIPPED_COMMANDS;
234171
+ var ERROR_DURING_EXECUTION_DIAGNOSTIC_PREFIX = "[ede_diagnostic]", MAX_TOOL_PROGRESS_TRACKING_ENTRIES = 100, TOOL_PROGRESS_THROTTLE_MS = 30000, toolProgressLastSentTime, STRIPPED_COMMANDS;
234151
234172
  var init_queryHelpers = __esm(() => {
234152
234173
  init_last();
234153
234174
  init_state();
@@ -282872,7 +282893,7 @@ function getAnthropicEnvMetadata() {
282872
282893
  function getBuildAgeMinutes() {
282873
282894
  if (false)
282874
282895
  ;
282875
- const buildTime = new Date("2026-07-07T07:10:57.155Z").getTime();
282896
+ const buildTime = new Date("2026-07-07T09:41:37.769Z").getTime();
282876
282897
  if (isNaN(buildTime))
282877
282898
  return;
282878
282899
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -300862,6 +300883,17 @@ class QueryEngine {
300862
300883
  };
300863
300884
  return;
300864
300885
  }
300886
+ const recentErrors = (() => {
300887
+ const all4 = getInMemoryErrors();
300888
+ const start = errorLogWatermark ? all4.lastIndexOf(errorLogWatermark) + 1 : 0;
300889
+ return all4.slice(start).map((_) => _.error);
300890
+ })();
300891
+ const edeDiagnostic = buildErrorDuringExecutionDiagnostic({
300892
+ resultType: edeResultType,
300893
+ lastContentType: edeLastContentType,
300894
+ stopReason: lastStopReason
300895
+ });
300896
+ logForDebugging(edeDiagnostic, { level: "warn" });
300865
300897
  yield {
300866
300898
  type: "result",
300867
300899
  subtype: "error_during_execution",
@@ -300877,14 +300909,10 @@ class QueryEngine {
300877
300909
  permission_denials: this.permissionDenials,
300878
300910
  fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
300879
300911
  uuid: randomUUID23(),
300880
- errors: (() => {
300881
- const all4 = getInMemoryErrors();
300882
- const start = errorLogWatermark ? all4.lastIndexOf(errorLogWatermark) + 1 : 0;
300883
- return [
300884
- `[ede_diagnostic] result_type=${edeResultType} last_content_type=${edeLastContentType} stop_reason=${lastStopReason}`,
300885
- ...all4.slice(start).map((_) => _.error)
300886
- ];
300887
- })()
300912
+ errors: buildErrorDuringExecutionErrors({
300913
+ recentErrors,
300914
+ stopReason: lastStopReason
300915
+ })
300888
300916
  };
300889
300917
  return;
300890
300918
  }
@@ -336355,4 +336383,4 @@ export {
336355
336383
  AbortError2 as AbortError
336356
336384
  };
336357
336385
 
336358
- //# debugId=1FEDB4CAC28D153364756E2164756E21
336386
+ //# debugId=7503E4A2FEE6F7C164756E2164756E21
package/dist/sdk.js CHANGED
@@ -233960,6 +233960,27 @@ function isResultSuccessful(message, stopReason = null) {
233960
233960
  }
233961
233961
  return stopReason === "end_turn";
233962
233962
  }
233963
+ function buildErrorDuringExecutionDiagnostic({
233964
+ resultType,
233965
+ lastContentType,
233966
+ stopReason
233967
+ }) {
233968
+ return `${ERROR_DURING_EXECUTION_DIAGNOSTIC_PREFIX} result_type=${resultType} last_content_type=${lastContentType} stop_reason=${stopReason}`;
233969
+ }
233970
+ function buildErrorDuringExecutionErrors({
233971
+ recentErrors,
233972
+ stopReason
233973
+ }) {
233974
+ const visibleErrors = recentErrors.filter((error41) => !error41.startsWith(ERROR_DURING_EXECUTION_DIAGNOSTIC_PREFIX));
233975
+ if (visibleErrors.length > 0)
233976
+ return visibleErrors;
233977
+ if (stopReason === "tool_use") {
233978
+ return [
233979
+ "The upstream model requested a tool but did not produce a final assistant response after the tool result."
233980
+ ];
233981
+ }
233982
+ return ["The upstream model stopped before producing a final assistant response."];
233983
+ }
233963
233984
  function normalizeUserMessageForSdk(message) {
233964
233985
  const content = message.content;
233965
233986
  if (!Array.isArray(content))
@@ -234147,7 +234168,7 @@ async function* handleOrphanedPermission(orphanedPermission, tools, mutableMessa
234147
234168
  }
234148
234169
  }
234149
234170
  }
234150
- var MAX_TOOL_PROGRESS_TRACKING_ENTRIES = 100, TOOL_PROGRESS_THROTTLE_MS = 30000, toolProgressLastSentTime, STRIPPED_COMMANDS;
234171
+ var ERROR_DURING_EXECUTION_DIAGNOSTIC_PREFIX = "[ede_diagnostic]", MAX_TOOL_PROGRESS_TRACKING_ENTRIES = 100, TOOL_PROGRESS_THROTTLE_MS = 30000, toolProgressLastSentTime, STRIPPED_COMMANDS;
234151
234172
  var init_queryHelpers = __esm(() => {
234152
234173
  init_last();
234153
234174
  init_state();
@@ -282872,7 +282893,7 @@ function getAnthropicEnvMetadata() {
282872
282893
  function getBuildAgeMinutes() {
282873
282894
  if (false)
282874
282895
  ;
282875
- const buildTime = new Date("2026-07-07T07:10:57.155Z").getTime();
282896
+ const buildTime = new Date("2026-07-07T09:41:37.769Z").getTime();
282876
282897
  if (isNaN(buildTime))
282877
282898
  return;
282878
282899
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -300862,6 +300883,17 @@ class QueryEngine {
300862
300883
  };
300863
300884
  return;
300864
300885
  }
300886
+ const recentErrors = (() => {
300887
+ const all4 = getInMemoryErrors();
300888
+ const start = errorLogWatermark ? all4.lastIndexOf(errorLogWatermark) + 1 : 0;
300889
+ return all4.slice(start).map((_) => _.error);
300890
+ })();
300891
+ const edeDiagnostic = buildErrorDuringExecutionDiagnostic({
300892
+ resultType: edeResultType,
300893
+ lastContentType: edeLastContentType,
300894
+ stopReason: lastStopReason
300895
+ });
300896
+ logForDebugging(edeDiagnostic, { level: "warn" });
300865
300897
  yield {
300866
300898
  type: "result",
300867
300899
  subtype: "error_during_execution",
@@ -300877,14 +300909,10 @@ class QueryEngine {
300877
300909
  permission_denials: this.permissionDenials,
300878
300910
  fast_mode_state: getFastModeState(mainLoopModel, initialAppState.fastMode),
300879
300911
  uuid: randomUUID23(),
300880
- errors: (() => {
300881
- const all4 = getInMemoryErrors();
300882
- const start = errorLogWatermark ? all4.lastIndexOf(errorLogWatermark) + 1 : 0;
300883
- return [
300884
- `[ede_diagnostic] result_type=${edeResultType} last_content_type=${edeLastContentType} stop_reason=${lastStopReason}`,
300885
- ...all4.slice(start).map((_) => _.error)
300886
- ];
300887
- })()
300912
+ errors: buildErrorDuringExecutionErrors({
300913
+ recentErrors,
300914
+ stopReason: lastStopReason
300915
+ })
300888
300916
  };
300889
300917
  return;
300890
300918
  }
@@ -336355,4 +336383,4 @@ export {
336355
336383
  AbortError2 as AbortError
336356
336384
  };
336357
336385
 
336358
- //# debugId=C44AAFB0DCE9FC3D64756E2164756E21
336386
+ //# debugId=40B327CE0812EA8164756E2164756E21
@@ -15,6 +15,16 @@ export type PermissionPromptTool = Tool<ReturnType<typeof permissionToolInputSch
15
15
  * (model chose to emit no content blocks)
16
16
  */
17
17
  export declare function isResultSuccessful(message: Message | undefined, stopReason?: string | null): message is Message;
18
+ export declare const ERROR_DURING_EXECUTION_DIAGNOSTIC_PREFIX = "[ede_diagnostic]";
19
+ export declare function buildErrorDuringExecutionDiagnostic({ resultType, lastContentType, stopReason, }: {
20
+ resultType: string;
21
+ lastContentType: string;
22
+ stopReason: string | null;
23
+ }): string;
24
+ export declare function buildErrorDuringExecutionErrors({ recentErrors, stopReason, }: {
25
+ recentErrors: string[];
26
+ stopReason: string | null;
27
+ }): string[];
18
28
  export declare function normalizeMessage(message: Message): Generator<SDKMessage>;
19
29
  export declare function handleOrphanedPermission(orphanedPermission: OrphanedPermission, tools: Tools, mutableMessages: Message[], processUserInputContext: ProcessUserInputContext): AsyncGenerator<SDKMessage, void, unknown>;
20
30
  export declare function extractReadFilesFromMessages(messages: Message[], cwd: string, maxSize?: number): FileStateCache;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencow-ai/opencow-agent-sdk",
3
- "version": "0.4.14",
3
+ "version": "0.4.15",
4
4
  "description": "Claude Code opened to any LLM — OpenAI, Gemini, DeepSeek, Ollama, and 200+ models",
5
5
  "type": "module",
6
6
  "main": "./dist/sdk.js",