@downcity/agent 1.1.408 → 1.1.437
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/README.md +63 -51
- package/bin/agent/Agent.d.ts +39 -17
- package/bin/agent/Agent.d.ts.map +1 -1
- package/bin/agent/Agent.js +169 -71
- package/bin/agent/Agent.js.map +1 -1
- package/bin/agent/AgentInstructions.d.ts +1 -1
- package/bin/agent/AgentInstructions.js +3 -3
- package/bin/agent/AgentInstructions.js.map +1 -1
- package/bin/agent/AgentMemoryStorage.d.ts +18 -0
- package/bin/agent/AgentMemoryStorage.d.ts.map +1 -0
- package/bin/agent/AgentMemoryStorage.js +176 -0
- package/bin/agent/AgentMemoryStorage.js.map +1 -0
- package/bin/agent/AgentSessions.d.ts +32 -33
- package/bin/agent/AgentSessions.d.ts.map +1 -1
- package/bin/agent/AgentSessions.js +122 -72
- package/bin/agent/AgentSessions.js.map +1 -1
- package/bin/executor/Executor.d.ts +12 -30
- package/bin/executor/Executor.d.ts.map +1 -1
- package/bin/executor/Executor.js +39 -121
- package/bin/executor/Executor.js.map +1 -1
- package/bin/executor/composer/system/default/SystemPromptAssets.d.ts +0 -4
- package/bin/executor/composer/system/default/SystemPromptAssets.d.ts.map +1 -1
- package/bin/executor/composer/system/default/SystemPromptAssets.js +1 -6
- package/bin/executor/composer/system/default/SystemPromptAssets.js.map +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.d.ts +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.d.ts.map +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.js +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.js.map +1 -1
- package/bin/executor/core-engine/CoreEngineContextCompaction.d.ts +3 -9
- package/bin/executor/core-engine/CoreEngineContextCompaction.d.ts.map +1 -1
- package/bin/executor/core-engine/CoreEngineContextCompaction.js +4 -130
- package/bin/executor/core-engine/CoreEngineContextCompaction.js.map +1 -1
- package/bin/executor/core-engine/CoreEngineError.d.ts +1 -1
- package/bin/executor/core-engine/CoreEngineError.d.ts.map +1 -1
- package/bin/executor/core-engine/CoreEngineLoopDecision.d.ts +1 -1
- package/bin/executor/core-engine/CoreEngineRunner.d.ts +3 -30
- package/bin/executor/core-engine/CoreEngineRunner.d.ts.map +1 -1
- package/bin/executor/core-engine/CoreEngineRunner.js +83 -245
- package/bin/executor/core-engine/CoreEngineRunner.js.map +1 -1
- package/bin/executor/core-engine/CoreEngineSignals.d.ts +7 -7
- package/bin/executor/core-engine/CoreEngineSignals.d.ts.map +1 -1
- package/bin/executor/core-engine/CoreEngineSignals.js +1 -1
- package/bin/executor/core-engine/CoreEngineSignals.js.map +1 -1
- package/bin/executor/messages/SessionAttachmentMapper.d.ts +2 -2
- package/bin/executor/messages/SessionAttachmentMapper.d.ts.map +1 -1
- package/bin/executor/messages/SessionAttachmentMapper.js.map +1 -1
- package/bin/executor/messages/SessionMessageLog.d.ts +3 -3
- package/bin/executor/messages/SessionMessageLog.d.ts.map +1 -1
- package/bin/executor/messages/SessionMessageLog.js.map +1 -1
- package/bin/executor/messages/SessionModelMessages.d.ts +1 -4
- package/bin/executor/messages/SessionModelMessages.d.ts.map +1 -1
- package/bin/executor/messages/SessionModelMessages.js +81 -91
- package/bin/executor/messages/SessionModelMessages.js.map +1 -1
- package/bin/executor/model/ModelGenerate.d.ts +12 -2
- package/bin/executor/model/ModelGenerate.d.ts.map +1 -1
- package/bin/executor/model/ModelGenerate.js +23 -15
- package/bin/executor/model/ModelGenerate.js.map +1 -1
- package/bin/executor/model/ModelRequestRunner.d.ts +29 -0
- package/bin/executor/model/ModelRequestRunner.d.ts.map +1 -0
- package/bin/executor/model/ModelRequestRunner.js +77 -0
- package/bin/executor/model/ModelRequestRunner.js.map +1 -0
- package/bin/executor/model/ModelStepRunner.d.ts +3 -7
- package/bin/executor/model/ModelStepRunner.d.ts.map +1 -1
- package/bin/executor/model/ModelStepRunner.js +9 -41
- package/bin/executor/model/ModelStepRunner.js.map +1 -1
- package/bin/executor/model/ModelStreamConsumer.d.ts +12 -0
- package/bin/executor/model/ModelStreamConsumer.d.ts.map +1 -0
- package/bin/executor/model/ModelStreamConsumer.js +60 -0
- package/bin/executor/model/ModelStreamConsumer.js.map +1 -0
- package/bin/executor/model/ModelStreamFailure.d.ts +4 -0
- package/bin/executor/model/ModelStreamFailure.d.ts.map +1 -1
- package/bin/executor/model/ModelStreamFailure.js +21 -0
- package/bin/executor/model/ModelStreamFailure.js.map +1 -1
- package/bin/executor/services/ExecutorRecoveryPolicy.d.ts +7 -64
- package/bin/executor/services/ExecutorRecoveryPolicy.d.ts.map +1 -1
- package/bin/executor/services/ExecutorRecoveryPolicy.js +29 -45
- package/bin/executor/services/ExecutorRecoveryPolicy.js.map +1 -1
- package/bin/executor/types/SessionHistoryMeta.d.ts +6 -8
- package/bin/executor/types/SessionHistoryMeta.d.ts.map +1 -1
- package/bin/executor/types/SessionHistoryMeta.js +1 -1
- package/bin/group/Group.d.ts +22 -3
- package/bin/group/Group.d.ts.map +1 -1
- package/bin/group/Group.js +54 -4
- package/bin/group/Group.js.map +1 -1
- package/bin/group/GroupDispatchRuntime.d.ts +37 -0
- package/bin/group/GroupDispatchRuntime.d.ts.map +1 -0
- package/bin/group/{GroupDispatchSession.js → GroupDispatchRuntime.js} +77 -21
- package/bin/group/GroupDispatchRuntime.js.map +1 -0
- package/bin/group/GroupSession.d.ts +20 -6
- package/bin/group/GroupSession.d.ts.map +1 -1
- package/bin/group/GroupSession.js +148 -84
- package/bin/group/GroupSession.js.map +1 -1
- package/bin/group/GroupSessions.d.ts +1 -1
- package/bin/group/GroupSessions.d.ts.map +1 -1
- package/bin/group/GroupSessions.js +11 -10
- package/bin/group/GroupSessions.js.map +1 -1
- package/bin/group/index.d.ts +1 -1
- package/bin/group/index.d.ts.map +1 -1
- package/bin/{workspace/store → group/storage}/LocalGroupSessionDataStore.d.ts +11 -3
- package/bin/group/storage/LocalGroupSessionDataStore.d.ts.map +1 -0
- package/bin/{workspace/store → group/storage}/LocalGroupSessionDataStore.js +89 -6
- package/bin/group/storage/LocalGroupSessionDataStore.js.map +1 -0
- package/bin/group/storage/LocalGroupSessionStore.d.ts.map +1 -0
- package/bin/{workspace/store → group/storage}/LocalGroupSessionStore.js +1 -1
- package/bin/group/storage/LocalGroupSessionStore.js.map +1 -0
- package/bin/index.d.ts +25 -55
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +9 -21
- package/bin/index.js.map +1 -1
- package/bin/session/DefaultSessionComposer.d.ts +13 -7
- package/bin/session/DefaultSessionComposer.d.ts.map +1 -1
- package/bin/session/DefaultSessionComposer.js +63 -24
- package/bin/session/DefaultSessionComposer.js.map +1 -1
- package/bin/session/Session.d.ts +27 -70
- package/bin/session/Session.d.ts.map +1 -1
- package/bin/session/Session.js +136 -446
- package/bin/session/Session.js.map +1 -1
- package/bin/session/SessionComposition.d.ts +49 -0
- package/bin/session/SessionComposition.d.ts.map +1 -0
- package/bin/session/SessionComposition.js +309 -0
- package/bin/session/SessionComposition.js.map +1 -0
- package/bin/session/SessionHookPoints.d.ts +15 -0
- package/bin/session/SessionHookPoints.d.ts.map +1 -0
- package/bin/session/SessionHookPoints.js +15 -0
- package/bin/session/SessionHookPoints.js.map +1 -0
- package/bin/session/SessionHooks.d.ts +38 -0
- package/bin/session/SessionHooks.d.ts.map +1 -0
- package/bin/session/SessionHooks.js +71 -0
- package/bin/session/SessionHooks.js.map +1 -0
- package/bin/session/SessionLoop.d.ts +18 -10
- package/bin/session/SessionLoop.d.ts.map +1 -1
- package/bin/session/SessionLoop.js +234 -213
- package/bin/session/SessionLoop.js.map +1 -1
- package/bin/session/SessionMessages.d.ts +57 -86
- package/bin/session/SessionMessages.d.ts.map +1 -1
- package/bin/session/SessionMessages.js +289 -506
- package/bin/session/SessionMessages.js.map +1 -1
- package/bin/session/SessionQueue.d.ts +1 -1
- package/bin/session/SessionQueue.d.ts.map +1 -1
- package/bin/session/SessionQueue.js +2 -1
- package/bin/session/SessionQueue.js.map +1 -1
- package/bin/session/SessionState.d.ts +7 -11
- package/bin/session/SessionState.d.ts.map +1 -1
- package/bin/session/SessionState.js +63 -95
- package/bin/session/SessionState.js.map +1 -1
- package/bin/session/SessionSystem.d.ts +6 -2
- package/bin/session/SessionSystem.d.ts.map +1 -1
- package/bin/session/SessionSystem.js +41 -1
- package/bin/session/SessionSystem.js.map +1 -1
- package/bin/session/SessionTitle.d.ts +37 -7
- package/bin/session/SessionTitle.d.ts.map +1 -1
- package/bin/session/SessionTitle.js +43 -37
- package/bin/session/SessionTitle.js.map +1 -1
- package/bin/session/browse/Browse.d.ts +34 -48
- package/bin/session/browse/Browse.d.ts.map +1 -1
- package/bin/session/browse/Browse.js +106 -354
- package/bin/session/browse/Browse.js.map +1 -1
- package/bin/session/browse/SessionMessageTimeline.d.ts +1 -1
- package/bin/session/browse/SessionMessageTimeline.d.ts.map +1 -1
- package/bin/session/browse/SessionMessageTimeline.js +61 -37
- package/bin/session/browse/SessionMessageTimeline.js.map +1 -1
- package/bin/session/composer/policies/AdaptivePartContextPolicy.d.ts +35 -0
- package/bin/session/composer/policies/AdaptivePartContextPolicy.d.ts.map +1 -0
- package/bin/session/composer/policies/AdaptivePartContextPolicy.js +256 -0
- package/bin/session/composer/policies/AdaptivePartContextPolicy.js.map +1 -0
- package/bin/session/composer/policies/FullHistoryContextPolicy.d.ts +24 -0
- package/bin/session/composer/policies/FullHistoryContextPolicy.d.ts.map +1 -0
- package/bin/session/composer/policies/FullHistoryContextPolicy.js +31 -0
- package/bin/session/composer/policies/FullHistoryContextPolicy.js.map +1 -0
- package/bin/session/composer/policies/SessionSummaryPrompts.d.ts +16 -0
- package/bin/session/composer/policies/SessionSummaryPrompts.d.ts.map +1 -0
- package/bin/session/composer/policies/SessionSummaryPrompts.js +32 -0
- package/bin/session/composer/policies/SessionSummaryPrompts.js.map +1 -0
- package/bin/session/control/SessionInteractions.d.ts +2 -2
- package/bin/session/control/SessionInteractions.d.ts.map +1 -1
- package/bin/session/execution/SessionAssistantOutputAdapter.d.ts +16 -5
- package/bin/session/execution/SessionAssistantOutputAdapter.d.ts.map +1 -1
- package/bin/session/execution/SessionAssistantOutputAdapter.js +7 -3
- package/bin/session/execution/SessionAssistantOutputAdapter.js.map +1 -1
- package/bin/session/execution/tools/SessionShellApprovalAdapter.d.ts +3 -3
- package/bin/session/execution/tools/SessionShellApprovalAdapter.d.ts.map +1 -1
- package/bin/session/index.d.ts +8 -0
- package/bin/session/index.d.ts.map +1 -0
- package/bin/session/index.js +7 -0
- package/bin/session/index.js.map +1 -0
- package/bin/session/messages/SessionAgentActionPartWriter.d.ts +22 -0
- package/bin/session/messages/SessionAgentActionPartWriter.d.ts.map +1 -0
- package/bin/session/messages/SessionAgentActionPartWriter.js +36 -0
- package/bin/session/messages/SessionAgentActionPartWriter.js.map +1 -0
- package/bin/session/messages/SessionAgentContent.d.ts +10 -0
- package/bin/session/messages/SessionAgentContent.d.ts.map +1 -0
- package/bin/session/messages/SessionAgentContent.js +44 -0
- package/bin/session/messages/SessionAgentContent.js.map +1 -0
- package/bin/session/messages/SessionAgentMessageState.d.ts +50 -0
- package/bin/session/messages/SessionAgentMessageState.d.ts.map +1 -0
- package/bin/session/messages/SessionAgentMessageState.js +283 -0
- package/bin/session/messages/SessionAgentMessageState.js.map +1 -0
- package/bin/session/messages/{SessionAssistantMessageWriter.d.ts → SessionAgentMessageWriter.d.ts} +23 -9
- package/bin/session/messages/SessionAgentMessageWriter.d.ts.map +1 -0
- package/bin/session/messages/{SessionAssistantMessageWriter.js → SessionAgentMessageWriter.js} +56 -44
- package/bin/session/messages/SessionAgentMessageWriter.js.map +1 -0
- package/bin/session/messages/SessionForkMessageFiles.d.ts +22 -0
- package/bin/session/messages/SessionForkMessageFiles.d.ts.map +1 -0
- package/bin/session/messages/SessionForkMessageFiles.js +52 -0
- package/bin/session/messages/SessionForkMessageFiles.js.map +1 -0
- package/bin/session/messages/SessionJsonValue.d.ts +1 -1
- package/bin/session/messages/SessionJsonValue.d.ts.map +1 -1
- package/bin/session/messages/SessionMessageInteractionWriter.d.ts +7 -12
- package/bin/session/messages/SessionMessageInteractionWriter.d.ts.map +1 -1
- package/bin/session/messages/SessionMessageInteractionWriter.js +4 -4
- package/bin/session/messages/SessionMessageInteractionWriter.js.map +1 -1
- package/bin/session/messages/SessionMessageText.d.ts +4 -4
- package/bin/session/messages/SessionMessageText.d.ts.map +1 -1
- package/bin/session/messages/SessionMessageText.js +0 -2
- package/bin/session/messages/SessionMessageText.js.map +1 -1
- package/bin/session/messages/SessionTurnFileDiffBuilder.d.ts +15 -0
- package/bin/session/messages/SessionTurnFileDiffBuilder.d.ts.map +1 -0
- package/bin/session/messages/SessionTurnFileDiffBuilder.js +180 -0
- package/bin/session/messages/SessionTurnFileDiffBuilder.js.map +1 -0
- package/bin/session/messages/SessionTurnFileDiffData.d.ts +15 -0
- package/bin/session/messages/SessionTurnFileDiffData.d.ts.map +1 -0
- package/bin/session/messages/SessionTurnFileDiffData.js +59 -0
- package/bin/session/messages/SessionTurnFileDiffData.js.map +1 -0
- package/bin/session/messages/SessionUserContext.d.ts +13 -0
- package/bin/session/messages/SessionUserContext.d.ts.map +1 -0
- package/bin/session/messages/SessionUserContext.js +38 -0
- package/bin/session/messages/SessionUserContext.js.map +1 -0
- package/bin/session/messages/SessionUserMessage.d.ts +14 -0
- package/bin/session/messages/SessionUserMessage.d.ts.map +1 -0
- package/bin/session/messages/SessionUserMessage.js +74 -0
- package/bin/session/messages/SessionUserMessage.js.map +1 -0
- package/bin/session/preview/SessionMessagePreview.d.ts +1 -1
- package/bin/session/preview/SessionMessagePreview.d.ts.map +1 -1
- package/bin/session/preview/SessionMessagePreview.js +26 -10
- package/bin/session/preview/SessionMessagePreview.js.map +1 -1
- package/bin/session/runtime/SessionEventHub.d.ts +1 -1
- package/bin/session/runtime/SessionEventHub.d.ts.map +1 -1
- package/bin/session/runtime/SessionModelRequestWarning.d.ts +17 -0
- package/bin/session/runtime/SessionModelRequestWarning.d.ts.map +1 -0
- package/bin/session/runtime/SessionModelRequestWarning.js +19 -0
- package/bin/session/runtime/SessionModelRequestWarning.js.map +1 -0
- package/bin/session/runtime/SessionTitleTask.d.ts +2 -2
- package/bin/session/runtime/SessionTitleTask.d.ts.map +1 -1
- package/bin/session/runtime/SessionTitleTask.js +1 -1
- package/bin/session/runtime/SessionTitleTask.js.map +1 -1
- package/bin/session/runtime/SessionTurnCompletion.d.ts +15 -0
- package/bin/session/runtime/SessionTurnCompletion.d.ts.map +1 -0
- package/bin/session/runtime/SessionTurnCompletion.js +126 -0
- package/bin/session/runtime/SessionTurnCompletion.js.map +1 -0
- package/bin/session/runtime/SessionTurnContext.d.ts +6 -3
- package/bin/session/runtime/SessionTurnContext.d.ts.map +1 -1
- package/bin/session/runtime/SessionTurnContext.js +73 -38
- package/bin/session/runtime/SessionTurnContext.js.map +1 -1
- package/bin/session/runtime/SessionTurnFileDiff.d.ts +12 -0
- package/bin/session/runtime/SessionTurnFileDiff.d.ts.map +1 -0
- package/bin/session/runtime/SessionTurnFileDiff.js +71 -0
- package/bin/session/runtime/SessionTurnFileDiff.js.map +1 -0
- package/bin/{workspace/store → session/storage}/LocalSessionAttachmentStore.d.ts +11 -4
- package/bin/session/storage/LocalSessionAttachmentStore.d.ts.map +1 -0
- package/bin/{workspace/store → session/storage}/LocalSessionAttachmentStore.js +17 -2
- package/bin/session/storage/LocalSessionAttachmentStore.js.map +1 -0
- package/bin/session/storage/LocalSessionDataStore.d.ts +13 -0
- package/bin/session/storage/LocalSessionDataStore.d.ts.map +1 -0
- package/bin/session/storage/LocalSessionDataStore.js +28 -0
- package/bin/session/storage/LocalSessionDataStore.js.map +1 -0
- package/bin/{workspace/store → session/storage}/LocalSessionStore.d.ts +21 -10
- package/bin/session/storage/LocalSessionStore.d.ts.map +1 -0
- package/bin/session/storage/LocalSessionStore.js +329 -0
- package/bin/session/storage/LocalSessionStore.js.map +1 -0
- package/bin/session/storage/LocalStorePaths.d.ts +27 -0
- package/bin/session/storage/LocalStorePaths.d.ts.map +1 -0
- package/bin/session/storage/LocalStorePaths.js +69 -0
- package/bin/session/storage/LocalStorePaths.js.map +1 -0
- package/bin/session/storage/Metadata.d.ts +12 -9
- package/bin/session/storage/Metadata.d.ts.map +1 -1
- package/bin/session/storage/Metadata.js +8 -30
- package/bin/session/storage/Metadata.js.map +1 -1
- package/bin/session/storage/RuntimeSessionPort.d.ts +8 -8
- package/bin/session/storage/RuntimeSessionPort.d.ts.map +1 -1
- package/bin/session/storage/RuntimeSessionPort.js +6 -6
- package/bin/session/storage/RuntimeSessionPort.js.map +1 -1
- package/bin/session/storage/SessionStorageCodec.d.ts +59 -0
- package/bin/session/storage/SessionStorageCodec.d.ts.map +1 -0
- package/bin/session/storage/SessionStorageCodec.js +331 -0
- package/bin/session/storage/SessionStorageCodec.js.map +1 -0
- package/bin/session/storage/SessionStorageSchema.d.ts +11 -0
- package/bin/session/storage/SessionStorageSchema.d.ts.map +1 -0
- package/bin/session/storage/SessionStorageSchema.js +131 -0
- package/bin/session/storage/SessionStorageSchema.js.map +1 -0
- package/bin/session/storage/SqliteSessionStorage.d.ts +120 -0
- package/bin/session/storage/SqliteSessionStorage.d.ts.map +1 -0
- package/bin/session/storage/SqliteSessionStorage.js +581 -0
- package/bin/session/storage/SqliteSessionStorage.js.map +1 -0
- package/bin/tools/ask/AskQuestionsTool.d.ts.map +1 -1
- package/bin/tools/ask/AskQuestionsTool.js +3 -1
- package/bin/tools/ask/AskQuestionsTool.js.map +1 -1
- package/bin/tools/ask/AskQuestionsToolSchemas.d.ts +1 -1
- package/bin/types/action/ActionResult.d.ts +13 -9
- package/bin/types/action/ActionResult.d.ts.map +1 -1
- package/bin/types/action/ActionResult.js +2 -1
- package/bin/types/action/ActionResult.js.map +1 -1
- package/bin/types/agent/AgentOptions.d.ts +25 -18
- package/bin/types/agent/AgentOptions.d.ts.map +1 -1
- package/bin/types/agent/AgentSessionCollection.d.ts +17 -13
- package/bin/types/agent/AgentSessionCollection.d.ts.map +1 -1
- package/bin/types/agent/AgentStorage.d.ts +4 -2
- package/bin/types/agent/AgentStorage.d.ts.map +1 -1
- package/bin/types/agent/SessionActor.d.ts +11 -20
- package/bin/types/agent/SessionActor.d.ts.map +1 -1
- package/bin/types/agent/SessionTypes.d.ts +29 -37
- package/bin/types/agent/SessionTypes.d.ts.map +1 -1
- package/bin/types/executor/ModelRequest.d.ts +11 -0
- package/bin/types/executor/ModelRequest.d.ts.map +1 -0
- package/bin/types/executor/ModelRequest.js +7 -0
- package/bin/types/executor/ModelRequest.js.map +1 -0
- package/bin/types/executor/SessionAssistantOutput.d.ts +16 -5
- package/bin/types/executor/SessionAssistantOutput.d.ts.map +1 -1
- package/bin/types/executor/SessionToolExecutionContext.d.ts +3 -3
- package/bin/types/executor/SessionToolExecutionContext.d.ts.map +1 -1
- package/bin/types/executor/SessionTurnContext.d.ts +57 -34
- package/bin/types/executor/SessionTurnContext.d.ts.map +1 -1
- package/bin/types/group/DispatchStrategy.d.ts +62 -36
- package/bin/types/group/DispatchStrategy.d.ts.map +1 -1
- package/bin/types/group/DispatchStrategy.js +83 -39
- package/bin/types/group/DispatchStrategy.js.map +1 -1
- package/bin/types/group/Group.d.ts +8 -8
- package/bin/types/group/Group.d.ts.map +1 -1
- package/bin/types/group/{GroupDispatchSession.d.ts → GroupDispatch.d.ts} +21 -27
- package/bin/types/group/GroupDispatch.d.ts.map +1 -0
- package/bin/types/group/GroupDispatch.js +8 -0
- package/bin/types/group/GroupDispatch.js.map +1 -0
- package/bin/types/group/GroupSession.d.ts +14 -7
- package/bin/types/group/GroupSession.d.ts.map +1 -1
- package/bin/types/group/GroupSessionStore.d.ts +9 -5
- package/bin/types/group/GroupSessionStore.d.ts.map +1 -1
- package/bin/types/sdk/AgentSessionAction.d.ts +2 -2
- package/bin/types/sdk/AgentSessionAction.d.ts.map +1 -1
- package/bin/types/sdk/AgentSessionAction.js +1 -1
- package/bin/types/sdk/AgentSessionPrompt.d.ts +16 -6
- package/bin/types/sdk/AgentSessionPrompt.d.ts.map +1 -1
- package/bin/types/sdk/AgentSessionPrompt.js +7 -3
- package/bin/types/sdk/AgentSessionPrompt.js.map +1 -1
- package/bin/types/session/AdaptivePartContextPolicy.d.ts +31 -0
- package/bin/types/session/AdaptivePartContextPolicy.d.ts.map +1 -0
- package/bin/types/session/AdaptivePartContextPolicy.js +7 -0
- package/bin/types/session/AdaptivePartContextPolicy.js.map +1 -0
- package/bin/types/session/SessionAgentMessageState.d.ts +23 -0
- package/bin/types/session/SessionAgentMessageState.d.ts.map +1 -0
- package/bin/types/session/SessionAgentMessageState.js +8 -0
- package/bin/types/session/SessionAgentMessageState.js.map +1 -0
- package/bin/types/session/SessionCommand.d.ts +19 -7
- package/bin/types/session/SessionCommand.d.ts.map +1 -1
- package/bin/types/session/SessionComposer.d.ts +47 -41
- package/bin/types/session/SessionComposer.d.ts.map +1 -1
- package/bin/types/session/SessionComposer.js +2 -2
- package/bin/types/session/SessionComposition.d.ts +51 -0
- package/bin/types/session/SessionComposition.d.ts.map +1 -0
- package/bin/types/session/SessionComposition.js +8 -0
- package/bin/types/session/SessionComposition.js.map +1 -0
- package/bin/types/session/SessionContextPolicy.d.ts +70 -0
- package/bin/types/session/SessionContextPolicy.d.ts.map +1 -0
- package/bin/types/session/SessionContextPolicy.js +8 -0
- package/bin/types/session/SessionContextPolicy.js.map +1 -0
- package/bin/types/session/SessionExecution.d.ts +6 -33
- package/bin/types/session/SessionExecution.d.ts.map +1 -1
- package/bin/types/session/SessionInteractions.d.ts +1 -1
- package/bin/types/session/SessionInteractions.d.ts.map +1 -1
- package/bin/types/session/SessionLocalState.d.ts +2 -2
- package/bin/types/session/SessionLocalState.d.ts.map +1 -1
- package/bin/types/session/SessionLoop.d.ts +10 -9
- package/bin/types/session/SessionLoop.d.ts.map +1 -1
- package/bin/types/session/SessionMessages.d.ts +29 -30
- package/bin/types/session/SessionMessages.d.ts.map +1 -1
- package/bin/types/session/SessionOptions.d.ts +30 -44
- package/bin/types/session/SessionOptions.d.ts.map +1 -1
- package/bin/types/session/SessionPort.d.ts +14 -15
- package/bin/types/session/SessionPort.d.ts.map +1 -1
- package/bin/types/session/SessionPort.js +1 -1
- package/bin/types/session/SessionState.d.ts +6 -9
- package/bin/types/session/SessionState.d.ts.map +1 -1
- package/bin/types/session/SessionSystem.d.ts +16 -2
- package/bin/types/session/SessionSystem.d.ts.map +1 -1
- package/bin/types/session/SessionTool.d.ts +2 -2
- package/bin/types/session/SessionTool.d.ts.map +1 -1
- package/bin/types/session/SessionTurnCompletion.d.ts +23 -0
- package/bin/types/session/SessionTurnCompletion.d.ts.map +1 -0
- package/bin/types/session/SessionTurnCompletion.js +8 -0
- package/bin/types/session/SessionTurnCompletion.js.map +1 -0
- package/bin/types/session/SessionTurnFileDiff.d.ts +42 -0
- package/bin/types/session/SessionTurnFileDiff.d.ts.map +1 -0
- package/bin/types/session/SessionTurnFileDiff.js +8 -0
- package/bin/types/session/SessionTurnFileDiff.js.map +1 -0
- package/bin/types/store/LocalStore.d.ts +10 -14
- package/bin/types/store/LocalStore.d.ts.map +1 -1
- package/bin/types/store/LocalStore.js +2 -2
- package/bin/types/store/SessionAttachmentStore.d.ts +17 -2
- package/bin/types/store/SessionAttachmentStore.d.ts.map +1 -1
- package/bin/types/store/SessionAttachmentStore.js +2 -1
- package/bin/types/store/SessionAttachmentStore.js.map +1 -1
- package/bin/types/store/SessionStorage.d.ts +103 -0
- package/bin/types/store/SessionStorage.d.ts.map +1 -0
- package/bin/types/store/SessionStorage.js +8 -0
- package/bin/types/store/SessionStorage.js.map +1 -0
- package/bin/types/store/SessionStore.d.ts +11 -8
- package/bin/types/store/SessionStore.d.ts.map +1 -1
- package/bin/types/tools/ToolActionExecutionContext.d.ts +1 -1
- package/bin/types/tools/ToolActionExecutionContext.d.ts.map +1 -1
- package/bin/types/tools/ask/AskQuestionsTool.d.ts +1 -1
- package/bin/types/tools/ask/AskQuestionsTool.d.ts.map +1 -1
- package/bin/utils/logger/Logger.d.ts +12 -21
- package/bin/utils/logger/Logger.d.ts.map +1 -1
- package/bin/utils/logger/Logger.js +21 -39
- package/bin/utils/logger/Logger.js.map +1 -1
- package/package.json +7 -24
- package/scripts/ModelClientMock.mjs +11 -0
- package/scripts/core-engine-context-compaction.test.mjs +160 -220
- package/scripts/core-engine-model-stream.test.mjs +94 -4
- package/scripts/executor-failure-result.test.mjs +37 -22
- package/scripts/logger-isolation.test.mjs +17 -2
- package/scripts/public-api-naming.test.mjs +9 -15
- package/scripts/session-agent-message-part-order.test.mjs +63 -0
- package/scripts/session-initialization.test.mjs +141 -0
- package/scripts/session-message-timeline.test.mjs +5 -6
- package/scripts/session-messages-error-part.test.mjs +175 -0
- package/scripts/session-messages-error.test.mjs +47 -6
- package/scripts/session-prompt-idempotency.test.mjs +91 -0
- package/scripts/session-queue.test.mjs +13 -12
- package/scripts/session-storage-sqlite.test.mjs +209 -0
- package/scripts/session-turn-context.test.mjs +90 -42
- package/src/agent/Agent.ts +212 -91
- package/src/agent/AgentInstructions.ts +3 -3
- package/src/agent/AgentMemoryStorage.ts +208 -0
- package/src/agent/AgentSessions.ts +164 -88
- package/src/executor/Executor.ts +56 -177
- package/src/executor/README.md +19 -16
- package/src/executor/composer/system/default/SystemPromptAssets.ts +0 -6
- package/src/executor/composer/system/default/assets/core.prompt.ts +1 -1
- package/src/executor/composer/system/default/assets/core.prompt.ts.txt +8 -8
- package/src/executor/core-engine/CoreEngineContextCompaction.ts +3 -135
- package/src/executor/core-engine/CoreEngineError.ts +1 -1
- package/src/executor/core-engine/CoreEngineRunner.ts +93 -334
- package/src/executor/core-engine/CoreEngineSignals.ts +10 -10
- package/src/executor/messages/SessionAttachmentMapper.ts +4 -4
- package/src/executor/messages/SessionMessageLog.ts +3 -3
- package/src/executor/messages/SessionModelMessages.ts +87 -99
- package/src/executor/model/ModelGenerate.ts +59 -21
- package/src/executor/model/ModelRequestRunner.ts +107 -0
- package/src/executor/model/ModelStepRunner.ts +28 -60
- package/src/executor/model/ModelStreamConsumer.ts +76 -0
- package/src/executor/model/ModelStreamFailure.ts +28 -0
- package/src/executor/services/ExecutorRecoveryPolicy.ts +34 -127
- package/src/executor/types/SessionHistoryMeta.ts +6 -8
- package/src/group/Group.ts +60 -5
- package/src/group/GroupDispatchRuntime.ts +233 -0
- package/src/group/GroupSession.ts +168 -93
- package/src/group/GroupSessions.ts +12 -11
- package/src/group/index.ts +4 -2
- package/src/{workspace/store → group/storage}/LocalGroupSessionDataStore.ts +99 -8
- package/src/{workspace/store → group/storage}/LocalGroupSessionStore.ts +2 -2
- package/src/index.ts +84 -208
- package/src/session/DefaultSessionComposer.ts +77 -32
- package/src/session/Session.ts +167 -529
- package/src/session/SessionComposition.ts +370 -0
- package/src/session/SessionHookPoints.ts +17 -0
- package/src/session/SessionHooks.ts +85 -0
- package/src/session/SessionLoop.ts +289 -226
- package/src/session/SessionMessages.ts +380 -642
- package/src/session/SessionQueue.ts +3 -2
- package/src/session/SessionState.ts +71 -110
- package/src/session/SessionSystem.ts +53 -3
- package/src/session/SessionTitle.ts +55 -42
- package/src/session/browse/Browse.ts +188 -462
- package/src/session/browse/SessionMessageTimeline.ts +64 -39
- package/src/session/composer/policies/AdaptivePartContextPolicy.ts +307 -0
- package/src/session/composer/policies/FullHistoryContextPolicy.ts +36 -0
- package/src/session/composer/policies/SessionSummaryPrompts.ts +42 -0
- package/src/session/control/SessionInteractions.ts +1 -1
- package/src/session/execution/SessionAssistantOutputAdapter.ts +25 -11
- package/src/session/execution/tools/SessionShellApprovalAdapter.ts +2 -2
- package/src/session/index.ts +17 -0
- package/src/session/messages/SessionAgentActionPartWriter.ts +54 -0
- package/src/session/messages/SessionAgentContent.ts +56 -0
- package/src/session/messages/SessionAgentMessageState.ts +378 -0
- package/src/session/messages/{SessionAssistantMessageWriter.ts → SessionAgentMessageWriter.ts} +90 -61
- package/src/session/messages/SessionForkMessageFiles.ts +79 -0
- package/src/session/messages/SessionJsonValue.ts +1 -1
- package/src/session/messages/SessionMessageInteractionWriter.ts +23 -27
- package/src/session/messages/SessionMessageText.ts +5 -6
- package/src/session/messages/SessionTurnFileDiffBuilder.ts +229 -0
- package/src/session/messages/SessionTurnFileDiffData.ts +72 -0
- package/src/session/messages/SessionUserContext.ts +47 -0
- package/src/session/messages/SessionUserMessage.ts +88 -0
- package/src/session/preview/SessionMessagePreview.ts +27 -10
- package/src/session/runtime/SessionEventHub.ts +1 -1
- package/src/session/runtime/SessionModelRequestWarning.ts +29 -0
- package/src/session/runtime/SessionTitleTask.ts +3 -3
- package/src/session/runtime/SessionTurnCompletion.ts +159 -0
- package/src/session/runtime/SessionTurnContext.ts +96 -46
- package/src/session/runtime/SessionTurnFileDiff.ts +105 -0
- package/src/{workspace/store → session/storage}/LocalSessionAttachmentStore.ts +25 -4
- package/src/session/storage/LocalSessionDataStore.ts +41 -0
- package/src/session/storage/LocalSessionStore.ts +414 -0
- package/src/session/storage/LocalStorePaths.ts +123 -0
- package/src/session/storage/Metadata.ts +19 -36
- package/src/session/storage/RuntimeSessionPort.ts +11 -11
- package/src/session/storage/SessionStorageCodec.ts +465 -0
- package/src/session/storage/SessionStorageSchema.ts +132 -0
- package/src/session/storage/SqliteSessionStorage.ts +776 -0
- package/src/tools/ask/AskQuestionsTool.ts +5 -3
- package/src/types/action/ActionResult.ts +16 -11
- package/src/types/agent/AgentOptions.ts +27 -19
- package/src/types/agent/AgentSessionCollection.ts +19 -9
- package/src/types/agent/AgentStorage.ts +3 -1
- package/src/types/agent/SessionActor.ts +8 -17
- package/src/types/agent/SessionTypes.ts +32 -41
- package/src/types/executor/ModelRequest.ts +14 -0
- package/src/types/executor/SessionAssistantOutput.ts +15 -4
- package/src/types/executor/SessionToolExecutionContext.ts +1 -1
- package/src/types/executor/SessionTurnContext.ts +76 -35
- package/src/types/group/DispatchStrategy.ts +151 -77
- package/src/types/group/Group.ts +6 -6
- package/src/types/group/{GroupDispatchSession.ts → GroupDispatch.ts} +20 -25
- package/src/types/group/GroupSession.ts +9 -4
- package/src/types/group/GroupSessionStore.ts +8 -4
- package/src/types/sdk/AgentSessionAction.ts +2 -2
- package/src/types/sdk/AgentSessionPrompt.ts +21 -8
- package/src/types/session/AdaptivePartContextPolicy.ts +37 -0
- package/src/types/session/SessionAgentMessageState.ts +30 -0
- package/src/types/session/SessionCommand.ts +21 -7
- package/src/types/session/SessionComposer.ts +51 -45
- package/src/types/session/SessionComposition.ts +52 -0
- package/src/types/session/SessionContextPolicy.ts +77 -0
- package/src/types/session/SessionExecution.ts +11 -36
- package/src/types/session/SessionInteractions.ts +1 -1
- package/src/types/session/SessionLocalState.ts +1 -1
- package/src/types/session/SessionLoop.ts +8 -10
- package/src/types/session/SessionMessages.ts +31 -31
- package/src/types/session/SessionOptions.ts +27 -41
- package/src/types/session/SessionPort.ts +13 -13
- package/src/types/session/SessionState.ts +5 -8
- package/src/types/session/SessionSystem.ts +20 -1
- package/src/types/session/SessionTool.ts +2 -2
- package/src/types/session/SessionTurnCompletion.ts +24 -0
- package/src/types/session/SessionTurnFileDiff.ts +44 -0
- package/src/types/store/LocalStore.ts +10 -15
- package/src/types/store/SessionAttachmentStore.ts +19 -2
- package/src/types/store/SessionStorage.ts +121 -0
- package/src/types/store/SessionStore.ts +11 -7
- package/src/types/tools/ToolActionExecutionContext.ts +1 -1
- package/src/types/tools/ask/AskQuestionsTool.ts +1 -1
- package/src/utils/logger/Logger.ts +24 -42
- package/tsconfig.json +1 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/bin/agent/AgentModel.d.ts +0 -28
- package/bin/agent/AgentModel.d.ts.map +0 -1
- package/bin/agent/AgentModel.js +0 -57
- package/bin/agent/AgentModel.js.map +0 -1
- package/bin/agent/WorkspaceEntry.d.ts +0 -82
- package/bin/agent/WorkspaceEntry.d.ts.map +0 -1
- package/bin/agent/WorkspaceEntry.js +0 -246
- package/bin/agent/WorkspaceEntry.js.map +0 -1
- package/bin/city/host/CityHostRegistry.d.ts +0 -44
- package/bin/city/host/CityHostRegistry.d.ts.map +0 -1
- package/bin/city/host/CityHostRegistry.js +0 -225
- package/bin/city/host/CityHostRegistry.js.map +0 -1
- package/bin/city/index.d.ts +0 -22
- package/bin/city/index.d.ts.map +0 -1
- package/bin/city/index.js +0 -10
- package/bin/city/index.js.map +0 -1
- package/bin/city/runtime/City.d.ts +0 -99
- package/bin/city/runtime/City.d.ts.map +0 -1
- package/bin/city/runtime/City.js +0 -376
- package/bin/city/runtime/City.js.map +0 -1
- package/bin/city/transport/SerializedTransport.d.ts +0 -30
- package/bin/city/transport/SerializedTransport.d.ts.map +0 -1
- package/bin/city/transport/SerializedTransport.js +0 -57
- package/bin/city/transport/SerializedTransport.js.map +0 -1
- package/bin/city/transport/http/AgentHTTP.d.ts +0 -66
- package/bin/city/transport/http/AgentHTTP.d.ts.map +0 -1
- package/bin/city/transport/http/AgentHTTP.js +0 -142
- package/bin/city/transport/http/AgentHTTP.js.map +0 -1
- package/bin/city/transport/http/CityHTTP.d.ts +0 -44
- package/bin/city/transport/http/CityHTTP.d.ts.map +0 -1
- package/bin/city/transport/http/CityHTTP.js +0 -171
- package/bin/city/transport/http/CityHTTP.js.map +0 -1
- package/bin/city/transport/http/NodeHttpAdapter.d.ts +0 -27
- package/bin/city/transport/http/NodeHttpAdapter.d.ts.map +0 -1
- package/bin/city/transport/http/NodeHttpAdapter.js +0 -57
- package/bin/city/transport/http/NodeHttpAdapter.js.map +0 -1
- package/bin/city/transport/http/routes/RuntimeRoutes.d.ts +0 -15
- package/bin/city/transport/http/routes/RuntimeRoutes.d.ts.map +0 -1
- package/bin/city/transport/http/routes/RuntimeRoutes.js +0 -38
- package/bin/city/transport/http/routes/RuntimeRoutes.js.map +0 -1
- package/bin/city/transport/http/routes/SessionRoutes.d.ts +0 -17
- package/bin/city/transport/http/routes/SessionRoutes.d.ts.map +0 -1
- package/bin/city/transport/http/routes/SessionRoutes.js +0 -417
- package/bin/city/transport/http/routes/SessionRoutes.js.map +0 -1
- package/bin/city/transport/rpc/AgentRPC.d.ts +0 -47
- package/bin/city/transport/rpc/AgentRPC.d.ts.map +0 -1
- package/bin/city/transport/rpc/AgentRPC.js +0 -89
- package/bin/city/transport/rpc/AgentRPC.js.map +0 -1
- package/bin/city/transport/rpc/CityRPC.d.ts +0 -26
- package/bin/city/transport/rpc/CityRPC.d.ts.map +0 -1
- package/bin/city/transport/rpc/CityRPC.js +0 -110
- package/bin/city/transport/rpc/CityRPC.js.map +0 -1
- package/bin/city/transport/rpc/RpcServer.d.ts +0 -30
- package/bin/city/transport/rpc/RpcServer.d.ts.map +0 -1
- package/bin/city/transport/rpc/RpcServer.js +0 -125
- package/bin/city/transport/rpc/RpcServer.js.map +0 -1
- package/bin/city/transport/rpc/server/InternalHandlers.d.ts +0 -22
- package/bin/city/transport/rpc/server/InternalHandlers.d.ts.map +0 -1
- package/bin/city/transport/rpc/server/InternalHandlers.js +0 -196
- package/bin/city/transport/rpc/server/InternalHandlers.js.map +0 -1
- package/bin/city/transport/rpc/server/RequestDispatcher.d.ts +0 -27
- package/bin/city/transport/rpc/server/RequestDispatcher.d.ts.map +0 -1
- package/bin/city/transport/rpc/server/RequestDispatcher.js +0 -38
- package/bin/city/transport/rpc/server/RequestDispatcher.js.map +0 -1
- package/bin/city/transport/rpc/server/SdkSessionHandlers.d.ts +0 -25
- package/bin/city/transport/rpc/server/SdkSessionHandlers.d.ts.map +0 -1
- package/bin/city/transport/rpc/server/SdkSessionHandlers.js +0 -146
- package/bin/city/transport/rpc/server/SdkSessionHandlers.js.map +0 -1
- package/bin/city/transport/rpc/server/ServerTypes.d.ts +0 -94
- package/bin/city/transport/rpc/server/ServerTypes.d.ts.map +0 -1
- package/bin/city/transport/rpc/server/ServerTypes.js +0 -9
- package/bin/city/transport/rpc/server/ServerTypes.js.map +0 -1
- package/bin/city/transport/session/RemoteSessionConfig.d.ts +0 -15
- package/bin/city/transport/session/RemoteSessionConfig.d.ts.map +0 -1
- package/bin/city/transport/session/RemoteSessionConfig.js +0 -23
- package/bin/city/transport/session/RemoteSessionConfig.js.map +0 -1
- package/bin/city/transport/types/AgentHttpBinding.d.ts +0 -24
- package/bin/city/transport/types/AgentHttpBinding.d.ts.map +0 -1
- package/bin/city/transport/types/AgentHttpBinding.js +0 -5
- package/bin/city/transport/types/AgentHttpBinding.js.map +0 -1
- package/bin/city/transport/types/AgentHttpRuntime.d.ts +0 -12
- package/bin/city/transport/types/AgentHttpRuntime.d.ts.map +0 -1
- package/bin/city/transport/types/AgentHttpRuntime.js +0 -7
- package/bin/city/transport/types/AgentHttpRuntime.js.map +0 -1
- package/bin/city/transport/types/AgentRpcBinding.d.ts +0 -27
- package/bin/city/transport/types/AgentRpcBinding.d.ts.map +0 -1
- package/bin/city/transport/types/AgentRpcBinding.js +0 -8
- package/bin/city/transport/types/AgentRpcBinding.js.map +0 -1
- package/bin/city/transport/types/AgentRpcRuntime.d.ts +0 -18
- package/bin/city/transport/types/AgentRpcRuntime.d.ts.map +0 -1
- package/bin/city/transport/types/AgentRpcRuntime.js +0 -7
- package/bin/city/transport/types/AgentRpcRuntime.js.map +0 -1
- package/bin/city/transport/types/AgentSessionModelResolver.d.ts +0 -11
- package/bin/city/transport/types/AgentSessionModelResolver.d.ts.map +0 -1
- package/bin/city/transport/types/AgentSessionModelResolver.js +0 -7
- package/bin/city/transport/types/AgentSessionModelResolver.js.map +0 -1
- package/bin/city/transport/types/CityHttpRuntime.d.ts +0 -36
- package/bin/city/transport/types/CityHttpRuntime.d.ts.map +0 -1
- package/bin/city/transport/types/CityHttpRuntime.js +0 -8
- package/bin/city/transport/types/CityHttpRuntime.js.map +0 -1
- package/bin/city/transport/types/CityRpcRuntime.d.ts +0 -17
- package/bin/city/transport/types/CityRpcRuntime.d.ts.map +0 -1
- package/bin/city/transport/types/CityRpcRuntime.js +0 -8
- package/bin/city/transport/types/CityRpcRuntime.js.map +0 -1
- package/bin/city/transport/types/RpcProtocol.d.ts +0 -24
- package/bin/city/transport/types/RpcProtocol.d.ts.map +0 -1
- package/bin/city/transport/types/RpcProtocol.js +0 -9
- package/bin/city/transport/types/RpcProtocol.js.map +0 -1
- package/bin/city/types/City.d.ts +0 -84
- package/bin/city/types/City.d.ts.map +0 -1
- package/bin/city/types/City.js +0 -7
- package/bin/city/types/City.js.map +0 -1
- package/bin/city/types/PluginHostContext.d.ts +0 -34
- package/bin/city/types/PluginHostContext.d.ts.map +0 -1
- package/bin/city/types/PluginHostContext.js +0 -11
- package/bin/city/types/PluginHostContext.js.map +0 -1
- package/bin/city/types/SerializedTransport.d.ts +0 -16
- package/bin/city/types/SerializedTransport.d.ts.map +0 -1
- package/bin/city/types/SerializedTransport.js +0 -3
- package/bin/city/types/SerializedTransport.js.map +0 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionPrompts.d.ts +0 -45
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionPrompts.d.ts.map +0 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionPrompts.js +0 -144
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionPrompts.js.map +0 -1
- package/bin/executor/composer/system/SessionSystemComposer.d.ts +0 -23
- package/bin/executor/composer/system/SessionSystemComposer.d.ts.map +0 -1
- package/bin/executor/composer/system/SessionSystemComposer.js +0 -9
- package/bin/executor/composer/system/SessionSystemComposer.js.map +0 -1
- package/bin/executor/composer/system/default/DefaultSessionSystemComposer.d.ts +0 -43
- package/bin/executor/composer/system/default/DefaultSessionSystemComposer.d.ts.map +0 -1
- package/bin/executor/composer/system/default/DefaultSessionSystemComposer.js +0 -42
- package/bin/executor/composer/system/default/DefaultSessionSystemComposer.js.map +0 -1
- package/bin/executor/composer/system/default/PromptRenderer.d.ts +0 -35
- package/bin/executor/composer/system/default/PromptRenderer.d.ts.map +0 -1
- package/bin/executor/composer/system/default/PromptRenderer.js +0 -23
- package/bin/executor/composer/system/default/PromptRenderer.js.map +0 -1
- package/bin/executor/composer/system/default/SystemDomain.d.ts +0 -169
- package/bin/executor/composer/system/default/SystemDomain.d.ts.map +0 -1
- package/bin/executor/composer/system/default/SystemDomain.js +0 -201
- package/bin/executor/composer/system/default/SystemDomain.js.map +0 -1
- package/bin/executor/composer/system/default/assets/task.prompt.d.ts +0 -7
- package/bin/executor/composer/system/default/assets/task.prompt.d.ts.map +0 -1
- package/bin/executor/composer/system/default/assets/task.prompt.js +0 -8
- package/bin/executor/composer/system/default/assets/task.prompt.js.map +0 -1
- package/bin/executor/composer/system/default/variables/GeoContext.d.ts +0 -14
- package/bin/executor/composer/system/default/variables/GeoContext.d.ts.map +0 -1
- package/bin/executor/composer/system/default/variables/GeoContext.js +0 -150
- package/bin/executor/composer/system/default/variables/GeoContext.js.map +0 -1
- package/bin/executor/composer/system/default/variables/PromptTypes.d.ts +0 -36
- package/bin/executor/composer/system/default/variables/PromptTypes.d.ts.map +0 -1
- package/bin/executor/composer/system/default/variables/PromptTypes.js +0 -9
- package/bin/executor/composer/system/default/variables/PromptTypes.js.map +0 -1
- package/bin/executor/composer/system/default/variables/VariableReplacer.d.ts +0 -61
- package/bin/executor/composer/system/default/variables/VariableReplacer.d.ts.map +0 -1
- package/bin/executor/composer/system/default/variables/VariableReplacer.js +0 -93
- package/bin/executor/composer/system/default/variables/VariableReplacer.js.map +0 -1
- package/bin/executor/core-engine/CoreEngineMessageState.d.ts +0 -63
- package/bin/executor/core-engine/CoreEngineMessageState.d.ts.map +0 -1
- package/bin/executor/core-engine/CoreEngineMessageState.js +0 -81
- package/bin/executor/core-engine/CoreEngineMessageState.js.map +0 -1
- package/bin/group/GroupDispatchSession.d.ts +0 -36
- package/bin/group/GroupDispatchSession.d.ts.map +0 -1
- package/bin/group/GroupDispatchSession.js.map +0 -1
- package/bin/internal/AgentRuntime.d.ts +0 -43
- package/bin/internal/AgentRuntime.d.ts.map +0 -1
- package/bin/internal/AgentRuntime.js +0 -179
- package/bin/internal/AgentRuntime.js.map +0 -1
- package/bin/internal/GroupRuntime.d.ts +0 -17
- package/bin/internal/GroupRuntime.d.ts.map +0 -1
- package/bin/internal/GroupRuntime.js +0 -66
- package/bin/internal/GroupRuntime.js.map +0 -1
- package/bin/internal/index.d.ts +0 -8
- package/bin/internal/index.d.ts.map +0 -1
- package/bin/internal/index.js +0 -8
- package/bin/internal/index.js.map +0 -1
- package/bin/plugin/core/ActionScheduleExecutor.d.ts +0 -19
- package/bin/plugin/core/ActionScheduleExecutor.d.ts.map +0 -1
- package/bin/plugin/core/ActionScheduleExecutor.js +0 -58
- package/bin/plugin/core/ActionScheduleExecutor.js.map +0 -1
- package/bin/plugin/core/ActionScheduleRuntime.d.ts +0 -25
- package/bin/plugin/core/ActionScheduleRuntime.d.ts.map +0 -1
- package/bin/plugin/core/ActionScheduleRuntime.js +0 -62
- package/bin/plugin/core/ActionScheduleRuntime.js.map +0 -1
- package/bin/plugin/core/ActionScheduleStore.d.ts +0 -97
- package/bin/plugin/core/ActionScheduleStore.d.ts.map +0 -1
- package/bin/plugin/core/ActionScheduleStore.js +0 -313
- package/bin/plugin/core/ActionScheduleStore.js.map +0 -1
- package/bin/plugin/core/ActionScheduleTime.d.ts +0 -32
- package/bin/plugin/core/ActionScheduleTime.d.ts.map +0 -1
- package/bin/plugin/core/ActionScheduleTime.js +0 -108
- package/bin/plugin/core/ActionScheduleTime.js.map +0 -1
- package/bin/plugin/core/BasePlugin.d.ts +0 -59
- package/bin/plugin/core/BasePlugin.d.ts.map +0 -1
- package/bin/plugin/core/BasePlugin.js +0 -40
- package/bin/plugin/core/BasePlugin.js.map +0 -1
- package/bin/plugin/core/HookRegistry.d.ts +0 -67
- package/bin/plugin/core/HookRegistry.d.ts.map +0 -1
- package/bin/plugin/core/HookRegistry.js +0 -220
- package/bin/plugin/core/HookRegistry.js.map +0 -1
- package/bin/plugin/core/PluginActionExecution.d.ts +0 -33
- package/bin/plugin/core/PluginActionExecution.d.ts.map +0 -1
- package/bin/plugin/core/PluginActionExecution.js +0 -168
- package/bin/plugin/core/PluginActionExecution.js.map +0 -1
- package/bin/plugin/core/PluginActionFactory.d.ts +0 -93
- package/bin/plugin/core/PluginActionFactory.d.ts.map +0 -1
- package/bin/plugin/core/PluginActionFactory.js +0 -56
- package/bin/plugin/core/PluginActionFactory.js.map +0 -1
- package/bin/plugin/core/PluginCatalog.d.ts +0 -57
- package/bin/plugin/core/PluginCatalog.d.ts.map +0 -1
- package/bin/plugin/core/PluginCatalog.js +0 -117
- package/bin/plugin/core/PluginCatalog.js.map +0 -1
- package/bin/plugin/core/PluginContext.d.ts +0 -42
- package/bin/plugin/core/PluginContext.d.ts.map +0 -1
- package/bin/plugin/core/PluginContext.js +0 -35
- package/bin/plugin/core/PluginContext.js.map +0 -1
- package/bin/plugin/core/PluginHttpRoutes.d.ts +0 -24
- package/bin/plugin/core/PluginHttpRoutes.d.ts.map +0 -1
- package/bin/plugin/core/PluginHttpRoutes.js +0 -35
- package/bin/plugin/core/PluginHttpRoutes.js.map +0 -1
- package/bin/plugin/core/PluginRegistry.d.ts +0 -207
- package/bin/plugin/core/PluginRegistry.d.ts.map +0 -1
- package/bin/plugin/core/PluginRegistry.js +0 -675
- package/bin/plugin/core/PluginRegistry.js.map +0 -1
- package/bin/plugin/core/PluginStateController.d.ts +0 -16
- package/bin/plugin/core/PluginStateController.d.ts.map +0 -1
- package/bin/plugin/core/PluginStateController.js +0 -14
- package/bin/plugin/core/PluginStateController.js.map +0 -1
- package/bin/plugin/tool/PluginToolRuntime.d.ts +0 -15
- package/bin/plugin/tool/PluginToolRuntime.d.ts.map +0 -1
- package/bin/plugin/tool/PluginToolRuntime.js +0 -108
- package/bin/plugin/tool/PluginToolRuntime.js.map +0 -1
- package/bin/plugin/tool/PluginToolSchemas.d.ts +0 -36
- package/bin/plugin/tool/PluginToolSchemas.d.ts.map +0 -1
- package/bin/plugin/tool/PluginToolSchemas.js +0 -42
- package/bin/plugin/tool/PluginToolSchemas.js.map +0 -1
- package/bin/plugin/tool/PluginTools.d.ts +0 -22
- package/bin/plugin/tool/PluginTools.d.ts.map +0 -1
- package/bin/plugin/tool/PluginTools.js +0 -61
- package/bin/plugin/tool/PluginTools.js.map +0 -1
- package/bin/plugin/types/ActionSchedule.d.ts +0 -91
- package/bin/plugin/types/ActionSchedule.d.ts.map +0 -1
- package/bin/plugin/types/ActionSchedule.js +0 -10
- package/bin/plugin/types/ActionSchedule.js.map +0 -1
- package/bin/plugin/types/PluginApi.d.ts +0 -79
- package/bin/plugin/types/PluginApi.d.ts.map +0 -1
- package/bin/plugin/types/PluginApi.js +0 -9
- package/bin/plugin/types/PluginApi.js.map +0 -1
- package/bin/remote/RemoteAgent.d.ts +0 -36
- package/bin/remote/RemoteAgent.d.ts.map +0 -1
- package/bin/remote/RemoteAgent.js +0 -97
- package/bin/remote/RemoteAgent.js.map +0 -1
- package/bin/remote/RemoteSession.d.ts +0 -67
- package/bin/remote/RemoteSession.d.ts.map +0 -1
- package/bin/remote/RemoteSession.js +0 -275
- package/bin/remote/RemoteSession.js.map +0 -1
- package/bin/remote/RemoteTransport.d.ts +0 -80
- package/bin/remote/RemoteTransport.d.ts.map +0 -1
- package/bin/remote/RemoteTransport.js +0 -9
- package/bin/remote/RemoteTransport.js.map +0 -1
- package/bin/remote/TransportFactory.d.ts +0 -13
- package/bin/remote/TransportFactory.d.ts.map +0 -1
- package/bin/remote/TransportFactory.js +0 -22
- package/bin/remote/TransportFactory.js.map +0 -1
- package/bin/remote/transports/HttpRemoteAgentTransport.d.ts +0 -52
- package/bin/remote/transports/HttpRemoteAgentTransport.d.ts.map +0 -1
- package/bin/remote/transports/HttpRemoteAgentTransport.js +0 -399
- package/bin/remote/transports/HttpRemoteAgentTransport.js.map +0 -1
- package/bin/remote/transports/RpcClient.d.ts +0 -168
- package/bin/remote/transports/RpcClient.d.ts.map +0 -1
- package/bin/remote/transports/RpcClient.js +0 -484
- package/bin/remote/transports/RpcClient.js.map +0 -1
- package/bin/remote/transports/RpcRemoteAgentTransport.d.ts +0 -51
- package/bin/remote/transports/RpcRemoteAgentTransport.d.ts.map +0 -1
- package/bin/remote/transports/RpcRemoteAgentTransport.js +0 -102
- package/bin/remote/transports/RpcRemoteAgentTransport.js.map +0 -1
- package/bin/session/SessionCommand.d.ts +0 -24
- package/bin/session/SessionCommand.d.ts.map +0 -1
- package/bin/session/SessionCommand.js +0 -35
- package/bin/session/SessionCommand.js.map +0 -1
- package/bin/session/messages/SessionAssistantMessageWriter.d.ts.map +0 -1
- package/bin/session/messages/SessionAssistantMessageWriter.js.map +0 -1
- package/bin/session/messages/SessionMessageCompaction.d.ts +0 -26
- package/bin/session/messages/SessionMessageCompaction.d.ts.map +0 -1
- package/bin/session/messages/SessionMessageCompaction.js +0 -118
- package/bin/session/messages/SessionMessageCompaction.js.map +0 -1
- package/bin/session/runtime/SessionCompactOperation.d.ts +0 -29
- package/bin/session/runtime/SessionCompactOperation.d.ts.map +0 -1
- package/bin/session/runtime/SessionCompactOperation.js +0 -66
- package/bin/session/runtime/SessionCompactOperation.js.map +0 -1
- package/bin/session/runtime/SessionHistoryCompaction.d.ts +0 -22
- package/bin/session/runtime/SessionHistoryCompaction.d.ts.map +0 -1
- package/bin/session/runtime/SessionHistoryCompaction.js +0 -31
- package/bin/session/runtime/SessionHistoryCompaction.js.map +0 -1
- package/bin/types/agent/RemoteAgentOptions.d.ts +0 -28
- package/bin/types/agent/RemoteAgentOptions.d.ts.map +0 -1
- package/bin/types/agent/RemoteAgentOptions.js +0 -9
- package/bin/types/agent/RemoteAgentOptions.js.map +0 -1
- package/bin/types/agent/RemoteAgentPluginAction.d.ts +0 -46
- package/bin/types/agent/RemoteAgentPluginAction.d.ts.map +0 -1
- package/bin/types/agent/RemoteAgentPluginAction.js +0 -9
- package/bin/types/agent/RemoteAgentPluginAction.js.map +0 -1
- package/bin/types/agent/WorkspaceEntryOptions.d.ts +0 -16
- package/bin/types/agent/WorkspaceEntryOptions.d.ts.map +0 -1
- package/bin/types/agent/WorkspaceEntryOptions.js +0 -8
- package/bin/types/agent/WorkspaceEntryOptions.js.map +0 -1
- package/bin/types/common/Json.d.ts +0 -32
- package/bin/types/common/Json.d.ts.map +0 -1
- package/bin/types/common/Json.js +0 -9
- package/bin/types/common/Json.js.map +0 -1
- package/bin/types/common/Template.d.ts +0 -9
- package/bin/types/common/Template.d.ts.map +0 -1
- package/bin/types/common/Template.js +0 -9
- package/bin/types/common/Template.js.map +0 -1
- package/bin/types/group/GroupDispatchSession.d.ts.map +0 -1
- package/bin/types/group/GroupDispatchSession.js +0 -8
- package/bin/types/group/GroupDispatchSession.js.map +0 -1
- package/bin/types/plugin/AgentPluginContext.d.ts +0 -25
- package/bin/types/plugin/AgentPluginContext.d.ts.map +0 -1
- package/bin/types/plugin/AgentPluginContext.js +0 -10
- package/bin/types/plugin/AgentPluginContext.js.map +0 -1
- package/bin/types/plugin/PluginAction.d.ts +0 -161
- package/bin/types/plugin/PluginAction.d.ts.map +0 -1
- package/bin/types/plugin/PluginAction.js +0 -9
- package/bin/types/plugin/PluginAction.js.map +0 -1
- package/bin/types/plugin/PluginActionExecution.d.ts +0 -31
- package/bin/types/plugin/PluginActionExecution.d.ts.map +0 -1
- package/bin/types/plugin/PluginActionExecution.js +0 -10
- package/bin/types/plugin/PluginActionExecution.js.map +0 -1
- package/bin/types/plugin/PluginCommand.d.ts +0 -14
- package/bin/types/plugin/PluginCommand.d.ts.map +0 -1
- package/bin/types/plugin/PluginCommand.js +0 -7
- package/bin/types/plugin/PluginCommand.js.map +0 -1
- package/bin/types/plugin/PluginContext.d.ts +0 -45
- package/bin/types/plugin/PluginContext.d.ts.map +0 -1
- package/bin/types/plugin/PluginContext.js +0 -9
- package/bin/types/plugin/PluginContext.js.map +0 -1
- package/bin/types/plugin/PluginDefinition.d.ts +0 -44
- package/bin/types/plugin/PluginDefinition.d.ts.map +0 -1
- package/bin/types/plugin/PluginDefinition.js +0 -9
- package/bin/types/plugin/PluginDefinition.js.map +0 -1
- package/bin/types/plugin/PluginExecutionContext.d.ts +0 -23
- package/bin/types/plugin/PluginExecutionContext.d.ts.map +0 -1
- package/bin/types/plugin/PluginExecutionContext.js +0 -8
- package/bin/types/plugin/PluginExecutionContext.js.map +0 -1
- package/bin/types/plugin/PluginHttp.d.ts +0 -34
- package/bin/types/plugin/PluginHttp.d.ts.map +0 -1
- package/bin/types/plugin/PluginHttp.js +0 -9
- package/bin/types/plugin/PluginHttp.js.map +0 -1
- package/bin/types/plugin/PluginNotification.d.ts +0 -31
- package/bin/types/plugin/PluginNotification.d.ts.map +0 -1
- package/bin/types/plugin/PluginNotification.js +0 -8
- package/bin/types/plugin/PluginNotification.js.map +0 -1
- package/bin/types/plugin/PluginRegistry.d.ts +0 -21
- package/bin/types/plugin/PluginRegistry.d.ts.map +0 -1
- package/bin/types/plugin/PluginRegistry.js +0 -9
- package/bin/types/plugin/PluginRegistry.js.map +0 -1
- package/bin/types/plugin/PluginRuntime.d.ts +0 -267
- package/bin/types/plugin/PluginRuntime.d.ts.map +0 -1
- package/bin/types/plugin/PluginRuntime.js +0 -9
- package/bin/types/plugin/PluginRuntime.js.map +0 -1
- package/bin/types/plugin/PluginServices.d.ts +0 -10
- package/bin/types/plugin/PluginServices.d.ts.map +0 -1
- package/bin/types/plugin/PluginServices.js +0 -3
- package/bin/types/plugin/PluginServices.js.map +0 -1
- package/bin/types/plugin/PluginState.d.ts +0 -62
- package/bin/types/plugin/PluginState.d.ts.map +0 -1
- package/bin/types/plugin/PluginState.js +0 -10
- package/bin/types/plugin/PluginState.js.map +0 -1
- package/bin/types/plugin/PluginTool.d.ts +0 -92
- package/bin/types/plugin/PluginTool.d.ts.map +0 -1
- package/bin/types/plugin/PluginTool.js +0 -9
- package/bin/types/plugin/PluginTool.js.map +0 -1
- package/bin/types/rpc/RpcProtocol.d.ts +0 -417
- package/bin/types/rpc/RpcProtocol.d.ts.map +0 -1
- package/bin/types/rpc/RpcProtocol.js +0 -10
- package/bin/types/rpc/RpcProtocol.js.map +0 -1
- package/bin/types/sdk/AgentSessionCompact.d.ts +0 -31
- package/bin/types/sdk/AgentSessionCompact.d.ts.map +0 -1
- package/bin/types/sdk/AgentSessionCompact.js +0 -8
- package/bin/types/sdk/AgentSessionCompact.js.map +0 -1
- package/bin/types/session/SessionAction.d.ts +0 -39
- package/bin/types/session/SessionAction.d.ts.map +0 -1
- package/bin/types/session/SessionAction.js +0 -8
- package/bin/types/session/SessionAction.js.map +0 -1
- package/bin/types/session/SessionContent.d.ts +0 -41
- package/bin/types/session/SessionContent.d.ts.map +0 -1
- package/bin/types/session/SessionContent.js +0 -8
- package/bin/types/session/SessionContent.js.map +0 -1
- package/bin/types/session/SessionInteraction.d.ts +0 -215
- package/bin/types/session/SessionInteraction.d.ts.map +0 -1
- package/bin/types/session/SessionInteraction.js +0 -15
- package/bin/types/session/SessionInteraction.js.map +0 -1
- package/bin/types/session/SessionMessage.d.ts +0 -268
- package/bin/types/session/SessionMessage.d.ts.map +0 -1
- package/bin/types/session/SessionMessage.js +0 -8
- package/bin/types/session/SessionMessage.js.map +0 -1
- package/bin/types/session/SessionMutation.d.ts +0 -151
- package/bin/types/session/SessionMutation.d.ts.map +0 -1
- package/bin/types/session/SessionMutation.js +0 -20
- package/bin/types/session/SessionMutation.js.map +0 -1
- package/bin/types/session/SessionOrigin.d.ts +0 -19
- package/bin/types/session/SessionOrigin.d.ts.map +0 -1
- package/bin/types/session/SessionOrigin.js +0 -8
- package/bin/types/session/SessionOrigin.js.map +0 -1
- package/bin/types/session/SessionSegment.d.ts +0 -57
- package/bin/types/session/SessionSegment.d.ts.map +0 -1
- package/bin/types/session/SessionSegment.js +0 -8
- package/bin/types/session/SessionSegment.js.map +0 -1
- package/bin/types/store/SessionDataStore.d.ts +0 -85
- package/bin/types/store/SessionDataStore.d.ts.map +0 -1
- package/bin/types/store/SessionDataStore.js +0 -9
- package/bin/types/store/SessionDataStore.js.map +0 -1
- package/bin/utils/Template.d.ts +0 -17
- package/bin/utils/Template.d.ts.map +0 -1
- package/bin/utils/Template.js +0 -24
- package/bin/utils/Template.js.map +0 -1
- package/bin/workspace/WorkspacePaths.d.ts +0 -16
- package/bin/workspace/WorkspacePaths.d.ts.map +0 -1
- package/bin/workspace/WorkspacePaths.js +0 -35
- package/bin/workspace/WorkspacePaths.js.map +0 -1
- package/bin/workspace/store/JsonlSessionMessageStore.d.ts +0 -77
- package/bin/workspace/store/JsonlSessionMessageStore.d.ts.map +0 -1
- package/bin/workspace/store/JsonlSessionMessageStore.js +0 -419
- package/bin/workspace/store/JsonlSessionMessageStore.js.map +0 -1
- package/bin/workspace/store/LocalGroupDispatchSessionDataStore.d.ts +0 -28
- package/bin/workspace/store/LocalGroupDispatchSessionDataStore.d.ts.map +0 -1
- package/bin/workspace/store/LocalGroupDispatchSessionDataStore.js +0 -102
- package/bin/workspace/store/LocalGroupDispatchSessionDataStore.js.map +0 -1
- package/bin/workspace/store/LocalGroupSessionDataStore.d.ts.map +0 -1
- package/bin/workspace/store/LocalGroupSessionDataStore.js.map +0 -1
- package/bin/workspace/store/LocalGroupSessionStore.d.ts.map +0 -1
- package/bin/workspace/store/LocalGroupSessionStore.js.map +0 -1
- package/bin/workspace/store/LocalSessionAttachmentStore.d.ts.map +0 -1
- package/bin/workspace/store/LocalSessionAttachmentStore.js.map +0 -1
- package/bin/workspace/store/LocalSessionDataStore.d.ts +0 -45
- package/bin/workspace/store/LocalSessionDataStore.d.ts.map +0 -1
- package/bin/workspace/store/LocalSessionDataStore.js +0 -100
- package/bin/workspace/store/LocalSessionDataStore.js.map +0 -1
- package/bin/workspace/store/LocalSessionStore.d.ts.map +0 -1
- package/bin/workspace/store/LocalSessionStore.js +0 -177
- package/bin/workspace/store/LocalSessionStore.js.map +0 -1
- package/bin/workspace/store/LocalStorePaths.d.ts +0 -35
- package/bin/workspace/store/LocalStorePaths.d.ts.map +0 -1
- package/bin/workspace/store/LocalStorePaths.js +0 -62
- package/bin/workspace/store/LocalStorePaths.js.map +0 -1
- package/bin/workspace/store/SessionMessageStoreFactory.d.ts +0 -12
- package/bin/workspace/store/SessionMessageStoreFactory.d.ts.map +0 -1
- package/bin/workspace/store/SessionMessageStoreFactory.js +0 -13
- package/bin/workspace/store/SessionMessageStoreFactory.js.map +0 -1
- package/city-test/agent-http.test.mjs +0 -326
- package/city-test/city-container.test.mjs +0 -156
- package/city-test/city-host-registry.test.mjs +0 -68
- package/city-test/city-transport.test.mjs +0 -282
- package/city-test/group.test.mjs +0 -990
- package/city-test/session-model.test.mjs +0 -169
- package/city-test/transport-lifecycle.test.mjs +0 -164
- package/scripts/PlatformSandbox.mjs +0 -17
- package/scripts/action-schedule-store.test.mjs +0 -171
- package/scripts/agent-env-shell-sandbox.test.mjs +0 -94
- package/scripts/agent-env.test.mjs +0 -56
- package/scripts/agent-multi-workspace.test.mjs +0 -280
- package/scripts/agent-ready.test.mjs +0 -296
- package/scripts/agent-session-maintenance.test.mjs +0 -47
- package/scripts/agent-store.test.mjs +0 -182
- package/scripts/city-model-tool-loop.test.mjs +0 -95
- package/scripts/file-tools.test.mjs +0 -282
- package/scripts/image-plugin-job.test.mjs +0 -600
- package/scripts/multi-agent-plugin-isolation.test.mjs +0 -170
- package/scripts/plugin-tools.test.mjs +0 -556
- package/scripts/remote-session-reconnect.test.mjs +0 -183
- package/scripts/rpc-url-routing.test.mjs +0 -29
- package/scripts/search-tools.test.mjs +0 -188
- package/scripts/session-ask-question.test.mjs +0 -226
- package/scripts/session-attachments.test.mjs +0 -104
- package/scripts/session-compact-handle.test.mjs +0 -118
- package/scripts/session-compaction-prompts.test.mjs +0 -49
- package/scripts/session-composer.test.mjs +0 -208
- package/scripts/session-config-turn-boundary.test.mjs +0 -921
- package/scripts/session-dynamic-interaction.test.mjs +0 -75
- package/scripts/session-fork.test.mjs +0 -35
- package/scripts/session-list-title.test.mjs +0 -202
- package/scripts/session-messages.test.mjs +0 -490
- package/scripts/session-shell-approval.test.mjs +0 -179
- package/scripts/session-title-event.test.mjs +0 -282
- package/scripts/session-tool-approval.test.mjs +0 -173
- package/scripts/session-turn-failure.test.mjs +0 -363
- package/scripts/workspace.test.mjs +0 -260
- package/src/agent/AgentModel.ts +0 -66
- package/src/agent/WorkspaceEntry.ts +0 -309
- package/src/city/host/CityHostRegistry.ts +0 -260
- package/src/city/index.ts +0 -49
- package/src/city/runtime/City.ts +0 -425
- package/src/city/transport/SerializedTransport.ts +0 -65
- package/src/city/transport/http/AgentHTTP.ts +0 -176
- package/src/city/transport/http/CityHTTP.ts +0 -196
- package/src/city/transport/http/NodeHttpAdapter.ts +0 -75
- package/src/city/transport/http/routes/RuntimeRoutes.ts +0 -51
- package/src/city/transport/http/routes/SessionRoutes.ts +0 -497
- package/src/city/transport/rpc/AgentRPC.ts +0 -111
- package/src/city/transport/rpc/CityRPC.ts +0 -138
- package/src/city/transport/rpc/RpcServer.ts +0 -158
- package/src/city/transport/rpc/server/InternalHandlers.ts +0 -223
- package/src/city/transport/rpc/server/RequestDispatcher.ts +0 -67
- package/src/city/transport/rpc/server/SdkSessionHandlers.ts +0 -166
- package/src/city/transport/rpc/server/ServerTypes.ts +0 -103
- package/src/city/transport/session/RemoteSessionConfig.ts +0 -34
- package/src/city/transport/types/AgentHttpBinding.ts +0 -25
- package/src/city/transport/types/AgentHttpRuntime.ts +0 -13
- package/src/city/transport/types/AgentRpcBinding.ts +0 -28
- package/src/city/transport/types/AgentRpcRuntime.ts +0 -20
- package/src/city/transport/types/AgentSessionModelResolver.ts +0 -13
- package/src/city/transport/types/CityHttpRuntime.ts +0 -45
- package/src/city/transport/types/CityRpcRuntime.ts +0 -27
- package/src/city/transport/types/RpcProtocol.ts +0 -32
- package/src/city/types/City.ts +0 -99
- package/src/city/types/PluginHostContext.ts +0 -44
- package/src/city/types/SerializedTransport.ts +0 -19
- package/src/executor/composer/compaction/jsonl/JsonlSessionCompactionPrompts.ts +0 -162
- package/src/executor/composer/system/SessionSystemComposer.ts +0 -25
- package/src/executor/composer/system/default/DefaultSessionSystemComposer.ts +0 -76
- package/src/executor/composer/system/default/PromptRenderer.ts +0 -52
- package/src/executor/composer/system/default/SystemDomain.ts +0 -350
- package/src/executor/composer/system/default/assets/task.prompt.ts +0 -9
- package/src/executor/composer/system/default/assets/task.prompt.ts.txt +0 -33
- package/src/executor/composer/system/default/variables/GeoContext.ts +0 -180
- package/src/executor/composer/system/default/variables/PromptTypes.ts +0 -37
- package/src/executor/composer/system/default/variables/VariableReplacer.ts +0 -154
- package/src/executor/core-engine/CoreEngineMessageState.ts +0 -117
- package/src/group/GroupDispatchSession.ts +0 -175
- package/src/internal/AgentRuntime.ts +0 -229
- package/src/internal/GroupRuntime.ts +0 -89
- package/src/internal/index.ts +0 -33
- package/src/plugin/core/ActionScheduleExecutor.ts +0 -68
- package/src/plugin/core/ActionScheduleRuntime.ts +0 -92
- package/src/plugin/core/ActionScheduleStore.ts +0 -414
- package/src/plugin/core/ActionScheduleTime.ts +0 -132
- package/src/plugin/core/BasePlugin.ts +0 -79
- package/src/plugin/core/HookRegistry.ts +0 -297
- package/src/plugin/core/PluginActionExecution.ts +0 -230
- package/src/plugin/core/PluginActionFactory.ts +0 -172
- package/src/plugin/core/PluginCatalog.ts +0 -153
- package/src/plugin/core/PluginContext.ts +0 -71
- package/src/plugin/core/PluginHttpRoutes.ts +0 -47
- package/src/plugin/core/PluginRegistry.ts +0 -888
- package/src/plugin/core/PluginStateController.ts +0 -19
- package/src/plugin/tool/PluginToolRuntime.ts +0 -124
- package/src/plugin/tool/PluginToolSchemas.ts +0 -44
- package/src/plugin/tool/PluginTools.ts +0 -92
- package/src/plugin/types/ActionSchedule.ts +0 -100
- package/src/plugin/types/PluginApi.ts +0 -86
- package/src/remote/RemoteAgent.ts +0 -130
- package/src/remote/RemoteSession.ts +0 -359
- package/src/remote/RemoteTransport.ts +0 -122
- package/src/remote/TransportFactory.ts +0 -29
- package/src/remote/transports/HttpRemoteAgentTransport.ts +0 -582
- package/src/remote/transports/RpcClient.ts +0 -638
- package/src/remote/transports/RpcRemoteAgentTransport.ts +0 -187
- package/src/session/SessionCommand.ts +0 -42
- package/src/session/messages/SessionMessageCompaction.ts +0 -147
- package/src/session/runtime/SessionCompactOperation.ts +0 -93
- package/src/session/runtime/SessionHistoryCompaction.ts +0 -45
- package/src/types/agent/RemoteAgentOptions.ts +0 -29
- package/src/types/agent/RemoteAgentPluginAction.ts +0 -52
- package/src/types/agent/WorkspaceEntryOptions.ts +0 -18
- package/src/types/common/Json.ts +0 -34
- package/src/types/common/Template.ts +0 -9
- package/src/types/plugin/AgentPluginContext.ts +0 -30
- package/src/types/plugin/PluginAction.ts +0 -178
- package/src/types/plugin/PluginActionExecution.ts +0 -36
- package/src/types/plugin/PluginCommand.ts +0 -15
- package/src/types/plugin/PluginContext.ts +0 -59
- package/src/types/plugin/PluginDefinition.ts +0 -54
- package/src/types/plugin/PluginExecutionContext.ts +0 -29
- package/src/types/plugin/PluginHttp.ts +0 -36
- package/src/types/plugin/PluginNotification.ts +0 -38
- package/src/types/plugin/PluginRegistry.ts +0 -25
- package/src/types/plugin/PluginRuntime.ts +0 -292
- package/src/types/plugin/PluginServices.ts +0 -11
- package/src/types/plugin/PluginState.ts +0 -65
- package/src/types/plugin/PluginTool.ts +0 -106
- package/src/types/rpc/RpcProtocol.ts +0 -464
- package/src/types/sdk/AgentSessionCompact.ts +0 -36
- package/src/types/session/SessionAction.ts +0 -41
- package/src/types/session/SessionContent.ts +0 -52
- package/src/types/session/SessionInteraction.ts +0 -268
- package/src/types/session/SessionMessage.ts +0 -306
- package/src/types/session/SessionMutation.ts +0 -183
- package/src/types/session/SessionOrigin.ts +0 -21
- package/src/types/session/SessionSegment.ts +0 -62
- package/src/types/store/SessionDataStore.ts +0 -109
- package/src/utils/Template.ts +0 -28
- package/src/workspace/WorkspacePaths.ts +0 -37
- package/src/workspace/store/JsonlSessionMessageStore.ts +0 -513
- package/src/workspace/store/LocalGroupDispatchSessionDataStore.ts +0 -118
- package/src/workspace/store/LocalSessionDataStore.ts +0 -169
- package/src/workspace/store/LocalSessionStore.ts +0 -243
- package/src/workspace/store/LocalStorePaths.ts +0 -143
- package/src/workspace/store/SessionMessageStoreFactory.ts +0 -18
- /package/bin/{workspace/store → group/storage}/LocalGroupSessionStore.d.ts +0 -0
package/bin/group/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/group/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,YAAY,EACV,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/group/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACxF,YAAY,EACV,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,IAAI,qBAAqB,GACvC,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
/** LocalGroupSessionDataStore:GroupSession 的 metadata 与消息 JSONL 存储。 */
|
|
2
|
-
import type { FileSystem } from "@downcity/
|
|
2
|
+
import type { FileSystem } from "@downcity/type";
|
|
3
3
|
import type { GroupMessage } from "../../types/group/Group.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { GroupDispatchTurnRecord } from "../../types/group/GroupDispatch.js";
|
|
5
5
|
import type { GroupSessionDataStore, GroupSessionHistoryMeta } from "../../types/group/GroupSessionStore.js";
|
|
6
6
|
/** 单个 GroupSession 的本地文件存储。 */
|
|
7
7
|
export declare class LocalGroupSessionDataStore implements GroupSessionDataStore {
|
|
8
8
|
readonly session_id: string;
|
|
9
|
-
readonly dispatch_session: GroupDispatchSessionDataStore;
|
|
10
9
|
private readonly files;
|
|
11
10
|
private readonly group_id;
|
|
12
11
|
private readonly session_root_path;
|
|
13
12
|
private readonly metadata_file_path;
|
|
14
13
|
private readonly messages_file_path;
|
|
15
14
|
private readonly transaction_lock_path;
|
|
15
|
+
private readonly dispatch_root_path;
|
|
16
|
+
private readonly dispatch_turns_file_path;
|
|
17
|
+
private readonly dispatch_lock_path;
|
|
16
18
|
constructor(options: {
|
|
17
19
|
/** 当前 Group StorageScope 文件能力。 */
|
|
18
20
|
files: FileSystem;
|
|
@@ -39,10 +41,16 @@ export declare class LocalGroupSessionDataStore implements GroupSessionDataStore
|
|
|
39
41
|
private write_metadata_unlocked;
|
|
40
42
|
/** 在文件锁内合并 metadata,避免消息追加和成员映射互相覆盖。 */
|
|
41
43
|
update_metadata(patch: Partial<GroupSessionHistoryMeta>): Promise<GroupSessionHistoryMeta>;
|
|
44
|
+
/** 读取每个 dispatch_id 最后一次成功提交的调度状态。 */
|
|
45
|
+
list_dispatch_turns(): Promise<GroupDispatchTurnRecord[]>;
|
|
46
|
+
/** 向 GroupSession 私有调度日志追加一个完整状态快照。 */
|
|
47
|
+
append_dispatch_turn(turn: GroupDispatchTurnRecord): Promise<void>;
|
|
42
48
|
/** 校验消息日志并由真实消息重建可恢复的摘要字段。 */
|
|
43
49
|
private repair_metadata_unlocked;
|
|
44
50
|
/** 读取 JSONL;仅允许自动修复文件尾部不完整的一行。 */
|
|
45
51
|
private read_messages;
|
|
52
|
+
/** 读取调度状态日志;只允许修复进程中断产生的最后一条残缺记录。 */
|
|
53
|
+
private read_dispatch_records;
|
|
46
54
|
private create_initial_metadata;
|
|
47
55
|
}
|
|
48
56
|
//# sourceMappingURL=LocalGroupSessionDataStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalGroupSessionDataStore.d.ts","sourceRoot":"","sources":["../../../src/group/storage/LocalGroupSessionDataStore.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAGvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EACV,uBAAuB,EAExB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EAExB,MAAM,oCAAoC,CAAC;AAE5C,+BAA+B;AAC/B,qBAAa,0BAA2B,YAAW,qBAAqB;IACtE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAC3C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;IAC5C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;IAC5C,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAS;IAC/C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;IAC5C,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAS;IAClD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;gBAEhC,OAAO,EAAE;QACnB,kCAAkC;QAClC,KAAK,EAAE,UAAU,CAAC;QAClB,iCAAiC;QACjC,iBAAiB,EAAE,MAAM,CAAC;QAC1B,0BAA0B;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,mBAAmB;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB;IAkBD,uCAAuC;IACjC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAUjC,kBAAkB;IACZ,aAAa,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAI9C,0BAA0B;IACpB,cAAc,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB1D,qBAAqB;IACf,aAAa,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAUvD,+BAA+B;YACjB,sBAAsB;IA2CpC,uBAAuB;IACjB,cAAc,CAAC,QAAQ,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAMtE,+BAA+B;YACjB,uBAAuB;IAWrC,wCAAwC;IAClC,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,uBAAuB,CAAC,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAehG,sCAAsC;IAChC,mBAAmB,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAc/D,uCAAuC;IACjC,oBAAoB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQxE,8BAA8B;YAChB,wBAAwB;IActC,kCAAkC;YACpB,aAAa;IA0B3B,qCAAqC;YACvB,qBAAqB;IAyBnC,OAAO,CAAC,uBAAuB;CAWhC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/** LocalGroupSessionDataStore:GroupSession 的 metadata 与消息 JSONL 存储。 */
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { LocalGroupDispatchSessionDataStore } from "./LocalGroupDispatchSessionDataStore.js";
|
|
4
3
|
/** 单个 GroupSession 的本地文件存储。 */
|
|
5
4
|
export class LocalGroupSessionDataStore {
|
|
6
5
|
session_id;
|
|
7
|
-
dispatch_session;
|
|
8
6
|
files;
|
|
9
7
|
group_id;
|
|
10
8
|
session_root_path;
|
|
11
9
|
metadata_file_path;
|
|
12
10
|
messages_file_path;
|
|
13
11
|
transaction_lock_path;
|
|
12
|
+
dispatch_root_path;
|
|
13
|
+
dispatch_turns_file_path;
|
|
14
|
+
dispatch_lock_path;
|
|
14
15
|
constructor(options) {
|
|
15
16
|
this.files = options.files;
|
|
16
17
|
this.group_id = options.group_id;
|
|
@@ -18,13 +19,12 @@ export class LocalGroupSessionDataStore {
|
|
|
18
19
|
if (!this.session_id)
|
|
19
20
|
throw new Error("GroupSession store requires a non-empty session_id");
|
|
20
21
|
this.session_root_path = path.join(path.resolve(options.storage_root_path), "sessions", encodeURIComponent(this.session_id));
|
|
21
|
-
this.dispatch_session = new LocalGroupDispatchSessionDataStore({
|
|
22
|
-
files: this.files,
|
|
23
|
-
session_root_path: this.session_root_path,
|
|
24
|
-
});
|
|
25
22
|
this.metadata_file_path = path.join(this.session_root_path, "meta.json");
|
|
26
23
|
this.messages_file_path = path.join(this.session_root_path, "messages.jsonl");
|
|
27
24
|
this.transaction_lock_path = path.join(this.session_root_path, ".lock");
|
|
25
|
+
this.dispatch_root_path = path.join(this.session_root_path, "dispatch");
|
|
26
|
+
this.dispatch_turns_file_path = path.join(this.dispatch_root_path, "turns.jsonl");
|
|
27
|
+
this.dispatch_lock_path = path.join(this.dispatch_root_path, ".lock");
|
|
28
28
|
}
|
|
29
29
|
/** 初始化当前 GroupSession 目录与 metadata。 */
|
|
30
30
|
async initialize() {
|
|
@@ -84,6 +84,7 @@ export class LocalGroupSessionDataStore {
|
|
|
84
84
|
session_id: this.session_id,
|
|
85
85
|
group_id: String(raw.group_id || this.group_id),
|
|
86
86
|
...(typeof raw.workspace_id === "string" && raw.workspace_id.trim() ? { workspace_id: raw.workspace_id.trim() } : {}),
|
|
87
|
+
...(typeof raw.title === "string" && raw.title.trim() ? { title: raw.title.trim() } : {}),
|
|
87
88
|
created_at: typeof raw.created_at === "number" ? raw.created_at : Date.now(),
|
|
88
89
|
updated_at: typeof raw.updated_at === "number" ? raw.updated_at : 0,
|
|
89
90
|
message_count: typeof raw.message_count === "number" ? raw.message_count : 0,
|
|
@@ -131,6 +132,29 @@ export class LocalGroupSessionDataStore {
|
|
|
131
132
|
return next_metadata;
|
|
132
133
|
});
|
|
133
134
|
}
|
|
135
|
+
/** 读取每个 dispatch_id 最后一次成功提交的调度状态。 */
|
|
136
|
+
async list_dispatch_turns() {
|
|
137
|
+
if (!(await this.files.path_exists(this.dispatch_turns_file_path)))
|
|
138
|
+
return [];
|
|
139
|
+
await this.files.ensure_directory(this.dispatch_root_path);
|
|
140
|
+
return await this.files.with_file_lock(this.dispatch_lock_path, async () => {
|
|
141
|
+
const records = await this.read_dispatch_records(true);
|
|
142
|
+
const turns_by_id = new Map();
|
|
143
|
+
for (const record of records) {
|
|
144
|
+
turns_by_id.delete(record.dispatch_id);
|
|
145
|
+
turns_by_id.set(record.dispatch_id, record);
|
|
146
|
+
}
|
|
147
|
+
return [...turns_by_id.values()];
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/** 向 GroupSession 私有调度日志追加一个完整状态快照。 */
|
|
151
|
+
async append_dispatch_turn(turn) {
|
|
152
|
+
assert_dispatch_turn(turn);
|
|
153
|
+
await this.files.ensure_directory(this.dispatch_root_path);
|
|
154
|
+
await this.files.with_file_lock(this.dispatch_lock_path, async () => {
|
|
155
|
+
await this.files.append_file(this.dispatch_turns_file_path, `${JSON.stringify(turn)}\n`);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
134
158
|
/** 校验消息日志并由真实消息重建可恢复的摘要字段。 */
|
|
135
159
|
async repair_metadata_unlocked() {
|
|
136
160
|
const messages = await this.read_messages(true);
|
|
@@ -175,6 +199,31 @@ export class LocalGroupSessionDataStore {
|
|
|
175
199
|
}
|
|
176
200
|
return messages;
|
|
177
201
|
}
|
|
202
|
+
/** 读取调度状态日志;只允许修复进程中断产生的最后一条残缺记录。 */
|
|
203
|
+
async read_dispatch_records(repair_tail) {
|
|
204
|
+
const content = (await this.files.read_file(this.dispatch_turns_file_path)).toString("utf8");
|
|
205
|
+
const lines = content.split("\n");
|
|
206
|
+
const records = [];
|
|
207
|
+
for (let line_index = 0; line_index < lines.length; line_index += 1) {
|
|
208
|
+
const line = lines[line_index];
|
|
209
|
+
if (!line.trim())
|
|
210
|
+
continue;
|
|
211
|
+
try {
|
|
212
|
+
const record = JSON.parse(line);
|
|
213
|
+
assert_dispatch_turn(record);
|
|
214
|
+
records.push(record);
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
const is_tail = lines.slice(line_index + 1).every((item) => !item.trim());
|
|
218
|
+
if (!repair_tail || !is_tail)
|
|
219
|
+
throw error;
|
|
220
|
+
const repaired = records.map((record) => JSON.stringify(record)).join("\n");
|
|
221
|
+
await this.files.write_file_atomically(this.dispatch_turns_file_path, repaired ? `${repaired}\n` : "");
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return records;
|
|
226
|
+
}
|
|
178
227
|
create_initial_metadata() {
|
|
179
228
|
const created_at = Date.now();
|
|
180
229
|
return {
|
|
@@ -187,6 +236,40 @@ export class LocalGroupSessionDataStore {
|
|
|
187
236
|
};
|
|
188
237
|
}
|
|
189
238
|
}
|
|
239
|
+
const dispatch_turn_statuses = new Set([
|
|
240
|
+
"queued",
|
|
241
|
+
"running",
|
|
242
|
+
"completed",
|
|
243
|
+
"failed",
|
|
244
|
+
"stopped",
|
|
245
|
+
]);
|
|
246
|
+
/** 防止损坏的持久化记录进入 GroupSession 调度恢复流程。 */
|
|
247
|
+
function assert_dispatch_turn(value) {
|
|
248
|
+
if (!value || typeof value !== "object")
|
|
249
|
+
throw new Error("Invalid Group dispatch turn record");
|
|
250
|
+
if (typeof value.dispatch_id !== "string" || !value.dispatch_id.trim()) {
|
|
251
|
+
throw new Error("Invalid Group dispatch turn id");
|
|
252
|
+
}
|
|
253
|
+
if (value.trigger !== "user" && value.trigger !== "auto") {
|
|
254
|
+
throw new Error(`Invalid Group dispatch trigger: ${String(value.trigger)}`);
|
|
255
|
+
}
|
|
256
|
+
if (typeof value.message_id !== "string" || !value.message_id.trim()) {
|
|
257
|
+
throw new Error(`Invalid Group dispatch message id: ${value.dispatch_id}`);
|
|
258
|
+
}
|
|
259
|
+
if (!Array.isArray(value.pending_message_ids)
|
|
260
|
+
|| value.pending_message_ids.some((item) => typeof item !== "string" || !item.trim())) {
|
|
261
|
+
throw new Error(`Invalid Group dispatch pending messages: ${value.dispatch_id}`);
|
|
262
|
+
}
|
|
263
|
+
if (!dispatch_turn_statuses.has(value.status)) {
|
|
264
|
+
throw new Error(`Invalid Group dispatch status: ${String(value.status)}`);
|
|
265
|
+
}
|
|
266
|
+
if (!Number.isFinite(value.created_at) || !Number.isFinite(value.updated_at)) {
|
|
267
|
+
throw new Error(`Invalid Group dispatch timestamps: ${value.dispatch_id}`);
|
|
268
|
+
}
|
|
269
|
+
if (value.status === "completed" && !value.decision) {
|
|
270
|
+
throw new Error(`Completed Group dispatch is missing its decision: ${value.dispatch_id}`);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
190
273
|
function normalize_member_session_ids(input) {
|
|
191
274
|
return Object.fromEntries(Object.entries(input).filter(([agent_id, session_id]) => Boolean(agent_id.trim()) && typeof session_id === "string" && session_id.trim()));
|
|
192
275
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalGroupSessionDataStore.js","sourceRoot":"","sources":["../../../src/group/storage/LocalGroupSessionDataStore.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAEvE,OAAO,IAAI,MAAM,WAAW,CAAC;AAa7B,+BAA+B;AAC/B,MAAM,OAAO,0BAA0B;IAC5B,UAAU,CAAS;IACX,KAAK,CAAa;IAClB,QAAQ,CAAS;IACjB,iBAAiB,CAAS;IAC1B,kBAAkB,CAAS;IAC3B,kBAAkB,CAAS;IAC3B,qBAAqB,CAAS;IAC9B,kBAAkB,CAAS;IAC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AAiD;gBAEpE,OAAO,EAAE,wBAAwB;IAM7C,gCAAgC;IAChC,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,qBAAqB;IAelD,8BAA8B;IACxB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIvD,uCAAuC;IACjC,qBAAqB,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAYjE,+BAA+B;IACzB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAS1D,yBAAyB;IACnB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B,OAAO,CAAC,YAAY;CAOrB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** LocalGroupSessionStore:基于 City StorageScope 的 GroupSession 集合存储。 */
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { LocalGroupSessionDataStore } from "
|
|
3
|
+
import { LocalGroupSessionDataStore } from "../../group/storage/LocalGroupSessionDataStore.js";
|
|
4
4
|
/** GroupSession 的底层文件 Store。 */
|
|
5
5
|
export class LocalGroupSessionStore {
|
|
6
6
|
files;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalGroupSessionStore.js","sourceRoot":"","sources":["../../../src/group/storage/LocalGroupSessionStore.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAEvE,OAAO,IAAI,MAAM,WAAW,CAAC;AAQ7B,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAE3F,gCAAgC;AAChC,MAAM,OAAO,sBAAsB;IAChB,KAAK,CAAa;IAClB,iBAAiB,CAAS;IAC1B,QAAQ,CAAS;IACjB,cAAc,GAAG,IAAI,GAAG,EAAsC,CAAC;IAEhF,YAAY,OAAiC;QAC3C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACnD,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AE,CAAC,CAAC,IAAI,EAAE,CAAC,CACpD,CAAC;IACJ,CAAC;CACF;AAED,SAAS,iBAAiB,CAAC,KAAa;IACtC,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
package/bin/index.d.ts
CHANGED
|
@@ -3,83 +3,63 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 关键点(中文)
|
|
5
5
|
* - 这是 agent 包核心运行时的稳定公开入口;可选 Tool 通过 `@downcity/agent/tools` 导出。
|
|
6
|
-
* - 只导出 Agent
|
|
7
|
-
* - HTTP
|
|
6
|
+
* - 只导出 Agent SDK 与必要的 Session 协议类型。
|
|
7
|
+
* - HTTP、RPC、Plugin、Workspace 与 Sandbox 实现不从根入口暴露。
|
|
8
8
|
*/
|
|
9
9
|
export { Agent } from "./agent/Agent.js";
|
|
10
10
|
export { Group } from "./group/Group.js";
|
|
11
|
-
export type { DispatchDecision,
|
|
11
|
+
export type { DispatchAssignment, DispatchDecision, DispatchGroupProfile, DispatchMemberProfile, DispatchStage, DispatchTrigger, DispatchStrategy, AiDispatchStrategyOptions, GroupContract, GroupMessage, GroupOptions, } from "./group/index.js";
|
|
12
12
|
export type { GroupSessionDataStore, GroupSessionHistoryMeta, GroupSessionStore, } from "./types/group/GroupSessionStore.js";
|
|
13
|
-
export type {
|
|
13
|
+
export type { GroupDispatchTurnRecord, GroupDispatchTurnStatus, } from "./types/group/GroupDispatch.js";
|
|
14
14
|
export { GroupSession, GroupSessions } from "./group/index.js";
|
|
15
15
|
export type { GroupMemberRuntime, GroupEvent, GroupStatusPhase, GroupEventSubscriber, GroupEventUnsubscribe, GroupPromptInput, GroupPromptResult, GroupSessionContract, GroupSessionCreateInput, GroupSessionGetInput, GroupSessionListInput, GroupSessionSummary, GroupSessionsContract, } from "./group/index.js";
|
|
16
16
|
export { AiDispatchStrategy } from "./group/index.js";
|
|
17
|
-
export { City } from "./city/index.js";
|
|
18
|
-
export type { CityAgents, CityGroups, CityListenOptions, CityOptions, CityRuntimeOptions, CityWorkspaces, } from "./city/index.js";
|
|
19
|
-
export type { PluginHostContext, PluginHostExtensions, AgentPluginModule, } from "./city/index.js";
|
|
20
|
-
export { create_city_host_instance_id, get_city_host_state_path, is_process_alive, read_city_host_state, register_city_host, request_city_host_shutdown, unregister_city_host, wait_for_city_host_exit, } from "./city/index.js";
|
|
21
|
-
export type { AgentHttpBinding, AgentHttpListenOptions, AgentHttpRuntimeOptions, CityHttpRuntimeOptions, CityAgentHttpExtension, AgentRpcBinding, AgentRpcListenOptions, AgentRpcRuntimeOptions, CityRpcRuntimeOptions, AgentSessionModelResolver, CityHostOwner, CityHostState, } from "./city/index.js";
|
|
22
17
|
export type { SessionStore } from "./types/store/SessionStore.js";
|
|
23
|
-
export type { CompactActiveMessagesInput, CompactActiveMessagesResult, SessionMessageCommitState, SessionMessageStore, SessionDataStore, } from "./types/store/SessionDataStore.js";
|
|
24
18
|
export type { SessionAttachmentStore } from "./types/store/SessionAttachmentStore.js";
|
|
25
|
-
export { create_session_message_store } from "./workspace/store/SessionMessageStoreFactory.js";
|
|
26
19
|
export type { AgentStorage } from "./types/agent/AgentStorage.js";
|
|
27
|
-
export { RemoteAgent } from "./remote/RemoteAgent.js";
|
|
28
20
|
export { Session } from "./session/Session.js";
|
|
21
|
+
export { SessionHooks, SessionHookScope } from "./session/SessionHooks.js";
|
|
29
22
|
export type { SessionOptions } from "./types/session/SessionOptions.js";
|
|
30
|
-
export type { SessionOrigin } from "
|
|
31
|
-
export {
|
|
32
|
-
export type {
|
|
23
|
+
export type { SessionOrigin } from "@downcity/type";
|
|
24
|
+
export { SESSION_HOOK_POINTS } from "./session/SessionHookPoints.js";
|
|
25
|
+
export type { SessionCommittedTurnStatus, SessionHookContextBlock, SessionHookUserMessage, SessionHookContext, SessionHookHandlers, SessionSystemContextHookValue, SessionTurnCommittedHookValue, SessionTurnContextHookValue, } from "@downcity/type";
|
|
33
26
|
export type { AgentArchiveSessionInput, AgentArchiveSessionsInput, AgentArchiveSessionResult, AgentArchiveSessionsResult, AgentCleanArchiveResult, AgentCreateSessionInput, AgentListSessionsInput, AgentSessionConfigSnapshot, AgentSessionForkInput, AgentSessionInfo, AgentSessionSecurityConfig, AgentSessionSecurityStatus, AgentSessionSetInput, AgentSessionSetOptions, AgentSessionStatus, AgentSessionSummary, AgentSessionSummaryPage, AgentSessionSystemBlock, AgentSessionSystemBlockSource, AgentSessionSystemSessionInfo, AgentSessionSystemSnapshot, AgentSessionTimelineEvent, RemoteSessionSetInput, } from "./types/agent/SessionTypes.js";
|
|
34
|
-
export type { ListSessionMessagesInput,
|
|
27
|
+
export type { ListSessionMessagesInput, SessionAgentActionPart, SessionAgentDataPart, SessionAgentFilePart, SessionAgentInteractionPart, SessionAgentMessage, SessionAgentMessagePart, SessionAgentReasoningPart, SessionAgentTextPart, SessionAgentToolPart, SessionAgentErrorPart, SessionMessage, SessionMessagePage, SessionUserDataPart, SessionUserContextPart, SessionUserFilePart, SessionUserMessage, SessionUserMessagePart, SessionUserTextPart, } from "@downcity/type";
|
|
28
|
+
export type { SessionTurnFileDiff, SessionTurnFileDiffData, SessionTurnFileDiffStatus, SessionTurnFileDiffSummary, } from "@downcity/type";
|
|
29
|
+
export { is_session_turn_file_diff_data_part, read_session_turn_file_diff_data, SESSION_TURN_FILE_DIFF_DATA_TYPE, } from "./session/messages/SessionTurnFileDiffData.js";
|
|
35
30
|
export { to_session_message_timeline_events } from "./session/browse/SessionMessageTimeline.js";
|
|
36
31
|
export { SessionAssistantOutputAdapter } from "./session/execution/SessionAssistantOutputAdapter.js";
|
|
37
|
-
export
|
|
38
|
-
export {
|
|
39
|
-
export type {
|
|
40
|
-
export type { RespondSessionInteractionInput, SessionApprovalMode, SessionCancelledInteractionResult, SessionExpiredInteractionResult, SessionInteractionAnswer, SessionInteractionHandle, SessionInteractionLifecycle, SessionInteractionOption, SessionInteractionPort, SessionInteractionQuestion, SessionInteractionQuestionResponseType, SessionInteractionRequest, SessionInteractionResponse, SessionInteractionResult, SessionInteractionSource, SessionInteractionStatus, SessionPendingInteraction, SessionResolvedInteractionResult, } from "
|
|
32
|
+
export { is_session_mutation, } from "@downcity/type";
|
|
33
|
+
export type { ModelRequestKind, } from "@downcity/type";
|
|
34
|
+
export type { SessionConfigMutation, SessionDeltaMutation, SessionMessageMutation, SessionModelRequestWarningMutation, SessionMutation, SessionMutationSubscriber, SessionMutationUnsubscribe, SessionPartMutation, SessionStateMutation, SessionTitleMutation, SessionTurnFileDiffMutation, SessionTurnMutation, } from "@downcity/type";
|
|
35
|
+
export type { RespondSessionInteractionInput, SessionApprovalMode, SessionCancelledInteractionResult, SessionExpiredInteractionResult, SessionInteractionAnswer, SessionInteractionHandle, SessionInteractionLifecycle, SessionInteractionOption, SessionInteractionPort, SessionInteractionQuestion, SessionInteractionQuestionResponseType, SessionInteractionRequest, SessionInteractionResponse, SessionInteractionResult, SessionInteractionSource, SessionInteractionStatus, SessionPendingInteraction, SessionResolvedInteractionResult, } from "@downcity/type";
|
|
41
36
|
export type { AgentOptions, AgentSessionConstructor, } from "./types/agent/AgentOptions.js";
|
|
42
37
|
export type { AgentCreateSessionOptions, AgentSessionCollection, } from "./types/agent/AgentSessionCollection.js";
|
|
43
38
|
export type { AgentSession, AgentSessionActor, AgentSessions, RemoteAgentSession, } from "./types/agent/SessionActor.js";
|
|
44
39
|
export type { AgentManagedSession } from "./types/session/SessionOptions.js";
|
|
45
|
-
export type { RemoteAgentOptions } from "./types/agent/RemoteAgentOptions.js";
|
|
46
|
-
export type { RemoteAgentPluginActionInput, RemoteAgentPluginActionResult, } from "./types/agent/RemoteAgentPluginAction.js";
|
|
47
40
|
export type { AgentSessionActionCallback, AgentSessionActionEvent, AgentSessionActionRecord, AgentSessionActionState, } from "./types/sdk/AgentSessionAction.js";
|
|
48
|
-
export type { AgentSessionPromptInput } from "./types/sdk/AgentSessionPrompt.js";
|
|
49
|
-
export
|
|
41
|
+
export type { AgentSessionPromptContent, AgentSessionPromptInput, } from "./types/sdk/AgentSessionPrompt.js";
|
|
42
|
+
export { is_agent_session_prompt_input_empty } from "./types/sdk/AgentSessionPrompt.js";
|
|
43
|
+
export type { SessionAgentContent, SessionContextContent, SessionDataContent, SessionFileContent, SessionModelUserContent, SessionTextContent, SessionUserContent, } from "@downcity/type";
|
|
50
44
|
export type { AgentSessionStopResult } from "./types/sdk/AgentSessionStop.js";
|
|
51
45
|
export type { AgentSessionTurnHandle, AgentSessionTurnResult, } from "./types/sdk/AgentSessionTurn.js";
|
|
52
|
-
export type { AgentSessionCompactHandle, AgentSessionCompactReason, AgentSessionCompactResult, } from "./types/sdk/AgentSessionCompact.js";
|
|
53
|
-
export type { PluginContext } from "./types/plugin/PluginContext.js";
|
|
54
|
-
export type { AgentPluginContext } from "./types/plugin/AgentPluginContext.js";
|
|
55
|
-
export type { PluginNotificationInput, PluginNotificationPublisher, PluginNotificationTopicInput, } from "./types/plugin/PluginNotification.js";
|
|
56
|
-
export type { PluginWebServices, } from "./types/plugin/PluginServices.js";
|
|
57
46
|
export type { SessionPort } from "./types/session/SessionPort.js";
|
|
58
|
-
export { BasePlugin } from "./plugin/core/BasePlugin.js";
|
|
59
|
-
export { create_action, create_plugin, } from "./plugin/core/PluginActionFactory.js";
|
|
60
|
-
export type { CreatePluginActionOptions, CreatePluginOptions, } from "./plugin/core/PluginActionFactory.js";
|
|
61
47
|
export type { ActionResult, ActionResultMessage, } from "./types/action/ActionResult.js";
|
|
62
48
|
export { Executor } from "./executor/Executor.js";
|
|
63
49
|
export { DefaultSessionComposer } from "./session/DefaultSessionComposer.js";
|
|
50
|
+
export { FullHistoryContextPolicy } from "./session/composer/policies/FullHistoryContextPolicy.js";
|
|
51
|
+
export { AdaptivePartContextPolicy } from "./session/composer/policies/AdaptivePartContextPolicy.js";
|
|
64
52
|
export { SessionMessages } from "./session/SessionMessages.js";
|
|
65
|
-
export type {
|
|
66
|
-
export type { SessionComposer,
|
|
67
|
-
export {
|
|
68
|
-
export { resolve_session_system_messages } from "./executor/composer/system/default/SystemDomain.js";
|
|
53
|
+
export type { AppendCompletedAgentMessageInput, AppendExternalSessionAgentMessageInput, AppendExternalSessionUserMessageInput, AppendSessionAgentErrorPartInput, AppendSessionPromptMessageInput, AppendSessionUserMessageInput, OpenSessionAgentActionPartInput, OpenSessionAgentMessageInput, SessionMessagesOptions, } from "./types/session/SessionMessages.js";
|
|
54
|
+
export type { SessionComposer, SessionComposeIdentity, SessionComposeInput, SessionComposeState, SessionComposeTurn, SessionComposerInitializeInput, SessionContextRecoveryInput, SessionStepInput, } from "./types/session/SessionComposer.js";
|
|
55
|
+
export type { SessionContextPolicy, SessionContextPolicyInitializeInput, SessionContextPolicyInput, SessionContextPolicyRecoveryInput, SessionContextRecoveryReason, SessionResolvedContext, SessionResolvedContextDiagnostics, } from "./types/session/SessionContextPolicy.js";
|
|
69
56
|
export type { SessionExecutor, SessionTurnExecutionResult, } from "./types/session/SessionExecution.js";
|
|
70
57
|
export { create_session_turn_context } from "./session/runtime/SessionTurnContext.js";
|
|
71
58
|
export type { SessionTurnContext, SessionTurnContextInit, } from "./types/executor/SessionTurnContext.js";
|
|
72
59
|
export type { SessionToolExecutionContext } from "./types/executor/SessionToolExecutionContext.js";
|
|
73
|
-
export type { PluginExecutionContext } from "./types/plugin/PluginExecutionContext.js";
|
|
74
|
-
export type { PluginActionExecutionContext } from "./types/plugin/PluginActionExecution.js";
|
|
75
60
|
export type { ToolActionExecutionContext, ToolSessionExecutionScope, } from "./types/tools/ToolActionExecutionContext.js";
|
|
76
|
-
export type { SessionActionEvent, SessionActionEventInput, SessionActionStatus, } from "
|
|
61
|
+
export type { SessionActionEvent, SessionActionEventInput, SessionActionStatus, } from "@downcity/type";
|
|
77
62
|
export type { SessionSystemMessage } from "./executor/types/SessionPrompts.js";
|
|
78
|
-
export { transform_prompts_into_system_messages } from "./executor/composer/system/default/PromptRenderer.js";
|
|
79
|
-
export { build_static_plugin_availability, find_plugin_by_name, has_plugin_lifecycle, list_plugin_views, list_plugins_with_lifecycle, list_plugins_without_lifecycle, resolve_plugin_availability, to_plugin_view, } from "./plugin/core/PluginCatalog.js";
|
|
80
|
-
export { list_plugin_auth_policies, register_plugin_http_routes, } from "./plugin/core/PluginHttpRoutes.js";
|
|
81
|
-
export { ActionScheduleStore } from "./plugin/core/ActionScheduleStore.js";
|
|
82
|
-
export { parse_action_schedule_run_at_ms_or_throw } from "./plugin/core/ActionScheduleTime.js";
|
|
83
63
|
export { extract_session_message_text, extract_session_tool_calls, resolve_session_assistant_visible_text, } from "./session/messages/SessionMessageText.js";
|
|
84
64
|
export type { SessionToolCallSummary } from "./session/messages/SessionMessageText.js";
|
|
85
65
|
export { build_chat_message_text, parse_chat_message_markup, render_chat_message_file_tag, } from "./executor/messages/ChatMessageMarkup.js";
|
|
@@ -87,16 +67,6 @@ export type { ChatMessageFileTag, ChatMessageFileType, ChatMessageSegment, ChatM
|
|
|
87
67
|
export { get_logger, type Logger } from "./utils/logger/Logger.js";
|
|
88
68
|
export { generate_id } from "./utils/Id.js";
|
|
89
69
|
export { format_date_time_in_timezone, resolve_runtime_timezone, } from "./utils/Time.js";
|
|
90
|
-
export type { JsonObject, JsonPrimitive, JsonValue } from "
|
|
91
|
-
export type { PluginAction, PluginActionApi, PluginActionCommand, PluginActionCommandInput, PluginActionExample, PluginActionInputSchema, PluginActionMetadata, PluginActionResult, PluginActions, PluginActionInvokeParams, PluginActionInvokePort, PluginActionInvokeResult, } from "./types/plugin/PluginAction.js";
|
|
92
|
-
export type { Plugin } from "./types/plugin/PluginDefinition.js";
|
|
93
|
-
export type { PluginLifecycle } from "./types/plugin/PluginCommand.js";
|
|
94
|
-
export type { AgentPlugins, PluginAvailability, PluginEffectHook, PluginGuardHook, PluginHooks, PluginPipelineHook, PluginResolves, PluginResolveHook, PluginView, } from "./types/plugin/PluginRuntime.js";
|
|
95
|
-
export type { PluginHttpDefinition, PluginHttpRegistration, } from "./types/plugin/PluginHttp.js";
|
|
96
|
-
export type { PluginActionResponse, PluginCatalogResponse, PluginAvailabilityResponse, PluginAvailabilityView, } from "./plugin/types/PluginApi.js";
|
|
97
|
-
export type { PluginState, PluginSnapshot } from "./types/plugin/PluginState.js";
|
|
98
|
-
export type { ActionScheduleJobRecord, ActionScheduleJobStatus, CreateActionScheduleJobInput, PluginActionScheduleInput, } from "./plugin/types/ActionSchedule.js";
|
|
99
|
-
export { list_plugin_states } from "./plugin/core/PluginStateController.js";
|
|
100
|
-
export type { RpcEventFrame, RpcRequest, RpcServerFrame, } from "./types/rpc/RpcProtocol.js";
|
|
70
|
+
export type { JsonObject, JsonPrimitive, JsonValue } from "@downcity/type";
|
|
101
71
|
export { resolve_session_id } from "./executor/ids/resolveSessionId.js";
|
|
102
72
|
//# sourceMappingURL=index.d.ts.map
|
package/bin/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,YAAY,EACV,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,yBAAyB,EACzB,aAAa,EACb,YAAY,EACZ,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,qBAAqB,EACrB,uBAAuB,EACvB,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sB,GACvB,MAAM,+CAA+C,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,KAAK,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC"}
|
package/bin/index.js
CHANGED
|
@@ -3,46 +3,34 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 关键点(中文)
|
|
5
5
|
* - 这是 agent 包核心运行时的稳定公开入口;可选 Tool 通过 `@downcity/agent/tools` 导出。
|
|
6
|
-
* - 只导出 Agent
|
|
7
|
-
* - HTTP
|
|
6
|
+
* - 只导出 Agent SDK 与必要的 Session 协议类型。
|
|
7
|
+
* - HTTP、RPC、Plugin、Workspace 与 Sandbox 实现不从根入口暴露。
|
|
8
8
|
*/
|
|
9
9
|
// Agent 入口
|
|
10
10
|
export { Agent } from "./agent/Agent.js";
|
|
11
11
|
export { Group } from "./group/Group.js";
|
|
12
12
|
export { GroupSession, GroupSessions } from "./group/index.js";
|
|
13
13
|
export { AiDispatchStrategy } from "./group/index.js";
|
|
14
|
-
export { City } from "./city/index.js";
|
|
15
|
-
export { create_city_host_instance_id, get_city_host_state_path, is_process_alive, read_city_host_state, register_city_host, request_city_host_shutdown, unregister_city_host, wait_for_city_host_exit, } from "./city/index.js";
|
|
16
|
-
export { create_session_message_store } from "./workspace/store/SessionMessageStoreFactory.js";
|
|
17
|
-
export { RemoteAgent } from "./remote/RemoteAgent.js";
|
|
18
14
|
export { Session } from "./session/Session.js";
|
|
19
|
-
export {
|
|
15
|
+
export { SessionHooks, SessionHookScope } from "./session/SessionHooks.js";
|
|
16
|
+
export { SESSION_HOOK_POINTS } from "./session/SessionHookPoints.js";
|
|
17
|
+
export { is_session_turn_file_diff_data_part, read_session_turn_file_diff_data, SESSION_TURN_FILE_DIFF_DATA_TYPE, } from "./session/messages/SessionTurnFileDiffData.js";
|
|
20
18
|
export { to_session_message_timeline_events } from "./session/browse/SessionMessageTimeline.js";
|
|
21
19
|
export { SessionAssistantOutputAdapter } from "./session/execution/SessionAssistantOutputAdapter.js";
|
|
22
|
-
export { is_session_mutation, } from "
|
|
23
|
-
|
|
24
|
-
export { BasePlugin } from "./plugin/core/BasePlugin.js";
|
|
25
|
-
export { create_action, create_plugin, } from "./plugin/core/PluginActionFactory.js";
|
|
20
|
+
export { is_session_mutation, } from "@downcity/type";
|
|
21
|
+
export { is_agent_session_prompt_input_empty } from "./types/sdk/AgentSessionPrompt.js";
|
|
26
22
|
// Session 与即时执行集成
|
|
27
23
|
export { Executor } from "./executor/Executor.js";
|
|
28
24
|
export { DefaultSessionComposer } from "./session/DefaultSessionComposer.js";
|
|
25
|
+
export { FullHistoryContextPolicy } from "./session/composer/policies/FullHistoryContextPolicy.js";
|
|
26
|
+
export { AdaptivePartContextPolicy } from "./session/composer/policies/AdaptivePartContextPolicy.js";
|
|
29
27
|
export { SessionMessages } from "./session/SessionMessages.js";
|
|
30
|
-
export { DefaultSessionSystemComposer } from "./executor/composer/system/default/DefaultSessionSystemComposer.js";
|
|
31
|
-
export { resolve_session_system_messages } from "./executor/composer/system/default/SystemDomain.js";
|
|
32
28
|
export { create_session_turn_context } from "./session/runtime/SessionTurnContext.js";
|
|
33
|
-
export { transform_prompts_into_system_messages } from "./executor/composer/system/default/PromptRenderer.js";
|
|
34
|
-
// 通用 plugin 宿主工具
|
|
35
|
-
export { build_static_plugin_availability, find_plugin_by_name, has_plugin_lifecycle, list_plugin_views, list_plugins_with_lifecycle, list_plugins_without_lifecycle, resolve_plugin_availability, to_plugin_view, } from "./plugin/core/PluginCatalog.js";
|
|
36
|
-
export { list_plugin_auth_policies, register_plugin_http_routes, } from "./plugin/core/PluginHttpRoutes.js";
|
|
37
|
-
// Runtime plugin 调度集成
|
|
38
|
-
export { ActionScheduleStore } from "./plugin/core/ActionScheduleStore.js";
|
|
39
|
-
export { parse_action_schedule_run_at_ms_or_throw } from "./plugin/core/ActionScheduleTime.js";
|
|
40
29
|
export { extract_session_message_text, extract_session_tool_calls, resolve_session_assistant_visible_text, } from "./session/messages/SessionMessageText.js";
|
|
41
30
|
export { build_chat_message_text, parse_chat_message_markup, render_chat_message_file_tag, } from "./executor/messages/ChatMessageMarkup.js";
|
|
42
31
|
// 日志
|
|
43
32
|
export { get_logger } from "./utils/logger/Logger.js";
|
|
44
33
|
export { generate_id } from "./utils/Id.js";
|
|
45
34
|
export { format_date_time_in_timezone, resolve_runtime_timezone, } from "./utils/Time.js";
|
|
46
|
-
export { list_plugin_states } from "./plugin/core/PluginStateController.js";
|
|
47
35
|
export { resolve_session_id } from "./executor/ids/resolveSessionId.js";
|
|
48
36
|
//# sourceMappingURL=index.js.map
|
package/bin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,WAAW;AACX,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,WAAW;AACX,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAuBzC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAgB/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAItD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,YAAY,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session
|
|
5
|
-
* 压缩只生成计划,实际 Segment 提交仍由 SessionMessages 负责。
|
|
4
|
+
* 负责把 Session 运行快照与 Context Policy 结果组装为最终模型输入。
|
|
6
5
|
*/
|
|
7
|
-
import type { SessionComposer,
|
|
6
|
+
import type { SessionComposer, SessionComposeInput, SessionStepInput } from "../types/session/SessionComposer.js";
|
|
7
|
+
import type { SessionContextPolicy } from "../types/session/SessionContextPolicy.js";
|
|
8
8
|
/** 默认 Session 执行策略。 */
|
|
9
9
|
export declare class DefaultSessionComposer implements SessionComposer {
|
|
10
10
|
readonly name = "default_session";
|
|
11
|
+
/** 当前 Composer 使用的上下文策略。 */
|
|
12
|
+
private readonly context_policy;
|
|
13
|
+
constructor(options?: {
|
|
14
|
+
/** 生成模型历史的上下文策略。 */
|
|
15
|
+
context_policy?: SessionContextPolicy;
|
|
16
|
+
});
|
|
17
|
+
/** 初始化内部 Context Policy 的派生 schema。 */
|
|
18
|
+
initialize(input: Parameters<SessionComposer["initialize"]>[0]): Promise<void>;
|
|
11
19
|
/** 组装当前 Step 的 system、history 与 tools。 */
|
|
12
20
|
compose(input: SessionComposeInput): Promise<SessionStepInput>;
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/** 判断错误是否属于模型上下文超限。 */
|
|
16
|
-
should_compact(error: unknown): boolean;
|
|
21
|
+
/** 把上下文恢复委托给当前 Policy。 */
|
|
22
|
+
recover_context(input: Parameters<SessionComposer["recover_context"]>[0]): Promise<boolean>;
|
|
17
23
|
}
|
|
18
24
|
//# sourceMappingURL=DefaultSessionComposer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultSessionComposer.d.ts","sourceRoot":"","sources":["../../src/session/DefaultSessionComposer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"DefaultSessionComposer.d.ts","sourceRoot":"","sources":["../../src/session/DefaultSessionComposer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AA2CpF,uBAAuB;AACvB,qBAAa,sBAAuB,YAAW,eAAe;IAC5D,QAAQ,CAAC,IAAI,qBAAqB;IAElC,4BAA4B;IAC5B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAuB;gBAE1C,OAAO,CAAC,EAAE;QACpB,oBAAoB;QACpB,cAAc,CAAC,EAAE,oBAAoB,CAAC;KACvC;IAID,uCAAuC;IACjC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAMpF,0CAA0C;IACpC,OAAO,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAmCpE,0BAA0B;IACpB,eAAe,CAAC,KAAK,EAAE,UAAU,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;CASlG"}
|