openmausbot 0.1.56 → 0.1.57

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 (43) hide show
  1. package/dist/assets/index-B433sv8K.css +1 -0
  2. package/dist/assets/index-DSh8AIUy.js +264 -0
  3. package/dist/assets/{index-Dq2j4Ikr.js → index-jWqt5dmY.js} +1 -1
  4. package/dist/index.html +2 -2
  5. package/dist-server/companion/src/routes.js +6 -1
  6. package/dist-server/connector-proxy.js +31 -12
  7. package/dist-server/container-mcp.js +49 -31
  8. package/dist-server/drivers/agents-proxy.js +56 -2
  9. package/dist-server/index.js +1769 -338
  10. package/dist-server/server/auto-approve.js +24 -0
  11. package/dist-server/server/bot-folder.js +102 -0
  12. package/dist-server/server/bot-overview.js +206 -0
  13. package/dist-server/server/bot-package.js +5 -0
  14. package/dist-server/server/bot-profile.js +7 -0
  15. package/dist-server/server/connector-proxy.js +37 -16
  16. package/dist-server/server/container-computer.js +9 -2
  17. package/dist-server/server/drivers/agents-proxy.js +63 -2
  18. package/dist-server/server/drivers/antigravity-acp.js +61 -13
  19. package/dist-server/server/drivers/antigravity-runtime.js +47 -3
  20. package/dist-server/server/drivers/claude.js +7 -1
  21. package/dist-server/server/index.js +589 -103
  22. package/dist-server/server/mcp-bridge.js +73 -44
  23. package/dist-server/server/package-export.js +1 -0
  24. package/dist-server/server/profile-requests.js +332 -0
  25. package/dist-server/server/profile-revision.js +15 -0
  26. package/dist-server/server/profile-versions.js +154 -0
  27. package/dist-server/server/routine-requests.js +34 -1
  28. package/dist-server/server/routines.js +70 -2
  29. package/dist-server/server/setup-mode.js +63 -0
  30. package/dist-server/server/skill-fetch.js +67 -11
  31. package/dist-server/server/skills.js +1 -1
  32. package/dist-server/server/store.js +87 -7
  33. package/dist-server/server/system-prompt.js +49 -0
  34. package/dist-server/server/team-backup.js +2 -2
  35. package/dist-server/server/team-manifest.js +7 -0
  36. package/dist-server/shared/bot-profile.js +5 -1
  37. package/dist-server/shared/line-diff.js +42 -0
  38. package/dist-server/shared/profile-request.js +9 -0
  39. package/dist-server/shared/team-backup.js +4 -0
  40. package/dist-server/vps-container-mcp.js +49 -31
  41. package/package.json +1 -1
  42. package/dist/assets/index-CJBrtDbC.css +0 -1
  43. package/dist/assets/index-D0xt96rv.js +0 -263
@@ -15082,6 +15082,28 @@ function createGateInterceptor(options) {
15082
15082
  });
15083
15083
  };
15084
15084
  }
15085
+ function createMcpBridgeInterceptor(options) {
15086
+ const afterPing = options.gate ? createGateInterceptor({
15087
+ isHeld: options.gate.isHeld,
15088
+ forward: options.forward,
15089
+ refuse: options.answer,
15090
+ refusalText: options.gate.refusalText
15091
+ }) : options.forward;
15092
+ return (line) => {
15093
+ let frame = null;
15094
+ try {
15095
+ frame = JSON.parse(line);
15096
+ } catch {
15097
+ }
15098
+ if (frame && frame.method === "ping") {
15099
+ if (frame.id !== void 0) {
15100
+ options.answer(JSON.stringify({ jsonrpc: "2.0", id: frame.id, result: {} }));
15101
+ }
15102
+ return;
15103
+ }
15104
+ afterPing(line);
15105
+ };
15106
+ }
15085
15107
  function runMcpBridge(options) {
15086
15108
  const child = spawn(options.command, options.args, {
15087
15109
  shell: false,
@@ -15091,37 +15113,33 @@ function runMcpBridge(options) {
15091
15113
  child.stdin.on("error", () => {
15092
15114
  });
15093
15115
  child.stderr.pipe(process.stderr);
15094
- let detach;
15095
- if (options.gate) {
15096
- const client = createControlClient({ url: options.gate.url, token: options.gate.token });
15097
- const inbound = createLineSplitter(
15098
- createGateInterceptor({
15099
- isHeld: async () => (await client.state(true)).held,
15100
- forward: (line) => child.stdin.write(line + "\n"),
15101
- refuse: (line) => process.stdout.write(line + "\n")
15102
- })
15103
- );
15104
- const onStdin = (chunk) => inbound.push(chunk);
15105
- process.stdin.on("data", onStdin);
15106
- process.stdin.on("end", () => {
15107
- inbound.flush();
15108
- child.stdin.end();
15109
- });
15110
- const outbound = createLineSplitter((line) => process.stdout.write(line + "\n"));
15111
- child.stdout.on("data", (chunk) => outbound.push(chunk));
15112
- child.stdout.on("end", () => outbound.flush());
15113
- detach = () => {
15114
- process.stdin.off("data", onStdin);
15115
- process.stdin.pause();
15116
- };
15117
- } else {
15118
- process.stdin.pipe(child.stdin);
15119
- child.stdout.pipe(process.stdout);
15120
- detach = () => {
15121
- process.stdin.unpipe(child.stdin);
15122
- process.stdin.pause();
15123
- };
15124
- }
15116
+ const client = options.gate ? createControlClient({ url: options.gate.url, token: options.gate.token }) : null;
15117
+ const answer = (line) => process.stdout.write(line + "\n");
15118
+ const forward = (line) => child.stdin.write(line + "\n");
15119
+ const inbound = createLineSplitter(
15120
+ createMcpBridgeInterceptor({
15121
+ answer,
15122
+ forward,
15123
+ ...options.gate ? {
15124
+ gate: {
15125
+ isHeld: async () => (await client.state(true)).held
15126
+ }
15127
+ } : {}
15128
+ })
15129
+ );
15130
+ const onStdin = (chunk) => inbound.push(chunk);
15131
+ process.stdin.on("data", onStdin);
15132
+ process.stdin.on("end", () => {
15133
+ inbound.flush();
15134
+ child.stdin.end();
15135
+ });
15136
+ const outbound = createLineSplitter((line) => process.stdout.write(line + "\n"));
15137
+ child.stdout.on("data", (chunk) => outbound.push(chunk));
15138
+ child.stdout.on("end", () => outbound.flush());
15139
+ const detach = () => {
15140
+ process.stdin.off("data", onStdin);
15141
+ process.stdin.pause();
15142
+ };
15125
15143
  let watchdog = null;
15126
15144
  if (options.liveness) {
15127
15145
  const liveness = options.liveness;
@@ -192,6 +192,10 @@ var ROUTINE_FIELDS_SCHEMA = {
192
192
  clear_timeout: {
193
193
  type: "boolean",
194
194
  description: "Only for updates: set true to remove an existing safety limit. Do not combine with timeout_minutes."
195
+ },
196
+ continuity: {
197
+ type: "boolean",
198
+ description: "Opt in to using the latest completed run's bounded report as historical context. Defaults to false; set false in an update to start fresh again. Shown on the confirmation card."
195
199
  }
196
200
  };
197
201
  var TOOLS = [
@@ -371,6 +375,31 @@ var TOOLS = [
371
375
  required: ["routine_id", "action"]
372
376
  }
373
377
  },
378
+ {
379
+ name: "propose_profile",
380
+ description: "Propose changes to your own name, title, description, standing instructions (SOUL.md), or working folder (cwd). This only creates a confirmation card; nothing changes until the user approves it. After calling it, end the turn and do not claim the change is applied. Keep SOUL.md short \u2014 who you are and the rules you never break; put step-by-step procedure into a skill instead. A Chief of Staff may pass for_bot_id (from list_bots) to propose a change for another bot in its section.",
381
+ inputSchema: {
382
+ type: "object",
383
+ additionalProperties: false,
384
+ properties: {
385
+ name: { type: "string", maxLength: 100, description: "New display name." },
386
+ title: { type: "string", maxLength: 200, description: "New role or title." },
387
+ description: { type: "string", maxLength: 4e3, description: "New one-line blurb shown in rosters." },
388
+ soul: { type: "string", description: "Full replacement text for SOUL.md, at most 24000 bytes." },
389
+ cwd: {
390
+ type: "string",
391
+ maxLength: 1024,
392
+ description: "Absolute path of the folder your tools read and write in (for example /Users/me/Projects/site). It must already exist. An empty string means your private workspace."
393
+ },
394
+ reason: { type: "string", minLength: 1, maxLength: 500, description: "One sentence the user will see explaining why." },
395
+ for_bot_id: {
396
+ type: "string",
397
+ description: "Chief of Staff only: the id of another bot in your section whose profile this changes. Omit to change your own."
398
+ }
399
+ },
400
+ required: ["reason"]
401
+ }
402
+ },
374
403
  {
375
404
  name: "skills_list",
376
405
  description: "List this bot's imported skills (enabled and disabled) and any staged skill writes waiting for the user to confirm. Use this before skill_manage to avoid duplicate names. Listing does not enable anything.",
@@ -445,16 +474,17 @@ function routineFields(args) {
445
474
  if (typeof args.run_on === "string") fields.runOn = args.run_on;
446
475
  if (args.clear_timeout === true) fields.timeoutMinutes = null;
447
476
  else if (typeof args.timeout_minutes === "number") fields.timeoutMinutes = args.timeout_minutes;
477
+ if (typeof args.continuity === "boolean") fields.continuity = args.continuity;
448
478
  return { fields };
449
479
  }
450
- function confirmationResult(r, fallback) {
480
+ function confirmationResult(r, fallback, noun = "routine") {
451
481
  const summary = typeof r.summary === "string" && r.summary.trim() ? `
452
482
 
453
483
  ${r.summary.trim()}` : "";
454
484
  return {
455
485
  text: `A confirmation card is now visible to the user for ${fallback}.${summary}
456
486
 
457
- This change has not been applied yet. End this turn and wait for the user to confirm or deny the card; do not claim the routine was created or changed before confirmation.`
487
+ This change has not been applied yet. End this turn and wait for the user to confirm or deny the card; do not claim the ${noun} was created or changed before confirmation.`
458
488
  };
459
489
  }
460
490
  function recallSpeaker(hit) {
@@ -723,6 +753,30 @@ ${JSON.stringify(routines, null, 2)}`
723
753
  });
724
754
  return confirmationResult(r, `${action.replace("_", " ")} on routine ${routineId}`);
725
755
  }
756
+ if (name === "propose_profile") {
757
+ const changes = {};
758
+ if (typeof args.name === "string") changes.name = args.name.trim();
759
+ if (typeof args.title === "string") changes.title = args.title.trim();
760
+ if (typeof args.description === "string") changes.description = args.description.trim();
761
+ if (typeof args.soul === "string") changes.soul = args.soul;
762
+ if (typeof args.cwd === "string") changes.cwd = args.cwd.trim();
763
+ if (!Object.keys(changes).length) {
764
+ return { text: "propose_profile needs at least one of name, title, description, soul, or cwd.", isError: true };
765
+ }
766
+ const forBotId = String(args.for_bot_id ?? "").trim();
767
+ const r = await api("/api/internal/profile-requests", {
768
+ method: "POST",
769
+ body: JSON.stringify({
770
+ fromBotId: BOT_ID,
771
+ fromThreadId: THREAD_ID,
772
+ changes,
773
+ reason: args.reason,
774
+ // JSON.stringify drops the key entirely when no target was named
775
+ forBotId: forBotId || void 0
776
+ })
777
+ });
778
+ return confirmationResult(r, "the profile change", "profile");
779
+ }
726
780
  if (name === "session_search") {
727
781
  const q = String(args.query ?? "").trim();
728
782
  if (!q) return { text: 'session_search needs a query, for example {"query":"site audit broken links"}.', isError: true };