@downcity/agent 1.1.208 → 1.1.212
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/bin/agent/local/Agent.d.ts +3 -3
- package/bin/agent/local/Agent.d.ts.map +1 -1
- package/bin/agent/local/Agent.js +0 -3
- package/bin/agent/local/Agent.js.map +1 -1
- package/bin/agent/local/AgentInstructions.d.ts +1 -1
- package/bin/agent/local/AgentInstructions.d.ts.map +1 -1
- package/bin/agent/local/services/AgentAssemblyService.d.ts +3 -8
- package/bin/agent/local/services/AgentAssemblyService.d.ts.map +1 -1
- package/bin/agent/local/services/AgentAssemblyService.js +0 -1
- package/bin/agent/local/services/AgentAssemblyService.js.map +1 -1
- package/bin/agent/local/services/AgentSessions.d.ts +5 -7
- package/bin/agent/local/services/AgentSessions.d.ts.map +1 -1
- package/bin/agent/local/services/AgentSessions.js +2 -3
- package/bin/agent/local/services/AgentSessions.js.map +1 -1
- package/bin/agent/remote/RemoteAgent.d.ts +3 -1
- package/bin/agent/remote/RemoteAgent.d.ts.map +1 -1
- package/bin/agent/remote/RemoteAgent.js.map +1 -1
- package/bin/agent/remote/RemoteSession.d.ts +10 -1
- package/bin/agent/remote/RemoteSession.d.ts.map +1 -1
- package/bin/agent/remote/RemoteSession.js +18 -0
- package/bin/agent/remote/RemoteSession.js.map +1 -1
- package/bin/agent/remote/RemoteTransport.d.ts +5 -1
- package/bin/agent/remote/RemoteTransport.d.ts.map +1 -1
- package/bin/agent/remote/transports/HttpRemoteAgentTransport.d.ts +4 -1
- package/bin/agent/remote/transports/HttpRemoteAgentTransport.d.ts.map +1 -1
- package/bin/agent/remote/transports/HttpRemoteAgentTransport.js +7 -0
- package/bin/agent/remote/transports/HttpRemoteAgentTransport.js.map +1 -1
- package/bin/agent/remote/transports/RpcRemoteAgentTransport.d.ts +4 -1
- package/bin/agent/remote/transports/RpcRemoteAgentTransport.d.ts.map +1 -1
- package/bin/agent/remote/transports/RpcRemoteAgentTransport.js +1 -0
- package/bin/agent/remote/transports/RpcRemoteAgentTransport.js.map +1 -1
- package/bin/executor/Executor.d.ts +0 -16
- package/bin/executor/Executor.d.ts.map +1 -1
- package/bin/executor/Executor.js +0 -16
- package/bin/executor/Executor.js.map +1 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts +1 -3
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts.map +1 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js +1 -5
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js.map +1 -1
- package/bin/executor/composer/history/SessionHistoryWriter.d.ts +0 -10
- package/bin/executor/composer/history/SessionHistoryWriter.d.ts.map +1 -1
- package/bin/executor/composer/history/SessionHistoryWriter.js +31 -61
- package/bin/executor/composer/history/SessionHistoryWriter.js.map +1 -1
- package/bin/executor/messages/AssistantFileResource.d.ts.map +1 -1
- package/bin/executor/messages/AssistantFileResource.js +58 -15
- package/bin/executor/messages/AssistantFileResource.js.map +1 -1
- package/bin/executor/services/ExecutorInflightService.d.ts +0 -5
- package/bin/executor/services/ExecutorInflightService.d.ts.map +1 -1
- package/bin/executor/services/ExecutorInflightService.js +0 -6
- package/bin/executor/services/ExecutorInflightService.js.map +1 -1
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts +4 -0
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts.map +1 -1
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js +115 -3
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js.map +1 -1
- package/bin/executor/types/SessionHistoryMeta.d.ts +6 -0
- package/bin/executor/types/SessionHistoryMeta.d.ts.map +1 -1
- package/bin/index.d.ts +38 -6
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +14 -1
- package/bin/index.js.map +1 -1
- package/bin/plugin/core/ActionScheduleExecutor.js +1 -1
- package/bin/plugin/core/ActionScheduleExecutor.js.map +1 -1
- package/bin/plugin/core/BasePlugin.d.ts +7 -9
- package/bin/plugin/core/BasePlugin.d.ts.map +1 -1
- package/bin/plugin/core/BasePlugin.js +1 -14
- package/bin/plugin/core/BasePlugin.js.map +1 -1
- package/bin/plugin/core/HookRegistry.d.ts +1 -1
- package/bin/plugin/core/HookRegistry.d.ts.map +1 -1
- package/bin/plugin/core/PluginActionFactory.d.ts +1 -5
- package/bin/plugin/core/PluginActionFactory.d.ts.map +1 -1
- package/bin/plugin/core/PluginActionFactory.js +0 -3
- package/bin/plugin/core/PluginActionFactory.js.map +1 -1
- package/bin/plugin/core/PluginActionRunner.d.ts +6 -4
- package/bin/plugin/core/PluginActionRunner.d.ts.map +1 -1
- package/bin/plugin/core/PluginActionRunner.js +2 -2
- package/bin/plugin/core/PluginActionRunner.js.map +1 -1
- package/bin/plugin/core/PluginCatalog.d.ts +2 -1
- package/bin/plugin/core/PluginCatalog.d.ts.map +1 -1
- package/bin/plugin/core/PluginCatalog.js.map +1 -1
- package/bin/plugin/core/PluginCommand.d.ts +1 -1
- package/bin/plugin/core/PluginCommand.d.ts.map +1 -1
- package/bin/plugin/core/PluginCommand.js.map +1 -1
- package/bin/plugin/core/PluginHttpRoutes.d.ts +1 -1
- package/bin/plugin/core/PluginHttpRoutes.d.ts.map +1 -1
- package/bin/plugin/core/PluginLocalExecution.d.ts +4 -1
- package/bin/plugin/core/PluginLocalExecution.d.ts.map +1 -1
- package/bin/plugin/core/PluginLocalExecution.js +0 -1
- package/bin/plugin/core/PluginLocalExecution.js.map +1 -1
- package/bin/plugin/core/PluginRegistry.d.ts +4 -2
- package/bin/plugin/core/PluginRegistry.d.ts.map +1 -1
- package/bin/plugin/core/PluginRegistry.js +7 -6
- package/bin/plugin/core/PluginRegistry.js.map +1 -1
- package/bin/plugin/core/PluginStateController.d.ts +7 -27
- package/bin/plugin/core/PluginStateController.d.ts.map +1 -1
- package/bin/plugin/core/PluginStateController.js +5 -39
- package/bin/plugin/core/PluginStateController.js.map +1 -1
- package/bin/plugin/types/PluginApi.d.ts +3 -79
- package/bin/plugin/types/PluginApi.d.ts.map +1 -1
- package/bin/rpc/Client.d.ts +11 -6
- package/bin/rpc/Client.d.ts.map +1 -1
- package/bin/rpc/Client.js +2 -0
- package/bin/rpc/Client.js.map +1 -1
- package/bin/session/Session.d.ts +2 -5
- package/bin/session/Session.d.ts.map +1 -1
- package/bin/session/Session.js +3 -16
- package/bin/session/Session.js.map +1 -1
- package/bin/session/SessionSystemBuilder.d.ts +1 -1
- package/bin/session/SessionSystemBuilder.d.ts.map +1 -1
- package/bin/session/browse/Browse.d.ts +4 -6
- package/bin/session/browse/Browse.d.ts.map +1 -1
- package/bin/session/browse/Browse.js +71 -71
- package/bin/session/browse/Browse.js.map +1 -1
- package/bin/session/preview/SessionMessagePreview.d.ts +13 -0
- package/bin/session/preview/SessionMessagePreview.d.ts.map +1 -0
- package/bin/session/preview/SessionMessagePreview.js +61 -0
- package/bin/session/preview/SessionMessagePreview.js.map +1 -0
- package/bin/session/runtime/SessionPromptRuntime.d.ts +14 -0
- package/bin/session/runtime/SessionPromptRuntime.d.ts.map +1 -1
- package/bin/session/runtime/SessionPromptRuntime.js +11 -0
- package/bin/session/runtime/SessionPromptRuntime.js.map +1 -1
- package/bin/session/services/SessionStateService.d.ts +1 -1
- package/bin/session/services/SessionStateService.d.ts.map +1 -1
- package/bin/session/services/SessionStateService.js +2 -2
- package/bin/session/services/SessionStateService.js.map +1 -1
- package/bin/session/services/SessionTurnService.d.ts.map +1 -1
- package/bin/session/services/SessionTurnService.js +9 -0
- package/bin/session/services/SessionTurnService.js.map +1 -1
- package/bin/session/services/SessionViewService.d.ts +2 -1
- package/bin/session/services/SessionViewService.d.ts.map +1 -1
- package/bin/session/services/SessionViewService.js +4 -1
- package/bin/session/services/SessionViewService.js.map +1 -1
- package/bin/session/storage/Metadata.d.ts.map +1 -1
- package/bin/session/storage/Metadata.js +23 -0
- package/bin/session/storage/Metadata.js.map +1 -1
- package/bin/session/storage/Persistence.d.ts +1 -1
- package/bin/session/storage/Persistence.d.ts.map +1 -1
- package/bin/session/storage/RuntimeSessionPort.d.ts +0 -12
- package/bin/session/storage/RuntimeSessionPort.d.ts.map +1 -1
- package/bin/session/storage/RuntimeSessionPort.js +0 -8
- package/bin/session/storage/RuntimeSessionPort.js.map +1 -1
- package/bin/types/plugin/PluginAction.d.ts +0 -10
- package/bin/types/plugin/PluginAction.d.ts.map +1 -1
- package/bin/types/plugin/PluginCommand.d.ts +2 -3
- package/bin/types/plugin/PluginCommand.d.ts.map +1 -1
- package/bin/types/plugin/PluginControl.d.ts +74 -0
- package/bin/types/plugin/PluginControl.d.ts.map +1 -0
- package/bin/types/plugin/PluginControl.js +9 -0
- package/bin/types/plugin/PluginControl.js.map +1 -0
- package/bin/types/plugin/PluginDefinition.d.ts +1 -1
- package/bin/types/plugin/PluginDefinition.d.ts.map +1 -1
- package/bin/types/plugin/PluginRuntime.d.ts +1 -3
- package/bin/types/plugin/PluginRuntime.d.ts.map +1 -1
- package/bin/types/plugin/PluginState.d.ts +3 -16
- package/bin/types/plugin/PluginState.d.ts.map +1 -1
- package/bin/types/rpc/RpcProtocol.d.ts +3 -3
- package/bin/types/rpc/RpcProtocol.d.ts.map +1 -1
- package/bin/types/runtime/agent/AgentContext.d.ts +1 -9
- package/bin/types/runtime/agent/AgentContext.d.ts.map +1 -1
- package/bin/types/runtime/agent/AgentContext.js.map +1 -1
- package/bin/types/session/SessionLocalState.d.ts +1 -1
- package/bin/types/session/SessionLocalState.d.ts.map +1 -1
- package/package.json +4 -7
- package/scripts/agent-ready.test.mjs +38 -0
- package/scripts/assistant-file-resource.test.mjs +39 -0
- package/scripts/city-model-tool-loop.test.mjs +18 -30
- package/scripts/image-plugin-job.test.mjs +13 -13
- package/scripts/plugin-tool-bridge.test.mjs +2 -3
- package/scripts/remote-session-reconnect.test.mjs +67 -0
- package/scripts/session-history-writer-error.test.mjs +57 -0
- package/scripts/session-list-title.test.mjs +114 -23
- package/scripts/session-prompt-runtime.test.mjs +22 -0
- package/src/agent/local/Agent.ts +4 -10
- package/src/agent/local/AgentInstructions.ts +1 -1
- package/src/agent/local/services/AgentAssemblyService.ts +3 -9
- package/src/agent/local/services/AgentSessions.ts +8 -15
- package/src/agent/remote/RemoteAgent.ts +5 -4
- package/src/agent/remote/RemoteSession.ts +21 -2
- package/src/agent/remote/RemoteTransport.ts +6 -2
- package/src/agent/remote/transports/HttpRemoteAgentTransport.ts +13 -3
- package/src/agent/remote/transports/RpcRemoteAgentTransport.ts +6 -2
- package/src/executor/Executor.ts +0 -23
- package/src/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.ts +2 -8
- package/src/executor/composer/history/SessionHistoryWriter.ts +33 -64
- package/src/executor/messages/AssistantFileResource.ts +61 -17
- package/src/executor/services/ExecutorInflightService.ts +0 -10
- package/src/executor/store/history/jsonl/JsonlSessionHistoryStore.ts +130 -4
- package/src/executor/types/SessionHistoryMeta.ts +6 -0
- package/src/index.ts +100 -29
- package/src/plugin/core/ActionScheduleExecutor.ts +1 -1
- package/src/plugin/core/BasePlugin.ts +8 -22
- package/src/plugin/core/HookRegistry.ts +1 -1
- package/src/plugin/core/PluginActionFactory.ts +1 -8
- package/src/plugin/core/PluginActionRunner.ts +8 -11
- package/src/plugin/core/PluginCatalog.ts +2 -5
- package/src/plugin/core/PluginCommand.ts +2 -1
- package/src/plugin/core/PluginHttpRoutes.ts +1 -1
- package/src/plugin/core/PluginLocalExecution.ts +4 -7
- package/src/plugin/core/PluginRegistry.ts +10 -10
- package/src/plugin/core/PluginStateController.ts +12 -60
- package/src/plugin/types/PluginApi.ts +6 -81
- package/src/rpc/Client.ts +22 -16
- package/src/session/Session.ts +5 -21
- package/src/session/SessionSystemBuilder.ts +1 -1
- package/src/session/browse/Browse.ts +103 -84
- package/src/session/preview/SessionMessagePreview.ts +75 -0
- package/src/session/runtime/SessionPromptRuntime.ts +29 -4
- package/src/session/services/SessionStateService.ts +3 -4
- package/src/session/services/SessionTurnService.ts +9 -0
- package/src/session/services/SessionViewService.ts +6 -6
- package/src/session/storage/Metadata.ts +26 -0
- package/src/session/storage/Persistence.ts +1 -1
- package/src/session/storage/RuntimeSessionPort.ts +0 -20
- package/src/types/plugin/PluginAction.ts +0 -10
- package/src/types/plugin/PluginCommand.ts +2 -3
- package/src/types/plugin/PluginControl.ts +80 -0
- package/src/types/plugin/PluginDefinition.ts +1 -1
- package/src/types/plugin/PluginRuntime.ts +1 -3
- package/src/types/plugin/PluginState.ts +3 -20
- package/src/types/rpc/RpcProtocol.ts +4 -4
- package/src/types/runtime/agent/AgentContext.ts +1 -9
- package/src/types/session/SessionLocalState.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/bin/config/DowncitySchema.d.ts +0 -20
- package/bin/config/DowncitySchema.d.ts.map +0 -1
- package/bin/config/DowncitySchema.js +0 -160
- package/bin/config/DowncitySchema.js.map +0 -1
- package/bin/plugin/core/Activation.d.ts +0 -18
- package/bin/plugin/core/Activation.d.ts.map +0 -1
- package/bin/plugin/core/Activation.js +0 -21
- package/bin/plugin/core/Activation.js.map +0 -1
- package/bin/plugin/core/Manager.d.ts +0 -7
- package/bin/plugin/core/Manager.d.ts.map +0 -1
- package/bin/plugin/core/Manager.js +0 -6
- package/bin/plugin/core/Manager.js.map +0 -1
- package/bin/plugin/types/Plugin.d.ts +0 -15
- package/bin/plugin/types/Plugin.d.ts.map +0 -1
- package/bin/plugin/types/Plugin.js +0 -9
- package/bin/plugin/types/Plugin.js.map +0 -1
- package/bin/plugin/types/PluginLifecycle.d.ts +0 -34
- package/bin/plugin/types/PluginLifecycle.d.ts.map +0 -1
- package/bin/plugin/types/PluginLifecycle.js +0 -9
- package/bin/plugin/types/PluginLifecycle.js.map +0 -1
- package/bin/plugin/types/PluginState.d.ts +0 -5
- package/bin/plugin/types/PluginState.d.ts.map +0 -1
- package/bin/plugin/types/PluginState.js +0 -5
- package/bin/plugin/types/PluginState.js.map +0 -1
- package/bin/plugin/types/Plugins.d.ts +0 -61
- package/bin/plugin/types/Plugins.d.ts.map +0 -1
- package/bin/plugin/types/Plugins.js +0 -5
- package/bin/plugin/types/Plugins.js.map +0 -1
- package/bin/session/index.d.ts +0 -15
- package/bin/session/index.d.ts.map +0 -1
- package/bin/session/index.js +0 -15
- package/bin/session/index.js.map +0 -1
- package/bin/types/agent/AgentTypes.d.ts +0 -18
- package/bin/types/agent/AgentTypes.d.ts.map +0 -1
- package/bin/types/agent/AgentTypes.js +0 -10
- package/bin/types/agent/AgentTypes.js.map +0 -1
- package/bin/utils/logger/Format.d.ts +0 -11
- package/bin/utils/logger/Format.d.ts.map +0 -1
- package/bin/utils/logger/Format.js +0 -10
- package/bin/utils/logger/Format.js.map +0 -1
- package/src/config/DowncitySchema.ts +0 -175
- package/src/plugin/core/Activation.ts +0 -26
- package/src/plugin/core/Manager.ts +0 -17
- package/src/plugin/types/Plugin.ts +0 -63
- package/src/plugin/types/PluginLifecycle.ts +0 -35
- package/src/plugin/types/PluginState.ts +0 -12
- package/src/plugin/types/Plugins.ts +0 -67
- package/src/session/index.ts +0 -57
- package/src/types/agent/AgentTypes.ts +0 -58
- package/src/utils/logger/Format.ts +0 -15
|
@@ -47,7 +47,7 @@ export interface Plugin {
|
|
|
47
47
|
resolves?: PluginResolves;
|
|
48
48
|
/** Plugin system 文本构建器(可选)。 */
|
|
49
49
|
system?: (context: AgentContext) => string | Promise<string>;
|
|
50
|
-
/**
|
|
50
|
+
/** Plugin 生命周期定义(可选)。 */
|
|
51
51
|
lifecycle?: PluginLifecycle;
|
|
52
52
|
/** Plugin 可用性检查器(可选)。 */
|
|
53
53
|
availability?: (context: PluginCommandContext | AgentContext) => Promise<PluginAvailability> | PluginAvailability;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginDefinition.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/PluginDefinition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,cAAc,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB;IACvB,MAAM,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IAClD,+BAA+B;IAC/B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,0BAA0B;IAC1B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7D,
|
|
1
|
+
{"version":3,"file":"PluginDefinition.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/PluginDefinition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,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@ import type { JsonValue } from "../../types/common/Json.js";
|
|
|
10
10
|
import type { PluginActionResult } from "../../types/plugin/PluginAction.js";
|
|
11
11
|
import type { PluginActionExample } from "../../types/plugin/PluginAction.js";
|
|
12
12
|
import type { Plugin } from "../../types/plugin/PluginDefinition.js";
|
|
13
|
-
import type { AgentSessionSystemBlock } from "../../types/agent/
|
|
13
|
+
import type { AgentSessionSystemBlock } from "../../types/agent/SessionTypes.js";
|
|
14
14
|
import type { PluginSnapshot } from "../../types/plugin/PluginState.js";
|
|
15
15
|
/**
|
|
16
16
|
* Plugin 概览视图。
|
|
@@ -51,8 +51,6 @@ export interface PluginActionReadView {
|
|
|
51
51
|
input_schema?: JsonValue;
|
|
52
52
|
/** Action 调用示例。 */
|
|
53
53
|
examples?: PluginActionExample[];
|
|
54
|
-
/** disabled 状态下是否仍允许执行。 */
|
|
55
|
-
allow_when_disabled: boolean;
|
|
56
54
|
/** 是否声明 CLI command。 */
|
|
57
55
|
has_command: boolean;
|
|
58
56
|
/** 是否声明 HTTP API。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginRuntime.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/PluginRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PluginRuntime.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/PluginRuntime.ts"],"names":[],"mappings":"AAAA;;;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C;CAChB,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAEjC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC3D,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACrD,kBAAkB;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;CACxD;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,SAAS,EAAE,MAAM,GAAG,iBAAiB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;CAC9D,CAAC"}
|
|
@@ -42,34 +42,21 @@ export interface PluginSnapshot {
|
|
|
42
42
|
description: string;
|
|
43
43
|
/** 当前注册后的可用状态。 */
|
|
44
44
|
status: PluginState;
|
|
45
|
-
/** 兼容旧字段的状态别名。 */
|
|
46
|
-
state: PluginState;
|
|
47
45
|
/** 注册时间(毫秒时间戳)。 */
|
|
48
46
|
registered_at: number;
|
|
49
47
|
/** 最近更新时间(毫秒时间戳)。 */
|
|
50
48
|
updated_at: number;
|
|
51
|
-
/** 兼容旧字段的最近更新时间。 */
|
|
52
|
-
updatedAt: number;
|
|
53
49
|
/** 最近错误。 */
|
|
54
50
|
last_error?: string;
|
|
55
|
-
/** 兼容旧字段的最近错误。 */
|
|
56
|
-
lastError?: string;
|
|
57
51
|
}
|
|
58
52
|
/**
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
61
|
-
export type PluginStateSnapshot = PluginSnapshot;
|
|
62
|
-
/**
|
|
63
|
-
* 兼容旧控制动作类型。
|
|
64
|
-
*
|
|
65
|
-
* 说明(中文)
|
|
66
|
-
* - 控制面只保留状态查询与卸载。
|
|
53
|
+
* Plugin 控制动作。
|
|
67
54
|
*/
|
|
68
|
-
export type
|
|
55
|
+
export type PluginControlAction = "unregister" | "status";
|
|
69
56
|
/**
|
|
70
57
|
* plugin 控制结果。
|
|
71
58
|
*/
|
|
72
|
-
export interface
|
|
59
|
+
export interface PluginControlResult {
|
|
73
60
|
/** 控制动作是否成功。 */
|
|
74
61
|
success: boolean;
|
|
75
62
|
/** 成功或失败后返回的最新 plugin 快照。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginState.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/PluginState.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe;IACf,KAAK,EAAE,WAAW,CAAC;IACnB,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe;IACf,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,gCAAgC;IAChC,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"PluginState.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/PluginState.ts"],"names":[],"mappings":"AAAA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段名保持现有协议格式,兼容已发布的 downcity 托管 runtime 调用。
|
|
8
8
|
*/
|
|
9
|
-
import type { AgentCreateSessionInput, AgentListSessionsInput, AgentArchiveSessionsInput, AgentSessionRecordsInput, AgentSessionSystemSnapshot } from "../../types/agent/
|
|
9
|
+
import type { AgentCreateSessionInput, AgentListSessionsInput, AgentArchiveSessionsInput, AgentSessionRecordsInput, AgentSessionSystemSnapshot } from "../../types/agent/SessionTypes.js";
|
|
10
10
|
import type { AgentSessionEvent } from "../../types/sdk/AgentSessionEvent.js";
|
|
11
11
|
import type { AgentSessionPromptInput } from "../../types/sdk/AgentSessionPrompt.js";
|
|
12
12
|
import type { JsonValue } from "../../types/common/Json.js";
|
|
13
|
-
import type {
|
|
13
|
+
import type { PluginControlAction } from "../../types/plugin/PluginState.js";
|
|
14
14
|
import type { ShellApprovalMode } from "@downcity/shell";
|
|
15
15
|
/**
|
|
16
16
|
* RPC 请求。
|
|
@@ -196,7 +196,7 @@ export type RpcRequest = {
|
|
|
196
196
|
/** plugin 名称。 */
|
|
197
197
|
pluginName: string;
|
|
198
198
|
/** 控制动作。 */
|
|
199
|
-
action:
|
|
199
|
+
action: PluginControlAction;
|
|
200
200
|
};
|
|
201
201
|
} | {
|
|
202
202
|
/** 请求 id,用于匹配响应。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RpcProtocol.d.ts","sourceRoot":"","sources":["../../../src/types/rpc/RpcProtocol.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EAEtB,yBAAyB,EAIzB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"RpcProtocol.d.ts","sourceRoot":"","sources":["../../../src/types/rpc/RpcProtocol.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EAEtB,yBAAyB,EAIzB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,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B;IACrC,uBAAuB;IACvB,MAAM,EAAE,0BAA0B,CAAC;CACpC"}
|
|
@@ -11,7 +11,7 @@ import type { Logger } from "../../../utils/logger/Logger.js";
|
|
|
11
11
|
import type { AgentPathRuntime, AgentPluginConfigRuntime } from "../../../types/agent/AgentRuntimeAssembly.js";
|
|
12
12
|
import type { DowncityConfig } from "../../../types/config/DowncityConfig.js";
|
|
13
13
|
import type { JsonValue } from "../../../types/common/Json.js";
|
|
14
|
-
import type { AgentPlugins } from "../../../plugin/
|
|
14
|
+
import type { AgentPlugins } from "../../../types/plugin/PluginRuntime.js";
|
|
15
15
|
import type { Plugin } from "../../../types/plugin/PluginDefinition.js";
|
|
16
16
|
import type { SessionMetadataV1, SessionRecordV1 } from "../../../executor/types/SessionRecords.js";
|
|
17
17
|
import type { SessionRunInput, SessionRunResult } from "../../../executor/types/SessionRun.js";
|
|
@@ -124,14 +124,6 @@ export interface SessionPort {
|
|
|
124
124
|
* - 历史消息持久化仍由 append_user_message / append_assistant_message 负责。
|
|
125
125
|
*/
|
|
126
126
|
publishEvent(event: AgentSessionEvent): void;
|
|
127
|
-
/**
|
|
128
|
-
* 清理当前 session 的 executor 缓存。
|
|
129
|
-
*/
|
|
130
|
-
clearExecutor(): void;
|
|
131
|
-
/**
|
|
132
|
-
* 当前 session 更新后的异步通知钩子。
|
|
133
|
-
*/
|
|
134
|
-
afterSessionUpdatedAsync(): Promise<void>;
|
|
135
127
|
/**
|
|
136
128
|
* 追加一条 user 消息。
|
|
137
129
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentContext.d.ts","sourceRoot":"","sources":["../../../../src/types/runtime/agent/AgentContext.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,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GAAG,SAAS,GAAG,SAAS,CAAC;CACtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentContext.js","sourceRoot":"","sources":["../../../../src/types/runtime/agent/AgentContext.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"AgentContext.js","sourceRoot":"","sources":["../../../../src/types/runtime/agent/AgentContext.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAmPH;;;;;;;GAOG;AACH,MAAM,OAAO,YAAY;IACvB,gBAAgB;IACP,GAAG,CAAS;IACrB,eAAe;IACN,QAAQ,CAAS;IAC1B,aAAa;IACJ,MAAM,CAAS;IACxB,kBAAkB;IACT,MAAM,CAAiB;IAChC,oBAAoB;IACX,GAAG,CAAyB;IACrC,yBAAyB;IAChB,OAAO,CAAW;IAC3B,mBAAmB;IACV,KAAK,CAAmB;IACjC,8BAA8B;IACrB,YAAY,CAA2B;IAChD,0BAA0B;IACjB,eAAe,CAAsB;IAC9C,oBAAoB;IACX,OAAO,CAAwB;IACxC,mBAAmB;IACV,OAAO,CAAe;IAC/B,8BAA8B;IACrB,MAAM,CAAmB;IAElC,YAAY,OAA4B;QACtC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe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AAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5D,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - state / turn / view 三类 service 通过共享该对象协作,避免彼此复制状态。
|
|
7
7
|
* - 这里只保存运行态,不承载行为逻辑。
|
|
8
8
|
*/
|
|
9
|
-
import type { AgentSessionConfigSnapshot } from "../../types/agent/
|
|
9
|
+
import type { AgentSessionConfigSnapshot } from "../../types/agent/SessionTypes.js";
|
|
10
10
|
/**
|
|
11
11
|
* 本地 Session 内存状态。
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionLocalState.d.ts","sourceRoot":"","sources":["../../../src/types/session/SessionLocalState.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SessionLocalState.d.ts","sourceRoot":"","sources":["../../../src/types/session/SessionLocalState.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,aAAa,EAAE,0BAA0B,CAAC;IAE1C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,iBAAiB,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,uBAAuB,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC/C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@downcity/agent",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.212",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Downcity Agent 运行时 — 单 Agent 执行壳与本机 RPC 能力",
|
|
6
6
|
"main": "./bin/index.js",
|
|
@@ -9,16 +9,12 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"import": "./bin/index.js",
|
|
11
11
|
"types": "./bin/index.d.ts"
|
|
12
|
-
},
|
|
13
|
-
"./internal/*": {
|
|
14
|
-
"import": "./bin/*",
|
|
15
|
-
"types": "./bin/*"
|
|
16
12
|
}
|
|
17
13
|
},
|
|
18
14
|
"dependencies": {
|
|
19
15
|
"@ai-sdk/openai-compatible": "^2.0.48",
|
|
20
|
-
"@downcity/shell": "^0.1.
|
|
21
|
-
"@downcity/type": "0.1.
|
|
16
|
+
"@downcity/shell": "^0.1.76",
|
|
17
|
+
"@downcity/type": "0.1.109",
|
|
22
18
|
"ai": "^6.0.193",
|
|
23
19
|
"commander": "^15.0.0",
|
|
24
20
|
"dotenv": "^17.4.2",
|
|
@@ -43,6 +39,7 @@
|
|
|
43
39
|
"scripts": {
|
|
44
40
|
"build": "node scripts/agent-compiler.mjs build",
|
|
45
41
|
"dev": "node scripts/agent-compiler.mjs dev",
|
|
42
|
+
"test": "pnpm build && pnpm -C ../plugins build && node --test scripts/*.test.mjs",
|
|
46
43
|
"test:executor-runtime": "pnpm build && node --test scripts/session-prompt-runtime.test.mjs",
|
|
47
44
|
"typecheck": "node scripts/agent-compiler.mjs typecheck"
|
|
48
45
|
}
|
|
@@ -165,3 +165,41 @@ test("session.prompt waits for agent background ready before model execution", a
|
|
|
165
165
|
await agent.dispose();
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
|
+
|
|
169
|
+
test("agent ready isolates plugin lifecycle start failures", async () => {
|
|
170
|
+
const agent_path = await fs.mkdtemp(
|
|
171
|
+
path.join(os.tmpdir(), "downcity-agent-ready-isolation-"),
|
|
172
|
+
);
|
|
173
|
+
let healthy_started = false;
|
|
174
|
+
const failing_plugin = createPlugin({
|
|
175
|
+
name: "failing",
|
|
176
|
+
lifecycle: {
|
|
177
|
+
start: async () => {
|
|
178
|
+
throw new Error("start failed");
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
const healthy_plugin = createPlugin({
|
|
183
|
+
name: "healthy",
|
|
184
|
+
lifecycle: {
|
|
185
|
+
start: async () => {
|
|
186
|
+
healthy_started = true;
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
});
|
|
190
|
+
const agent = new Agent({
|
|
191
|
+
id: "ready_isolation_agent",
|
|
192
|
+
path: agent_path,
|
|
193
|
+
plugins: [failing_plugin, healthy_plugin],
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
try {
|
|
197
|
+
await agent.ready();
|
|
198
|
+
|
|
199
|
+
assert.equal(healthy_started, true);
|
|
200
|
+
assert.equal(agent.plugins.status("failing")?.status, "error");
|
|
201
|
+
assert.equal(agent.plugins.status("healthy")?.status, "ready");
|
|
202
|
+
} finally {
|
|
203
|
+
await agent.dispose();
|
|
204
|
+
}
|
|
205
|
+
});
|
|
@@ -101,6 +101,45 @@ test("materializeAssistantFileParts downloads remote file URLs into resources",
|
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
|
|
104
|
+
test("materializeAssistantFileParts rejects oversized remote resources before download", async () => {
|
|
105
|
+
const project_root = await fs.mkdtemp(
|
|
106
|
+
path.join(os.tmpdir(), "downcity-agent-assistant-large-resource-"),
|
|
107
|
+
);
|
|
108
|
+
const server = http.createServer((_, response) => {
|
|
109
|
+
response.writeHead(200, {
|
|
110
|
+
"content-type": "application/octet-stream",
|
|
111
|
+
"content-length": String(26 * 1024 * 1024),
|
|
112
|
+
});
|
|
113
|
+
response.end("oversized");
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));
|
|
117
|
+
try {
|
|
118
|
+
const address = server.address();
|
|
119
|
+
assert.equal(typeof address, "object");
|
|
120
|
+
assert.ok(address);
|
|
121
|
+
const remote_url = `http://127.0.0.1:${address.port}/large.bin`;
|
|
122
|
+
const parts = await materializeAssistantFileParts({
|
|
123
|
+
projectRoot: project_root,
|
|
124
|
+
parts: [
|
|
125
|
+
{
|
|
126
|
+
type: "file",
|
|
127
|
+
mediaType: "application/octet-stream",
|
|
128
|
+
url: remote_url,
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
assert.equal(parts[0].url, remote_url);
|
|
134
|
+
const resources_path = path.join(project_root, ".downcity", "resources");
|
|
135
|
+
await assert.rejects(fs.access(resources_path));
|
|
136
|
+
} finally {
|
|
137
|
+
await new Promise((resolve, reject) =>
|
|
138
|
+
server.close((error) => (error ? reject(error) : resolve())),
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
104
143
|
test("materializeAssistantFileParts resolves relative local file URLs from agent project root", async () => {
|
|
105
144
|
const project_root = await fs.mkdtemp(
|
|
106
145
|
path.join(os.tmpdir(), "downcity-agent-assistant-relative-resource-"),
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* @file 验证 CityModel 会优先走 OpenAI-compatible LanguageModel 并完成 tool loop。
|
|
3
3
|
*
|
|
4
4
|
* 关键点(中文)
|
|
5
|
-
* - 这里直接走编译后的 Agent
|
|
5
|
+
* - 这里直接走编译后的 Agent 产物,避免测试只覆盖源码级辅助函数。
|
|
6
|
+
* - CityModel 使用 @downcity/type 的共享协议构造,避免反向依赖 City SDK 实现。
|
|
6
7
|
* - 重点锁住 CityModel -> LanguageModel -> tool-call -> 本地执行 -> tool-result 回传链路。
|
|
7
8
|
* - 新路径不应再调用 `/v1/ai/stream`,避免 UIMessage stream 反向适配丢失 finish 语义。
|
|
8
9
|
*/
|
|
@@ -15,7 +16,7 @@ import path from "node:path";
|
|
|
15
16
|
import fs from "node:fs/promises";
|
|
16
17
|
import { Agent } from "../bin/index.js";
|
|
17
18
|
import { createAction, createPlugin } from "../bin/plugin/core/PluginActionFactory.js";
|
|
18
|
-
import {
|
|
19
|
+
import { CITY_MODEL_INVOKER, CITY_MODEL_KIND } from "@downcity/type";
|
|
19
20
|
import { tool } from "ai";
|
|
20
21
|
import { z } from "zod";
|
|
21
22
|
|
|
@@ -45,7 +46,6 @@ async function read_json_body(req) {
|
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
test("CityModel uses direct LanguageModel path and sends tool result back", async () => {
|
|
48
|
-
const requests = [];
|
|
49
49
|
const agent_requests = [];
|
|
50
50
|
let stream_requests = 0;
|
|
51
51
|
let tool_executed = false;
|
|
@@ -53,24 +53,6 @@ test("CityModel uses direct LanguageModel path and sends tool result back", asyn
|
|
|
53
53
|
const server = http.createServer(async (req, res) => {
|
|
54
54
|
const url = new URL(String(req.url || "/"), "http://127.0.0.1");
|
|
55
55
|
|
|
56
|
-
if (req.method === "GET" && url.pathname === "/v1/ai/models") {
|
|
57
|
-
res.writeHead(200, { "content-type": "application/json" });
|
|
58
|
-
res.end(JSON.stringify({
|
|
59
|
-
items: [
|
|
60
|
-
{
|
|
61
|
-
id: "mock-model",
|
|
62
|
-
name: "Mock Model",
|
|
63
|
-
description: "mock",
|
|
64
|
-
modalities: ["text", "stream"],
|
|
65
|
-
tags: [],
|
|
66
|
-
meta: {},
|
|
67
|
-
env: {},
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
}));
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
56
|
if (req.method === "POST" && url.pathname === "/v1/ai/stream") {
|
|
75
57
|
stream_requests += 1;
|
|
76
58
|
res.writeHead(500, { "content-type": "application/json" });
|
|
@@ -80,7 +62,6 @@ test("CityModel uses direct LanguageModel path and sends tool result back", asyn
|
|
|
80
62
|
|
|
81
63
|
if (req.method === "POST" && url.pathname === "/v1/ai/chat/completions") {
|
|
82
64
|
const body = await read_json_body(req);
|
|
83
|
-
requests.push(body);
|
|
84
65
|
|
|
85
66
|
if (!Array.isArray(body.tools)) {
|
|
86
67
|
write_openai_sse(res, [
|
|
@@ -229,15 +210,22 @@ test("CityModel uses direct LanguageModel path and sends tool result back", asyn
|
|
|
229
210
|
try {
|
|
230
211
|
const address = server.address();
|
|
231
212
|
assert.ok(address && typeof address === "object");
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
213
|
+
const model = Object.freeze({
|
|
214
|
+
id: "mock-model",
|
|
215
|
+
name: "Mock Model",
|
|
216
|
+
description: "mock",
|
|
217
|
+
modalities: ["text", "stream"],
|
|
218
|
+
tags: [],
|
|
219
|
+
meta: {},
|
|
220
|
+
kind: CITY_MODEL_KIND,
|
|
221
|
+
[CITY_MODEL_INVOKER]: {
|
|
222
|
+
connection: () => ({
|
|
223
|
+
base_url: `http://127.0.0.1:${String(address.port)}/v1/ai`,
|
|
224
|
+
api_key: "ub_test",
|
|
225
|
+
model_id: "mock-model",
|
|
226
|
+
}),
|
|
227
|
+
},
|
|
237
228
|
});
|
|
238
|
-
const catalog = await city.ai.listModels();
|
|
239
|
-
const model = catalog.get("mock-model");
|
|
240
|
-
assert.ok(model);
|
|
241
229
|
|
|
242
230
|
const agent_path = await fs.mkdtemp(
|
|
243
231
|
path.join(os.tmpdir(), "downcity-agent-city-model-tool-loop-"),
|
|
@@ -38,6 +38,7 @@ function create_context(rootPath = process.cwd()) {
|
|
|
38
38
|
function create_registry(plugin, rootPath = process.cwd()) {
|
|
39
39
|
return createAgentPluginRegistry({
|
|
40
40
|
plugins: [plugin],
|
|
41
|
+
plugin_instances: new Map(),
|
|
41
42
|
get_context: () => create_context(rootPath),
|
|
42
43
|
});
|
|
43
44
|
}
|
|
@@ -67,7 +68,7 @@ test("ImagePlugin image_create returns image job", async () => {
|
|
|
67
68
|
|
|
68
69
|
const result = await plugin.actions.image_create.execute({
|
|
69
70
|
context: create_context(),
|
|
70
|
-
|
|
71
|
+
input: { prompt: "draw" },
|
|
71
72
|
pluginName: "image",
|
|
72
73
|
actionName: "image_create",
|
|
73
74
|
});
|
|
@@ -104,13 +105,12 @@ test("ImagePlugin models lists image-capable models", async () => {
|
|
|
104
105
|
|
|
105
106
|
const result = await plugin.actions.models.execute({
|
|
106
107
|
context: create_context(),
|
|
107
|
-
|
|
108
|
+
input: {},
|
|
108
109
|
pluginName: "image",
|
|
109
110
|
actionName: "models",
|
|
110
111
|
});
|
|
111
112
|
|
|
112
113
|
assert.equal(result.success, true);
|
|
113
|
-
assert.equal(result.data.default_model_id, "image_1");
|
|
114
114
|
assert.deepEqual(result.data.items.map((item) => item.id), ["image_1"]);
|
|
115
115
|
assert.equal(result.data.items[0].meta.provider, "test");
|
|
116
116
|
});
|
|
@@ -153,7 +153,7 @@ test("ImagePlugin image_result reads pending state once", async () => {
|
|
|
153
153
|
|
|
154
154
|
const result = await plugin.actions.image_result.execute({
|
|
155
155
|
context: create_context(),
|
|
156
|
-
|
|
156
|
+
input: { job_id: "img_1" },
|
|
157
157
|
pluginName: "image",
|
|
158
158
|
actionName: "image_result",
|
|
159
159
|
});
|
|
@@ -179,7 +179,7 @@ test("ImagePlugin image_result returns final message when succeeded", async () =
|
|
|
179
179
|
|
|
180
180
|
const result = await plugin.actions.image_result.execute({
|
|
181
181
|
context: create_context(),
|
|
182
|
-
|
|
182
|
+
input: { job_id: "img_1" },
|
|
183
183
|
pluginName: "image",
|
|
184
184
|
actionName: "image_result",
|
|
185
185
|
});
|
|
@@ -202,7 +202,7 @@ test("ImagePlugin image_result reports failed terminal job", async () => {
|
|
|
202
202
|
|
|
203
203
|
const result = await plugin.actions.image_result.execute({
|
|
204
204
|
context: create_context(),
|
|
205
|
-
|
|
205
|
+
input: { job_id: "img_1" },
|
|
206
206
|
pluginName: "image",
|
|
207
207
|
actionName: "image_result",
|
|
208
208
|
});
|
|
@@ -244,7 +244,7 @@ test("ImagePlugin image_create converts local content image paths", async () =>
|
|
|
244
244
|
|
|
245
245
|
const result = await plugin.actions.image_create.execute({
|
|
246
246
|
context: create_context(tempDir),
|
|
247
|
-
|
|
247
|
+
input: {
|
|
248
248
|
content: [
|
|
249
249
|
{ type: "text", text: "change background" },
|
|
250
250
|
{ type: "image", url: "./input.png" },
|
|
@@ -277,7 +277,7 @@ test("ImagePlugin image_create uses content instead of prompt when both exist",
|
|
|
277
277
|
|
|
278
278
|
const result = await plugin.actions.image_create.execute({
|
|
279
279
|
context: create_context(),
|
|
280
|
-
|
|
280
|
+
input: {
|
|
281
281
|
prompt: "ignore this prompt",
|
|
282
282
|
content: [{ type: "text", text: "use this content" }],
|
|
283
283
|
},
|
|
@@ -302,7 +302,7 @@ test("ImagePlugin image_create keeps remote content image URLs", async () => {
|
|
|
302
302
|
|
|
303
303
|
const result = await plugin.actions.image_create.execute({
|
|
304
304
|
context: create_context(),
|
|
305
|
-
|
|
305
|
+
input: {
|
|
306
306
|
content: [
|
|
307
307
|
{ type: "text", text: "use this style" },
|
|
308
308
|
{ type: "image", url: "https://example.com/input.webp", media_type: "image/webp" },
|
|
@@ -325,7 +325,7 @@ test("ImagePlugin image_create rejects legacy messages and data URLs", async ()
|
|
|
325
325
|
|
|
326
326
|
const messages_result = await plugin.actions.image_create.execute({
|
|
327
327
|
context: create_context(),
|
|
328
|
-
|
|
328
|
+
input: {
|
|
329
329
|
messages: [
|
|
330
330
|
{
|
|
331
331
|
role: "user",
|
|
@@ -342,7 +342,7 @@ test("ImagePlugin image_create rejects legacy messages and data URLs", async ()
|
|
|
342
342
|
|
|
343
343
|
const data_url_result = await plugin.actions.image_create.execute({
|
|
344
344
|
context: create_context(),
|
|
345
|
-
|
|
345
|
+
input: {
|
|
346
346
|
content: [
|
|
347
347
|
{ type: "text", text: "edit this" },
|
|
348
348
|
{ type: "image", url: "data:image/png;base64,cG5n" },
|
|
@@ -386,7 +386,7 @@ test("ImagePlugin image_result polls until terminal when until_done=true", async
|
|
|
386
386
|
|
|
387
387
|
const result = await plugin.actions.image_result.execute({
|
|
388
388
|
context: create_context(),
|
|
389
|
-
|
|
389
|
+
input: {
|
|
390
390
|
job_id: "img_wait",
|
|
391
391
|
until_done: true,
|
|
392
392
|
max_wait_ms: 500,
|
|
@@ -414,7 +414,7 @@ test("ImagePlugin image_result returns last status when max_wait_ms elapses", as
|
|
|
414
414
|
|
|
415
415
|
const result = await plugin.actions.image_result.execute({
|
|
416
416
|
context: create_context(),
|
|
417
|
-
|
|
417
|
+
input: {
|
|
418
418
|
job_id: "img_timeout",
|
|
419
419
|
until_done: true,
|
|
420
420
|
max_wait_ms: 30,
|
|
@@ -132,7 +132,6 @@ test("invokePluginReadTool returns plugin action metadata", async () => {
|
|
|
132
132
|
payload: { prompt: "draw" },
|
|
133
133
|
},
|
|
134
134
|
],
|
|
135
|
-
allow_when_disabled: false,
|
|
136
135
|
has_command: false,
|
|
137
136
|
has_api: false,
|
|
138
137
|
},
|
|
@@ -303,7 +302,7 @@ test("PluginRegistry keeps plugin ready after action business failure", async ()
|
|
|
303
302
|
payload: { name: "missing" },
|
|
304
303
|
});
|
|
305
304
|
assert.equal(failed.success, false);
|
|
306
|
-
assert.equal(registry.status("skill").
|
|
305
|
+
assert.equal(registry.status("skill").status, "ready");
|
|
307
306
|
|
|
308
307
|
const retry = await registry.runAction({
|
|
309
308
|
plugin: "skill",
|
|
@@ -312,5 +311,5 @@ test("PluginRegistry keeps plugin ready after action business failure", async ()
|
|
|
312
311
|
});
|
|
313
312
|
assert.equal(retry.success, true);
|
|
314
313
|
assert.equal(retry.data.loaded, true);
|
|
315
|
-
assert.equal(registry.status("skill").
|
|
314
|
+
assert.equal(registry.status("skill").status, "ready");
|
|
316
315
|
});
|