@agentium/harness 4.5.0 → 4.7.0

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.
@@ -0,0 +1,46 @@
1
+ import type { InputReply, InputRequest, InputRequestOptions, MessageContent } from "@agentium/core";
2
+ export type HarnessInputErrorCode = "invalid_input" | "input_pending" | "input_not_pending" | "input_mismatch" | "input_already_resolved" | "run_finished";
3
+ export declare class HarnessInputError extends Error {
4
+ readonly code: HarnessInputErrorCode;
5
+ constructor(code: HarnessInputErrorCode, message: string);
6
+ }
7
+ export declare function validateRunInput(input: MessageContent): MessageContent;
8
+ export declare function validateTimeout(value: number | undefined): void;
9
+ /** Owns live promises only; this is not a restart checkpoint. */
10
+ export declare class LiveInput {
11
+ private runId;
12
+ private signal;
13
+ private timeouts;
14
+ private emit;
15
+ private expire;
16
+ private pending?;
17
+ private resolved;
18
+ private timer?;
19
+ private activeTimer?;
20
+ private activeSince;
21
+ private activeRemaining;
22
+ private closed;
23
+ private onAbort;
24
+ constructor(runId: string, signal: AbortSignal, timeouts: {
25
+ activeTimeoutMs?: number;
26
+ inputTimeoutMs?: number;
27
+ }, emit: (event: {
28
+ type: "input.requested";
29
+ request: InputRequest;
30
+ } | {
31
+ type: "input.resolved";
32
+ requestId: string;
33
+ } | {
34
+ type: "run.resumed";
35
+ requestId: string;
36
+ }) => void, expire: (code: "input_timeout" | "active_timeout") => void);
37
+ get request(): InputRequest | undefined;
38
+ assertActive(): void;
39
+ assertNotWaiting(): void;
40
+ requestInput(options: InputRequestOptions): Promise<InputReply>;
41
+ reply(requestId: string, input: MessageContent): void;
42
+ close(): void;
43
+ private resumeClock;
44
+ private clearTimers;
45
+ }
46
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/runtime/input.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,mBAAmB,EAAE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M,CAAA;KAAE,KAC3C,IAAI,EACD,MAAM,EAAE,CAAC,IAAI,EAAE,eAAe,GAAG,gBAAgB,KAAK,IAAI;IAOpE,IAAI,OAAO,IAAI,YAAY,GAAG,SAAS,CAEtC;IAED,YAAY,IAAI,IAAI;IAIpB,gBAAgB,IAAI,IAAI;IAMxB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;IAwB/D,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI;IAmBrD,KAAK,IAAI,IAAI;IASb,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,WAAW;CAIpB"}
package/dist/testing.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_driver = require("./driver-Cr2BGG4h.cjs");
2
+ const require_driver = require("./driver-Bh_wLWCP.cjs");
3
3
  let node_crypto = require("node:crypto");
4
4
  //#region src/testing.ts
5
5
  /** No test-framework dependency. Calls the driver once and throws on violated public lifecycle invariants. */
package/dist/testing.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as HarnessRuntime } from "./driver-BvzvqvpB.js";
1
+ import { n as HarnessRuntime } from "./driver-reTLBJ_o.js";
2
2
  import { randomUUID } from "node:crypto";
3
3
  //#region src/testing.ts
4
4
  /** No test-framework dependency. Calls the driver once and throws on violated public lifecycle invariants. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentium/harness",
3
- "version": "4.5.0",
3
+ "version": "4.7.0",
4
4
  "description": "Composable harness developer kit for Agentium tools, context, middleware and presets",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -48,7 +48,8 @@
48
48
  }
49
49
  },
50
50
  "files": [
51
- "dist"
51
+ "dist",
52
+ "CONVERSATIONAL-RUNS.md"
52
53
  ],
53
54
  "scripts": {
54
55
  "build": "tsdown --config ../../tsdown.config.ts && tsc -p tsconfig.build.json --emitDeclarationOnly --declaration --pretty false && node ../../scripts/cjs-declarations.mjs",
@@ -57,7 +58,7 @@
57
58
  "test:package": "cd ../.. && AGENTIUM_TEST_PACKAGES=1 vitest run packages/harness/src/__tests__/package-consumption.test.ts"
58
59
  },
59
60
  "peerDependencies": {
60
- "@agentium/core": "^4.5.0"
61
+ "@agentium/core": "^4.7.0"
61
62
  },
62
63
  "dependencies": {
63
64
  "zod": "^4.6.5"