@downcity/agent 1.1.43 → 1.1.62
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 +11 -12
- package/bin/agent/Agent.d.ts +31 -16
- package/bin/agent/Agent.d.ts.map +1 -1
- package/bin/agent/Agent.js +47 -63
- package/bin/agent/Agent.js.map +1 -1
- package/bin/agent/RemoteAgent.d.ts +6 -6
- package/bin/agent/RemoteAgent.d.ts.map +1 -1
- package/bin/agent/RemoteAgent.js +377 -267
- package/bin/agent/RemoteAgent.js.map +1 -1
- package/bin/config/AgentInitializer.d.ts +5 -5
- package/bin/config/AgentInitializer.d.ts.map +1 -1
- package/bin/config/AgentInitializer.js +15 -13
- package/bin/config/AgentInitializer.js.map +1 -1
- package/bin/config/Config.d.ts +9 -30
- package/bin/config/Config.d.ts.map +1 -1
- package/bin/config/Config.js +23 -70
- package/bin/config/Config.js.map +1 -1
- package/bin/config/Defaults.d.ts.map +1 -1
- package/bin/config/Defaults.js +1 -9
- package/bin/config/Defaults.js.map +1 -1
- package/bin/config/DowncitySchema.d.ts.map +1 -1
- package/bin/config/DowncitySchema.js +4 -112
- package/bin/config/DowncitySchema.js.map +1 -1
- package/bin/config/ExecutionBinding.d.ts +1 -16
- package/bin/config/ExecutionBinding.d.ts.map +1 -1
- package/bin/config/ExecutionBinding.js +2 -22
- package/bin/config/ExecutionBinding.js.map +1 -1
- package/bin/config/Paths.d.ts +4 -43
- package/bin/config/Paths.d.ts.map +1 -1
- package/bin/config/Paths.js +10 -30
- package/bin/config/Paths.js.map +1 -1
- package/bin/config/PlatformPaths.d.ts +0 -4
- package/bin/config/PlatformPaths.d.ts.map +1 -1
- package/bin/config/PlatformPaths.js +5 -1
- package/bin/config/PlatformPaths.js.map +1 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts.map +1 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js +0 -4
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js.map +1 -1
- package/bin/executor/composer/system/default/InitPrompts.d.ts +1 -1
- package/bin/executor/composer/system/default/InitPrompts.js +1 -1
- package/bin/executor/composer/system/default/SystemDomain.js +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.d.ts +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.js +1 -1
- package/bin/executor/composer/system/default/assets/init/PROFILE.md.d.ts +1 -1
- package/bin/executor/composer/system/default/assets/init/PROFILE.md.d.ts.map +1 -1
- package/bin/executor/composer/system/default/assets/init/PROFILE.md.js +1 -1
- package/bin/executor/composer/system/default/assets/init/PROFILE.md.js.map +1 -1
- package/bin/executor/composer/system/default/assets/plugin.prompt.d.ts +1 -1
- package/bin/executor/composer/system/default/assets/plugin.prompt.js +1 -1
- package/bin/executor/composer/system/default/assets/task.prompt.d.ts +1 -1
- package/bin/executor/composer/system/default/assets/task.prompt.js +1 -1
- package/bin/executor/messages/ChatMessageMarkupTypes.d.ts +1 -1
- package/bin/executor/messages/ChatMessageMarkupTypes.js +1 -1
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts +1 -2
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts.map +1 -1
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js +17 -56
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js.map +1 -1
- package/bin/executor/tools/shell/ShellToolBridge.js +1 -1
- package/bin/executor/tools/shell/ShellToolBridge.js.map +1 -1
- package/bin/executor/tools/shell/ShellToolDefinition.d.ts +2 -2
- package/bin/executor/tools/shell/ShellToolFormatting.d.ts +1 -1
- package/bin/executor/tools/shell/ShellToolFormatting.js +9 -9
- package/bin/executor/tools/shell/ShellToolFormatting.js.map +1 -1
- package/bin/executor/tools/shell/ShellToolSchemas.d.ts +7 -75
- package/bin/executor/tools/shell/ShellToolSchemas.d.ts.map +1 -1
- package/bin/executor/types/SessionHistoryMeta.d.ts +5 -24
- package/bin/executor/types/SessionHistoryMeta.d.ts.map +1 -1
- package/bin/executor/types/SessionHistoryMeta.js +1 -1
- package/bin/executor/types/SessionRun.d.ts +1 -1
- package/bin/index.d.ts +5 -6
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +6 -5
- package/bin/index.js.map +1 -1
- package/bin/model/CityModelAdapter.d.ts +23 -0
- package/bin/model/CityModelAdapter.d.ts.map +1 -0
- package/bin/model/CityModelAdapter.js +338 -0
- package/bin/model/CityModelAdapter.js.map +1 -0
- package/bin/plugin/core/PluginCommandRequest.d.ts +1 -1
- package/bin/plugin/core/PluginCommandRequest.js +1 -1
- package/bin/plugin/core/PluginLocalExecution.d.ts.map +1 -1
- package/bin/plugin/core/PluginLocalExecution.js +4 -8
- package/bin/plugin/core/PluginLocalExecution.js.map +1 -1
- package/bin/plugin/types/PluginApi.d.ts +1 -1
- package/bin/rpc/Client.d.ts +104 -0
- package/bin/rpc/Client.d.ts.map +1 -0
- package/bin/rpc/Client.js +300 -0
- package/bin/rpc/Client.js.map +1 -0
- package/bin/rpc/Server.d.ts +41 -0
- package/bin/rpc/Server.d.ts.map +1 -0
- package/bin/rpc/Server.js +164 -0
- package/bin/rpc/Server.js.map +1 -0
- package/bin/runtime/host/daemon/Api.d.ts +1 -1
- package/bin/runtime/host/daemon/Client.d.ts +1 -1
- package/bin/runtime/host/daemon/Client.d.ts.map +1 -1
- package/bin/runtime/host/daemon/Client.js +30 -20
- package/bin/runtime/host/daemon/Client.js.map +1 -1
- package/bin/runtime/host/daemon/Paths.d.ts +1 -1
- package/bin/runtime/host/daemon/Paths.js +1 -1
- package/bin/runtime/host/daemon/ProjectSetup.js +2 -2
- package/bin/runtime/server/http/control/OverviewRoutes.js +1 -1
- package/bin/runtime/server/http/control/OverviewRoutes.js.map +1 -1
- package/bin/session/Session.d.ts +1 -0
- package/bin/session/Session.d.ts.map +1 -1
- package/bin/session/Session.js +32 -6
- package/bin/session/Session.js.map +1 -1
- package/bin/session/SessionTitle.d.ts +49 -0
- package/bin/session/SessionTitle.d.ts.map +1 -0
- package/bin/session/SessionTitle.js +130 -0
- package/bin/session/SessionTitle.js.map +1 -0
- package/bin/session/browse/Browse.d.ts +2 -1
- package/bin/session/browse/Browse.d.ts.map +1 -1
- package/bin/session/browse/Browse.js +18 -15
- package/bin/session/browse/Browse.js.map +1 -1
- package/bin/session/index.d.ts +3 -2
- package/bin/session/index.d.ts.map +1 -1
- package/bin/session/index.js +3 -2
- package/bin/session/index.js.map +1 -1
- package/bin/session/storage/Metadata.d.ts +4 -0
- package/bin/session/storage/Metadata.d.ts.map +1 -1
- package/bin/session/storage/Metadata.js +12 -25
- package/bin/session/storage/Metadata.js.map +1 -1
- package/bin/session/storage/Paths.d.ts +0 -4
- package/bin/session/storage/Paths.d.ts.map +1 -1
- package/bin/session/storage/Paths.js +0 -6
- package/bin/session/storage/Paths.js.map +1 -1
- package/bin/session/storage/Persistence.d.ts.map +1 -1
- package/bin/session/storage/Persistence.js +1 -4
- package/bin/session/storage/Persistence.js.map +1 -1
- package/bin/types/agent/AgentTypes.d.ts +32 -57
- package/bin/types/agent/AgentTypes.d.ts.map +1 -1
- package/bin/types/config/AgentProject.d.ts +7 -6
- package/bin/types/config/AgentProject.d.ts.map +1 -1
- package/bin/types/config/DowncityConfig.d.ts +11 -69
- package/bin/types/config/DowncityConfig.d.ts.map +1 -1
- package/bin/types/config/ExecutionBinding.d.ts +4 -4
- package/bin/types/config/ExecutionBinding.js +1 -1
- package/bin/types/config/LlmConfig.d.ts +1 -1
- package/bin/types/config/Start.d.ts +3 -0
- package/bin/types/config/Start.d.ts.map +1 -1
- package/bin/types/config/Start.js +2 -0
- package/bin/types/config/Start.js.map +1 -1
- package/bin/types/runtime/auth/AuthPermission.js +2 -2
- package/bin/types/runtime/auth/AuthPermission.js.map +1 -1
- package/bin/types/runtime/host/Store.d.ts +10 -227
- package/bin/types/runtime/host/Store.d.ts.map +1 -1
- package/bin/types/runtime/host/Store.js +7 -0
- package/bin/types/runtime/host/Store.js.map +1 -1
- package/bin/types/runtime/http/InlineInstant.d.ts +1 -1
- package/bin/types/runtime/platform/Platform.d.ts +7 -7
- package/bin/types/runtime/platform/Platform.d.ts.map +1 -1
- package/bin/types/runtime/platform/PlatformGateway.d.ts +2 -2
- package/bin/types/runtime/platform/PlatformGateway.d.ts.map +1 -1
- package/bin/utils/Time.d.ts +0 -1
- package/bin/utils/Time.d.ts.map +1 -1
- package/bin/utils/Time.js +0 -7
- package/bin/utils/Time.js.map +1 -1
- package/bin/utils/storage/index.d.ts +0 -1
- package/bin/utils/storage/index.d.ts.map +1 -1
- package/bin/utils/storage/index.js +0 -6
- package/bin/utils/storage/index.js.map +1 -1
- package/package.json +22 -23
- package/src/agent/Agent.ts +57 -73
- package/src/agent/RemoteAgent.ts +515 -345
- package/src/config/AgentInitializer.ts +15 -13
- package/src/config/Config.ts +28 -85
- package/src/config/Defaults.ts +1 -9
- package/src/config/DowncitySchema.ts +4 -114
- package/src/config/ExecutionBinding.ts +2 -24
- package/src/config/Paths.ts +10 -43
- package/src/config/PlatformPaths.ts +5 -1
- package/src/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.ts +0 -4
- package/src/executor/composer/system/default/InitPrompts.ts +1 -1
- package/src/executor/composer/system/default/SystemDomain.ts +1 -1
- package/src/executor/composer/system/default/assets/core.prompt.ts +1 -1
- package/src/executor/composer/system/default/assets/core.prompt.ts.txt +1 -1
- package/src/executor/composer/system/default/assets/init/PROFILE.md.ts +1 -1
- package/src/executor/composer/system/default/assets/init/PROFILE.md.ts.txt +1 -2
- package/src/executor/composer/system/default/assets/plugin.prompt.ts +1 -1
- package/src/executor/composer/system/default/assets/plugin.prompt.ts.txt +18 -18
- package/src/executor/composer/system/default/assets/task.prompt.ts +1 -1
- package/src/executor/composer/system/default/assets/task.prompt.ts.txt +1 -1
- package/src/executor/messages/ChatMessageMarkupTypes.ts +1 -1
- package/src/executor/store/history/jsonl/JsonlSessionHistoryStore.ts +17 -57
- package/src/executor/tools/shell/ShellToolBridge.ts +1 -1
- package/src/executor/tools/shell/ShellToolFormatting.ts +9 -9
- package/src/executor/types/SessionHistoryMeta.ts +5 -25
- package/src/executor/types/SessionRun.ts +1 -1
- package/src/index.ts +12 -19
- package/src/model/CityModelAdapter.ts +384 -0
- package/src/plugin/core/PluginCommandRequest.ts +1 -1
- package/src/plugin/core/PluginLocalExecution.ts +4 -8
- package/src/plugin/types/PluginApi.ts +1 -1
- package/src/rpc/Client.ts +467 -0
- package/src/rpc/Server.ts +302 -0
- package/src/runtime/host/daemon/Api.ts +1 -1
- package/src/runtime/host/daemon/Client.ts +44 -22
- package/src/runtime/host/daemon/Paths.ts +1 -1
- package/src/runtime/host/daemon/ProjectSetup.ts +2 -2
- package/src/runtime/server/http/control/OverviewRoutes.ts +1 -1
- package/src/session/Session.ts +40 -6
- package/src/session/SessionTitle.ts +192 -0
- package/src/session/browse/Browse.ts +22 -13
- package/src/session/index.ts +5 -1
- package/src/session/storage/Metadata.ts +14 -29
- package/src/session/storage/Paths.ts +0 -10
- package/src/session/storage/Persistence.ts +1 -4
- package/src/types/agent/AgentTypes.ts +33 -62
- package/src/types/config/AgentProject.ts +7 -6
- package/src/types/config/DowncityConfig.ts +11 -70
- package/src/types/config/ExecutionBinding.ts +4 -4
- package/src/types/config/LlmConfig.ts +1 -1
- package/src/types/config/Start.ts +3 -0
- package/src/types/runtime/auth/AuthPermission.ts +2 -2
- package/src/types/runtime/host/Store.ts +10 -235
- package/src/types/runtime/http/InlineInstant.ts +1 -1
- package/src/types/runtime/platform/Platform.ts +7 -7
- package/src/types/runtime/platform/PlatformGateway.ts +2 -2
- package/src/utils/Time.ts +0 -6
- package/src/utils/storage/index.ts +0 -7
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/bin/config/ConfigEnvResolver.d.ts +0 -22
- package/bin/config/ConfigEnvResolver.d.ts.map +0 -1
- package/bin/config/ConfigEnvResolver.js +0 -41
- package/bin/config/ConfigEnvResolver.js.map +0 -1
- package/bin/runtime/server/rpc/Server.d.ts +0 -18
- package/bin/runtime/server/rpc/Server.d.ts.map +0 -1
- package/bin/runtime/server/rpc/Server.js +0 -315
- package/bin/runtime/server/rpc/Server.js.map +0 -1
- package/bin/runtime/transport/rpc/Client.d.ts +0 -13
- package/bin/runtime/transport/rpc/Client.d.ts.map +0 -1
- package/bin/runtime/transport/rpc/Client.js +0 -98
- package/bin/runtime/transport/rpc/Client.js.map +0 -1
- package/bin/runtime/transport/rpc/Paths.d.ts +0 -14
- package/bin/runtime/transport/rpc/Paths.d.ts.map +0 -1
- package/bin/runtime/transport/rpc/Paths.js +0 -42
- package/bin/runtime/transport/rpc/Paths.js.map +0 -1
- package/bin/runtime/transport/rpc/Transport.d.ts +0 -21
- package/bin/runtime/transport/rpc/Transport.d.ts.map +0 -1
- package/bin/runtime/transport/rpc/Transport.js +0 -30
- package/bin/runtime/transport/rpc/Transport.js.map +0 -1
- package/bin/types/common/ResolvedConfigValue.d.ts +0 -12
- package/bin/types/common/ResolvedConfigValue.d.ts.map +0 -1
- package/bin/types/common/ResolvedConfigValue.js +0 -2
- package/bin/types/common/ResolvedConfigValue.js.map +0 -1
- package/bin/types/runtime/rpc/LocalRpc.d.ts +0 -69
- package/bin/types/runtime/rpc/LocalRpc.d.ts.map +0 -1
- package/bin/types/runtime/rpc/LocalRpc.js +0 -9
- package/bin/types/runtime/rpc/LocalRpc.js.map +0 -1
- package/src/config/ConfigEnvResolver.ts +0 -52
- package/src/runtime/server/rpc/Server.ts +0 -408
- package/src/runtime/transport/rpc/Client.ts +0 -113
- package/src/runtime/transport/rpc/Paths.ts +0 -50
- package/src/runtime/transport/rpc/Transport.ts +0 -43
- package/src/types/common/ResolvedConfigValue.ts +0 -16
- package/src/types/runtime/rpc/LocalRpc.ts +0 -72
|
@@ -14,23 +14,7 @@ export declare const shellStartInputSchema: z.ZodObject<{
|
|
|
14
14
|
inline_wait_ms: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
15
15
|
max_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
16
16
|
auto_notify_on_exit: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
-
},
|
|
18
|
-
cmd: string;
|
|
19
|
-
login: boolean;
|
|
20
|
-
inline_wait_ms: number;
|
|
21
|
-
auto_notify_on_exit?: boolean | undefined;
|
|
22
|
-
shell?: string | undefined;
|
|
23
|
-
workdir?: string | undefined;
|
|
24
|
-
max_output_tokens?: number | undefined;
|
|
25
|
-
}, {
|
|
26
|
-
cmd: string;
|
|
27
|
-
auto_notify_on_exit?: boolean | undefined;
|
|
28
|
-
shell?: string | undefined;
|
|
29
|
-
workdir?: string | undefined;
|
|
30
|
-
login?: boolean | undefined;
|
|
31
|
-
inline_wait_ms?: number | undefined;
|
|
32
|
-
max_output_tokens?: number | undefined;
|
|
33
|
-
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
34
18
|
export declare const shellExecInputSchema: z.ZodObject<{
|
|
35
19
|
cmd: z.ZodString;
|
|
36
20
|
workdir: z.ZodOptional<z.ZodString>;
|
|
@@ -38,81 +22,29 @@ export declare const shellExecInputSchema: z.ZodObject<{
|
|
|
38
22
|
login: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
39
23
|
timeout_ms: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
40
24
|
max_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
41
|
-
},
|
|
42
|
-
cmd: string;
|
|
43
|
-
login: boolean;
|
|
44
|
-
timeout_ms: number;
|
|
45
|
-
shell?: string | undefined;
|
|
46
|
-
workdir?: string | undefined;
|
|
47
|
-
max_output_tokens?: number | undefined;
|
|
48
|
-
}, {
|
|
49
|
-
cmd: string;
|
|
50
|
-
shell?: string | undefined;
|
|
51
|
-
workdir?: string | undefined;
|
|
52
|
-
login?: boolean | undefined;
|
|
53
|
-
max_output_tokens?: number | undefined;
|
|
54
|
-
timeout_ms?: number | undefined;
|
|
55
|
-
}>;
|
|
25
|
+
}, z.core.$strip>;
|
|
56
26
|
export declare const shellStatusInputSchema: z.ZodObject<{
|
|
57
27
|
shell_id: z.ZodOptional<z.ZodString>;
|
|
58
28
|
cmd: z.ZodOptional<z.ZodString>;
|
|
59
|
-
},
|
|
60
|
-
shell_id?: string | undefined;
|
|
61
|
-
cmd?: string | undefined;
|
|
62
|
-
}, {
|
|
63
|
-
shell_id?: string | undefined;
|
|
64
|
-
cmd?: string | undefined;
|
|
65
|
-
}>;
|
|
29
|
+
}, z.core.$strip>;
|
|
66
30
|
export declare const shellReadInputSchema: z.ZodObject<{
|
|
67
31
|
shell_id: z.ZodString;
|
|
68
32
|
from_cursor: z.ZodOptional<z.ZodNumber>;
|
|
69
33
|
max_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
70
|
-
},
|
|
71
|
-
shell_id: string;
|
|
72
|
-
max_output_tokens?: number | undefined;
|
|
73
|
-
from_cursor?: number | undefined;
|
|
74
|
-
}, {
|
|
75
|
-
shell_id: string;
|
|
76
|
-
max_output_tokens?: number | undefined;
|
|
77
|
-
from_cursor?: number | undefined;
|
|
78
|
-
}>;
|
|
34
|
+
}, z.core.$strip>;
|
|
79
35
|
export declare const shellWriteInputSchema: z.ZodObject<{
|
|
80
36
|
shell_id: z.ZodString;
|
|
81
37
|
chars: z.ZodString;
|
|
82
|
-
},
|
|
83
|
-
shell_id: string;
|
|
84
|
-
chars: string;
|
|
85
|
-
}, {
|
|
86
|
-
shell_id: string;
|
|
87
|
-
chars: string;
|
|
88
|
-
}>;
|
|
38
|
+
}, z.core.$strip>;
|
|
89
39
|
export declare const shellWaitInputSchema: z.ZodObject<{
|
|
90
40
|
shell_id: z.ZodString;
|
|
91
41
|
after_version: z.ZodOptional<z.ZodNumber>;
|
|
92
42
|
from_cursor: z.ZodOptional<z.ZodNumber>;
|
|
93
43
|
timeout_ms: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
94
44
|
max_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
95
|
-
},
|
|
96
|
-
shell_id: string;
|
|
97
|
-
timeout_ms: number;
|
|
98
|
-
max_output_tokens?: number | undefined;
|
|
99
|
-
from_cursor?: number | undefined;
|
|
100
|
-
after_version?: number | undefined;
|
|
101
|
-
}, {
|
|
102
|
-
shell_id: string;
|
|
103
|
-
max_output_tokens?: number | undefined;
|
|
104
|
-
timeout_ms?: number | undefined;
|
|
105
|
-
from_cursor?: number | undefined;
|
|
106
|
-
after_version?: number | undefined;
|
|
107
|
-
}>;
|
|
45
|
+
}, z.core.$strip>;
|
|
108
46
|
export declare const shellCloseInputSchema: z.ZodObject<{
|
|
109
47
|
shell_id: z.ZodString;
|
|
110
48
|
force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
111
|
-
},
|
|
112
|
-
shell_id: string;
|
|
113
|
-
force: boolean;
|
|
114
|
-
}, {
|
|
115
|
-
shell_id: string;
|
|
116
|
-
force?: boolean | undefined;
|
|
117
|
-
}>;
|
|
49
|
+
}, z.core.$strip>;
|
|
118
50
|
//# sourceMappingURL=ShellToolSchemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShellToolSchemas.d.ts","sourceRoot":"","sources":["../../../../src/executor/tools/shell/ShellToolSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"ShellToolSchemas.d.ts","sourceRoot":"","sources":["../../../../src/executor/tools/shell/ShellToolSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;;;;;;iBA4BhC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;iBAwB/B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;iBAMjC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;iBAU/B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;iBAmB/B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;iBAOhC,CAAC"}
|
|
@@ -3,19 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 关键点(中文)
|
|
5
5
|
* - 存储位置:`.downcity/agents/<encodedAgentId>/sessions/<encodedSessionId>/messages/meta.json`
|
|
6
|
-
* - 用于保存
|
|
6
|
+
* - 用于保存 session 列表、详情和索引所需的轻量元信息
|
|
7
7
|
*/
|
|
8
|
-
/**
|
|
9
|
-
* SDK Session 配置摘要。
|
|
10
|
-
*
|
|
11
|
-
* 关键点(中文)
|
|
12
|
-
* - 这里只存可稳定序列化、仅用于回显/索引的轻量配置摘要。
|
|
13
|
-
* - 例如本地注入的 `LanguageModel` 实例本身不可序列化,因此仅记录其可读标签。
|
|
14
|
-
*/
|
|
15
|
-
export type SessionHistorySdkConfigV1 = {
|
|
16
|
-
/** 当前 session 绑定模型的可读标签。 */
|
|
17
|
-
modelLabel?: string;
|
|
18
|
-
};
|
|
19
8
|
export type SessionHistoryMetaV1 = {
|
|
20
9
|
/** schema 版本。 */
|
|
21
10
|
v: 1;
|
|
@@ -29,17 +18,9 @@ export type SessionHistoryMetaV1 = {
|
|
|
29
18
|
timezone?: string;
|
|
30
19
|
/** 最近一次更新元信息的时间戳(ms)。 */
|
|
31
20
|
updatedAt: number;
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
/** 最近一次 compact 生效的保留消息数。 */
|
|
37
|
-
keepLastMessages?: number;
|
|
38
|
-
/** 最近一次 compact 生效的输入 token 近似上限。 */
|
|
39
|
-
maxInputTokensApprox?: number;
|
|
40
|
-
/** 最近一次 compact 生效的前段压缩比例。 */
|
|
41
|
-
compactRatio?: number;
|
|
42
|
-
/** SDK 侧的轻量配置摘要。 */
|
|
43
|
-
sdkConfig?: SessionHistorySdkConfigV1;
|
|
21
|
+
/** 当前 session 持久化标题。 */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** 当前 session 绑定模型的可读标签。 */
|
|
24
|
+
modelLabel?: string;
|
|
44
25
|
};
|
|
45
26
|
//# sourceMappingURL=SessionHistoryMeta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionHistoryMeta.d.ts","sourceRoot":"","sources":["../../../src/executor/types/SessionHistoryMeta.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH
|
|
1
|
+
{"version":3,"file":"SessionHistoryMeta.d.ts","sourceRoot":"","sources":["../../../src/executor/types/SessionHistoryMeta.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,oBAAoB,GAAG;IACjC,iBAAiB;IACjB,CAAC,EAAE,CAAC,CAAC;IACL,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
|
@@ -55,7 +55,7 @@ export type SessionAssistantStepCallback = (input: SessionAssistantStepCallbackI
|
|
|
55
55
|
*
|
|
56
56
|
* 关键点(中文)
|
|
57
57
|
* - 这里直接复用 AI SDK 的 `UIMessageChunk` 结构,避免在 session 内核层再复制一套协议。
|
|
58
|
-
* - SDK / HTTP
|
|
58
|
+
* - SDK / HTTP 若需要自己的事件模型,应在更上层做映射。
|
|
59
59
|
*/
|
|
60
60
|
export type SessionUiMessageChunk = UIMessageChunk;
|
|
61
61
|
/**
|
package/bin/index.d.ts
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export { Agent } from "./agent/Agent.js";
|
|
10
10
|
export { RemoteAgent } from "./agent/RemoteAgent.js";
|
|
11
|
-
export
|
|
11
|
+
export { inferAgentModelLabel, normalizeAgentModel, } from "./model/CityModelAdapter.js";
|
|
12
|
+
export type { AgentSessionCollection, AgentModel, AgentSessionActor, AgentSession, AgentCreateSessionInput, AgentListSessionsInput, AgentOptions, AgentRpcBinding, AgentRpcStartOptions, AgentStartOptions, AgentStartResult, AgentStopResult, RemoteAgentOptions, AgentSessionConfigSnapshot, AgentSessionForkInput, AgentSessionHistoryInput, AgentSessionHistoryPage, AgentSessionHistoryView, AgentSessionInfo, AgentSessionSetInput, AgentSessionSummary, AgentSessionSummaryPage, AgentSessionSystemBlock, AgentSessionSystemBlockSource, AgentSessionSystemSessionInfo, AgentSessionSystemSnapshot, AgentSessionTimelineEvent, RemoteAgentSession, } from "./types/agent/AgentTypes.js";
|
|
12
13
|
export type { AgentSessionEvent, AgentSessionSubscriber, AgentSessionUnsubscribe, } from "./types/sdk/AgentSessionEvent.js";
|
|
13
14
|
export type { AgentSessionPromptInput } from "./types/sdk/AgentSessionPrompt.js";
|
|
14
15
|
export type { AgentSessionTurnHandle, AgentSessionTurnResult, } from "./types/sdk/AgentSessionTurn.js";
|
|
@@ -28,15 +29,14 @@ export { buildStaticPluginAvailability, findPluginByName, hasPluginLifecycle, li
|
|
|
28
29
|
export { listPluginAuthPolicies, registerPluginHttpRoutes, } from "./plugin/core/PluginHttpRoutes.js";
|
|
29
30
|
export { createLocalPluginCommandContext, getLocalPluginAvailability, runLocalPluginAction, } from "./plugin/core/PluginLocalExecution.js";
|
|
30
31
|
export { registerPluginActionCommandsForCli, } from "./plugin/core/PluginCommand.js";
|
|
32
|
+
export { startRpcServer } from "./rpc/Server.js";
|
|
31
33
|
export { startServer } from "./runtime/server/http/Server.js";
|
|
32
|
-
export { startLocalRpcServer } from "./runtime/server/rpc/Server.js";
|
|
33
|
-
export { callAgentTransport } from "./runtime/transport/rpc/Transport.js";
|
|
34
34
|
export { startAllPlugins, stopAllPlugins, } from "./plugin/core/Manager.js";
|
|
35
35
|
export { ActionScheduleStore } from "./plugin/core/ActionScheduleStore.js";
|
|
36
36
|
export { parseActionScheduleRunAtMsOrThrow } from "./plugin/core/ActionScheduleTime.js";
|
|
37
37
|
export { pickLastSuccessfulChatSendText, resolveAssistantMessageForPersistence, } from "./executor/messages/UserVisibleText.js";
|
|
38
38
|
export { persistProjectPluginConfig } from "./plugin/core/ProjectConfigStore.js";
|
|
39
|
-
export { initializeAgentProject, isAgentProjectInitialized,
|
|
39
|
+
export { initializeAgentProject, isAgentProjectInitialized, normalizeDefaultAgentId, } from "./config/AgentInitializer.js";
|
|
40
40
|
export { loadDowncityConfig } from "./config/Config.js";
|
|
41
41
|
export { ensureRuntimeProjectReady, } from "./runtime/host/daemon/ProjectSetup.js";
|
|
42
42
|
export { assertProjectExecutionTarget } from "./config/ExecutionBinding.js";
|
|
@@ -52,7 +52,6 @@ export type { ControlPlaneRuntimeMeta, ControlPlaneRuntimeStatus, ManagedAgentPr
|
|
|
52
52
|
export type { PlatformAgentChatChannelStatus, PlatformAgentDaemonMeta, PlatformAgentShipChatChannelsConfig, PlatformAgentShipChatPluginConfig, PlatformAgentShipExecutionAgentConfig, PlatformAgentShipExecutionConfig, PlatformAgentShipJson, PlatformAgentShipPluginsConfig, PlatformAgentShipSingleChannelConfig, PlatformAgentShipStartConfig, } from "./types/runtime/platform/PlatformGateway.js";
|
|
53
53
|
export { DAEMON_LOG_FILENAME, DAEMON_META_FILENAME, DAEMON_PID_FILENAME, } from "./types/runtime/daemon/Daemon.js";
|
|
54
54
|
export type { DaemonMeta, DaemonStaleReason, } from "./types/runtime/daemon/Daemon.js";
|
|
55
|
-
export type { LocalRpcRequest, LocalRpcResponse, } from "./types/runtime/rpc/LocalRpc.js";
|
|
56
55
|
export type { InlineInstantExecutorType, PlatformInlineInstantRunInput, PlatformInlineInstantRunResult, PlatformInlineInstantRunner, } from "./types/runtime/http/InlineInstant.js";
|
|
57
56
|
export type { Plugin, PluginAction, PluginActionApi, PluginActionCommand, PluginActionCommandInput, PluginActionResult, PluginActions, PluginAvailability, PluginConfigDefinition, PluginEffectHook, PluginGuardHook, PluginHooks, PluginHttpDefinition, PluginPipelineHook, PluginPort, PluginResolveHook, PluginHttpRegistration, PluginActionInvokeParams, PluginActionInvokePort, PluginActionInvokeResult, PluginSetupDefinition, PluginSetupField, PluginSetupFieldOption, PluginUsageDefinition, PluginUsageField, PluginUsageFieldOption, PluginView, } from "./plugin/types/Plugin.js";
|
|
58
57
|
export type { PluginActionResponse, PluginCatalogResponse, PluginAvailabilityResponse, PluginAvailabilityView, } from "./plugin/types/PluginApi.js";
|
|
@@ -60,7 +59,7 @@ export type { PluginCommandResult, PluginLifecycle, PluginState, } from "./plugi
|
|
|
60
59
|
export type { ActionScheduleJobRecord, ActionScheduleJobStatus, CreateActionScheduleJobInput, PluginActionScheduleInput, } from "./plugin/types/ActionSchedule.js";
|
|
61
60
|
export type { PluginCliBaseOptions, PluginCommandResponse, PluginControlAction, PluginControlResponse, PluginStateListResponse, PluginStateView, } from "./plugin/types/Plugins.js";
|
|
62
61
|
export type { PluginStateControlAction, PluginStateControlResult, PluginStateSnapshot, } from "./plugin/core/Manager.js";
|
|
63
|
-
export type {
|
|
62
|
+
export type { StoredChannelAccount, StoredChannelAccountChannel, StoredEnvEntry, StoredGlobalEnvEntry, UpsertChannelAccountInput, UpsertEnvEntryInput, UpsertGlobalEnvEntryInput, } from "./types/runtime/host/Store.js";
|
|
64
63
|
export { AUTH_DEFAULT_ROLE_NAMES, AUTH_DEFAULT_ROLES, AUTH_PERMISSION_DESCRIPTIONS, AUTH_PERMISSION_KEYS, } from "./types/runtime/auth/AuthPermission.js";
|
|
65
64
|
export type { AuthDefaultRoleDefinition, AuthDefaultRoleName, AuthPermissionKey, } from "./types/runtime/auth/AuthPermission.js";
|
|
66
65
|
export type { AuthRoutePolicy } from "./types/runtime/auth/AuthRoute.js";
|
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,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,YAAY,EACV,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,YAAY,EACZ,
|
|
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,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,sBAAsB,EACtB,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EAAE,uBAAuB,EAAE,MAAM,mCAAm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B,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAGlC,YAAY,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,wCAAwC,CAAC;AAChD,YAAY,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,YAAY,EACV,eAAe,EACf,gBAAgB,GACjB,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EACV,YAAY,EACZ,cAAc,EACd,aAAa,EACb,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,cAAc,GACf,MAAM,mCAAmC,CAAC"}
|
package/bin/index.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
// Agent 入口
|
|
10
10
|
export { Agent } from "./agent/Agent.js";
|
|
11
11
|
export { RemoteAgent } from "./agent/RemoteAgent.js";
|
|
12
|
+
export { inferAgentModelLabel, normalizeAgentModel, } from "./model/CityModelAdapter.js";
|
|
12
13
|
// Plugin 作者 API
|
|
13
14
|
export { BasePlugin } from "./plugin/core/BasePlugin.js";
|
|
14
15
|
// Session 与即时执行集成
|
|
@@ -25,10 +26,10 @@ export { buildStaticPluginAvailability, findPluginByName, hasPluginLifecycle, li
|
|
|
25
26
|
export { listPluginAuthPolicies, registerPluginHttpRoutes, } from "./plugin/core/PluginHttpRoutes.js";
|
|
26
27
|
export { createLocalPluginCommandContext, getLocalPluginAvailability, runLocalPluginAction, } from "./plugin/core/PluginLocalExecution.js";
|
|
27
28
|
export { registerPluginActionCommandsForCli, } from "./plugin/core/PluginCommand.js";
|
|
28
|
-
// Agent
|
|
29
|
+
// Agent RPC 集成
|
|
30
|
+
export { startRpcServer } from "./rpc/Server.js";
|
|
31
|
+
// 宿主 HTTP gateway 集成
|
|
29
32
|
export { startServer } from "./runtime/server/http/Server.js";
|
|
30
|
-
export { startLocalRpcServer } from "./runtime/server/rpc/Server.js";
|
|
31
|
-
export { callAgentTransport } from "./runtime/transport/rpc/Transport.js";
|
|
32
33
|
// Runtime plugin 运行集成
|
|
33
34
|
export { startAllPlugins, stopAllPlugins, } from "./plugin/core/Manager.js";
|
|
34
35
|
export { ActionScheduleStore } from "./plugin/core/ActionScheduleStore.js";
|
|
@@ -37,13 +38,13 @@ export { pickLastSuccessfulChatSendText, resolveAssistantMessageForPersistence,
|
|
|
37
38
|
// Plugin 与权限配置集成
|
|
38
39
|
export { persistProjectPluginConfig } from "./plugin/core/ProjectConfigStore.js";
|
|
39
40
|
// 项目与配置集成
|
|
40
|
-
export { initializeAgentProject, isAgentProjectInitialized,
|
|
41
|
+
export { initializeAgentProject, isAgentProjectInitialized, normalizeDefaultAgentId, } from "./config/AgentInitializer.js";
|
|
41
42
|
export { loadDowncityConfig } from "./config/Config.js";
|
|
42
43
|
export { ensureRuntimeProjectReady, } from "./runtime/host/daemon/ProjectSetup.js";
|
|
43
44
|
export { assertProjectExecutionTarget } from "./config/ExecutionBinding.js";
|
|
44
45
|
// 日志
|
|
45
46
|
export { getLogger, logger } from "./utils/logger/Logger.js";
|
|
46
|
-
// Daemon
|
|
47
|
+
// Daemon 协议类型
|
|
47
48
|
export { DAEMON_LOG_FILENAME, DAEMON_META_FILENAME, DAEMON_PID_FILENAME, } from "./types/runtime/daemon/Daemon.js";
|
|
48
49
|
// HTTP auth 协议类型
|
|
49
50
|
export { AUTH_DEFAULT_ROLE_NAMES, AUTH_DEFAULT_ROLES, AUTH_PERMISSION_DESCRIPTIONS, AUTH_PERMISSION_KEYS, } from "./types/runtime/auth/AuthPermission.js";
|
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,WAAW,EAAE,MAAM,wBAAwB,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,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAkDrC,gBAAgB;AAChB,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,kBAAkB;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EACL,kCAAkC,EAClC,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,kEAAkE,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AACtG,OAAO,EAAE,8BAA8B,EAAE,MAAM,wEAAwE,CAAC;AAExH,OAAO,EAAE,kCAAkC,EAAE,MAAM,sDAAsD,CAAC;AAC1G,OAAO,EACL,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAE3E,iBAAiB;AACjB,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,YAAY,GACb,MAAM,gCAAgC,CAAC;AACxC,OAA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ityModel 到 AI SDK LanguageModel 的适配模块。
|
|
3
|
+
*
|
|
4
|
+
* 关键点(中文)
|
|
5
|
+
* - Agent 对外可以接收 CityModel,但 executor 内部仍只处理 AI SDK LanguageModel。
|
|
6
|
+
* - 适配逻辑集中在这里,避免 City 协议散落到 session/executor 各处。
|
|
7
|
+
* - 这里不依赖 @downcity/city,只依赖 @downcity/type 的共享协议。
|
|
8
|
+
*/
|
|
9
|
+
import { type CityModel } from "@downcity/type";
|
|
10
|
+
import type { LanguageModel } from "ai";
|
|
11
|
+
/**
|
|
12
|
+
* Agent SDK 可接受的模型输入。
|
|
13
|
+
*/
|
|
14
|
+
export type AgentModel = LanguageModel | CityModel;
|
|
15
|
+
/**
|
|
16
|
+
* 将 Agent 可接受的模型输入归一为 AI SDK LanguageModel。
|
|
17
|
+
*/
|
|
18
|
+
export declare function normalizeAgentModel(model: AgentModel): LanguageModel;
|
|
19
|
+
/**
|
|
20
|
+
* 从 Agent 模型输入推导展示标签。
|
|
21
|
+
*/
|
|
22
|
+
export declare function inferAgentModelLabel(model: AgentModel | undefined): string | undefined;
|
|
23
|
+
//# sourceMappingURL=CityModelAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CityModelAdapter.d.ts","sourceRoot":"","sources":["../../src/model/CityModelAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAGL,KAAK,SAAS,EAEf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAA6B,MAAM,IAAI,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,SAAS,CAAC;AA2UnD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,aAAa,CAGpE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAqBtF"}
|