@cuylabs/agent-core 0.15.0 → 0.16.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/{chunk-CZ5XOVDV.js → chunk-BMLWNXIP.js} +76 -0
- package/dist/{chunk-FYC33XFI.js → chunk-QVQKQZUN.js} +1 -1
- package/dist/{chunk-JPBFAQNS.js → chunk-Y7SMKIJT.js} +1 -1
- package/dist/dispatch/index.d.ts +2 -2
- package/dist/dispatch/index.js +2 -2
- package/dist/execution/index.d.ts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +23 -34
- package/dist/inference/index.d.ts +3 -3
- package/dist/{instance-N5VhcNT2.d.ts → instance-Ijh9CP-_.d.ts} +21 -3
- package/dist/middleware/index.d.ts +2 -2
- package/dist/{model-messages-DnsiSiZj.d.ts → model-messages-Bt_qyGsO.d.ts} +1 -1
- package/dist/plugin/index.d.ts +1 -1
- package/dist/profiles/index.d.ts +1 -1
- package/dist/prompt/index.d.ts +2 -2
- package/dist/safety/index.d.ts +2 -2
- package/dist/skill/index.d.ts +2 -2
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.js +3 -1
- package/dist/subagents/index.d.ts +1 -1
- package/dist/subagents/index.js +3 -3
- package/dist/team/index.d.ts +2 -2
- package/dist/tool/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -500,6 +500,81 @@ var FileStorage = class {
|
|
|
500
500
|
}
|
|
501
501
|
};
|
|
502
502
|
|
|
503
|
+
// src/storage/lock.ts
|
|
504
|
+
var LocalSessionTurnLock = class {
|
|
505
|
+
locks = /* @__PURE__ */ new Map();
|
|
506
|
+
async acquire(sessionId, options = {}) {
|
|
507
|
+
throwIfAborted(options.signal);
|
|
508
|
+
const previous = this.locks.get(sessionId) ?? Promise.resolve();
|
|
509
|
+
let releaseLock;
|
|
510
|
+
const current = new Promise((resolve) => {
|
|
511
|
+
releaseLock = resolve;
|
|
512
|
+
});
|
|
513
|
+
const chain = previous.catch(() => void 0).then(() => current);
|
|
514
|
+
this.locks.set(sessionId, chain);
|
|
515
|
+
try {
|
|
516
|
+
await waitForLock(previous, options);
|
|
517
|
+
} catch (error) {
|
|
518
|
+
if (this.locks.get(sessionId) === chain) {
|
|
519
|
+
this.locks.delete(sessionId);
|
|
520
|
+
}
|
|
521
|
+
releaseLock();
|
|
522
|
+
throw error;
|
|
523
|
+
}
|
|
524
|
+
let released = false;
|
|
525
|
+
return () => {
|
|
526
|
+
if (released) return;
|
|
527
|
+
released = true;
|
|
528
|
+
releaseLock();
|
|
529
|
+
if (this.locks.get(sessionId) === chain) {
|
|
530
|
+
this.locks.delete(sessionId);
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
clear(sessionId) {
|
|
535
|
+
this.locks.delete(sessionId);
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
async function waitForLock(previous, options) {
|
|
539
|
+
const waiters = [previous.catch(() => void 0)];
|
|
540
|
+
if (options.signal) {
|
|
541
|
+
waiters.push(
|
|
542
|
+
new Promise((_, reject) => {
|
|
543
|
+
const signal = options.signal;
|
|
544
|
+
const onAbort = () => reject(createAbortError());
|
|
545
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
546
|
+
previous.finally(() => signal.removeEventListener("abort", onAbort));
|
|
547
|
+
})
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
if (options.timeoutMs !== void 0) {
|
|
551
|
+
waiters.push(
|
|
552
|
+
new Promise((_, reject) => {
|
|
553
|
+
const timeout = setTimeout(() => {
|
|
554
|
+
reject(
|
|
555
|
+
new Error(
|
|
556
|
+
`Timed out acquiring session turn lock after ${options.timeoutMs}ms`
|
|
557
|
+
)
|
|
558
|
+
);
|
|
559
|
+
}, options.timeoutMs);
|
|
560
|
+
previous.finally(() => clearTimeout(timeout));
|
|
561
|
+
})
|
|
562
|
+
);
|
|
563
|
+
}
|
|
564
|
+
await Promise.race(waiters);
|
|
565
|
+
throwIfAborted(options.signal);
|
|
566
|
+
}
|
|
567
|
+
function throwIfAborted(signal) {
|
|
568
|
+
if (signal?.aborted) {
|
|
569
|
+
throw createAbortError();
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
function createAbortError() {
|
|
573
|
+
const error = new Error("Session turn lock acquisition aborted");
|
|
574
|
+
error.name = "AbortError";
|
|
575
|
+
return error;
|
|
576
|
+
}
|
|
577
|
+
|
|
503
578
|
// src/storage/paths.ts
|
|
504
579
|
import { homedir } from "os";
|
|
505
580
|
import { join as join2 } from "path";
|
|
@@ -809,6 +884,7 @@ export {
|
|
|
809
884
|
buildMessagesFromEntries,
|
|
810
885
|
MemoryStorage,
|
|
811
886
|
FileStorage,
|
|
887
|
+
LocalSessionTurnLock,
|
|
812
888
|
getDataDir,
|
|
813
889
|
getSessionsDir,
|
|
814
890
|
getGitRootHash,
|
package/dist/dispatch/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { br as LocalDispatchRuntimeOptions, aU as DispatchRuntime, T as Tool,
|
|
2
|
-
export { aI as DEFAULT_DISPATCH_TOOL_IDS, aJ as DEFAULT_LOCAL_DISPATCH_CONCURRENCY, aK as DEFAULT_LOCAL_DISPATCH_DEPTH, aL as DEFAULT_LOCAL_DISPATCH_TITLE_PREFIX, aO as DISPATCH_STATES, aP as DispatchCheckOptions, aQ as DispatchListOptions, aS as DispatchResult, aT as DispatchRole, aV as DispatchStartInput, aW as DispatchState, aZ as DispatchTargetStartInput, b0 as DispatchUsage } from '../instance-
|
|
1
|
+
import { br as LocalDispatchRuntimeOptions, aU as DispatchRuntime, T as Tool, d0 as TaskExecutorInput, c$ as TaskExecutor, aR as DispatchRecord, aY as DispatchTargetInspection, aX as DispatchTarget, dh as TeamTask, bx as MemberRuntime, a_ as DispatchTargetStartResult, a$ as DispatchTargetSummary, b7 as ExternalTaskControl } from '../instance-Ijh9CP-_.js';
|
|
2
|
+
export { aI as DEFAULT_DISPATCH_TOOL_IDS, aJ as DEFAULT_LOCAL_DISPATCH_CONCURRENCY, aK as DEFAULT_LOCAL_DISPATCH_DEPTH, aL as DEFAULT_LOCAL_DISPATCH_TITLE_PREFIX, aO as DISPATCH_STATES, aP as DispatchCheckOptions, aQ as DispatchListOptions, aS as DispatchResult, aT as DispatchRole, aV as DispatchStartInput, aW as DispatchState, aZ as DispatchTargetStartInput, b0 as DispatchUsage } from '../instance-Ijh9CP-_.js';
|
|
3
3
|
import '../types-C_LCeYNg.js';
|
|
4
4
|
import 'ai';
|
|
5
5
|
import '../types-RSCv7nQ4.js';
|
package/dist/dispatch/index.js
CHANGED
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
DISPATCH_STATES,
|
|
16
16
|
createDispatchTools,
|
|
17
17
|
createLocalDispatchRuntime
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-Y7SMKIJT.js";
|
|
19
19
|
import "../chunk-SZ2XBPTW.js";
|
|
20
20
|
import "../chunk-Q742PSH3.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-BMLWNXIP.js";
|
|
22
22
|
export {
|
|
23
23
|
DEFAULT_DISPATCH_TOOL_IDS,
|
|
24
24
|
DEFAULT_LOCAL_DISPATCH_CONCURRENCY,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { e as AnyInferenceResult,
|
|
2
|
-
export { Q as AgentTurnActiveToolCall, X as AgentTurnBoundaryMetadata, Y as AgentTurnBoundarySnapshot, Z as AgentTurnCommitApplier, $ as AgentTurnCommitOptions, a0 as AgentTurnEngine, a1 as AgentTurnEngineOptions, a2 as AgentTurnPhase, a3 as AgentTurnResolvedToolCall, a5 as AgentTurnStateAdvanceOptions, a9 as AgentTurnStepRuntimeConfig, aE as CreateAgentTurnStateOptions,
|
|
1
|
+
import { e as AnyInferenceResult, cF as StepProcessingOptions, cG as StepProcessingOutput, a6 as AgentTurnStepCommitSnapshot, aF as CreateAgentTurnStepCommitBatchOptions, _ as AgentTurnCommitBatch, c0 as PrepareModelStepOptions, c1 as PreparedAgentModelStep, cd as RunModelStepOptions, A as AgentEvent, ce as RunToolBatchOptions, cf as RunToolBatchResult, av as CommitOutputOptions, aw as CommitStepOptions, dk as TokenUsage, v as ScopeSnapshot, a4 as AgentTurnState, ds as ToolMetadata, a8 as AgentTurnStepCommitToolResult, a7 as AgentTurnStepCommitToolCall, M as Message, dz as UserMessage, ar as AssistantMessage, dr as ToolMessage, cQ as SystemMessage } from '../instance-Ijh9CP-_.js';
|
|
2
|
+
export { Q as AgentTurnActiveToolCall, X as AgentTurnBoundaryMetadata, Y as AgentTurnBoundarySnapshot, Z as AgentTurnCommitApplier, $ as AgentTurnCommitOptions, a0 as AgentTurnEngine, a1 as AgentTurnEngineOptions, a2 as AgentTurnPhase, a3 as AgentTurnResolvedToolCall, a5 as AgentTurnStateAdvanceOptions, a9 as AgentTurnStepRuntimeConfig, aE as CreateAgentTurnStateOptions, dC as advanceAgentTurnState, dG as createAgentTurnEngine, dH as createAgentTurnState, dO as failAgentTurnState } from '../instance-Ijh9CP-_.js';
|
|
3
3
|
import { L as Logger } from '../types-RSCv7nQ4.js';
|
|
4
|
-
export { c as convertAgentMessagesToModelMessages } from '../model-messages-
|
|
4
|
+
export { c as convertAgentMessagesToModelMessages } from '../model-messages-Bt_qyGsO.js';
|
|
5
5
|
import '../types-C_LCeYNg.js';
|
|
6
6
|
import 'ai';
|
|
7
7
|
import 'zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HumanInputController, p as HumanInputConfig, T as Tool, M as Message, S as SessionManager, E as EffectiveAgentConfig, q as TurnChangeTracker, r as InterventionController, b as MiddlewareRunner, P as PromptBuilder, c as ToolExecutionMode, A as AgentEvent, t as StreamProvider, u as Scope, v as ScopeSnapshot, x as ScopeOptions, F as FileOperationMeta, y as AgentSignal, z as TypedHandler, U as Unsubscribe, W as WildcardHandler } from './instance-
|
|
2
|
-
export { B as Agent, C as AgentConfig, G as AgentDefaults, J as AgentDefaultsContext, K as AgentDefaultsProvider, L as AgentMiddleware, N as AgentModelHooks, O as AgentStatus, Q as AgentTurnActiveToolCall, V as AgentTurnBoundaryKind, X as AgentTurnBoundaryMetadata, Y as AgentTurnBoundarySnapshot, Z as AgentTurnCommitApplier, _ as AgentTurnCommitBatch, $ as AgentTurnCommitOptions, a0 as AgentTurnEngine, a1 as AgentTurnEngineOptions, a2 as AgentTurnPhase, a3 as AgentTurnResolvedToolCall, a4 as AgentTurnState, a5 as AgentTurnStateAdvanceOptions, a6 as AgentTurnStepCommitSnapshot, a7 as AgentTurnStepCommitToolCall, a8 as AgentTurnStepCommitToolResult, a9 as AgentTurnStepRuntimeConfig, e as AnyInferenceResult, aa as AppliedProfile, ab as ApprovalAction, ac as ApprovalAgentMiddleware, ad as ApprovalCascadeMode, ae as ApprovalCascadePolicy, af as ApprovalConfig, ag as ApprovalCorrection, ah as ApprovalDecision, ai as ApprovalEvaluation, aj as ApprovalEvent, ak as ApprovalHandler, al as ApprovalMiddlewareConfig, am as ApprovalRememberScope, an as ApprovalRequest, ao as ApprovalResolution, ap as ApprovalRule, aq as ApprovalRuleContext, ar as AssistantMessage, as as BlockedModelCall, at as BranchEntry, au as ChatLifecycleContext, av as CommitOutputOptions, aw as CommitStepOptions, ax as CompactionConfig, ay as CompactionEntry, az as CompatibleSchema, aA as ConfigChangeEntry, aB as CoordinatorNotification, aC as CoordinatorNotificationKind, aD as CoordinatorRoundEvent, aE as CreateAgentTurnStateOptions, aF as CreateAgentTurnStepCommitBatchOptions, aG as CreateSessionOptions, aH as DEFAULT_AGENT_NAME, aI as DEFAULT_DISPATCH_TOOL_IDS, aJ as DEFAULT_LOCAL_DISPATCH_CONCURRENCY, aK as DEFAULT_LOCAL_DISPATCH_DEPTH, aL as DEFAULT_LOCAL_DISPATCH_TITLE_PREFIX, D as DEFAULT_MAX_OUTPUT_TOKENS, aM as DEFAULT_MAX_STEPS, D as DEFAULT_MAX_TOKENS, f as DEFAULT_RETRY_CONFIG, aN as DEFAULT_SYSTEM_PROMPT, aO as DISPATCH_STATES, aP as DispatchCheckOptions, aQ as DispatchListOptions, aR as DispatchRecord, aS as DispatchResult, aT as DispatchRole, aU as DispatchRuntime, aV as DispatchStartInput, aW as DispatchState, aX as DispatchTarget, aY as DispatchTargetInspection, aZ as DispatchTargetStartInput, a_ as DispatchTargetStartResult, a$ as DispatchTargetSummary, b0 as DispatchUsage, b1 as DoomLoopAction, b2 as DoomLoopHandler, b3 as DoomLoopRequest, b4 as EnhancedTools, b5 as EntryBase, b6 as EnvironmentInfo, b7 as ExternalTaskControl, b8 as FileEntry, b9 as GuidancePayload, ba as HumanInputEventContext, bb as HumanInputOption, bc as HumanInputRequest, bd as HumanInputRequestKind, be as HumanInputRequestListOptions, bf as HumanInputRequestRecord, bg as HumanInputRequestStatus, bh as HumanInputResponse, bi as HumanInputTimeoutError, bj as HumanInputToolArgs, bk as HumanInputUnavailableError, bl as IdleNotificationPayload, bm as InMemoryMailboxStore, bn as InMemoryTaskBoardStore, bo as InferSchemaOutput, g as InferenceCustomResult, h as InferenceStepInfo, I as InferenceStreamInput, i as InferenceStreamResult, bp as InputCheckResult, bq as InstructionFile, br as LocalDispatchRuntimeOptions, bs as
|
|
1
|
+
import { H as HumanInputController, p as HumanInputConfig, T as Tool, M as Message, S as SessionManager, E as EffectiveAgentConfig, q as TurnChangeTracker, r as InterventionController, b as MiddlewareRunner, P as PromptBuilder, c as ToolExecutionMode, A as AgentEvent, t as StreamProvider, u as Scope, v as ScopeSnapshot, x as ScopeOptions, F as FileOperationMeta, y as AgentSignal, z as TypedHandler, U as Unsubscribe, W as WildcardHandler } from './instance-Ijh9CP-_.js';
|
|
2
|
+
export { B as Agent, C as AgentConfig, G as AgentDefaults, J as AgentDefaultsContext, K as AgentDefaultsProvider, L as AgentMiddleware, N as AgentModelHooks, O as AgentStatus, Q as AgentTurnActiveToolCall, V as AgentTurnBoundaryKind, X as AgentTurnBoundaryMetadata, Y as AgentTurnBoundarySnapshot, Z as AgentTurnCommitApplier, _ as AgentTurnCommitBatch, $ as AgentTurnCommitOptions, a0 as AgentTurnEngine, a1 as AgentTurnEngineOptions, a2 as AgentTurnPhase, a3 as AgentTurnResolvedToolCall, a4 as AgentTurnState, a5 as AgentTurnStateAdvanceOptions, a6 as AgentTurnStepCommitSnapshot, a7 as AgentTurnStepCommitToolCall, a8 as AgentTurnStepCommitToolResult, a9 as AgentTurnStepRuntimeConfig, e as AnyInferenceResult, aa as AppliedProfile, ab as ApprovalAction, ac as ApprovalAgentMiddleware, ad as ApprovalCascadeMode, ae as ApprovalCascadePolicy, af as ApprovalConfig, ag as ApprovalCorrection, ah as ApprovalDecision, ai as ApprovalEvaluation, aj as ApprovalEvent, ak as ApprovalHandler, al as ApprovalMiddlewareConfig, am as ApprovalRememberScope, an as ApprovalRequest, ao as ApprovalResolution, ap as ApprovalRule, aq as ApprovalRuleContext, ar as AssistantMessage, as as BlockedModelCall, at as BranchEntry, au as ChatLifecycleContext, av as CommitOutputOptions, aw as CommitStepOptions, ax as CompactionConfig, ay as CompactionEntry, az as CompatibleSchema, aA as ConfigChangeEntry, aB as CoordinatorNotification, aC as CoordinatorNotificationKind, aD as CoordinatorRoundEvent, aE as CreateAgentTurnStateOptions, aF as CreateAgentTurnStepCommitBatchOptions, aG as CreateSessionOptions, aH as DEFAULT_AGENT_NAME, aI as DEFAULT_DISPATCH_TOOL_IDS, aJ as DEFAULT_LOCAL_DISPATCH_CONCURRENCY, aK as DEFAULT_LOCAL_DISPATCH_DEPTH, aL as DEFAULT_LOCAL_DISPATCH_TITLE_PREFIX, D as DEFAULT_MAX_OUTPUT_TOKENS, aM as DEFAULT_MAX_STEPS, D as DEFAULT_MAX_TOKENS, f as DEFAULT_RETRY_CONFIG, aN as DEFAULT_SYSTEM_PROMPT, aO as DISPATCH_STATES, aP as DispatchCheckOptions, aQ as DispatchListOptions, aR as DispatchRecord, aS as DispatchResult, aT as DispatchRole, aU as DispatchRuntime, aV as DispatchStartInput, aW as DispatchState, aX as DispatchTarget, aY as DispatchTargetInspection, aZ as DispatchTargetStartInput, a_ as DispatchTargetStartResult, a$ as DispatchTargetSummary, b0 as DispatchUsage, b1 as DoomLoopAction, b2 as DoomLoopHandler, b3 as DoomLoopRequest, b4 as EnhancedTools, b5 as EntryBase, b6 as EnvironmentInfo, b7 as ExternalTaskControl, b8 as FileEntry, b9 as GuidancePayload, ba as HumanInputEventContext, bb as HumanInputOption, bc as HumanInputRequest, bd as HumanInputRequestKind, be as HumanInputRequestListOptions, bf as HumanInputRequestRecord, bg as HumanInputRequestStatus, bh as HumanInputResponse, bi as HumanInputTimeoutError, bj as HumanInputToolArgs, bk as HumanInputUnavailableError, bl as IdleNotificationPayload, bm as InMemoryMailboxStore, bn as InMemoryTaskBoardStore, bo as InferSchemaOutput, g as InferenceCustomResult, h as InferenceStepInfo, I as InferenceStreamInput, i as InferenceStreamResult, bp as InputCheckResult, bq as InstructionFile, br as LocalDispatchRuntimeOptions, bs as LocalSessionTurnLock, bt as Mailbox, bu as MailboxStore, bv as MailboxSubscriber, bw as MemberRegisteredEvent, bx as MemberRuntime, by as MemberStats, bz as MemberStatus, bA as MemberStatusChangedEvent, bB as MessageBase, bC as MessageEntry, bD as MessageError, bE as MessageInput, bF as MessageKind, bG as MessageListFilter, bH as MessagePayload, bI as MessageRole, bJ as MessageSentEvent, bK as MetadataEntry, d as ModelCallContext, bL as ModelCallInput, bM as ModelCallOutput, bN as ModelFamily, bO as NormalizedToolReplayPolicy, bP as NotificationPriority, bQ as OnFollowUpQueued, bR as OnInterventionApplied, bS as OtelMiddlewareConfig, bT as PRUNE_PROTECTED_TOOLS, bU as PendingIntervention, bV as PermissionForwardedEvent, bW as PermissionHandler, bX as PermissionRequestPayload, bY as PermissionResolvedEvent, bZ as PermissionResponsePayload, b_ as PlanCreatedEvent, b$ as PlannedTask, c0 as PrepareModelStepOptions, c1 as PreparedAgentModelStep, c2 as PreparedExternalTask, c3 as Profile, c4 as PromptBuildContext, c5 as PromptConfig, c6 as PromptSection, c7 as QueueTaskInput, c8 as ReleaseSessionTurnLock, c9 as RemoteSkillEntry, ca as RemoteSkillIndex, R as RetryConfig, j as RetryHandlerOptions, k as RetryState, cb as RiskLevel, cc as RuleSource, cd as RunModelStepOptions, ce as RunToolBatchOptions, cf as RunToolBatchResult, cg as STORAGE_VERSION, ch as SerializedMessage, ci as Session, cj as SessionContext, ck as SessionEntry, cl as SessionHeader, cm as SessionInfo, cn as SessionStorage, co as SessionTurnLock, cp as SessionTurnLockAcquireOptions, cq as ShutdownRequestPayload, cr as ShutdownRequestedEvent, cs as ShutdownResolvedEvent, ct as ShutdownResponsePayload, cu as SkillConfig, cv as SkillContent, cw as SkillDiscoveryError, cx as SkillDiscoveryResult, cy as SkillMetadata, cz as SkillRegistry, cA as SkillResource, cB as SkillResourceType, cC as SkillScope, cD as SkillSource, cE as SkillSourceType, cF as StepProcessingOptions, cG as StepProcessingOutput, cH as StepProcessingResult, cI as StreamChunk, cJ as StreamInput, cK as StreamProviderConfig, cL as StreamProviderFactory, cM as StreamProviderInput, cN as StreamProviderResult, cO as SynthesisCompleteEvent, cP as SynthesisResult, cQ as SystemMessage, cR as TERMINAL_STATUSES, cS as TaskAbortedEvent, cT as TaskBoard, cU as TaskBoardStore, cV as TaskCompletedEvent, cW as TaskCompletion, cX as TaskConflictError, cY as TaskCreateInput, cZ as TaskCreatedEvent, c_ as TaskDispatchMode, c$ as TaskExecutor, d0 as TaskExecutorInput, d1 as TaskFailedEvent, d2 as TaskListFilter, d3 as TaskResult, d4 as TaskStatus, d5 as TaskTransition, d6 as TaskTransitionEvent, d7 as TaskTransitionReason, d8 as TeamCoordinatorConfig, d9 as TeamEvent, da as TeamMember, db as TeamMessage, dc as TeamNotificationEvent, dd as TeamPlan, de as TeamSnapshot, df as TeamStartedEvent, dg as TeamStoppedEvent, dh as TeamTask, di as TelemetryConfig, dj as TelemetryConfigResult, dk as TokenUsage, dl as ToolCallDecision, dm as ToolCallOutput, dn as ToolCapabilities, dp as ToolContext, dq as ToolHostRequirements, dr as ToolMessage, ds as ToolMetadata, dt as ToolReplayMode, du as ToolReplayPolicy, dv as ToolResult, dw as ToolSideEffectLevel, dx as TracingConfig, a as TurnTrackerContext, dy as UndoResult, dz as UserMessage, dA as WorkerReportPayload, dB as accumulateUsage, dC as advanceAgentTurnState, dD as approvalMiddleware, dE as buildCoordinatorNotificationEvent, l as calculateDelay, dF as createAgent, dG as createAgentTurnEngine, dH as createAgentTurnState, dI as createApprovalHandler, dJ as createHumanInputController, dK as createPromptBuilder, m as createRetryHandler, n as createRetryState, dL as createSkillRegistry, dM as createTurnTracker, dN as emptySkillRegistry, dO as failAgentTurnState, dP as getRequiredToolHost, dQ as isApprovalMiddleware, dR as isBlockedModelCall, dS as isHumanInputController, dT as requiresToolHost, dU as resolveAgentDefaults, dV as resolveCapability, dW as sandboxDefaultsProvider, s as shouldRetry, w as withRetry } from './instance-Ijh9CP-_.js';
|
|
3
3
|
import { LanguageModel, ModelMessage, Tool as Tool$1, TelemetrySettings } from 'ai';
|
|
4
4
|
import { T as ToolHost } from './types-C_LCeYNg.js';
|
|
5
5
|
export { D as DirEntry, E as ExecOptions, a as ExecResult, F as FileStat } from './types-C_LCeYNg.js';
|
|
@@ -14,7 +14,7 @@ export { C as CapabilitySource, D as DEFAULT_RESOLVER_OPTIONS, I as InputModalit
|
|
|
14
14
|
export { H as HttpTransportConfig, M as MCPConfig, a as MCPManager, b as MCPPromptInfo, c as MCPResourceInfo, d as MCPResourceTemplateInfo, e as MCPServerConfig, f as MCPServerStatus, R as RemoteTransportConfig, S as SseTransportConfig, g as StdioTransportConfig } from './types-DMjoFKKv.js';
|
|
15
15
|
export { ClientCredentialsOptions, ClientCredentialsProvider, createMCPManager, httpServer, serviceAccountServer, sseServer, stdioServer } from './mcp/index.js';
|
|
16
16
|
export { AgentTaskChatAdapter, AgentTaskCheckpointReason, AgentTaskCheckpointStrategy, AgentTaskCheckpointStrategyInput, AgentTaskExecutionCheckpoint, AgentTaskExecutionContext, AgentTaskExecutionRun, AgentTaskExecutionSnapshot, AgentTaskObserver, AgentTaskPayload, AgentTaskResult, AgentTaskResumeSnapshot, AgentTaskRunner, AgentTaskRunnerOptions, AgentWorkflowAssistantMessageSnapshot, AgentWorkflowCommitResult, AgentWorkflowInputCommitPlan, AgentWorkflowInterventionSnapshot, AgentWorkflowMessageSnapshot, AgentWorkflowModelStepPlan, AgentWorkflowModelStepResult, AgentWorkflowOperationPlan, AgentWorkflowOutputCommitPlan, AgentWorkflowReplayDecision, AgentWorkflowStepCommitPlan, AgentWorkflowSystemMessageSnapshot, AgentWorkflowToolBatchPlan, AgentWorkflowToolBatchResult, AgentWorkflowToolCallPlan, AgentWorkflowToolCallResult, AgentWorkflowToolCallSnapshot, AgentWorkflowToolMessageSnapshot, AgentWorkflowTurnPhase, AgentWorkflowTurnState, AgentWorkflowUserMessageSnapshot, ContextOverflowError, CreateAgentWorkflowTurnStateOptions, DoomLoopError, applyAgentWorkflowCommitResult, applyAgentWorkflowModelStepResult, applyAgentWorkflowToolBatchResult, applyAgentWorkflowToolCallResult, applyWorkflowInterventions, cloneAgentWorkflowTurnState, commitOutput, commitStep, createAgentTaskRunner, createAgentTurnStepCommitBatch, createAgentWorkflowTurnState, defaultAgentTaskCheckpointStrategy, drainWorkflowInterventions, failAgentWorkflowTurnState, planNextAgentWorkflowOperation, prepareModelStep, processStepStream, queueWorkflowFollowUps, recordAgentWorkflowReplayDecision, restoreAgentWorkflowMessage, restoreAgentWorkflowMessages, runModelStep, runToolBatch, snapshotAgentWorkflowMessage, snapshotAgentWorkflowMessages } from './execution/index.js';
|
|
17
|
-
export { c as convertAgentMessagesToModelMessages } from './model-messages-
|
|
17
|
+
export { c as convertAgentMessagesToModelMessages } from './model-messages-Bt_qyGsO.js';
|
|
18
18
|
export { CacheTTL, PromptCacheConfig, createTelemetryConfig, otelMiddleware, promptCacheMiddleware } from './middleware/index.js';
|
|
19
19
|
export { DEFAULT_INSTRUCTION_PATTERNS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_FILE_SIZE, PRIORITY_BASE, PRIORITY_CUSTOM, PRIORITY_ENVIRONMENT, PRIORITY_INSTRUCTIONS, PRIORITY_OVERRIDE, PRIORITY_SKILLS, detectModelFamily, discoverInstructions, formatEnvironment, formatInstructions, gatherEnvironment, getAvailableFamilies, getTemplate, loadGlobalInstructions, summarizeEnvironment } from './prompt/index.js';
|
|
20
20
|
export { Profiles, applyProfile, careful, code, createProfile, explore, filterTools, mergeProfiles, plan, quick, review, watch } from './profiles/index.js';
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
parseSubAgentRoleFrontmatter,
|
|
35
35
|
parseSubAgentToolSpec,
|
|
36
36
|
toSubAgentRole
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-QVQKQZUN.js";
|
|
38
38
|
import {
|
|
39
39
|
InMemoryMailboxStore,
|
|
40
40
|
InMemoryTaskBoardStore,
|
|
@@ -160,7 +160,7 @@ import {
|
|
|
160
160
|
ensureSessionLoaded,
|
|
161
161
|
getVisibleSessionMessages,
|
|
162
162
|
repairOrphanedToolCalls
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-Y7SMKIJT.js";
|
|
164
164
|
import {
|
|
165
165
|
sleep
|
|
166
166
|
} from "./chunk-SZ2XBPTW.js";
|
|
@@ -173,6 +173,7 @@ import {
|
|
|
173
173
|
} from "./chunk-Q742PSH3.js";
|
|
174
174
|
import {
|
|
175
175
|
FileStorage,
|
|
176
|
+
LocalSessionTurnLock,
|
|
176
177
|
MemoryStorage,
|
|
177
178
|
STORAGE_VERSION,
|
|
178
179
|
SessionManager,
|
|
@@ -195,7 +196,7 @@ import {
|
|
|
195
196
|
serializeMessage,
|
|
196
197
|
toJSONL,
|
|
197
198
|
toJSONLBatch
|
|
198
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-BMLWNXIP.js";
|
|
199
200
|
import {
|
|
200
201
|
createEventBus
|
|
201
202
|
} from "./chunk-2TTOLHBT.js";
|
|
@@ -307,6 +308,14 @@ import {
|
|
|
307
308
|
supportsReasoningSync
|
|
308
309
|
} from "./chunk-WI5JFEAI.js";
|
|
309
310
|
import "./chunk-SPBFQXOT.js";
|
|
311
|
+
import {
|
|
312
|
+
ClientCredentialsProvider,
|
|
313
|
+
createMCPManager,
|
|
314
|
+
httpServer,
|
|
315
|
+
serviceAccountServer,
|
|
316
|
+
sseServer,
|
|
317
|
+
stdioServer
|
|
318
|
+
} from "./chunk-US7S4FYW.js";
|
|
310
319
|
import {
|
|
311
320
|
MiddlewareRunner,
|
|
312
321
|
approvalMiddleware,
|
|
@@ -375,14 +384,6 @@ import {
|
|
|
375
384
|
requiresToolHost,
|
|
376
385
|
resolveCapability
|
|
377
386
|
} from "./chunk-FII65CN7.js";
|
|
378
|
-
import {
|
|
379
|
-
ClientCredentialsProvider,
|
|
380
|
-
createMCPManager,
|
|
381
|
-
httpServer,
|
|
382
|
-
serviceAccountServer,
|
|
383
|
-
sseServer,
|
|
384
|
-
stdioServer
|
|
385
|
-
} from "./chunk-US7S4FYW.js";
|
|
386
387
|
import {
|
|
387
388
|
createConsoleLogger,
|
|
388
389
|
createFileLogger,
|
|
@@ -2022,6 +2023,7 @@ function createAgentSetup(input) {
|
|
|
2022
2023
|
config,
|
|
2023
2024
|
tools: createToolMap(input.tools),
|
|
2024
2025
|
sessions: input.sessionManager ?? getDefaultSessionManager(),
|
|
2026
|
+
sessionTurnLock: input.sessionTurnLock ?? new LocalSessionTurnLock(),
|
|
2025
2027
|
state: createAgentState(config),
|
|
2026
2028
|
contextManager: createAgentContextManager(config),
|
|
2027
2029
|
turnTracker: createTurnTracker({ cwd: config.cwd }, logger),
|
|
@@ -2045,6 +2047,7 @@ var Agent = class _Agent {
|
|
|
2045
2047
|
config;
|
|
2046
2048
|
tools;
|
|
2047
2049
|
sessions;
|
|
2050
|
+
sessionTurnLock;
|
|
2048
2051
|
state;
|
|
2049
2052
|
/** Context manager for overflow detection and compaction */
|
|
2050
2053
|
contextManager;
|
|
@@ -2086,8 +2089,6 @@ var Agent = class _Agent {
|
|
|
2086
2089
|
activeTurnCount = 0;
|
|
2087
2090
|
/** Active turn intervention controllers, keyed by turn id */
|
|
2088
2091
|
activeTurns = /* @__PURE__ */ new Map();
|
|
2089
|
-
/** Per-session turn queue to prevent concurrent writes to the same history */
|
|
2090
|
-
sessionLocks = /* @__PURE__ */ new Map();
|
|
2091
2092
|
/** Structured logger for diagnostic output */
|
|
2092
2093
|
_logger;
|
|
2093
2094
|
constructor(config) {
|
|
@@ -2095,6 +2096,7 @@ var Agent = class _Agent {
|
|
|
2095
2096
|
this.config = setup.config;
|
|
2096
2097
|
this.tools = setup.tools;
|
|
2097
2098
|
this.sessions = setup.sessions;
|
|
2099
|
+
this.sessionTurnLock = setup.sessionTurnLock;
|
|
2098
2100
|
this.state = setup.state;
|
|
2099
2101
|
this.contextManager = setup.contextManager;
|
|
2100
2102
|
this.turnTracker = setup.turnTracker;
|
|
@@ -2194,24 +2196,8 @@ var Agent = class _Agent {
|
|
|
2194
2196
|
createSessionManager() {
|
|
2195
2197
|
return new SessionManager(this.sessions.getStorage());
|
|
2196
2198
|
}
|
|
2197
|
-
async acquireSessionLock(sessionId) {
|
|
2198
|
-
|
|
2199
|
-
let releaseLock;
|
|
2200
|
-
const current = new Promise((resolve2) => {
|
|
2201
|
-
releaseLock = resolve2;
|
|
2202
|
-
});
|
|
2203
|
-
const chain = previous.catch(() => void 0).then(() => current);
|
|
2204
|
-
this.sessionLocks.set(sessionId, chain);
|
|
2205
|
-
await previous.catch(() => void 0);
|
|
2206
|
-
let released = false;
|
|
2207
|
-
return () => {
|
|
2208
|
-
if (released) return;
|
|
2209
|
-
released = true;
|
|
2210
|
-
releaseLock();
|
|
2211
|
-
if (this.sessionLocks.get(sessionId) === chain) {
|
|
2212
|
-
this.sessionLocks.delete(sessionId);
|
|
2213
|
-
}
|
|
2214
|
-
};
|
|
2199
|
+
async acquireSessionLock(sessionId, options) {
|
|
2200
|
+
return await this.sessionTurnLock.acquire(sessionId, options);
|
|
2215
2201
|
}
|
|
2216
2202
|
/**
|
|
2217
2203
|
* Force-clear all pending session locks for a given session.
|
|
@@ -2225,7 +2211,7 @@ var Agent = class _Agent {
|
|
|
2225
2211
|
* active on this session.**
|
|
2226
2212
|
*/
|
|
2227
2213
|
clearSessionLock(sessionId) {
|
|
2228
|
-
this.
|
|
2214
|
+
this.sessionTurnLock.clear?.(sessionId);
|
|
2229
2215
|
}
|
|
2230
2216
|
/**
|
|
2231
2217
|
* Acquire the same per-session turn lock used by `chat()`.
|
|
@@ -2306,7 +2292,9 @@ var Agent = class _Agent {
|
|
|
2306
2292
|
* @yields {AgentEvent} Events as they occur during processing
|
|
2307
2293
|
*/
|
|
2308
2294
|
async *chat(sessionId, message, options) {
|
|
2309
|
-
const releaseSessionLock = await this.acquireSessionLock(sessionId
|
|
2295
|
+
const releaseSessionLock = await this.acquireSessionLock(sessionId, {
|
|
2296
|
+
signal: options?.abort
|
|
2297
|
+
});
|
|
2310
2298
|
const sessions = this.createSessionManager();
|
|
2311
2299
|
const turnId = `${sessionId}-turn-${++this.turnCounter}`;
|
|
2312
2300
|
let turnTracker;
|
|
@@ -2375,7 +2363,7 @@ var Agent = class _Agent {
|
|
|
2375
2363
|
}
|
|
2376
2364
|
await this.syncSessionView(sessionId);
|
|
2377
2365
|
} finally {
|
|
2378
|
-
releaseSessionLock();
|
|
2366
|
+
await releaseSessionLock();
|
|
2379
2367
|
}
|
|
2380
2368
|
}
|
|
2381
2369
|
}
|
|
@@ -3256,6 +3244,7 @@ export {
|
|
|
3256
3244
|
LLMError,
|
|
3257
3245
|
LOCAL_SUBAGENT_BACKEND,
|
|
3258
3246
|
LayeredSettings,
|
|
3247
|
+
LocalSessionTurnLock,
|
|
3259
3248
|
LocalSignal,
|
|
3260
3249
|
MAX_BYTES,
|
|
3261
3250
|
MAX_LINES,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ToolSet } from 'ai';
|
|
2
|
-
import { T as Tool, a as TurnTrackerContext, H as HumanInputController, b as MiddlewareRunner, A as AgentEvent, c as ToolExecutionMode, I as InferenceStreamInput, d as ModelCallContext, e as AnyInferenceResult } from '../instance-
|
|
3
|
-
export { D as DEFAULT_MAX_OUTPUT_TOKENS, f as DEFAULT_RETRY_CONFIG, g as InferenceCustomResult, h as InferenceStepInfo, i as InferenceStreamResult, R as RetryConfig, j as RetryHandlerOptions, k as RetryState, l as calculateDelay, m as createRetryHandler, n as createRetryState, s as shouldRetry, o as sleep, w as withRetry } from '../instance-
|
|
2
|
+
import { T as Tool, a as TurnTrackerContext, H as HumanInputController, b as MiddlewareRunner, A as AgentEvent, c as ToolExecutionMode, I as InferenceStreamInput, d as ModelCallContext, e as AnyInferenceResult } from '../instance-Ijh9CP-_.js';
|
|
3
|
+
export { D as DEFAULT_MAX_OUTPUT_TOKENS, f as DEFAULT_RETRY_CONFIG, g as InferenceCustomResult, h as InferenceStepInfo, i as InferenceStreamResult, R as RetryConfig, j as RetryHandlerOptions, k as RetryState, l as calculateDelay, m as createRetryHandler, n as createRetryState, s as shouldRetry, o as sleep, w as withRetry } from '../instance-Ijh9CP-_.js';
|
|
4
4
|
import { T as ToolHost } from '../types-C_LCeYNg.js';
|
|
5
|
-
export { c as convertAgentMessagesToModelMessages } from '../model-messages-
|
|
5
|
+
export { c as convertAgentMessagesToModelMessages } from '../model-messages-Bt_qyGsO.js';
|
|
6
6
|
export { E as ErrorCategory, L as LLMError, a as LLMErrorOptions, R as ResponseHeaders } from '../llm-error-D93FNNLY.js';
|
|
7
7
|
export { getErrorCategory, getRetryDelay, isRetryable, isRetryableCategory, parseRetryDelay } from './errors/index.js';
|
|
8
8
|
import '../types-RSCv7nQ4.js';
|
|
@@ -3732,6 +3732,24 @@ interface DoomLoopRequest {
|
|
|
3732
3732
|
*/
|
|
3733
3733
|
type DoomLoopHandler = (request: DoomLoopRequest) => Promise<DoomLoopAction>;
|
|
3734
3734
|
|
|
3735
|
+
type ReleaseSessionTurnLock = () => void | Promise<void>;
|
|
3736
|
+
interface SessionTurnLockAcquireOptions {
|
|
3737
|
+
/** Abort while waiting for the lock. */
|
|
3738
|
+
signal?: AbortSignal;
|
|
3739
|
+
/** Maximum time to wait for the lock. */
|
|
3740
|
+
timeoutMs?: number;
|
|
3741
|
+
}
|
|
3742
|
+
interface SessionTurnLock {
|
|
3743
|
+
acquire(sessionId: string, options?: SessionTurnLockAcquireOptions): Promise<ReleaseSessionTurnLock>;
|
|
3744
|
+
/** Best-effort escape hatch for local runtimes. */
|
|
3745
|
+
clear?(sessionId: string): void;
|
|
3746
|
+
}
|
|
3747
|
+
declare class LocalSessionTurnLock implements SessionTurnLock {
|
|
3748
|
+
private readonly locks;
|
|
3749
|
+
acquire(sessionId: string, options?: SessionTurnLockAcquireOptions): Promise<ReleaseSessionTurnLock>;
|
|
3750
|
+
clear(sessionId: string): void;
|
|
3751
|
+
}
|
|
3752
|
+
|
|
3735
3753
|
/**
|
|
3736
3754
|
* Options for creating a new session.
|
|
3737
3755
|
*/
|
|
@@ -5143,6 +5161,7 @@ interface RunToolBatchResult {
|
|
|
5143
5161
|
type AgentConstructionOptions = AgentConfig & {
|
|
5144
5162
|
tools?: Tool.AnyInfo[];
|
|
5145
5163
|
sessionManager?: SessionManager;
|
|
5164
|
+
sessionTurnLock?: SessionTurnLock;
|
|
5146
5165
|
};
|
|
5147
5166
|
type EffectiveAgentConfig = Required<Pick<AgentConfig, "model" | "systemPrompt" | "cwd" | "maxOutputTokens" | "maxSteps">> & AgentConfig;
|
|
5148
5167
|
|
|
@@ -5199,6 +5218,7 @@ declare class Agent {
|
|
|
5199
5218
|
private config;
|
|
5200
5219
|
private tools;
|
|
5201
5220
|
private sessions;
|
|
5221
|
+
private sessionTurnLock;
|
|
5202
5222
|
private state;
|
|
5203
5223
|
/** Context manager for overflow detection and compaction */
|
|
5204
5224
|
private contextManager;
|
|
@@ -5240,8 +5260,6 @@ declare class Agent {
|
|
|
5240
5260
|
private activeTurnCount;
|
|
5241
5261
|
/** Active turn intervention controllers, keyed by turn id */
|
|
5242
5262
|
private readonly activeTurns;
|
|
5243
|
-
/** Per-session turn queue to prevent concurrent writes to the same history */
|
|
5244
|
-
private readonly sessionLocks;
|
|
5245
5263
|
/** Structured logger for diagnostic output */
|
|
5246
5264
|
private readonly _logger;
|
|
5247
5265
|
constructor(config: AgentConstructionOptions);
|
|
@@ -5758,4 +5776,4 @@ declare class Agent {
|
|
|
5758
5776
|
close(): Promise<void>;
|
|
5759
5777
|
}
|
|
5760
5778
|
|
|
5761
|
-
export { type AgentTurnCommitOptions as $, type AgentEvent as A, Agent as B, type AgentConfig as C, DEFAULT_MAX_TOKENS as D, type EffectiveAgentConfig as E, type FileOperationMeta as F, type AgentDefaults as G, type HumanInputController as H, type InferenceStreamInput as I, type AgentDefaultsContext as J, type AgentDefaultsProvider as K, type AgentMiddleware as L, type Message as M, type AgentModelHooks as N, type AgentStatus as O, PromptBuilder as P, type AgentTurnActiveToolCall as Q, type RetryConfig as R, SessionManager as S, Tool as T, type Unsubscribe as U, type AgentTurnBoundaryKind as V, type WildcardHandler as W, type AgentTurnBoundaryMetadata as X, type AgentTurnBoundarySnapshot as Y, type AgentTurnCommitApplier as Z, type AgentTurnCommitBatch as _, type TurnTrackerContext as a, type DispatchTargetSummary as a$, AgentTurnEngine as a0, type AgentTurnEngineOptions as a1, type AgentTurnPhase as a2, type AgentTurnResolvedToolCall as a3, type AgentTurnState as a4, type AgentTurnStateAdvanceOptions as a5, type AgentTurnStepCommitSnapshot as a6, type AgentTurnStepCommitToolCall as a7, type AgentTurnStepCommitToolResult as a8, type AgentTurnStepRuntimeConfig as a9, type ConfigChangeEntry as aA, type CoordinatorNotification as aB, type CoordinatorNotificationKind as aC, type CoordinatorRoundEvent as aD, type CreateAgentTurnStateOptions as aE, type CreateAgentTurnStepCommitBatchOptions as aF, type CreateSessionOptions as aG, DEFAULT_AGENT_NAME as aH, DEFAULT_DISPATCH_TOOL_IDS as aI, DEFAULT_LOCAL_DISPATCH_CONCURRENCY as aJ, DEFAULT_LOCAL_DISPATCH_DEPTH as aK, DEFAULT_LOCAL_DISPATCH_TITLE_PREFIX as aL, DEFAULT_MAX_STEPS as aM, DEFAULT_SYSTEM_PROMPT as aN, DISPATCH_STATES as aO, type DispatchCheckOptions as aP, type DispatchListOptions as aQ, type DispatchRecord as aR, type DispatchResult as aS, type DispatchRole as aT, type DispatchRuntime as aU, type DispatchStartInput as aV, type DispatchState as aW, type DispatchTarget as aX, type DispatchTargetInspection as aY, type DispatchTargetStartInput as aZ, type DispatchTargetStartResult as a_, type AppliedProfile as aa, type ApprovalAction as ab, type ApprovalAgentMiddleware as ac, type ApprovalCascadeMode as ad, type ApprovalCascadePolicy as ae, type ApprovalConfig as af, type ApprovalCorrection as ag, type ApprovalDecision as ah, type ApprovalEvaluation as ai, type ApprovalEvent as aj, type ApprovalHandler as ak, type ApprovalMiddlewareConfig as al, type ApprovalRememberScope as am, type ApprovalRequest as an, type ApprovalResolution as ao, type ApprovalRule as ap, type ApprovalRuleContext as aq, type AssistantMessage as ar, type BlockedModelCall as as, type BranchEntry as at, type ChatLifecycleContext as au, type CommitOutputOptions as av, type CommitStepOptions as aw, type CompactionConfig as ax, type CompactionEntry as ay, type CompatibleSchema as az, MiddlewareRunner as b, type
|
|
5779
|
+
export { type AgentTurnCommitOptions as $, type AgentEvent as A, Agent as B, type AgentConfig as C, DEFAULT_MAX_TOKENS as D, type EffectiveAgentConfig as E, type FileOperationMeta as F, type AgentDefaults as G, type HumanInputController as H, type InferenceStreamInput as I, type AgentDefaultsContext as J, type AgentDefaultsProvider as K, type AgentMiddleware as L, type Message as M, type AgentModelHooks as N, type AgentStatus as O, PromptBuilder as P, type AgentTurnActiveToolCall as Q, type RetryConfig as R, SessionManager as S, Tool as T, type Unsubscribe as U, type AgentTurnBoundaryKind as V, type WildcardHandler as W, type AgentTurnBoundaryMetadata as X, type AgentTurnBoundarySnapshot as Y, type AgentTurnCommitApplier as Z, type AgentTurnCommitBatch as _, type TurnTrackerContext as a, type DispatchTargetSummary as a$, AgentTurnEngine as a0, type AgentTurnEngineOptions as a1, type AgentTurnPhase as a2, type AgentTurnResolvedToolCall as a3, type AgentTurnState as a4, type AgentTurnStateAdvanceOptions as a5, type AgentTurnStepCommitSnapshot as a6, type AgentTurnStepCommitToolCall as a7, type AgentTurnStepCommitToolResult as a8, type AgentTurnStepRuntimeConfig as a9, type ConfigChangeEntry as aA, type CoordinatorNotification as aB, type CoordinatorNotificationKind as aC, type CoordinatorRoundEvent as aD, type CreateAgentTurnStateOptions as aE, type CreateAgentTurnStepCommitBatchOptions as aF, type CreateSessionOptions as aG, DEFAULT_AGENT_NAME as aH, DEFAULT_DISPATCH_TOOL_IDS as aI, DEFAULT_LOCAL_DISPATCH_CONCURRENCY as aJ, DEFAULT_LOCAL_DISPATCH_DEPTH as aK, DEFAULT_LOCAL_DISPATCH_TITLE_PREFIX as aL, DEFAULT_MAX_STEPS as aM, DEFAULT_SYSTEM_PROMPT as aN, DISPATCH_STATES as aO, type DispatchCheckOptions as aP, type DispatchListOptions as aQ, type DispatchRecord as aR, type DispatchResult as aS, type DispatchRole as aT, type DispatchRuntime as aU, type DispatchStartInput as aV, type DispatchState as aW, type DispatchTarget as aX, type DispatchTargetInspection as aY, type DispatchTargetStartInput as aZ, type DispatchTargetStartResult as a_, type AppliedProfile as aa, type ApprovalAction as ab, type ApprovalAgentMiddleware as ac, type ApprovalCascadeMode as ad, type ApprovalCascadePolicy as ae, type ApprovalConfig as af, type ApprovalCorrection as ag, type ApprovalDecision as ah, type ApprovalEvaluation as ai, type ApprovalEvent as aj, type ApprovalHandler as ak, type ApprovalMiddlewareConfig as al, type ApprovalRememberScope as am, type ApprovalRequest as an, type ApprovalResolution as ao, type ApprovalRule as ap, type ApprovalRuleContext as aq, type AssistantMessage as ar, type BlockedModelCall as as, type BranchEntry as at, type ChatLifecycleContext as au, type CommitOutputOptions as av, type CommitStepOptions as aw, type CompactionConfig as ax, type CompactionEntry as ay, type CompatibleSchema as az, MiddlewareRunner as b, type PlannedTask as b$, type DispatchUsage as b0, type DoomLoopAction as b1, type DoomLoopHandler as b2, type DoomLoopRequest as b3, type EnhancedTools as b4, type EntryBase as b5, type EnvironmentInfo as b6, type ExternalTaskControl as b7, type FileEntry as b8, type GuidancePayload as b9, type MemberStatusChangedEvent as bA, type MessageBase as bB, type MessageEntry as bC, type MessageError as bD, type MessageInput as bE, type MessageKind as bF, type MessageListFilter as bG, type MessagePayload as bH, type MessageRole as bI, type MessageSentEvent as bJ, type MetadataEntry as bK, type ModelCallInput as bL, type ModelCallOutput as bM, type ModelFamily as bN, type NormalizedToolReplayPolicy as bO, type NotificationPriority as bP, type OnFollowUpQueued as bQ, type OnInterventionApplied as bR, type OtelMiddlewareConfig as bS, PRUNE_PROTECTED_TOOLS as bT, type PendingIntervention as bU, type PermissionForwardedEvent as bV, type PermissionHandler as bW, type PermissionRequestPayload as bX, type PermissionResolvedEvent as bY, type PermissionResponsePayload as bZ, type PlanCreatedEvent as b_, type HumanInputEventContext as ba, type HumanInputOption as bb, type HumanInputRequest as bc, type HumanInputRequestKind as bd, type HumanInputRequestListOptions as be, type HumanInputRequestRecord as bf, type HumanInputRequestStatus as bg, type HumanInputResponse as bh, HumanInputTimeoutError as bi, type HumanInputToolArgs as bj, HumanInputUnavailableError as bk, type IdleNotificationPayload as bl, InMemoryMailboxStore as bm, InMemoryTaskBoardStore as bn, type InferSchemaOutput as bo, type InputCheckResult as bp, type InstructionFile as bq, type LocalDispatchRuntimeOptions as br, LocalSessionTurnLock as bs, Mailbox as bt, type MailboxStore as bu, type MailboxSubscriber as bv, type MemberRegisteredEvent as bw, type MemberRuntime as bx, type MemberStats as by, type MemberStatus as bz, type ToolExecutionMode as c, type TaskExecutor as c$, type PrepareModelStepOptions as c0, type PreparedAgentModelStep as c1, type PreparedExternalTask as c2, type Profile as c3, type PromptBuildContext as c4, type PromptConfig as c5, type PromptSection as c6, type QueueTaskInput as c7, type ReleaseSessionTurnLock as c8, type RemoteSkillEntry as c9, type SkillResource as cA, type SkillResourceType as cB, type SkillScope as cC, type SkillSource as cD, type SkillSourceType as cE, type StepProcessingOptions as cF, type StepProcessingOutput as cG, type StepProcessingResult as cH, type StreamChunk as cI, type StreamInput as cJ, type StreamProviderConfig as cK, type StreamProviderFactory as cL, type StreamProviderInput as cM, type StreamProviderResult as cN, type SynthesisCompleteEvent as cO, type SynthesisResult as cP, type SystemMessage as cQ, TERMINAL_STATUSES as cR, type TaskAbortedEvent as cS, TaskBoard as cT, type TaskBoardStore as cU, type TaskCompletedEvent as cV, type TaskCompletion as cW, TaskConflictError as cX, type TaskCreateInput as cY, type TaskCreatedEvent as cZ, type TaskDispatchMode as c_, type RemoteSkillIndex as ca, type RiskLevel as cb, type RuleSource as cc, type RunModelStepOptions as cd, type RunToolBatchOptions as ce, type RunToolBatchResult as cf, STORAGE_VERSION as cg, type SerializedMessage as ch, type Session as ci, type SessionContext as cj, type SessionEntry as ck, type SessionHeader as cl, type SessionInfo as cm, type SessionStorage as cn, type SessionTurnLock as co, type SessionTurnLockAcquireOptions as cp, type ShutdownRequestPayload as cq, type ShutdownRequestedEvent as cr, type ShutdownResolvedEvent as cs, type ShutdownResponsePayload as ct, type SkillConfig as cu, type SkillContent as cv, type SkillDiscoveryError as cw, type SkillDiscoveryResult as cx, type SkillMetadata as cy, SkillRegistry as cz, type ModelCallContext as d, type TaskExecutorInput as d0, type TaskFailedEvent as d1, type TaskListFilter as d2, type TaskResult as d3, type TaskStatus as d4, type TaskTransition as d5, type TaskTransitionEvent as d6, type TaskTransitionReason as d7, type TeamCoordinatorConfig as d8, type TeamEvent as d9, type WorkerReportPayload as dA, accumulateUsage as dB, advanceAgentTurnState as dC, approvalMiddleware as dD, buildCoordinatorNotificationEvent as dE, createAgent as dF, createAgentTurnEngine as dG, createAgentTurnState as dH, createApprovalHandler as dI, createHumanInputController as dJ, createPromptBuilder as dK, createSkillRegistry as dL, createTurnTracker as dM, emptySkillRegistry as dN, failAgentTurnState as dO, getRequiredToolHost as dP, isApprovalMiddleware as dQ, isBlockedModelCall as dR, isHumanInputController as dS, requiresToolHost as dT, resolveAgentDefaults as dU, resolveCapability as dV, sandboxDefaultsProvider as dW, type CoordinatorCtx as dX, type TeamMember as da, type TeamMessage as db, type TeamNotificationEvent as dc, type TeamPlan as dd, type TeamSnapshot as de, type TeamStartedEvent as df, type TeamStoppedEvent as dg, type TeamTask as dh, type TelemetryConfig as di, type TelemetryConfigResult as dj, type TokenUsage as dk, type ToolCallDecision as dl, type ToolCallOutput as dm, type ToolCapabilities as dn, type ToolContext as dp, type ToolHostRequirements as dq, type ToolMessage as dr, type ToolMetadata as ds, type ToolReplayMode as dt, type ToolReplayPolicy as du, type ToolResult as dv, type ToolSideEffectLevel as dw, type TracingConfig as dx, type UndoResult as dy, type UserMessage as dz, type AnyInferenceResult as e, DEFAULT_RETRY_CONFIG as f, type InferenceCustomResult as g, type InferenceStepInfo as h, type InferenceStreamResult as i, type RetryHandlerOptions as j, type RetryState as k, calculateDelay as l, createRetryHandler as m, createRetryState as n, sleep as o, type HumanInputConfig as p, TurnChangeTracker as q, InterventionController as r, shouldRetry as s, type StreamProvider as t, type Scope as u, type ScopeSnapshot as v, withRetry as w, type ScopeOptions as x, type AgentSignal as y, type TypedHandler as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { N as AgentModelHooks, ac as ApprovalAgentMiddleware, al as ApprovalMiddlewareConfig, as as BlockedModelCall, au as ChatLifecycleContext, b as MiddlewareRunner, d as ModelCallContext,
|
|
1
|
+
import { bS as OtelMiddlewareConfig, L as AgentMiddleware, di as TelemetryConfig, dj as TelemetryConfigResult } from '../instance-Ijh9CP-_.js';
|
|
2
|
+
export { N as AgentModelHooks, ac as ApprovalAgentMiddleware, al as ApprovalMiddlewareConfig, as as BlockedModelCall, au as ChatLifecycleContext, b as MiddlewareRunner, d as ModelCallContext, bL as ModelCallInput, bM as ModelCallOutput, dl as ToolCallDecision, dm as ToolCallOutput, dD as approvalMiddleware, dQ as isApprovalMiddleware, dR as isBlockedModelCall } from '../instance-Ijh9CP-_.js';
|
|
3
3
|
import '../types-C_LCeYNg.js';
|
|
4
4
|
import 'ai';
|
|
5
5
|
import '../types-RSCv7nQ4.js';
|
package/dist/plugin/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Tool, L as AgentMiddleware,
|
|
1
|
+
import { T as Tool, L as AgentMiddleware, c6 as PromptSection } from '../instance-Ijh9CP-_.js';
|
|
2
2
|
import { ZodType } from 'zod';
|
|
3
3
|
import { Jiti } from 'jiti';
|
|
4
4
|
import '../types-C_LCeYNg.js';
|
package/dist/profiles/index.d.ts
CHANGED
package/dist/prompt/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { bN as ModelFamily, b6 as EnvironmentInfo, bq as InstructionFile } from '../instance-Ijh9CP-_.js';
|
|
2
|
+
export { c4 as PromptBuildContext, P as PromptBuilder, c5 as PromptConfig, c6 as PromptSection, cu as SkillConfig, dK as createPromptBuilder } from '../instance-Ijh9CP-_.js';
|
|
3
3
|
import { LanguageModel } from 'ai';
|
|
4
4
|
import '../types-C_LCeYNg.js';
|
|
5
5
|
import '../types-RSCv7nQ4.js';
|
package/dist/safety/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { ab as ApprovalAction, ad as ApprovalCascadeMode, ag as ApprovalCorrection, ai as ApprovalEvaluation, ak as ApprovalHandler, ao as ApprovalResolution,
|
|
1
|
+
import { cb as RiskLevel, ap as ApprovalRule, an as ApprovalRequest, aq as ApprovalRuleContext, cc as RuleSource, ae as ApprovalCascadePolicy, am as ApprovalRememberScope, ah as ApprovalDecision, af as ApprovalConfig } from '../instance-Ijh9CP-_.js';
|
|
2
|
+
export { ab as ApprovalAction, ad as ApprovalCascadeMode, ag as ApprovalCorrection, ai as ApprovalEvaluation, ak as ApprovalHandler, ao as ApprovalResolution, dI as createApprovalHandler } from '../instance-Ijh9CP-_.js';
|
|
3
3
|
import '../types-C_LCeYNg.js';
|
|
4
4
|
import 'ai';
|
|
5
5
|
import '../types-RSCv7nQ4.js';
|
package/dist/skill/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { cC as SkillScope, cD as SkillSource, cy as SkillMetadata, cB as SkillResourceType, cA as SkillResource, cv as SkillContent, cu as SkillConfig, cx as SkillDiscoveryResult, cz as SkillRegistry, T as Tool } from '../instance-Ijh9CP-_.js';
|
|
2
|
+
export { c9 as RemoteSkillEntry, ca as RemoteSkillIndex, cw as SkillDiscoveryError, cE as SkillSourceType, dL as createSkillRegistry, dN as emptySkillRegistry } from '../instance-Ijh9CP-_.js';
|
|
3
3
|
import '../types-C_LCeYNg.js';
|
|
4
4
|
import 'ai';
|
|
5
5
|
import '../types-RSCv7nQ4.js';
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b8 as FileEntry,
|
|
2
|
-
export { at as BranchEntry, ay as CompactionEntry, aA as ConfigChangeEntry, aG as CreateSessionOptions, b5 as EntryBase,
|
|
1
|
+
import { b8 as FileEntry, ck as SessionEntry, M as Message, bC as MessageEntry, bK as MetadataEntry, ch as SerializedMessage, cm as SessionInfo, cn as SessionStorage, cl as SessionHeader, S as SessionManager } from '../instance-Ijh9CP-_.js';
|
|
2
|
+
export { at as BranchEntry, ay as CompactionEntry, aA as ConfigChangeEntry, aG as CreateSessionOptions, b5 as EntryBase, bs as LocalSessionTurnLock, c8 as ReleaseSessionTurnLock, cg as STORAGE_VERSION, cj as SessionContext, co as SessionTurnLock, cp as SessionTurnLockAcquireOptions } from '../instance-Ijh9CP-_.js';
|
|
3
3
|
import { L as Logger } from '../types-RSCv7nQ4.js';
|
|
4
4
|
import '../types-C_LCeYNg.js';
|
|
5
5
|
import 'ai';
|
package/dist/storage/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FileStorage,
|
|
3
|
+
LocalSessionTurnLock,
|
|
3
4
|
MemoryStorage,
|
|
4
5
|
STORAGE_VERSION,
|
|
5
6
|
SessionManager,
|
|
@@ -22,9 +23,10 @@ import {
|
|
|
22
23
|
serializeMessage,
|
|
23
24
|
toJSONL,
|
|
24
25
|
toJSONLBatch
|
|
25
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-BMLWNXIP.js";
|
|
26
27
|
export {
|
|
27
28
|
FileStorage,
|
|
29
|
+
LocalSessionTurnLock,
|
|
28
30
|
MemoryStorage,
|
|
29
31
|
STORAGE_VERSION,
|
|
30
32
|
SessionManager,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aT as DispatchRole, aS as DispatchResult, br as LocalDispatchRuntimeOptions, B as Agent, T as Tool, aU as DispatchRuntime,
|
|
1
|
+
import { aT as DispatchRole, aS as DispatchResult, br as LocalDispatchRuntimeOptions, B as Agent, T as Tool, aU as DispatchRuntime, c3 as Profile } from '../instance-Ijh9CP-_.js';
|
|
2
2
|
import '../types-C_LCeYNg.js';
|
|
3
3
|
import 'ai';
|
|
4
4
|
import '../types-RSCv7nQ4.js';
|
package/dist/subagents/index.js
CHANGED
|
@@ -34,11 +34,11 @@ import {
|
|
|
34
34
|
parseSubAgentRoleFrontmatter,
|
|
35
35
|
parseSubAgentToolSpec,
|
|
36
36
|
toSubAgentRole
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-QVQKQZUN.js";
|
|
38
38
|
import "../chunk-TPZ37IWI.js";
|
|
39
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-Y7SMKIJT.js";
|
|
40
40
|
import "../chunk-Q742PSH3.js";
|
|
41
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-BMLWNXIP.js";
|
|
42
42
|
export {
|
|
43
43
|
DEFAULT_SUBAGENT_CONCURRENCY,
|
|
44
44
|
DEFAULT_SUBAGENT_DEPTH,
|
package/dist/team/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aB as CoordinatorNotification,
|
|
2
|
-
export { aC as CoordinatorNotificationKind, aD as CoordinatorRoundEvent, b7 as ExternalTaskControl, b9 as GuidancePayload, bl as IdleNotificationPayload, bm as InMemoryMailboxStore, bn as InMemoryTaskBoardStore,
|
|
1
|
+
import { aB as CoordinatorNotification, cW as TaskCompletion, dk as TokenUsage, A as AgentEvent, dX as CoordinatorCtx, B as Agent, bx as MemberRuntime, cT as TaskBoard, bt as Mailbox, c_ as TaskDispatchMode, bW as PermissionHandler, d8 as TeamCoordinatorConfig, c$ as TaskExecutor, d9 as TeamEvent, da as TeamMember, c7 as QueueTaskInput, dh as TeamTask, db as TeamMessage, dd as TeamPlan, cP as SynthesisResult, de as TeamSnapshot, d2 as TaskListFilter, bG as MessageListFilter, c2 as PreparedExternalTask, d3 as TaskResult, d5 as TaskTransition, by as MemberStats, bz as MemberStatus, L as AgentMiddleware, dl as ToolCallDecision } from '../instance-Ijh9CP-_.js';
|
|
2
|
+
export { aC as CoordinatorNotificationKind, aD as CoordinatorRoundEvent, b7 as ExternalTaskControl, b9 as GuidancePayload, bl as IdleNotificationPayload, bm as InMemoryMailboxStore, bn as InMemoryTaskBoardStore, bu as MailboxStore, bv as MailboxSubscriber, bw as MemberRegisteredEvent, bA as MemberStatusChangedEvent, bE as MessageInput, bF as MessageKind, bH as MessagePayload, bJ as MessageSentEvent, bP as NotificationPriority, bV as PermissionForwardedEvent, bX as PermissionRequestPayload, bY as PermissionResolvedEvent, bZ as PermissionResponsePayload, b_ as PlanCreatedEvent, b$ as PlannedTask, cq as ShutdownRequestPayload, cr as ShutdownRequestedEvent, cs as ShutdownResolvedEvent, ct as ShutdownResponsePayload, cO as SynthesisCompleteEvent, cR as TERMINAL_STATUSES, cS as TaskAbortedEvent, cU as TaskBoardStore, cV as TaskCompletedEvent, cX as TaskConflictError, cY as TaskCreateInput, cZ as TaskCreatedEvent, d0 as TaskExecutorInput, d1 as TaskFailedEvent, d4 as TaskStatus, d6 as TaskTransitionEvent, d7 as TaskTransitionReason, dc as TeamNotificationEvent, df as TeamStartedEvent, dg as TeamStoppedEvent, dA as WorkerReportPayload, dE as buildCoordinatorNotificationEvent } from '../instance-Ijh9CP-_.js';
|
|
3
3
|
import { R as ReasoningLevel } from '../types-CQaXbRsS.js';
|
|
4
4
|
import '../types-C_LCeYNg.js';
|
|
5
5
|
import 'ai';
|
package/dist/tool/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { az as CompatibleSchema, bo as InferSchemaOutput, bp as InputCheckResult,
|
|
1
|
+
import { du as ToolReplayPolicy, F as FileOperationMeta, bO as NormalizedToolReplayPolicy, T as Tool, H as HumanInputController, a as TurnTrackerContext, b as MiddlewareRunner, A as AgentEvent, ds as ToolMetadata, dn as ToolCapabilities } from '../instance-Ijh9CP-_.js';
|
|
2
|
+
export { az as CompatibleSchema, bo as InferSchemaOutput, bp as InputCheckResult, dP as getRequiredToolHost, dV as resolveCapability } from '../instance-Ijh9CP-_.js';
|
|
3
3
|
import { T as ToolHost } from '../types-C_LCeYNg.js';
|
|
4
4
|
export { D as DirEntry, E as ExecOptions, a as ExecResult, F as FileStat } from '../types-C_LCeYNg.js';
|
|
5
5
|
export { ToolHostProvider, ToolHostProviderSummary, ToolHostRegistry, defaultToolHostRegistry, localHost } from './host/index.js';
|
package/package.json
CHANGED