@tickernelz/wardmote-adapter-utils 2026.1108.2 → 2026.1109.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/acpx-engine/ephemeral-session-environment.test.js +5 -5
  2. package/dist/acpx-engine/ephemeral-session-environment.test.js.map +1 -1
  3. package/dist/acpx-engine/execute-identity.test.js +11 -11
  4. package/dist/acpx-engine/execute-identity.test.js.map +1 -1
  5. package/dist/acpx-engine/execute.d.ts.map +1 -1
  6. package/dist/acpx-engine/execute.js +39 -40
  7. package/dist/acpx-engine/execute.js.map +1 -1
  8. package/dist/acpx-engine/execute.test.js +78 -78
  9. package/dist/acpx-engine/execute.test.js.map +1 -1
  10. package/dist/acpx-engine/filesystem-protocol.test.js +1 -1
  11. package/dist/acpx-engine/filesystem-protocol.test.js.map +1 -1
  12. package/dist/acpx-engine/operator-stop.test.js +2 -2
  13. package/dist/acpx-engine/operator-stop.test.js.map +1 -1
  14. package/dist/acpx-engine/run-site-sandbox.test.js +3 -3
  15. package/dist/acpx-engine/run-site-sandbox.test.js.map +1 -1
  16. package/dist/acpx-engine/spawn-smoke.test.js +6 -6
  17. package/dist/acpx-engine/spawn-smoke.test.js.map +1 -1
  18. package/dist/acpx-engine/startup-characterization.test.js +13 -13
  19. package/dist/acpx-engine/startup-characterization.test.js.map +1 -1
  20. package/dist/acpx-engine/startup-timing.test.js +2 -2
  21. package/dist/acpx-engine/startup-timing.test.js.map +1 -1
  22. package/dist/acpx-engine/terminal-session-failure.js +1 -1
  23. package/dist/acpx-engine/terminal-session-failure.js.map +1 -1
  24. package/dist/command-managed-runtime.test.js +2 -2
  25. package/dist/command-managed-runtime.test.js.map +1 -1
  26. package/dist/directory-merge-lock.test.js +2 -2
  27. package/dist/directory-merge-lock.test.js.map +1 -1
  28. package/dist/execution-target-sandbox.test.js +102 -102
  29. package/dist/execution-target-sandbox.test.js.map +1 -1
  30. package/dist/execution-target-stdin-race.test.js +25 -25
  31. package/dist/execution-target-stdin-race.test.js.map +1 -1
  32. package/dist/execution-target.d.ts.map +1 -1
  33. package/dist/execution-target.js +59 -60
  34. package/dist/execution-target.js.map +1 -1
  35. package/dist/execution-target.test.js +2 -2
  36. package/dist/execution-target.test.js.map +1 -1
  37. package/dist/forbidden-config-env.test.d.ts +2 -0
  38. package/dist/forbidden-config-env.test.d.ts.map +1 -0
  39. package/dist/forbidden-config-env.test.js +35 -0
  40. package/dist/forbidden-config-env.test.js.map +1 -0
  41. package/dist/git-workspace-sync.js +1 -1
  42. package/dist/git-workspace-sync.js.map +1 -1
  43. package/dist/github-launcher-environment.test.js +31 -31
  44. package/dist/github-launcher-environment.test.js.map +1 -1
  45. package/dist/github-launcher.js +9 -9
  46. package/dist/github-launcher.js.map +1 -1
  47. package/dist/index.d.ts +3 -3
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +2 -2
  50. package/dist/index.js.map +1 -1
  51. package/dist/local-process-sandbox.test.js +8 -8
  52. package/dist/local-process-sandbox.test.js.map +1 -1
  53. package/dist/provider-models/codex.d.ts.map +1 -1
  54. package/dist/provider-models/codex.js +2 -2
  55. package/dist/provider-models/codex.js.map +1 -1
  56. package/dist/run-oom-score.d.ts +1 -1
  57. package/dist/run-oom-score.d.ts.map +1 -1
  58. package/dist/run-oom-score.js +1 -1
  59. package/dist/run-oom-score.js.map +1 -1
  60. package/dist/runner-connectivity.d.ts +2 -2
  61. package/dist/runner-connectivity.d.ts.map +1 -1
  62. package/dist/runner-connectivity.js +5 -5
  63. package/dist/runner-connectivity.js.map +1 -1
  64. package/dist/sandbox-callback-bridge.js +27 -27
  65. package/dist/sandbox-callback-bridge.js.map +1 -1
  66. package/dist/sandbox-callback-bridge.test.js +27 -27
  67. package/dist/sandbox-callback-bridge.test.js.map +1 -1
  68. package/dist/sandbox-install-command.js +4 -4
  69. package/dist/sandbox-install-command.js.map +1 -1
  70. package/dist/sandbox-managed-runtime.test.js +4 -4
  71. package/dist/sandbox-managed-runtime.test.js.map +1 -1
  72. package/dist/sandbox-run-log-stream.js +4 -4
  73. package/dist/sandbox-run-log-stream.js.map +1 -1
  74. package/dist/server-utils-env.test.js +2 -2
  75. package/dist/server-utils-env.test.js.map +1 -1
  76. package/dist/server-utils.d.ts +5 -5
  77. package/dist/server-utils.d.ts.map +1 -1
  78. package/dist/server-utils.js +87 -87
  79. package/dist/server-utils.js.map +1 -1
  80. package/dist/server-utils.test.js +75 -75
  81. package/dist/server-utils.test.js.map +1 -1
  82. package/dist/skill-library-manifest.test.js +4 -4
  83. package/dist/skill-library-manifest.test.js.map +1 -1
  84. package/dist/ssh.js +2 -2
  85. package/dist/ssh.js.map +1 -1
  86. package/dist/test-support/mcp-isolation-harness.js +1 -1
  87. package/dist/test-support/mcp-isolation-harness.js.map +1 -1
  88. package/dist/{paperclip-mcp-mount.d.ts → wardmote-mcp-mount.d.ts} +1 -1
  89. package/dist/wardmote-mcp-mount.d.ts.map +1 -0
  90. package/dist/{paperclip-mcp-mount.js → wardmote-mcp-mount.js} +10 -10
  91. package/dist/wardmote-mcp-mount.js.map +1 -0
  92. package/dist/{paperclip-mcp.d.ts → wardmote-mcp.d.ts} +9 -9
  93. package/dist/wardmote-mcp.d.ts.map +1 -0
  94. package/dist/{paperclip-mcp.js → wardmote-mcp.js} +36 -36
  95. package/dist/wardmote-mcp.js.map +1 -0
  96. package/dist/wardmote-mcp.test.d.ts +2 -0
  97. package/dist/wardmote-mcp.test.d.ts.map +1 -0
  98. package/dist/{paperclip-mcp.test.js → wardmote-mcp.test.js} +14 -14
  99. package/dist/wardmote-mcp.test.js.map +1 -0
  100. package/dist/{paperclip-runner-permissions.d.ts → wardmote-runner-permissions.d.ts} +18 -18
  101. package/dist/wardmote-runner-permissions.d.ts.map +1 -0
  102. package/dist/{paperclip-runner-permissions.js → wardmote-runner-permissions.js} +22 -22
  103. package/dist/wardmote-runner-permissions.js.map +1 -0
  104. package/dist/wardmote-runner-permissions.test.d.ts +2 -0
  105. package/dist/wardmote-runner-permissions.test.d.ts.map +1 -0
  106. package/dist/{paperclip-runner-permissions.test.js → wardmote-runner-permissions.test.js} +7 -7
  107. package/dist/wardmote-runner-permissions.test.js.map +1 -0
  108. package/dist/workspace-manifest.js +1 -1
  109. package/dist/workspace-manifest.js.map +1 -1
  110. package/dist/workspace-manifest.test.js +2 -2
  111. package/dist/workspace-manifest.test.js.map +1 -1
  112. package/dist/workspace-restore-merge.js +5 -5
  113. package/dist/workspace-restore-merge.js.map +1 -1
  114. package/dist/workspace-restore-merge.test.js +27 -27
  115. package/dist/workspace-restore-merge.test.js.map +1 -1
  116. package/node_modules/@clack/core/dist/index.d.mts +5 -3
  117. package/node_modules/@clack/core/dist/index.mjs +70 -67
  118. package/node_modules/@clack/core/package.json +3 -2
  119. package/node_modules/@clack/prompts/dist/index.d.mts +5 -4
  120. package/node_modules/@clack/prompts/dist/index.mjs +212 -187
  121. package/node_modules/@clack/prompts/package.json +3 -3
  122. package/node_modules/sisteransi/dist/index.d.ts +33 -0
  123. package/node_modules/sisteransi/dist/index.js +57 -0
  124. package/node_modules/sisteransi/package.json +18 -7
  125. package/node_modules/sisteransi/readme.md +19 -6
  126. package/package.json +2 -2
  127. package/dist/env-aliases-run.test.d.ts +0 -2
  128. package/dist/env-aliases-run.test.d.ts.map +0 -1
  129. package/dist/env-aliases-run.test.js +0 -49
  130. package/dist/env-aliases-run.test.js.map +0 -1
  131. package/dist/paperclip-mcp-mount.d.ts.map +0 -1
  132. package/dist/paperclip-mcp-mount.js.map +0 -1
  133. package/dist/paperclip-mcp.d.ts.map +0 -1
  134. package/dist/paperclip-mcp.js.map +0 -1
  135. package/dist/paperclip-mcp.test.d.ts +0 -2
  136. package/dist/paperclip-mcp.test.d.ts.map +0 -1
  137. package/dist/paperclip-mcp.test.js.map +0 -1
  138. package/dist/paperclip-runner-permissions.d.ts.map +0 -1
  139. package/dist/paperclip-runner-permissions.js.map +0 -1
  140. package/dist/paperclip-runner-permissions.test.d.ts +0 -2
  141. package/dist/paperclip-runner-permissions.test.d.ts.map +0 -1
  142. package/dist/paperclip-runner-permissions.test.js.map +0 -1
  143. package/node_modules/sisteransi/src/index.js +0 -58
  144. package/node_modules/sisteransi/src/sisteransi.d.ts +0 -35
@@ -5,7 +5,7 @@ import os from "node:os";
5
5
  import path from "node:path";
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { CONNECTION_INTENT_AGENT_GUIDANCE } from "@tickernelz/wardmote-shared";
8
- import { readPaperclipRuntimeSkillEntries, applyPaperclipWorkspaceEnv, appendWithByteCap, buildPersistentSkillSnapshot, buildRuntimeMountedSkillSnapshot, buildInvocationEnvForLogs, buildPaperclipEnv, buildRuntimeToolsEnv, DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE, DEFAULT_PAPERCLIP_CONVERSATION_PROMPT_TEMPLATE, paperclipAgentPromptTemplate, isPaperclipExternalChatContractTurn, isPaperclipExternalChatQuestionResponseTurn, isPaperclipExternalChatTurn, materializePaperclipSkillCopy, PAPERCLIP_OPERATIONAL_SKILL_KEY, PAPERCLIP_FEEDBACK_SKILL_KEYS, refreshPaperclipWorkspaceEnvForExecution, renderPaperclipWakePrompt, resolveLegacyPaperclipDesiredSkillNames, resolvePaperclipDesiredSkillNames, selectPaperclipTaskMarkdown, selectInitialCommunicationGuidance, hydrateFreshSessionHandoff, runningProcesses, runChildProcess, sanitizeSshRemoteEnv, sanitizeInheritedPaperclipEnv, isForbiddenConfigEnvKey, signalRunningProcess, shapePaperclipWorkspaceEnvForExecution, rewriteWorkspaceCwdEnvVarsForExecution, stringifyPaperclipWakePayload, ensurePaperclipSkillSymlink, relinkPaperclipSkillsFromOtherInstalls, UNMANAGED_BACKGROUND_TASK_LIVENESS_REASON, UNMANAGED_BACKGROUND_TASK_STOP_REASON, WATCHDOG_DEFAULT_MANDATE, } from "./server-utils.js";
8
+ import { readPaperclipRuntimeSkillEntries, applyPaperclipWorkspaceEnv, appendWithByteCap, buildPersistentSkillSnapshot, buildRuntimeMountedSkillSnapshot, buildInvocationEnvForLogs, buildPaperclipEnv, buildRuntimeToolsEnv, DEFAULT_WARDMOTE_AGENT_PROMPT_TEMPLATE, DEFAULT_WARDMOTE_CONVERSATION_PROMPT_TEMPLATE, paperclipAgentPromptTemplate, isPaperclipExternalChatContractTurn, isPaperclipExternalChatQuestionResponseTurn, isPaperclipExternalChatTurn, materializePaperclipSkillCopy, WARDMOTE_OPERATIONAL_SKILL_KEY, WARDMOTE_FEEDBACK_SKILL_KEYS, refreshPaperclipWorkspaceEnvForExecution, renderPaperclipWakePrompt, resolveLegacyPaperclipDesiredSkillNames, resolvePaperclipDesiredSkillNames, selectPaperclipTaskMarkdown, selectInitialCommunicationGuidance, hydrateFreshSessionHandoff, runningProcesses, runChildProcess, sanitizeSshRemoteEnv, sanitizeInheritedPaperclipEnv, isForbiddenConfigEnvKey, signalRunningProcess, shapePaperclipWorkspaceEnvForExecution, rewriteWorkspaceCwdEnvVarsForExecution, stringifyPaperclipWakePayload, ensurePaperclipSkillSymlink, relinkPaperclipSkillsFromOtherInstalls, UNMANAGED_BACKGROUND_TASK_LIVENESS_REASON, UNMANAGED_BACKGROUND_TASK_STOP_REASON, WATCHDOG_DEFAULT_MANDATE, } from "./server-utils.js";
9
9
  describe("ensurePaperclipSkillSymlink", () => {
10
10
  const bundled = (root, version, skill) => path.join(root, "installs", version, "node_modules", "@tickernelz", "wardmote-server", "skills", skill);
11
11
  it("moves a skill link from an older Paperclip install to the current one and leaves foreign links alone", async () => {
@@ -59,7 +59,7 @@ describe("ensurePaperclipSkillSymlink", () => {
59
59
  });
60
60
  });
61
61
  it("reserves identity credentials even for mixed-case inherited or configured keys", () => {
62
- const keys = ["PAPERCLIP_AGENT_KEY_ID", "Paperclip_Agent_Public_Key", "paperclip_agent_private_key"];
62
+ const keys = ["WARDMOTE_AGENT_KEY_ID", "Paperclip_Agent_Public_Key", "paperclip_agent_private_key"];
63
63
  const inherited = Object.fromEntries(keys.map(key => [key, "host-override"]));
64
64
  expect(sanitizeInheritedPaperclipEnv({ ...inherited, PATH: "/usr/bin" })).toEqual({ PATH: "/usr/bin" });
65
65
  for (const key of keys)
@@ -80,33 +80,33 @@ describe("runtime connection tool delivery", () => {
80
80
  };
81
81
  it("delivers the complete environment contract and canonical guidance", () => {
82
82
  expect(buildRuntimeToolsEnv(access)).toEqual({
83
- PAPERCLIP_RUNTIME_TOOLS_MCP_URL: access.mcpEndpoint,
84
- PAPERCLIP_RUNTIME_TOOLS_TOKEN: access.bearerToken,
85
- PAPERCLIP_RUNTIME_TOOLS_EXPIRES_AT: access.expiresAt,
86
- PAPERCLIP_RUNTIME_TOOLS_CONNECTIONS_SEARCH_URL: access.rest.connectionsSearch,
87
- PAPERCLIP_RUNTIME_TOOLS_CONNECTION_REQUEST_URL: access.rest.connectionRequest,
88
- PAPERCLIP_RUNTIME_TOOLS_AVAILABLE: "connections_search,connection_request",
89
- PAPERCLIP_RUNTIME_TOOLS_GUIDANCE: CONNECTION_INTENT_AGENT_GUIDANCE,
83
+ WARDMOTE_RUNTIME_TOOLS_MCP_URL: access.mcpEndpoint,
84
+ WARDMOTE_RUNTIME_TOOLS_TOKEN: access.bearerToken,
85
+ WARDMOTE_RUNTIME_TOOLS_EXPIRES_AT: access.expiresAt,
86
+ WARDMOTE_RUNTIME_TOOLS_CONNECTIONS_SEARCH_URL: access.rest.connectionsSearch,
87
+ WARDMOTE_RUNTIME_TOOLS_CONNECTION_REQUEST_URL: access.rest.connectionRequest,
88
+ WARDMOTE_RUNTIME_TOOLS_AVAILABLE: "connections_search,connection_request",
89
+ WARDMOTE_RUNTIME_TOOLS_GUIDANCE: CONNECTION_INTENT_AGENT_GUIDANCE,
90
90
  });
91
91
  });
92
92
  it("does not leak descriptor identity through guidance", () => {
93
93
  const env = buildRuntimeToolsEnv(access);
94
- expect(env.PAPERCLIP_RUNTIME_TOOLS_GUIDANCE).not.toContain(access.bearerToken);
95
- expect(env.PAPERCLIP_RUNTIME_TOOLS_GUIDANCE).not.toContain(access.mcpEndpoint);
94
+ expect(env.WARDMOTE_RUNTIME_TOOLS_GUIDANCE).not.toContain(access.bearerToken);
95
+ expect(env.WARDMOTE_RUNTIME_TOOLS_GUIDANCE).not.toContain(access.mcpEndpoint);
96
96
  });
97
97
  it("is absent outside an active runtime descriptor", () => {
98
98
  expect(buildRuntimeToolsEnv(undefined)).toEqual({});
99
99
  });
100
100
  it("uses the exact same guidance in the default heartbeat prompt", () => {
101
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).toContain(CONNECTION_INTENT_AGENT_GUIDANCE);
102
- expect(DEFAULT_PAPERCLIP_CONVERSATION_PROMPT_TEMPLATE).toContain(CONNECTION_INTENT_AGENT_GUIDANCE);
103
- expect(DEFAULT_PAPERCLIP_CONVERSATION_PROMPT_TEMPLATE).not.toContain("Execution contract:");
104
- expect(DEFAULT_PAPERCLIP_CONVERSATION_PROMPT_TEMPLATE).not.toContain("child issues");
101
+ expect(DEFAULT_WARDMOTE_AGENT_PROMPT_TEMPLATE).toContain(CONNECTION_INTENT_AGENT_GUIDANCE);
102
+ expect(DEFAULT_WARDMOTE_CONVERSATION_PROMPT_TEMPLATE).toContain(CONNECTION_INTENT_AGENT_GUIDANCE);
103
+ expect(DEFAULT_WARDMOTE_CONVERSATION_PROMPT_TEMPLATE).not.toContain("Execution contract:");
104
+ expect(DEFAULT_WARDMOTE_CONVERSATION_PROMPT_TEMPLATE).not.toContain("child issues");
105
105
  });
106
106
  });
107
107
  describe("legacy adapter skill selection", () => {
108
108
  const operationalEntry = {
109
- key: PAPERCLIP_OPERATIONAL_SKILL_KEY,
109
+ key: WARDMOTE_OPERATIONAL_SKILL_KEY,
110
110
  runtimeName: "paperclip",
111
111
  };
112
112
  const optionalEntry = {
@@ -117,10 +117,10 @@ describe("legacy adapter skill selection", () => {
117
117
  expect(resolveLegacyPaperclipDesiredSkillNames({}, [
118
118
  operationalEntry,
119
119
  optionalEntry,
120
- ])).toEqual([PAPERCLIP_OPERATIONAL_SKILL_KEY]);
120
+ ])).toEqual([WARDMOTE_OPERATIONAL_SKILL_KEY]);
121
121
  });
122
122
  it("keeps the operational skill selected after an explicit empty replacement", () => {
123
- expect(resolveLegacyPaperclipDesiredSkillNames({ paperclipSkillSync: { desiredSkills: [] } }, [operationalEntry, optionalEntry])).toEqual([PAPERCLIP_OPERATIONAL_SKILL_KEY]);
123
+ expect(resolveLegacyPaperclipDesiredSkillNames({ paperclipSkillSync: { desiredSkills: [] } }, [operationalEntry, optionalEntry])).toEqual([WARDMOTE_OPERATIONAL_SKILL_KEY]);
124
124
  });
125
125
  it("does not force optional skills or synthesize a missing operational entry", () => {
126
126
  const config = {
@@ -129,17 +129,17 @@ describe("legacy adapter skill selection", () => {
129
129
  expect(resolveLegacyPaperclipDesiredSkillNames(config, [
130
130
  operationalEntry,
131
131
  optionalEntry,
132
- ])).toEqual([PAPERCLIP_OPERATIONAL_SKILL_KEY, optionalEntry.key]);
132
+ ])).toEqual([WARDMOTE_OPERATIONAL_SKILL_KEY, optionalEntry.key]);
133
133
  expect(resolveLegacyPaperclipDesiredSkillNames(config, [optionalEntry])).toEqual([optionalEntry.key]);
134
134
  });
135
135
  it("leaves the configurable resolver available for native runners", () => {
136
136
  expect(resolvePaperclipDesiredSkillNames({}, [operationalEntry])).toEqual([]);
137
137
  });
138
138
  it("makes feedback available to existing legacy agents without opting native agents into API skills", () => {
139
- const inventory = [operationalEntry, ...PAPERCLIP_FEEDBACK_SKILL_KEYS.map((key) => ({ key }))];
139
+ const inventory = [operationalEntry, ...WARDMOTE_FEEDBACK_SKILL_KEYS.map((key) => ({ key }))];
140
140
  for (const config of [{}, { paperclipSkillSync: { desiredSkills: [] } }]) {
141
141
  expect(resolveLegacyPaperclipDesiredSkillNames(config, inventory)).toEqual([
142
- PAPERCLIP_OPERATIONAL_SKILL_KEY, ...PAPERCLIP_FEEDBACK_SKILL_KEYS,
142
+ WARDMOTE_OPERATIONAL_SKILL_KEY, ...WARDMOTE_FEEDBACK_SKILL_KEYS,
143
143
  ]);
144
144
  expect(resolvePaperclipDesiredSkillNames(config, inventory)).toEqual([]);
145
145
  }
@@ -178,10 +178,10 @@ async function waitForTextMatch(read, pattern, timeoutMs = 1_000) {
178
178
  describe("buildInvocationEnvForLogs", () => {
179
179
  it("redacts inline secrets from resolved command metadata", () => {
180
180
  const loggedEnv = buildInvocationEnvForLogs({ SAFE_VALUE: "visible" }, {
181
- resolvedCommand: "env OPENAI_API_KEY=sk-live-example PAPERCLIP_API_KEY='paperclip-quoted-secret' custom-acp --paperclip-api-key=paperclip-flag-secret --token ghp_example_secret",
181
+ resolvedCommand: "env OPENAI_API_KEY=sk-live-example WARDMOTE_API_KEY='paperclip-quoted-secret' custom-acp --paperclip-api-key=paperclip-flag-secret --token ghp_example_secret",
182
182
  });
183
183
  expect(loggedEnv.SAFE_VALUE).toBe("visible");
184
- expect(loggedEnv.PAPERCLIP_RESOLVED_COMMAND).toBe("env OPENAI_API_KEY=***REDACTED*** PAPERCLIP_API_KEY='***REDACTED***' custom-acp --paperclip-api-key=***REDACTED*** --token ***REDACTED***");
184
+ expect(loggedEnv.WARDMOTE_RESOLVED_COMMAND).toBe("env OPENAI_API_KEY=***REDACTED*** WARDMOTE_API_KEY='***REDACTED***' custom-acp --paperclip-api-key=***REDACTED*** --token ***REDACTED***");
185
185
  });
186
186
  });
187
187
  describe("sanitizeSshRemoteEnv", () => {
@@ -295,7 +295,7 @@ describe("materializePaperclipSkillCopy", () => {
295
295
  });
296
296
  describe("adapter skill snapshots", () => {
297
297
  const requiredEntry = {
298
- key: "paperclipai/paperclip/paperclip",
298
+ key: "tickernelz/wardmote/paperclip",
299
299
  runtimeName: "paperclip",
300
300
  source: "/runtime/paperclip",
301
301
  };
@@ -949,7 +949,7 @@ describe("renderPaperclipWakePrompt", () => {
949
949
  expect(prompt).not.toContain("a successful process exit or final response is not sufficient");
950
950
  expect(prompt).not.toContain("acknowledge the latest comment");
951
951
  expect(prompt).not.toContain("checkout: already claimed");
952
- expect(prompt).not.toContain("POST /api/issues/$PAPERCLIP_TASK_ID/checkout");
952
+ expect(prompt).not.toContain("POST /api/issues/$WARDMOTE_TASK_ID/checkout");
953
953
  }
954
954
  const freshPrompt = renderPaperclipWakePrompt(ordinaryExternalChatWake);
955
955
  expect(freshPrompt).toContain("Answer the pending comments directly, in order");
@@ -1150,8 +1150,8 @@ describe("renderPaperclipWakePrompt", () => {
1150
1150
  });
1151
1151
  it("keeps task and chat defaults to identity and connection guidance", () => {
1152
1152
  for (const template of [
1153
- DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE,
1154
- DEFAULT_PAPERCLIP_CONVERSATION_PROMPT_TEMPLATE,
1153
+ DEFAULT_WARDMOTE_AGENT_PROMPT_TEMPLATE,
1154
+ DEFAULT_WARDMOTE_CONVERSATION_PROMPT_TEMPLATE,
1155
1155
  ]) {
1156
1156
  expect(template).toBe(`You are agent {{agent.id}} ({{agent.name}}).\n\n${CONNECTION_INTENT_AGENT_GUIDANCE}`);
1157
1157
  }
@@ -1169,7 +1169,7 @@ describe("renderPaperclipWakePrompt", () => {
1169
1169
  expect(template).toContain("Use child issues");
1170
1170
  expect(template).toContain("instead of polling agents, sessions, or processes");
1171
1171
  expect(template).toContain("Create child issues directly when you know what needs to be done");
1172
- expect(template).toContain("using `issueId: $PAPERCLIP_TASK_ID`");
1172
+ expect(template).toContain("using `issueId: $WARDMOTE_TASK_ID`");
1173
1173
  // URL paths in prompt text carry real ids or env vars, never brace
1174
1174
  // placeholders: agents paste these lines verbatim, and a literal {issueId}
1175
1175
  // reaches the server as /api/issues/%7BissueId%7D and 404s.
@@ -1202,7 +1202,7 @@ describe("renderPaperclipWakePrompt", () => {
1202
1202
  });
1203
1203
  expect(prompt).toContain("## Paperclip Wake Payload");
1204
1204
  expect(prompt).not.toContain("Execution contract:");
1205
- expect(DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE).not.toContain("Execution contract:");
1205
+ expect(DEFAULT_WARDMOTE_AGENT_PROMPT_TEMPLATE).not.toContain("Execution contract:");
1206
1206
  });
1207
1207
  it("does not restore generic procedures on resume or with the legacy opt-in", () => {
1208
1208
  const payload = {
@@ -1560,7 +1560,7 @@ describe("renderPaperclipWakePrompt", () => {
1560
1560
  comments: [],
1561
1561
  fallbackFetchNeeded: false,
1562
1562
  });
1563
- const composed = [wakePrompt, DEFAULT_PAPERCLIP_AGENT_PROMPT_TEMPLATE].join("\n\n");
1563
+ const composed = [wakePrompt, DEFAULT_WARDMOTE_AGENT_PROMPT_TEMPLATE].join("\n\n");
1564
1564
  expect(composed).toContain(CONNECTION_INTENT_AGENT_GUIDANCE);
1565
1565
  expect(composed).not.toContain("Execution contract:");
1566
1566
  });
@@ -2830,14 +2830,14 @@ describe("applyPaperclipWorkspaceEnv", () => {
2830
2830
  agentHome: "/tmp/agent-home",
2831
2831
  });
2832
2832
  expect(env).toEqual({
2833
- PAPERCLIP_WORKSPACE_CWD: "/tmp/workspace",
2834
- PAPERCLIP_WORKSPACE_SOURCE: "project_primary",
2835
- PAPERCLIP_WORKSPACE_STRATEGY: "git_worktree",
2836
- PAPERCLIP_WORKSPACE_ID: "workspace-1",
2837
- PAPERCLIP_WORKSPACE_REPO_URL: "https://github.com/paperclipai/paperclip.git",
2838
- PAPERCLIP_WORKSPACE_REPO_REF: "main",
2839
- PAPERCLIP_WORKSPACE_BRANCH: "feature/test",
2840
- PAPERCLIP_WORKSPACE_WORKTREE_PATH: "/tmp/worktree",
2833
+ WARDMOTE_WORKSPACE_CWD: "/tmp/workspace",
2834
+ WARDMOTE_WORKSPACE_SOURCE: "project_primary",
2835
+ WARDMOTE_WORKSPACE_STRATEGY: "git_worktree",
2836
+ WARDMOTE_WORKSPACE_ID: "workspace-1",
2837
+ WARDMOTE_WORKSPACE_REPO_URL: "https://github.com/paperclipai/paperclip.git",
2838
+ WARDMOTE_WORKSPACE_REPO_REF: "main",
2839
+ WARDMOTE_WORKSPACE_BRANCH: "feature/test",
2840
+ WARDMOTE_WORKSPACE_WORKTREE_PATH: "/tmp/worktree",
2841
2841
  AGENT_HOME: "/tmp/agent-home",
2842
2842
  });
2843
2843
  });
@@ -3031,9 +3031,9 @@ describe("rewriteWorkspaceCwdEnvVarsForExecution", () => {
3031
3031
  describe("refreshPaperclipWorkspaceEnvForExecution", () => {
3032
3032
  it("rewrites Paperclip workspace env to the prepared remote runtime cwd", () => {
3033
3033
  const env = {
3034
- PAPERCLIP_WORKSPACE_CWD: "/remote/workspace",
3035
- PAPERCLIP_WORKSPACE_WORKTREE_PATH: "/host/worktree",
3036
- PAPERCLIP_WORKSPACES_JSON: JSON.stringify([
3034
+ WARDMOTE_WORKSPACE_CWD: "/remote/workspace",
3035
+ WARDMOTE_WORKSPACE_WORKTREE_PATH: "/host/worktree",
3036
+ WARDMOTE_WORKSPACES_JSON: JSON.stringify([
3037
3037
  { workspaceId: "workspace-1", cwd: "/remote/workspace" },
3038
3038
  { workspaceId: "workspace-2", cwd: "/tmp/other" },
3039
3039
  ]),
@@ -3066,10 +3066,10 @@ describe("refreshPaperclipWorkspaceEnvForExecution", () => {
3066
3066
  },
3067
3067
  ],
3068
3068
  });
3069
- expect(env.PAPERCLIP_WORKSPACE_CWD).toBe("/remote/workspace/.paperclip-runtime/runs/run-1/workspace");
3070
- expect(env.PAPERCLIP_WORKSPACE_WORKTREE_PATH).toBeUndefined();
3069
+ expect(env.WARDMOTE_WORKSPACE_CWD).toBe("/remote/workspace/.paperclip-runtime/runs/run-1/workspace");
3070
+ expect(env.WARDMOTE_WORKSPACE_WORKTREE_PATH).toBeUndefined();
3071
3071
  expect(env.QA_PROJECT_WORKSPACE_CWD).toBe("/remote/workspace/.paperclip-runtime/runs/run-1/workspace");
3072
- expect(JSON.parse(env.PAPERCLIP_WORKSPACES_JSON ?? "[]")).toEqual([
3072
+ expect(JSON.parse(env.WARDMOTE_WORKSPACES_JSON ?? "[]")).toEqual([
3073
3073
  {
3074
3074
  workspaceId: "workspace-1",
3075
3075
  cwd: "/remote/workspace/.paperclip-runtime/runs/run-1/workspace",
@@ -3081,9 +3081,9 @@ describe("refreshPaperclipWorkspaceEnvForExecution", () => {
3081
3081
  });
3082
3082
  it("forwards resolved adapter env but never overrides Paperclip runtime env", () => {
3083
3083
  const env = {
3084
- PAPERCLIP_RUN_ID: "run-1",
3085
- PAPERCLIP_TASK_ID: "issue-1",
3086
- PAPERCLIP_API_URL: "http://runtime:3100",
3084
+ WARDMOTE_RUN_ID: "run-1",
3085
+ WARDMOTE_TASK_ID: "issue-1",
3086
+ WARDMOTE_API_URL: "http://runtime:3100",
3087
3087
  };
3088
3088
  refreshPaperclipWorkspaceEnvForExecution({
3089
3089
  env,
@@ -3093,50 +3093,50 @@ describe("refreshPaperclipWorkspaceEnvForExecution", () => {
3093
3093
  // Server-resolved secret_ref value arrives as a plain string here.
3094
3094
  OPENROUTER_API_KEY: "resolved-secret-value",
3095
3095
  // Reserved-namespace keys must not clobber runtime identity/wake vars.
3096
- PAPERCLIP_TASK_ID: "attacker-issue",
3097
- PAPERCLIP_API_URL: "http://evil:9999",
3096
+ WARDMOTE_TASK_ID: "attacker-issue",
3097
+ WARDMOTE_API_URL: "http://evil:9999",
3098
3098
  },
3099
3099
  workspaceCwd: null,
3100
3100
  });
3101
3101
  expect(env.OOGA_BOOGA_123).toBe("plain-value");
3102
3102
  expect(env.OPENROUTER_API_KEY).toBe("resolved-secret-value");
3103
- expect(env.PAPERCLIP_TASK_ID).toBe("issue-1");
3104
- expect(env.PAPERCLIP_API_URL).toBe("http://runtime:3100");
3103
+ expect(env.WARDMOTE_TASK_ID).toBe("issue-1");
3104
+ expect(env.WARDMOTE_API_URL).toBe("http://runtime:3100");
3105
3105
  });
3106
- it("applies a configured PAPERCLIP_* key only when Paperclip has not set it", () => {
3106
+ it("applies a configured WARDMOTE_* key only when Paperclip has not set it", () => {
3107
3107
  const env = {};
3108
3108
  refreshPaperclipWorkspaceEnvForExecution({
3109
3109
  env,
3110
3110
  envConfig: {
3111
- PAPERCLIP_CLOUD_PROVIDER_TOKEN: "cloud-token",
3111
+ WARDMOTE_CLOUD_PROVIDER_TOKEN: "cloud-token",
3112
3112
  },
3113
3113
  workspaceCwd: null,
3114
3114
  });
3115
- // Paperclip did not assign this PAPERCLIP_*-named key for the run, so the
3115
+ // Paperclip did not assign this WARDMOTE_*-named key for the run, so the
3116
3116
  // configured value flows through to the spawned process.
3117
- expect(env.PAPERCLIP_CLOUD_PROVIDER_TOKEN).toBe("cloud-token");
3117
+ expect(env.WARDMOTE_CLOUD_PROVIDER_TOKEN).toBe("cloud-token");
3118
3118
  });
3119
3119
  it("does not restore the retired wake JSON variable from config", () => {
3120
3120
  const env = {};
3121
3121
  refreshPaperclipWorkspaceEnvForExecution({
3122
3122
  env,
3123
- envConfig: { PAPERCLIP_WAKE_PAYLOAD_JSON: "stale wake" },
3123
+ envConfig: { WARDMOTE_WAKE_PAYLOAD_JSON: "stale wake" },
3124
3124
  workspaceCwd: null,
3125
3125
  });
3126
- expect(env).not.toHaveProperty("PAPERCLIP_WAKE_PAYLOAD_JSON");
3126
+ expect(env).not.toHaveProperty("WARDMOTE_WAKE_PAYLOAD_JSON");
3127
3127
  });
3128
- it("never accepts PAPERCLIP_API_KEY from config env", () => {
3128
+ it("never accepts WARDMOTE_API_KEY from config env", () => {
3129
3129
  const env = {};
3130
3130
  refreshPaperclipWorkspaceEnvForExecution({
3131
3131
  env,
3132
3132
  envConfig: {
3133
- PAPERCLIP_API_KEY: "explicit-key",
3133
+ WARDMOTE_API_KEY: "explicit-key",
3134
3134
  },
3135
3135
  workspaceCwd: null,
3136
3136
  });
3137
- // The harness-minted run token is the only PAPERCLIP_API_KEY source;
3137
+ // The harness-minted run token is the only WARDMOTE_API_KEY source;
3138
3138
  // a configured value is dropped even when Paperclip has not set one.
3139
- expect(env.PAPERCLIP_API_KEY).toBeUndefined();
3139
+ expect(env.WARDMOTE_API_KEY).toBeUndefined();
3140
3140
  });
3141
3141
  });
3142
3142
  describe("appendWithByteCap", () => {
@@ -3149,10 +3149,10 @@ describe("appendWithByteCap", () => {
3149
3149
  });
3150
3150
  describe("buildPaperclipEnv", () => {
3151
3151
  const ENV_KEYS = [
3152
- "PAPERCLIP_API_URL",
3153
- "PAPERCLIP_RUNTIME_API_URL",
3154
- "PAPERCLIP_LISTEN_HOST",
3155
- "PAPERCLIP_LISTEN_PORT",
3152
+ "WARDMOTE_API_URL",
3153
+ "WARDMOTE_RUNTIME_API_URL",
3154
+ "WARDMOTE_LISTEN_HOST",
3155
+ "WARDMOTE_LISTEN_PORT",
3156
3156
  "HOST",
3157
3157
  "PORT",
3158
3158
  ];
@@ -3176,33 +3176,33 @@ describe("buildPaperclipEnv", () => {
3176
3176
  }
3177
3177
  }
3178
3178
  }
3179
- it("prefers an explicit PAPERCLIP_API_URL override over the derived runtime URL", () => {
3179
+ it("prefers an explicit WARDMOTE_API_URL override over the derived runtime URL", () => {
3180
3180
  withEnv({
3181
- PAPERCLIP_API_URL: "http://localhost:3100",
3182
- PAPERCLIP_RUNTIME_API_URL: "http://203.0.113.7:3100",
3181
+ WARDMOTE_API_URL: "http://localhost:3100",
3182
+ WARDMOTE_RUNTIME_API_URL: "http://203.0.113.7:3100",
3183
3183
  }, () => {
3184
3184
  const env = buildPaperclipEnv({
3185
3185
  id: "agent-1",
3186
3186
  companyId: "company-1",
3187
3187
  });
3188
- expect(env.PAPERCLIP_API_URL).toBe("http://localhost:3100");
3189
- expect(env.PAPERCLIP_AGENT_ID).toBe("agent-1");
3190
- expect(env.PAPERCLIP_COMPANY_ID).toBe("company-1");
3188
+ expect(env.WARDMOTE_API_URL).toBe("http://localhost:3100");
3189
+ expect(env.WARDMOTE_AGENT_ID).toBe("agent-1");
3190
+ expect(env.WARDMOTE_COMPANY_ID).toBe("company-1");
3191
3191
  });
3192
3192
  });
3193
3193
  it("falls back to the derived runtime URL when no explicit override is set", () => {
3194
- withEnv({ PAPERCLIP_RUNTIME_API_URL: "http://203.0.113.7:3100" }, () => {
3194
+ withEnv({ WARDMOTE_RUNTIME_API_URL: "http://203.0.113.7:3100" }, () => {
3195
3195
  const env = buildPaperclipEnv({ id: "agent-1", companyId: "company-1" });
3196
- expect(env.PAPERCLIP_API_URL).toBe("http://203.0.113.7:3100");
3196
+ expect(env.WARDMOTE_API_URL).toBe("http://203.0.113.7:3100");
3197
3197
  });
3198
3198
  });
3199
3199
  it("derives a listen-host URL when neither override is set", () => {
3200
- withEnv({ PAPERCLIP_LISTEN_HOST: "0.0.0.0", PAPERCLIP_LISTEN_PORT: "3200" }, () => {
3200
+ withEnv({ WARDMOTE_LISTEN_HOST: "0.0.0.0", WARDMOTE_LISTEN_PORT: "3200" }, () => {
3201
3201
  const env = buildPaperclipEnv({
3202
3202
  id: "agent-1",
3203
3203
  companyId: "company-1",
3204
3204
  });
3205
- expect(env.PAPERCLIP_API_URL).toBe("http://localhost:3200");
3205
+ expect(env.WARDMOTE_API_URL).toBe("http://localhost:3200");
3206
3206
  });
3207
3207
  });
3208
3208
  });