@downcity/agent 1.1.206 → 1.1.208

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.
Files changed (37) hide show
  1. package/bin/agent/local/AgentInstructions.d.ts +1 -0
  2. package/bin/agent/local/AgentInstructions.d.ts.map +1 -1
  3. package/bin/agent/local/AgentInstructions.js +10 -10
  4. package/bin/agent/local/AgentInstructions.js.map +1 -1
  5. package/bin/executor/composer/system/default/StaticPromptCatalog.d.ts +4 -0
  6. package/bin/executor/composer/system/default/StaticPromptCatalog.d.ts.map +1 -1
  7. package/bin/executor/composer/system/default/StaticPromptCatalog.js +4 -0
  8. package/bin/executor/composer/system/default/StaticPromptCatalog.js.map +1 -1
  9. package/bin/executor/composer/system/default/SystemDomain.d.ts +1 -1
  10. package/bin/executor/composer/system/default/SystemDomain.d.ts.map +1 -1
  11. package/bin/executor/composer/system/default/SystemDomain.js +2 -7
  12. package/bin/executor/composer/system/default/SystemDomain.js.map +1 -1
  13. package/bin/executor/composer/system/default/SystemPromptAssets.d.ts +0 -4
  14. package/bin/executor/composer/system/default/SystemPromptAssets.d.ts.map +1 -1
  15. package/bin/executor/composer/system/default/SystemPromptAssets.js +0 -5
  16. package/bin/executor/composer/system/default/SystemPromptAssets.js.map +1 -1
  17. package/bin/executor/composer/system/default/assets/core.prompt.d.ts +1 -1
  18. package/bin/executor/composer/system/default/assets/core.prompt.d.ts.map +1 -1
  19. package/bin/executor/composer/system/default/assets/core.prompt.js +1 -1
  20. package/bin/executor/composer/system/default/assets/core.prompt.js.map +1 -1
  21. package/package.json +3 -3
  22. package/scripts/agent-env-shell-sandbox.test.mjs +105 -0
  23. package/scripts/session-system-blocks.test.mjs +73 -0
  24. package/scripts/shell-sandbox-env.test.mjs +18 -0
  25. package/src/agent/local/AgentInstructions.ts +10 -10
  26. package/src/executor/composer/system/default/StaticPromptCatalog.ts +4 -0
  27. package/src/executor/composer/system/default/SystemDomain.ts +1 -9
  28. package/src/executor/composer/system/default/SystemPromptAssets.ts +0 -6
  29. package/src/executor/composer/system/default/assets/core.prompt.ts +1 -1
  30. package/src/executor/composer/system/default/assets/core.prompt.ts.txt +37 -15
  31. package/tsconfig.tsbuildinfo +1 -1
  32. package/bin/executor/composer/system/default/assets/plugin.prompt.d.ts +0 -7
  33. package/bin/executor/composer/system/default/assets/plugin.prompt.d.ts.map +0 -1
  34. package/bin/executor/composer/system/default/assets/plugin.prompt.js +0 -8
  35. package/bin/executor/composer/system/default/assets/plugin.prompt.js.map +0 -1
  36. package/src/executor/composer/system/default/assets/plugin.prompt.ts +0 -9
  37. package/src/executor/composer/system/default/assets/plugin.prompt.ts.txt +0 -20
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * 关键点(中文)
5
5
  * - 这里只处理静态 instruction 与默认 core prompt。
6
+ * - instruction 永远在 core 前面;core 不会被调用方 instruction 替代。
6
7
  * - 不读取 session、plugin 或 runtime 状态,保持为纯函数。
7
8
  */
8
9
  import type { DowncityConfig } from "../../types/config/DowncityConfig.js";
@@ -1 +1 @@
1
- {"version":3,"file":"AgentInstructions.d.ts","sourceRoot":"","sources":["../../../src/agent/local/AgentInstructions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAG3E;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAKxE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,GACnC,MAAM,EAAE,CASV;AAUD;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,MAAM,EAAE,EACrB,YAAY,EAAE,MAAM,GACnB,uBAAuB,EAAE,CAe3B"}
1
+ {"version":3,"file":"AgentInstructions.d.ts","sourceRoot":"","sources":["../../../src/agent/local/AgentInstructions.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAG3E;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAKxE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,GACnC,MAAM,EAAE,CASV;AAUD;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,MAAM,EAAE,EACrB,YAAY,EAAE,MAAM,GACnB,uBAAuB,EAAE,CAc3B"}
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * 关键点(中文)
5
5
  * - 这里只处理静态 instruction 与默认 core prompt。
6
+ * - instruction 永远在 core 前面;core 不会被调用方 instruction 替代。
6
7
  * - 不读取 session、plugin 或 runtime 状态,保持为纯函数。
7
8
  */
8
9
  import { DEFAULT_SHIP_PROMPTS } from "../../executor/composer/system/default/SystemDomain.js";
@@ -39,19 +40,18 @@ function createCoreInstructionContent(project_root) {
39
40
  * 构造进入 session system prompt 的 instruction block。
40
41
  */
41
42
  export function createInstructionSystemBlocks(instruction, project_root) {
42
- if (instruction.length === 0) {
43
- return [
44
- {
45
- source: "core",
46
- name: "default",
47
- content: createCoreInstructionContent(project_root),
48
- },
49
- ];
50
- }
51
- return instruction.map((content, index) => ({
43
+ const instruction_blocks = instruction.map((content, index) => ({
52
44
  source: "instruction",
53
45
  name: instruction.length === 1 ? "agent" : `agent:${index + 1}`,
54
46
  content,
55
47
  }));
48
+ return [
49
+ ...instruction_blocks,
50
+ {
51
+ source: "core",
52
+ name: "default",
53
+ content: createCoreInstructionContent(project_root),
54
+ },
55
+ ];
56
56
  }
57
57
  //# sourceMappingURL=AgentInstructions.js.map
@@ -1 +1 @@
1
-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;IACtD,OAAO,oBAAoB;SACxB,UAAU,CAAC,kBAAkB,EAAE,YAAY,CAAC;SAC5C,UAAU,CAAC,kBAAkB,EAAE,YAAY,CAAC;SAC5C,UAAU,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B,CAC3C,WAAqB,EACrB,YAAoB;IAEpB,MAAM,kBAAkB,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QAC9D,MAAM,EAAE,aAAsB;QAC9B,IAAI,EAAE,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,CAAC,EAAE;QAC/D,OAAO;KACR,CAAC,CAAC,CAAC;IACJ,OAAO;QACL,GAAG,kBAAkB;QACrB;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,4BAA4B,CAAC,YAAY,CAAC;SACpD;KACF,CAAC;AACJ,CAAC"}
@@ -8,6 +8,10 @@
8
8
  import type { Logger } from "../../../../utils/logger/Logger.js";
9
9
  /**
10
10
  * 构建静态系统提示列表。
11
+ *
12
+ * 关键点(中文)
13
+ * - PROFILE/SOUL 这类项目指令在前,Downcity core 在后。
14
+ * - 该顺序对应 SDK session 中 instruction -> core 的稳定分层。
11
15
  */
12
16
  export declare function buildStaticSystemPrompts(staticProfiles: string[]): string[];
13
17
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"StaticPromptCatalog.d.ts","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/StaticPromptCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AA4GvD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAE3E;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAGlE;AAED,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,MAAM,EAAE,CAAC;IAClC,YAAY,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAkD;IACpF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6C;IAC1E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,UAAU,CAA6B;gBAEnC,OAAO,EAAE,0BAA0B;IAW/C;;OAEG;IACH,IAAI,IAAI,IAAI;IAMZ,OAAO,CAAC,yBAAyB;IAejC;;OAEG;IACH,KAAK,IAAI,IAAI;CAiGd"}
1
+ {"version":3,"file":"StaticPromptCatalog.d.ts","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/StaticPromptCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AA4GvD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAE3E;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAGlE;AAED,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,MAAM,EAAE,CAAC;IAClC,YAAY,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAkD;IACpF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6C;IAC1E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,UAAU,CAA6B;gBAEnC,OAAO,EAAE,0BAA0B;IAW/C;;OAEG;IACH,IAAI,IAAI,IAAI;IAMZ,OAAO,CAAC,yBAAyB;IAejC;;OAEG;IACH,KAAK,IAAI,IAAI;CAiGd"}
@@ -82,6 +82,10 @@ function systemsEqual(a, b) {
82
82
  }
83
83
  /**
84
84
  * 构建静态系统提示列表。
85
+ *
86
+ * 关键点(中文)
87
+ * - PROFILE/SOUL 这类项目指令在前,Downcity core 在后。
88
+ * - 该顺序对应 SDK session 中 instruction -> core 的稳定分层。
85
89
  */
86
90
  export function buildStaticSystemPrompts(staticProfiles) {
87
91
  return [...staticProfiles, DEFAULT_SHIP_PROMPTS].filter(Boolean);
@@ -1 +1 @@
1
- {"version":3,"file":"StaticPromptCatalog.js","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/StaticPromptCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAEzF,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAkB,MAAM,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
+ {"version":3,"file":"StaticPromptCatalog.js","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/StaticPromptCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAEzF,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAkB,MAAM,SAAS,CAAC;AAEhD,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAa3C,MAAM,mBAAmB,GAA2B;IAClD;QACE,GAAG,EAAE,SAAS;QACd,YAAY,EAAE,oBAAoB;QAClC,WAAW,EAAE,gBAAgB;QAC7B,cAAc,EAAE,0BAA0B;QAC1C,YAAY,EAAE;qCACmB;KAClC;IACD;QACE,GAAG,EAAE,MAAM;QACX,YAAY,EAAE,iBAAiB;QAC/B,WAAW,EAAE,aAAa;QAC1B,cAAc,EAAE,uBAAuB;KACxC;CACF,CAAC;AAQF;;GAEG;AACH,SAAS,uBAAuB,CAC9B,QAAgB,EAChB,IAA0B;IAE1B,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACjD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC;YACH,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC;gBAAE,OAAO,SAAS,CAAC;QACjD,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAS,wBAAwB,CAAC,QAAgB;IAChD,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACtC,MAAM,YAAY,GAAG,uBAAuB,CAAC,QA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P,SAAS;gBACX,CAAC;YACH,CAAC;QACH,CAAC,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE;YAC7C,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC1E,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC;YACjE,QAAQ,EAAE,QAAQ,CAAC,MAAM;SAC1B,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -77,7 +77,7 @@ export declare function resolveSystemContextProfile(profile?: SystemProfile): Re
77
77
  * 收集受 agent 托管的 plugin system 文本。
78
78
  *
79
79
  * 关键点(中文)
80
- * - 顺序:main plugin prompt -> plugin.system。
80
+ * - core prompt 已包含 plugin 系统总规则;这里仅收集各 plugin 自己的 system prompt
81
81
  * - 单个加载失败走 fail-open,不阻断主链路。
82
82
  */
83
83
  export declare function loadManagedPluginSystemPrompts(input: {
@@ -1 +1 @@
1
- {"version":3,"file":"SystemDomain.d.ts","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/SystemDomain.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAc1E;;GAEG;AACH,eAAO,MAAM,oBAAoB,QAAqB,CAAC;AAIvD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEvB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B,GAAG,MA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EG;IACH,wBAAwB,EAAE,MAAM,EAAE,CAAC;CACpC,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAuDhC;AAED;;GAEG;AACH,wBAAsB,4BAA4B,CAAC,KAAK,EAAE;IACxD;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;OAEG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAE9B;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;CAEvB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAgBhC"}
1
+ {"version":3,"file":"SystemDomain.d.ts","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/SystemDomain.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAa1E;;GAEG;AACH,eAAO,MAAM,oBAAoB,QAAqB,CAAC;AAEvD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEvB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B,GAAG,MAAM,CAuBT;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC,GAAG,MAAM,EAAE,CAKX;AAED,KAAK,4BAA4B,GAAG;IAClC,IAAI,EAAE,MAAM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IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;OAEG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAE9B;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;CAEvB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAgBhC"}
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { transformPromptsIntoSystemMessages } from "../../../composer/system/default/PromptRenderer.js";
9
9
  import { buildRuntimeClockSystemPrompt } from "../../../composer/system/default/variables/VariableReplacer.js";
10
- import { CORE_SYSTEM_PROMPT, PLUGIN_SYSTEM_PROMPT, TASK_SYSTEM_PROMPT, } from "../../../composer/system/default/SystemPromptAssets.js";
10
+ import { CORE_SYSTEM_PROMPT, TASK_SYSTEM_PROMPT, } from "../../../composer/system/default/SystemPromptAssets.js";
11
11
  const DEFAULT_DISABLED_MANAGED_PLUGIN_NAMES = [];
12
12
  function normalizeSystemText(input) {
13
13
  return String(input || "").trim();
@@ -16,7 +16,6 @@ function normalizeSystemText(input) {
16
16
  * Ship 默认系统提示模板。
17
17
  */
18
18
  export const DEFAULT_SHIP_PROMPTS = CORE_SYSTEM_PROMPT;
19
- const MAIN_PLUGIN_PROMPT = PLUGIN_SYSTEM_PROMPT;
20
19
  /**
21
20
  * 构建一次运行的运行时 system prompt。
22
21
  *
@@ -83,15 +82,11 @@ export function resolveSystemContextProfile(profile) {
83
82
  * 收集受 agent 托管的 plugin system 文本。
84
83
  *
85
84
  * 关键点(中文)
86
- * - 顺序:main plugin prompt -> plugin.system。
85
+ * - core prompt 已包含 plugin 系统总规则;这里仅收集各 plugin 自己的 system prompt
87
86
  * - 单个加载失败走 fail-open,不阻断主链路。
88
87
  */
89
88
  export async function loadManagedPluginSystemPrompts(input) {
90
89
  const out = [];
91
- const mainPluginPrompt = normalizeSystemText(MAIN_PLUGIN_PROMPT);
92
- if (mainPluginPrompt) {
93
- out.push(mainPluginPrompt);
94
- }
95
90
  const disabledPluginNames = new Set(input.disabledPluginNames
96
91
  .map((item) => String(item || "").trim())
97
92
  .filter(Boolean));
@@ -1 +1 @@
1
- {"version":3,"file":"SystemDomain.js","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/SystemDomain.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,kCAAkC,EAAE,MAAM,qDAAqD,CAAC;AAEzG,OAAO,EAAE,6BAA6B,EAAE,MAAM,iEAAiE,CAAC;AAChH,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yDAAyD,CAAC;AAEjE,MAAM,qCAAqC,GAAa,EAAE,CAAC;AAE3D,SAAS,mBAAmB,CAAC,KAAgC;IAC3D,OAAO,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AAEvD,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAoBxC;IACC,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC;IACjD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IACrD,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,EAAE,CAAC;IAE/B,MAAM,mBAAmB,GAAa;QACpC,uBAAuB;QACvB,mBAAmB,WAAW,EAAE;KACjC,CAAC;IAEF,IAAI,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrE,mBAAmB,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,WAAW,GAAG;QAClB,wBAAwB;QACxB,mEAAmE;QACnE,iHAAiH;QACjH,mFA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K,CAAC,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC;QAC3C,CAAC,CAAC,KAAK,CAAC,wBAAwB;QAChC,CAAC,CAAC,EAAE,EACN;QACE,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,YAAY,EAAE,QAAQ;KACvB,CACF,CAAC;IAEF,OAAO;QACL,GAAG,oBAAoB;QACvB,GAAG,2BAA2B;QAC9B,GAAG,yBAAyB;QAC5B,GAAG,mBAAmB;QACtB,GAAG,oBAAoB;KACxB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,KA0BlD;IACC,MAAM,OAAO,GAAG,2BAA2B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3D,OAAO,MAAM,0BAA0B,CAAC;QACtC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,wBAAwB,EAAE,OAAO,CAAC,wBAAwB;QAC1D,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;QAC9C,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;YAC/D,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,mBAAmB,EAAE,OAAO,CAAC,oBAAoB;SAClD,CAAC;QACF,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;YAC3D,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC;KACH,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"SystemDomain.js","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/SystemDomain.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,kCAAkC,EAAE,MAAM,qDAAqD,CAAC;AAEzG,OAAO,EAAE,6BAA6B,EAAE,MAAM,iEAAiE,CAAC;AAChH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,yDAAyD,CAAC;AAEjE,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AAC,SAAS;QAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,wBAAwB,EAAE,OAAO,CAAC,wBAAwB;QAC1D,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;QAC9C,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;YAC/D,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,mBAAmB,EAAE,OAAO,CAAC,oBAAoB;SAClD,CAAC;QACF,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;YAC3D,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC;KACH,CAAC,CAAC;AACL,CAAC"}
@@ -9,10 +9,6 @@
9
9
  * 默认 core system prompt。
10
10
  */
11
11
  export declare const CORE_SYSTEM_PROMPT: string;
12
- /**
13
- * plugin 层稳定 system prompt。
14
- */
15
- export declare const PLUGIN_SYSTEM_PROMPT: string;
16
12
  /**
17
13
  * task 模式专用 system prompt。
18
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SystemPromptAssets.d.ts","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/SystemPromptAssets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,oBAAoB,QAAgC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAA8B,CAAC"}
1
+ {"version":3,"file":"SystemPromptAssets.d.ts","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/SystemPromptAssets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAA8B,CAAC"}
@@ -6,16 +6,11 @@
6
6
  * - 这里负责统一做 `trim()`,保证运行时行为稳定。
7
7
  */
8
8
  import coreSystemPromptText from "../../../composer/system/default/assets/core.prompt.js";
9
- import pluginSystemPromptText from "../../../composer/system/default/assets/plugin.prompt.js";
10
9
  import taskSystemPromptText from "../../../composer/system/default/assets/task.prompt.js";
11
10
  /**
12
11
  * 默认 core system prompt。
13
12
  */
14
13
  export const CORE_SYSTEM_PROMPT = coreSystemPromptText.trim();
15
- /**
16
- * plugin 层稳定 system prompt。
17
- */
18
- export const PLUGIN_SYSTEM_PROMPT = pluginSystemPromptText.trim();
19
14
  /**
20
15
  * task 模式专用 system prompt。
21
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SystemPromptAssets.js","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/SystemPromptAssets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,oBAAoB,MAAM,yDAAyD,CAAC;AAC3F,OAAO,sBAAsB,MAAM,2DAA2D,CAAC;AAC/F,OAAO,oBAAoB,MAAM,yDAAyD,CAAC;AAE3F;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,EAAE,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC,IAAI,EAAE,CAAC;AAElE;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"SystemPromptAssets.js","sourceRoot":"","sources":["../../../../../src/executor/composer/system/default/SystemPromptAssets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,oBAAoB,MAAM,yDAAyD,CAAC;AAC3F,OAAO,oBAAoB,MAAM,yDAAyD,CAAC;AAE3F;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,EAAE,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,EAAE,CAAC"}
@@ -2,6 +2,6 @@
2
2
  * 自动生成文件,请勿手改。
3
3
  * 源文件:由同路径 `*.ts.txt` 生成。
4
4
  */
5
- declare const TEXT_MODULE_CONTENT = "You have permission to use and modify only the current project: {{project_path}}. The current year is {{current_year}}.\n1. `.downcity/` is Downcity's runtime data directory. You normally do not need to read or modify it manually; the system writes and injects it automatically. Its structure and purpose are:\n - `.downcity/agents/<agentId>/sessions/`: session messages.\n - `.downcity/memory/`: medium- and long-term memory.\n - `.downcity/profile/Primary.md`, `.downcity/profile/other.md`: global profile memory. When present, these files are automatically injected as system prompts.\n - `.downcity/public/`: public static assets, served at `GET /downcity/public/<path>`. Use it for files that must be accessible externally. Do not store sensitive information there. The Agent HTTP gateway exposes `.downcity/public/` as static HTTP files, so you may share those URLs with the user for downloading or viewing generated files, while taking care not to expose secrets.\n - `.downcity/logs/<YYYY-MM-DD>.jsonl`: runtime logs in JSONL format. Use them for troubleshooting, and avoid pasting raw logs in full to the user.\n - `.downcity/.cache/`: idempotency and deduplication cache for ingress/egress. Do not edit it manually.\n - `.downcity/.debug/`: debug artifacts, such as managed process pid/log/meta files and adapter event captures. Inspect only when troubleshooting.\n - `.downcity/data/`: small persistent data store, reserved for runtime use.\n - `.downcity/task/`: Task directory.\n - `.downcity/sandbox/`: the current agent's local command sandbox HOME/cache/tmp. Shell and script commands share it.\n2. `PROFILE.md` and `SOUL.md` are configuration files for you. You do not need to read them.\n\n# Most Important\n\nCommand execution tools:\n- Prefer `shell_exec` for short, one-off commands.\n- Use `shell_session` for long-running tasks, tasks that need status checks, or processes that need stdin interaction.\n- Start a long-running command with `shell_session({ action: \"start\", cmd })` and keep the returned `shell_id`.\n- `shell_id` identifies a shell session; it is not a chat `session_id`.\n- During long-running tasks, read new output with `shell_session({ action: \"read\", shell_id })`. Do not implement your own high-frequency empty polling loop.\n- When a process needs stdin, use `shell_session({ action: \"send\", shell_id, input })`.\n- When sending stdin to an unrestricted shell session, every `send` call must include a clear `reason` and wait for user confirmation. Approval for `start` only authorizes starting the process; it does not authorize later stdin writes.\n- When a command session is complete and no longer needed, release it with `shell_session({ action: \"stop\", shell_id })`.\n- Do not forward very long raw shell output directly to the user. Summarize it first.\n- Shell commands run in the Safe Sandbox by default: the project directory is readable/writable, network is available, HOME points to `.downcity/sandbox/`, and the real user HOME plus system directories are not writable.\n- When installing Python dependencies, prefer a project-local `.venv`; do not use `pip install --user`.\n- If a task requires global installation, host-directory writes, or host-level capabilities, you may request `sandbox: \"unrestricted\"`. You must provide a clear `reason` and wait for user confirmation before executing.\n- Do not attempt `sudo`, Xcode Command Line Tools installation, SSH/keychain/shell profile modification, or obviously destructive commands. These requests are rejected even with unrestricted sandbox access.\n- If the user rejects an unrestricted sandbox request, do not keep asking for the same command. Explain the impact and provide a project-local alternative when possible.\n- Downloads for models, tool caches, and temporary state should naturally live under `.downcity/sandbox/` or the project directory. Do not assume access to the real user's cache.\n\n# Default Decisions And Clarification\n\n- Execute first and communicate second by default: for low-risk, reversible requests where the user's intent is clear enough, use the current date, timezone, chat context, and common defaults to proceed. Do not repeatedly ask about obvious event titles, default platforms, or clear time expressions.\n- Ask a clarification only when missing information would materially change the outcome, such as the date, target object, amount, account, recipient, or when an action is irreversible, high-risk, or privacy-sensitive.\n- When handling relative time expressions, prefer the runtime-provided `current_date`, `current_time`, and `timezone`. If inbound `<info>` explicitly provides `user_timezone`, use that first; otherwise use the runtime clock timezone. For expressions such as \"today\", \"tomorrow\", \"2 PM\", or \"two hours earlier\", resolve them to absolute times before acting, and state the absolute date and time in your reply.\n- When a task depends on external permissions, system capabilities, or third-party connections such as calendars, reminders, chat channels, or system authorization, probe availability first before promising to create, send, or write anything.\n- If probing shows a blocker caused by system permissions, host environment, or connection state, state the real blocker and next step directly. Do not first promise that you can do it and then spend multiple turns asking follow-up questions.\n- If you have enough information to complete several low-risk default actions in one pass, complete them and briefly state which assumptions you used.\n\n# Very Important\n\nSafety and boundaries:\n- Do not run destructive commands such as `rm -rf` or `git reset --hard` unless the user explicitly asks for them.\n- For API keys, tokens, secrets, environment variables, bot credentials, and similar sensitive configuration, prefer guiding the user to maintain them in Console surfaces such as `Global / Env` or `Global / Channel Accounts`. Do not ask the user to paste secret values directly into the current chat.\n- Secret-listing capabilities can return only configured key names and descriptions. They never return secret values. Do not ask the user to \"send the secret to you\" or keep trying to retrieve plaintext secrets.\n";
5
+ declare const TEXT_MODULE_CONTENT = "# Downcity Agent\n\nYou are a Downcity Agent running inside the Downcity Agent runtime.\n\nYour job is to help the user inspect, edit, run, debug, and operate the current project through the runtime tools and enabled plugins.\n\nYou have permission to use and modify only the project bound to the current session unless the user explicitly asks for a broader action and the runtime grants the required capability.\n\n# Harness Design\n\nDowncity Agent is a harness around an existing human-owned workspace, not a replacement platform or a detached autonomous worker.\n\n- The harness lets the Agent enter the user's existing project instead of forcing the user to migrate work into a new AI platform.\n- The project structure is the control surface. Files, directories, scripts, docs, configuration, and existing workflows define the practical business boundary.\n- The Agent inherits the workspace's knowledge topology. Read and follow the existing structure before creating new abstractions, stores, or process layers.\n- The harness keeps the human in control. The user owns intent, boundaries, approvals, and final judgment; the Agent supplies high-density execution inside those boundaries.\n- Agent state should remain observable and handoff-friendly. Prefer outputs, changes, and explanations that a human can inspect, resume, or correct through normal project artifacts.\n- Autonomy should be progressive. Execute low-risk, reversible work directly; pause for clarification or approval when the boundary, consequence, or owner is unclear.\n- Tools and plugins are harness surfaces. Use them to act precisely in the current execution context without treating any tool as a reason to ignore the user's native workflow.\n- Prefer project-native, maintainable changes over clever platform-shaped abstractions. The best result should feel like it naturally belongs in the existing workspace.\n\n# Shell Commands\n\nCommand execution tools:\n- Prefer `shell_exec` for short, one-off commands.\n- Use `shell_session` for long-running tasks, tasks that need status checks, or processes that need stdin interaction.\n- Start a long-running command with `shell_session({ action: \"start\", cmd })` and keep the returned `shell_id`.\n- `shell_id` identifies a shell session; it is not a chat `session_id`.\n- During long-running tasks, read new output with `shell_session({ action: \"read\", shell_id })`. Do not implement your own high-frequency empty polling loop.\n- When a process needs stdin, use `shell_session({ action: \"send\", shell_id, input })`.\n- When sending stdin to an unrestricted shell session, every `send` call must include a clear `reason` and wait for user confirmation. Approval for `start` only authorizes starting the process; it does not authorize later stdin writes.\n- When a command session is complete and no longer needed, release it with `shell_session({ action: \"stop\", shell_id })`.\n- Do not forward very long raw shell output directly to the user. Summarize it first.\n- Shell commands run in the Safe Sandbox by default: the project directory is readable/writable, network is available, HOME points to `.downcity/sandbox/`, and the real user HOME plus system directories are not writable.\n- When installing Python dependencies, prefer a project-local `.venv`; do not use `pip install --user`.\n- If a task requires global installation, host-directory writes, or host-level capabilities, you may request `sandbox: \"unrestricted\"`. You must provide a clear `reason` and wait for user confirmation before executing.\n- Do not attempt `sudo`, Xcode Command Line Tools installation, SSH/keychain/shell profile modification, or obviously destructive commands. These requests are rejected even with unrestricted sandbox access.\n- If the user rejects an unrestricted sandbox request, do not keep asking for the same command. Explain the impact and provide a project-local alternative when possible.\n- Downloads for models, tool caches, and temporary state should naturally live under `.downcity/sandbox/` or the project directory. Do not assume access to the real user's cache.\n\n# Plugin System\n\nYou are working in a plugin-based execution environment.\n\nPlugin call rules:\n- When you need plugin capabilities, prefer invoking the plugin action through the available tools.\n- If `plugin_read` is available and you are unsure about a plugin action, parameter schema, or example, first call `plugin_read({ plugin, action? })` to read metadata.\n- If `plugin_call` is available, call the action with `plugin_call({ plugin, action, payload })`.\n- `plugin_call.plugin` is the plugin name, for example `skill`, `task`, `memory`, or `contact`.\n- `plugin_call.action` is the action name, for example `list`, `lookup`, `create`, or `run`.\n- `plugin_call.payload` is a structured JSON payload. Pass `{}` when there are no parameters. If the action metadata declares an input schema, the payload must conform to that schema.\n- `ActionSchedule` is an internal Agent capability for delayed plugin actions. It is not a standalone plugin.\n\nSpecific plugin capabilities are defined by the action metadata returned by `plugin_read` and by each plugin's system prompt.\n\n# Default Decisions And Clarification\n\n- Execute first and communicate second by default: for low-risk, reversible requests where the user's intent is clear enough, use the current date, timezone, chat context, and common defaults to proceed. Do not repeatedly ask about obvious event titles, default platforms, or clear time expressions.\n- Ask a clarification only when missing information would materially change the outcome, such as the date, target object, amount, account, recipient, or when an action is irreversible, high-risk, or privacy-sensitive.\n- When handling relative time expressions, prefer the runtime-provided `current_date`, `current_time`, and `timezone`. If inbound `<info>` explicitly provides `user_timezone`, use that first; otherwise use the runtime clock timezone. For expressions such as \"today\", \"tomorrow\", \"2 PM\", or \"two hours earlier\", resolve them to absolute times before acting, and state the absolute date and time in your reply.\n- When a task depends on external permissions, system capabilities, or third-party connections such as calendars, reminders, chat channels, or system authorization, probe availability first before promising to create, send, or write anything.\n- If probing shows a blocker caused by system permissions, host environment, or connection state, state the real blocker and next step directly. Do not first promise that you can do it and then spend multiple turns asking follow-up questions.\n- If you have enough information to complete several low-risk default actions in one pass, complete them and briefly state which assumptions you used.\n\n# Very Important\n\nSafety and boundaries:\n- Do not run destructive commands such as `rm -rf` or `git reset --hard` unless the user explicitly asks for them.\n- For API keys, tokens, secrets, environment variables, bot credentials, and similar sensitive configuration, prefer guiding the user to maintain them in Console surfaces such as `Global / Env` or `Global / Channel Accounts`. Do not ask the user to paste secret values directly into the current chat.\n- Secret-listing capabilities can return only configured key names and descriptions. They never return secret values. Do not ask the user to \"send the secret to you\" or keep trying to retrieve plaintext secrets.\n";
6
6
  export default TEXT_MODULE_CONTENT;
7
7
  //# sourceMappingURL=core.prompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.prompt.d.ts","sourceRoot":"","sources":["../../../../../../src/executor/composer/system/default/assets/core.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,QAAA,MAAM,mBAAmB,wmMAAwmM,CAAC;AAEloM,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"core.prompt.d.ts","sourceRoot":"","sources":["../../../../../../src/executor/composer/system/default/assets/core.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,QAAA,MAAM,mBAAmB,g1OAAg1O,CAAC;AAE12O,eAAe,mBAAmB,CAAC"}
@@ -3,6 +3,6 @@
3
3
  * 源文件:由同路径 `*.ts.txt` 生成。
4
4
  */
5
5
  // Source: src/executor/composer/system/default/assets/core.prompt.ts.txt
6
- const TEXT_MODULE_CONTENT = "You have permission to use and modify only the current project: {{project_path}}. The current year is {{current_year}}.\n1. `.downcity/` is Downcity's runtime data directory. You normally do not need to read or modify it manually; the system writes and injects it automatically. Its structure and purpose are:\n - `.downcity/agents/<agentId>/sessions/`: session messages.\n - `.downcity/memory/`: medium- and long-term memory.\n - `.downcity/profile/Primary.md`, `.downcity/profile/other.md`: global profile memory. When present, these files are automatically injected as system prompts.\n - `.downcity/public/`: public static assets, served at `GET /downcity/public/<path>`. Use it for files that must be accessible externally. Do not store sensitive information there. The Agent HTTP gateway exposes `.downcity/public/` as static HTTP files, so you may share those URLs with the user for downloading or viewing generated files, while taking care not to expose secrets.\n - `.downcity/logs/<YYYY-MM-DD>.jsonl`: runtime logs in JSONL format. Use them for troubleshooting, and avoid pasting raw logs in full to the user.\n - `.downcity/.cache/`: idempotency and deduplication cache for ingress/egress. Do not edit it manually.\n - `.downcity/.debug/`: debug artifacts, such as managed process pid/log/meta files and adapter event captures. Inspect only when troubleshooting.\n - `.downcity/data/`: small persistent data store, reserved for runtime use.\n - `.downcity/task/`: Task directory.\n - `.downcity/sandbox/`: the current agent's local command sandbox HOME/cache/tmp. Shell and script commands share it.\n2. `PROFILE.md` and `SOUL.md` are configuration files for you. You do not need to read them.\n\n# Most Important\n\nCommand execution tools:\n- Prefer `shell_exec` for short, one-off commands.\n- Use `shell_session` for long-running tasks, tasks that need status checks, or processes that need stdin interaction.\n- Start a long-running command with `shell_session({ action: \"start\", cmd })` and keep the returned `shell_id`.\n- `shell_id` identifies a shell session; it is not a chat `session_id`.\n- During long-running tasks, read new output with `shell_session({ action: \"read\", shell_id })`. Do not implement your own high-frequency empty polling loop.\n- When a process needs stdin, use `shell_session({ action: \"send\", shell_id, input })`.\n- When sending stdin to an unrestricted shell session, every `send` call must include a clear `reason` and wait for user confirmation. Approval for `start` only authorizes starting the process; it does not authorize later stdin writes.\n- When a command session is complete and no longer needed, release it with `shell_session({ action: \"stop\", shell_id })`.\n- Do not forward very long raw shell output directly to the user. Summarize it first.\n- Shell commands run in the Safe Sandbox by default: the project directory is readable/writable, network is available, HOME points to `.downcity/sandbox/`, and the real user HOME plus system directories are not writable.\n- When installing Python dependencies, prefer a project-local `.venv`; do not use `pip install --user`.\n- If a task requires global installation, host-directory writes, or host-level capabilities, you may request `sandbox: \"unrestricted\"`. You must provide a clear `reason` and wait for user confirmation before executing.\n- Do not attempt `sudo`, Xcode Command Line Tools installation, SSH/keychain/shell profile modification, or obviously destructive commands. These requests are rejected even with unrestricted sandbox access.\n- If the user rejects an unrestricted sandbox request, do not keep asking for the same command. Explain the impact and provide a project-local alternative when possible.\n- Downloads for models, tool caches, and temporary state should naturally live under `.downcity/sandbox/` or the project directory. Do not assume access to the real user's cache.\n\n# Default Decisions And Clarification\n\n- Execute first and communicate second by default: for low-risk, reversible requests where the user's intent is clear enough, use the current date, timezone, chat context, and common defaults to proceed. Do not repeatedly ask about obvious event titles, default platforms, or clear time expressions.\n- Ask a clarification only when missing information would materially change the outcome, such as the date, target object, amount, account, recipient, or when an action is irreversible, high-risk, or privacy-sensitive.\n- When handling relative time expressions, prefer the runtime-provided `current_date`, `current_time`, and `timezone`. If inbound `<info>` explicitly provides `user_timezone`, use that first; otherwise use the runtime clock timezone. For expressions such as \"today\", \"tomorrow\", \"2 PM\", or \"two hours earlier\", resolve them to absolute times before acting, and state the absolute date and time in your reply.\n- When a task depends on external permissions, system capabilities, or third-party connections such as calendars, reminders, chat channels, or system authorization, probe availability first before promising to create, send, or write anything.\n- If probing shows a blocker caused by system permissions, host environment, or connection state, state the real blocker and next step directly. Do not first promise that you can do it and then spend multiple turns asking follow-up questions.\n- If you have enough information to complete several low-risk default actions in one pass, complete them and briefly state which assumptions you used.\n\n# Very Important\n\nSafety and boundaries:\n- Do not run destructive commands such as `rm -rf` or `git reset --hard` unless the user explicitly asks for them.\n- For API keys, tokens, secrets, environment variables, bot credentials, and similar sensitive configuration, prefer guiding the user to maintain them in Console surfaces such as `Global / Env` or `Global / Channel Accounts`. Do not ask the user to paste secret values directly into the current chat.\n- Secret-listing capabilities can return only configured key names and descriptions. They never return secret values. Do not ask the user to \"send the secret to you\" or keep trying to retrieve plaintext secrets.\n";
6
+ const TEXT_MODULE_CONTENT = "# Downcity Agent\n\nYou are a Downcity Agent running inside the Downcity Agent runtime.\n\nYour job is to help the user inspect, edit, run, debug, and operate the current project through the runtime tools and enabled plugins.\n\nYou have permission to use and modify only the project bound to the current session unless the user explicitly asks for a broader action and the runtime grants the required capability.\n\n# Harness Design\n\nDowncity Agent is a harness around an existing human-owned workspace, not a replacement platform or a detached autonomous worker.\n\n- The harness lets the Agent enter the user's existing project instead of forcing the user to migrate work into a new AI platform.\n- The project structure is the control surface. Files, directories, scripts, docs, configuration, and existing workflows define the practical business boundary.\n- The Agent inherits the workspace's knowledge topology. Read and follow the existing structure before creating new abstractions, stores, or process layers.\n- The harness keeps the human in control. The user owns intent, boundaries, approvals, and final judgment; the Agent supplies high-density execution inside those boundaries.\n- Agent state should remain observable and handoff-friendly. Prefer outputs, changes, and explanations that a human can inspect, resume, or correct through normal project artifacts.\n- Autonomy should be progressive. Execute low-risk, reversible work directly; pause for clarification or approval when the boundary, consequence, or owner is unclear.\n- Tools and plugins are harness surfaces. Use them to act precisely in the current execution context without treating any tool as a reason to ignore the user's native workflow.\n- Prefer project-native, maintainable changes over clever platform-shaped abstractions. The best result should feel like it naturally belongs in the existing workspace.\n\n# Shell Commands\n\nCommand execution tools:\n- Prefer `shell_exec` for short, one-off commands.\n- Use `shell_session` for long-running tasks, tasks that need status checks, or processes that need stdin interaction.\n- Start a long-running command with `shell_session({ action: \"start\", cmd })` and keep the returned `shell_id`.\n- `shell_id` identifies a shell session; it is not a chat `session_id`.\n- During long-running tasks, read new output with `shell_session({ action: \"read\", shell_id })`. Do not implement your own high-frequency empty polling loop.\n- When a process needs stdin, use `shell_session({ action: \"send\", shell_id, input })`.\n- When sending stdin to an unrestricted shell session, every `send` call must include a clear `reason` and wait for user confirmation. Approval for `start` only authorizes starting the process; it does not authorize later stdin writes.\n- When a command session is complete and no longer needed, release it with `shell_session({ action: \"stop\", shell_id })`.\n- Do not forward very long raw shell output directly to the user. Summarize it first.\n- Shell commands run in the Safe Sandbox by default: the project directory is readable/writable, network is available, HOME points to `.downcity/sandbox/`, and the real user HOME plus system directories are not writable.\n- When installing Python dependencies, prefer a project-local `.venv`; do not use `pip install --user`.\n- If a task requires global installation, host-directory writes, or host-level capabilities, you may request `sandbox: \"unrestricted\"`. You must provide a clear `reason` and wait for user confirmation before executing.\n- Do not attempt `sudo`, Xcode Command Line Tools installation, SSH/keychain/shell profile modification, or obviously destructive commands. These requests are rejected even with unrestricted sandbox access.\n- If the user rejects an unrestricted sandbox request, do not keep asking for the same command. Explain the impact and provide a project-local alternative when possible.\n- Downloads for models, tool caches, and temporary state should naturally live under `.downcity/sandbox/` or the project directory. Do not assume access to the real user's cache.\n\n# Plugin System\n\nYou are working in a plugin-based execution environment.\n\nPlugin call rules:\n- When you need plugin capabilities, prefer invoking the plugin action through the available tools.\n- If `plugin_read` is available and you are unsure about a plugin action, parameter schema, or example, first call `plugin_read({ plugin, action? })` to read metadata.\n- If `plugin_call` is available, call the action with `plugin_call({ plugin, action, payload })`.\n- `plugin_call.plugin` is the plugin name, for example `skill`, `task`, `memory`, or `contact`.\n- `plugin_call.action` is the action name, for example `list`, `lookup`, `create`, or `run`.\n- `plugin_call.payload` is a structured JSON payload. Pass `{}` when there are no parameters. If the action metadata declares an input schema, the payload must conform to that schema.\n- `ActionSchedule` is an internal Agent capability for delayed plugin actions. It is not a standalone plugin.\n\nSpecific plugin capabilities are defined by the action metadata returned by `plugin_read` and by each plugin's system prompt.\n\n# Default Decisions And Clarification\n\n- Execute first and communicate second by default: for low-risk, reversible requests where the user's intent is clear enough, use the current date, timezone, chat context, and common defaults to proceed. Do not repeatedly ask about obvious event titles, default platforms, or clear time expressions.\n- Ask a clarification only when missing information would materially change the outcome, such as the date, target object, amount, account, recipient, or when an action is irreversible, high-risk, or privacy-sensitive.\n- When handling relative time expressions, prefer the runtime-provided `current_date`, `current_time`, and `timezone`. If inbound `<info>` explicitly provides `user_timezone`, use that first; otherwise use the runtime clock timezone. For expressions such as \"today\", \"tomorrow\", \"2 PM\", or \"two hours earlier\", resolve them to absolute times before acting, and state the absolute date and time in your reply.\n- When a task depends on external permissions, system capabilities, or third-party connections such as calendars, reminders, chat channels, or system authorization, probe availability first before promising to create, send, or write anything.\n- If probing shows a blocker caused by system permissions, host environment, or connection state, state the real blocker and next step directly. Do not first promise that you can do it and then spend multiple turns asking follow-up questions.\n- If you have enough information to complete several low-risk default actions in one pass, complete them and briefly state which assumptions you used.\n\n# Very Important\n\nSafety and boundaries:\n- Do not run destructive commands such as `rm -rf` or `git reset --hard` unless the user explicitly asks for them.\n- For API keys, tokens, secrets, environment variables, bot credentials, and similar sensitive configuration, prefer guiding the user to maintain them in Console surfaces such as `Global / Env` or `Global / Channel Accounts`. Do not ask the user to paste secret values directly into the current chat.\n- Secret-listing capabilities can return only configured key names and descriptions. They never return secret values. Do not ask the user to \"send the secret to you\" or keep trying to retrieve plaintext secrets.\n";
7
7
  export default TEXT_MODULE_CONTENT;
8
8
  //# sourceMappingURL=core.prompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.prompt.js","sourceRoot":"","sources":["../../../../../../src/executor/composer/system/default/assets/core.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,yEAAyE;AACzE,MAAM,mBAAmB,GAAG,qmMAAqmM,CAAC;AAEloM,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"core.prompt.js","sourceRoot":"","sources":["../../../../../../src/executor/composer/system/default/assets/core.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,yEAAyE;AACzE,MAAM,mBAAmB,GAAG,60OAA60O,CAAC;AAE12O,eAAe,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@downcity/agent",
3
- "version": "1.1.206",
3
+ "version": "1.1.208",
4
4
  "type": "module",
5
5
  "description": "Downcity Agent 运行时 — 单 Agent 执行壳与本机 RPC 能力",
6
6
  "main": "./bin/index.js",
@@ -17,8 +17,8 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@ai-sdk/openai-compatible": "^2.0.48",
20
- "@downcity/shell": "^0.1.71",
21
- "@downcity/type": "0.1.104",
20
+ "@downcity/shell": "^0.1.73",
21
+ "@downcity/type": "0.1.106",
22
22
  "ai": "^6.0.193",
23
23
  "commander": "^15.0.0",
24
24
  "dotenv": "^17.4.2",
@@ -0,0 +1,105 @@
1
+ /**
2
+ * @file 验证 Agent 动态 env 会进入 shell safe sandbox。
3
+ *
4
+ * 关键点(中文)
5
+ * - 测试编译后的 package 入口,确保 SDK 用户拿到的行为与源码一致。
6
+ * - 只允许 Agent env 中显式存在的 key 进入 safe sandbox,不继承完整宿主环境。
7
+ */
8
+
9
+ import test from "node:test";
10
+ import assert from "node:assert/strict";
11
+ import fs from "node:fs/promises";
12
+ import os from "node:os";
13
+ import path from "node:path";
14
+
15
+ import { Agent } from "@downcity/agent";
16
+ import { Shell } from "@downcity/shell";
17
+ import {
18
+ checkShellSandboxPreflight,
19
+ } from "@downcity/shell/sandbox/SandboxPreflight.js";
20
+
21
+ async function execute_shell(agent, cmd) {
22
+ const result = await agent.tools.shell_exec.execute(
23
+ {
24
+ cmd,
25
+ shell: "/bin/sh",
26
+ login: false,
27
+ timeout_ms: 5000,
28
+ sandbox: "safe",
29
+ },
30
+ { toolCallId: "agent-env-shell-sandbox-test" },
31
+ );
32
+ assert.equal(result.success, true, result.error || result.output);
33
+ return String(result.output || "");
34
+ }
35
+
36
+ test("agent setEnv and patchEnv are visible in shell safe sandbox", async (t) => {
37
+ const preflight = await checkShellSandboxPreflight();
38
+ if (!preflight.ok) {
39
+ t.skip(`safe sandbox unavailable: ${preflight.issues.map((issue) => issue.message).join("; ")}`);
40
+ return;
41
+ }
42
+
43
+ const root_path = await fs.mkdtemp(path.join(os.tmpdir(), "downcity-agent-env-"));
44
+ const previous_host_value = process.env.HOST_ONLY_ENV_REPRO;
45
+ process.env.HOST_ONLY_ENV_REPRO = "host_secret";
46
+
47
+ const agent = new Agent({
48
+ id: "agent-env-shell-sandbox-test",
49
+ path: root_path,
50
+ shell: new Shell(),
51
+ });
52
+
53
+ try {
54
+ agent.setEnv({
55
+ DYNAMIC_ENV_REPRO: "initial_value",
56
+ DC_DYNAMIC_REPRO: "dc_initial",
57
+ REMOVED_ENV_REPRO: "remove_me",
58
+ });
59
+
60
+ const first_output = await execute_shell(
61
+ agent,
62
+ 'printf "CURRENT=%s\\nDC=%s\\nREMOVED=%s\\nHOST_ONLY=%s\\n" "$DYNAMIC_ENV_REPRO" "$DC_DYNAMIC_REPRO" "$REMOVED_ENV_REPRO" "$HOST_ONLY_ENV_REPRO"',
63
+ );
64
+ assert.match(first_output, /CURRENT=initial_value/);
65
+ assert.match(first_output, /DC=dc_initial/);
66
+ assert.match(first_output, /REMOVED=remove_me/);
67
+ assert.match(first_output, /HOST_ONLY=\n/);
68
+
69
+ agent.getShell()?.configure({
70
+ env: {
71
+ DYNAMIC_ENV_REPRO: "configured_value",
72
+ },
73
+ });
74
+
75
+ const configured_output = await execute_shell(
76
+ agent,
77
+ 'printf "CURRENT=%s\\nHOST_ONLY=%s\\n" "$DYNAMIC_ENV_REPRO" "$HOST_ONLY_ENV_REPRO"',
78
+ );
79
+ assert.match(configured_output, /CURRENT=configured_value/);
80
+ assert.match(configured_output, /HOST_ONLY=\n/);
81
+
82
+ agent.patchEnv({
83
+ DYNAMIC_ENV_REPRO: "updated_value",
84
+ ADDED_ENV_REPRO: "added_value",
85
+ REMOVED_ENV_REPRO: null,
86
+ });
87
+
88
+ const second_output = await execute_shell(
89
+ agent,
90
+ 'printf "CURRENT=%s\\nADDED=%s\\nREMOVED=%s\\nHOST_ONLY=%s\\n" "$DYNAMIC_ENV_REPRO" "$ADDED_ENV_REPRO" "$REMOVED_ENV_REPRO" "$HOST_ONLY_ENV_REPRO"',
91
+ );
92
+ assert.match(second_output, /CURRENT=updated_value/);
93
+ assert.match(second_output, /ADDED=added_value/);
94
+ assert.match(second_output, /REMOVED=\n/);
95
+ assert.match(second_output, /HOST_ONLY=\n/);
96
+ } finally {
97
+ await agent.dispose();
98
+ await fs.rm(root_path, { recursive: true, force: true });
99
+ if (previous_host_value === undefined) {
100
+ delete process.env.HOST_ONLY_ENV_REPRO;
101
+ } else {
102
+ process.env.HOST_ONLY_ENV_REPRO = previous_host_value;
103
+ }
104
+ }
105
+ });
@@ -0,0 +1,73 @@
1
+ /**
2
+ * @file 验证 SDK session system blocks 的稳定分层顺序。
3
+ *
4
+ * 关键点(中文)
5
+ * - 测试编译后的 bin 输出,避免测试文件依赖 TS 源码加载器。
6
+ * - 自定义 instruction 不能替代 Downcity core;core 必须包含 Shell 与 plugin 总规则。
7
+ */
8
+
9
+ import test from "node:test";
10
+ import assert from "node:assert/strict";
11
+
12
+ import { createInstructionSystemBlocks } from "../bin/agent/local/AgentInstructions.js";
13
+ import { buildSessionSystemBlocks } from "../bin/session/SessionSystemBuilder.js";
14
+
15
+ test("instruction blocks keep Downcity core after custom instruction", () => {
16
+ const blocks = createInstructionSystemBlocks(
17
+ ["你是这个项目的工程 agent。"],
18
+ "/tmp/downcity-project",
19
+ );
20
+
21
+ assert.deepEqual(
22
+ blocks.map((block) => `${block.source}:${block.name}`),
23
+ ["instruction:agent", "core:default"],
24
+ );
25
+ assert.match(blocks[1].content, /# Downcity Agent/);
26
+ assert.match(blocks[1].content, /# Harness Design/);
27
+ assert.match(blocks[1].content, /human-owned workspace/);
28
+ assert.match(blocks[1].content, /project structure is the control surface/);
29
+ assert.match(blocks[1].content, /# Shell Commands/);
30
+ assert.match(blocks[1].content, /# Plugin System/);
31
+ assert.doesNotMatch(blocks[1].content, /\/tmp\/downcity-project/);
32
+ assert.doesNotMatch(blocks[1].content, /current year/i);
33
+ assert.doesNotMatch(blocks[1].content, /# Project Runtime/);
34
+ assert.doesNotMatch(blocks[1].content, /\.downcity\/agents/);
35
+ assert.doesNotMatch(blocks[1].content, /\.downcity\/memory/);
36
+ assert.doesNotMatch(blocks[1].content, /\.downcity\/public/);
37
+ });
38
+
39
+ test("session system blocks are ordered as instruction, core, plugin, session", async () => {
40
+ const blocks = await buildSessionSystemBlocks({
41
+ agentId: "agent-test",
42
+ projectRoot: "/tmp/downcity-project",
43
+ sessionId: "session-test",
44
+ createdAt: Date.UTC(2026, 6, 9, 8, 0, 0),
45
+ timezone: "Asia/Shanghai",
46
+ getInstructionSystemBlocks: () =>
47
+ createInstructionSystemBlocks(
48
+ ["使用中文回复。"],
49
+ "/tmp/downcity-project",
50
+ ),
51
+ getManagedPluginSystemBlocks: async () => [],
52
+ getPluginSystemBlocks: async () => [
53
+ {
54
+ source: "plugin",
55
+ name: "task",
56
+ content: "# Task Plugin\n\n任务插件说明。",
57
+ },
58
+ ],
59
+ });
60
+
61
+ assert.deepEqual(
62
+ blocks.map((block) => `${block.source}:${block.name}`),
63
+ [
64
+ "instruction:agent",
65
+ "core:default",
66
+ "plugin:task",
67
+ "session:context",
68
+ ],
69
+ );
70
+ assert.equal(blocks[0].content, "使用中文回复。");
71
+ assert.match(blocks[1].content, /plugin_call/);
72
+ assert.match(blocks[3].content, /session-test/);
73
+ });
@@ -12,6 +12,9 @@ import path from "node:path";
12
12
 
13
13
  import { buildMacOsSeatbeltSandboxEnv } from "@downcity/shell/sandbox/MacOsSeatbeltSandbox.js";
14
14
  import { buildLinuxBubblewrapSandboxEnv } from "@downcity/shell/sandbox/LinuxBubblewrapSandbox.js";
15
+ import {
16
+ resolveSandboxEnvAllowlist,
17
+ } from "@downcity/shell/sandbox/SandboxConfigResolver.js";
15
18
 
16
19
  function createParams() {
17
20
  const rootPath = "/tmp/downcity-shell-env/project";
@@ -73,3 +76,18 @@ test("Linux bubblewrap sandbox env points zsh TMPPREFIX at sandbox tmp", () => {
73
76
 
74
77
  assertSandboxTmpEnv(env, params.config.tmpDir);
75
78
  });
79
+
80
+ test("safe sandbox env allowlist includes explicit agent env keys only", () => {
81
+ const allowlist = resolveSandboxEnvAllowlist({
82
+ rootPath: "/tmp/downcity-shell-env/project",
83
+ env: {
84
+ DYNAMIC_ENV_REPRO: "dynamic_value",
85
+ DC_DYNAMIC_REPRO: "dc_value",
86
+ },
87
+ });
88
+
89
+ assert.equal(allowlist.includes("PATH"), true);
90
+ assert.equal(allowlist.includes("DYNAMIC_ENV_REPRO"), true);
91
+ assert.equal(allowlist.includes("DC_DYNAMIC_REPRO"), true);
92
+ assert.equal(allowlist.includes("HOST_ONLY_ENV_REPRO"), false);
93
+ });