@harness-kernel/core 0.1.1 → 0.2.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.
- 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-4WWSQAWA.js → chunk-37PIMSLG.js} +192 -75
- package/dist/chunk-37PIMSLG.js.map +1 -0
- 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-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-BzEf0lAV.d.ts} +15 -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
package/dist/agent/context.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { c as HarnessRoleSelector } from '../role-BN6KhQxx.js';
|
|
2
|
-
export { a as AgentContextProvider, b as AgentContextReader, c as AgentContextSession, C as ContextConsume, z as ContextContribution, B as ContextContributionInput, D as ContextEntry, E as ContextEntryFilter, F as ContextProviderBinding, G as ContextProviderOutput, H as ContextProviderReference, I as ContextProviderRenderResult, J as ContextProviderSummary, K as ContextRegistrationOptions, L as ContextScopes, M as ContextSnapshot, N as HarnessContextProvider, O as HarnessContextProviderClass, P as HarnessContextProviderSelector } from '../context-
|
|
2
|
+
export { a as AgentContextProvider, b as AgentContextReader, c as AgentContextSession, C as ContextConsume, z as ContextContribution, B as ContextContributionInput, D as ContextEntry, E as ContextEntryFilter, F as ContextProviderBinding, G as ContextProviderOutput, H as ContextProviderReference, I as ContextProviderRenderResult, J as ContextProviderSummary, K as ContextRegistrationOptions, L as ContextScopes, M as ContextSnapshot, N as HarnessContextProvider, O as HarnessContextProviderClass, P as HarnessContextProviderSelector } from '../context-BfpLqV11.js';
|
|
3
3
|
import '../events-D4xcDi53.js';
|
|
4
4
|
import '../types-BPmsw-mF.js';
|
|
5
5
|
import '../runner/sandbox.js';
|
package/dist/agent/context.js
CHANGED
package/dist/agent/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,
|
package/dist/agent/hook.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { H as HarnessEvent, a as HarnessEventClass } from '../events-D4xcDi53.js';
|
|
2
|
-
export { H as HarnessHook, a as HarnessHookEventClass } from '../hook-
|
|
3
|
-
import '../context-
|
|
2
|
+
export { H as HarnessHook, a as HarnessHookEventClass } from '../hook-CfBbhUQf.js';
|
|
3
|
+
import '../context-BfpLqV11.js';
|
|
4
4
|
import '../role-BN6KhQxx.js';
|
|
5
5
|
import '../types-BPmsw-mF.js';
|
|
6
6
|
import '../runner/sandbox.js';
|
package/dist/agent/hook.js
CHANGED
package/dist/agent/mode.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { m as AgentModeDefinition, H as ContextProviderReference, Q as HarnessMode, R as HarnessModeClass, S as HarnessModeSelector, T as HarnessModeSummary, a3 as ToolApprovalMode } from '../context-
|
|
1
|
+
export { m as AgentModeDefinition, H as ContextProviderReference, Q as HarnessMode, R as HarnessModeClass, S as HarnessModeSelector, T as HarnessModeSummary, a3 as ToolApprovalMode } from '../context-BfpLqV11.js';
|
|
2
2
|
import '../role-BN6KhQxx.js';
|
|
3
3
|
import '../events-D4xcDi53.js';
|
|
4
4
|
import '../types-BPmsw-mF.js';
|
package/dist/agent/mode.js
CHANGED
package/dist/agent/role.js
CHANGED
package/dist/agent/session.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { E as EventCursor, d as HarnessEventQuery, e as HarnessEventRecord } from '../events-D4xcDi53.js';
|
|
2
|
-
export { A as AgentActionSession, b as AgentContextReader, c as AgentContextSession, d as AgentEventReader, e as AgentEventSession, f as AgentHistorySession, g as AgentLogSession, h as AgentMessage, i as AgentMessageEnqueueOptions, j as AgentMessageInput, l as AgentMessageSession, n as AgentModeReader, o as AgentModeSession, p as AgentReadSession, t as AgentStateReader, u as AgentStateSession, w as AgentToolResult, x as AgentToolSession, C as ContextConsume, D as ContextEntry, E as ContextEntryFilter, K as ContextRegistrationOptions, L as ContextScopes, T as HarnessModeSummary, 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-
|
|
2
|
+
export { A as AgentActionSession, b as AgentContextReader, c as AgentContextSession, d as AgentEventReader, e as AgentEventSession, f as AgentHistorySession, g as AgentLogSession, h as AgentMessage, i as AgentMessageEnqueueOptions, j as AgentMessageInput, l as AgentMessageSession, n as AgentModeReader, o as AgentModeSession, p as AgentReadSession, t as AgentStateReader, u as AgentStateSession, w as AgentToolResult, x as AgentToolSession, C as ContextConsume, D as ContextEntry, E as ContextEntryFilter, K as ContextRegistrationOptions, L as ContextScopes, T as HarnessModeSummary, 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';
|
|
3
3
|
export { c as HarnessRoleSelector, N as NativeRoles, R as RoleTargets } from '../role-BN6KhQxx.js';
|
|
4
4
|
export { T as ToolErrorCode, a as ToolErrorPayload, b as ToolInvalidField } from '../tool-errors-CygY1Nba.js';
|
|
5
5
|
import '../types-BPmsw-mF.js';
|
package/dist/agent/session.js
CHANGED
package/dist/agent/tool.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { v as AgentToolDefinition, w as AgentToolResult, y as AgentToolSource, Z as HarnessTool, _ as HarnessToolClass, $ as HarnessToolSelector, a5 as ToolApprovalResolver, a6 as ToolCatalogEntry, a7 as ToolPermission, a8 as ToolRef, a9 as ToolRisk } from '../context-
|
|
1
|
+
export { v as AgentToolDefinition, w as AgentToolResult, y as AgentToolSource, Z as HarnessTool, _ as HarnessToolClass, $ as HarnessToolSelector, a5 as ToolApprovalResolver, a6 as ToolCatalogEntry, a7 as ToolPermission, a8 as ToolRef, a9 as ToolRisk } from '../context-BfpLqV11.js';
|
|
2
2
|
import '../role-BN6KhQxx.js';
|
|
3
3
|
import '../events-D4xcDi53.js';
|
|
4
4
|
import '../types-BPmsw-mF.js';
|
package/dist/agent/tool.js
CHANGED
package/dist/agent.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { A as AgentDefinition } from './model-provider-
|
|
1
|
+
import { A as AgentDefinition } from './model-provider-Ch7tzk1x.js';
|
|
2
2
|
export { J as JsonObject } from './events-D4xcDi53.js';
|
|
3
|
-
export { r as AgentSharedState, s as AgentSharedStateDefinition } from './context-
|
|
3
|
+
export { r as AgentSharedState, s as AgentSharedStateDefinition } from './context-BfpLqV11.js';
|
|
4
4
|
import './role-BN6KhQxx.js';
|
|
5
5
|
import './runner/sandbox.js';
|
|
6
|
-
import './storage-
|
|
7
|
-
import './hook-
|
|
6
|
+
import './storage-DCZE_hES.js';
|
|
7
|
+
import './hook-CfBbhUQf.js';
|
|
8
8
|
import './types-BPmsw-mF.js';
|
|
9
9
|
|
|
10
10
|
declare function defineAgent(definition: AgentDefinition): AgentDefinition;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { A as AgentDefinition, H as HarnessModelProvider, e as ModelProviderInfo } from './model-provider-
|
|
1
|
+
import { A as AgentDefinition, H as HarnessModelProvider, e as ModelProviderInfo } from './model-provider-Ch7tzk1x.js';
|
|
2
2
|
import { j as HarnessLoggingConfig } from './types-BPmsw-mF.js';
|
|
3
3
|
import { e as HarnessEventRecord, a as HarnessEventClass, d as HarnessEventQuery, H as HarnessEvent } from './events-D4xcDi53.js';
|
|
4
|
-
import { T as HarnessModeSummary, J as ContextProviderSummary, a6 as ToolCatalogEntry,
|
|
4
|
+
import { T as HarnessModeSummary, J as ContextProviderSummary, a6 as ToolCatalogEntry, h as AgentMessage, a9 as ToolRisk, a7 as ToolPermission, w as AgentToolResult, S as HarnessModeSelector, r as AgentSharedState, a0 as HarnessTranscriptSession, X as HarnessSnapshotSession, M as ContextSnapshot } from './context-BfpLqV11.js';
|
|
5
5
|
import { d as HarnessRoleSummary, c as HarnessRoleSelector } from './role-BN6KhQxx.js';
|
|
6
|
-
import {
|
|
7
|
-
import { b as HarnessHookSummary } from './hook-
|
|
6
|
+
import { c as HarnessSessionStorage, h as RunMetrics, S as SessionListQuery, i as SessionListResult } from './storage-DCZE_hES.js';
|
|
7
|
+
import { b as HarnessHookSummary } from './hook-CfBbhUQf.js';
|
|
8
8
|
import { HarnessSandbox } from './runner/sandbox.js';
|
|
9
9
|
|
|
10
10
|
interface HarnessEventSummary {
|
|
@@ -30,21 +30,15 @@ interface HarnessAgentManifest {
|
|
|
30
30
|
type HarnessAgentInput = {
|
|
31
31
|
definition: AgentDefinition;
|
|
32
32
|
};
|
|
33
|
-
type HarnessStorageConfig =
|
|
33
|
+
type HarnessStorageConfig = HarnessSessionStorage;
|
|
34
34
|
interface HarnessAppConfig {
|
|
35
35
|
agent: HarnessAgentInput;
|
|
36
36
|
providers: HarnessModelProvider[];
|
|
37
37
|
defaultModel: string;
|
|
38
|
-
workDir?: string;
|
|
39
38
|
storage?: HarnessStorageConfig;
|
|
40
39
|
sandbox?: HarnessSandbox;
|
|
41
|
-
|
|
42
|
-
toolApproval?: ToolApprovalMode;
|
|
43
|
-
maxTurns?: number;
|
|
44
|
-
services?: Record<string, unknown>;
|
|
40
|
+
resources?: Record<string, unknown>;
|
|
45
41
|
logging?: HarnessLoggingConfig;
|
|
46
|
-
sessionTtlMs?: number;
|
|
47
|
-
toolApprovalTimeoutMs?: number;
|
|
48
42
|
}
|
|
49
43
|
interface HarnessUserInput {
|
|
50
44
|
id?: string;
|
|
@@ -231,9 +225,11 @@ type HarnessSessionStoreListener = (event: HarnessSessionStoreEvent) => void | P
|
|
|
231
225
|
interface HarnessSessionStore {
|
|
232
226
|
getOrCreate(sessionId?: string, overrides?: Partial<HarnessAppConfig>): Promise<HarnessSession>;
|
|
233
227
|
get(sessionId: string): HarnessSession | undefined;
|
|
234
|
-
list():
|
|
228
|
+
list(query?: SessionListQuery): Promise<SessionListResult>;
|
|
229
|
+
close(sessionId: string): Promise<boolean>;
|
|
235
230
|
delete(sessionId: string): Promise<boolean>;
|
|
236
|
-
|
|
231
|
+
clearActive(): Promise<void>;
|
|
232
|
+
closeAll(): Promise<void>;
|
|
237
233
|
send(sessionId: string | undefined, input: string | HarnessUserInput, options?: SendOptions): Promise<SendResult>;
|
|
238
234
|
stream(sessionId: string | undefined, input: string | HarnessUserInput, options?: StreamOptions): Promise<HarnessRunStream>;
|
|
239
235
|
getPendingApprovals(sessionId?: string): ToolApprovalHandle[];
|