@ai-sdk/harness 1.0.134 → 1.0.137
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/CHANGELOG.md +25 -0
- package/agent/index.ts +1 -59
- package/bridge/index.ts +1 -15
- package/dist/bridge/index.d.ts +9 -10
- package/dist/bridge/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/agent/index.ts +59 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @ai-sdk/harness
|
|
2
2
|
|
|
3
|
+
## 1.0.137
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [4f3d236]
|
|
8
|
+
- ai@7.0.126
|
|
9
|
+
|
|
10
|
+
## 1.0.136
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [ff3dcef]
|
|
15
|
+
- ai@7.0.125
|
|
16
|
+
|
|
17
|
+
## 1.0.135
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 8182916: chore(harness): minor code consistency cleanup without functional changes
|
|
22
|
+
- Updated dependencies [8c65988]
|
|
23
|
+
- Updated dependencies [527a163]
|
|
24
|
+
- ai@7.0.124
|
|
25
|
+
- @ai-sdk/provider@4.0.21
|
|
26
|
+
- @ai-sdk/provider-utils@5.0.53
|
|
27
|
+
|
|
3
28
|
## 1.0.134
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/agent/index.ts
CHANGED
|
@@ -1,59 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { createHarnessSandboxTemplate } from '../src/agent/create-harness-sandbox-template';
|
|
3
|
-
export type { HarnessAllTools } from '../src/agent/harness-agent-tool-types';
|
|
4
|
-
export type {
|
|
5
|
-
HarnessAgentSandboxConfig,
|
|
6
|
-
HarnessAgentSettings,
|
|
7
|
-
HarnessAgentToolApprovalConfiguration,
|
|
8
|
-
} from '../src/agent/harness-agent-settings';
|
|
9
|
-
export type {
|
|
10
|
-
HarnessAgentAdapter,
|
|
11
|
-
HarnessAgentAdapterSession,
|
|
12
|
-
HarnessAgentBuiltinTool,
|
|
13
|
-
HarnessAgentBuiltinToolName,
|
|
14
|
-
HarnessAgentBuiltinTools,
|
|
15
|
-
HarnessAgentBuiltinToolUseKind,
|
|
16
|
-
HarnessAgentContinueTurnOptions,
|
|
17
|
-
HarnessAgentContinueTurnState,
|
|
18
|
-
HarnessAgentLifecycleState,
|
|
19
|
-
HarnessAgentPendingToolApproval,
|
|
20
|
-
HarnessAgentPendingToolResult,
|
|
21
|
-
HarnessAgentPermissionMode,
|
|
22
|
-
HarnessAgentPrompt,
|
|
23
|
-
HarnessAgentPromptControl,
|
|
24
|
-
HarnessAgentPromptTurnOptions,
|
|
25
|
-
HarnessAgentResumeSessionState,
|
|
26
|
-
HarnessAgentSkill,
|
|
27
|
-
HarnessAgentStartOptions,
|
|
28
|
-
HarnessAgentStreamPart,
|
|
29
|
-
HarnessAgentToolSpec,
|
|
30
|
-
HarnessSandboxTemplate,
|
|
31
|
-
} from '../src/agent/harness-agent-types';
|
|
32
|
-
export { HarnessAgentSession } from '../src/agent/harness-agent-session';
|
|
33
|
-
export { collectHarnessAgentToolApprovalContinuations } from '../src/agent/harness-agent-tool-approval-continuation';
|
|
34
|
-
export { collectHarnessAgentToolResultContinuations } from '../src/agent/harness-agent-tool-result-continuation';
|
|
35
|
-
export {
|
|
36
|
-
prepareHarnessSandboxTemplate,
|
|
37
|
-
prewarmHarness,
|
|
38
|
-
} from '../src/agent/prepare-harness-sandbox-template';
|
|
39
|
-
export {
|
|
40
|
-
prepareSandboxForHarness,
|
|
41
|
-
type PrepareSandboxForHarnessResult,
|
|
42
|
-
} from '../src/agent/prepare-sandbox-for-harness';
|
|
43
|
-
export type {
|
|
44
|
-
HarnessDebugConfig,
|
|
45
|
-
HarnessDebugLevel,
|
|
46
|
-
HarnessDiagnostic,
|
|
47
|
-
HarnessDiagnosticConsumer,
|
|
48
|
-
} from '../src/agent/observability/types';
|
|
49
|
-
export { HarnessError } from '../src/errors/harness-error';
|
|
50
|
-
export { HarnessCapabilityUnsupportedError } from '../src/errors/harness-capability-unsupported-error';
|
|
51
|
-
export { HarnessSandboxAuthenticationError } from '../src/errors/harness-sandbox-authentication-error';
|
|
52
|
-
export { getHarnessErrorMessage } from '../src/agent/get-harness-error-message';
|
|
53
|
-
export {
|
|
54
|
-
createFileReporter,
|
|
55
|
-
createTraceTreeReporter,
|
|
56
|
-
type FileReporter,
|
|
57
|
-
type FileReporterOptions,
|
|
58
|
-
type TraceTreeReporterOptions,
|
|
59
|
-
} from '../src/agent/observability';
|
|
1
|
+
export * from '../src/agent';
|
package/bridge/index.ts
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
HarnessBridgeCapabilityUnsupportedError,
|
|
3
|
-
runBridge,
|
|
4
|
-
} from '../src/bridge';
|
|
5
|
-
export type {
|
|
6
|
-
RunBridgeOptions,
|
|
7
|
-
BridgeTurn,
|
|
8
|
-
BridgeEvent,
|
|
9
|
-
BridgeState,
|
|
10
|
-
BridgeHandle,
|
|
11
|
-
BridgeDebugConfig,
|
|
12
|
-
BridgeDebugLevel,
|
|
13
|
-
Experimental_BridgeUserMessage,
|
|
14
|
-
Experimental_BridgeUserMessageQueue,
|
|
15
|
-
} from '../src/bridge';
|
|
1
|
+
export * from '../src/bridge';
|
package/dist/bridge/index.d.ts
CHANGED
|
@@ -17,19 +17,19 @@ export declare class HarnessBridgeCapabilityUnsupportedError extends Error {
|
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/bridge/index.d.ts
|
|
20
|
-
type BridgeState = 'init' | 'waiting' | 'running' | 'draining' | 'done';
|
|
20
|
+
export type BridgeState = 'init' | 'waiting' | 'running' | 'draining' | 'done';
|
|
21
21
|
/** Outbound turn event the adapter emits. `seq` is added by the runtime. */
|
|
22
|
-
type BridgeEvent = Record<string, unknown> & {
|
|
22
|
+
export type BridgeEvent = Record<string, unknown> & {
|
|
23
23
|
type: string;
|
|
24
24
|
};
|
|
25
|
-
type BridgeDebugLevel = 'error' | 'warn' | 'info' | 'debug' | 'trace';
|
|
26
|
-
interface Experimental_BridgeUserMessage {
|
|
25
|
+
export type BridgeDebugLevel = 'error' | 'warn' | 'info' | 'debug' | 'trace';
|
|
26
|
+
export interface Experimental_BridgeUserMessage {
|
|
27
27
|
readonly messageId: string;
|
|
28
28
|
readonly text: string;
|
|
29
29
|
accept(): void;
|
|
30
30
|
reject(error: unknown): void;
|
|
31
31
|
}
|
|
32
|
-
interface Experimental_BridgeUserMessageQueue extends AsyncIterable<Experimental_BridgeUserMessage> {
|
|
32
|
+
export interface Experimental_BridgeUserMessageQueue extends AsyncIterable<Experimental_BridgeUserMessage> {
|
|
33
33
|
readonly pendingCount: number;
|
|
34
34
|
close(error?: unknown): void;
|
|
35
35
|
}
|
|
@@ -39,7 +39,7 @@ interface Experimental_BridgeUserMessageQueue extends AsyncIterable<Experimental
|
|
|
39
39
|
* structured `debug-event`s on it. When disabled, nothing is captured or
|
|
40
40
|
* emitted and no `seq` is consumed.
|
|
41
41
|
*/
|
|
42
|
-
interface BridgeDebugConfig {
|
|
42
|
+
export interface BridgeDebugConfig {
|
|
43
43
|
enabled?: boolean;
|
|
44
44
|
level?: BridgeDebugLevel;
|
|
45
45
|
subsystems?: string[];
|
|
@@ -48,7 +48,7 @@ interface BridgeDebugConfig {
|
|
|
48
48
|
* Per-turn surface handed to {@link RunBridgeOptions.onStart}. The adapter
|
|
49
49
|
* drives its runtime against these primitives; the runtime owns the transport.
|
|
50
50
|
*/
|
|
51
|
-
interface BridgeTurn {
|
|
51
|
+
export interface BridgeTurn {
|
|
52
52
|
/**
|
|
53
53
|
* Emit a turn event to the host. Stamps a monotonic `seq`, appends to the
|
|
54
54
|
* in-memory replay log, and sends to the live socket (best-effort — if the
|
|
@@ -113,7 +113,7 @@ interface BridgeTurn {
|
|
|
113
113
|
message?: string;
|
|
114
114
|
}): void;
|
|
115
115
|
}
|
|
116
|
-
interface RunBridgeOptions<TStart extends {
|
|
116
|
+
export interface RunBridgeOptions<TStart extends {
|
|
117
117
|
type: 'start';
|
|
118
118
|
}> {
|
|
119
119
|
/** Identifier written into `bridge-meta.json` (`'claude-code'` / `'codex'`). */
|
|
@@ -168,7 +168,7 @@ interface RunBridgeOptions<TStart extends {
|
|
|
168
168
|
* server is listening; the process then stays alive on the server until a
|
|
169
169
|
* `stop` / `destroy` exits it.
|
|
170
170
|
*/
|
|
171
|
-
interface BridgeHandle {
|
|
171
|
+
export interface BridgeHandle {
|
|
172
172
|
/** The port the WebSocket server bound to. */
|
|
173
173
|
readonly port: number;
|
|
174
174
|
/** Close the WebSocket server. Does not call `process.exit`. */
|
|
@@ -178,5 +178,4 @@ export declare function runBridge<TStart extends {
|
|
|
178
178
|
type: 'start';
|
|
179
179
|
}>(options: RunBridgeOptions<TStart>): Promise<BridgeHandle>;
|
|
180
180
|
//#endregion
|
|
181
|
-
export type { BridgeDebugConfig, BridgeDebugLevel, BridgeEvent, BridgeHandle, BridgeState, BridgeTurn, Experimental_BridgeUserMessage, Experimental_BridgeUserMessageQueue, RunBridgeOptions };
|
|
182
181
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/bridge/harness-bridge-capability-unsupported-error.ts","../../src/bridge/index.ts"],"mappings":";;;;;;;qBAOa,gDAAgD;WAClD;WACA;EAEG,cACV,SACA,WACA;IAEA;IACA;IACA;;SAQK,WACL,iBACC,SAAS;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/bridge/harness-bridge-capability-unsupported-error.ts","../../src/bridge/index.ts"],"mappings":";;;;;;;qBAOa,gDAAgD;WAClD;WACA;EAEG,cACV,SACA,WACA;IAEA;IACA;IACA;;SAQK,WACL,iBACC,SAAS;;;;YCVF;;YAGA,cAAc;EAA4B;;YAE1C;iBAEK;WACN;WACA;EACT;EACA,OAAO;;iBAGQ,4CAA4C,cAAc;WAChE;EACT,MAAM;;;;;;;;iBAoBS;EACf;EACA,QAAQ;EACR;;;;;;iBA+Ke;;;;;;;EAOf,KAAK,OAAO;;;;;;EAOZ,kBACE;IAGM;IACA,WAAW;MACT;MACA;MACA,aAAa;;MAGpB;IACD;IACA;IACA,aAAa;;;;;;;EAQf,oBACE,qBACC;IAAU;IAAmB;;WAEvB,2BAA2B;;WAG3B,aAAa;;WAGb;;;;;;;EAQT,UAAU;IACR,QAAQ;IACR;IACA;IACA,QAAQ;IACR;;;;;;;EAQF,YAAY;IAAS;;EAErB,UAAU;IAAS;IAAgB;;;iBAGpB,iBAAiB;EAAiB;;;EAEjD;;EAEA;;;;;;;;;;EAUA,QAAQ,OAAO,QAAQ,MAAM,aAAa;;;;;;;;;;;EAW1C;;;;;EAKA,qBAAqB;;;;EAIrB,qBAAqB;;EAErB;;EAEA;;EAEA,aAAa;;;;;EAKb;;;;;;;;iBA+Be;;WAEN;;EAET,SAAS;;wBAGW,UAAU;EAAiB;GAC/C,SAAS,iBAAiB,UACzB,QAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/harness",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.137",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@ai-sdk/provider": "4.0.
|
|
48
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
49
|
-
"ai": "7.0.
|
|
47
|
+
"@ai-sdk/provider": "4.0.21",
|
|
48
|
+
"@ai-sdk/provider-utils": "5.0.53",
|
|
49
|
+
"ai": "7.0.126"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"ws": "^8.21.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@ai-sdk/otel": "1.0.
|
|
61
|
+
"@ai-sdk/otel": "1.0.126",
|
|
62
62
|
"@opentelemetry/sdk-trace-base": "2.7.1",
|
|
63
63
|
"@types/node": "22.19.19",
|
|
64
64
|
"@types/ws": "^8.5.13",
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export { HarnessAgent } from './harness-agent';
|
|
2
|
+
export { createHarnessSandboxTemplate } from './create-harness-sandbox-template';
|
|
3
|
+
export type { HarnessAllTools } from './harness-agent-tool-types';
|
|
4
|
+
export type {
|
|
5
|
+
HarnessAgentSandboxConfig,
|
|
6
|
+
HarnessAgentSettings,
|
|
7
|
+
HarnessAgentToolApprovalConfiguration,
|
|
8
|
+
} from './harness-agent-settings';
|
|
9
|
+
export type {
|
|
10
|
+
HarnessAgentAdapter,
|
|
11
|
+
HarnessAgentAdapterSession,
|
|
12
|
+
HarnessAgentBuiltinTool,
|
|
13
|
+
HarnessAgentBuiltinToolName,
|
|
14
|
+
HarnessAgentBuiltinTools,
|
|
15
|
+
HarnessAgentBuiltinToolUseKind,
|
|
16
|
+
HarnessAgentContinueTurnOptions,
|
|
17
|
+
HarnessAgentContinueTurnState,
|
|
18
|
+
HarnessAgentLifecycleState,
|
|
19
|
+
HarnessAgentPendingToolApproval,
|
|
20
|
+
HarnessAgentPendingToolResult,
|
|
21
|
+
HarnessAgentPermissionMode,
|
|
22
|
+
HarnessAgentPrompt,
|
|
23
|
+
HarnessAgentPromptControl,
|
|
24
|
+
HarnessAgentPromptTurnOptions,
|
|
25
|
+
HarnessAgentResumeSessionState,
|
|
26
|
+
HarnessAgentSkill,
|
|
27
|
+
HarnessAgentStartOptions,
|
|
28
|
+
HarnessAgentStreamPart,
|
|
29
|
+
HarnessAgentToolSpec,
|
|
30
|
+
HarnessSandboxTemplate,
|
|
31
|
+
} from './harness-agent-types';
|
|
32
|
+
export { HarnessAgentSession } from './harness-agent-session';
|
|
33
|
+
export { collectHarnessAgentToolApprovalContinuations } from './harness-agent-tool-approval-continuation';
|
|
34
|
+
export { collectHarnessAgentToolResultContinuations } from './harness-agent-tool-result-continuation';
|
|
35
|
+
export {
|
|
36
|
+
prepareHarnessSandboxTemplate,
|
|
37
|
+
prewarmHarness,
|
|
38
|
+
} from './prepare-harness-sandbox-template';
|
|
39
|
+
export {
|
|
40
|
+
prepareSandboxForHarness,
|
|
41
|
+
type PrepareSandboxForHarnessResult,
|
|
42
|
+
} from './prepare-sandbox-for-harness';
|
|
43
|
+
export type {
|
|
44
|
+
HarnessDebugConfig,
|
|
45
|
+
HarnessDebugLevel,
|
|
46
|
+
HarnessDiagnostic,
|
|
47
|
+
HarnessDiagnosticConsumer,
|
|
48
|
+
} from './observability/types';
|
|
49
|
+
export { HarnessError } from '../errors/harness-error';
|
|
50
|
+
export { HarnessCapabilityUnsupportedError } from '../errors/harness-capability-unsupported-error';
|
|
51
|
+
export { HarnessSandboxAuthenticationError } from '../errors/harness-sandbox-authentication-error';
|
|
52
|
+
export { getHarnessErrorMessage } from './get-harness-error-message';
|
|
53
|
+
export {
|
|
54
|
+
createFileReporter,
|
|
55
|
+
createTraceTreeReporter,
|
|
56
|
+
type FileReporter,
|
|
57
|
+
type FileReporterOptions,
|
|
58
|
+
type TraceTreeReporterOptions,
|
|
59
|
+
} from './observability';
|