@rivus/runtime 0.16.6 → 0.18.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/LICENSE +674 -21
- package/README.md +21 -0
- package/dist/acp.d.ts +7 -92
- package/dist/acp.js +298 -249
- package/dist/chunks/agent-loop.d.ts +143 -95
- package/dist/chunks/agent-user-input.js +109 -0
- package/dist/chunks/rivus-runtime-tool.d.ts +104 -4
- package/dist/chunks/{tool-input-digest.js → tool-risk-policy.js} +7 -14
- package/dist/chunks/user-input-xml.js +224 -0
- package/dist/index.d.ts +107 -823
- package/dist/index.js +242 -705
- package/dist/pi.d.ts +62 -332
- package/dist/pi.js +547 -546
- package/package.json +12 -11
- package/dist/chunks/agent-loop.js +0 -164
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { C as UserInput, S as MaterializedAttachment, _ as AttachmentAccessBinding, a as AgentTranscript, b as InputPart, c as AgentRunSummary, d as AgentDomainEvent, f as AgentRunId, g as AttachmentAccess, h as AgentSteeringInput, l as AgentSessionSummary, m as ATTACHMENT_RECOVERY_COMMAND, n as AgentLoopInput, o as AgentTranscriptTurn, p as SessionKey, r as AgentInvocationOrigin, s as AgentHistory, t as AgentLoop, u as AgentRunState, v as InputMessage, x as InputRecovery, y as InputNoticePart } from "./chunks/agent-loop.js";
|
|
2
|
+
import { A as RivusMemoryScope, B as RivusToolRisk, C as NormalizedAgentInvocation, D as AgentModelContentObserver, E as ToolOperationRecord, F as RivusToolFactoryContext, G as RunAdmissionOptions, H as ModelChangeClock, I as RivusToolGrantSet, J as RivusSkillGrantSet, K as RegisteredRivusSkill, L as RivusToolGrantSetOperations, M as RivusToolDescriptor, N as RivusToolExecutionContext, O as RegisteredRivusTool, P as RivusToolExecutor, Q as ModelReference, R as RivusToolIdempotency, S as resolveInvocationAuthority, T as ToolOperationReconciliationAction, U as RunAdmission, V as ModelChangeBoundaryDeadlineError, W as RunAdmissionLease, X as ModelChangePaidCallKind, Y as ModelBinding, Z as ModelChangeRuntimePort, _ as createToolInputDigest, a as ToolBroker, b as InvocationToolGrantSet, c as createToolBroker, d as ToolDescriptor, f as ToolExecutionContext, g as ToolInputDigest, h as ToolOperationLedger, i as isRivusRuntimeToolId, j as RivusResolvedToolDescriptor, k as RivusHostToolDescriptor, l as AuthorizationPolicyState, m as ToolExecutorInputRejected, n as RivusRuntimeToolGrantSet, o as ToolBrokerOptions, p as ToolExecutionRequest, q as RivusSkillDescriptor, r as RivusRuntimeToolId, s as ToolInvocationDenied, t as RIVUS_RUNTIME_TOOL_IDS, u as ToolApprovalRequest, v as InvalidInvocationAuthority, w as normalizeAgentInvocation, x as createInvocationAuthority, y as InvocationAuthorityRef, z as RivusToolInputRejected } from "./chunks/rivus-runtime-tool.js";
|
|
3
3
|
import { Effect, Stream } from "effect";
|
|
4
|
-
import { Tracer } from "@opentelemetry/api";
|
|
5
|
-
|
|
6
4
|
//#region src/core/application/agent-execution/contracts/agent-execution-errors.d.ts
|
|
7
5
|
declare class AgentHarnessBusy {
|
|
8
6
|
readonly activeRun: ActiveAgentRun;
|
|
@@ -12,7 +10,7 @@ declare class AgentHarnessBusy {
|
|
|
12
10
|
readonly activeSessionKey: SessionKey;
|
|
13
11
|
constructor(activeRun: ActiveAgentRun, activeState?: AgentRunState | undefined);
|
|
14
12
|
}
|
|
15
|
-
declare class AgentLoopFailed {
|
|
13
|
+
export declare class AgentLoopFailed {
|
|
16
14
|
readonly runId: AgentRunId;
|
|
17
15
|
readonly errorMessage: string;
|
|
18
16
|
readonly cause: unknown;
|
|
@@ -20,14 +18,14 @@ declare class AgentLoopFailed {
|
|
|
20
18
|
readonly _tag = "AgentLoopFailed";
|
|
21
19
|
constructor(runId: AgentRunId, errorMessage: string, cause: unknown, state?: AgentRunState | undefined);
|
|
22
20
|
}
|
|
23
|
-
declare class AgentEventSinkFailed {
|
|
21
|
+
export declare class AgentEventSinkFailed {
|
|
24
22
|
readonly runId: AgentRunId;
|
|
25
23
|
readonly eventType: AgentDomainEvent["type"];
|
|
26
24
|
readonly cause: unknown;
|
|
27
25
|
readonly _tag = "AgentEventSinkFailed";
|
|
28
26
|
constructor(runId: AgentRunId, eventType: AgentDomainEvent["type"], cause: unknown);
|
|
29
27
|
}
|
|
30
|
-
declare class AgentEventHandlerFailed {
|
|
28
|
+
export declare class AgentEventHandlerFailed {
|
|
31
29
|
readonly runId: AgentRunId;
|
|
32
30
|
readonly eventType: AgentDomainEvent["type"];
|
|
33
31
|
readonly cause: unknown;
|
|
@@ -35,7 +33,7 @@ declare class AgentEventHandlerFailed {
|
|
|
35
33
|
readonly _tag = "AgentEventHandlerFailed";
|
|
36
34
|
constructor(runId: AgentRunId, eventType: AgentDomainEvent["type"], cause: unknown, state?: AgentRunState | undefined);
|
|
37
35
|
}
|
|
38
|
-
declare class AgentRunCancelled {
|
|
36
|
+
export declare class AgentRunCancelled {
|
|
39
37
|
readonly runId: AgentRunId;
|
|
40
38
|
readonly reason: string | undefined;
|
|
41
39
|
readonly state: AgentRunState;
|
|
@@ -56,10 +54,16 @@ interface AgentHarnessOptions {
|
|
|
56
54
|
readonly initialEvents?: ReadonlyArray<AgentDomainEvent>;
|
|
57
55
|
readonly initialRunStates?: ReadonlyArray<AgentRunState>;
|
|
58
56
|
readonly loop: AgentLoop;
|
|
57
|
+
/** Stable runtime generation used to bind inbound attachment grants. */
|
|
58
|
+
readonly generationId?: string;
|
|
59
59
|
readonly runTimeoutMs?: number;
|
|
60
60
|
readonly runIds: RunIdGenerator;
|
|
61
61
|
}
|
|
62
62
|
interface PromptCommand {
|
|
63
|
+
/** Structured message tree. `text` remains the compatibility projection. */
|
|
64
|
+
readonly userInput?: UserInput;
|
|
65
|
+
/** Run-scoped access to already prepared attachments. */
|
|
66
|
+
readonly attachmentAccess?: AttachmentAccess;
|
|
63
67
|
readonly invocation?: AgentInvocationOrigin;
|
|
64
68
|
readonly sessionKey: SessionKey;
|
|
65
69
|
readonly text: string;
|
|
@@ -109,6 +113,17 @@ interface AgentExecutionControlPort {
|
|
|
109
113
|
readonly runId: AgentRunId;
|
|
110
114
|
readonly steered: true;
|
|
111
115
|
} | undefined, unknown>;
|
|
116
|
+
/** Structured steering. Implementations may return undefined when the
|
|
117
|
+
* provider cannot accept a structured message during the active Run. */
|
|
118
|
+
steerInput?(input: {
|
|
119
|
+
readonly attachmentAccess?: AttachmentAccess;
|
|
120
|
+
readonly sessionKey: SessionKey;
|
|
121
|
+
readonly text: string;
|
|
122
|
+
readonly userInput: UserInput;
|
|
123
|
+
}): Effect.Effect<{
|
|
124
|
+
readonly runId: AgentRunId;
|
|
125
|
+
readonly steered: true;
|
|
126
|
+
} | undefined, unknown>;
|
|
112
127
|
}
|
|
113
128
|
interface AgentRunUpdate {
|
|
114
129
|
readonly event: AgentDomainEvent;
|
|
@@ -170,6 +185,7 @@ interface AgentHarness extends AgentRunSubscriptionCapabilities {
|
|
|
170
185
|
cancelActiveRun(reason?: string): Effect.Effect<boolean>;
|
|
171
186
|
cancelRun(runId: AgentRunId, reason?: string): Effect.Effect<boolean>;
|
|
172
187
|
steerRun(runId: AgentRunId, text: string): Effect.Effect<boolean>;
|
|
188
|
+
steerRunInput(runId: AgentRunId, input: AgentSteeringInput): Effect.Effect<boolean>;
|
|
173
189
|
forSession(sessionKey: SessionKey): AgentSessionHandle;
|
|
174
190
|
getActiveRun(): ActiveAgentRun | undefined;
|
|
175
191
|
getActiveRunId(): AgentRunId | undefined;
|
|
@@ -206,6 +222,7 @@ interface AgentSessionHandle extends AgentRunSubscriptionCapabilities {
|
|
|
206
222
|
cancelActiveRun(reason?: string): Effect.Effect<boolean>;
|
|
207
223
|
cancelRun(runId: AgentRunId, reason?: string): Effect.Effect<boolean>;
|
|
208
224
|
steerRun(runId: AgentRunId, text: string): Effect.Effect<boolean>;
|
|
225
|
+
steerRunInput(runId: AgentRunId, input: AgentSteeringInput): Effect.Effect<boolean>;
|
|
209
226
|
getActiveRun(): ActiveAgentRun | undefined;
|
|
210
227
|
getActiveRunState(): AgentRunState | undefined;
|
|
211
228
|
getAvailability(): AgentSessionAvailability;
|
|
@@ -288,59 +305,21 @@ interface WorkspaceInstructionsSourcePort {
|
|
|
288
305
|
}
|
|
289
306
|
//#endregion
|
|
290
307
|
//#region src/core/application/agent-execution/context/workspace-instructions-resolver.d.ts
|
|
291
|
-
declare class InvalidWorkspaceRoot extends Error {
|
|
292
|
-
readonly name = "InvalidWorkspaceRoot";
|
|
293
|
-
}
|
|
294
|
-
declare class WorkspaceInstructionsSourceError extends Error {
|
|
295
|
-
readonly relativePath: string;
|
|
296
|
-
readonly reason: string;
|
|
297
|
-
readonly name = "WorkspaceInstructionsSourceError";
|
|
298
|
-
constructor(relativePath: string, reason: string);
|
|
299
|
-
}
|
|
300
308
|
interface WorkspaceInstructionsResolver {
|
|
301
309
|
resolve(request: WorkspaceInstructionsRequest): Effect.Effect<WorkspaceInstructionsView, unknown>;
|
|
302
310
|
}
|
|
303
311
|
type WorkspaceInstructionsDigest = (value: string) => string;
|
|
304
|
-
declare function createWorkspaceInstructionsResolver(source: WorkspaceInstructionsSourcePort, digest: WorkspaceInstructionsDigest): WorkspaceInstructionsResolver;
|
|
305
|
-
//#endregion
|
|
306
|
-
//#region src/core/application/agent-execution/context/agent-context-assembler.d.ts
|
|
307
|
-
type AgentContextLayerKind = "host-safety" | "system-prompt" | "managed-instructions" | "workspace-instructions" | "tool-schema" | "skill" | "memory" | "compaction" | "transcript" | "current-input";
|
|
308
|
-
interface AgentContextLayer {
|
|
309
|
-
readonly kind: AgentContextLayerKind;
|
|
310
|
-
readonly content: string;
|
|
311
|
-
}
|
|
312
|
-
interface AgentContextInput {
|
|
313
|
-
readonly hostSafety: string;
|
|
314
|
-
readonly systemPrompt: string;
|
|
315
|
-
readonly managedInstructions?: string;
|
|
316
|
-
readonly workspaceInstructions?: ReadonlyArray<string>;
|
|
317
|
-
readonly toolSchemas: ReadonlyArray<string>;
|
|
318
|
-
readonly skills?: ReadonlyArray<string>;
|
|
319
|
-
readonly memory?: ReadonlyArray<string>;
|
|
320
|
-
readonly compaction?: string;
|
|
321
|
-
readonly transcript?: ReadonlyArray<string>;
|
|
322
|
-
readonly currentInput: string;
|
|
323
|
-
readonly maxBytes: number;
|
|
324
|
-
}
|
|
325
|
-
interface AssembledAgentContext {
|
|
326
|
-
readonly layers: ReadonlyArray<AgentContextLayer>;
|
|
327
|
-
readonly omittedKinds: ReadonlyArray<AgentContextLayerKind>;
|
|
328
|
-
readonly bytes: number;
|
|
329
|
-
}
|
|
330
|
-
declare class AgentContextBudgetExceeded extends Error {
|
|
331
|
-
readonly name = "AgentContextBudgetExceeded";
|
|
332
|
-
}
|
|
333
|
-
declare function assembleAgentContext(input: AgentContextInput): AssembledAgentContext;
|
|
312
|
+
export declare function createWorkspaceInstructionsResolver(source: WorkspaceInstructionsSourcePort, digest: WorkspaceInstructionsDigest): WorkspaceInstructionsResolver;
|
|
334
313
|
//#endregion
|
|
335
314
|
//#region src/core/domain/memory/value-objects/scope.d.ts
|
|
336
|
-
type MemoryScope
|
|
315
|
+
type MemoryScope = "conversation" | "agent-private" | "project" | "shared-user-profile";
|
|
337
316
|
//#endregion
|
|
338
317
|
//#region src/core/domain/memory/value-objects/binding.d.ts
|
|
339
318
|
interface MemoryBinding {
|
|
340
319
|
readonly agentId: string;
|
|
341
320
|
readonly conversationId?: string;
|
|
342
321
|
readonly projectId?: string;
|
|
343
|
-
readonly scope: MemoryScope
|
|
322
|
+
readonly scope: MemoryScope;
|
|
344
323
|
readonly subjectId: string;
|
|
345
324
|
readonly tenantId: string;
|
|
346
325
|
}
|
|
@@ -352,7 +331,7 @@ type MemoryRecordSnapshot = Readonly<{
|
|
|
352
331
|
readonly conversationSafe: boolean;
|
|
353
332
|
readonly id: string;
|
|
354
333
|
readonly revision: number;
|
|
355
|
-
readonly scope: MemoryScope
|
|
334
|
+
readonly scope: MemoryScope;
|
|
356
335
|
readonly state: MemoryState;
|
|
357
336
|
readonly tombstoneReason?: string;
|
|
358
337
|
readonly [extension: string]: unknown;
|
|
@@ -373,119 +352,11 @@ interface TombstoneMemoryRecordInput {
|
|
|
373
352
|
readonly reason?: string;
|
|
374
353
|
}
|
|
375
354
|
//#endregion
|
|
376
|
-
//#region src/core/application/memory/ports/agent-memory-repository.d.ts
|
|
377
|
-
declare class AgentMemoryRepositoryConflict extends Error {
|
|
378
|
-
readonly name = "AgentMemoryRepositoryConflict";
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* Repository implementations exchange this transition-capable record with the
|
|
382
|
-
* application service. The domain aggregate remains an internal construction
|
|
383
|
-
* detail of Runtime and is not part of the persistence port.
|
|
384
|
-
*/
|
|
385
|
-
interface AgentMemoryRepositoryRecord extends MemoryRecordSnapshot {
|
|
386
|
-
readonly binding: MemoryBinding;
|
|
387
|
-
readonly scope: MemoryScope$1;
|
|
388
|
-
readonly state: MemoryState;
|
|
389
|
-
confirm(input: ConfirmMemoryRecordInput): AgentMemoryRepositoryRecord;
|
|
390
|
-
tombstone(input: TombstoneMemoryRecordInput): AgentMemoryRepositoryRecord;
|
|
391
|
-
forget(input: TombstoneMemoryRecordInput): AgentMemoryRepositoryRecord;
|
|
392
|
-
validateTransitionTo(next: AgentMemoryRepositoryRecord): boolean;
|
|
393
|
-
toSnapshot(): AgentMemorySnapshot;
|
|
394
|
-
}
|
|
395
|
-
interface AgentMemoryRepository {
|
|
396
|
-
get(binding: MemoryBinding, id: string): Effect.Effect<AgentMemoryRepositoryRecord | undefined, unknown>;
|
|
397
|
-
list(binding: MemoryBinding): Effect.Effect<ReadonlyArray<AgentMemoryRepositoryRecord>, unknown>;
|
|
398
|
-
save(snapshot: AgentMemorySnapshot): Effect.Effect<AgentMemoryRepositoryRecord, unknown>;
|
|
399
|
-
}
|
|
400
|
-
//#endregion
|
|
401
|
-
//#region src/core/application/memory/commands/agent-memory-service.d.ts
|
|
402
|
-
interface MemorySearchQuery {
|
|
403
|
-
readonly query: string;
|
|
404
|
-
}
|
|
405
|
-
interface MemoryHandle {
|
|
406
|
-
readonly namespace: string;
|
|
407
|
-
readonly scope: MemoryScope$1;
|
|
408
|
-
confirm(input: {
|
|
409
|
-
readonly id: string;
|
|
410
|
-
readonly expectedRevision: number;
|
|
411
|
-
readonly conversationSafe?: boolean;
|
|
412
|
-
}): Effect.Effect<MemoryRecordSnapshot, unknown>;
|
|
413
|
-
forgetRequest(input: {
|
|
414
|
-
readonly expectedRevision: number;
|
|
415
|
-
readonly id: string;
|
|
416
|
-
readonly reason?: string;
|
|
417
|
-
}): Effect.Effect<MemoryRecordSnapshot, unknown>;
|
|
418
|
-
inspect(id: string): Effect.Effect<MemoryRecordSnapshot | undefined, unknown>;
|
|
419
|
-
propose(input: {
|
|
420
|
-
readonly content: string;
|
|
421
|
-
}): Effect.Effect<MemoryRecordSnapshot, unknown>;
|
|
422
|
-
read(id: string): Effect.Effect<MemoryRecordSnapshot | undefined, unknown>;
|
|
423
|
-
search(query: MemorySearchQuery): Effect.Effect<ReadonlyArray<MemoryRecordSnapshot>, unknown>;
|
|
424
|
-
}
|
|
425
|
-
interface MemoryService {
|
|
426
|
-
bind(binding: MemoryBinding): MemoryHandle;
|
|
427
|
-
}
|
|
428
|
-
interface MemoryIdentity {
|
|
429
|
-
next(): string;
|
|
430
|
-
}
|
|
431
|
-
declare class AgentMemoryError extends Error {
|
|
432
|
-
readonly name = "AgentMemoryError";
|
|
433
|
-
}
|
|
434
|
-
declare function createMemoryService(options: {
|
|
435
|
-
readonly identity: MemoryIdentity;
|
|
436
|
-
readonly repository: AgentMemoryRepository;
|
|
437
|
-
}): MemoryService;
|
|
438
|
-
//#endregion
|
|
439
|
-
//#region src/adapters/agent/memory/memory-handle-contract.d.ts
|
|
440
|
-
/** Shared Promise handle shape used by the canonical and legacy Memory DTOs. */
|
|
441
|
-
interface MemoryHandleContract<MemoryRecord> {
|
|
442
|
-
readonly namespace: string;
|
|
443
|
-
readonly scope: MemoryScope$1;
|
|
444
|
-
confirm(input: {
|
|
445
|
-
readonly id: string;
|
|
446
|
-
readonly expectedRevision: number;
|
|
447
|
-
readonly conversationSafe?: boolean;
|
|
448
|
-
}): Promise<MemoryRecord>;
|
|
449
|
-
forgetRequest(input: {
|
|
450
|
-
readonly expectedRevision: number;
|
|
451
|
-
readonly id: string;
|
|
452
|
-
readonly reason?: string;
|
|
453
|
-
}): Promise<MemoryRecord>;
|
|
454
|
-
inspect(id: string): Promise<MemoryRecord | undefined>;
|
|
455
|
-
propose(input: {
|
|
456
|
-
readonly content: string;
|
|
457
|
-
}): Promise<MemoryRecord>;
|
|
458
|
-
read(id: string): Promise<MemoryRecord | undefined>;
|
|
459
|
-
search(query: MemorySearchQuery): Promise<ReadonlyArray<MemoryRecord>>;
|
|
460
|
-
}
|
|
461
|
-
//#endregion
|
|
462
|
-
//#region src/adapters/agent/memory/agent-memory-access.d.ts
|
|
463
|
-
declare const MEMORY_SCOPES: readonly ["conversation", "agent-private", "project", "shared-user-profile"];
|
|
464
|
-
type MemoryScope = MemoryScope$1;
|
|
465
|
-
type AgentMemoryRecord = MemoryRecordSnapshot;
|
|
466
|
-
type MemoryInvocationAudience = "group" | "private";
|
|
467
|
-
interface AgentMemoryIdentity {
|
|
468
|
-
readonly audience: MemoryInvocationAudience;
|
|
469
|
-
readonly conversationId?: string;
|
|
470
|
-
readonly projectId?: string;
|
|
471
|
-
readonly subjectId: string;
|
|
472
|
-
readonly tenantId: string;
|
|
473
|
-
}
|
|
474
|
-
interface AgentMemoryAuthority extends AgentMemoryIdentity {
|
|
475
|
-
readonly scopes: ReadonlyArray<MemoryScope>;
|
|
476
|
-
}
|
|
477
|
-
/** Promise-based Memory access used by the Host tool compatibility boundary. */
|
|
478
|
-
interface AgentMemoryHandle extends MemoryHandleContract<AgentMemoryRecord> {}
|
|
479
|
-
/** Consumer-owned port implemented by Memory compatibility adapters. */
|
|
480
|
-
interface AgentMemoryService {
|
|
481
|
-
bind(binding: MemoryBinding): AgentMemoryHandle;
|
|
482
|
-
}
|
|
483
|
-
//#endregion
|
|
484
355
|
//#region src/adapters/agent/memory/rivus-memory-tool-contract.d.ts
|
|
485
|
-
declare const RIVUS_MEMORY_TOOL_ID = "memory";
|
|
486
|
-
declare const RIVUS_MEMORY_TOOL_PLUGIN_ID = "rivus-core";
|
|
487
|
-
declare const RIVUS_MEMORY_TOOL_VERSION = "1.0.0";
|
|
488
|
-
declare function createRivusMemoryToolContract(scopes: ReadonlyArray<MemoryScope>): Readonly<{
|
|
356
|
+
export declare const RIVUS_MEMORY_TOOL_ID = "memory";
|
|
357
|
+
export declare const RIVUS_MEMORY_TOOL_PLUGIN_ID = "rivus-core";
|
|
358
|
+
export declare const RIVUS_MEMORY_TOOL_VERSION = "1.0.0";
|
|
359
|
+
export declare function createRivusMemoryToolContract(scopes: ReadonlyArray<MemoryScope>): Readonly<{
|
|
489
360
|
description: "Search and read Memory inside Host-bound scopes; propose or request forgetting only in writable private scopes.";
|
|
490
361
|
digest: "sha256:rivus-memory-v3";
|
|
491
362
|
id: "memory";
|
|
@@ -495,9 +366,9 @@ declare function createRivusMemoryToolContract(scopes: ReadonlyArray<MemoryScope
|
|
|
495
366
|
properties: {
|
|
496
367
|
scope?: {
|
|
497
368
|
description: string;
|
|
498
|
-
enum: MemoryScope
|
|
369
|
+
enum: MemoryScope[];
|
|
499
370
|
type: string;
|
|
500
|
-
};
|
|
371
|
+
} | undefined;
|
|
501
372
|
command: {
|
|
502
373
|
description: string;
|
|
503
374
|
enum: string[];
|
|
@@ -543,50 +414,72 @@ declare function createRivusMemoryToolContract(scopes: ReadonlyArray<MemoryScope
|
|
|
543
414
|
version: "1.0.0";
|
|
544
415
|
}>;
|
|
545
416
|
//#endregion
|
|
546
|
-
//#region src/
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
417
|
+
//#region src/core/application/memory/ports/agent-memory-repository.d.ts
|
|
418
|
+
/**
|
|
419
|
+
* Repository implementations exchange this transition-capable record with the
|
|
420
|
+
* application service. The domain aggregate remains an internal construction
|
|
421
|
+
* detail of Runtime and is not part of the persistence port.
|
|
422
|
+
*/
|
|
423
|
+
interface AgentMemoryRepositoryRecord extends MemoryRecordSnapshot {
|
|
424
|
+
readonly binding: MemoryBinding;
|
|
425
|
+
readonly scope: MemoryScope;
|
|
426
|
+
readonly state: MemoryState;
|
|
427
|
+
confirm(input: ConfirmMemoryRecordInput): AgentMemoryRepositoryRecord;
|
|
428
|
+
tombstone(input: TombstoneMemoryRecordInput): AgentMemoryRepositoryRecord;
|
|
429
|
+
forget(input: TombstoneMemoryRecordInput): AgentMemoryRepositoryRecord;
|
|
430
|
+
validateTransitionTo(next: AgentMemoryRepositoryRecord): boolean;
|
|
431
|
+
toSnapshot(): AgentMemorySnapshot;
|
|
432
|
+
}
|
|
433
|
+
interface AgentMemoryRepository {
|
|
434
|
+
get(binding: MemoryBinding, id: string): Effect.Effect<AgentMemoryRepositoryRecord | undefined, unknown>;
|
|
435
|
+
list(binding: MemoryBinding): Effect.Effect<ReadonlyArray<AgentMemoryRepositoryRecord>, unknown>;
|
|
436
|
+
save(snapshot: AgentMemorySnapshot): Effect.Effect<AgentMemoryRepositoryRecord, unknown>;
|
|
437
|
+
}
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region src/core/application/memory/commands/agent-memory-service.d.ts
|
|
440
|
+
interface MemorySearchQuery {
|
|
441
|
+
readonly query: string;
|
|
552
442
|
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
443
|
+
interface MemoryHandle {
|
|
444
|
+
readonly namespace: string;
|
|
445
|
+
readonly scope: MemoryScope;
|
|
446
|
+
confirm(input: {
|
|
557
447
|
readonly id: string;
|
|
558
|
-
readonly
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
readonly
|
|
563
|
-
readonly content: string;
|
|
564
|
-
};
|
|
565
|
-
readonly scope?: Exclude<MemoryScope$1, "shared-user-profile">;
|
|
566
|
-
}): Promise<MemoryRecord>;
|
|
567
|
-
execute(command: {
|
|
568
|
-
readonly command: "read";
|
|
448
|
+
readonly expectedRevision: number;
|
|
449
|
+
readonly conversationSafe?: boolean;
|
|
450
|
+
}): Effect.Effect<MemoryRecordSnapshot, unknown>;
|
|
451
|
+
forgetRequest(input: {
|
|
452
|
+
readonly expectedRevision: number;
|
|
569
453
|
readonly id: string;
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
readonly
|
|
575
|
-
}):
|
|
576
|
-
|
|
454
|
+
readonly reason?: string;
|
|
455
|
+
}): Effect.Effect<MemoryRecordSnapshot, unknown>;
|
|
456
|
+
inspect(id: string): Effect.Effect<MemoryRecordSnapshot | undefined, unknown>;
|
|
457
|
+
propose(input: {
|
|
458
|
+
readonly content: string;
|
|
459
|
+
}): Effect.Effect<MemoryRecordSnapshot, unknown>;
|
|
460
|
+
read(id: string): Effect.Effect<MemoryRecordSnapshot | undefined, unknown>;
|
|
461
|
+
search(query: MemorySearchQuery): Effect.Effect<ReadonlyArray<MemoryRecordSnapshot>, unknown>;
|
|
462
|
+
}
|
|
463
|
+
interface MemoryService {
|
|
464
|
+
bind(binding: MemoryBinding): MemoryHandle;
|
|
577
465
|
}
|
|
466
|
+
interface MemoryIdentity {
|
|
467
|
+
next(): string;
|
|
468
|
+
}
|
|
469
|
+
export declare function createMemoryService(options: {
|
|
470
|
+
readonly identity: MemoryIdentity;
|
|
471
|
+
readonly repository: AgentMemoryRepository;
|
|
472
|
+
}): MemoryService;
|
|
578
473
|
//#endregion
|
|
579
474
|
//#region src/adapters/agent/memory/rivus-memory-tool.d.ts
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
declare function createRivusMemoryToolDescriptor(options: {
|
|
583
|
-
readonly memory: AgentMemoryService;
|
|
475
|
+
export declare function createRivusMemoryToolDescriptor(options: {
|
|
476
|
+
readonly memory: MemoryService;
|
|
584
477
|
}): RivusHostToolDescriptor;
|
|
585
478
|
//#endregion
|
|
586
479
|
//#region src/adapters/agent/memory/project-memory-prompt-preparer.d.ts
|
|
587
480
|
interface ProjectMemoryRecallOptions {
|
|
588
481
|
readonly agentId: string;
|
|
589
|
-
readonly memory:
|
|
482
|
+
readonly memory: MemoryService;
|
|
590
483
|
readonly projectId: string;
|
|
591
484
|
readonly maxBytes?: number;
|
|
592
485
|
readonly maxRecords?: number;
|
|
@@ -600,40 +493,13 @@ interface ProjectMemoryPromptInput {
|
|
|
600
493
|
readonly invocation?: AgentInvocationOrigin;
|
|
601
494
|
readonly text: string;
|
|
602
495
|
}
|
|
603
|
-
declare function createProjectMemoryPromptPreparer(options: ProjectMemoryRecallOptions): (input: ProjectMemoryPromptInput) =>
|
|
496
|
+
export declare function createProjectMemoryPromptPreparer(options: ProjectMemoryRecallOptions): (input: ProjectMemoryPromptInput) => Effect.Effect<string, unknown>;
|
|
604
497
|
//#endregion
|
|
605
498
|
//#region src/adapters/agent/workspace/agents-md-instructions-source.d.ts
|
|
606
|
-
declare function createAgentsMdInstructionsSource(): WorkspaceInstructionsSourcePort;
|
|
499
|
+
export declare function createAgentsMdInstructionsSource(): WorkspaceInstructionsSourcePort;
|
|
607
500
|
//#endregion
|
|
608
501
|
//#region src/adapters/agent/workspace/node-workspace-root-registry.d.ts
|
|
609
|
-
declare function createWorkspaceRootHandle(rootPath: string): Promise<WorkspaceRootHandle>;
|
|
610
|
-
declare function resolveWorkspaceRootPath(handle: WorkspaceRootHandle): string;
|
|
611
|
-
//#endregion
|
|
612
|
-
//#region src/adapters/agent/memory/persisted-memory-record.d.ts
|
|
613
|
-
/** Persistence codecs use this named transition surface without publishing the domain aggregate class. */
|
|
614
|
-
interface PersistedMemoryRecord extends AgentMemoryRepositoryRecord, AgentMemoryRecord {
|
|
615
|
-
readonly binding: MemoryBinding;
|
|
616
|
-
confirm(input: {
|
|
617
|
-
readonly expectedRevision: number;
|
|
618
|
-
readonly conversationSafe?: boolean;
|
|
619
|
-
}): PersistedMemoryRecord;
|
|
620
|
-
tombstone(input: {
|
|
621
|
-
readonly expectedRevision: number;
|
|
622
|
-
readonly reason?: string;
|
|
623
|
-
}): PersistedMemoryRecord;
|
|
624
|
-
forget(input: {
|
|
625
|
-
readonly expectedRevision: number;
|
|
626
|
-
readonly reason?: string;
|
|
627
|
-
}): PersistedMemoryRecord;
|
|
628
|
-
validateTransitionTo(next: PersistedMemoryRecord): boolean;
|
|
629
|
-
toSnapshot(): AgentMemorySnapshot;
|
|
630
|
-
}
|
|
631
|
-
declare function createPersistedMemoryRecord(input: {
|
|
632
|
-
readonly binding: MemoryBinding;
|
|
633
|
-
readonly content: string;
|
|
634
|
-
readonly id: string;
|
|
635
|
-
}): PersistedMemoryRecord;
|
|
636
|
-
declare function restorePersistedMemoryRecord(snapshot: unknown): PersistedMemoryRecord;
|
|
502
|
+
export declare function createWorkspaceRootHandle(rootPath: string): Promise<WorkspaceRootHandle>;
|
|
637
503
|
//#endregion
|
|
638
504
|
//#region src/adapters/observability/content/telemetry-content-redactor.d.ts
|
|
639
505
|
interface TelemetryContentRedactorOptions {
|
|
@@ -644,7 +510,7 @@ interface TelemetryContentRedactorOptions {
|
|
|
644
510
|
readonly maxStringLength?: number;
|
|
645
511
|
}
|
|
646
512
|
type TelemetryContentRedactor = (value: unknown) => string;
|
|
647
|
-
declare function createTelemetryContentRedactor(options?: TelemetryContentRedactorOptions): TelemetryContentRedactor;
|
|
513
|
+
export declare function createTelemetryContentRedactor(options?: TelemetryContentRedactorOptions): TelemetryContentRedactor;
|
|
648
514
|
//#endregion
|
|
649
515
|
//#region src/adapters/observability/agent/langfuse-agent-telemetry.d.ts
|
|
650
516
|
type LangfuseTelemetryEnv = Readonly<Record<string, string | undefined>>;
|
|
@@ -663,218 +529,22 @@ interface LangfuseAgentTelemetry {
|
|
|
663
529
|
forceFlush(): Promise<void>;
|
|
664
530
|
shutdown(): Promise<void>;
|
|
665
531
|
}
|
|
666
|
-
declare
|
|
667
|
-
|
|
668
|
-
}
|
|
669
|
-
declare function resolveLangfuseTelemetryConfig(env: LangfuseTelemetryEnv): LangfuseTelemetryConfig | undefined;
|
|
670
|
-
declare function createLangfuseAgentTelemetry(config: LangfuseTelemetryConfig): LangfuseAgentTelemetry;
|
|
671
|
-
//#endregion
|
|
672
|
-
//#region src/adapters/observability/agent/open-telemetry-agent-event-sink.d.ts
|
|
673
|
-
interface OpenTelemetryAgentEventSinkOptions {
|
|
674
|
-
readonly captureContent?: boolean;
|
|
675
|
-
readonly onProjectionError?: (error: unknown, event: AgentDomainEvent) => Promise<void> | void;
|
|
676
|
-
readonly redactContent?: TelemetryContentRedactor;
|
|
677
|
-
readonly tracer: Tracer;
|
|
678
|
-
}
|
|
679
|
-
interface OpenTelemetryAgentTelemetry {
|
|
680
|
-
readonly modelContentObserver: AgentModelContentObserver;
|
|
681
|
-
readonly sink: AgentDomainEventSink;
|
|
682
|
-
}
|
|
683
|
-
declare function createOpenTelemetryAgentEventSink(options: OpenTelemetryAgentEventSinkOptions): AgentDomainEventSink;
|
|
684
|
-
declare function createOpenTelemetryAgentTelemetry(options: OpenTelemetryAgentEventSinkOptions): OpenTelemetryAgentTelemetry;
|
|
685
|
-
//#endregion
|
|
686
|
-
//#region src/core/domain/tool-operation/value-objects/binding.d.ts
|
|
687
|
-
interface ToolOperationBinding$1 {
|
|
688
|
-
readonly agentId: string;
|
|
689
|
-
readonly inputDigest: string;
|
|
690
|
-
readonly instanceId: string;
|
|
691
|
-
readonly sourceMessageId: string;
|
|
692
|
-
readonly toolId: string;
|
|
693
|
-
readonly toolVersion: string;
|
|
694
|
-
}
|
|
695
|
-
//#endregion
|
|
696
|
-
//#region src/core/domain/tool-operation/aggregate/snapshot.d.ts
|
|
697
|
-
type ToolOperationState$1 = {
|
|
698
|
-
readonly status: "pending";
|
|
699
|
-
} | {
|
|
700
|
-
readonly result: unknown;
|
|
701
|
-
readonly status: "completed";
|
|
702
|
-
} | {
|
|
703
|
-
readonly reason: string;
|
|
704
|
-
readonly status: "reconciliation-required";
|
|
705
|
-
} | {
|
|
706
|
-
readonly status: "aborted";
|
|
707
|
-
};
|
|
708
|
-
interface ToolOperationReconciliationAction {
|
|
709
|
-
readonly actorId: string;
|
|
710
|
-
readonly at: string;
|
|
711
|
-
readonly note: string;
|
|
712
|
-
}
|
|
713
|
-
interface ToolOperationReconciliation$1 extends ToolOperationReconciliationAction {
|
|
714
|
-
readonly outcome: "applied" | "not-applied";
|
|
715
|
-
}
|
|
716
|
-
interface ToolOperationSnapshot {
|
|
717
|
-
readonly binding: ToolOperationBinding$1;
|
|
718
|
-
readonly operationId: string;
|
|
719
|
-
readonly reconciliation?: ToolOperationReconciliation$1;
|
|
720
|
-
readonly revision: number;
|
|
721
|
-
readonly state: ToolOperationState$1;
|
|
722
|
-
}
|
|
723
|
-
type ToolOperationRecord$1 = ToolOperationSnapshot;
|
|
724
|
-
type ToolOperationReconciliationOutcome$1 = {
|
|
725
|
-
readonly result: unknown;
|
|
726
|
-
readonly status: "applied";
|
|
727
|
-
} | {
|
|
728
|
-
readonly status: "not-applied";
|
|
729
|
-
};
|
|
730
|
-
type ToolOperationBeginResult$1 = {
|
|
731
|
-
readonly status: "acquired";
|
|
732
|
-
} | {
|
|
733
|
-
readonly result: unknown;
|
|
734
|
-
readonly status: "completed";
|
|
735
|
-
} | {
|
|
736
|
-
readonly status: "blocked";
|
|
737
|
-
readonly reason: string;
|
|
738
|
-
};
|
|
739
|
-
type ToolOperationInspectResult$1 = {
|
|
740
|
-
readonly status: "missing";
|
|
741
|
-
} | {
|
|
742
|
-
readonly result: unknown;
|
|
743
|
-
readonly status: "completed";
|
|
744
|
-
} | {
|
|
745
|
-
readonly status: "blocked";
|
|
746
|
-
readonly reason: string;
|
|
747
|
-
};
|
|
748
|
-
//#endregion
|
|
749
|
-
//#region src/core/domain/tool-operation/aggregate/tool-operation.d.ts
|
|
750
|
-
interface CreateToolOperationInput {
|
|
751
|
-
readonly binding: ToolOperationBinding$1;
|
|
752
|
-
readonly operationId: string;
|
|
753
|
-
}
|
|
754
|
-
interface ReconcileToolOperationInput {
|
|
755
|
-
readonly action: ToolOperationReconciliationAction;
|
|
756
|
-
readonly expectedRevision: number;
|
|
757
|
-
readonly operationId: string;
|
|
758
|
-
readonly outcome: ToolOperationReconciliationOutcome$1;
|
|
759
|
-
}
|
|
760
|
-
/** Immutable transitions do not serialize concurrent writes; the ledger serializes persisted transitions. */
|
|
761
|
-
declare class ToolOperation {
|
|
762
|
-
#private;
|
|
763
|
-
private constructor();
|
|
764
|
-
static create(input: CreateToolOperationInput): ToolOperation;
|
|
765
|
-
static restore(value: unknown): ToolOperation;
|
|
766
|
-
get binding(): ToolOperationBinding$1;
|
|
767
|
-
get operationId(): string;
|
|
768
|
-
get reconciliation(): ToolOperationReconciliation$1 | undefined;
|
|
769
|
-
get revision(): number;
|
|
770
|
-
get state(): ToolOperationState$1;
|
|
771
|
-
matchesBinding(binding: ToolOperationBinding$1): boolean;
|
|
772
|
-
complete(result: unknown): ToolOperation;
|
|
773
|
-
abort(): ToolOperation;
|
|
774
|
-
requireReconciliation(reason: string): ToolOperation;
|
|
775
|
-
retry(): ToolOperation;
|
|
776
|
-
recoverInterrupted(): ToolOperation;
|
|
777
|
-
reconcile(input: ReconcileToolOperationInput): ToolOperation;
|
|
778
|
-
validateTransitionTo(next: ToolOperation): boolean;
|
|
779
|
-
toSnapshot(): ToolOperationSnapshot;
|
|
780
|
-
private requirePending;
|
|
781
|
-
private next;
|
|
782
|
-
}
|
|
783
|
-
//#endregion
|
|
784
|
-
//#region src/core/domain/tool-operation/factories/restore-tool-operation.d.ts
|
|
785
|
-
declare function restoreToolOperation(snapshot: unknown): ToolOperation;
|
|
532
|
+
export declare function resolveLangfuseTelemetryConfig(env: LangfuseTelemetryEnv): LangfuseTelemetryConfig | undefined;
|
|
533
|
+
export declare function createLangfuseAgentTelemetry(config: LangfuseTelemetryConfig): LangfuseAgentTelemetry;
|
|
786
534
|
//#endregion
|
|
787
535
|
//#region src/core/application/recovery/recovery-action.d.ts
|
|
788
536
|
/** The audited actor, timestamp, and note shared by recovery operations. */
|
|
789
537
|
interface RecoveryAction extends ToolOperationReconciliationAction {}
|
|
790
|
-
declare
|
|
791
|
-
readonly name = "InvalidRecoveryAction";
|
|
792
|
-
}
|
|
793
|
-
declare function createRecoveryAction(input: RecoveryAction): RecoveryAction;
|
|
538
|
+
export declare function createRecoveryAction(input: RecoveryAction): RecoveryAction;
|
|
794
539
|
//#endregion
|
|
795
540
|
//#region src/core/application/agent-execution/execution/agent-harness.d.ts
|
|
796
|
-
declare function createAgentHarness(options: AgentHarnessOptions): AgentHarness;
|
|
797
|
-
//#endregion
|
|
798
|
-
//#region src/core/application/agent-execution/execution/agent-event-sink.d.ts
|
|
799
|
-
declare function createAgentDomainEventSink(append: (event: AgentDomainEvent) => Effect.Effect<void, unknown>): AgentDomainEventSink;
|
|
800
|
-
//#endregion
|
|
801
|
-
//#region src/core/application/agent-execution/execution/agent-loop-event-mapper.d.ts
|
|
802
|
-
declare function describeLoopError(error: unknown): string;
|
|
803
|
-
declare function toDomainEvent(runId: AgentRunId, sessionKey: SessionKey, event: AgentLoopEvent, occurredAt: Date): AgentDomainEvent;
|
|
804
|
-
//#endregion
|
|
805
|
-
//#region src/core/application/agent-execution/history/agent-run-state-projection.d.ts
|
|
806
|
-
declare const initialAgentRunState: AgentRunState;
|
|
807
|
-
declare function isTerminalAgentRunPhase(phase: AgentRunPhase): boolean;
|
|
808
|
-
declare function evolveAgentRun(state: AgentRunState, event: AgentDomainEvent): AgentRunState;
|
|
541
|
+
export declare function createAgentHarness(options: AgentHarnessOptions): AgentHarness;
|
|
809
542
|
//#endregion
|
|
810
543
|
//#region src/core/application/agent-execution/history/restore-agent-history.d.ts
|
|
811
544
|
interface AgentHistoryEventLog {
|
|
812
545
|
readAll(): Effect.Effect<ReadonlyArray<AgentDomainEvent>, unknown>;
|
|
813
546
|
}
|
|
814
|
-
declare function restoreAgentHistory(eventLog: AgentHistoryEventLog): Effect.Effect<AgentHistory, unknown>;
|
|
815
|
-
//#endregion
|
|
816
|
-
//#region src/core/application/agent-execution/query/agent-execution-query-store.d.ts
|
|
817
|
-
interface AgentExecutionQueryStore {
|
|
818
|
-
project(event: AgentDomainEvent): AgentRunUpdate;
|
|
819
|
-
getHistory(): AgentHistory;
|
|
820
|
-
getLatestState(): AgentRunState;
|
|
821
|
-
getRunEvents(runId: AgentRunId): ReadonlyArray<AgentDomainEvent> | undefined;
|
|
822
|
-
getRunSnapshot(runId: AgentRunId): AgentRunSnapshot | undefined;
|
|
823
|
-
getRunState(runId: AgentRunId): AgentRunState | undefined;
|
|
824
|
-
getRunSummary(runId: AgentRunId): AgentRunSummary | undefined;
|
|
825
|
-
getRunUpdates(runId: AgentRunId): ReadonlyArray<AgentRunUpdate> | undefined;
|
|
826
|
-
getSessionHistory(sessionKey: SessionKey): AgentHistory;
|
|
827
|
-
getSessionLatestRunSnapshot(sessionKey: SessionKey): AgentRunSnapshot | undefined;
|
|
828
|
-
getSessionLatestRunSummary(sessionKey: SessionKey): AgentRunSummary | undefined;
|
|
829
|
-
getSessionRunEvents(sessionKey: SessionKey, runId: AgentRunId): ReadonlyArray<AgentDomainEvent> | undefined;
|
|
830
|
-
getSessionRunSnapshot(sessionKey: SessionKey, runId: AgentRunId): AgentRunSnapshot | undefined;
|
|
831
|
-
getSessionRunState(sessionKey: SessionKey, runId: AgentRunId): AgentRunState | undefined;
|
|
832
|
-
getSessionRunSummary(sessionKey: SessionKey, runId: AgentRunId): AgentRunSummary | undefined;
|
|
833
|
-
getSessionRunUpdates(sessionKey: SessionKey, runId: AgentRunId): ReadonlyArray<AgentRunUpdate> | undefined;
|
|
834
|
-
getSessionRuns(sessionKey: SessionKey): ReadonlyArray<AgentRunSummary>;
|
|
835
|
-
getSessionSnapshot(sessionKey: SessionKey, availability: AgentSessionAvailability): AgentSessionSnapshot;
|
|
836
|
-
getSessionState(sessionKey: SessionKey): AgentRunState | undefined;
|
|
837
|
-
getSessionSummary(sessionKey: SessionKey): AgentSessionSummary | undefined;
|
|
838
|
-
getSessionTranscript(sessionKey: SessionKey): AgentTranscript;
|
|
839
|
-
subscribe(listener: AgentDomainEventListener): () => void;
|
|
840
|
-
subscribeRun(runId: AgentRunId, listener: AgentDomainEventListener): () => void;
|
|
841
|
-
subscribeRunUpdates(runId: AgentRunId, listener: AgentRunUpdateListener): () => void;
|
|
842
|
-
subscribeSession(sessionKey: SessionKey, listener: AgentDomainEventListener): () => void;
|
|
843
|
-
subscribeSessionRun(sessionKey: SessionKey, runId: AgentRunId, listener: AgentDomainEventListener): () => void;
|
|
844
|
-
subscribeSessionRunUpdates(sessionKey: SessionKey, runId: AgentRunId, listener: AgentRunUpdateListener): () => void;
|
|
845
|
-
subscribeSessionUpdates(sessionKey: SessionKey, listener: AgentRunUpdateListener): () => void;
|
|
846
|
-
subscribeUpdates(listener: AgentRunUpdateListener): () => void;
|
|
847
|
-
}
|
|
848
|
-
interface AgentExecutionQueryStoreOptions {
|
|
849
|
-
readonly initialEvents?: ReadonlyArray<AgentDomainEvent>;
|
|
850
|
-
readonly initialRunStates?: ReadonlyArray<AgentRunState>;
|
|
851
|
-
}
|
|
852
|
-
declare function createAgentExecutionQueryStore(options?: AgentExecutionQueryStoreOptions): AgentExecutionQueryStore;
|
|
853
|
-
//#endregion
|
|
854
|
-
//#region src/core/application/agent-execution/query/agent-event-notifications.d.ts
|
|
855
|
-
declare function notifyListeners(listeners: Iterable<AgentDomainEventListener>, event: AgentDomainEvent): void;
|
|
856
|
-
declare function notifyUpdateListeners(listeners: Iterable<AgentRunUpdateListener>, update: AgentRunUpdate): void;
|
|
857
|
-
//#endregion
|
|
858
|
-
//#region src/core/application/agent-execution/query/agent-run-projection.d.ts
|
|
859
|
-
declare function toRunUpdate(event: AgentDomainEvent, state: AgentRunState, previousState: AgentRunState | undefined): AgentRunUpdate;
|
|
860
|
-
declare function replayRunUpdates(events: ReadonlyArray<AgentDomainEvent>): ReadonlyArray<AgentRunUpdate>;
|
|
861
|
-
declare function buildRunSnapshot(runId: AgentRunId, events: ReadonlyArray<AgentDomainEvent>, updates: ReadonlyArray<AgentRunUpdate>, state?: AgentRunState, summary?: AgentRunSummary): AgentRunSnapshot;
|
|
862
|
-
//#endregion
|
|
863
|
-
//#region src/core/application/agent-execution/query/agent-session-history.d.ts
|
|
864
|
-
interface AgentSessionHistoryView {
|
|
865
|
-
readonly history: AgentHistory;
|
|
866
|
-
readonly latestRunSummary?: AgentRunSummary;
|
|
867
|
-
readonly runs: ReadonlyArray<AgentRunSummary>;
|
|
868
|
-
readonly summary?: AgentSessionSummary;
|
|
869
|
-
readonly transcript: AgentTranscript;
|
|
870
|
-
}
|
|
871
|
-
declare function projectAgentSessionHistory(events: ReadonlyArray<AgentDomainEvent>, runStates: ReadonlyMap<AgentRunId, AgentRunState>, sessionKey: SessionKey): AgentSessionHistoryView;
|
|
872
|
-
declare function buildAgentSessionSnapshot(input: {
|
|
873
|
-
readonly availability: AgentSessionAvailability;
|
|
874
|
-
readonly sessionKey: SessionKey;
|
|
875
|
-
readonly state?: AgentRunState;
|
|
876
|
-
readonly view: AgentSessionHistoryView;
|
|
877
|
-
}): AgentSessionSnapshot;
|
|
547
|
+
export declare function restoreAgentHistory(eventLog: AgentHistoryEventLog): Effect.Effect<AgentHistory, unknown>;
|
|
878
548
|
//#endregion
|
|
879
549
|
//#region src/core/application/agent-execution/run-admission/run-admission.d.ts
|
|
880
550
|
/**
|
|
@@ -885,134 +555,18 @@ declare function buildAgentSessionSnapshot(input: {
|
|
|
885
555
|
* deadline via the `ModelChangeBoundaryPort` adapter in the deployment
|
|
886
556
|
* boundary; no second counter or parallel lifecycle is created.
|
|
887
557
|
*/
|
|
888
|
-
declare function createRunAdmission(options: RunAdmissionOptions): RunAdmission;
|
|
889
|
-
declare function remainingUntil(clock: ModelChangeClock, deadlineAt: string): number;
|
|
890
|
-
//#endregion
|
|
891
|
-
//#region src/core/application/agent-execution/streaming/agent-run-streams.d.ts
|
|
892
|
-
type AgentPromptExecutor = <R>(command: PromptCommand, emit: (event: AgentDomainEvent, state: AgentRunState, previousState: AgentRunState | undefined) => Effect.Effect<void, unknown, R>, interruptionReason?: string) => Effect.Effect<AgentPromptResult, AgentHarnessError, R>;
|
|
893
|
-
interface AgentRunStreams {
|
|
894
|
-
events(command: PromptCommand): Stream.Stream<AgentDomainEvent, AgentHarnessError>;
|
|
895
|
-
text(command: PromptCommand): Stream.Stream<string, AgentHarnessError>;
|
|
896
|
-
updates(command: PromptCommand): Stream.Stream<AgentRunUpdate, AgentHarnessError>;
|
|
897
|
-
}
|
|
898
|
-
declare function createAgentRunStreams(runPrompt: AgentPromptExecutor): AgentRunStreams;
|
|
899
|
-
//#endregion
|
|
900
|
-
//#region src/core/application/memory/commands/memory-binding.d.ts
|
|
901
|
-
declare function normalizeMemoryBinding(binding: MemoryBinding): MemoryBinding;
|
|
902
|
-
declare function createMemoryNamespace$1(binding: MemoryBinding): string;
|
|
903
|
-
//#endregion
|
|
904
|
-
//#region src/core/application/memory/ports/compactor.d.ts
|
|
905
|
-
interface CompactionInput {
|
|
906
|
-
readonly tenantId: string;
|
|
907
|
-
readonly agentId: string;
|
|
908
|
-
readonly instanceId: string;
|
|
909
|
-
readonly conversationId: string;
|
|
910
|
-
readonly profileRevision: string;
|
|
911
|
-
readonly watermark: number;
|
|
912
|
-
readonly transcript: ReadonlyArray<string>;
|
|
913
|
-
}
|
|
914
|
-
interface CompactorPort {
|
|
915
|
-
compact(input: CompactionInput): Effect.Effect<string, unknown>;
|
|
916
|
-
}
|
|
917
|
-
//#endregion
|
|
918
|
-
//#region src/core/application/memory/compaction/compaction-service.d.ts
|
|
919
|
-
interface CompactionSnapshot extends Omit<CompactionInput, "transcript"> {
|
|
920
|
-
readonly id: string;
|
|
921
|
-
readonly summary: string;
|
|
922
|
-
}
|
|
923
|
-
interface CompactionService {
|
|
924
|
-
createCandidate(input: CompactionInput): Effect.Effect<CompactionSnapshot, unknown>;
|
|
925
|
-
commit(candidateId: string): Effect.Effect<CompactionSnapshot, unknown>;
|
|
926
|
-
current(instanceId: string, conversationId: string): CompactionSnapshot | undefined;
|
|
927
|
-
}
|
|
928
|
-
declare class CompactionError extends Error {
|
|
929
|
-
readonly name = "CompactionError";
|
|
930
|
-
}
|
|
931
|
-
declare function createEffectCompactionService(options: {
|
|
932
|
-
readonly compactor: CompactorPort;
|
|
933
|
-
readonly identity: {
|
|
934
|
-
readonly next: () => string;
|
|
935
|
-
};
|
|
936
|
-
}): CompactionService;
|
|
937
|
-
//#endregion
|
|
938
|
-
//#region src/adapters/outbound/persistence/memory/agent-memory-snapshot-codec.d.ts
|
|
939
|
-
declare const AGENT_MEMORY_JSONL_VERSION = 1;
|
|
940
|
-
declare function encodeAgentMemorySnapshot(snapshot: AgentMemorySnapshot): string;
|
|
941
|
-
declare function decodeAgentMemorySnapshots(raw: string): ReadonlyArray<AgentMemorySnapshot>;
|
|
942
|
-
//#endregion
|
|
943
|
-
//#region src/adapters/outbound/persistence/memory/in-memory-agent-memory-repository.d.ts
|
|
944
|
-
declare function createInMemoryAgentMemoryRepository(options?: {
|
|
945
|
-
readonly initial?: ReadonlyArray<AgentMemorySnapshot>;
|
|
946
|
-
readonly persist?: (snapshot: AgentMemorySnapshot) => Effect.Effect<void, unknown>;
|
|
947
|
-
}): AgentMemoryRepository;
|
|
558
|
+
export declare function createRunAdmission(options: RunAdmissionOptions): RunAdmission;
|
|
559
|
+
export declare function remainingUntil(clock: ModelChangeClock, deadlineAt: string): number;
|
|
948
560
|
//#endregion
|
|
949
561
|
//#region src/adapters/outbound/persistence/memory/jsonl-agent-memory-repository.d.ts
|
|
950
|
-
declare function openJsonlAgentMemoryRepository(options: Readonly<{
|
|
562
|
+
export declare function openJsonlAgentMemoryRepository(options: Readonly<{
|
|
951
563
|
readonly filePath: string;
|
|
952
564
|
}>): Effect.Effect<AgentMemoryRepository, unknown>;
|
|
953
565
|
//#endregion
|
|
954
|
-
//#region src/core/application/tool-execution/brokerage/tool-input-digest.d.ts
|
|
955
|
-
declare class InvalidStableJson extends Error {
|
|
956
|
-
readonly name: string;
|
|
957
|
-
}
|
|
958
|
-
declare class InvalidToolInput extends InvalidStableJson {
|
|
959
|
-
readonly name = "InvalidToolInput";
|
|
960
|
-
}
|
|
961
|
-
type ToolInputDigest = (canonicalJson: string) => string;
|
|
962
|
-
declare function createToolInputDigest$1(input: unknown, digest: ToolInputDigest): string;
|
|
963
|
-
declare function normalizeStableJson(value: unknown): unknown;
|
|
964
|
-
//#endregion
|
|
965
|
-
//#region src/core/application/tool-execution/operation/tool-operation-ledger.d.ts
|
|
966
|
-
interface ToolOperationLedger$1 {
|
|
967
|
-
abort(operationId: string, binding: ToolOperationBinding$1): Effect.Effect<void, unknown>;
|
|
968
|
-
begin(operationId: string, binding: ToolOperationBinding$1): Effect.Effect<ToolOperationBeginResult$1, unknown>;
|
|
969
|
-
complete(operationId: string, binding: ToolOperationBinding$1, result: unknown): Effect.Effect<void, unknown>;
|
|
970
|
-
inspect(operationId: string, binding: ToolOperationBinding$1): Effect.Effect<ToolOperationInspectResult$1, unknown>;
|
|
971
|
-
reconciliationRequired(): ReadonlyArray<ToolOperationRecord$1>;
|
|
972
|
-
reconcile(input: {
|
|
973
|
-
readonly action: ToolOperationReconciliationAction;
|
|
974
|
-
readonly expectedRevision: number;
|
|
975
|
-
readonly operationId: string;
|
|
976
|
-
readonly outcome: ToolOperationReconciliationOutcome$1;
|
|
977
|
-
}): Effect.Effect<ToolOperationRecord$1, unknown>;
|
|
978
|
-
requireReconciliation(operationId: string, binding: ToolOperationBinding$1, reason: string): Effect.Effect<void, unknown>;
|
|
979
|
-
unresolvedForSource(sourceMessageId: string): ReadonlyArray<ToolOperationRecord$1>;
|
|
980
|
-
}
|
|
981
|
-
interface ToolOperationLedgerOptions {
|
|
982
|
-
readonly initial?: ReadonlyArray<ToolOperationRecord$1>;
|
|
983
|
-
readonly persist?: (record: ToolOperationRecord$1) => Effect.Effect<void, unknown>;
|
|
984
|
-
}
|
|
985
|
-
declare class ToolOperationLedgerError extends Error {
|
|
986
|
-
readonly name = "ToolOperationLedgerError";
|
|
987
|
-
}
|
|
988
|
-
declare function createToolOperationLedger$1(options?: ToolOperationLedgerOptions): ToolOperationLedger$1;
|
|
989
|
-
//#endregion
|
|
990
|
-
//#region src/core/application/tool-execution/brokerage/tool-broker.d.ts
|
|
991
|
-
interface ToolBrokerOptions {
|
|
992
|
-
readonly approvals: ToolApprovalService;
|
|
993
|
-
readonly catalog: ToolCatalog;
|
|
994
|
-
readonly digest: ToolInputDigest;
|
|
995
|
-
readonly hostTools?: ReadonlyArray<ToolDescriptor>;
|
|
996
|
-
readonly operations?: ToolOperationLedger$1;
|
|
997
|
-
readonly policy: AuthorizationPolicyProvider;
|
|
998
|
-
}
|
|
999
|
-
interface ToolBroker {
|
|
1000
|
-
execute(request: ToolExecutionRequest): Effect.Effect<unknown, unknown>;
|
|
1001
|
-
}
|
|
1002
|
-
declare class ToolInvocationDenied extends Error {
|
|
1003
|
-
readonly name = "ToolInvocationDenied";
|
|
1004
|
-
}
|
|
1005
|
-
declare function createToolBroker(options: ToolBrokerOptions): ToolBroker;
|
|
1006
|
-
//#endregion
|
|
1007
|
-
//#region src/adapters/outbound/persistence/tool-operation/tool-operation-snapshot-codec.d.ts
|
|
1008
|
-
declare const TOOL_OPERATION_JSONL_VERSION = 1;
|
|
1009
|
-
declare function encodeToolOperationSnapshot(record: ToolOperationRecord$1): string;
|
|
1010
|
-
declare function decodeToolOperationSnapshots(raw: string): ReadonlyArray<ToolOperationRecord$1>;
|
|
1011
|
-
//#endregion
|
|
1012
566
|
//#region src/adapters/outbound/persistence/tool-operation/jsonl-tool-operation-ledger.d.ts
|
|
1013
|
-
declare function openJsonlToolOperationLedger(options: {
|
|
567
|
+
export declare function openJsonlToolOperationLedger(options: {
|
|
1014
568
|
readonly filePath: string;
|
|
1015
|
-
}): Effect.Effect<ToolOperationLedger
|
|
569
|
+
}): Effect.Effect<ToolOperationLedger, unknown>;
|
|
1016
570
|
//#endregion
|
|
1017
571
|
//#region src/adapters/outbound/persistence/agent-run/event-log/jsonl-agent-event-log.d.ts
|
|
1018
572
|
type AgentEventLogOperation = "append" | "read";
|
|
@@ -1030,277 +584,7 @@ interface AgentEventLog extends AgentDomainEventSink {
|
|
|
1030
584
|
interface JsonlAgentEventLogOptions {
|
|
1031
585
|
readonly filePath: string;
|
|
1032
586
|
}
|
|
1033
|
-
declare function createJsonlAgentEventLog(options: JsonlAgentEventLogOptions): AgentEventLog;
|
|
1034
|
-
//#endregion
|
|
1035
|
-
//#region src/testing/fakes.d.ts
|
|
1036
|
-
declare function createFixedClock(now: Date): AgentClock;
|
|
1037
|
-
declare function createTestClock(initial: Date): AgentClock & {
|
|
1038
|
-
advance(ms: number): void;
|
|
1039
|
-
};
|
|
1040
|
-
declare function createSequenceRunIds(runIds: ReadonlyArray<AgentRunId>): RunIdGenerator;
|
|
1041
|
-
//#endregion
|
|
1042
|
-
//#region src/adapters/compatibility/agent-execution/loop/agent-loop-prompt-transformer.d.ts
|
|
1043
|
-
declare function createAgentLoopPromptTransformer(options: {
|
|
1044
|
-
readonly loop: AgentLoop$1;
|
|
1045
|
-
readonly transform: (input: AgentLoopInput$1) => Promise<string> | string;
|
|
1046
|
-
}): AgentLoop$1;
|
|
1047
|
-
//#endregion
|
|
1048
|
-
//#region src/adapters/compatibility/agent-execution/runtime/agent-harness.d.ts
|
|
1049
|
-
interface AgentHarnessOptions$1 {
|
|
1050
|
-
readonly loop: AgentLoop$1;
|
|
1051
|
-
readonly runIds: RunIdGenerator;
|
|
1052
|
-
readonly clock: AgentClock;
|
|
1053
|
-
readonly runTimeoutMs?: number;
|
|
1054
|
-
readonly initialRunStates?: ReadonlyArray<AgentRunState>;
|
|
1055
|
-
readonly initialEvents?: ReadonlyArray<AgentDomainEvent>;
|
|
1056
|
-
readonly eventSinks?: ReadonlyArray<AgentDomainEventSink>;
|
|
1057
|
-
}
|
|
1058
|
-
declare function createAgentHarness$1(options: AgentHarnessOptions$1): AgentHarness;
|
|
1059
|
-
//#endregion
|
|
1060
|
-
//#region src/adapters/compatibility/agent-execution/runtime/agent-callback-adapters.d.ts
|
|
1061
|
-
type AgentDomainEventCallback = (event: AgentDomainEvent) => void | Promise<void>;
|
|
1062
|
-
type AgentDomainEventSinkCallback = AgentDomainEventCallback;
|
|
1063
|
-
type AgentRunUpdateCallback = (update: AgentRunUpdate) => void | Promise<void>;
|
|
1064
|
-
declare function createAgentDomainEventSinkFromCallback(append: AgentDomainEventSinkCallback): AgentDomainEventSink;
|
|
1065
|
-
declare function createAgentDomainEventHandler(handle: AgentDomainEventCallback): AgentDomainEventHandler;
|
|
1066
|
-
declare function createAgentRunUpdateHandler(handle: AgentRunUpdateCallback): AgentRunUpdateHandler;
|
|
1067
|
-
//#endregion
|
|
1068
|
-
//#region src/adapters/compatibility/agent-execution/runtime/agent-harness-client.d.ts
|
|
1069
|
-
interface AgentRunLookupClient {
|
|
1070
|
-
getRunSummary(runId: AgentRunId): AgentRunSummary | undefined;
|
|
1071
|
-
getRunUpdates(runId: AgentRunId): ReadonlyArray<AgentRunUpdate> | undefined;
|
|
1072
|
-
getRunEvents(runId: AgentRunId): ReadonlyArray<AgentDomainEvent> | undefined;
|
|
1073
|
-
getRunState(runId: AgentRunId): AgentRunState | undefined;
|
|
1074
|
-
getRunSnapshot(runId: AgentRunId): AgentRunSnapshot | undefined;
|
|
1075
|
-
}
|
|
1076
|
-
interface AgentHarnessClient extends AgentRunLookupClient {
|
|
1077
|
-
readonly harness: AgentHarness;
|
|
1078
|
-
cancelActiveRun(reason?: string): Promise<boolean>;
|
|
1079
|
-
cancelRun(runId: AgentRunId, reason?: string): Promise<boolean>;
|
|
1080
|
-
forSession(sessionKey: SessionKey): AgentSessionClient;
|
|
1081
|
-
getSessionHistory(sessionKey: SessionKey): AgentHistory;
|
|
1082
|
-
getSessionTranscript(sessionKey: SessionKey): AgentTranscript;
|
|
1083
|
-
getSessionSnapshot(sessionKey: SessionKey): AgentSessionSnapshot;
|
|
1084
|
-
getSessionSummary(sessionKey: SessionKey): AgentSessionSummary | undefined;
|
|
1085
|
-
getSessionState(sessionKey: SessionKey): AgentRunState | undefined;
|
|
1086
|
-
getSessionRuns(sessionKey: SessionKey): ReadonlyArray<AgentRunSummary>;
|
|
1087
|
-
getSessionLatestRunSummary(sessionKey: SessionKey): AgentRunSummary | undefined;
|
|
1088
|
-
getSessionLatestRunSnapshot(sessionKey: SessionKey): AgentRunSnapshot | undefined;
|
|
1089
|
-
getActiveRun(): ActiveAgentRun | undefined;
|
|
1090
|
-
getActiveRunId(): AgentRunId | undefined;
|
|
1091
|
-
getActiveRunState(): AgentRunState | undefined;
|
|
1092
|
-
getAvailability(): AgentHarnessAvailability;
|
|
1093
|
-
getHistory(): AgentHistory;
|
|
1094
|
-
getState(): AgentRunState;
|
|
1095
|
-
prompt(command: PromptCommand): Promise<AgentPromptResult>;
|
|
1096
|
-
promptRunSnapshot(command: PromptCommand): Promise<AgentRunSnapshot>;
|
|
1097
|
-
promptSnapshot(command: PromptCommand): Promise<AgentSessionSnapshot>;
|
|
1098
|
-
promptText(command: PromptCommand): Promise<string>;
|
|
1099
|
-
promptTurn(command: PromptCommand): Promise<AgentTranscriptTurn>;
|
|
1100
|
-
promptWithEvents(command: PromptCommand, onEvent: AgentDomainEventCallback): Promise<AgentPromptResult>;
|
|
1101
|
-
promptWithText(command: PromptCommand, onTextDelta: AgentTextDeltaCallback): Promise<AgentPromptResult>;
|
|
1102
|
-
promptWithUpdates(command: PromptCommand, onUpdate: AgentRunUpdateCallback): Promise<AgentPromptResult>;
|
|
1103
|
-
stream(command: PromptCommand): AsyncIterable<AgentDomainEvent>;
|
|
1104
|
-
streamText(command: PromptCommand): AsyncIterable<string>;
|
|
1105
|
-
streamUpdates(command: PromptCommand): AsyncIterable<AgentRunUpdate>;
|
|
1106
|
-
subscribe(listener: AgentDomainEventListener): () => void;
|
|
1107
|
-
subscribeRun(runId: AgentRunId, listener: AgentDomainEventListener): () => void;
|
|
1108
|
-
subscribeRunUpdates(runId: AgentRunId, listener: AgentRunUpdateListener): () => void;
|
|
1109
|
-
subscribeUpdates(listener: AgentRunUpdateListener): () => void;
|
|
1110
|
-
tryPrompt(command: PromptCommand): Promise<AgentClientAttempt<AgentPromptResult, unknown>>;
|
|
1111
|
-
tryPromptText(command: PromptCommand): Promise<AgentClientAttempt<string, unknown>>;
|
|
1112
|
-
}
|
|
1113
|
-
interface AgentSessionClient extends AgentRunLookupClient {
|
|
1114
|
-
readonly handle: AgentSessionHandle;
|
|
1115
|
-
readonly sessionKey: SessionKey;
|
|
1116
|
-
cancelActiveRun(reason?: string): Promise<boolean>;
|
|
1117
|
-
cancelRun(runId: AgentRunId, reason?: string): Promise<boolean>;
|
|
1118
|
-
getSnapshot(): AgentSessionSnapshot;
|
|
1119
|
-
getState(): AgentRunState | undefined;
|
|
1120
|
-
getSummary(): AgentSessionSummary | undefined;
|
|
1121
|
-
getTranscript(): AgentTranscript;
|
|
1122
|
-
getRuns(): ReadonlyArray<AgentRunSummary>;
|
|
1123
|
-
getLatestRunSnapshot(): AgentRunSnapshot | undefined;
|
|
1124
|
-
getLatestRunSummary(): AgentRunSummary | undefined;
|
|
1125
|
-
getActiveRun(): ActiveAgentRun | undefined;
|
|
1126
|
-
getActiveRunState(): AgentRunState | undefined;
|
|
1127
|
-
getAvailability(): AgentSessionAvailability;
|
|
1128
|
-
getHistory(): AgentHistory;
|
|
1129
|
-
prompt(text: string): Promise<AgentPromptResult>;
|
|
1130
|
-
promptRunSnapshot(text: string): Promise<AgentRunSnapshot>;
|
|
1131
|
-
promptSnapshot(text: string): Promise<AgentSessionSnapshot>;
|
|
1132
|
-
promptText(text: string): Promise<string>;
|
|
1133
|
-
promptTurn(text: string): Promise<AgentTranscriptTurn>;
|
|
1134
|
-
promptWithEvents(text: string, onEvent: AgentDomainEventCallback): Promise<AgentPromptResult>;
|
|
1135
|
-
promptWithText(text: string, onTextDelta: AgentTextDeltaCallback): Promise<AgentPromptResult>;
|
|
1136
|
-
promptWithUpdates(text: string, onUpdate: AgentRunUpdateCallback): Promise<AgentPromptResult>;
|
|
1137
|
-
stream(text: string): AsyncIterable<AgentDomainEvent>;
|
|
1138
|
-
streamText(text: string): AsyncIterable<string>;
|
|
1139
|
-
streamUpdates(text: string): AsyncIterable<AgentRunUpdate>;
|
|
1140
|
-
subscribe(listener: AgentDomainEventListener): () => void;
|
|
1141
|
-
subscribeRun(runId: AgentRunId, listener: AgentDomainEventListener): () => void;
|
|
1142
|
-
subscribeRunUpdates(runId: AgentRunId, listener: AgentRunUpdateListener): () => void;
|
|
1143
|
-
subscribeUpdates(listener: AgentRunUpdateListener): () => void;
|
|
1144
|
-
tryPrompt(text: string): Promise<AgentClientAttempt<AgentPromptResult, unknown>>;
|
|
1145
|
-
tryPromptText(text: string): Promise<AgentClientAttempt<string, unknown>>;
|
|
1146
|
-
}
|
|
1147
|
-
type AgentTextDeltaCallback = (delta: string) => void | Promise<void>;
|
|
1148
|
-
type AgentClientAttempt<T, E = unknown> = AgentClientSuccess<T> | AgentClientFailure<E>;
|
|
1149
|
-
interface AgentClientSuccess<T> {
|
|
1150
|
-
readonly ok: true;
|
|
1151
|
-
readonly value: T;
|
|
1152
|
-
}
|
|
1153
|
-
interface AgentClientFailure<E = unknown> {
|
|
1154
|
-
readonly ok: false;
|
|
1155
|
-
readonly error: E;
|
|
1156
|
-
}
|
|
1157
|
-
declare function createAgentHarnessClient(harness: AgentHarness): AgentHarnessClient;
|
|
1158
|
-
//#endregion
|
|
1159
|
-
//#region src/adapters/compatibility/agent-execution/runtime/agent-runtime-primitives.d.ts
|
|
1160
|
-
type DefaultAgentHarnessOptions = Omit<AgentHarnessOptions$1, "clock" | "runIds"> & {
|
|
1161
|
-
readonly clock?: AgentClock;
|
|
1162
|
-
readonly runIds?: RunIdGenerator;
|
|
1163
|
-
};
|
|
1164
|
-
type DefaultAgentHarnessFromCallbackOptions = Omit<DefaultAgentHarnessOptions, "loop">;
|
|
1165
|
-
type DefaultAgentHarnessFromTextCallbackOptions = DefaultAgentHarnessFromCallbackOptions;
|
|
1166
|
-
type DefaultAgentHarnessClientOptions = DefaultAgentHarnessOptions;
|
|
1167
|
-
type DefaultAgentHarnessClientFromCallbackOptions = DefaultAgentHarnessFromCallbackOptions;
|
|
1168
|
-
type DefaultAgentHarnessClientFromTextCallbackOptions = DefaultAgentHarnessFromTextCallbackOptions;
|
|
1169
|
-
interface DefaultAgentRuntimeSessionOptions {
|
|
1170
|
-
readonly mainSessionKey?: SessionKey;
|
|
1171
|
-
}
|
|
1172
|
-
interface AgentRuntime {
|
|
1173
|
-
readonly client: AgentHarnessClient;
|
|
1174
|
-
readonly harness: AgentHarness;
|
|
1175
|
-
readonly mainClient: AgentSessionClient;
|
|
1176
|
-
readonly mainSession: AgentSessionHandle;
|
|
1177
|
-
readonly mainSessionKey: SessionKey;
|
|
1178
|
-
forSession(sessionKey: SessionKey): AgentSessionHandle;
|
|
1179
|
-
forSessionClient(sessionKey: SessionKey): AgentSessionClient;
|
|
1180
|
-
prompt(text: string): Promise<AgentPromptResult>;
|
|
1181
|
-
promptText(text: string): Promise<string>;
|
|
1182
|
-
promptTurn(text: string): Promise<AgentTranscriptTurn>;
|
|
1183
|
-
tryPrompt(text: string): Promise<AgentClientAttempt<AgentPromptResult, unknown>>;
|
|
1184
|
-
tryPromptText(text: string): Promise<AgentClientAttempt<string, unknown>>;
|
|
1185
|
-
}
|
|
1186
|
-
type DefaultAgentRuntimeOptions = DefaultAgentHarnessOptions;
|
|
1187
|
-
type DefaultAgentRuntimeFromCallbackOptions = DefaultAgentHarnessFromCallbackOptions;
|
|
1188
|
-
type DefaultAgentRuntimeFromTextCallbackOptions = DefaultAgentHarnessFromTextCallbackOptions;
|
|
1189
|
-
declare function createDefaultAgentHarness(options: DefaultAgentHarnessOptions): AgentHarness;
|
|
1190
|
-
declare function createDefaultAgentHarnessFromCallback(run: AgentLoopCallback, options?: DefaultAgentHarnessFromCallbackOptions): AgentHarness;
|
|
1191
|
-
declare function createDefaultAgentHarnessFromTextCallback(generate: TextAgentLoopCallback, options?: DefaultAgentHarnessFromTextCallbackOptions): AgentHarness;
|
|
1192
|
-
declare function createDefaultAgentHarnessClient(options: DefaultAgentHarnessClientOptions): AgentHarnessClient;
|
|
1193
|
-
declare function createDefaultAgentHarnessClientFromCallback(run: AgentLoopCallback, options?: DefaultAgentHarnessClientFromCallbackOptions): AgentHarnessClient;
|
|
1194
|
-
declare function createDefaultAgentHarnessClientFromTextCallback(generate: TextAgentLoopCallback, options?: DefaultAgentHarnessClientFromTextCallbackOptions): AgentHarnessClient;
|
|
1195
|
-
declare function createDefaultAgentRuntime(options: DefaultAgentRuntimeOptions, runtimeOptions?: DefaultAgentRuntimeSessionOptions): AgentRuntime;
|
|
1196
|
-
declare function createDefaultAgentRuntimeFromCallback(run: AgentLoopCallback, options?: DefaultAgentRuntimeFromCallbackOptions, runtimeOptions?: DefaultAgentRuntimeSessionOptions): AgentRuntime;
|
|
1197
|
-
declare function createDefaultAgentRuntimeFromTextCallback(generate: TextAgentLoopCallback, options?: DefaultAgentRuntimeFromTextCallbackOptions, runtimeOptions?: DefaultAgentRuntimeSessionOptions): AgentRuntime;
|
|
1198
|
-
declare function createSystemClock(): AgentClock;
|
|
1199
|
-
declare function createUuidRunIds(): RunIdGenerator;
|
|
1200
|
-
declare function createAgentRuntime(harness: AgentHarness, options?: DefaultAgentRuntimeSessionOptions): AgentRuntime;
|
|
1201
|
-
//#endregion
|
|
1202
|
-
//#region src/adapters/compatibility/memory/public-contract.d.ts
|
|
1203
|
-
/** Legacy Promise API record shape; keep this as an interface for consumer augmentation. */
|
|
1204
|
-
interface MemoryRecord {
|
|
1205
|
-
readonly content: string;
|
|
1206
|
-
readonly conversationSafe: boolean;
|
|
1207
|
-
readonly id: string;
|
|
1208
|
-
readonly revision: number;
|
|
1209
|
-
readonly scope: MemoryScope;
|
|
1210
|
-
readonly state: MemoryState;
|
|
1211
|
-
readonly tombstoneReason?: string;
|
|
1212
|
-
}
|
|
1213
|
-
/** Legacy Promise API snapshot shape; keep this as an interface for consumer augmentation. */
|
|
1214
|
-
interface AgentMemorySnapshot$1 {
|
|
1215
|
-
readonly binding: MemoryBinding;
|
|
1216
|
-
readonly record: MemoryRecord;
|
|
1217
|
-
}
|
|
1218
|
-
/** Promise-based Memory access exposed by the legacy host-tool boundary. */
|
|
1219
|
-
interface AgentMemoryHandle$1 extends MemoryHandleContract<MemoryRecord> {}
|
|
1220
|
-
/** Consumer-owned Memory service port used by the legacy Promise API. */
|
|
1221
|
-
interface AgentMemoryService$1 {
|
|
1222
|
-
bind(binding: MemoryBinding): AgentMemoryHandle$1;
|
|
1223
|
-
}
|
|
1224
|
-
declare function createMemoryNamespace(binding: MemoryBinding): string;
|
|
1225
|
-
declare function restrictMemoryScopesForAudience(scopes: ReadonlyArray<MemoryScope>, audience: MemoryInvocationAudience): ReadonlyArray<MemoryScope>;
|
|
1226
|
-
//#endregion
|
|
1227
|
-
//#region src/adapters/compatibility/memory/project-memory-prompt-preparer.d.ts
|
|
1228
|
-
interface LegacyProjectMemoryRecallOptions {
|
|
1229
|
-
readonly agentId: string;
|
|
1230
|
-
readonly memory: AgentMemoryService$1;
|
|
1231
|
-
readonly projectId: string;
|
|
1232
|
-
readonly maxBytes?: number;
|
|
1233
|
-
readonly maxRecords?: number;
|
|
1234
|
-
readonly identity?: LegacyProjectMemoryRecallIdentity;
|
|
1235
|
-
}
|
|
1236
|
-
interface LegacyProjectMemoryRecallIdentity {
|
|
1237
|
-
readonly subjectId: string;
|
|
1238
|
-
readonly tenantId: string;
|
|
1239
|
-
}
|
|
1240
|
-
interface LegacyProjectMemoryPromptInput {
|
|
1241
|
-
readonly invocation?: AgentInvocationOrigin;
|
|
1242
|
-
readonly text: string;
|
|
1243
|
-
}
|
|
1244
|
-
declare function createLegacyProjectMemoryPromptPreparer(options: LegacyProjectMemoryRecallOptions): (input: LegacyProjectMemoryPromptInput) => Promise<string>;
|
|
1245
|
-
//#endregion
|
|
1246
|
-
//#region src/adapters/compatibility/memory/rivus-memory-tool.d.ts
|
|
1247
|
-
interface LegacyRivusMemoryTool extends MemoryToolContract<MemoryRecord> {}
|
|
1248
|
-
declare function createLegacyRivusMemoryTool(memory: AgentMemoryHandle$1 | ReadonlyArray<AgentMemoryHandle$1>): LegacyRivusMemoryTool;
|
|
1249
|
-
declare function createLegacyRivusMemoryToolDescriptor(options: {
|
|
1250
|
-
readonly memory: AgentMemoryService$1;
|
|
1251
|
-
}): RivusHostToolDescriptor;
|
|
1252
|
-
//#endregion
|
|
1253
|
-
//#region src/adapters/compatibility/memory/compaction/compaction-service.d.ts
|
|
1254
|
-
interface CompactorPort$1 {
|
|
1255
|
-
compact(input: CompactionInput): Promise<string>;
|
|
1256
|
-
}
|
|
1257
|
-
interface CompactionService$1 {
|
|
1258
|
-
createCandidate(input: CompactionInput): Promise<CompactionSnapshot>;
|
|
1259
|
-
commit(candidateId: string): CompactionSnapshot;
|
|
1260
|
-
current(instanceId: string, conversationId: string): CompactionSnapshot | undefined;
|
|
1261
|
-
}
|
|
1262
|
-
declare function createCompactionService(options: {
|
|
1263
|
-
readonly compactor: CompactorPort$1;
|
|
1264
|
-
}): CompactionService$1;
|
|
1265
|
-
//#endregion
|
|
1266
|
-
//#region src/adapters/compatibility/tool-execution/public-contract.d.ts
|
|
1267
|
-
interface InvocationAuthorityRef$1 extends InvocationAuthorityRef {}
|
|
1268
|
-
interface InvocationAuthority$1 extends Omit<InvocationAuthority, "memory" | "toolGrantSet"> {
|
|
1269
|
-
readonly memory?: RivusMemoryAuthority;
|
|
1270
|
-
readonly toolGrantSet: RivusToolGrantSet;
|
|
1271
|
-
}
|
|
1272
|
-
declare function createInvocationAuthority$1(authority: InvocationAuthority$1): InvocationAuthorityRef$1;
|
|
1273
|
-
declare function createToolInputDigest(input: unknown): string;
|
|
1274
|
-
declare function requiresToolApproval(risk: RivusToolRisk): boolean;
|
|
1275
|
-
//#endregion
|
|
1276
|
-
//#region src/adapters/compatibility/tool-execution/tool-operation-ledger.d.ts
|
|
1277
|
-
interface ToolOperationBinding extends ToolOperationBinding$1 {}
|
|
1278
|
-
type ToolOperationState = ToolOperationState$1;
|
|
1279
|
-
interface ToolOperationReconciliation extends ToolOperationReconciliation$1 {}
|
|
1280
|
-
interface ToolOperationRecord extends ToolOperationRecord$1 {}
|
|
1281
|
-
type ToolOperationReconciliationOutcome = ToolOperationReconciliationOutcome$1;
|
|
1282
|
-
type ToolOperationBeginResult = ToolOperationBeginResult$1;
|
|
1283
|
-
type ToolOperationInspectResult = ToolOperationInspectResult$1;
|
|
1284
|
-
interface ToolOperationLedger {
|
|
1285
|
-
abort(operationId: string, binding: ToolOperationBinding): Promise<void>;
|
|
1286
|
-
begin(operationId: string, binding: ToolOperationBinding): Promise<ToolOperationBeginResult>;
|
|
1287
|
-
complete(operationId: string, binding: ToolOperationBinding, result: unknown): Promise<void>;
|
|
1288
|
-
inspect(operationId: string, binding: ToolOperationBinding): Promise<ToolOperationInspectResult>;
|
|
1289
|
-
reconciliationRequired(): ReadonlyArray<ToolOperationRecord>;
|
|
1290
|
-
reconcile(input: {
|
|
1291
|
-
readonly action: RecoveryAction;
|
|
1292
|
-
readonly expectedRevision: number;
|
|
1293
|
-
readonly operationId: string;
|
|
1294
|
-
readonly outcome: ToolOperationReconciliationOutcome;
|
|
1295
|
-
}): Promise<ToolOperationRecord>;
|
|
1296
|
-
requireReconciliation(operationId: string, binding: ToolOperationBinding, reason: string): Promise<void>;
|
|
1297
|
-
unresolvedForSource(sourceMessageId: string): ReadonlyArray<ToolOperationRecord>;
|
|
1298
|
-
}
|
|
1299
|
-
declare function createToolOperationLedger(options?: {
|
|
1300
|
-
readonly initial?: ReadonlyArray<ToolOperationRecord>;
|
|
1301
|
-
readonly persist?: (record: ToolOperationRecord) => Promise<void>;
|
|
1302
|
-
}): ToolOperationLedger;
|
|
1303
|
-
declare function adaptEffectToolOperationLedger(ledger: ToolOperationLedger$1): ToolOperationLedger;
|
|
1304
|
-
declare function toEffectToolOperationLedger(ledger: ToolOperationLedger): ToolOperationLedger$1;
|
|
587
|
+
export declare function createJsonlAgentEventLog(options: JsonlAgentEventLogOptions): AgentEventLog;
|
|
1305
588
|
//#endregion
|
|
1306
|
-
export { AGENT_MEMORY_JSONL_VERSION, type ActiveAgentRun, type AgentClientAttempt, type AgentClientFailure, type AgentClientSuccess, type AgentClock, AgentContextBudgetExceeded, type AgentContextInput, type AgentContextLayer, type AgentContextLayerKind, type AgentConversationMessagesOptions, type AgentDomainEvent, type AgentDomainEventCallback, type AgentDomainEventHandler, type AgentDomainEventListener, type AgentDomainEventSink, type AgentDomainEventSinkCallback, AgentEventHandlerFailed, type AgentEventLog, type AgentEventLogOperation, AgentEventLogStoreError, AgentEventSinkFailed, type AgentExecutionControlPort, type AgentExecutionQueryStore, type AgentExecutionQueryStoreOptions, type AgentHarness, type AgentHarnessAvailability, AgentHarnessBusy, type AgentHarnessBusyAvailability, type AgentHarnessClient, type AgentHarnessError, type AgentHarnessIdleAvailability, type AgentHarnessOptions, type AgentHistory, type AgentHistoryEventLog, type AgentInvocationOrigin, type AgentLoop, type AgentLoopEvent, type AgentLoopEventLike, AgentLoopFailed, type AgentLoopInput, type AgentLoopModelExecutionEnd, type AgentLoopModelExecutionEndOptions, type AgentLoopModelExecutionStart, type AgentLoopModelExecutionStartOptions, type AgentLoopSkillExecutionEnd, type AgentLoopSkillExecutionEndOptions, type AgentLoopSkillExecutionStart, type AgentLoopSkillExecutionStartOptions, type AgentLoopTextDelta, type AgentLoopThinkingDelta, type AgentLoopToolExecutionEnd, type AgentLoopToolExecutionEndOptions, type AgentLoopToolExecutionStart, type AgentLoopToolExecutionStartOptions, type AgentLoopToolExecutionUpdate, type AgentLoopToolExecutionUpdateOptions, type AgentLoopTurnStart, type AgentMemoryAuthority, type AgentMemoryAuthority as LegacyAgentMemoryAuthority, AgentMemoryError, type AgentMemoryHandle, type AgentMemoryIdentity, type AgentMemoryIdentity as LegacyAgentMemoryIdentity, type AgentMemoryInvocationIdentity, type AgentMemoryRecord, type AgentMemoryRepository, AgentMemoryRepositoryConflict, type AgentMemoryRepositoryRecord, type AgentMemoryService, type AgentMemorySnapshot, type AgentModelContentObserver, type AgentModelExecutionEnded, type AgentModelExecutionEvent, type AgentModelExecutionStarted, type AgentModelInputObservation, type AgentModelOutputObservation, type AgentModelUsage, type AgentPromptExecutor, type AgentPromptResult, type AgentRunAccepted, AgentRunCancelled, type AgentRunCancelled as AgentRunCancelledEvent, type AgentRunCompleted, type AgentRunFailed, type AgentRunId, type AgentRunPhase, type AgentRunSnapshot, type AgentRunState, type AgentRunStreams, type AgentRunSummary, type AgentRunUpdate, type AgentRunUpdateCallback, type AgentRunUpdateHandler, type AgentRunUpdateListener, type AgentRuntime, type AgentSessionAvailability, type AgentSessionBusyAvailability, type AgentSessionClient, type AgentSessionHandle, type AgentSessionHistoryView, type AgentSessionOtherBusyAvailability, type AgentSessionOwnedBusyAvailability, type AgentSessionSnapshot, type AgentSessionSummary, type AgentSkillExecutionEnded, type AgentSkillExecutionStarted, type AgentSkillExecutionState, type AgentSteeringChannel, type AgentTextDeltaCallback, type AgentToolExecutionEnded, type AgentToolExecutionEvent, type AgentToolExecutionStarted, type AgentToolExecutionState, type AgentToolExecutionUpdated, type AgentTranscript, type AgentTranscriptMessage, type AgentTranscriptMessageRole, type AgentTranscriptTurn, type AgentTurnCompleted, type AgentTurnStarted, type AssembledAgentContext, type AssistantTextDelta, type AssistantThinkingDelta, type AuthorizationPolicyProvider, type AuthorizationPolicyState, type AutomationAgentInvocationOrigin, type BackgroundSessionAgentInvocationOrigin, CompactionError, CompactionError as LegacyCompactionError, type CompactionInput, type CompactionInput as LegacyCompactionInput, type CompactionService, type CompactionSnapshot, type CompactionSnapshot as LegacyCompactionSnapshot, type CompactorPort, type DefaultAgentHarnessClientFromCallbackOptions, type DefaultAgentHarnessClientFromTextCallbackOptions, type DefaultAgentHarnessClientOptions, type DefaultAgentHarnessFromCallbackOptions, type DefaultAgentHarnessFromTextCallbackOptions, type DefaultAgentHarnessOptions, type DefaultAgentRuntimeFromCallbackOptions, type DefaultAgentRuntimeFromTextCallbackOptions, type DefaultAgentRuntimeOptions, type DefaultAgentRuntimeSessionOptions, type EventAgentLoopOptions, type FeishuAgentInvocationOrigin, InvalidInvocationAuthority, InvalidInvocationAuthority as LegacyInvalidInvocationAuthority, InvalidRecoveryAction, InvalidStableJson, InvalidStableJson as LegacyInvalidStableJson, InvalidToolInput, InvalidToolInput as LegacyInvalidToolInput, InvalidWorkspaceRoot, type InvocationAuthority, type InvocationAuthorityIdentity, type InvocationAuthorityRef, type InvocationMemoryAuthority, type InvocationMemoryScope, type InvocationToolGrantSet, type JsonlAgentEventLogOptions, type LangfuseAgentTelemetry, type LangfuseTelemetryConfig, LangfuseTelemetryConfigError, type LangfuseTelemetryContentMode, type LangfuseTelemetryEnv, type AgentHarnessOptions$1 as LegacyAgentHarnessOptions, type AgentLoop$1 as LegacyAgentLoop, type AgentLoopCallback as LegacyAgentLoopCallback, type AgentLoopCallbackOutput as LegacyAgentLoopCallbackOutput, type AgentLoopCallbackResult as LegacyAgentLoopCallbackResult, type AgentLoopInput$1 as LegacyAgentLoopInput, type AgentMemoryHandle$1 as LegacyAgentMemoryHandle, type AgentMemoryService$1 as LegacyAgentMemoryService, type AgentMemorySnapshot$1 as LegacyAgentMemorySnapshot, type AgentSteeringChannel$1 as LegacyAgentSteeringChannel, type AsyncIterableAgentLoopOptions as LegacyAsyncIterableAgentLoopOptions, type CompactionService$1 as LegacyCompactionService, type CompactorPort$1 as LegacyCompactorPort, type EventAgentLoopOptions$1 as LegacyEventAgentLoopOptions, type InvocationAuthority$1 as LegacyInvocationAuthority, type InvocationAuthorityRef$1 as LegacyInvocationAuthorityRef, type MemoryBinding as LegacyMemoryBinding, type MemoryBinding, type MemoryInvocationAudience as LegacyMemoryInvocationAudience, type MemoryInvocationAudience, type MemoryRecord as LegacyMemoryRecord, type MemoryScope as LegacyMemoryScope, type MemoryScope, type MemorySearchQuery as LegacyMemorySearchQuery, type MemorySearchQuery, type MemoryState as LegacyMemoryState, type MemoryState, type LegacyProjectMemoryPromptInput, type LegacyProjectMemoryRecallIdentity, type LegacyProjectMemoryRecallOptions, type LegacyRivusMemoryTool, type TextAgentLoopCallback as LegacyTextAgentLoopCallback, type TextAgentLoopOptions as LegacyTextAgentLoopOptions, type ToolOperationBeginResult as LegacyToolOperationBeginResult, type ToolOperationBinding as LegacyToolOperationBinding, type ToolOperationInspectResult as LegacyToolOperationInspectResult, type ToolOperationLedger as LegacyToolOperationLedger, type ToolOperationReconciliation as LegacyToolOperationReconciliation, type ToolOperationReconciliationOutcome as LegacyToolOperationReconciliationOutcome, type ToolOperationRecord as LegacyToolOperationRecord, type ToolOperationState as LegacyToolOperationState, type LocalCliAgentInvocationOrigin, MEMORY_SCOPES, type MemoryHandle, type MemoryIdentity, type MemoryService, type MemoryTombstoneReceipt, type ModelBinding, type ModelChangeActivationResult, ModelChangeBoundaryDeadlineError, type ModelChangeBudgetReservation, type ModelChangeClock, type ModelChangeExecutionBudget, type ModelChangePaidCallKind, type ModelChangeRestoreResult, type ModelChangeRuntimeContext, type ModelChangeRuntimePort, type ModelChangeValidationResult, type ModelReference, type NormalizedAgentInvocation, type OpenTelemetryAgentEventSinkOptions, type OpenTelemetryAgentTelemetry, type PersistedMemoryRecord, type ToolOperation as PersistedToolOperation, type ProjectMemoryPromptInput, type ProjectMemoryRecallIdentity, type ProjectMemoryRecallOptions, type PromptCommand, RIVUS_MEMORY_TOOL_ID, RIVUS_MEMORY_TOOL_PLUGIN_ID, RIVUS_MEMORY_TOOL_VERSION, RIVUS_RUNTIME_TOOL_IDS, type RecoveryAction, type RegisteredRivusSkill, type RegisteredRivusTool, type RivusHostToolDescriptor, type RivusMemoryAuthority, type RivusMemoryScope, type RivusMemoryTool, type RivusResolvedToolDescriptor, type RivusRuntimeToolGrantSet, type RivusRuntimeToolId, type RivusSkillDescriptor, type RivusSkillGrantSet, type RivusToolDescriptor, type RivusToolExecutionContext, type RivusToolExecutionOrigin, type RivusToolExecutor, type RivusToolFactoryContext, type RivusToolGrantSet, type RivusToolGrantSetOperations, type RivusToolIdempotency, RivusToolInputRejected, type RivusToolRisk, type RunAdmission, type RunAdmissionLease, type RunAdmissionOptions, type RunIdGenerator, type SessionKey, type StandardAgentRunResult, TOOL_OPERATION_JSONL_VERSION, type TelemetryContentRedactor, type TelemetryContentRedactorOptions, type TerminalAgentDomainEvent, type TextAgentLoopOptions$1 as TextAgentLoopOptions, type ToolApprovalRequest, type ToolApprovalService, type ToolBroker, type ToolBrokerOptions, type ToolCatalog, type ToolDescriptor, type ToolExecutionContext, type ToolExecutionOrigin, type ToolExecutionRequest, type ToolExecutor, ToolExecutorInputRejected, type ToolIdempotency, type ToolInputDigest, ToolInvocationDenied, type ToolOperationBeginResult$1 as ToolOperationBeginResult, type ToolOperationBinding$1 as ToolOperationBinding, type ToolOperationInspectResult$1 as ToolOperationInspectResult, type ToolOperationLedger$1 as ToolOperationLedger, ToolOperationLedgerError, type ToolOperationLedgerOptions, type ToolOperationReconciliation$1 as ToolOperationReconciliation, type ToolOperationReconciliationAction, type ToolOperationReconciliationOutcome$1 as ToolOperationReconciliationOutcome, type ToolOperationRecord$1 as ToolOperationRecord, type ToolOperationState$1 as ToolOperationState, type ToolRisk, type WorkspaceInstructionSource, type WorkspaceInstructionsDiagnostic, type WorkspaceInstructionsDiagnosticCode, type WorkspaceInstructionsRequest, WorkspaceInstructionsSourceError, type WorkspaceInstructionsSourcePort, type WorkspaceInstructionsSourceRequest, type WorkspaceInstructionsSourceResult, type WorkspaceInstructionsView, type WorkspaceRootHandle, adaptEffectToolOperationLedger as adaptLegacyEffectToolOperationLedger, assembleAgentContext, buildAgentSessionSnapshot, buildRunSnapshot, createAgentConversationMessages, createAgentDomainEventHandler, createAgentDomainEventSink, createAgentDomainEventSinkFromCallback, createAgentExecutionQueryStore, createAgentHarness, createAgentHarnessClient, createAgentLoopModelExecutionEnd, createAgentLoopModelExecutionStart, createAgentLoopSkillExecutionEnd, createAgentLoopSkillExecutionStart, createAgentLoopTextDelta, createAgentLoopThinkingDelta, createAgentLoopToolExecutionEnd, createAgentLoopToolExecutionStart, createAgentLoopToolExecutionUpdate, createAgentLoopTurnStart, createAgentRunStreams, createAgentRunUpdateHandler, createAgentRuntime, createAgentTranscriptMessages, createAgentTranscriptTurn, createAgentsMdInstructionsSource, createDefaultAgentHarness, createDefaultAgentHarnessClient, createDefaultAgentHarnessClientFromCallback, createDefaultAgentHarnessClientFromTextCallback, createDefaultAgentHarnessFromCallback, createDefaultAgentHarnessFromTextCallback, createDefaultAgentRuntime, createDefaultAgentRuntimeFromCallback, createDefaultAgentRuntimeFromTextCallback, createEffectCompactionService, createEventAgentLoop, createFixedClock, createInMemoryAgentMemoryRepository, createInvocationAuthority, createJsonlAgentEventLog, createLangfuseAgentTelemetry, createAgentHarness$1 as createLegacyAgentHarness, createAgentLoopFromCallback as createLegacyAgentLoopFromCallback, createAgentLoopPromptTransformer as createLegacyAgentLoopPromptTransformer, createAsyncIterableAgentLoop as createLegacyAsyncIterableAgentLoop, createCompactionService as createLegacyCompactionService, createEventAgentLoop$1 as createLegacyEventAgentLoop, createInvocationAuthority$1 as createLegacyInvocationAuthority, createMemoryNamespace as createLegacyMemoryNamespace, createLegacyProjectMemoryPromptPreparer, createLegacyRivusMemoryTool, createLegacyRivusMemoryToolDescriptor, createTextAgentLoop as createLegacyTextAgentLoop, createTextAgentLoopFromCallback as createLegacyTextAgentLoopFromCallback, createToolInputDigest as createLegacyToolInputDigest, createToolOperationLedger as createLegacyToolOperationLedger, createMemoryNamespace$1 as createMemoryNamespace, createMemoryService, createOpenTelemetryAgentEventSink, createOpenTelemetryAgentTelemetry, createPersistedMemoryRecord, createProjectMemoryPromptPreparer, createRecoveryAction, createRivusMemoryTool, createRivusMemoryToolContract, createRivusMemoryToolDescriptor, createRunAdmission, createSequenceRunIds, createSystemClock, createTelemetryContentRedactor, createTestClock, createTextAgentLoop$1 as createTextAgentLoop, createToolBroker, createToolInputDigest$1 as createToolInputDigest, createToolOperationLedger$1 as createToolOperationLedger, createUuidRunIds, createWorkspaceInstructionsResolver, createWorkspaceRootHandle, decodeAgentMemorySnapshots, decodeToolOperationSnapshots, describeLoopError, encodeAgentMemorySnapshot, encodeToolOperationSnapshot, evolveAgentRun, fromEffectAgentLoop as fromEffectLegacyAgentLoop, initialAgentRunState, isAgentToolExecutionEvent, isAssistantTextDeltaEvent, isAssistantThinkingDeltaEvent, isRivusRuntimeToolId, isTerminalAgentDomainEvent, isTerminalAgentRunPhase, normalizeAgentInvocation, normalizeAgentLoopEvent, normalizeStableJson as normalizeLegacyStableJson, normalizeStableJson, normalizeMemoryBinding, notifyListeners, notifyUpdateListeners, openJsonlAgentMemoryRepository, openJsonlToolOperationLedger, projectAgentSessionHistory, remainingUntil, replayAgentHistory, replayAgentTranscript, replayRunUpdates, requiresToolApproval as requiresLegacyToolApproval, requiresToolApproval$1 as requiresToolApproval, resolveInvocationAuthority, resolveLangfuseTelemetryConfig, resolveWorkspaceRootPath, restoreAgentHistory, restorePersistedMemoryRecord, restoreToolOperation as restorePersistedToolOperation, restrictMemoryScopesForAudience as restrictLegacyMemoryScopesForAudience, toDomainEvent, toEffectAgentLoop as toEffectLegacyAgentLoop, toEffectAgentLoopInput as toEffectLegacyAgentLoopInput, toEffectToolOperationLedger as toEffectLegacyToolOperationLedger, toCompatibilityAgentLoopInput as toLegacyAgentLoopInput, toRunUpdate };
|
|
589
|
+
export { ATTACHMENT_RECOVERY_COMMAND, type ActiveAgentRun, type AgentClock, type AgentDomainEvent, type AgentDomainEventSink, type AgentEventLog, type AgentExecutionControlPort, type AgentHarness, type AgentHarnessAvailability, type AgentHistory, type AgentInvocationOrigin, type AgentLoop, type AgentLoopInput, type AgentRunId, type AgentRunState, type AgentRunUpdate, type AgentRunUpdateHandler, type AttachmentAccess, type AttachmentAccessBinding, type AuthorizationPolicyState, type InputMessage, type InputNoticePart, type InputPart, type InputRecovery, InvalidInvocationAuthority, type InvocationAuthorityRef, type InvocationToolGrantSet, type MaterializedAttachment, type MemoryScope, type ModelBinding, ModelChangeBoundaryDeadlineError, type ModelChangeClock, type ModelChangePaidCallKind, type ModelChangeRuntimePort, type ModelReference, type NormalizedAgentInvocation, type PromptCommand, RIVUS_RUNTIME_TOOL_IDS, type RecoveryAction, type RegisteredRivusSkill, type RegisteredRivusTool, type RivusHostToolDescriptor, type RivusMemoryScope, type RivusResolvedToolDescriptor, type RivusRuntimeToolGrantSet, type RivusRuntimeToolId, type RivusSkillDescriptor, type RivusSkillGrantSet, type RivusToolDescriptor, type RivusToolExecutionContext, type RivusToolExecutor, type RivusToolFactoryContext, type RivusToolGrantSet, type RivusToolGrantSetOperations, type RivusToolIdempotency, RivusToolInputRejected, type RivusToolRisk, type RunAdmissionLease, type RunIdGenerator, type SessionKey, type StandardAgentRunResult, type TelemetryContentRedactor, type ToolApprovalRequest, type ToolBroker, type ToolBrokerOptions, type ToolDescriptor, type ToolExecutionContext, type ToolExecutionRequest, ToolExecutorInputRejected, type ToolInputDigest, ToolInvocationDenied, type ToolOperationLedger, type ToolOperationRecord, type UserInput, type WorkspaceInstructionsRequest, type WorkspaceInstructionsView, createInvocationAuthority, createToolBroker, createToolInputDigest, isRivusRuntimeToolId, normalizeAgentInvocation, resolveInvocationAuthority };
|
|
590
|
+
export {};
|