omo-ai 5.1.74 → 5.1.77

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 (59) hide show
  1. package/bin/darwin/omo-keychain +0 -0
  2. package/bin/lib/agent-dir.js +14 -2
  3. package/bin/lib/child-process.js +33 -26
  4. package/bin/lib/engine-environment.js +2 -1
  5. package/bin/lib/keychain-helper-doctor.js +55 -7
  6. package/bin/lib/provider-map.json +1 -1
  7. package/bin/lib/service-auth.generated.js +129 -101
  8. package/bin/lib/thread-output.js +2 -2
  9. package/package.json +2 -2
  10. package/plugin/CHANGELOG.md +126 -0
  11. package/plugin/extensions/assets.generated.json +1 -1
  12. package/plugin/extensions/gateway-store-worker.mjs +2 -2
  13. package/plugin/extensions/memory-run-supervisor.mjs +1 -1
  14. package/plugin/extensions/omo-claim-receipt.js +1 -1
  15. package/plugin/extensions/omo-computer-run-worker.mjs +1 -1
  16. package/plugin/extensions/omo-computer-use.js +1 -1
  17. package/plugin/extensions/omo-desktop-toolkit.js +1 -1
  18. package/plugin/extensions/omo-device-account.js +10 -6
  19. package/plugin/extensions/omo-device-service.js +8 -4
  20. package/plugin/extensions/omo-feedback.js +2 -2
  21. package/plugin/extensions/omo-init-deep-advisor.js +2 -2
  22. package/plugin/extensions/omo-member.js +2 -2
  23. package/plugin/extensions/omo-memory-commands.js +1 -1
  24. package/plugin/extensions/omo-memory-doctor.js +1 -1
  25. package/plugin/extensions/omo-memory-memfs.js +1 -1
  26. package/plugin/extensions/omo-memory-palace.js +2 -2
  27. package/plugin/extensions/omo-memory-sync.js +2 -2
  28. package/plugin/extensions/omo-onboarding-scan.js +2 -2
  29. package/plugin/extensions/omo-recall-store.js +1 -1
  30. package/plugin/extensions/omo-session-history.js +1 -1
  31. package/plugin/extensions/omo-side-panel.js +3 -3
  32. package/plugin/extensions/omo-task.js +2 -2
  33. package/plugin/extensions/omo-telemetry-otlp.js +2 -2
  34. package/plugin/extensions/omo-telemetry-posthog.js +1 -1
  35. package/plugin/extensions/omo-telemetry-recovery.js +2 -2
  36. package/plugin/extensions/omo-thread-client.js +3 -3
  37. package/plugin/extensions/omo-wake.js +8 -4
  38. package/plugin/extensions/omo.js +3 -3
  39. package/plugin/package.json +1 -1
  40. package/plugin/runtime/agent-toolkit-sdk/sdk.js +2 -2
  41. package/plugin/runtime/ast-grep-mcp/manifest.json +1 -1
  42. package/plugin/runtime/bunshin-ts/sdk.js +4 -4
  43. package/plugin/runtime/category-coverage/assets.generated.json +1 -1
  44. package/plugin/runtime/category-coverage/index.js +3 -3
  45. package/plugin/runtime/rollback-migrate.js +1 -1
  46. package/plugin/runtime/thread-sdk/sdk.js +3 -3
  47. package/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
  48. package/plugin/skills/data-scientist/references/visualization.md +1 -1
  49. package/plugin/skills/frontend/SKILL.md +1 -1
  50. package/plugin/skills/frontend/references/design/_INDEX.md +2 -0
  51. package/plugin/skills/ultrawork/SKILL.md +2 -1
  52. package/plugin/skills/ulw-loop/references/full-workflow.md +1 -1
  53. package/plugin/skills/ulw-plan/references/full-workflow.md +3 -3
  54. package/plugin/skills/ulw-plan/scripts/plan-templates.mjs +3 -3
  55. package/plugin/skills/ulw-research/references/research-delivery.md +1 -1
  56. package/plugin/skills/visual-qa/SKILL.md +1 -1
  57. package/plugin/skills/visualize/SKILL.md +3 -3
  58. package/plugin/telemetry-schema.json +93 -1
  59. package/plugin/telemetry-schema.omo-cloud.json +93 -1
Binary file
@@ -98,6 +98,18 @@ function backfillSettings(source, target) {
98
98
  */
99
99
  /** @typedef {{ adopted: boolean, copied: string[], backfilled: string[] }} AdoptionResult */
100
100
 
101
+ /**
102
+ * Creates the agent dir the engine will use when it does not exist yet, owner-only (0700), so a
103
+ * group-writable umask (002, common on shared and default-group Linux setups) cannot leave it open.
104
+ * The engine refuses to publish its keys under a dir any group or other user can write
105
+ * (unsafe_key_record), so a dir created under the umask stopped a fresh install's first boot (#13958).
106
+ * An EXISTING dir is never changed: one the user opened up is still refused, which is the safety check.
107
+ */
108
+ export function ensureAgentDir(agentDir) {
109
+ if (existsSync(agentDir)) return
110
+ mkdirSync(agentDir, { recursive: true, mode: 0o700 })
111
+ }
112
+
101
113
  /** @returns {AdoptionResult} */
102
114
  export function adoptLegacyFlatState(env = process.env, home = runtimeHome(env)) {
103
115
  /** @type {AdoptionResult} */
@@ -115,7 +127,7 @@ export function adoptLegacyFlatState(env = process.env, home = runtimeHome(env))
115
127
  if (!existsSync(source)) continue
116
128
  const target = join(canonical, file)
117
129
  if (!existsSync(target)) {
118
- mkdirSync(canonical, { recursive: true })
130
+ ensureAgentDir(canonical)
119
131
  copyFileSync(source, target)
120
132
  result.copied.push(file)
121
133
  continue
@@ -128,7 +140,7 @@ export function adoptLegacyFlatState(env = process.env, home = runtimeHome(env))
128
140
 
129
141
  result.adopted = result.copied.length > 0 || result.backfilled.length > 0
130
142
  if (!parseFailed && (result.adopted || existsSync(canonical))) {
131
- mkdirSync(canonical, { recursive: true })
143
+ ensureAgentDir(canonical)
132
144
  writeFileSync(join(canonical, ADOPTION_MARKER), `${flat}\n`)
133
145
  }
134
146
  return result
@@ -14,9 +14,10 @@ const HANDLED_SIGNALS = [
14
14
  ["SIGINT", false],
15
15
  ]
16
16
 
17
- // Signals the launcher only relays: the engine uses them as wake-ups (senpi's supervisor wakes a draining host
18
- // child with SIGUSR1), so a waiting launcher must neither die of one nor start a shutdown grace window.
19
- const RELAYED_SIGNALS = ["SIGUSR1"]
17
+ // Signals the launcher only relays: the engine uses them as keep-running requests (senpi's supervisor wakes a
18
+ // draining host child with SIGUSR1; SIGUSR2 asks for the on-demand memory report), so a waiting launcher must
19
+ // neither die of one nor start a shutdown grace window.
20
+ const RELAYED_SIGNALS = ["SIGUSR1", "SIGUSR2"]
20
21
 
21
22
  // The engine's own shutdown drains in ~1.5-2.5s. Ten seconds is the ceiling before the launcher
22
23
  // stops waiting on a child that is not going to leave and reports the death it was asked for.
@@ -62,29 +63,8 @@ export function runChild(command, args, options = {}) {
62
63
  capturedStdio[2] = "pipe"
63
64
  return new Promise((resolve, reject) => {
64
65
  let child
65
- try {
66
- child = spawn(command, args, {
67
- stdio: "inherit",
68
- windowsHide: true,
69
- ...spawnOptions,
70
- ...(shellHandoff ? { env: shellHandoff.env, stdio: shellHandoff.stdio } : {}),
71
- // A captured stderr is still shown live; the caller also gets its tail to classify the failure.
72
- ...(captureStderr ? { stdio: capturedStdio } : {}),
73
- })
74
- } finally {
75
- const closeOwned = onSpawn ?? shellHandoff?.onSpawn
76
- closeOwned?.()
77
- }
78
- let stderr = ""
79
- if (captureStderr) {
80
- // The decoder keeps a multi-byte character split across chunks whole; the echo stays raw bytes.
81
- const decoder = new StringDecoder("utf8")
82
- child.stderr.on("data", (chunk) => {
83
- process.stderr.write(chunk)
84
- stderr = (stderr + decoder.write(chunk)).slice(-STDERR_TAIL_CHARS)
85
- })
86
- }
87
-
66
+ // Listen before the child exists: a signal that arrives the moment the engine starts must still reach it
67
+ // instead of killing this launcher. Bun and Node install the handler inside process.on (#13652 review).
88
68
  let settled = false
89
69
  let graceTimer
90
70
  const listeners = []
@@ -140,6 +120,33 @@ export function runChild(command, args, options = {}) {
140
120
  }
141
121
  }
142
122
 
123
+ try {
124
+ child = spawn(command, args, {
125
+ stdio: "inherit",
126
+ windowsHide: true,
127
+ ...spawnOptions,
128
+ ...(shellHandoff ? { env: shellHandoff.env, stdio: shellHandoff.stdio } : {}),
129
+ // A captured stderr is still shown live; the caller also gets its tail to classify the failure.
130
+ ...(captureStderr ? { stdio: capturedStdio } : {}),
131
+ })
132
+ } catch (error) {
133
+ // Nothing was started, so nothing may keep listening for it.
134
+ cleanup()
135
+ throw error
136
+ } finally {
137
+ const closeOwned = onSpawn ?? shellHandoff?.onSpawn
138
+ closeOwned?.()
139
+ }
140
+ let stderr = ""
141
+ if (captureStderr) {
142
+ // The decoder keeps a multi-byte character split across chunks whole; the echo stays raw bytes.
143
+ const decoder = new StringDecoder("utf8")
144
+ child.stderr.on("data", (chunk) => {
145
+ process.stderr.write(chunk)
146
+ stderr = (stderr + decoder.write(chunk)).slice(-STDERR_TAIL_CHARS)
147
+ })
148
+ }
149
+
143
150
  child.on("error", (error) => settle(() => reject(error)))
144
151
  // A child that died of the forwarded signal needs no special case: `propagateResult` turns a
145
152
  // signaled result into this process dying by the same signal, which is exactly right.
@@ -1,6 +1,6 @@
1
1
  import { existsSync, realpathSync } from "node:fs"
2
2
  import { delimiter, isAbsolute, join, relative, sep } from "node:path"
3
- import { canonicalAgentDir } from "./agent-dir.js"
3
+ import { canonicalAgentDir, ensureAgentDir } from "./agent-dir.js"
4
4
  import { OMO_BRAND_LOGO } from "./brand-logo.generated.js"
5
5
  import { HERDR_AGENT_MARKER } from "./herdr-agent-hint.js"
6
6
  import {
@@ -92,6 +92,7 @@ export function senpiEnvironment(senpiRoot, overrides = {}) {
92
92
  // One directory for every surface. The legacy name travels too, so a bare senpi spawned by a
93
93
  // tool inherits the same state instead of falling back to its own home.
94
94
  const agentDir = canonicalAgentDir(env)
95
+ ensureAgentDir(agentDir)
95
96
  env.OMO_CODING_AGENT_DIR = agentDir
96
97
  env.SENPI_CODING_AGENT_DIR = agentDir
97
98
  // senpi's footer reads this marker to show the OmO Native badge for omo-ai installs, which load
@@ -1,6 +1,7 @@
1
1
  import { spawnSync } from "node:child_process"
2
- import { existsSync } from "node:fs"
3
- import { join } from "node:path"
2
+ import { existsSync, lstatSync } from "node:fs"
3
+ import { userInfo } from "node:os"
4
+ import { dirname, join } from "node:path"
4
5
 
5
6
  // The keychain helper's designated requirement; test/keychain-helper-doctor.test.ts pins it equal to the one the
6
7
  // helper is built for (packages/omo-native/keychain-helper/build.ts).
@@ -23,14 +24,61 @@ export function keychainHelperDoctorLines({
23
24
  platform = process.platform,
24
25
  exists = existsSync,
25
26
  verify = verifyWithCodesign,
27
+ home = userInfo().homedir,
28
+ stat = statOrNull,
26
29
  }) {
27
30
  if (platform !== "darwin") return []
28
- const helper = join(packageRoot, helperRelPath)
31
+ return [
32
+ helperLine(join(packageRoot, helperRelPath), helperRelPath, exists, verify),
33
+ ...credentialStoreLines(home, stat),
34
+ ]
35
+ }
36
+
37
+ function helperLine(helper, helperRelPath, exists, verify) {
29
38
  if (!exists(helper))
39
+ return `WARN keychain helper: missing ${helperRelPath}; macOS sign-in uses the previous keychain path and may ask for access again. Reinstall omo.`
40
+ if (!verify(helper))
41
+ return `WARN keychain helper: ${helperRelPath} failed its signature check and is never run; reinstall omo.`
42
+ return `PASS keychain helper: ${helperRelPath} (signed)`
43
+ }
44
+
45
+ function statOrNull(path) {
46
+ try {
47
+ return lstatSync(path)
48
+ } catch {
49
+ return null
50
+ }
51
+ }
52
+
53
+ const STORE_DIRECTORY = join("Library", "Application Support", "OmO", "credential-keychain")
54
+
55
+ // The same checks the keychain helper makes before it uses OmO's own keychain (#13116), so doctor names the refusal
56
+ // the helper would answer. Nothing here repairs the store; without one, doctor prints nothing (the login keychain).
57
+ function storeProblem(root, stat) {
58
+ const uid = process.getuid?.()
59
+ const owned = (info) => info !== null && !info.isSymbolicLink() && info.uid === uid
60
+ const parent = stat(dirname(root))
61
+ if (!owned(parent) || !parent.isDirectory() || (parent.mode & 0o022) !== 0) return "parent"
62
+ const directory = stat(root)
63
+ if (!owned(directory) || !directory.isDirectory() || (directory.mode & 0o7777) !== 0o700) return "folder"
64
+ const keychain = stat(join(root, "omo-credentials.keychain-db"))
65
+ if (!owned(keychain) || !keychain.isFile() || (keychain.mode & 0o7777) !== 0o600) return "keychain"
66
+ const key = stat(join(root, "unlock-key"))
67
+ if (!owned(key) || !key.isFile() || (key.mode & 0o7777) !== 0o600 || key.size !== 64) return "key"
68
+ return null
69
+ }
70
+
71
+ function credentialStoreLines(home, stat) {
72
+ const root = join(home, STORE_DIRECTORY)
73
+ if (stat(root) === null) return []
74
+ const problem = storeProblem(root, stat)
75
+ if (problem !== null)
30
76
  return [
31
- `WARN keychain helper: missing ${helperRelPath}; macOS sign-in uses the previous keychain path and may ask for access again. Reinstall omo.`,
77
+ `WARN credential store: OmO's own keychain at ${root} is refused (${problem}); it must be a private folder you own (0700) holding 0600 files. omo never repairs it or falls back to the login keychain.`,
32
78
  ]
33
- if (!verify(helper))
34
- return [`WARN keychain helper: ${helperRelPath} failed its signature check and is never run; reinstall omo.`]
35
- return [`PASS keychain helper: ${helperRelPath} (signed)`]
79
+ if (stat(join(root, "active")) === null)
80
+ return [
81
+ `WARN credential store: OmO's own keychain at ${root} is set up but not active; finish with omo account store enable, or remove it with omo account store disable.`,
82
+ ]
83
+ return [`PASS credential store: OmO's own keychain (${root})`]
36
84
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "_comment": "Derived from @code-yeongyu/senpi 2026.11.15-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.",
2
+ "_comment": "Derived from @code-yeongyu/senpi 2026.11.18 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",