omo-ai 5.1.41 → 5.1.43

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 (44) hide show
  1. package/bin/lib/launcher.js +5 -0
  2. package/bin/lib/model-chains.js +110 -0
  3. package/bin/lib/provider-map.json +1 -1
  4. package/bin/lib/service-auth.generated.js +13 -7
  5. package/bin/omo.js +9 -0
  6. package/package.json +2 -2
  7. package/plugin/CHANGELOG.md +72 -1
  8. package/plugin/extensions/dream-persona.md +2 -0
  9. package/plugin/extensions/facts-persona.md +10 -2
  10. package/plugin/extensions/gateway-rules-extension.mjs +1 -1
  11. package/plugin/extensions/gateway-store-worker.mjs +1 -1
  12. package/plugin/extensions/kibitzer-persona.md +1 -1
  13. package/plugin/extensions/memory-run-supervisor.mjs +11 -2
  14. package/plugin/extensions/omo-claim-receipt.js +2 -0
  15. package/plugin/extensions/omo-computer-use.js +1 -1
  16. package/plugin/extensions/omo-feedback.js +2 -2
  17. package/plugin/extensions/omo-init-deep-advisor.js +2 -2
  18. package/plugin/extensions/omo-member.js +2 -2
  19. package/plugin/extensions/omo-memory-doctor.js +11 -2
  20. package/plugin/extensions/omo-memory-memfs.js +11 -2
  21. package/plugin/extensions/omo-memory-palace.js +11 -2
  22. package/plugin/extensions/omo-memory-sync.js +2 -2
  23. package/plugin/extensions/omo-onboarding-scan.js +11 -2
  24. package/plugin/extensions/omo-recall-store.js +2 -2
  25. package/plugin/extensions/omo-session-history.js +1 -1
  26. package/plugin/extensions/omo-side-panel.js +11 -2
  27. package/plugin/extensions/omo-task.js +2 -2
  28. package/plugin/extensions/omo-telemetry-posthog.js +1 -1
  29. package/plugin/extensions/omo-thread-client.js +2 -2
  30. package/plugin/extensions/omo.js +11 -2
  31. package/plugin/extensions/reflection-persona.md +2 -0
  32. package/plugin/package.json +2 -1
  33. package/plugin/runtime/agent-toolkit-sdk/sdk.js +2 -2
  34. package/plugin/runtime/ast-grep-mcp/manifest.json +1 -1
  35. package/plugin/runtime/category-coverage/index.js +645 -4
  36. package/plugin/runtime/lsp-daemon/dist/.omo-runtime-manifest.json +4 -4
  37. package/plugin/runtime/lsp-daemon/dist/cli.js +363 -35
  38. package/plugin/runtime/lsp-daemon/dist/client.js +341 -13
  39. package/plugin/runtime/lsp-daemon/dist/index.js +344 -16
  40. package/plugin/runtime/rollback-migrate.js +2 -2
  41. package/plugin/runtime/task-config/index.js +2 -2
  42. package/plugin/runtime/thread-sdk/sdk.js +2 -2
  43. package/plugin/scripts/install.mjs +1 -0
  44. package/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
@@ -4,6 +4,7 @@ import { join } from "node:path"
4
4
  import { isEngineCommand } from "./engine-commands.js"
5
5
  import { spawnNode } from "./child-process.js"
6
6
  import { doctorCoverageLines } from "./category-coverage.js"
7
+ import { runDoctorModels } from "./model-chains.js"
7
8
  import { doctorComputerUseLines } from "./computer-use-doctor.js"
8
9
  import { doctorConfigLines } from "./config-doctor.js"
9
10
  import { runDaemonCommand } from "./daemon.js"
@@ -179,6 +180,10 @@ export async function runLauncher(args = process.argv.slice(2)) {
179
180
  if (command === "doctor") {
180
181
  // Doctor is a launch too: it reports only what the launch-time preparation could not fix.
181
182
  preparePluginLaunchSpec({ pluginRoot: join(packageRoot, "plugin") })
183
+ if (args[1] === "--models") {
184
+ process.exitCode = await runDoctorModels(args.slice(2), { agentDir: canonicalAgentDir() })
185
+ return
186
+ }
182
187
  const [categoryCoverage, computerUse, configDiagnostics, gateway] = args[1] === "--reap"
183
188
  ? [[], [], [], []]
184
189
  : await Promise.all([
@@ -0,0 +1,110 @@
1
+ /**
2
+ * `omo doctor --models [--json]`: per category and task agent, the model a spawn runs first, the
3
+ * runtime retry chain in order, and every declared rung with its source (built-in, omo.json, the
4
+ * category an agent borrows) and whether it runs, then the main session's model_profile lane.
5
+ *
6
+ * The answer comes from the same places `omo doctor`'s coverage line does: the pinned engine's
7
+ * offline model list (`engineAvailableModels`: auth.json, models.json, env keys; no network, nothing
8
+ * written) classified by the spawn resolvers through the staged category-coverage runtime bundle.
9
+ * Unlike the coverage line this is an explicit request, so a runtime that cannot answer fails it.
10
+ */
11
+
12
+ import { COVERAGE_RUNTIME, engineAvailableModels } from "./category-coverage.js"
13
+ import { packageRoot } from "./package-paths.js"
14
+ import { join } from "node:path"
15
+ import { pathToFileURL } from "node:url"
16
+
17
+ const STATE_TEXT = {
18
+ primary: () => "runs first",
19
+ excluded: (rung) => `excluded by exclude_models "${rung.excludedBy}"`,
20
+ "no-login": () => "no login",
21
+ "not-reached": () => "not reached",
22
+ applied: () => "applied",
23
+ }
24
+
25
+ function rungModel(rung) {
26
+ return rung.providers === undefined ? rung.model : `${rung.model} (${rung.providers.join(" | ")})`
27
+ }
28
+
29
+ function rungLines(rungs) {
30
+ let fallback = 0
31
+ const width = Math.max(0, ...rungs.map((rung) => rungModel(rung).length))
32
+ return rungs.map((rung, index) => {
33
+ const state = rung.state === "fallback" ? `fallback ${(fallback += 1)}` : STATE_TEXT[rung.state](rung)
34
+ return ` ${index + 1}. ${rungModel(rung).padEnd(width)} ${rung.source.padEnd(9)} ${state}`
35
+ })
36
+ }
37
+
38
+ function entryLines(entry) {
39
+ const head = entry.status === "resolved"
40
+ ? ` ${entry.name}: ${entry.runtime.join(" -> ")}`
41
+ : ` ${entry.name}: ${entry.status}${entry.reason === undefined ? "" : ` (${entry.reason})`}`
42
+ return [head, ...rungLines(entry.rungs)]
43
+ }
44
+
45
+ /** The human report. @param {any} view the runtime's `modelChains` result */
46
+ export function formatModelChainLines(view) {
47
+ const profile = view.modelProfile
48
+ const lane = profile.selection === "set" ? `model_profile ${profile.profile}` : `model_profile unset, default lane ${profile.profile}`
49
+ return [
50
+ "Models a spawn resolves right now (logins read offline; credentials are not probed).",
51
+ `exclude_models: ${view.excludeModels.length === 0 ? "none" : view.excludeModels.join(", ")}`,
52
+ ...(view.configProfile === undefined ? [] : [`config profile: ${view.configProfile}`]),
53
+ "",
54
+ "categories",
55
+ ...view.categories.flatMap(entryLines),
56
+ "",
57
+ "agents",
58
+ ...view.agents.flatMap(entryLines),
59
+ "",
60
+ `main session (${lane})`,
61
+ ` ${profile.applied ?? `none${profile.reason === undefined ? "" : ` (${profile.reason})`}`}`,
62
+ ...rungLines(profile.rungs),
63
+ ]
64
+ }
65
+
66
+ async function loadRuntime() {
67
+ return import(pathToFileURL(join(packageRoot, COVERAGE_RUNTIME)).href)
68
+ }
69
+
70
+ /**
71
+ * @typedef {{
72
+ * agentDir: string,
73
+ * json: boolean,
74
+ * cwd?: string,
75
+ * env?: Record<string, string | undefined>,
76
+ * loadEngine?: () => Promise<any>,
77
+ * loadRuntime?: () => Promise<any>,
78
+ * }} DoctorModelsOptions
79
+ * @param {DoctorModelsOptions} options
80
+ * @returns {Promise<{ output: string, failed: boolean }>}
81
+ */
82
+ export async function doctorModelChains(options) {
83
+ try {
84
+ const runtime = await (options.loadRuntime ?? loadRuntime)()
85
+ const cwd = options.cwd ?? process.cwd()
86
+ const models = await engineAvailableModels({ agentDir: options.agentDir, cwd, loadEngine: options.loadEngine })
87
+ const view = runtime.modelChains({ models, cwd, env: options.env ?? process.env })
88
+ return { output: options.json ? JSON.stringify(view, null, 2) : formatModelChainLines(view).join("\n"), failed: false }
89
+ } catch (error) {
90
+ return { output: `FAIL models: ${error instanceof Error ? error.message : String(error)}`, failed: true }
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Prints the report and returns the exit code: 0, 1 when the runtime cannot answer, 2 for an option
96
+ * other than `--json`.
97
+ * @param {string[]} args the arguments after `--models`
98
+ * @param {Omit<DoctorModelsOptions, "json">} options
99
+ * @returns {Promise<number>}
100
+ */
101
+ export async function runDoctorModels(args, options) {
102
+ const unknown = args.filter((arg) => arg !== "--json")
103
+ if (unknown.length > 0) {
104
+ console.error(`omo doctor --models: unknown option ${unknown.join(" ")} (accepted: --json)`)
105
+ return 2
106
+ }
107
+ const result = await doctorModelChains({ ...options, json: args.includes("--json") })
108
+ console.log(result.output)
109
+ return result.failed ? 1 : 0
110
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "_comment": "Derived from @code-yeongyu/senpi 2026.10.21-1 builtinProviders(). builtinProviderIds and oauthProviderIds are the engine registry verbatim; providers maps a source harness id onto the omo provider that serves the same endpoint; oauthLogins maps a source OAuth id onto the omo provider to run /login for. Re-derive all four whenever the senpi pin changes.",
2
+ "_comment": "Derived from @code-yeongyu/senpi 2026.10.21-2 builtinProviders(). builtinProviderIds and oauthProviderIds are the engine registry verbatim; providers maps a source harness id onto the omo provider that serves the same endpoint; oauthLogins maps a source OAuth id onto the omo provider to run /login for. Re-derive all four whenever the senpi pin changes.",
3
3
  "builtinProviderIds": [
4
4
  "alibaba-token-plan",
5
5
  "amazon-bedrock",