omo-ai 5.1.61 → 5.1.63
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.
- package/bin/darwin/omo-keychain +0 -0
- package/bin/lib/doctor-migration.js +73 -5
- package/bin/lib/doctor.js +2 -0
- package/bin/lib/keychain-helper-doctor.js +26 -0
- package/bin/lib/provider-map.json +1 -1
- package/bin/lib/service-auth.generated.js +26 -15
- package/package.json +2 -2
- package/plugin/CHANGELOG.md +109 -0
- package/plugin/NOTICE +24 -0
- package/plugin/extensions/assets.generated.json +1 -1
- package/plugin/extensions/gateway-store-worker.mjs +2 -2
- package/plugin/extensions/memory-run-supervisor.mjs +1 -1
- package/plugin/extensions/omo-claim-receipt.js +1 -1
- package/plugin/extensions/omo-computer-use.js +2 -2
- package/plugin/extensions/omo-desktop-toolkit.js +1 -1
- package/plugin/extensions/omo-device-account.js +2 -2
- package/plugin/extensions/omo-device-service.js +3 -3
- package/plugin/extensions/omo-feedback.js +2 -2
- package/plugin/extensions/omo-init-deep-advisor.js +2 -2
- package/plugin/extensions/omo-member.js +2 -2
- package/plugin/extensions/omo-memory-commands.js +3 -3
- package/plugin/extensions/omo-memory-doctor.js +3 -3
- package/plugin/extensions/omo-memory-memfs.js +3 -3
- package/plugin/extensions/omo-memory-palace.js +3 -3
- package/plugin/extensions/omo-memory-sync.js +2 -2
- package/plugin/extensions/omo-onboarding-scan.js +3 -3
- package/plugin/extensions/omo-recall-store.js +1 -1
- package/plugin/extensions/omo-session-history.js +1 -1
- package/plugin/extensions/omo-side-panel.js +2 -2
- package/plugin/extensions/omo-task.js +2 -2
- package/plugin/extensions/omo-telemetry-otlp.js +2 -2
- package/plugin/extensions/omo-telemetry-posthog.js +1 -1
- package/plugin/extensions/omo-telemetry-recovery.js +1 -1
- package/plugin/extensions/omo-thread-client.js +57 -2
- package/plugin/extensions/omo.js +3 -3
- package/plugin/package.json +3 -2
- package/plugin/runtime/agent-toolkit-sdk/sdk.js +2 -2
- package/plugin/runtime/ast-grep-mcp/manifest.json +1 -1
- package/plugin/runtime/bunshin-ts/sdk.js +98 -0
- package/plugin/runtime/category-coverage/assets.generated.json +1 -1
- package/plugin/runtime/category-coverage/index.js +1 -1
- package/plugin/runtime/rollback-migrate.js +1 -1
- package/plugin/runtime/thread-sdk/sdk.js +57 -2
- package/plugin/scripts/install.mjs +1 -0
- package/plugin/skills/ast-grep/AGENTS.md +2 -2
- package/plugin/skills/ast-grep/README.md +4 -4
- package/plugin/skills/ast-grep/SKILL.md +10 -8
- package/plugin/skills/ast-grep/references/cli.md +4 -3
- package/plugin/skills/ast-grep/references/patterns.md +5 -5
- package/plugin/skills/ast-grep/references/pitfalls.md +3 -3
- package/plugin/skills/ast-grep/references/recipes.md +6 -4
- package/plugin/skills/ast-grep/references/yaml-rules.md +3 -3
- package/plugin/skills/ast-grep/scripts/ast_grep_helper.py +3 -3
- package/plugin/skills/browser/SKILL.md +2 -3
- package/plugin/skills/browser/references/owned-engine/README.md +1 -1
- package/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
- package/plugin/skills/coding-agent-sessions/AGENTS.md +1 -1
- package/plugin/skills/coding-agent-sessions/SKILL.md +2 -1
- package/plugin/skills/dag-library/SKILL.md +5 -5
- package/plugin/skills/data-scientist/SKILL.md +8 -6
- package/plugin/skills/data-scientist/references/placement.md +9 -5
- package/plugin/skills/data-scientist/references/uv-setup.md +3 -3
- package/plugin/skills/data-scientist/references/visualization.md +19 -4
- package/plugin/skills/debugging/SKILL.md +5 -5
- package/plugin/skills/debugging/references/methodology/02-investigate.md +4 -2
- package/plugin/skills/debugging/references/methodology/04-oracle-triple.md +2 -0
- package/plugin/skills/debugging/references/methodology/06-fix.md +2 -0
- package/plugin/skills/debugging/references/methodology/09-cleanup.md +2 -2
- package/plugin/skills/debugging/references/methodology/partial-runtime-evidence.md +3 -1
- package/plugin/skills/debugging/references/runtimes/bundled-js-binary.md +1 -1
- package/plugin/skills/debugging/references/runtimes/native-binary.md +1 -1
- package/plugin/skills/debugging/references/tools/browser-qa.md +1 -2
- package/plugin/skills/frontend/SKILL.md +4 -4
- package/plugin/skills/frontend/references/design/README.md +2 -2
- package/plugin/skills/frontend/references/design/component-catalogs.md +1 -1
- package/plugin/skills/frontend/references/design/design-system-architecture.md +2 -2
- package/plugin/skills/frontend/references/design/print-paged-media.md +1 -1
- package/plugin/skills/frontend/references/design/react-dev-tooling-skill.md +1 -1
- package/plugin/skills/frontend/references/designpowers/lane-a-direction.md +5 -5
- package/plugin/skills/frontend/references/designpowers/routing.md +2 -2
- package/plugin/skills/frontend/references/perfection/README.md +1 -2
- package/plugin/skills/frontend/references/perfection/react-perf-tooling.md +27 -8
- package/plugin/skills/frontend/scripts/perfection/lighthouse-audit.py +0 -1
- package/plugin/skills/git-master/SKILL.md +12 -2
- package/plugin/skills/give-me-tips/SKILL.md +22 -19
- package/plugin/skills/hyperplan/SKILL.md +19 -17
- package/plugin/skills/init-deep/SKILL.md +3 -3
- package/plugin/skills/lsp-setup/SKILL.md +24 -15
- package/plugin/skills/lsp-setup/references/bash/README.md +3 -3
- package/plugin/skills/lsp-setup/references/c-cpp/README.md +2 -2
- package/plugin/skills/lsp-setup/references/csharp/README.md +2 -2
- package/plugin/skills/lsp-setup/references/dart/README.md +2 -2
- package/plugin/skills/lsp-setup/references/elixir/README.md +2 -2
- package/plugin/skills/lsp-setup/references/go/README.md +2 -2
- package/plugin/skills/lsp-setup/references/haskell/README.md +2 -2
- package/plugin/skills/lsp-setup/references/java/README.md +3 -3
- package/plugin/skills/lsp-setup/references/julia/README.md +3 -3
- package/plugin/skills/lsp-setup/references/kotlin/README.md +4 -4
- package/plugin/skills/lsp-setup/references/lua/README.md +2 -2
- package/plugin/skills/lsp-setup/references/php/README.md +3 -3
- package/plugin/skills/lsp-setup/references/python/README.md +13 -12
- package/plugin/skills/lsp-setup/references/ruby/README.md +2 -2
- package/plugin/skills/lsp-setup/references/rust/README.md +2 -2
- package/plugin/skills/lsp-setup/references/swift/README.md +4 -4
- package/plugin/skills/lsp-setup/references/terraform/README.md +2 -2
- package/plugin/skills/lsp-setup/references/typescript/README.md +3 -3
- package/plugin/skills/lsp-setup/references/yaml/README.md +2 -2
- package/plugin/skills/lsp-setup/references/zig/README.md +2 -2
- package/plugin/skills/lsp-setup/scripts/detect-lsp.ts +1 -1
- package/plugin/skills/lsp-setup/scripts/lsp-server-table.ts +3 -2
- package/plugin/skills/mass-ulw/SKILL.md +2 -2
- package/plugin/skills/mass-ulw/references/planning.md +11 -8
- package/plugin/skills/onboarding/SKILL.md +11 -6
- package/plugin/skills/programming/SKILL.md +5 -5
- package/plugin/skills/programming/references/code-smells.md +2 -2
- package/plugin/skills/programming/references/go/README.md +3 -3
- package/plugin/skills/programming/references/python/README.md +8 -8
- package/plugin/skills/programming/references/python/data-processing.md +9 -9
- package/plugin/skills/programming/references/python/libraries.md +3 -3
- package/plugin/skills/programming/references/python/one-liners.md +1 -1
- package/plugin/skills/programming/references/python/pyproject-strict.md +1 -1
- package/plugin/skills/programming/references/rust/libraries.md +2 -2
- package/plugin/skills/programming/references/rust-ub/README.md +5 -3
- package/plugin/skills/programming/references/typescript/README.md +5 -5
- package/plugin/skills/programming/scripts/typescript/new-project.ts +1 -1
- package/plugin/skills/refactor/SKILL.md +41 -39
- package/plugin/skills/remove-ai-slops/SKILL.md +8 -6
- package/plugin/skills/review-work/SKILL.md +4 -2
- package/plugin/skills/ultimate-browsing/SKILL.md +11 -8
- package/plugin/skills/ultimate-browsing/engine/AGENTS.md +4 -4
- package/plugin/skills/ultimate-browsing/references/agent-reach/README.md +2 -2
- package/plugin/skills/ultimate-browsing/references/agent-reach/career.md +1 -1
- package/plugin/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
- package/plugin/skills/ultimate-browsing/references/agent-reach/web.md +4 -4
- package/plugin/skills/ultimate-browsing/references/chrome-stealth.md +2 -1
- package/plugin/skills/ultimate-browsing/references/insane-search/README.md +17 -18
- package/plugin/skills/ultimate-browsing/references/insane-search/fallback.md +10 -6
- package/plugin/skills/ultimate-browsing/references/insane-search/jina.md +12 -12
- package/plugin/skills/ultimate-browsing/references/insane-search/naver.md +3 -3
- package/plugin/skills/ultimate-browsing/references/insane-search/playwright.md +1 -1
- package/plugin/skills/ultimate-browsing/references/insane-search/rss.md +1 -1
- package/plugin/skills/ultimate-browsing/references/insane-search/tls-impersonate.md +12 -7
- package/plugin/skills/ultrawork/SKILL.md +23 -14
- package/plugin/skills/ulw-execute/SKILL.md +11 -6
- package/plugin/skills/ulw-loop/SKILL.md +3 -3
- package/plugin/skills/ulw-loop/references/define-goal.md +1 -1
- package/plugin/skills/ulw-loop/references/full-workflow.md +15 -15
- package/plugin/skills/ulw-plan/SKILL.md +2 -2
- package/plugin/skills/ulw-plan/references/full-workflow.md +5 -5
- package/plugin/skills/ulw-plan/references/intent-unclear.md +2 -2
- package/plugin/skills/ulw-research/SKILL.md +1 -1
- package/plugin/skills/ulw-research/references/deliverable-phase.md +5 -5
- package/plugin/skills/ulw-research/references/latex-report.md +2 -1
- package/plugin/skills/ulw-research/references/report-visualization.md +2 -2
- package/plugin/skills/ulw-research/references/research-collection.md +4 -4
- package/plugin/skills/ulw-research/references/research-delivery.md +2 -2
- package/plugin/skills/ulw-research/references/unit-rules.md +2 -2
- package/plugin/skills/visual-qa/AGENTS.md +1 -1
- package/plugin/skills/visual-qa/SKILL.md +7 -5
- package/plugin/skills/visual-qa/references/browser-setup.md +4 -2
- package/plugin/skills/visualize/SKILL.md +8 -8
- package/plugin/telemetry-schema.json +4 -1
- package/plugin/telemetry-schema.omo-cloud.json +4 -1
package/bin/darwin/omo-keychain
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { closeSync, lstatSync, openSync, readFileSync, readSync, realpathSync, statSync } from "node:fs"
|
|
2
2
|
import { homedir } from "node:os"
|
|
3
|
-
import { delimiter, dirname, isAbsolute, join, win32 } from "node:path"
|
|
3
|
+
import { delimiter, dirname, isAbsolute, join, normalize, win32 } from "node:path"
|
|
4
4
|
import { parseJsonc } from "./jsonc.js"
|
|
5
5
|
import { releaseChannel } from "./package-paths.js"
|
|
6
6
|
import { opencodeConfigSources } from "./setup-opencode-assets.js"
|
|
@@ -24,6 +24,8 @@ function repairCommand() {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
const CODEX_LIGHT_WRAPPER_MARKER = "# OMO_GENERATED_RUNTIME_WRAPPER"
|
|
27
|
+
// The Windows `.cmd` wrapper writes `rem OMO_GENERATED_RUNTIME_WRAPPER` instead, so it never
|
|
28
|
+
// matches this marker and broken detection does not run for `.cmd` files (pre-existing limit).
|
|
27
29
|
const CODEX_LIGHT_CACHE_VERSION = /[\\/]plugins[\\/]cache[\\/]sisyphuslabs[\\/]omo[\\/]([^\\/"'\s]+)[\\/]/
|
|
28
30
|
const WINDOWS_BIN_SUFFIXES = ["", ".cmd", ".ps1", ".exe"]
|
|
29
31
|
const OWNER_WALK_UP_LIMIT = 6
|
|
@@ -76,8 +78,9 @@ export function scanOmoBins(environment) {
|
|
|
76
78
|
const owner = resolveOwner(binPath)
|
|
77
79
|
const kind = classify(owner)
|
|
78
80
|
const standalone = kind === "foreign" ? standaloneBinaryVersion(binPath, environment.homeDir, environment.isWindows) : null
|
|
81
|
+
const broken = standalone === null ? brokenLaunchTarget(binPath, owner, environment.homeDir) : undefined
|
|
79
82
|
entries.push(standalone === null
|
|
80
|
-
? { binPath, directory, owner, kind }
|
|
83
|
+
? { binPath, directory, owner, kind, ...(broken === undefined ? {} : { broken }) }
|
|
81
84
|
: { binPath, directory, owner: { name: STANDALONE_LABEL, version: standalone }, kind: "standalone" })
|
|
82
85
|
}
|
|
83
86
|
return entries
|
|
@@ -114,6 +117,41 @@ function pathExists(path) {
|
|
|
114
117
|
}
|
|
115
118
|
}
|
|
116
119
|
|
|
120
|
+
// A Codex Light wrapper launches a cached CLI through bun, with a node fallback when no bun
|
|
121
|
+
// is found; the cache path it names must exist, or the wrapper can never run. Returns the
|
|
122
|
+
// missing target, or undefined when the wrapper launches something that exists (or names no
|
|
123
|
+
// resolvable target).
|
|
124
|
+
function brokenLaunchTarget(binPath, owner, homeDir) {
|
|
125
|
+
if (owner === null || owner.name !== "lazycodex") return undefined
|
|
126
|
+
const shim = readFileHead(binPath, SHIM_READ_LIMIT)
|
|
127
|
+
const target = shim === undefined ? null : codexLightCacheTarget(shim, homeDir)
|
|
128
|
+
if (target === null) return undefined
|
|
129
|
+
// The POSIX wrapper writes its target with forward slashes (toPosixPath), so
|
|
130
|
+
// normalize the separators before reporting it: on Windows the broken line must
|
|
131
|
+
// use backslashes like every other path in the report, or it never matches the
|
|
132
|
+
// platform form the caller compares against (CI run 42027565394).
|
|
133
|
+
const normalized = normalize(target)
|
|
134
|
+
return pathExists(normalized) ? undefined : normalized
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// The runtime target the Light generator writes into the wrapper: the `exec "$BUN_BINARY" ...`
|
|
138
|
+
// line (POSIX) or `"%BUN_BINARY%" ... %*` (Windows), the file the wrapper actually runs — the
|
|
139
|
+
// same lines packages/omo-opencode/src/cli/doctor/checks/codex-runtime-wrapper.ts already
|
|
140
|
+
// parses. The first quoted cache path in the file is the optional node fallback
|
|
141
|
+
// (dist/cli-node/index.js), not the runtime target, so reading it would flag a working wrapper
|
|
142
|
+
// broken and miss a wrapper that really fails. `~` and `$HOME` resolve against the home dir;
|
|
143
|
+
// anything else must already be absolute to be resolvable.
|
|
144
|
+
function codexLightCacheTarget(shim, homeDir) {
|
|
145
|
+
const posix = shim.match(/exec "\$BUN_BINARY" "([^"]+)" "\$@"/)
|
|
146
|
+
const windows = posix === null ? shim.match(/"%+BUN_BINARY%+"\s+"([^"]+)"\s+%+\*/) : null
|
|
147
|
+
const raw = posix?.[1] ?? windows?.[1]
|
|
148
|
+
if (raw === undefined) return null
|
|
149
|
+
if (!/[\\/]plugins[\\/]cache[\\/]sisyphuslabs[\\/]omo[\\/]/.test(raw)) return null
|
|
150
|
+
if (raw.startsWith("~/") || raw.startsWith("~\\")) return join(homeDir, raw.slice(2))
|
|
151
|
+
if (raw.startsWith("$HOME/") || raw.startsWith("$HOME\\")) return join(homeDir, raw.slice(6))
|
|
152
|
+
return isAbsolute(raw) || win32.isAbsolute(raw) ? raw : null
|
|
153
|
+
}
|
|
154
|
+
|
|
117
155
|
function resolveOwner(binPath) {
|
|
118
156
|
const real = realPathOf(binPath)
|
|
119
157
|
const fromLink = isInsideNodeModules(real) ? ownerOfFile(real) : null
|
|
@@ -203,6 +241,18 @@ function realPathOf(path) {
|
|
|
203
241
|
}
|
|
204
242
|
}
|
|
205
243
|
|
|
244
|
+
// Two paths name the same install when they resolve to the same file. A hardlink shares the
|
|
245
|
+
// inode, and one npm prefix listed twice with different letter case on Windows is the same
|
|
246
|
+
// directory; realpath collapses neither, so compare dev/ino and fall back to realpath.
|
|
247
|
+
function fileIdentity(path) {
|
|
248
|
+
try {
|
|
249
|
+
const stats = statSync(path)
|
|
250
|
+
return `${stats.dev}:${stats.ino}`
|
|
251
|
+
} catch {
|
|
252
|
+
return realPathOf(path)
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
206
256
|
// Only regular files: readFileSync on a FIFO blocks until a writer opens it, hanging the doctor.
|
|
207
257
|
function readWholeFile(path) {
|
|
208
258
|
try {
|
|
@@ -241,7 +291,7 @@ export function findLegacyPackages(environment) {
|
|
|
241
291
|
const packageDir = join(modules, name)
|
|
242
292
|
const owner = readManifest(join(packageDir, "package.json"))
|
|
243
293
|
if (owner?.name !== name) continue
|
|
244
|
-
const key =
|
|
294
|
+
const key = fileIdentity(packageDir)
|
|
245
295
|
if (seen.has(key)) continue
|
|
246
296
|
seen.add(key)
|
|
247
297
|
found.push({ manager, name, version: owner.version, packageDir })
|
|
@@ -295,11 +345,18 @@ function omoInstallRemoval(entry, bunRoot) {
|
|
|
295
345
|
return `npm uninstall -g omo-ai --prefix ${shellQuote(prefix)}`
|
|
296
346
|
}
|
|
297
347
|
|
|
298
|
-
export function formatMigrationLines({ shadowing, nativeDirectory, legacyPackages, registrations, restoreCommand, omoInstalls = [], bunRoot = "", standalone = false }) {
|
|
348
|
+
export function formatMigrationLines({ shadowing, nativeDirectory, legacyPackages, registrations, restoreCommand, omoInstalls = [], bunRoot = "", standalone = false, broken = [] }) {
|
|
299
349
|
const lines = []
|
|
300
350
|
const first = omoInstalls[0]
|
|
301
351
|
const target = first?.kind === "standalone" || (first === undefined && standalone) ? "the standalone omo binary" : "omo-ai"
|
|
352
|
+
// A wrapper whose launch target is gone is broken wherever it sits on PATH, even
|
|
353
|
+
// behind the install that runs; it gets its own line and never the repair offer
|
|
354
|
+
// meant for a working older edition.
|
|
355
|
+
for (const entry of broken) {
|
|
356
|
+
lines.push(`WARN broken omo on PATH: ${entry.binPath} launches ${entry.broken}; remove it`)
|
|
357
|
+
}
|
|
302
358
|
for (const entry of shadowing) {
|
|
359
|
+
if (entry.broken !== undefined) continue
|
|
303
360
|
const fix = entry.kind === "legacy" && target === "omo-ai"
|
|
304
361
|
? `${repairCommand()} (repairs it), or remove that file.`
|
|
305
362
|
: nativeDirectory === null
|
|
@@ -307,7 +364,17 @@ export function formatMigrationLines({ shadowing, nativeDirectory, legacyPackage
|
|
|
307
364
|
: `remove that file, or move ${nativeDirectory} ahead of ${entry.directory} on PATH.`
|
|
308
365
|
lines.push(`WARN another omo precedes ${target} on PATH: ${entry.binPath} (${ownerLabel(entry.owner)}). Fix: ${fix}`)
|
|
309
366
|
}
|
|
310
|
-
|
|
367
|
+
// Every further install is a second copy, whatever its kind: two omo-ai installs
|
|
368
|
+
// of different versions, or from different managers, are the same warning. The
|
|
369
|
+
// only exception is the same file reached through two PATH spellings.
|
|
370
|
+
const seenInstalls = new Set()
|
|
371
|
+
if (first !== undefined) seenInstalls.add(fileIdentity(first.binPath))
|
|
372
|
+
const shadowedOmo = omoInstalls.slice(1).filter((entry) => {
|
|
373
|
+
const key = fileIdentity(entry.binPath)
|
|
374
|
+
if (seenInstalls.has(key)) return false
|
|
375
|
+
seenInstalls.add(key)
|
|
376
|
+
return true
|
|
377
|
+
})
|
|
311
378
|
if (shadowedOmo.length > 0) {
|
|
312
379
|
const others = shadowedOmo.map((entry) => `${entry.binPath} (${ownerLabel(entry.owner)})`).join(", ")
|
|
313
380
|
const removals = shadowedOmo.map((entry) => omoInstallRemoval(entry, bunRoot)).join(" and ")
|
|
@@ -362,5 +429,6 @@ export function migrationReport(options, restoreCommand) {
|
|
|
362
429
|
omoInstalls,
|
|
363
430
|
bunRoot: environment.bunRoot,
|
|
364
431
|
standalone: options.standalone === true,
|
|
432
|
+
broken: bins.filter((entry) => entry.broken !== undefined),
|
|
365
433
|
}), ...openCodeRoutingReport({ env, homeDir })]
|
|
366
434
|
}
|
package/bin/lib/doctor.js
CHANGED
|
@@ -10,6 +10,7 @@ import { migrationReport } from "./doctor-migration.js"
|
|
|
10
10
|
import { launchSpecDoctorLines } from "./launch-spec-mode.js"
|
|
11
11
|
import { piConfigReport } from "./doctor-pi-config.js"
|
|
12
12
|
import { needsSetupSuggestion } from "./setup-detect.js"
|
|
13
|
+
import { keychainHelperDoctorLines } from "./keychain-helper-doctor.js"
|
|
13
14
|
import { sameVersion } from "./same-version.js"
|
|
14
15
|
|
|
15
16
|
export function installedDistTag(version) {
|
|
@@ -428,6 +429,7 @@ export function runDoctor(inventory, args = [], options = {}) {
|
|
|
428
429
|
const launchSpec = launchSpecDoctorLines(options.pluginRoot ?? join(packageRoot, "plugin"), options.launchSpecIo)
|
|
429
430
|
if (launchSpec.some((line) => line.startsWith("FAIL "))) failed = true
|
|
430
431
|
lines.push(...launchSpec)
|
|
432
|
+
lines.push(...(options.keychainHelper ?? keychainHelperDoctorLines({ packageRoot })))
|
|
431
433
|
lines.push(...daemonReport(options), ...(options.computerUse ?? []), ...(options.categoryCoverage ?? []))
|
|
432
434
|
if ((options.computerUse ?? []).some((line) => line.startsWith("FAIL "))) failed = true
|
|
433
435
|
if (needsSetupSuggestion(inventory)) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process"
|
|
2
|
+
import { existsSync } from "node:fs"
|
|
3
|
+
import { join } from "node:path"
|
|
4
|
+
|
|
5
|
+
// The keychain helper's designated requirement; test/keychain-helper-doctor.test.ts pins it equal to the one the
|
|
6
|
+
// helper is built for (packages/omo-native/keychain-helper/build.ts).
|
|
7
|
+
export const KEYCHAIN_HELPER_REQUIREMENT =
|
|
8
|
+
'identifier "com.mengmota.omo-keychain-helper" and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] ' +
|
|
9
|
+
'and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "523JNR86LZ"'
|
|
10
|
+
|
|
11
|
+
const verifyWithCodesign = (path) =>
|
|
12
|
+
spawnSync("/usr/bin/codesign", ["--verify", "--strict", `-R=${KEYCHAIN_HELPER_REQUIREMENT}`, path], { stdio: "ignore" }).status === 0
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The one place a missing or damaged keychain helper is reported (#11262 addendum Q1/row 9): normal output stays silent
|
|
16
|
+
* and sign-in takes the previous path, so this is a warning, never a failure. macOS only.
|
|
17
|
+
*/
|
|
18
|
+
export function keychainHelperDoctorLines({ packageRoot, helperRelPath = "bin/darwin/omo-keychain", platform = process.platform, exists = existsSync, verify = verifyWithCodesign }) {
|
|
19
|
+
if (platform !== "darwin") return []
|
|
20
|
+
const helper = join(packageRoot, helperRelPath)
|
|
21
|
+
if (!exists(helper))
|
|
22
|
+
return [`WARN keychain helper: missing ${helperRelPath}; macOS sign-in uses the previous keychain path and may ask for access again. Reinstall omo.`]
|
|
23
|
+
if (!verify(helper))
|
|
24
|
+
return [`WARN keychain helper: ${helperRelPath} failed its signature check and is never run; reinstall omo.`]
|
|
25
|
+
return [`PASS keychain helper: ${helperRelPath} (signed)`]
|
|
26
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_comment": "Derived from @code-yeongyu/senpi 2026.11.
|
|
2
|
+
"_comment": "Derived from @code-yeongyu/senpi 2026.11.5-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.",
|
|
3
3
|
"builtinProviderIds": [
|
|
4
4
|
"alibaba-token-plan",
|
|
5
5
|
"amazon-bedrock",
|