omp-superagent 0.1.6 → 0.1.8

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 (90) hide show
  1. package/DESIGN.md +36 -20
  2. package/README.ko.md +140 -33
  3. package/README.md +165 -41
  4. package/THIRD_PARTY_NOTICES.md +9 -7
  5. package/config.example.json +3 -1
  6. package/docs/OPERATIONS.md +395 -157
  7. package/docs/design/execution.md +156 -22
  8. package/docs/design/messaging.md +258 -52
  9. package/docs/discord-voice.md +8 -4
  10. package/docs/releases/0.1.7.md +25 -0
  11. package/docs/releases/0.1.8.md +21 -0
  12. package/gateway/bin/omp-gateway-darwin-arm64 +0 -0
  13. package/gateway/bin/omp-gateway-darwin-x64 +0 -0
  14. package/gateway/bin/omp-gateway-linux-arm64 +0 -0
  15. package/gateway/bin/omp-gateway-linux-x64 +0 -0
  16. package/host-owner/bin/omp-host-owner-darwin-arm64 +0 -0
  17. package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
  18. package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
  19. package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
  20. package/package.json +9 -9
  21. package/scripts/ci.ts +4 -4
  22. package/scripts/test-omp.sh +2 -1
  23. package/skills/head/SKILL.md +26 -5
  24. package/skills/head/references/routing.md +68 -33
  25. package/skills/head/references/supervision.md +20 -4
  26. package/skills/lane/references/workflow.md +16 -7
  27. package/src/board.ts +5 -3
  28. package/src/cli.ts +161 -19
  29. package/src/config.ts +21 -1
  30. package/src/contracts.ts +63 -8
  31. package/src/cron-jobs.ts +443 -19
  32. package/src/cron-pr-intake.ts +257 -0
  33. package/src/discord-markdown.ts +350 -123
  34. package/src/extension.ts +78 -13
  35. package/src/gateway-client.ts +8 -2
  36. package/src/head-quota.ts +80 -0
  37. package/src/head-recovery.ts +40 -1
  38. package/src/host-extension.ts +122 -4
  39. package/src/host-inventory-manifest.ts +2 -2
  40. package/src/host-protocol.ts +11 -0
  41. package/src/host-sdk-helper.ts +121 -12
  42. package/src/host.ts +175 -57
  43. package/src/installed-omp.ts +116 -4
  44. package/src/lane-rows.ts +44 -4
  45. package/src/lane-watch.ts +339 -0
  46. package/src/managed-memory-helper.ts +13 -10
  47. package/src/managed-memory.ts +62 -27
  48. package/src/managed-ulw-probe.ts +75 -20
  49. package/src/managed-ulw.ts +174 -21
  50. package/src/messenger-command-catalog.json +2 -2
  51. package/src/native-launch-profile.ts +4 -2
  52. package/src/native-presets.ts +32 -5
  53. package/src/native-sessions.ts +3 -1
  54. package/src/native-settings.ts +47 -9
  55. package/src/observation-request.ts +23 -0
  56. package/src/omp-usage.ts +254 -36
  57. package/src/pr-github-schema.ts +5 -1
  58. package/src/pr-github.ts +68 -19
  59. package/src/pr-intake-automation.ts +316 -0
  60. package/src/pr-intake-comment.ts +226 -0
  61. package/src/pr-intake-fix.ts +233 -0
  62. package/src/pr-intake-github.ts +480 -0
  63. package/src/pr-intake-material.ts +230 -0
  64. package/src/pr-intake-mode.ts +59 -0
  65. package/src/pr-intake-review.ts +397 -0
  66. package/src/pr-intake-tree.ts +69 -0
  67. package/src/pr-intake-work.ts +29 -0
  68. package/src/pr-watch.ts +91 -32
  69. package/src/runtime.ts +2702 -391
  70. package/src/setup-judge.ts +1 -1
  71. package/src/setup.ts +12 -16
  72. package/src/store.ts +429 -86
  73. package/src/topic-history.ts +243 -47
  74. package/src/worker-checkout.ts +106 -0
  75. package/src/worker-destination.ts +10 -0
  76. package/src/worker-doctor.ts +66 -0
  77. package/src/worker-enrollment.ts +165 -0
  78. package/src/worker-host.ts +180 -0
  79. package/src/worker-ledger.ts +188 -0
  80. package/src/worker-placement.ts +78 -0
  81. package/src/worker-profile.ts +274 -0
  82. package/src/worker-registration.ts +288 -0
  83. package/src/worker-repository.ts +233 -0
  84. package/src/worker-request.ts +74 -0
  85. package/src/worker-service.ts +230 -0
  86. package/src/worker-stdio.ts +61 -0
  87. package/src/worker-trust.ts +36 -0
  88. package/src/worker-wire.ts +204 -0
  89. package/src/workflow.ts +81 -32
  90. package/src/setup-memory.ts +0 -21
@@ -7,7 +7,7 @@ type JudgeConfiguration =
7
7
  /** Read configuration only, after a new setup has successfully published. */
8
8
  export async function inspectNativeJudge(cwd: string): Promise<JudgeConfiguration> {
9
9
  try {
10
- // Like setup-memory, keep even native dotenv/config imports behind setup's
10
+ // Keep even native dotenv/config imports behind setup's
11
11
  // credential acquisition and publication. Never resolve a model or open auth.
12
12
  const { Settings } = await import("@oh-my-pi/pi-coding-agent/config/settings");
13
13
  const settings = await Settings.loadReadOnly({ cwd });
package/src/setup.ts CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  assertCredentialsUnchanged, readCredentialFile, serializeCredentials, stagePrivateFile,
13
13
  validateCredential, writeCredentials,
14
14
  } from "./credentials";
15
- import { applyConsentedMnemopi, canEnableGlobalMemory, inspectManagedMnemopi, memoryBlockReason } from "./managed-memory";
15
+ import { applyConsentedMnemopi, canEnableGlobalMemory, inspectManagedMemory, memoryBlockReason } from "./managed-memory";
16
16
  import { inspectNativeJudge } from "./setup-judge";
17
17
 
18
18
  const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
@@ -206,26 +206,22 @@ export async function setup(configPath: string): Promise<void> {
206
206
  }
207
207
  serializeCredentials(values); // Prove lossless encoding before any persistent write.
208
208
  if (replacing) await terminal.confirm("Replace existing credential values?");
209
- const initialMemory = await inspectManagedMnemopi(config);
210
- let memoryConsent: Parameters<typeof applyConsentedMnemopi>[1] | undefined;
211
- if (canEnableGlobalMemory(initialMemory)) {
212
- console.log("Managed sessions require native OMP Mnemopi memory, which persists across conversations (project-scoped by default).");
213
- console.log(`This would change OMP's global memory.backend preference for ${initialMemory.agentDir}; existing memory options stay unchanged.`);
209
+ const initialMemory = await inspectManagedMemory(config);
210
+ const memoryPlan = canEnableGlobalMemory(initialMemory) ? initialMemory : undefined;
211
+ console.log(`Configuration: ${path}\nPrivate credentials: ${path}.env`);
212
+ if (memoryPlan) {
213
+ console.log(`After saving, set memory.backend=mnemopi in the global settings for the selected OMP profile: ${memoryPlan.agentDir}`);
214
+ console.log("Mnemopi persists across conversations (project-scoped by default). Existing memory options and model settings stay unchanged.");
214
215
  console.log("Depending on existing native settings, later memory use may process conversations with models and download models.");
215
216
  console.log("Setup does not start memory or OMP; it activates on later OMP startup. Running OMP instances may apply native settings reloads.");
216
- if (/^y(es)?$/i.test((await terminal.ask("Enable native Mnemopi memory after saving setup? [y/N]: ")).trim())) {
217
- memoryConsent = initialMemory;
218
- } else {
219
- console.log("Native memory settings will not be changed.");
220
- }
221
217
  }
222
- console.log(`Configuration: ${path}\nPrivate credentials: ${path}.env`);
223
218
  const profilePlatforms = (["discord", "telegram"] as const).filter(platform => config[platform]);
224
219
  if (profilePlatforms.length) {
225
220
  console.log(`After saving, replace the configured ${profilePlatforms.join("/")} bot profile pictures with the repository mascot: ${join(root, "assets", "superagent-avatar.jpg")}`);
226
221
  console.log("This uses profile REST APIs only; no Gateway, polling, messages, or native model session is started.");
227
222
  }
228
- await terminal.confirm("Write configuration/credentials?");
223
+ await terminal.confirm(memoryPlan ? "Write configuration/credentials and enable native Mnemopi memory?"
224
+ : "Write configuration/credentials?");
229
225
  // Snapshot the same environment-over-file precedence used by start before
230
226
  // native settings imports can populate unrelated dotenv values.
231
227
  const profileCredentials = Object.fromEntries(credentialEnvNames(config).map(name => [name, process.env[name] || values[name]!]));
@@ -253,12 +249,12 @@ export async function setup(configPath: string): Promise<void> {
253
249
  terminal.saved = true;
254
250
  console.log(`Saved configuration: ${path}\nPrivate credentials: ${path}.env (0600)`);
255
251
  terminal.check();
256
- const { memory, updated } = memoryConsent ? await applyConsentedMnemopi(config, memoryConsent)
257
- : { memory: await inspectManagedMnemopi(config), updated: false };
252
+ const { memory, updated } = memoryPlan ? await applyConsentedMnemopi(config, memoryPlan)
253
+ : { memory: await inspectManagedMemory(config), updated: false };
258
254
  terminal.check();
259
255
  if (updated) console.log("Saved native memory.backend=mnemopi in OMP agent settings.");
260
256
  if (memory.status === "enabled") {
261
- console.log(`Mnemopi is configured for the head workspace (${memory.source} settings); no service was started by setup.`);
257
+ console.log(`Native OMP memory.backend=${memory.backend} is configured for the head workspace (${memory.source} settings); no service was started by setup.`);
262
258
  } else {
263
259
  console.log(`Setup saved but is incomplete. ${memoryBlockReason(memory)} No service was started by setup.`);
264
260
  process.exitCode = 1;