@botbotgo/agent-harness 0.0.76 → 0.0.77

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.
@@ -1 +1 @@
1
- export declare const AGENT_HARNESS_VERSION = "0.0.75";
1
+ export declare const AGENT_HARNESS_VERSION = "0.0.76";
@@ -1 +1 @@
1
- export const AGENT_HARNESS_VERSION = "0.0.75";
1
+ export const AGENT_HARNESS_VERSION = "0.0.76";
@@ -864,6 +864,7 @@ export class AgentHarnessRuntime {
864
864
  return;
865
865
  }
866
866
  let emitted = false;
867
+ let streamActivityObserved = false;
867
868
  const { threadId, runId } = await this.ensureThreadStarted(selectedAgentId, binding, options.input, options.threadId);
868
869
  await this.persistence.saveRunRequest(threadId, runId, this.buildPersistedRunRequest(options.input, invocation));
869
870
  yield { type: "event", event: await this.emitRunCreated(threadId, runId, {
@@ -885,6 +886,7 @@ export class AgentHarnessRuntime {
885
886
  files: invocation.files,
886
887
  })) {
887
888
  if (chunk) {
889
+ streamActivityObserved = true;
888
890
  const normalizedChunk = typeof chunk === "string"
889
891
  ? chunk.startsWith(AGENT_INTERRUPT_SENTINEL_PREFIX)
890
892
  ? { kind: "interrupt", content: chunk.slice(AGENT_INTERRUPT_SENTINEL_PREFIX.length) }
@@ -998,11 +1000,30 @@ export class AgentHarnessRuntime {
998
1000
  return;
999
1001
  }
1000
1002
  catch (error) {
1001
- if (emitted) {
1003
+ if (emitted || streamActivityObserved) {
1004
+ const runtimeFailure = renderRuntimeFailure(error);
1002
1005
  yield { type: "event", event: await this.setRunStateAndEmit(threadId, runId, 6, "failed", {
1003
1006
  previousState: "running",
1004
1007
  error: error instanceof Error ? error.message : String(error),
1005
1008
  }) };
1009
+ yield {
1010
+ type: "content",
1011
+ threadId,
1012
+ runId,
1013
+ agentId: selectedAgentId,
1014
+ content: runtimeFailure,
1015
+ };
1016
+ yield {
1017
+ type: "result",
1018
+ result: {
1019
+ threadId,
1020
+ runId,
1021
+ agentId: selectedAgentId,
1022
+ state: "failed",
1023
+ output: runtimeFailure,
1024
+ finalMessageText: runtimeFailure,
1025
+ },
1026
+ };
1006
1027
  return;
1007
1028
  }
1008
1029
  if (error instanceof RuntimeOperationTimeoutError && error.stage === "invoke") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.76",
3
+ "version": "0.0.77",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "type": "module",
6
6
  "packageManager": "npm@10.9.2",