@harness-kernel/core 0.1.1 → 0.2.1
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/agent/context.d.ts +1 -1
- package/dist/agent/context.js +1 -1
- package/dist/agent/event.js +2 -2
- package/dist/agent/hook.d.ts +2 -2
- package/dist/agent/hook.js +1 -1
- package/dist/agent/mode.d.ts +1 -1
- package/dist/agent/mode.js +1 -1
- package/dist/agent/role.js +1 -1
- package/dist/agent/session.d.ts +1 -1
- package/dist/agent/session.js +1 -1
- package/dist/agent/tool.d.ts +1 -1
- package/dist/agent/tool.js +1 -1
- package/dist/agent.d.ts +4 -4
- package/dist/{approval-DfvjpbFs.d.ts → approval-D_G2w-fW.d.ts} +10 -14
- package/dist/{chunk-4A2P4QU5.js → chunk-B4Q6CPYO.js} +2 -1
- package/dist/chunk-B4Q6CPYO.js.map +1 -0
- package/dist/{chunk-4SYLFKIX.js → chunk-JIJHGB6H.js} +2 -2
- package/dist/chunk-ONYDIU4X.js +284 -0
- package/dist/chunk-ONYDIU4X.js.map +1 -0
- package/dist/{chunk-4WWSQAWA.js → chunk-QEVKKJ7N.js} +199 -75
- package/dist/chunk-QEVKKJ7N.js.map +1 -0
- package/dist/{chunk-AD3BCYWU.js → chunk-ZU6ADDET.js} +1 -1
- package/dist/chunk-ZU6ADDET.js.map +1 -0
- package/dist/{context-75mlon5x.d.ts → context-BfpLqV11.d.ts} +5 -3
- package/dist/{hook-DMb9fw9Z.d.ts → hook-CfBbhUQf.d.ts} +1 -1
- package/dist/index.d.ts +13 -11
- package/dist/index.js +9 -5
- package/dist/{model-provider-BrZ2RRmS.d.ts → model-provider-Ch7tzk1x.d.ts} +6 -8
- package/dist/runner/approval.d.ts +5 -5
- package/dist/runner/event.js +2 -2
- package/dist/runner/model-provider.d.ts +4 -4
- package/dist/runner/sandbox.d.ts +1 -1
- package/dist/runner/sandbox.js +1 -1
- package/dist/runner/storage.d.ts +2 -2
- package/dist/runner/storage.js +5 -1
- package/dist/{runner-Dxo7ALtp.d.ts → runner-B41JEovO.d.ts} +16 -9
- package/dist/runner.d.ts +6 -6
- package/dist/runner.js +5 -5
- package/dist/{storage-BmOEwW-p.d.ts → storage-DCZE_hES.d.ts} +84 -2
- package/package.json +2 -2
- package/dist/chunk-4A2P4QU5.js.map +0 -1
- package/dist/chunk-4WWSQAWA.js.map +0 -1
- package/dist/chunk-AD3BCYWU.js.map +0 -1
- package/dist/chunk-AZVA22HW.js +0 -135
- package/dist/chunk-AZVA22HW.js.map +0 -1
- /package/dist/{chunk-4SYLFKIX.js.map → chunk-JIJHGB6H.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/runtime/sandbox.ts"],"sourcesContent":["export interface HarnessSandboxOpenInput {\n sessionId: string;\n runId: string;\n agentKey: string;\n workDir: string;\n outputDir?: string;\n resources: Record<string, unknown>;\n}\n\nexport interface SandboxExecInput {\n command: string;\n cwd?: string;\n timeoutMs?: number;\n env?: Record<string, string>;\n stdin?: string;\n}\n\nexport interface SandboxExecResult {\n stdout: string;\n stderr: string;\n exitCode: number | null;\n signal?: string;\n durationMs: number;\n timedOut?: boolean;\n}\n\nexport abstract class HarnessSandbox {\n abstract readonly id: string;\n label?: string;\n\n abstract open(input: HarnessSandboxOpenInput): Promise<HarnessSandboxSession> | HarnessSandboxSession;\n}\n\nexport abstract class HarnessSandboxSession {\n abstract readonly id: string;\n abstract readonly workDir: string;\n\n abstract exec(input: SandboxExecInput): Promise<SandboxExecResult>;\n\n close?(): Promise<void>;\n}\n\nexport class NoopSandbox extends HarnessSandbox {\n readonly id = \"noop\";\n label = \"Noop\";\n\n open(input: HarnessSandboxOpenInput): HarnessSandboxSession {\n return new NoopSandboxSession(input.workDir);\n }\n}\n\nexport class NoopSandboxSession extends HarnessSandboxSession {\n readonly id = \"noop\";\n\n constructor(readonly workDir: string) {\n super();\n }\n\n async exec(input: SandboxExecInput): Promise<SandboxExecResult> {\n return {\n stdout: \"\",\n stderr: `No sandbox is configured; cannot execute: ${input.command}`,\n exitCode: 1,\n durationMs: 0,\n };\n }\n}\n"],"mappings":";AA0BO,IAAe,iBAAf,MAA8B;AAAA,EAEnC;AAGF;AAEO,IAAe,wBAAf,MAAqC;AAO5C;AAEO,IAAM,cAAN,cAA0B,eAAe;AAAA,EACrC,KAAK;AAAA,EACd,QAAQ;AAAA,EAER,KAAK,OAAuD;AAC1D,WAAO,IAAI,mBAAmB,MAAM,OAAO;AAAA,EAC7C;AACF;AAEO,IAAM,qBAAN,cAAiC,sBAAsB;AAAA,EAG5D,YAAqB,SAAiB;AACpC,UAAM;AADa;AAAA,EAErB;AAAA,EAFqB;AAAA,EAFZ,KAAK;AAAA,EAMd,MAAM,KAAK,OAAqD;AAC9D,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ,6CAA6C,MAAM,OAAO;AAAA,MAClE,UAAU;AAAA,MACV,YAAY;AAAA,IACd;AAAA,EACF;AACF;","names":[]}
|
|
@@ -271,13 +271,13 @@ interface AgentContextSession extends AgentContextReader {
|
|
|
271
271
|
remove(id: string): Promise<boolean>;
|
|
272
272
|
clear(filter?: ContextEntryFilter): Promise<number>;
|
|
273
273
|
}
|
|
274
|
-
interface AgentReadSession<TState extends AgentSharedState = AgentSharedState,
|
|
274
|
+
interface AgentReadSession<TState extends AgentSharedState = AgentSharedState, TResources extends Record<string, unknown> = Record<string, unknown>> {
|
|
275
275
|
runId: string;
|
|
276
276
|
turnId?: string;
|
|
277
277
|
agentKey: string;
|
|
278
278
|
workDir: string;
|
|
279
279
|
outputDir?: string;
|
|
280
|
-
|
|
280
|
+
resources: TResources;
|
|
281
281
|
state: AgentStateReader<TState>;
|
|
282
282
|
history: AgentHistorySession;
|
|
283
283
|
events: AgentEventReader;
|
|
@@ -285,7 +285,7 @@ interface AgentReadSession<TState extends AgentSharedState = AgentSharedState, T
|
|
|
285
285
|
context: AgentContextReader;
|
|
286
286
|
log: AgentLogSession;
|
|
287
287
|
}
|
|
288
|
-
interface AgentActionSession<TState extends AgentSharedState = AgentSharedState,
|
|
288
|
+
interface AgentActionSession<TState extends AgentSharedState = AgentSharedState, TResources extends Record<string, unknown> = Record<string, unknown>> extends AgentReadSession<TState, TResources> {
|
|
289
289
|
sandbox: HarnessSandboxSession;
|
|
290
290
|
state: AgentStateSession<TState>;
|
|
291
291
|
events: AgentEventSession;
|
|
@@ -374,6 +374,7 @@ declare abstract class HarnessTool<TInput = unknown, TData = unknown> {
|
|
|
374
374
|
risk?: ToolRisk;
|
|
375
375
|
permissions?: ToolPermission[];
|
|
376
376
|
requiresApproval?: boolean | ToolApprovalResolver;
|
|
377
|
+
approvalTimeoutMs?: number;
|
|
377
378
|
get type(): string;
|
|
378
379
|
get inputSchema(): unknown;
|
|
379
380
|
abstract execute(args: TInput, session: AgentActionSession): AgentToolResult<TData> | Promise<AgentToolResult<TData>>;
|
|
@@ -389,6 +390,7 @@ interface ToolApprovalRequest {
|
|
|
389
390
|
modeId: string;
|
|
390
391
|
risk?: ToolRisk;
|
|
391
392
|
permissions?: ToolPermission[];
|
|
393
|
+
approvalTimeoutMs?: number;
|
|
392
394
|
}
|
|
393
395
|
|
|
394
396
|
export { type HarnessToolSelector as $, type AgentActionSession as A, type ContextContributionInput as B, ContextConsume as C, type ContextEntry as D, type ContextEntryFilter as E, type ContextProviderBinding as F, type ContextProviderOutput as G, type ContextProviderReference as H, type ContextProviderRenderResult as I, type ContextProviderSummary as J, type ContextRegistrationOptions as K, ContextScopes as L, type ContextSnapshot as M, HarnessContextProvider as N, type HarnessContextProviderClass as O, type HarnessContextProviderSelector as P, HarnessMode as Q, type HarnessModeClass as R, type HarnessModeSelector as S, type HarnessModeSummary as T, type HarnessSnapshot as U, type HarnessSnapshotCreator as V, type HarnessSnapshotInput as W, type HarnessSnapshotSession as X, type HarnessSnapshotSummary as Y, HarnessTool as Z, type HarnessToolClass as _, type AgentContextProvider as a, type HarnessTranscriptSession as a0, type RunInfo as a1, type ToolApprovalDecision as a2, type ToolApprovalMode as a3, type ToolApprovalRequest as a4, type ToolApprovalResolver as a5, type ToolCatalogEntry as a6, type ToolPermission as a7, type ToolRef as a8, type ToolRisk as a9, type TranscriptBranch as aa, type TranscriptCursor as ab, type TranscriptQuery as ac, type TranscriptSeekTarget as ad, type TurnInfo as ae, type AgentContextReader as b, type AgentContextSession as c, type AgentEventReader as d, type AgentEventSession as e, type AgentHistorySession as f, type AgentLogSession as g, type AgentMessage as h, type AgentMessageEnqueueOptions as i, type AgentMessageInput as j, type AgentMessageRole as k, type AgentMessageSession as l, type AgentModeDefinition as m, type AgentModeReader as n, type AgentModeSession as o, type AgentReadSession as p, type AgentRuntimeLogger as q, type AgentSharedState as r, type AgentSharedStateDefinition as s, type AgentStateReader as t, type AgentStateSession as u, type AgentToolDefinition as v, type AgentToolResult as w, type AgentToolSession as x, type AgentToolSource as y, type ContextContribution as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { R as RunnerEventListener, J as JsonObject, d as HarnessEventQuery, e as HarnessEventRecord, b as HarnessEventEmitOptions } from './events-D4xcDi53.js';
|
|
2
2
|
export { E as EventCursor, H as HarnessEvent, a as HarnessEventClass, c as HarnessEventMetadata, f as HarnessEventSource } from './events-D4xcDi53.js';
|
|
3
|
-
import { a as HarnessAgentManifest } from './approval-
|
|
4
|
-
export { H as HarnessAgentInput, b as HarnessAppConfig, c as HarnessErrorShape, d as HarnessEventSummary, e as HarnessRunStream, f as HarnessSession, g as HarnessSessionEventListener, h as HarnessSessionListener, i as HarnessSessionPhase, j as HarnessSessionStatus, k as HarnessSessionStore, l as HarnessSessionStoreEvent, m as HarnessSessionStoreListener, n as HarnessStorageConfig, o as HarnessStreamEvent, p as HarnessUserInput, S as SendOptions, q as SendResult, r as StreamOptions, T as ToolApprovalHandle, W as WaitForEventOptions } from './approval-
|
|
5
|
-
import { ac as TranscriptQuery, h as AgentMessage, ab as TranscriptCursor, ad as TranscriptSeekTarget, r as AgentSharedState, W as HarnessSnapshotInput, U as HarnessSnapshot, Y as HarnessSnapshotSummary, M as ContextSnapshot, E as ContextEntryFilter, D as ContextEntry, S as HarnessModeSelector } from './context-
|
|
6
|
-
export { A as AgentActionSession, a as AgentContextProvider, b as AgentContextReader, c as AgentContextSession, d as AgentEventReader, e as AgentEventSession, f as AgentHistorySession, g as AgentLogSession, i as AgentMessageEnqueueOptions, j as AgentMessageInput, k as AgentMessageRole, l as AgentMessageSession, m as AgentModeDefinition, n as AgentModeReader, o as AgentModeSession, p as AgentReadSession, q as AgentRuntimeLogger, s as AgentSharedStateDefinition, t as AgentStateReader, u as AgentStateSession, v as AgentToolDefinition, w as AgentToolResult, x as AgentToolSession, y as AgentToolSource, C as ContextConsume, z as ContextContribution, B as ContextContributionInput, F as ContextProviderBinding, G as ContextProviderOutput, H as ContextProviderReference, I as ContextProviderRenderResult, J as ContextProviderSummary, K as ContextRegistrationOptions, L as ContextScopes, N as HarnessContextProvider, O as HarnessContextProviderClass, P as HarnessContextProviderSelector, Q as HarnessMode, R as HarnessModeClass, T as HarnessModeSummary, V as HarnessSnapshotCreator, X as HarnessSnapshotSession, Z as HarnessTool, _ as HarnessToolClass, $ as HarnessToolSelector, a0 as HarnessTranscriptSession, a1 as RunInfo, a2 as ToolApprovalDecision, a3 as ToolApprovalMode, a4 as ToolApprovalRequest, a5 as ToolApprovalResolver, a6 as ToolCatalogEntry, a7 as ToolPermission, a8 as ToolRef, a9 as ToolRisk, aa as TranscriptBranch, ae as TurnInfo } from './context-
|
|
3
|
+
import { a as HarnessAgentManifest } from './approval-D_G2w-fW.js';
|
|
4
|
+
export { H as HarnessAgentInput, b as HarnessAppConfig, c as HarnessErrorShape, d as HarnessEventSummary, e as HarnessRunStream, f as HarnessSession, g as HarnessSessionEventListener, h as HarnessSessionListener, i as HarnessSessionPhase, j as HarnessSessionStatus, k as HarnessSessionStore, l as HarnessSessionStoreEvent, m as HarnessSessionStoreListener, n as HarnessStorageConfig, o as HarnessStreamEvent, p as HarnessUserInput, S as SendOptions, q as SendResult, r as StreamOptions, T as ToolApprovalHandle, W as WaitForEventOptions } from './approval-D_G2w-fW.js';
|
|
5
|
+
import { ac as TranscriptQuery, h as AgentMessage, ab as TranscriptCursor, ad as TranscriptSeekTarget, r as AgentSharedState, W as HarnessSnapshotInput, U as HarnessSnapshot, Y as HarnessSnapshotSummary, M as ContextSnapshot, E as ContextEntryFilter, D as ContextEntry, S as HarnessModeSelector } from './context-BfpLqV11.js';
|
|
6
|
+
export { A as AgentActionSession, a as AgentContextProvider, b as AgentContextReader, c as AgentContextSession, d as AgentEventReader, e as AgentEventSession, f as AgentHistorySession, g as AgentLogSession, i as AgentMessageEnqueueOptions, j as AgentMessageInput, k as AgentMessageRole, l as AgentMessageSession, m as AgentModeDefinition, n as AgentModeReader, o as AgentModeSession, p as AgentReadSession, q as AgentRuntimeLogger, s as AgentSharedStateDefinition, t as AgentStateReader, u as AgentStateSession, v as AgentToolDefinition, w as AgentToolResult, x as AgentToolSession, y as AgentToolSource, C as ContextConsume, z as ContextContribution, B as ContextContributionInput, F as ContextProviderBinding, G as ContextProviderOutput, H as ContextProviderReference, I as ContextProviderRenderResult, J as ContextProviderSummary, K as ContextRegistrationOptions, L as ContextScopes, N as HarnessContextProvider, O as HarnessContextProviderClass, P as HarnessContextProviderSelector, Q as HarnessMode, R as HarnessModeClass, T as HarnessModeSummary, V as HarnessSnapshotCreator, X as HarnessSnapshotSession, Z as HarnessTool, _ as HarnessToolClass, $ as HarnessToolSelector, a0 as HarnessTranscriptSession, a1 as RunInfo, a2 as ToolApprovalDecision, a3 as ToolApprovalMode, a4 as ToolApprovalRequest, a5 as ToolApprovalResolver, a6 as ToolCatalogEntry, a7 as ToolPermission, a8 as ToolRef, a9 as ToolRisk, aa as TranscriptBranch, ae as TurnInfo } from './context-BfpLqV11.js';
|
|
7
7
|
export { A as AssistantRole, H as HarnessRole, a as HarnessRoleClass, b as HarnessRoleDefinition, c as HarnessRoleSelector, d as HarnessRoleSummary, N as NativeRoles, R as RoleTargets, S as SystemRole, T as ToolRole, U as UserRole, e as assistantRole, s as systemRole, t as toolRole, u as userRole } from './role-BN6KhQxx.js';
|
|
8
|
-
export { H as HarnessHook, a as HarnessHookEventClass, b as HarnessHookSummary } from './hook-
|
|
9
|
-
import {
|
|
10
|
-
export { H as HarnessRunStorage,
|
|
11
|
-
import { N as NormalizedAgentDefinition, c as AgentSessionRunnerOptions, b as AgentRunnerRunOptions, a as AgentRunResult, e as ModelProviderInfo } from './model-provider-
|
|
12
|
-
export { A as AgentDefinition, H as HarnessModelProvider, d as HarnessModelProviderRegistry, M as ModelInfo, f as ModelProviderPreparedContext, g as ModelProviderRunInput, h as ModelProviderRunResult, R as ResolvedModelProvider, m as modelProviderId, p as parseModelRef } from './model-provider-
|
|
8
|
+
export { H as HarnessHook, a as HarnessHookEventClass, b as HarnessHookSummary } from './hook-CfBbhUQf.js';
|
|
9
|
+
import { h as RunMetrics } from './storage-DCZE_hES.js';
|
|
10
|
+
export { C as CreateStoredRunInput, a as CreateStoredSessionInput, H as HarnessRunStorage, b as HarnessRunStore, c as HarnessSessionStorage, d as HarnessSessionSummary, M as MemoryRunStorage, e as MemoryRunStore, f as MemorySessionStorage, N as NoopRunStorage, g as NoopRunStore, O as OpenRunStoreInput, R as RunCursorState, S as SessionListQuery, i as SessionListResult, j as StoredRunSummary, T as ToolCallMetric, k as TouchStoredSessionInput } from './storage-DCZE_hES.js';
|
|
11
|
+
import { N as NormalizedAgentDefinition, c as AgentSessionRunnerOptions, b as AgentRunnerRunOptions, a as AgentRunResult, e as ModelProviderInfo } from './model-provider-Ch7tzk1x.js';
|
|
12
|
+
export { A as AgentDefinition, H as HarnessModelProvider, d as HarnessModelProviderRegistry, M as ModelInfo, f as ModelProviderPreparedContext, g as ModelProviderRunInput, h as ModelProviderRunResult, R as ResolvedModelProvider, m as modelProviderId, p as parseModelRef } from './model-provider-Ch7tzk1x.js';
|
|
13
13
|
export { C as ContextReadyEvent, E as ErrorEvent, M as MessageDeltaEvent, a as MessageEndEvent, b as MessageStartEvent, c as ModeChangedEvent, d as ModelAfterEvent, e as ModelBeforeEvent, R as RunEndEvent, f as RunStartEvent, S as SnapshotCreatedEvent, g as SnapshotDeletedEvent, h as SnapshotRestoredEvent, T as ToolApprovalRequestedEvent, i as ToolApprovalResolvedEvent, j as ToolEndEvent, k as ToolStartEvent, l as TranscriptCursorChangedEvent, m as TurnEndEvent, n as TurnStartEvent, r as runtimeEventClasses } from './event-CKV4EeZ3.js';
|
|
14
14
|
export { defineAgent } from './agent.js';
|
|
15
15
|
export { HarnessSandbox, HarnessSandboxOpenInput, HarnessSandboxSession, NoopSandbox, NoopSandboxSession, SandboxExecInput, SandboxExecResult } from './runner/sandbox.js';
|
|
16
|
-
export { C as CreateHarnessSessionInternalOptions, H as HarnessSessionImpl, a as HarnessSessionStoreImpl, c as createHarnessSession, b as createHarnessSessionStore } from './runner-
|
|
16
|
+
export { C as CreateHarnessSessionInternalOptions, H as HarnessSessionImpl, a as HarnessSessionStoreImpl, c as createHarnessSession, b as createHarnessSessionStore } from './runner-B41JEovO.js';
|
|
17
17
|
export { ArraySchema, BooleanSchema, DefaultSchema, EnumSchema, InferInput, InferOutput, JsonSchema, LiteralSchema, NormalizedSchema, NumberSchema, ObjectSchema, OptionalSchema, RecordSchema, SafeParseResult, Schema, SchemaError, SchemaIssue, SchemaIssueCode, SchemaSource, StringSchema, UnknownSchema, formatSchemaPath, normalizeSchema, s, schemaIssuesFromError } from './schema.js';
|
|
18
18
|
export { T as ToolErrorCode, a as ToolErrorPayload, b as ToolInvalidField, c as createToolErrorPayload } from './tool-errors-CygY1Nba.js';
|
|
19
19
|
import './types-BPmsw-mF.js';
|
|
@@ -33,7 +33,7 @@ declare class AgentSessionRunner {
|
|
|
33
33
|
private readonly snapshotManager;
|
|
34
34
|
private readonly toolExecutor;
|
|
35
35
|
private readonly modelPipeline;
|
|
36
|
-
private readonly
|
|
36
|
+
private readonly resources;
|
|
37
37
|
private readonly roles;
|
|
38
38
|
private readonly roleResolver;
|
|
39
39
|
private readonly providerRegistry;
|
|
@@ -51,6 +51,7 @@ declare class AgentSessionRunner {
|
|
|
51
51
|
private providerStack;
|
|
52
52
|
private hookDepth;
|
|
53
53
|
private turnHandoffRequested;
|
|
54
|
+
private restoredFromRun;
|
|
54
55
|
constructor(options: AgentSessionRunnerOptions);
|
|
55
56
|
private logSource;
|
|
56
57
|
private logContext;
|
|
@@ -70,6 +71,7 @@ declare class AgentSessionRunner {
|
|
|
70
71
|
private beginNewRun;
|
|
71
72
|
run(message: string, options?: AgentRunnerRunOptions): Promise<AgentRunResult>;
|
|
72
73
|
prompt(message: string, options?: AgentRunnerRunOptions): Promise<AgentRunResult>;
|
|
74
|
+
hydrate(): Promise<void>;
|
|
73
75
|
close(): Promise<void>;
|
|
74
76
|
getTranscript(options?: TranscriptQuery): AgentMessage[];
|
|
75
77
|
getMetrics(): RunMetrics;
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
createHarnessSession,
|
|
7
7
|
createHarnessSessionStore,
|
|
8
8
|
createToolErrorPayload
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QEVKKJ7N.js";
|
|
10
10
|
import {
|
|
11
11
|
HarnessModelProviderRegistry,
|
|
12
12
|
modelProviderId,
|
|
@@ -18,15 +18,17 @@ import {
|
|
|
18
18
|
HarnessSandboxSession,
|
|
19
19
|
NoopSandbox,
|
|
20
20
|
NoopSandboxSession
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZU6ADDET.js";
|
|
22
22
|
import {
|
|
23
23
|
HarnessRunStorage,
|
|
24
24
|
HarnessRunStore,
|
|
25
|
+
HarnessSessionStorage,
|
|
25
26
|
MemoryRunStorage,
|
|
26
27
|
MemoryRunStore,
|
|
28
|
+
MemorySessionStorage,
|
|
27
29
|
NoopRunStorage,
|
|
28
30
|
NoopRunStore
|
|
29
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ONYDIU4X.js";
|
|
30
32
|
import {
|
|
31
33
|
defineAgent
|
|
32
34
|
} from "./chunk-RRWJUHJG.js";
|
|
@@ -52,7 +54,7 @@ import {
|
|
|
52
54
|
TurnEndEvent,
|
|
53
55
|
TurnStartEvent,
|
|
54
56
|
runtimeEventClasses
|
|
55
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-JIJHGB6H.js";
|
|
56
58
|
import {
|
|
57
59
|
ArraySchema,
|
|
58
60
|
BooleanSchema,
|
|
@@ -91,7 +93,7 @@ import {
|
|
|
91
93
|
systemRole,
|
|
92
94
|
toolRole,
|
|
93
95
|
userRole
|
|
94
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-B4Q6CPYO.js";
|
|
95
97
|
export {
|
|
96
98
|
AgentSessionRunner,
|
|
97
99
|
ArraySchema,
|
|
@@ -115,11 +117,13 @@ export {
|
|
|
115
117
|
HarnessSandboxSession,
|
|
116
118
|
HarnessSessionImpl,
|
|
117
119
|
HarnessSessionPhase,
|
|
120
|
+
HarnessSessionStorage,
|
|
118
121
|
HarnessSessionStoreImpl,
|
|
119
122
|
HarnessTool,
|
|
120
123
|
LiteralSchema,
|
|
121
124
|
MemoryRunStorage,
|
|
122
125
|
MemoryRunStore,
|
|
126
|
+
MemorySessionStorage,
|
|
123
127
|
MessageDeltaEvent,
|
|
124
128
|
MessageEndEvent,
|
|
125
129
|
MessageStartEvent,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { H as HarnessEvent, a as HarnessEventClass, b as HarnessEventEmitOptions, e as HarnessEventRecord, J as JsonObject } from './events-D4xcDi53.js';
|
|
2
|
-
import { h as AgentMessage, v as AgentToolDefinition, w as AgentToolResult, M as ContextSnapshot, S as HarnessModeSelector, Q as HarnessMode, s as AgentSharedStateDefinition,
|
|
2
|
+
import { h as AgentMessage, v as AgentToolDefinition, w as AgentToolResult, M as ContextSnapshot, S as HarnessModeSelector, Q as HarnessMode, s as AgentSharedStateDefinition, a4 as ToolApprovalRequest, a2 as ToolApprovalDecision, q as AgentRuntimeLogger } from './context-BfpLqV11.js';
|
|
3
3
|
import { b as HarnessRoleDefinition, c as HarnessRoleSelector } from './role-BN6KhQxx.js';
|
|
4
4
|
import { HarnessSandbox } from './runner/sandbox.js';
|
|
5
|
-
import {
|
|
6
|
-
import { H as HarnessHook } from './hook-
|
|
5
|
+
import { h as RunMetrics, c as HarnessSessionStorage, H as HarnessRunStorage } from './storage-DCZE_hES.js';
|
|
6
|
+
import { H as HarnessHook } from './hook-CfBbhUQf.js';
|
|
7
7
|
|
|
8
8
|
interface ModelProviderRunInput {
|
|
9
9
|
runId: string;
|
|
@@ -109,11 +109,9 @@ interface AgentSessionRunnerOptions {
|
|
|
109
109
|
roles?: HarnessRoleDefinition[];
|
|
110
110
|
workDir?: string;
|
|
111
111
|
outputDir?: string;
|
|
112
|
-
storage?: HarnessRunStorage;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
maxTurns?: number;
|
|
116
|
-
services?: JsonObject;
|
|
112
|
+
storage?: HarnessSessionStorage | HarnessRunStorage;
|
|
113
|
+
initialRunId?: string;
|
|
114
|
+
resources?: JsonObject;
|
|
117
115
|
approveTool?(request: ToolApprovalRequest): boolean | ToolApprovalDecision | Promise<boolean | ToolApprovalDecision>;
|
|
118
116
|
logger?: AgentRuntimeLogger;
|
|
119
117
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { T as ToolApprovalHandle } from '../approval-
|
|
2
|
-
export { a2 as ToolApprovalDecision, a3 as ToolApprovalMode, a4 as ToolApprovalRequest } from '../context-
|
|
3
|
-
import '../model-provider-
|
|
1
|
+
export { T as ToolApprovalHandle } from '../approval-D_G2w-fW.js';
|
|
2
|
+
export { a2 as ToolApprovalDecision, a3 as ToolApprovalMode, a4 as ToolApprovalRequest } from '../context-BfpLqV11.js';
|
|
3
|
+
import '../model-provider-Ch7tzk1x.js';
|
|
4
4
|
import '../events-D4xcDi53.js';
|
|
5
5
|
import '../role-BN6KhQxx.js';
|
|
6
6
|
import './sandbox.js';
|
|
7
|
-
import '../storage-
|
|
8
|
-
import '../hook-
|
|
7
|
+
import '../storage-DCZE_hES.js';
|
|
8
|
+
import '../hook-CfBbhUQf.js';
|
|
9
9
|
import '../types-BPmsw-mF.js';
|
package/dist/runner/event.js
CHANGED
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
TranscriptCursorChangedEvent,
|
|
20
20
|
TurnEndEvent,
|
|
21
21
|
TurnStartEvent
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-JIJHGB6H.js";
|
|
23
23
|
import "../chunk-OBKS4AJR.js";
|
|
24
24
|
import {
|
|
25
25
|
HarnessEvent
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-B4Q6CPYO.js";
|
|
27
27
|
export {
|
|
28
28
|
ContextReadyEvent,
|
|
29
29
|
ErrorEvent,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { H as HarnessModelProvider, d as HarnessModelProviderRegistry, M as ModelInfo, e as ModelProviderInfo, f as ModelProviderPreparedContext, g as ModelProviderRunInput, h as ModelProviderRunResult, R as ResolvedModelProvider, m as modelProviderId, p as parseModelRef } from '../model-provider-
|
|
1
|
+
export { H as HarnessModelProvider, d as HarnessModelProviderRegistry, M as ModelInfo, e as ModelProviderInfo, f as ModelProviderPreparedContext, g as ModelProviderRunInput, h as ModelProviderRunResult, R as ResolvedModelProvider, m as modelProviderId, p as parseModelRef } from '../model-provider-Ch7tzk1x.js';
|
|
2
2
|
import '../events-D4xcDi53.js';
|
|
3
|
-
import '../context-
|
|
3
|
+
import '../context-BfpLqV11.js';
|
|
4
4
|
import '../role-BN6KhQxx.js';
|
|
5
5
|
import '../types-BPmsw-mF.js';
|
|
6
6
|
import './sandbox.js';
|
|
7
|
-
import '../storage-
|
|
8
|
-
import '../hook-
|
|
7
|
+
import '../storage-DCZE_hES.js';
|
|
8
|
+
import '../hook-CfBbhUQf.js';
|
package/dist/runner/sandbox.d.ts
CHANGED
package/dist/runner/sandbox.js
CHANGED
package/dist/runner/storage.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { H as HarnessRunStorage,
|
|
1
|
+
export { C as CreateStoredRunInput, a as CreateStoredSessionInput, H as HarnessRunStorage, b as HarnessRunStore, c as HarnessSessionStorage, d as HarnessSessionSummary, M as MemoryRunStorage, e as MemoryRunStore, f as MemorySessionStorage, N as NoopRunStorage, g as NoopRunStore, O as OpenRunStoreInput, R as RunCursorState, S as SessionListQuery, i as SessionListResult, j as StoredRunSummary, k as TouchStoredSessionInput } from '../storage-DCZE_hES.js';
|
|
2
2
|
import '../events-D4xcDi53.js';
|
|
3
|
-
import '../context-
|
|
3
|
+
import '../context-BfpLqV11.js';
|
|
4
4
|
import '../role-BN6KhQxx.js';
|
|
5
5
|
import '../types-BPmsw-mF.js';
|
|
6
6
|
import './sandbox.js';
|
package/dist/runner/storage.js
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HarnessRunStorage,
|
|
3
3
|
HarnessRunStore,
|
|
4
|
+
HarnessSessionStorage,
|
|
4
5
|
MemoryRunStorage,
|
|
5
6
|
MemoryRunStore,
|
|
7
|
+
MemorySessionStorage,
|
|
6
8
|
NoopRunStorage,
|
|
7
9
|
NoopRunStore
|
|
8
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-ONYDIU4X.js";
|
|
9
11
|
export {
|
|
10
12
|
HarnessRunStorage,
|
|
11
13
|
HarnessRunStore,
|
|
14
|
+
HarnessSessionStorage,
|
|
12
15
|
MemoryRunStorage,
|
|
13
16
|
MemoryRunStore,
|
|
17
|
+
MemorySessionStorage,
|
|
14
18
|
NoopRunStorage,
|
|
15
19
|
NoopRunStore
|
|
16
20
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { d as HarnessEventQuery, e as HarnessEventRecord, H as HarnessEvent, a as HarnessEventClass } from './events-D4xcDi53.js';
|
|
2
|
-
import { a0 as HarnessTranscriptSession, X as HarnessSnapshotSession, S as HarnessModeSelector, r as AgentSharedState, M as ContextSnapshot } from './context-
|
|
3
|
-
import { f as HarnessSession, b as HarnessAppConfig, p as HarnessUserInput, S as SendOptions, q as SendResult, r as StreamOptions, e as HarnessRunStream, j as HarnessSessionStatus, a as HarnessAgentManifest, T as ToolApprovalHandle, h as HarnessSessionListener, g as HarnessSessionEventListener, W as WaitForEventOptions, k as HarnessSessionStore, m as HarnessSessionStoreListener } from './approval-
|
|
4
|
-
import { A as AgentDefinition } from './model-provider-
|
|
2
|
+
import { a0 as HarnessTranscriptSession, X as HarnessSnapshotSession, S as HarnessModeSelector, r as AgentSharedState, M as ContextSnapshot } from './context-BfpLqV11.js';
|
|
3
|
+
import { f as HarnessSession, b as HarnessAppConfig, p as HarnessUserInput, S as SendOptions, q as SendResult, r as StreamOptions, e as HarnessRunStream, j as HarnessSessionStatus, a as HarnessAgentManifest, T as ToolApprovalHandle, h as HarnessSessionListener, g as HarnessSessionEventListener, W as WaitForEventOptions, k as HarnessSessionStore, m as HarnessSessionStoreListener } from './approval-D_G2w-fW.js';
|
|
4
|
+
import { A as AgentDefinition } from './model-provider-Ch7tzk1x.js';
|
|
5
|
+
import { d as HarnessSessionSummary, S as SessionListQuery, i as SessionListResult } from './storage-DCZE_hES.js';
|
|
5
6
|
|
|
6
7
|
interface CreateHarnessSessionInternalOptions {
|
|
7
8
|
sessionId?: string;
|
|
9
|
+
restoredSession?: HarnessSessionSummary;
|
|
8
10
|
}
|
|
9
11
|
declare class HarnessSessionImpl implements HarnessSession {
|
|
10
12
|
private readonly config;
|
|
@@ -16,7 +18,7 @@ declare class HarnessSessionImpl implements HarnessSession {
|
|
|
16
18
|
private readonly approvals;
|
|
17
19
|
private readonly queue;
|
|
18
20
|
private readonly status;
|
|
19
|
-
private
|
|
21
|
+
private createdAt;
|
|
20
22
|
private readonly logger;
|
|
21
23
|
private lastActiveAt;
|
|
22
24
|
private closed;
|
|
@@ -26,7 +28,7 @@ declare class HarnessSessionImpl implements HarnessSession {
|
|
|
26
28
|
constructor(config: HarnessAppConfig, input: {
|
|
27
29
|
sessionId?: string;
|
|
28
30
|
agent: AgentDefinition;
|
|
29
|
-
|
|
31
|
+
restoredSession?: HarnessSessionSummary;
|
|
30
32
|
});
|
|
31
33
|
send(input: string | HarnessUserInput, options?: SendOptions): Promise<SendResult>;
|
|
32
34
|
stream(input: string | HarnessUserInput, options?: StreamOptions): HarnessRunStream;
|
|
@@ -49,6 +51,7 @@ declare class HarnessSessionImpl implements HarnessSession {
|
|
|
49
51
|
onEvent<TPayload, TEvent extends HarnessEvent<TPayload>>(eventClass: HarnessEventClass<TPayload, TEvent>, listener: HarnessSessionEventListener<TEvent>): () => void;
|
|
50
52
|
waitForEvent<TPayload, TEvent extends HarnessEvent<TPayload>>(eventClass: HarnessEventClass<TPayload, TEvent>, options?: WaitForEventOptions): Promise<TEvent>;
|
|
51
53
|
close(): Promise<void>;
|
|
54
|
+
hydrate(): Promise<void>;
|
|
52
55
|
private notify;
|
|
53
56
|
private notifyStatus;
|
|
54
57
|
private assertSnapshotRestoreAllowed;
|
|
@@ -63,14 +66,20 @@ declare class HarnessSessionStoreImpl implements HarnessSessionStore {
|
|
|
63
66
|
private readonly config;
|
|
64
67
|
private readonly sessions;
|
|
65
68
|
private readonly unsubscriptions;
|
|
69
|
+
private readonly latestRunIds;
|
|
66
70
|
private readonly listeners;
|
|
71
|
+
private readonly storage;
|
|
67
72
|
private closed;
|
|
68
73
|
constructor(config: HarnessAppConfig);
|
|
74
|
+
init(): Promise<void>;
|
|
69
75
|
getOrCreate(sessionId?: string, overrides?: Partial<HarnessAppConfig>): Promise<HarnessSession>;
|
|
70
76
|
get(sessionId: string): HarnessSession | undefined;
|
|
71
|
-
list():
|
|
77
|
+
list(query?: SessionListQuery): Promise<SessionListResult>;
|
|
78
|
+
close(sessionId: string): Promise<boolean>;
|
|
79
|
+
close(): Promise<void>;
|
|
72
80
|
delete(sessionId: string): Promise<boolean>;
|
|
73
|
-
|
|
81
|
+
clearActive(): Promise<void>;
|
|
82
|
+
closeAll(): Promise<void>;
|
|
74
83
|
send(sessionId: string | undefined, input: string | HarnessUserInput, options?: SendOptions): Promise<SendResult>;
|
|
75
84
|
stream(sessionId: string | undefined, input: string | HarnessUserInput, options?: StreamOptions): Promise<HarnessRunStream>;
|
|
76
85
|
getPendingApprovals(sessionId?: string): ToolApprovalHandle[];
|
|
@@ -78,9 +87,7 @@ declare class HarnessSessionStoreImpl implements HarnessSessionStore {
|
|
|
78
87
|
denyTool(sessionId: string, approvalId: string, reason?: string): Promise<void>;
|
|
79
88
|
getAgentManifest(sessionId: string): HarnessAgentManifest | undefined;
|
|
80
89
|
on(listener: HarnessSessionStoreListener): () => void;
|
|
81
|
-
close(): Promise<void>;
|
|
82
90
|
private notify;
|
|
83
|
-
private cleanupExpired;
|
|
84
91
|
}
|
|
85
92
|
declare function createHarnessSessionStore(config: HarnessAppConfig): Promise<HarnessSessionStore>;
|
|
86
93
|
|
package/dist/runner.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { c as createHarnessSession, b as createHarnessSessionStore } from './runner-
|
|
2
|
-
export { a as HarnessAgentManifest, b as HarnessAppConfig, e as HarnessRunStream, f as HarnessSession, g as HarnessSessionEventListener, h as HarnessSessionListener, i as HarnessSessionPhase, j as HarnessSessionStatus, k as HarnessSessionStore, l as HarnessSessionStoreEvent, m as HarnessSessionStoreListener, o as HarnessStreamEvent, p as HarnessUserInput, S as SendOptions, q as SendResult, r as StreamOptions, W as WaitForEventOptions } from './approval-
|
|
1
|
+
export { c as createHarnessSession, b as createHarnessSessionStore } from './runner-B41JEovO.js';
|
|
2
|
+
export { a as HarnessAgentManifest, b as HarnessAppConfig, e as HarnessRunStream, f as HarnessSession, g as HarnessSessionEventListener, h as HarnessSessionListener, i as HarnessSessionPhase, j as HarnessSessionStatus, k as HarnessSessionStore, l as HarnessSessionStoreEvent, m as HarnessSessionStoreListener, o as HarnessStreamEvent, p as HarnessUserInput, S as SendOptions, q as SendResult, r as StreamOptions, W as WaitForEventOptions } from './approval-D_G2w-fW.js';
|
|
3
3
|
export { E as EventCursor } from './events-D4xcDi53.js';
|
|
4
|
-
export { U as HarnessSnapshot, V as HarnessSnapshotCreator, W as HarnessSnapshotInput, X as HarnessSnapshotSession, Y as HarnessSnapshotSummary, a0 as HarnessTranscriptSession, aa as TranscriptBranch, ab as TranscriptCursor, ac as TranscriptQuery, ad as TranscriptSeekTarget } from './context-
|
|
5
|
-
|
|
4
|
+
export { U as HarnessSnapshot, V as HarnessSnapshotCreator, W as HarnessSnapshotInput, X as HarnessSnapshotSession, Y as HarnessSnapshotSummary, a0 as HarnessTranscriptSession, aa as TranscriptBranch, ab as TranscriptCursor, ac as TranscriptQuery, ad as TranscriptSeekTarget } from './context-BfpLqV11.js';
|
|
5
|
+
export { d as HarnessSessionSummary, S as SessionListQuery, i as SessionListResult } from './storage-DCZE_hES.js';
|
|
6
|
+
import './model-provider-Ch7tzk1x.js';
|
|
6
7
|
import './role-BN6KhQxx.js';
|
|
7
8
|
import './runner/sandbox.js';
|
|
8
|
-
import './
|
|
9
|
-
import './hook-DMb9fw9Z.js';
|
|
9
|
+
import './hook-CfBbhUQf.js';
|
|
10
10
|
import './types-BPmsw-mF.js';
|
package/dist/runner.js
CHANGED
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
HarnessSessionPhase,
|
|
3
3
|
createHarnessSession,
|
|
4
4
|
createHarnessSessionStore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QEVKKJ7N.js";
|
|
6
6
|
import "./chunk-Q73WH5D7.js";
|
|
7
7
|
import "./chunk-Q44U2CMM.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-ZU6ADDET.js";
|
|
9
|
+
import "./chunk-ONYDIU4X.js";
|
|
10
|
+
import "./chunk-JIJHGB6H.js";
|
|
11
11
|
import "./chunk-OBKS4AJR.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-B4Q6CPYO.js";
|
|
13
13
|
export {
|
|
14
14
|
HarnessSessionPhase,
|
|
15
15
|
createHarnessSession,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { e as HarnessEventRecord, E as EventCursor } from './events-D4xcDi53.js';
|
|
2
|
-
import { h as AgentMessage, U as HarnessSnapshot, ab as TranscriptCursor, aa as TranscriptBranch, M as ContextSnapshot } from './context-
|
|
2
|
+
import { h as AgentMessage, U as HarnessSnapshot, ab as TranscriptCursor, aa as TranscriptBranch, M as ContextSnapshot } from './context-BfpLqV11.js';
|
|
3
3
|
|
|
4
4
|
interface ToolCallMetric {
|
|
5
5
|
name: string;
|
|
@@ -32,11 +32,78 @@ interface OpenRunStoreInput {
|
|
|
32
32
|
agentKey: string;
|
|
33
33
|
outputDir?: string;
|
|
34
34
|
}
|
|
35
|
+
interface HarnessSessionSummary {
|
|
36
|
+
sessionId: string;
|
|
37
|
+
agentKey: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
lastActiveAt: string;
|
|
40
|
+
mode: string;
|
|
41
|
+
latestRunId?: string;
|
|
42
|
+
metadata?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
interface SessionListQuery {
|
|
45
|
+
agentKey?: string;
|
|
46
|
+
active?: boolean;
|
|
47
|
+
limit?: number;
|
|
48
|
+
cursor?: string;
|
|
49
|
+
}
|
|
50
|
+
interface SessionListResult {
|
|
51
|
+
items: HarnessSessionSummary[];
|
|
52
|
+
nextCursor?: string;
|
|
53
|
+
}
|
|
54
|
+
interface StoredRunSummary {
|
|
55
|
+
runId: string;
|
|
56
|
+
sessionId: string;
|
|
57
|
+
agentKey: string;
|
|
58
|
+
createdAt: string;
|
|
59
|
+
mode: string;
|
|
60
|
+
outputDir?: string;
|
|
61
|
+
metadata?: Record<string, unknown>;
|
|
62
|
+
}
|
|
63
|
+
interface CreateStoredSessionInput {
|
|
64
|
+
sessionId: string;
|
|
65
|
+
agentKey: string;
|
|
66
|
+
createdAt?: string;
|
|
67
|
+
lastActiveAt?: string;
|
|
68
|
+
mode: string;
|
|
69
|
+
latestRunId?: string;
|
|
70
|
+
metadata?: Record<string, unknown>;
|
|
71
|
+
}
|
|
72
|
+
interface TouchStoredSessionInput {
|
|
73
|
+
sessionId: string;
|
|
74
|
+
lastActiveAt?: string;
|
|
75
|
+
mode?: string;
|
|
76
|
+
latestRunId?: string;
|
|
77
|
+
metadata?: Record<string, unknown>;
|
|
78
|
+
}
|
|
79
|
+
interface CreateStoredRunInput {
|
|
80
|
+
runId: string;
|
|
81
|
+
sessionId: string;
|
|
82
|
+
agentKey: string;
|
|
83
|
+
createdAt?: string;
|
|
84
|
+
mode: string;
|
|
85
|
+
outputDir?: string;
|
|
86
|
+
metadata?: Record<string, unknown>;
|
|
87
|
+
}
|
|
35
88
|
declare abstract class HarnessRunStorage {
|
|
36
89
|
abstract readonly id: string;
|
|
37
90
|
label?: string;
|
|
38
91
|
abstract openRun(input: OpenRunStoreInput): Promise<HarnessRunStore> | HarnessRunStore;
|
|
39
92
|
}
|
|
93
|
+
declare abstract class HarnessSessionStorage {
|
|
94
|
+
abstract readonly id: string;
|
|
95
|
+
label?: string;
|
|
96
|
+
init?(): Promise<void> | void;
|
|
97
|
+
abstract createSession(input: CreateStoredSessionInput): Promise<HarnessSessionSummary> | HarnessSessionSummary;
|
|
98
|
+
abstract getSession(sessionId: string): Promise<HarnessSessionSummary | undefined> | HarnessSessionSummary | undefined;
|
|
99
|
+
abstract listSessions(query?: SessionListQuery): Promise<SessionListResult> | SessionListResult;
|
|
100
|
+
abstract touchSession(input: TouchStoredSessionInput): Promise<void> | void;
|
|
101
|
+
abstract deleteSession(sessionId: string): Promise<boolean> | boolean;
|
|
102
|
+
abstract createRun(input: CreateStoredRunInput): Promise<StoredRunSummary> | StoredRunSummary;
|
|
103
|
+
abstract getLatestRun(sessionId: string): Promise<StoredRunSummary | undefined> | StoredRunSummary | undefined;
|
|
104
|
+
abstract listRuns(sessionId: string): Promise<StoredRunSummary[]> | StoredRunSummary[];
|
|
105
|
+
abstract openRun(input: OpenRunStoreInput): Promise<HarnessRunStore> | HarnessRunStore;
|
|
106
|
+
}
|
|
40
107
|
declare abstract class HarnessRunStore {
|
|
41
108
|
abstract readonly runId: string;
|
|
42
109
|
readonly outputDir?: string;
|
|
@@ -94,6 +161,21 @@ declare class MemoryRunStorage extends HarnessRunStorage {
|
|
|
94
161
|
private readonly runs;
|
|
95
162
|
openRun(input: OpenRunStoreInput): HarnessRunStore;
|
|
96
163
|
}
|
|
164
|
+
declare class MemorySessionStorage extends HarnessSessionStorage {
|
|
165
|
+
readonly id = "memory-session";
|
|
166
|
+
label: string;
|
|
167
|
+
private readonly sessions;
|
|
168
|
+
private readonly runStates;
|
|
169
|
+
createSession(input: CreateStoredSessionInput): HarnessSessionSummary;
|
|
170
|
+
getSession(sessionId: string): HarnessSessionSummary | undefined;
|
|
171
|
+
listSessions(query?: SessionListQuery): SessionListResult;
|
|
172
|
+
touchSession(input: TouchStoredSessionInput): void;
|
|
173
|
+
deleteSession(sessionId: string): boolean;
|
|
174
|
+
createRun(input: CreateStoredRunInput): StoredRunSummary;
|
|
175
|
+
getLatestRun(sessionId: string): StoredRunSummary | undefined;
|
|
176
|
+
listRuns(sessionId: string): StoredRunSummary[];
|
|
177
|
+
openRun(input: OpenRunStoreInput): HarnessRunStore;
|
|
178
|
+
}
|
|
97
179
|
declare class MemoryRunStore extends HarnessRunStore {
|
|
98
180
|
readonly runId: string;
|
|
99
181
|
private readonly state;
|
|
@@ -115,4 +197,4 @@ declare class MemoryRunStore extends HarnessRunStore {
|
|
|
115
197
|
loadContextSnapshots(): ContextSnapshot[];
|
|
116
198
|
}
|
|
117
199
|
|
|
118
|
-
export { HarnessRunStorage as H, MemoryRunStorage as M, NoopRunStorage as N, type OpenRunStoreInput as O, type RunCursorState as R, type ToolCallMetric as T,
|
|
200
|
+
export { type CreateStoredRunInput as C, HarnessRunStorage as H, MemoryRunStorage as M, NoopRunStorage as N, type OpenRunStoreInput as O, type RunCursorState as R, type SessionListQuery as S, type ToolCallMetric as T, type CreateStoredSessionInput as a, HarnessRunStore as b, HarnessSessionStorage as c, type HarnessSessionSummary as d, MemoryRunStore as e, MemorySessionStorage as f, NoopRunStore as g, type RunMetrics as h, type SessionListResult as i, type StoredRunSummary as j, type TouchStoredSessionInput as k };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harness-kernel/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Pure runtime contracts and session kernel for Harness Kernel.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"scripts": {
|
|
104
104
|
"build": "tsup",
|
|
105
105
|
"typecheck": "tsc --noEmit",
|
|
106
|
-
"test": "tsx src/schema/schema.test.ts && tsx src/runtime/events-schema.test.ts && tsx src/engine/provider-registry.test.ts && tsx src/session/model-resolution.test.ts && tsx src/session/tool-approval.test.ts && tsx src/boundaries.test.ts"
|
|
106
|
+
"test": "tsx src/schema/schema.test.ts && tsx src/runtime/events-schema.test.ts && tsx src/engine/provider-registry.test.ts && tsx src/session/model-resolution.test.ts && tsx src/session/tool-approval.test.ts && tsx src/session/session-store.test.ts && tsx src/boundaries.test.ts"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"zod": "^4.4.3"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/runtime/types/events.ts","../src/runtime/types/naming.ts","../src/runtime/types/roles.ts","../src/runtime/types/tools.ts","../src/runtime/types/context.ts","../src/runtime/types/modes.ts","../src/runtime/types/hooks.ts"],"sourcesContent":["import type { JsonObject } from \"./json.js\";\n\nexport interface HarnessEventMetadata extends JsonObject {\n label?: string;\n}\n\nexport interface HarnessEventSource {\n kind: \"runtime\" | \"model_provider\" | \"tool\" | \"hook\" | \"context_provider\" | \"mode\" | \"user\" | \"custom\";\n id?: string;\n name?: string;\n}\n\nexport interface HarnessEventRecord<TPayload = unknown> {\n id: string;\n seq: number;\n branchId: string;\n type: string;\n eventClassId: string;\n at: string;\n source: HarnessEventSource;\n payload: TPayload;\n runId: string;\n turnId?: string;\n modeId?: string;\n correlationId?: string;\n causationId?: string;\n hidden: true;\n metadata?: HarnessEventMetadata;\n}\n\nexport abstract class HarnessEvent<TPayload = unknown> {\n static type?: string;\n static schema?: unknown;\n\n constructor(readonly record: HarnessEventRecord<TPayload>) {}\n\n get id(): string {\n return this.record.id;\n }\n\n get type(): string {\n return this.record.type;\n }\n\n get payload(): TPayload {\n return this.record.payload;\n }\n\n get at(): string {\n return this.record.at;\n }\n}\n\nexport type HarnessEventClass<\n TPayload = unknown,\n TEvent extends HarnessEvent<TPayload> = HarnessEvent<TPayload>,\n> = {\n readonly type?: string;\n readonly schema?: unknown;\n new (record: HarnessEventRecord<any>): TEvent;\n};\n\nexport interface HarnessEventEmitOptions {\n source?: HarnessEventSource;\n correlationId?: string;\n causationId?: string;\n metadata?: HarnessEventMetadata;\n hiddenTranscript?: boolean;\n skipHooks?: boolean;\n}\n\nexport interface HarnessEventQuery<TPayload = unknown> {\n event?: HarnessEventClass<TPayload>;\n type?: string;\n sourceKind?: HarnessEventSource[\"kind\"];\n limit?: number;\n since?: string;\n until?: string;\n includeInactive?: boolean;\n}\n\nexport interface EventCursor {\n id: string;\n branchId: string;\n headEventId?: string;\n seq: number;\n updatedAt: string;\n}\n\nexport type RunnerEventListener = (event: HarnessEventRecord) => void | Promise<void>;\n","function constructorOf(value: object): { readonly type?: string; readonly label?: string; readonly name?: string } {\n return value.constructor as { readonly type?: string; readonly label?: string; readonly name?: string };\n}\n\nexport function constructTypeOf(value: object): string {\n const ctor = constructorOf(value);\n return ctor.type ?? ctor.name ?? \"AnonymousConstruct\";\n}\n\nfunction stripConstructSuffix(name: string): string {\n return name.replace(/(Tool|Mode|Provider|ContextProvider|Hook|Role|Event)$/u, \"\");\n}\n\nfunction wordsFromName(name: string): string[] {\n const spaced = name\n .replace(/[_:-]+/gu, \" \")\n .replace(/([a-z0-9])([A-Z])/gu, \"$1 $2\")\n .replace(/([A-Z]+)([A-Z][a-z])/gu, \"$1 $2\")\n .trim();\n return spaced ? spaced.split(/\\s+/u) : [name];\n}\n\nexport function labelFromType(type: string): string {\n return wordsFromName(stripConstructSuffix(type))\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \");\n}\n\nexport function snakeFromType(type: string): string {\n return wordsFromName(stripConstructSuffix(type))\n .map((word) => word.toLowerCase())\n .join(\"_\");\n}\n","import { constructTypeOf } from \"./naming.js\";\n\nexport interface HarnessRoleSummary {\n type: string;\n name: string;\n label?: string;\n target: string;\n nativeRole?: string;\n default?: boolean;\n description?: string;\n}\n\nexport enum RoleTargets {\n System = \"system\",\n Messages = \"messages\",\n Hidden = \"hidden\",\n}\n\nexport enum NativeRoles {\n System = \"system\",\n User = \"user\",\n Assistant = \"assistant\",\n Tool = \"tool\",\n}\n\nexport abstract class HarnessRole {\n protected declare readonly __harnessRoleBrand: true;\n\n label?: string;\n name?: string;\n abstract target: RoleTargets | (string & {});\n nativeRole?: NativeRoles | (string & {});\n default?: boolean;\n description?: string;\n\n get type(): string {\n return constructTypeOf(this);\n }\n\n}\n\nexport type HarnessRoleClass<TRole extends HarnessRole = HarnessRole> = abstract new (...args: any[]) => TRole;\nexport type HarnessRoleDefinition = HarnessRole;\nexport type HarnessRoleSelector<TRole extends HarnessRole = HarnessRole> = TRole | HarnessRoleClass<TRole>;\n\nexport class SystemRole extends HarnessRole {\n static type = \"system\";\n label = \"System\";\n name = \"system\";\n target = RoleTargets.System;\n nativeRole = NativeRoles.System;\n default = true;\n}\n\nexport class UserRole extends HarnessRole {\n static type = \"user\";\n label = \"User\";\n name = \"user\";\n target = RoleTargets.Messages;\n nativeRole = NativeRoles.User;\n}\n\nexport class AssistantRole extends HarnessRole {\n static type = \"assistant\";\n label = \"Assistant\";\n name = \"assistant\";\n target = RoleTargets.Messages;\n nativeRole = NativeRoles.Assistant;\n}\n\nexport class ToolRole extends HarnessRole {\n static type = \"tool\";\n label = \"Tool\";\n name = \"tool\";\n target = RoleTargets.Messages;\n nativeRole = NativeRoles.Tool;\n}\n\nexport const systemRole = new SystemRole();\nexport const userRole = new UserRole();\nexport const assistantRole = new AssistantRole();\nexport const toolRole = new ToolRole();\n","import type { AgentActionSession } from \"./sessions.js\";\nimport type { JsonObject } from \"./json.js\";\nimport { constructTypeOf } from \"./naming.js\";\n\nexport type ToolApprovalMode = \"auto\" | \"ask\" | \"deny\" | \"tool-default\";\nexport type ToolApprovalDecision = \"approved\" | \"denied\";\nexport type ToolRisk = \"safe\" | \"read\" | \"write\" | \"execute\" | \"network\" | \"destructive\";\n\nexport interface ToolPermission {\n kind: \"filesystem\" | \"shell\" | \"network\" | \"custom\";\n access?: \"read\" | \"write\" | \"execute\";\n path?: string;\n description?: string;\n}\n\nexport type ToolRef =\n | { kind: \"file\"; path: string; role?: \"created\" | \"modified\" | \"read\" | \"evidence\" }\n | { kind: \"url\"; url: string; role?: string }\n | { kind: \"command\"; command: string; exitCode?: number; role?: string }\n | { kind: \"tool_call\"; toolName: string; callId?: string; role?: string }\n | { kind: \"session\"; sessionId: string; role?: string }\n | { kind: \"external\"; label: string; uri?: string; role?: string };\n\nexport interface ToolCatalogEntry {\n name: string;\n description: string;\n risk?: ToolRisk;\n permissions?: ToolPermission[];\n requiresApproval?: boolean;\n}\n\nexport type ToolApprovalResolver = (\n args: unknown,\n session: AgentActionSession,\n) => boolean | Promise<boolean>;\n\nexport interface AgentToolResult<TData = unknown> {\n content: string;\n data?: TData;\n refs?: ToolRef[];\n metadata?: JsonObject;\n isError?: boolean;\n}\n\nexport abstract class HarnessTool<TInput = unknown, TData = unknown> {\n protected declare readonly __harnessToolBrand: true;\n\n label?: string;\n abstract name: string;\n abstract description: string;\n schema?: unknown;\n risk?: ToolRisk;\n permissions?: ToolPermission[];\n requiresApproval?: boolean | ToolApprovalResolver;\n\n get type(): string {\n return constructTypeOf(this);\n }\n\n get inputSchema(): unknown {\n return this.schema;\n }\n\n abstract execute(args: TInput, session: AgentActionSession): AgentToolResult<TData> | Promise<AgentToolResult<TData>>;\n}\n\nexport type HarnessToolClass<TTool extends HarnessTool = HarnessTool> = abstract new (...args: any[]) => TTool;\nexport type HarnessToolSelector<TTool extends HarnessTool = HarnessTool> = TTool | HarnessToolClass<TTool>;\nexport type AgentToolDefinition<TInput = unknown, TData = unknown> = HarnessTool<TInput, TData>;\nexport type AgentToolSource = HarnessTool;\n\nexport interface ToolApprovalRequest {\n id: string;\n name: string;\n args: unknown;\n modeId: string;\n risk?: ToolRisk;\n permissions?: ToolPermission[];\n}\n","import type { AgentReadSession } from \"./sessions.js\";\nimport type { AgentMessage } from \"./messages.js\";\nimport type { HarnessEventClass } from \"./events.js\";\nimport type { HarnessRoleSelector } from \"./roles.js\";\nimport type { JsonObject } from \"./json.js\";\nimport { constructTypeOf } from \"./naming.js\";\n\nexport type HarnessContextProviderClass<\n TProvider extends HarnessContextProvider = HarnessContextProvider,\n> = abstract new (...args: any[]) => TProvider;\n\nexport type HarnessContextProviderSelector<TOptions extends JsonObject = JsonObject> =\n | HarnessContextProvider<TOptions>\n | HarnessContextProviderClass<HarnessContextProvider<TOptions>>;\n\nexport interface ContextProviderBinding<TOptions extends JsonObject = JsonObject> {\n provider: HarnessContextProviderSelector<TOptions>;\n options?: TOptions;\n}\n\nexport type ContextProviderReference<TOptions extends JsonObject = JsonObject> =\n | HarnessContextProviderSelector<TOptions>\n | ContextProviderBinding<TOptions>;\n\nexport interface ContextProviderSummary {\n type: string;\n label?: string;\n options?: JsonObject;\n}\n\nexport interface ContextContribution {\n providerId?: string;\n providerLabel?: string;\n role: string;\n authorRole?: string;\n roleType?: string;\n content: unknown;\n metadata?: JsonObject;\n}\n\nexport enum ContextScopes {\n Turn = \"turn\",\n Run = \"run\",\n Session = \"session\",\n}\n\nexport enum ContextConsume {\n Once = \"once\",\n WhileActive = \"while_active\",\n}\n\nexport interface ContextRegistrationOptions {\n scope?: ContextScopes;\n on?: HarnessEventClass;\n consume?: ContextConsume;\n id?: string;\n replace?: boolean;\n metadata?: JsonObject;\n}\n\nexport interface ContextEntry {\n id: string;\n scope: ContextScopes;\n on: string;\n consume: ContextConsume;\n createdAt: string;\n activatedAt?: string;\n activatedByEventId?: string;\n activatedByEventType?: string;\n runId: string;\n turnId?: string;\n modeId: string;\n contribution: ContextContribution;\n metadata?: JsonObject;\n}\n\nexport interface ContextEntryFilter {\n id?: string;\n scope?: ContextScopes;\n consume?: ContextConsume;\n providerId?: string;\n role?: string;\n on?: HarnessEventClass;\n}\n\nexport type ContextProviderOutput =\n | string\n | ContextContributionInput\n | Array<string | ContextContributionInput>\n | null\n | undefined;\n\nexport interface ContextContributionInput {\n role?: HarnessRoleSelector;\n content: unknown;\n metadata?: JsonObject;\n}\n\nexport interface ContextProviderRenderResult {\n providerId: string;\n providerLabel?: string;\n binding: ContextProviderSummary;\n contributions: ContextContribution[];\n}\n\nexport interface ContextSnapshot {\n id: string;\n turnId?: string;\n modeId: string;\n createdAt: string;\n providers: ContextProviderRenderResult[];\n contributions: ContextContribution[];\n systemPrompt: string;\n messages: AgentMessage[];\n}\n\nexport abstract class HarnessContextProvider<TOptions extends JsonObject = JsonObject> {\n protected declare readonly __harnessContextProviderBrand: true;\n\n label?: string;\n priority?: number;\n role?: HarnessRoleSelector;\n\n get type(): string {\n return constructTypeOf(this);\n }\n\n with(options: TOptions): ContextProviderBinding<TOptions> {\n return { provider: this, options };\n }\n\n abstract render(session: AgentReadSession, options?: TOptions): ContextProviderOutput | Promise<ContextProviderOutput>;\n}\n\nexport type AgentContextProvider<TOptions extends JsonObject = JsonObject> = HarnessContextProvider<TOptions>;\n","import type { AgentActionSession, AgentReadSession } from \"./sessions.js\";\nimport type { AgentToolSource, ToolApprovalMode } from \"./tools.js\";\nimport type { ContextProviderReference } from \"./context.js\";\nimport { constructTypeOf } from \"./naming.js\";\n\nexport interface HarnessModeSummary {\n type: string;\n label: string;\n}\n\nexport abstract class HarnessMode {\n protected declare readonly __harnessModeBrand: true;\n\n label?: string;\n model?: string;\n prompt?: string | ((session: AgentReadSession) => string | Promise<string>);\n providers?: \"all\" | ContextProviderReference[];\n excludeProviders?: string[];\n tools?: AgentToolSource[];\n maxTurns?: number;\n toolApproval?: ToolApprovalMode;\n\n get type(): string {\n return constructTypeOf(this);\n }\n\n getPrompt?(session: AgentReadSession): string | Promise<string>;\n onEnter?(session: AgentActionSession, input?: unknown): void | Promise<void>;\n onExit?(session: AgentActionSession, nextMode: HarnessModeSummary): void | Promise<void>;\n}\n\nexport type HarnessModeClass<TMode extends HarnessMode = HarnessMode> = abstract new (...args: any[]) => TMode;\nexport type HarnessModeSelector<TMode extends HarnessMode = HarnessMode> = TMode | HarnessModeClass<TMode>;\nexport type AgentModeDefinition = HarnessMode;\n","import type { AgentActionSession } from \"./sessions.js\";\nimport type { HarnessEvent, HarnessEventClass } from \"./events.js\";\nimport { constructTypeOf } from \"./naming.js\";\n\nexport interface HarnessHookSummary {\n type: string;\n label: string;\n eventType: string;\n eventClassId: string;\n}\n\nexport abstract class HarnessHook<TEvent extends HarnessEvent = HarnessEvent> {\n protected declare readonly __harnessHookBrand: true;\n\n label?: string;\n readonly eventClass?: HarnessEventClass<any, TEvent>;\n\n static for<TPayload, TEvent extends HarnessEvent<TPayload>>(\n eventClass: HarnessEventClass<TPayload, TEvent>,\n ): abstract new () => HarnessHook<TEvent> {\n abstract class BoundHarnessHook extends HarnessHook<TEvent> {\n override readonly eventClass: HarnessEventClass<any, TEvent> = eventClass;\n }\n return BoundHarnessHook;\n }\n\n get type(): string {\n return constructTypeOf(this);\n }\n\n abstract onActive(session: AgentActionSession, event: TEvent): void | Promise<void>;\n}\n\nexport type HarnessHookEventClass<TEvent extends HarnessEvent = HarnessEvent> = abstract new () => HarnessHook<TEvent>;\n"],"mappings":"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","names":["RoleTargets","NativeRoles","ContextScopes","ContextConsume"]}
|