@botbotgo/agent-harness 0.0.80 → 0.0.81

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.
@@ -19,6 +19,9 @@ export type RecoveryConfig = {
19
19
  };
20
20
  export type ConcurrencyConfig = {
21
21
  maxConcurrentRuns: number;
22
+ leaseMs: number;
23
+ heartbeatIntervalMs: number;
24
+ heartbeatTimeoutMs: number;
22
25
  };
23
26
  export type ProviderRetryConfig = {
24
27
  maxAttempts: number;
@@ -1,3 +1,4 @@
1
+ import { readFileSync } from "node:fs";
1
2
  import path from "node:path";
2
3
  function getRoutingObject(refs) {
3
4
  const runtimeDefaults = getRuntimeDefaults(refs);
@@ -63,7 +64,27 @@ export function getConcurrencyConfig(refs) {
63
64
  concurrency.maxConcurrentRuns > 0
64
65
  ? Math.floor(concurrency.maxConcurrentRuns)
65
66
  : 3;
66
- return { maxConcurrentRuns };
67
+ const leaseMs = typeof concurrency.leaseMs === "number" &&
68
+ Number.isFinite(concurrency.leaseMs) &&
69
+ concurrency.leaseMs > 0
70
+ ? Math.floor(concurrency.leaseMs)
71
+ : 30_000;
72
+ const heartbeatIntervalMs = typeof concurrency.heartbeatIntervalMs === "number" &&
73
+ Number.isFinite(concurrency.heartbeatIntervalMs) &&
74
+ concurrency.heartbeatIntervalMs > 0
75
+ ? Math.floor(concurrency.heartbeatIntervalMs)
76
+ : 5_000;
77
+ const heartbeatTimeoutMs = typeof concurrency.heartbeatTimeoutMs === "number" &&
78
+ Number.isFinite(concurrency.heartbeatTimeoutMs) &&
79
+ concurrency.heartbeatTimeoutMs > 0
80
+ ? Math.floor(concurrency.heartbeatTimeoutMs)
81
+ : Math.max(leaseMs, heartbeatIntervalMs * 3);
82
+ return {
83
+ maxConcurrentRuns,
84
+ leaseMs,
85
+ heartbeatIntervalMs,
86
+ heartbeatTimeoutMs,
87
+ };
67
88
  }
68
89
  export function getResilienceConfig(refs) {
69
90
  const runtimeDefaults = getRuntimeDefaults(refs);
@@ -210,6 +231,14 @@ export function resolvePromptValue(promptConfig) {
210
231
  if (typeof promptConfig === "string" && promptConfig.trim()) {
211
232
  return promptConfig;
212
233
  }
234
+ if (typeof promptConfig === "object" && promptConfig !== null && !Array.isArray(promptConfig)) {
235
+ const promptPath = typeof promptConfig.path === "string"
236
+ ? promptConfig.path
237
+ : undefined;
238
+ if (promptPath?.trim()) {
239
+ return readFileSync(promptPath, "utf8");
240
+ }
241
+ }
213
242
  return undefined;
214
243
  }
215
244
  export function resolveRefId(ref) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.80",
3
+ "version": "0.0.81",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "type": "module",
6
6
  "packageManager": "npm@10.9.2",
@@ -53,7 +53,7 @@
53
53
  "scripts": {
54
54
  "build": "rm -rf dist tsconfig.tsbuildinfo && tsc -p tsconfig.json && cp -R config dist/",
55
55
  "check": "tsc -p tsconfig.json --noEmit",
56
- "test": "vitest run test/hello-file.test.ts test/public-api.test.ts test/runtime-health.test.ts test/memory-runtime.test.ts test/sqlite-persistence.test.ts test/runtime-record-maintenance.test.ts test/resource-optional-provider.test.ts test/resource-isolation.test.ts test/stock-research-app-load-harness.test.ts test/stock-research-app-run.test.ts test/stock-research-app-config.test.ts test/release-workflow.test.ts test/release-version.test.ts test/gitignore.test.ts test/package-lock.test.ts test/readme.test.ts test/product-boundary-docs.test.ts test/long-term-memory-docs.test.ts test/local-docs-persistence-inventory.test.ts test/docs-site.test.ts test/runtime-adapter-regressions.test.ts test/runtime-capabilities.test.ts test/runtime-recovery.test.ts test/tool-extension-gaps.test.ts test/checkpoint-maintenance.test.ts test/llamaindex-dependency-compat.test.ts test/skill-standard.test.ts test/routing-config.test.ts test/workspace-compat-regressions.test.ts test/upstream-compat-regressions.test.ts test/yaml-format.test.ts test/config-secrets.test.ts test/init-command.test.ts test/coding-agent-guide.test.ts",
56
+ "test": "vitest run test/hello-file.test.ts test/public-api.test.ts test/runtime-health.test.ts test/memory-runtime.test.ts test/sqlite-persistence.test.ts test/runtime-queue-lease.test.ts test/runtime-cancel.test.ts test/runtime-record-maintenance.test.ts test/resource-optional-provider.test.ts test/resource-isolation.test.ts test/stock-research-app-load-harness.test.ts test/stock-research-app-run.test.ts test/stock-research-app-config.test.ts test/release-workflow.test.ts test/release-version.test.ts test/gitignore.test.ts test/package-lock.test.ts test/readme.test.ts test/product-boundary-docs.test.ts test/long-term-memory-docs.test.ts test/local-docs-persistence-inventory.test.ts test/docs-site.test.ts test/runtime-adapter-regressions.test.ts test/runtime-capabilities.test.ts test/runtime-recovery.test.ts test/tool-extension-gaps.test.ts test/checkpoint-maintenance.test.ts test/llamaindex-dependency-compat.test.ts test/skill-standard.test.ts test/routing-config.test.ts test/workspace-compat-regressions.test.ts test/upstream-compat-regressions.test.ts test/yaml-format.test.ts test/config-secrets.test.ts test/init-command.test.ts test/coding-agent-guide.test.ts",
57
57
  "test:real-providers": "vitest run test/real-provider-harness.test.ts",
58
58
  "release:prepare": "npm version patch --no-git-tag-version && node ./scripts/sync-example-version.mjs",
59
59
  "release:pack": "npm pack --dry-run",