@theokit/sdk 5.0.0-next.3 → 5.0.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/CHANGELOG.md +978 -0
- package/dist/{agent-V6YLX3W6.cjs → agent-5BJF255U.cjs} +6 -6
- package/dist/{agent-V6YLX3W6.cjs.map → agent-5BJF255U.cjs.map} +1 -1
- package/dist/{agent-2KJ3IGRA.js → agent-HACVHN2V.js} +5 -5
- package/dist/{agent-2KJ3IGRA.js.map → agent-HACVHN2V.js.map} +1 -1
- package/dist/{chunk-CYKKYNOT.js → chunk-7SZAV6QG.js} +4 -4
- package/dist/chunk-7SZAV6QG.js.map +1 -0
- package/dist/{chunk-L4RPP6ZC.js → chunk-M3QNTHMV.js} +3 -3
- package/dist/{chunk-L4RPP6ZC.js.map → chunk-M3QNTHMV.js.map} +1 -1
- package/dist/{chunk-RXZSVNDG.cjs → chunk-NQTNSHSB.cjs} +7 -3
- package/dist/chunk-NQTNSHSB.cjs.map +1 -0
- package/dist/{chunk-GO5QW4YL.js → chunk-OXQSNOYV.js} +5 -5
- package/dist/{chunk-GO5QW4YL.js.map → chunk-OXQSNOYV.js.map} +1 -1
- package/dist/{chunk-J2SH3PNH.js → chunk-SADXXGWU.js} +6 -3
- package/dist/chunk-SADXXGWU.js.map +1 -0
- package/dist/{chunk-VNDJS6I3.cjs → chunk-VPK6PHIE.cjs} +8 -8
- package/dist/{chunk-VNDJS6I3.cjs.map → chunk-VPK6PHIE.cjs.map} +1 -1
- package/dist/{chunk-K6VDRJ6I.cjs → chunk-VVJ7FQAQ.cjs} +20 -19
- package/dist/{chunk-K6VDRJ6I.cjs.map → chunk-VVJ7FQAQ.cjs.map} +1 -1
- package/dist/{chunk-DX4RUWOK.js → chunk-WS5ULCL4.js} +3 -3
- package/dist/{chunk-DX4RUWOK.js.map → chunk-WS5ULCL4.js.map} +1 -1
- package/dist/{chunk-GJKMSGZ7.cjs → chunk-WWZO2TTK.cjs} +4 -4
- package/dist/{chunk-GJKMSGZ7.cjs.map → chunk-WWZO2TTK.cjs.map} +1 -1
- package/dist/{chunk-KBXADFBJ.cjs → chunk-Z2JFX372.cjs} +15 -15
- package/dist/chunk-Z2JFX372.cjs.map +1 -0
- package/dist/cron.cjs +5 -5
- package/dist/cron.js +4 -4
- package/dist/eval.cjs +4 -4
- package/dist/eval.js +3 -3
- package/dist/{index-manager-OL6HTYAO.cjs → index-manager-3UNPYH34.cjs} +5 -5
- package/dist/{index-manager-OL6HTYAO.cjs.map → index-manager-3UNPYH34.cjs.map} +1 -1
- package/dist/{index-manager-E56WW5RO.js → index-manager-W7FDMGEG.js} +4 -4
- package/dist/{index-manager-E56WW5RO.js.map → index-manager-W7FDMGEG.js.map} +1 -1
- package/dist/index.cjs +36 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +18 -11
- package/dist/index.js.map +1 -1
- package/dist/internal/memory/storage/index.cjs +34 -30
- package/dist/internal/memory/storage/index.d.cts +1 -1
- package/dist/internal/memory/storage/index.d.ts +1 -1
- package/dist/internal/memory/storage/index.js +2 -2
- package/dist/internal/memory/storage/memory-root.d.cts +17 -0
- package/dist/internal/memory/storage/memory-root.d.ts +17 -0
- package/docs/harness-capability-map.md +5 -1
- package/docs/memory-decisions.md +41 -20
- package/package.json +2 -2
- package/dist/chunk-CYKKYNOT.js.map +0 -1
- package/dist/chunk-J2SH3PNH.js.map +0 -1
- package/dist/chunk-KBXADFBJ.cjs.map +0 -1
- package/dist/chunk-RXZSVNDG.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -3200,6 +3200,47 @@ declare class LiveSessionError extends TheokitAgentError {
|
|
|
3200
3200
|
*/
|
|
3201
3201
|
declare function guardSessionDestruction(sessionId: string, live: readonly string[] | undefined): void;
|
|
3202
3202
|
|
|
3203
|
+
/** Which session to read, in the terms a host already has. */
|
|
3204
|
+
interface ReadSessionMessagesOptions {
|
|
3205
|
+
/** The session's agent id — the same id `Agent` was created or resumed with. */
|
|
3206
|
+
sessionId: string;
|
|
3207
|
+
/**
|
|
3208
|
+
* The working directory the session belongs to. Sessions are per-cwd, so the same
|
|
3209
|
+
* id under a different cwd is a different session. Defaults to `process.cwd()`.
|
|
3210
|
+
*/
|
|
3211
|
+
cwd?: string;
|
|
3212
|
+
/**
|
|
3213
|
+
* Where transcripts live. Only needed when the agent was created with
|
|
3214
|
+
* `local.sessionDir`; otherwise the SDK's default location is used.
|
|
3215
|
+
*/
|
|
3216
|
+
sessionDir?: string;
|
|
3217
|
+
}
|
|
3218
|
+
/**
|
|
3219
|
+
* Read the messages a session already contains, for a surface that needs to re-render it.
|
|
3220
|
+
*
|
|
3221
|
+
* #546 — the SDK read these records to give the model its context on resume, and a host had
|
|
3222
|
+
* no way to read the same thing: a resumed session showed an empty screen while the model
|
|
3223
|
+
* demonstrably remembered. The alternative was for the host to parse
|
|
3224
|
+
* `<sessionDir>/projects/<encoded-cwd>/<id>.jsonl` itself, which is a private contract —
|
|
3225
|
+
* both the record shape and the directory encoding are the SDK's to change.
|
|
3226
|
+
*
|
|
3227
|
+
* This is deliberately narrower than the internal reader it wraps. That one takes a
|
|
3228
|
+
* {@link SessionStore}, and exporting it would put that interface, its record shape and its
|
|
3229
|
+
* lease semantics into the public surface to serve a caller that only wants to render what
|
|
3230
|
+
* is already there. A host that HAS a custom store can already read from it directly.
|
|
3231
|
+
*
|
|
3232
|
+
* Parsing stays tolerant, as it is on the resume path: a malformed line costs one message,
|
|
3233
|
+
* not the screen. A session that was never written resolves to `[]` rather than throwing —
|
|
3234
|
+
* a fresh session has no history, which is not an error.
|
|
3235
|
+
*
|
|
3236
|
+
* @example
|
|
3237
|
+
* ```ts
|
|
3238
|
+
* const history = await readSessionMessages({ sessionId, cwd: projectDir });
|
|
3239
|
+
* for (const m of history) render(m.role, m.text);
|
|
3240
|
+
* ```
|
|
3241
|
+
*/
|
|
3242
|
+
declare function readSessionMessages(options: ReadSessionMessagesOptions): Promise<SessionMessage[]>;
|
|
3243
|
+
|
|
3203
3244
|
/**
|
|
3204
3245
|
* M3 #62 — scoped session state.
|
|
3205
3246
|
*
|
|
@@ -4122,4 +4163,4 @@ interface WiringRecordInput<K extends string> {
|
|
|
4122
4163
|
*/
|
|
4123
4164
|
declare function recordWiring<K extends string>(input: WiringRecordInput<K>): Readonly<Record<K, WiredEntity>>;
|
|
4124
4165
|
|
|
4125
|
-
export { Agent, AgentBuilder, AgentDefinition, type AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, type BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, type CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, type JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, type LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, type MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, type Processor, Provider, type ProviderProfile, ProviderRoutingSettings, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink$1 as RunEventSink, RunResult, type SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, type ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, emitRunEvent, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
|
|
4166
|
+
export { Agent, AgentBuilder, AgentDefinition, type AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, type BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, type CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, type JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, type LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, type MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, type Processor, Provider, type ProviderProfile, ProviderRoutingSettings, type ReadSessionMessagesOptions, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink$1 as RunEventSink, RunResult, type SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, type ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, emitRunEvent, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, readSessionMessages, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
|
package/dist/index.d.ts
CHANGED
|
@@ -3200,6 +3200,47 @@ declare class LiveSessionError extends TheokitAgentError {
|
|
|
3200
3200
|
*/
|
|
3201
3201
|
declare function guardSessionDestruction(sessionId: string, live: readonly string[] | undefined): void;
|
|
3202
3202
|
|
|
3203
|
+
/** Which session to read, in the terms a host already has. */
|
|
3204
|
+
interface ReadSessionMessagesOptions {
|
|
3205
|
+
/** The session's agent id — the same id `Agent` was created or resumed with. */
|
|
3206
|
+
sessionId: string;
|
|
3207
|
+
/**
|
|
3208
|
+
* The working directory the session belongs to. Sessions are per-cwd, so the same
|
|
3209
|
+
* id under a different cwd is a different session. Defaults to `process.cwd()`.
|
|
3210
|
+
*/
|
|
3211
|
+
cwd?: string;
|
|
3212
|
+
/**
|
|
3213
|
+
* Where transcripts live. Only needed when the agent was created with
|
|
3214
|
+
* `local.sessionDir`; otherwise the SDK's default location is used.
|
|
3215
|
+
*/
|
|
3216
|
+
sessionDir?: string;
|
|
3217
|
+
}
|
|
3218
|
+
/**
|
|
3219
|
+
* Read the messages a session already contains, for a surface that needs to re-render it.
|
|
3220
|
+
*
|
|
3221
|
+
* #546 — the SDK read these records to give the model its context on resume, and a host had
|
|
3222
|
+
* no way to read the same thing: a resumed session showed an empty screen while the model
|
|
3223
|
+
* demonstrably remembered. The alternative was for the host to parse
|
|
3224
|
+
* `<sessionDir>/projects/<encoded-cwd>/<id>.jsonl` itself, which is a private contract —
|
|
3225
|
+
* both the record shape and the directory encoding are the SDK's to change.
|
|
3226
|
+
*
|
|
3227
|
+
* This is deliberately narrower than the internal reader it wraps. That one takes a
|
|
3228
|
+
* {@link SessionStore}, and exporting it would put that interface, its record shape and its
|
|
3229
|
+
* lease semantics into the public surface to serve a caller that only wants to render what
|
|
3230
|
+
* is already there. A host that HAS a custom store can already read from it directly.
|
|
3231
|
+
*
|
|
3232
|
+
* Parsing stays tolerant, as it is on the resume path: a malformed line costs one message,
|
|
3233
|
+
* not the screen. A session that was never written resolves to `[]` rather than throwing —
|
|
3234
|
+
* a fresh session has no history, which is not an error.
|
|
3235
|
+
*
|
|
3236
|
+
* @example
|
|
3237
|
+
* ```ts
|
|
3238
|
+
* const history = await readSessionMessages({ sessionId, cwd: projectDir });
|
|
3239
|
+
* for (const m of history) render(m.role, m.text);
|
|
3240
|
+
* ```
|
|
3241
|
+
*/
|
|
3242
|
+
declare function readSessionMessages(options: ReadSessionMessagesOptions): Promise<SessionMessage[]>;
|
|
3243
|
+
|
|
3203
3244
|
/**
|
|
3204
3245
|
* M3 #62 — scoped session state.
|
|
3205
3246
|
*
|
|
@@ -4122,4 +4163,4 @@ interface WiringRecordInput<K extends string> {
|
|
|
4122
4163
|
*/
|
|
4123
4164
|
declare function recordWiring<K extends string>(input: WiringRecordInput<K>): Readonly<Record<K, WiredEntity>>;
|
|
4124
4165
|
|
|
4125
|
-
export { Agent, AgentBuilder, AgentDefinition, type AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, type BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, type CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, type JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, type LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, type MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, type Processor, Provider, type ProviderProfile, ProviderRoutingSettings, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink$1 as RunEventSink, RunResult, type SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, type ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, emitRunEvent, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
|
|
4166
|
+
export { Agent, AgentBuilder, AgentDefinition, type AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, type BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, type CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, type JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, type LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, type MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, type Processor, Provider, type ProviderProfile, ProviderRoutingSettings, type ReadSessionMessagesOptions, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink$1 as RunEventSink, RunResult, type SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, type ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, emitRunEvent, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, readSessionMessages, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
export { StreamObjectError } from './chunk-5WKQDIGO.js';
|
|
2
2
|
export { GOAL_CONTINUATION_MARKER } from './chunk-PY2RQOA7.js';
|
|
3
3
|
export { JudgeCredentialError } from './chunk-UFPUHJWS.js';
|
|
4
|
-
import { migrateSqliteToLance, appendDiaryEntry } from './chunk-
|
|
4
|
+
import { migrateSqliteToLance, appendDiaryEntry } from './chunk-WS5ULCL4.js';
|
|
5
5
|
export { GenerateObjectError } from './chunk-44I6UYVH.js';
|
|
6
6
|
import './chunk-47TF32NQ.js';
|
|
7
7
|
import { Workflow, agentStep } from './chunk-HFEJE7AC.js';
|
|
8
8
|
export { Workflow, agentStep, fn } from './chunk-HFEJE7AC.js';
|
|
9
9
|
import './chunk-GBCVPKHE.js';
|
|
10
10
|
import './chunk-HY66GLM6.js';
|
|
11
|
-
export { Cron } from './chunk-
|
|
12
|
-
import { MEMORY_EMBEDDING_ADAPTERS, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-
|
|
13
|
-
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-
|
|
11
|
+
export { Cron } from './chunk-M3QNTHMV.js';
|
|
12
|
+
import { MEMORY_EMBEDDING_ADAPTERS, resolveSessionDir, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-OXQSNOYV.js';
|
|
13
|
+
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-OXQSNOYV.js';
|
|
14
14
|
import { configure, submit, list, get, cancel, subscribe } from './chunk-K2VMFZQ5.js';
|
|
15
15
|
export { emitRunEvent } from './chunk-K2VMFZQ5.js';
|
|
16
16
|
import './chunk-AWINL3ZC.js';
|
|
17
17
|
import './chunk-K2BQQ445.js';
|
|
18
|
-
import './chunk-
|
|
18
|
+
import './chunk-7SZAV6QG.js';
|
|
19
19
|
import './chunk-XJZEBGXD.js';
|
|
20
20
|
import './chunk-2SFBB54R.js';
|
|
21
21
|
import './chunk-55GB6JYQ.js';
|
|
22
22
|
import './chunk-H73MEMQB.js';
|
|
23
23
|
import './chunk-OR6XIWLB.js';
|
|
24
|
-
import { resolveMemoryRoot, readFactsFromMarkdown } from './chunk-
|
|
25
|
-
import './chunk-AAEZSPTC.js';
|
|
24
|
+
import { resolveMemoryRoot, readFactsFromMarkdown } from './chunk-SADXXGWU.js';
|
|
25
|
+
import { FsSessionStore } from './chunk-AAEZSPTC.js';
|
|
26
26
|
import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-K3NH62DG.js';
|
|
27
27
|
import './chunk-UBR5PWD7.js';
|
|
28
28
|
import './chunk-2XC6KDJM.js';
|
|
29
29
|
import './chunk-XB4GI5RZ.js';
|
|
30
30
|
import './chunk-24MGQDK3.js';
|
|
31
|
-
import './chunk-2WXHA33T.js';
|
|
31
|
+
import { readSessionMessages } from './chunk-2WXHA33T.js';
|
|
32
32
|
import './chunk-HKCKOAIO.js';
|
|
33
33
|
import './chunk-N6OOOYFZ.js';
|
|
34
34
|
import './chunk-KVNWIAO4.js';
|
|
@@ -1297,7 +1297,7 @@ var Memory = {
|
|
|
1297
1297
|
openArgs.embedding = await resolveEmbedding(opts.embedding, peer.MEMORY_EMBEDDING_ADAPTERS);
|
|
1298
1298
|
return await peer.IndexManager.open(openArgs);
|
|
1299
1299
|
}
|
|
1300
|
-
const { IndexManager } = await import('./index-manager-
|
|
1300
|
+
const { IndexManager } = await import('./index-manager-W7FDMGEG.js');
|
|
1301
1301
|
openArgs.embedding = await resolveEmbedding(opts.embedding, MEMORY_EMBEDDING_ADAPTERS);
|
|
1302
1302
|
return await IndexManager.open(openArgs);
|
|
1303
1303
|
},
|
|
@@ -1730,6 +1730,13 @@ function guardSessionDestruction(sessionId, live) {
|
|
|
1730
1730
|
}
|
|
1731
1731
|
}
|
|
1732
1732
|
|
|
1733
|
+
// src/session-messages.ts
|
|
1734
|
+
async function readSessionMessages2(options) {
|
|
1735
|
+
const cwd = options.cwd ?? process.cwd();
|
|
1736
|
+
const baseDir = resolveSessionDir({ sessionDir: options.sessionDir });
|
|
1737
|
+
return readSessionMessages(new FsSessionStore({ baseDir, cwd }), options.sessionId);
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1733
1740
|
// src/session-scope.ts
|
|
1734
1741
|
function scopedConversationId(scope, id) {
|
|
1735
1742
|
return `${scope}__${id}`;
|
|
@@ -1743,7 +1750,7 @@ function isBuiltAgent(m) {
|
|
|
1743
1750
|
return typeof m.send === "function";
|
|
1744
1751
|
}
|
|
1745
1752
|
async function materialize(def, index) {
|
|
1746
|
-
const { Agent: Agent2 } = await import('./agent-
|
|
1753
|
+
const { Agent: Agent2 } = await import('./agent-HACVHN2V.js');
|
|
1747
1754
|
return Agent2.create({
|
|
1748
1755
|
// `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
|
|
1749
1756
|
// here means "declare nothing and let the default apply" — forwarding the literal would create
|
|
@@ -2277,6 +2284,6 @@ function recordWiring(input) {
|
|
|
2277
2284
|
return record;
|
|
2278
2285
|
}
|
|
2279
2286
|
|
|
2280
|
-
export { AgentFactory, Budget, EventBus, JobQueue, LayerOrderError, LiveSessionError, Memory, NoopMemoryProvider, PermissionEngine, PermissionPlugin, Plugin, Provider, RetentionPolicyError, SOVEREIGN_ENV_KEYS, Security, Skill, SkillReadTool, Squad, Task, Theokit, TokenLimiter, UngatedCapabilityError, UnicodeNormalizer, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, evaluateBlastRadius, extractRawId, foldLayers, guardSessionDestruction, inferApiMode, loadProjectEnv, migrateSqliteToLance2 as migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius };
|
|
2287
|
+
export { AgentFactory, Budget, EventBus, JobQueue, LayerOrderError, LiveSessionError, Memory, NoopMemoryProvider, PermissionEngine, PermissionPlugin, Plugin, Provider, RetentionPolicyError, SOVEREIGN_ENV_KEYS, Security, Skill, SkillReadTool, Squad, Task, Theokit, TokenLimiter, UngatedCapabilityError, UnicodeNormalizer, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, evaluateBlastRadius, extractRawId, foldLayers, guardSessionDestruction, inferApiMode, loadProjectEnv, migrateSqliteToLance2 as migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, readSessionMessages2 as readSessionMessages, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius };
|
|
2281
2288
|
//# sourceMappingURL=index.js.map
|
|
2282
2289
|
//# sourceMappingURL=index.js.map
|