clawmini 0.0.4 → 0.0.5

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 (61) hide show
  1. package/dist/adapter-discord/index.mjs +1 -1
  2. package/dist/adapter-google-chat/index.mjs +1 -1
  3. package/dist/cli/index.mjs +2 -2
  4. package/dist/cli/lite.mjs +5 -3
  5. package/dist/cli/lite.mjs.map +1 -1
  6. package/dist/cli/propose-policy.mjs +2 -0
  7. package/dist/cli/propose-policy.mjs.map +1 -1
  8. package/dist/daemon/index.mjs +22 -6
  9. package/dist/daemon/index.mjs.map +1 -1
  10. package/dist/{lite-BbCFgEjn.mjs → lite-CBxOT1y5.mjs} +2 -2
  11. package/dist/{lite-BbCFgEjn.mjs.map → lite-CBxOT1y5.mjs.map} +1 -1
  12. package/{web/.svelte-kit/output/client/_app/immutable/chunks/ByezTNKv.js → dist/web/_app/immutable/chunks/C20lZMGz.js} +1 -1
  13. package/{web/.svelte-kit/output/client/_app/immutable/chunks/uD5YsQE1.js → dist/web/_app/immutable/chunks/C9lbZ-kT.js} +1 -1
  14. package/dist/web/_app/immutable/entry/{app.Dkba_ZYl.js → app.BgB5VkRU.js} +2 -2
  15. package/dist/web/_app/immutable/entry/start.DuxJo6av.js +1 -0
  16. package/dist/web/_app/immutable/nodes/{0.CFkkEWLe.js → 0.C9oFZP9h.js} +1 -1
  17. package/dist/web/_app/immutable/nodes/{1.BVylC0w0.js → 1.BON2Wk6k.js} +1 -1
  18. package/dist/web/_app/immutable/nodes/{3.DEhhZBsS.js → 3.CIs4tjjw.js} +1 -1
  19. package/dist/web/_app/immutable/nodes/{4.C_OhFIXf.js → 4.DLarELN4.js} +1 -1
  20. package/dist/web/_app/immutable/nodes/{5.Bj0bsDBW.js → 5.CE_QKy_3.js} +1 -1
  21. package/dist/web/_app/version.json +1 -1
  22. package/dist/web/index.html +6 -6
  23. package/dist/{workspace-CEdb2nPR.mjs → workspace-BJmJBfKi.mjs} +3 -1
  24. package/dist/workspace-BJmJBfKi.mjs.map +1 -0
  25. package/docs/23_custom_token_env/development_log.md +31 -0
  26. package/docs/23_custom_token_env/notes.md +16 -0
  27. package/docs/23_custom_token_env/prd.md +42 -0
  28. package/docs/23_custom_token_env/questions.md +8 -0
  29. package/docs/23_custom_token_env/tickets.md +54 -0
  30. package/napkin.md +1 -0
  31. package/package.json +1 -1
  32. package/src/adapter-google-chat/client.test.ts +1 -1
  33. package/src/cli/e2e/daemon.test.ts +103 -0
  34. package/src/cli/lite.ts +10 -3
  35. package/src/daemon/agent/agent-session.ts +20 -4
  36. package/src/shared/config.ts +2 -0
  37. package/templates/gemini/settings.json +23 -22
  38. package/templates/gemini-claw/settings.json +27 -26
  39. package/web/.svelte-kit/generated/server/internal.js +1 -1
  40. package/web/.svelte-kit/output/client/.vite/manifest.json +25 -25
  41. package/{dist/web/_app/immutable/chunks/ByezTNKv.js → web/.svelte-kit/output/client/_app/immutable/chunks/C20lZMGz.js} +1 -1
  42. package/{dist/web/_app/immutable/chunks/uD5YsQE1.js → web/.svelte-kit/output/client/_app/immutable/chunks/C9lbZ-kT.js} +1 -1
  43. package/web/.svelte-kit/output/client/_app/immutable/entry/{app.Dkba_ZYl.js → app.BgB5VkRU.js} +2 -2
  44. package/web/.svelte-kit/output/client/_app/immutable/entry/start.DuxJo6av.js +1 -0
  45. package/web/.svelte-kit/output/client/_app/immutable/nodes/{0.CFkkEWLe.js → 0.C9oFZP9h.js} +1 -1
  46. package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.BVylC0w0.js → 1.BON2Wk6k.js} +1 -1
  47. package/web/.svelte-kit/output/client/_app/immutable/nodes/{3.DEhhZBsS.js → 3.CIs4tjjw.js} +1 -1
  48. package/web/.svelte-kit/output/client/_app/immutable/nodes/{4.C_OhFIXf.js → 4.DLarELN4.js} +1 -1
  49. package/web/.svelte-kit/output/client/_app/immutable/nodes/{5.Bj0bsDBW.js → 5.CE_QKy_3.js} +1 -1
  50. package/web/.svelte-kit/output/client/_app/version.json +1 -1
  51. package/web/.svelte-kit/output/server/chunks/internal.js +1 -1
  52. package/web/.svelte-kit/output/server/manifest-full.js +1 -1
  53. package/web/.svelte-kit/output/server/manifest.js +1 -1
  54. package/web/.svelte-kit/output/server/nodes/0.js +1 -1
  55. package/web/.svelte-kit/output/server/nodes/1.js +1 -1
  56. package/web/.svelte-kit/output/server/nodes/3.js +1 -1
  57. package/web/.svelte-kit/output/server/nodes/4.js +1 -1
  58. package/web/.svelte-kit/output/server/nodes/5.js +1 -1
  59. package/dist/web/_app/immutable/entry/start.B_seWfvF.js +0 -1
  60. package/dist/workspace-CEdb2nPR.mjs.map +0 -1
  61. package/web/.svelte-kit/output/client/_app/immutable/entry/start.B_seWfvF.js +0 -1
@@ -1,5 +1,5 @@
1
- import { C as writeAgentSessionSettings, D as pathIsInsideDir, O as CronJobSchema, S as updateChatSettings, T as writeChatSettings, _ as readEnvironment, b as resolveAgentWorkDir, c as getClawminiDir, d as getSocketPath, f as getWorkspaceRoot, g as readChatSettings, h as readAgentSessionSettings, k as SettingsSchema, l as getEnvironmentPath, m as listAgents, o as getActiveEnvironmentInfo, s as getAgent, u as getSettingsPath, v as readPolicies, y as readSettings } from "../workspace-CEdb2nPR.mjs";
2
- import { c as createChat, f as getDefaultChatId, h as listChats, n as exportLiteToEnvironment, p as getMessages$1, s as appendMessage$1, u as findLastMessage } from "../lite-BbCFgEjn.mjs";
1
+ import { C as writeAgentSessionSettings, D as pathIsInsideDir, O as CronJobSchema, S as updateChatSettings, T as writeChatSettings, _ as readEnvironment, b as resolveAgentWorkDir, c as getClawminiDir, d as getSocketPath, f as getWorkspaceRoot, g as readChatSettings, h as readAgentSessionSettings, k as SettingsSchema, l as getEnvironmentPath, m as listAgents, o as getActiveEnvironmentInfo, s as getAgent, u as getSettingsPath, v as readPolicies, y as readSettings } from "../workspace-BJmJBfKi.mjs";
2
+ import { c as createChat, f as getDefaultChatId, h as listChats, n as exportLiteToEnvironment, p as getMessages$1, s as appendMessage$1, u as findLastMessage } from "../lite-CBxOT1y5.mjs";
3
3
  import fs, { constants } from "node:fs";
4
4
  import path from "node:path";
5
5
  import { execSync, spawn } from "node:child_process";
@@ -1289,16 +1289,32 @@ var AgentSession = class {
1289
1289
  Object.keys(routerEnv).forEach((k) => agentSpecificEnvKeys.add(k));
1290
1290
  const apiCtx = getApiContext(this.globalSettings);
1291
1291
  if (apiCtx) {
1292
- env["CLAW_API_URL"] = apiCtx.proxy_host ? `${apiCtx.proxy_host}:${apiCtx.port}` : `http://${apiCtx.host}:${apiCtx.port}`;
1293
- agentSpecificEnvKeys.add("CLAW_API_URL");
1294
- env["CLAW_API_TOKEN"] = generateToken({
1292
+ const proxyUrl = apiCtx.proxy_host ? `${apiCtx.proxy_host}:${apiCtx.port}` : `http://${apiCtx.host}:${apiCtx.port}`;
1293
+ if (currentAgent.apiUrlEnvVar) {
1294
+ env[currentAgent.apiUrlEnvVar] = proxyUrl;
1295
+ agentSpecificEnvKeys.add(currentAgent.apiUrlEnvVar);
1296
+ env["CLAW_LITE_URL_VAR"] = currentAgent.apiUrlEnvVar;
1297
+ agentSpecificEnvKeys.add("CLAW_LITE_URL_VAR");
1298
+ } else {
1299
+ env["CLAW_API_URL"] = proxyUrl;
1300
+ agentSpecificEnvKeys.add("CLAW_API_URL");
1301
+ }
1302
+ const token = generateToken({
1295
1303
  chatId: this.chatId,
1296
1304
  agentId: this.agentId,
1297
1305
  sessionId: this.sessionId,
1298
1306
  ...this.subagentId ? { subagentId: this.subagentId } : {},
1299
1307
  timestamp: Date.now()
1300
1308
  });
1301
- agentSpecificEnvKeys.add("CLAW_API_TOKEN");
1309
+ if (currentAgent.apiTokenEnvVar) {
1310
+ env[currentAgent.apiTokenEnvVar] = token;
1311
+ agentSpecificEnvKeys.add(currentAgent.apiTokenEnvVar);
1312
+ env["CLAW_LITE_API_VAR"] = currentAgent.apiTokenEnvVar;
1313
+ agentSpecificEnvKeys.add("CLAW_LITE_API_VAR");
1314
+ } else {
1315
+ env["CLAW_API_TOKEN"] = token;
1316
+ agentSpecificEnvKeys.add("CLAW_API_TOKEN");
1317
+ }
1302
1318
  }
1303
1319
  let command = initialCommand;
1304
1320
  command = await sandboxExecutionContext(command, env, agentSpecificEnvKeys, this.workDirectory, this.workspaceRoot);