omo-ai 5.1.45 → 5.1.46
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/lib/child-process.js +37 -3
- package/bin/lib/doctor-reflection-lock.js +52 -0
- package/bin/lib/doctor.js +2 -2
- package/bin/lib/launcher.js +4 -9
- package/bin/lib/reflection-lock.generated.js +2 -0
- package/bin/lib/self-update.js +96 -13
- package/bin/lib/update-lock.js +113 -0
- package/package.json +1 -1
- package/plugin/CHANGELOG.md +38 -9
- package/plugin/extensions/dream-persona.md +1 -1
- package/plugin/extensions/facts-persona.md +2 -2
- package/plugin/extensions/gateway-store-worker.mjs +2 -2
- package/plugin/extensions/memory-run-supervisor.mjs +3 -3
- package/plugin/extensions/omo-claim-receipt.js +1 -1
- package/plugin/extensions/omo-computer-use.js +2 -2
- package/plugin/extensions/omo-device-account.js +1 -1
- package/plugin/extensions/omo-feedback.js +2 -2
- package/plugin/extensions/omo-init-deep-advisor.js +1 -1
- 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 +1 -1
- 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 +3 -3
- package/plugin/extensions/omo-task.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 +1 -1
- package/plugin/extensions/omo.js +3 -3
- package/plugin/package.json +1 -2
- package/plugin/runtime/agent-toolkit-sdk/sdk.js +2 -2
- package/plugin/runtime/ast-grep-mcp/manifest.json +1 -1
- package/plugin/runtime/category-coverage/index.js +5 -5
- package/plugin/runtime/lsp-daemon/dist/.omo-runtime-manifest.json +4 -4
- package/plugin/runtime/lsp-daemon/dist/cli.js +3 -3
- package/plugin/runtime/lsp-daemon/dist/client.js +3 -3
- package/plugin/runtime/lsp-daemon/dist/index.js +3 -3
- package/plugin/runtime/rollback-migrate.js +1 -1
- package/plugin/runtime/task-config/index.js +2 -2
- package/plugin/runtime/thread-sdk/sdk.js +2 -2
- package/plugin/scripts/install.mjs +0 -1
- package/plugin/skills/ast-grep/AGENTS.md +1 -1
- package/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
- package/plugin/skills/frontend/ATTRIBUTION.md +2 -2
- package/plugin/skills/init-deep/SKILL.md +14 -2
- package/plugin/skills/ultimate-browsing/engine/AGENTS.md +1 -1
- package/plugin/skills/ulw-research/SKILL.md +38 -13
- package/plugin/skills/ulw-research/references/deliverable-phase.md +73 -13
- package/plugin/skills/ulw-research/references/fact-ledger-grammar.md +19 -1
- package/plugin/skills/ulw-research/references/fact-ledger.md +95 -0
- package/plugin/skills/ulw-research/references/fidelity-claim-kinds.md +19 -0
- package/plugin/skills/ulw-research/references/report-gates.md +21 -4
- package/plugin/skills/ulw-research/references/report-visualization.md +2 -0
- package/plugin/skills/ulw-research/references/unit-rules.md +157 -0
- package/plugin/skills/ulw-research/scripts/claim-kinds.mjs +116 -0
- package/plugin/skills/ulw-research/scripts/cli-support.mjs +19 -5
- package/plugin/skills/ulw-research/scripts/contracts.mjs +27 -6
- package/plugin/skills/ulw-research/scripts/fact-commands-meaning.mjs +191 -0
- package/plugin/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -0
- package/plugin/skills/ulw-research/scripts/fact-commands.mjs +239 -0
- package/plugin/skills/ulw-research/scripts/fact-derive.mjs +66 -0
- package/plugin/skills/ulw-research/scripts/fact-expr.mjs +108 -0
- package/plugin/skills/ulw-research/scripts/fact-fill.mjs +194 -0
- package/plugin/skills/ulw-research/scripts/fact-ledger-kinds.mjs +127 -13
- package/plugin/skills/ulw-research/scripts/fact-ledger-schema.mjs +33 -16
- package/plugin/skills/ulw-research/scripts/fact-ledger.mjs +29 -9
- package/plugin/skills/ulw-research/scripts/fact-locate.mjs +231 -0
- package/plugin/skills/ulw-research/scripts/fact-pairs.mjs +187 -0
- package/plugin/skills/ulw-research/scripts/fact-recompute.mjs +89 -0
- package/plugin/skills/ulw-research/scripts/fidelity-binding.mjs +130 -0
- package/plugin/skills/ulw-research/scripts/fidelity-brief.mjs +5 -0
- package/plugin/skills/ulw-research/scripts/fidelity-claims.mjs +89 -0
- package/plugin/skills/ulw-research/scripts/fidelity-lexicon.mjs +145 -0
- package/plugin/skills/ulw-research/scripts/fidelity-records.mjs +163 -0
- package/plugin/skills/ulw-research/scripts/fidelity-state.mjs +2 -1
- package/plugin/skills/ulw-research/scripts/fidelity-trace.mjs +85 -0
- package/plugin/skills/ulw-research/scripts/fidelity-values.mjs +229 -0
- package/plugin/skills/ulw-research/scripts/gates-fidelity.mjs +113 -0
- package/plugin/skills/ulw-research/scripts/gates-static.mjs +28 -8
- package/plugin/skills/ulw-research/scripts/html-lite.mjs +2 -2
- package/plugin/skills/ulw-research/scripts/html-markup.mjs +182 -0
- package/plugin/skills/ulw-research/scripts/md-lite.mjs +193 -0
- package/plugin/skills/ulw-research/scripts/meaning-check.mjs +196 -0
- package/plugin/skills/ulw-research/scripts/outcome.mjs +6 -5
- package/plugin/skills/ulw-research/scripts/placeholder.mjs +184 -0
- package/plugin/skills/ulw-research/scripts/polish-apply.mjs +115 -0
- package/plugin/skills/ulw-research/scripts/polish-diff.mjs +31 -0
- package/plugin/skills/ulw-research/scripts/polish-project.mjs +125 -0
- package/plugin/skills/ulw-research/scripts/polish-rules.mjs +170 -0
- package/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +19 -8
- package/plugin/skills/ulw-research/scripts/report-tools.mjs +15 -0
- package/plugin/skills/ulw-research/scripts/source-commands.mjs +140 -0
- package/plugin/skills/ulw-research/scripts/source-snapshot.mjs +176 -0
- package/plugin/skills/ulw-research/scripts/unit-algebra.mjs +101 -0
- package/plugin/skills/ulw-research/scripts/unit-errors.mjs +23 -0
- package/plugin/skills/ulw-research/scripts/unit-metadata.mjs +31 -0
- package/plugin/skills/ulw-research/scripts/unit-pairs.mjs +72 -0
- package/plugin/skills/ulw-research/scripts/unit-precision.mjs +44 -0
- package/plugin/skills/ulw-research/scripts/unit-rules-shapes.mjs +64 -0
- package/plugin/skills/ulw-research/scripts/unit-rules.mjs +173 -0
- package/plugin/skills/ulw-research/scripts/units.mjs +4 -4
- package/bin/lib/dori.js +0 -187
- package/plugin/extensions/gateway-rules-extension.mjs +0 -2
- package/plugin/extensions/omo-dori-migration.js +0 -2
- package/plugin/runtime/dori/layer2.js +0 -2
- package/plugin/runtime/dori/replay.js +0 -2
package/bin/lib/child-process.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { spawn } from "node:child_process"
|
|
2
|
+
import { StringDecoder } from "node:string_decoder"
|
|
2
3
|
|
|
3
4
|
// POSIX launchers prefer execve and leave no wrapper. This async fallback remains for Windows
|
|
4
5
|
// and missing/failed execve.
|
|
@@ -16,6 +17,9 @@ const HANDLED_SIGNALS = [
|
|
|
16
17
|
// stops waiting on a child that is not going to leave and reports the death it was asked for.
|
|
17
18
|
const DEFAULT_GRACE_MS = 10_000
|
|
18
19
|
|
|
20
|
+
const STDERR_TAIL_CHARS = 64 * 1024
|
|
21
|
+
const STDERR_DRAIN_MS = 500
|
|
22
|
+
|
|
19
23
|
function graceMs(env) {
|
|
20
24
|
const configured = Number(env.OMO_SIGNAL_GRACE_MS)
|
|
21
25
|
return Number.isFinite(configured) && configured > 0 ? configured : DEFAULT_GRACE_MS
|
|
@@ -43,13 +47,25 @@ export function propagateResult(result) {
|
|
|
43
47
|
* would terminate the child abruptly, so nothing is forwarded and the wait is the whole behavior.
|
|
44
48
|
*/
|
|
45
49
|
export function runChild(command, args, options = {}) {
|
|
46
|
-
const
|
|
50
|
+
const { captureStderr = false, ...spawnOptions } = options
|
|
51
|
+
const env = spawnOptions.env ?? process.env
|
|
47
52
|
return new Promise((resolve, reject) => {
|
|
48
53
|
const child = spawn(command, args, {
|
|
49
54
|
stdio: "inherit",
|
|
50
55
|
windowsHide: true,
|
|
51
|
-
...
|
|
56
|
+
...spawnOptions,
|
|
57
|
+
// A captured stderr is still shown live; the caller also gets its tail to classify the failure.
|
|
58
|
+
...(captureStderr ? { stdio: ["inherit", "inherit", "pipe"] } : {}),
|
|
52
59
|
})
|
|
60
|
+
let stderr = ""
|
|
61
|
+
if (captureStderr) {
|
|
62
|
+
// The decoder keeps a multi-byte character split across chunks whole; the echo stays raw bytes.
|
|
63
|
+
const decoder = new StringDecoder("utf8")
|
|
64
|
+
child.stderr.on("data", (chunk) => {
|
|
65
|
+
process.stderr.write(chunk)
|
|
66
|
+
stderr = (stderr + decoder.write(chunk)).slice(-STDERR_TAIL_CHARS)
|
|
67
|
+
})
|
|
68
|
+
}
|
|
53
69
|
|
|
54
70
|
let settled = false
|
|
55
71
|
let graceTimer
|
|
@@ -98,7 +114,25 @@ export function runChild(command, args, options = {}) {
|
|
|
98
114
|
child.on("error", (error) => settle(() => reject(error)))
|
|
99
115
|
// A child that died of the forwarded signal needs no special case: `propagateResult` turns a
|
|
100
116
|
// signaled result into this process dying by the same signal, which is exactly right.
|
|
101
|
-
|
|
117
|
+
const finish = (status, signal) => settle(() => resolve(captureStderr ? { status, signal, stderr } : { status, signal }))
|
|
118
|
+
child.on("exit", (status, signal) => {
|
|
119
|
+
if (!captureStderr || child.stderr.readableEnded) {
|
|
120
|
+
finish(status, signal)
|
|
121
|
+
return
|
|
122
|
+
}
|
|
123
|
+
// The pipe usually ends right after exit. A grandchild that inherited it can hold it open, so the
|
|
124
|
+
// drain is bounded and the result never waits on a process the manager left behind.
|
|
125
|
+
const drained = () => {
|
|
126
|
+
clearTimeout(drainTimer)
|
|
127
|
+
finish(status, signal)
|
|
128
|
+
}
|
|
129
|
+
const drainTimer = setTimeout(() => {
|
|
130
|
+
child.stderr.off("end", drained)
|
|
131
|
+
child.stderr.destroy()
|
|
132
|
+
finish(status, signal)
|
|
133
|
+
}, STDERR_DRAIN_MS)
|
|
134
|
+
child.stderr.once("end", drained)
|
|
135
|
+
})
|
|
102
136
|
})
|
|
103
137
|
}
|
|
104
138
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// omo doctor: a reflection lock held by a run that cannot finish (#10377). The decision is the one the
|
|
2
|
+
// session uses (memory-core reflection/stale-holder.ts), run from its generated bundle, so the two
|
|
3
|
+
// surfaces cannot disagree. A dead holder and a stuck one are both reported with the next step;
|
|
4
|
+
// a live holder or no lock prints nothing.
|
|
5
|
+
|
|
6
|
+
import { existsSync, readdirSync } from "node:fs"
|
|
7
|
+
import { homedir } from "node:os"
|
|
8
|
+
import { basename, join, resolve } from "node:path"
|
|
9
|
+
import { classifyReflectionLockHolder } from "./reflection-lock.generated.js"
|
|
10
|
+
|
|
11
|
+
const MEMORY_ROOT_ENV_VAR = "OMO_MEMORY_HOME"
|
|
12
|
+
|
|
13
|
+
function memoryRoot(env) {
|
|
14
|
+
const override = env[MEMORY_ROOT_ENV_VAR]
|
|
15
|
+
if (override === undefined || override.trim() === "") return join(homedir(), ".omo", "memory")
|
|
16
|
+
return resolve(process.cwd(), override)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function classifyReflectionLock(reflectionDir, probe = {}) {
|
|
20
|
+
return classifyReflectionLockHolder(reflectionDir, probe)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function formatReflectionLockLines(identity, verdict, reflectionDir) {
|
|
24
|
+
if (verdict.state === "none" || verdict.state === "live") return []
|
|
25
|
+
const lock = join(reflectionDir, "active.lock")
|
|
26
|
+
if (verdict.state === "dead") {
|
|
27
|
+
return [`WARN memory reflection is stuck on a stale lock (${identity}): run ${verdict.runId} still holds ${lock}, but its launcher is gone and it already recorded its outcome. Next step: open a session and send /reflect (or any message); the session settles that run and starts any queued request.`]
|
|
28
|
+
}
|
|
29
|
+
return [`WARN memory reflection is stuck on a stale lock (${identity}): run ${verdict.runId} still holds ${lock} and ${verdict.reason}. Next step: run /doctor in a session; if no reflection run is active, move ${lock} aside (keep a backup) and start a new session.`]
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function listDurableIdentities(agentsRoot) {
|
|
33
|
+
try {
|
|
34
|
+
return readdirSync(agentsRoot, { withFileTypes: true })
|
|
35
|
+
.filter((entry) => entry.isDirectory() && !entry.name.startsWith("."))
|
|
36
|
+
.map((entry) => join(agentsRoot, entry.name))
|
|
37
|
+
.filter((identityRoot) => existsSync(join(identityRoot, "repo")))
|
|
38
|
+
} catch {
|
|
39
|
+
return []
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export async function reflectionLockReport(options = {}) {
|
|
44
|
+
const agentsRoot = join(memoryRoot(options.env ?? process.env), "agents")
|
|
45
|
+
const lines = []
|
|
46
|
+
for (const identityRoot of options.listIdentities?.(agentsRoot) ?? listDurableIdentities(agentsRoot)) {
|
|
47
|
+
const reflectionDir = join(identityRoot, "runtime", "reflection")
|
|
48
|
+
const verdict = await classifyReflectionLock(reflectionDir, options.reflectionLockProbe ?? {})
|
|
49
|
+
lines.push(...formatReflectionLockLines(basename(identityRoot), verdict, reflectionDir))
|
|
50
|
+
}
|
|
51
|
+
return lines
|
|
52
|
+
}
|
package/bin/lib/doctor.js
CHANGED
|
@@ -423,12 +423,12 @@ export function runDoctor(inventory, args = [], options = {}) {
|
|
|
423
423
|
lines.push(...staleEngineReport(options))
|
|
424
424
|
lines.push(...retiredPayloadReport(options))
|
|
425
425
|
lines.push(...transientMemoryReport(options))
|
|
426
|
+
lines.push(...(options.reflectionLock ?? []))
|
|
426
427
|
const launchSpec = launchSpecDoctorLines(options.pluginRoot ?? join(packageRoot, "plugin"), options.launchSpecIo)
|
|
427
428
|
if (launchSpec.some((line) => line.startsWith("FAIL "))) failed = true
|
|
428
429
|
lines.push(...launchSpec)
|
|
429
|
-
lines.push(...daemonReport(options), ...(options.computerUse ?? []), ...(options.categoryCoverage ?? [])
|
|
430
|
+
lines.push(...daemonReport(options), ...(options.computerUse ?? []), ...(options.categoryCoverage ?? []))
|
|
430
431
|
if ((options.computerUse ?? []).some((line) => line.startsWith("FAIL "))) failed = true
|
|
431
|
-
if ((options.dori ?? []).some((line) => line.startsWith("FAIL "))) failed = true
|
|
432
432
|
if (needsSetupSuggestion(inventory)) {
|
|
433
433
|
lines.push("INFO no credentials found; run omo setup to review sibling stores")
|
|
434
434
|
}
|
package/bin/lib/launcher.js
CHANGED
|
@@ -11,6 +11,7 @@ import { runDaemonCommand } from "./daemon.js"
|
|
|
11
11
|
import { runThreadCommand } from "./thread.js"
|
|
12
12
|
import { isHostStatusAll, runHostStatusAll, sessionActivityReader } from "./host-status.js"
|
|
13
13
|
import { runDoctor } from "./doctor.js"
|
|
14
|
+
import { reflectionLockReport } from "./doctor-reflection-lock.js"
|
|
14
15
|
import { ensureEnginePrepared, preparePluginLaunchSpec } from "./engine-prepare.js"
|
|
15
16
|
import { migrateLegacyBunGlobalManifest } from "./legacy-bun-global-migration.js"
|
|
16
17
|
import { removeLegacyServiceCredentials } from "./legacy-service-credentials.js"
|
|
@@ -184,29 +185,23 @@ export async function runLauncher(args = process.argv.slice(2)) {
|
|
|
184
185
|
process.exitCode = await runDoctorModels(args.slice(2), { agentDir: canonicalAgentDir() })
|
|
185
186
|
return
|
|
186
187
|
}
|
|
187
|
-
const [categoryCoverage, computerUse, configDiagnostics,
|
|
188
|
+
const [categoryCoverage, computerUse, configDiagnostics, reflectionLock] = args[1] === "--reap"
|
|
188
189
|
? [[], [], [], []]
|
|
189
190
|
: await Promise.all([
|
|
190
191
|
doctorCoverageLines({ agentDir: canonicalAgentDir() }),
|
|
191
192
|
doctorComputerUseLines(),
|
|
192
193
|
doctorConfigLines(),
|
|
193
|
-
|
|
194
|
+
reflectionLockReport(),
|
|
194
195
|
])
|
|
195
196
|
runDoctor(await detectHarnesses(), args.slice(1), {
|
|
196
197
|
daemonEngine: { run: engineHostCall },
|
|
197
198
|
categoryCoverage,
|
|
198
199
|
computerUse,
|
|
199
200
|
configDiagnostics,
|
|
200
|
-
|
|
201
|
+
reflectionLock,
|
|
201
202
|
})
|
|
202
203
|
return
|
|
203
204
|
}
|
|
204
|
-
if (command === "dori" || command === "gateway") {
|
|
205
|
-
if (command === "gateway") process.stderr.write("omo gateway is deprecated; use omo dori instead\n")
|
|
206
|
-
const { runDoriCommand } = await import("./dori.js")
|
|
207
|
-
process.exitCode = await runDoriCommand(args.slice(1))
|
|
208
|
-
return
|
|
209
|
-
}
|
|
210
205
|
if (command === "setup") {
|
|
211
206
|
printSetupReport(await detectHarnesses())
|
|
212
207
|
process.exitCode = 0
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// Generated by bun script/build-reflection-lock.ts; do not edit.
|
|
2
|
+
import{hostname as readHostname}from"node:os";import{join}from"node:path";import*as fsSync from"node:fs";import*as fsp from"node:fs/promises";function fsErrorCode(error){if(!(error instanceof Error)||!("code"in error))return;return typeof error.code==="string"?error.code:void 0}async function retryOnEintr(operation){for(let attempt=0;;attempt+=1)try{return await operation()}catch(error){if(fsErrorCode(error)!=="EINTR"||attempt>=128)throw error}}function retryOnEintrSync(operation){for(let attempt=0;;attempt+=1)try{return operation()}catch(error){if(fsErrorCode(error)!=="EINTR"||attempt>=128)throw error}}function isFunction(value){return typeof value==="function"}function withAsyncRetry(operation){return(...args)=>retryOnEintr(async()=>operation(...args))}function withSyncRetry(operation){return(...args)=>retryOnEintrSync(()=>operation(...args))}function resilientNamespace(namespace,kind){let wrapFunction=kind==="async"?withAsyncRetry:withSyncRetry,cache=new Map;return new Proxy(namespace,{get(target,property){if(cache.has(property))return cache.get(property);let value=Reflect.get(target,property);if(!isFunction(value))return value;let wrapped=wrapFunction(value),native=Reflect.get(value,"native");if(isFunction(native))Object.assign(wrapped,{native:wrapFunction(native)});return cache.set(property,wrapped),wrapped}})}var promises=resilientNamespace(fsp,"async");var sync=resilientNamespace(fsSync,"sync"),{access,chmod,copyFile,cp,link,lstat,mkdir,mkdtemp,readFile,readdir,readlink,realpath,rm,rmdir,stat,statfs,unlink}=promises,{accessSync,chmodSync,fsyncSync,linkSync,lstatSync,mkdirSync,readFileSync,readdirSync,realpathSync,statSync:statSync2,unlinkSync,writeFileSync,writeSync}=sync;import{execFile}from"node:child_process";var procPidInfoLookup=null;async function openProcPidInfo(){if(process.platform!=="darwin")return null;try{let{dlopen,FFIType}=await import("bun:ffi"),library=dlopen("/usr/lib/libSystem.B.dylib",{proc_pidinfo:{args:[FFIType.i32,FFIType.i32,FFIType.u64,FFIType.ptr,FFIType.i32],returns:FFIType.i32}});return(pid,flavor,arg,buffer,size)=>Number(library.symbols.proc_pidinfo(pid,flavor,arg,buffer,size))}catch{return null}}function loadProcPidInfo(){return procPidInfoLookup??=openProcPidInfo(),procPidInfoLookup}async function readDarwinProcessStartSeconds(pid){if(process.platform!=="darwin")return null;if(!Number.isSafeInteger(pid)||pid<=0)return null;let procPidInfo=await loadProcPidInfo();if(procPidInfo===null)return null;let buffer=new Uint8Array(136),written=0;try{written=procPidInfo(pid,3,0n,buffer,136)}catch{return null}if(written!==136)return null;let view=new DataView(buffer.buffer,buffer.byteOffset,buffer.byteLength),startSeconds=Number(view.getBigUint64(120,!0));return startSeconds>0?startSeconds:null}var PROCESS_QUERY_LIMITED_INFORMATION=4096,kernel32Lookup=null;async function openKernel32(){if(process.platform!=="win32")return null;try{let{dlopen,FFIType}=await import("bun:ffi");return dlopen("kernel32.dll",{OpenProcess:{args:[FFIType.u32,FFIType.i32,FFIType.u32],returns:FFIType.ptr},GetProcessTimes:{args:[FFIType.ptr,FFIType.ptr,FFIType.ptr,FFIType.ptr,FFIType.ptr],returns:FFIType.i32},CloseHandle:{args:[FFIType.ptr],returns:FFIType.i32}}).symbols}catch{return null}}async function readWin32ProcessCreationFiletime(pid){if(process.platform!=="win32")return null;if(!Number.isSafeInteger(pid)||pid<=0)return null;kernel32Lookup??=openKernel32();let kernel32=await kernel32Lookup;if(kernel32===null)return null;let handle=kernel32.OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION,0,pid);if(handle===null||handle===0||handle===0n)return null;try{let creation=new BigUint64Array(1),ok=kernel32.GetProcessTimes(handle,creation,new BigUint64Array(1),new BigUint64Array(1),new BigUint64Array(1)),filetime=creation[0]??0n;return ok===0||filetime===0n?null:filetime}finally{kernel32.CloseHandle(handle)}}function errorCode(error){if(!(error instanceof Error)||!("code"in error))return;return typeof error.code==="string"?error.code:void 0}async function execFileText(command,args){return await new Promise((resolve)=>{execFile(command,args,{encoding:"utf8",timeout:2000,windowsHide:!0},(error,stdout)=>{if(error!==null){resolve(null);return}let value=stdout.trim();resolve(value.length>0?value:null)})})}async function readLinuxStartIdentity(pid){try{let stat=await readFile(`/proc/${pid}/stat`,"utf8"),commandEnd=stat.lastIndexOf(")");if(commandEnd<0)return null;let startTicks=stat.slice(commandEnd+2).trim().split(/\s+/)[19];return startTicks===void 0?null:`linux-proc-start-ticks:${startTicks}`}catch{return null}}async function readWin32StartIdentity(pid){if(getPidLiveness(pid)==="dead")return null;let creationFiletime=await readWin32ProcessCreationFiletime(pid);if(creationFiletime!==null)return`win32-creation-filetime:${creationFiletime}`;let value=await execFileText("powershell.exe",["-NoProfile","-Command",`(Get-Process -Id ${pid} -ErrorAction SilentlyContinue).StartTime.ToUniversalTime().ToString('o')`]);return value===null?null:`win32-creation-date:${value}`}function createProcessStartIdentityReader(read,ownPid){let ownIdentity;return(pid)=>{if(pid!==ownPid)return read(pid);return ownIdentity??=read(pid).then((identity)=>{if(identity===null)ownIdentity=void 0;return identity},(error)=>{throw ownIdentity=void 0,error}),ownIdentity}}var getProcessStartIdentity=createProcessStartIdentityReader(readProcessStartIdentity,process.pid);async function readProcessStartIdentity(pid){if(process.platform==="linux")return await readLinuxStartIdentity(pid);if(process.platform==="darwin"||process.platform==="freebsd"){if(getPidLiveness(pid)==="dead")return null;let startSeconds=await readDarwinProcessStartSeconds(pid);if(startSeconds!==null)return`proc-start-epoch:${startSeconds}`;let value=await execFileText("/bin/ps",["-o","lstart=","-p",String(pid)]);return value===null?null:`ps-lstart:${value.replace(/\s+/g," ")}`}if(process.platform==="win32")return await readWin32StartIdentity(pid);return null}function identityScheme(identity){let separator=identity.indexOf(":");return separator<=0?null:identity.slice(0,separator)}function startIdentitiesComparable(recorded,actual){return identityScheme(recorded)===identityScheme(actual)}function getPidLiveness(pid){try{return process.kill(pid,0),"alive"}catch(error){let code=errorCode(error);if(code==="ESRCH")return"dead";if(code==="EPERM")return"alive";return"unknown"}}function errorCode2(error){return error instanceof Error&&"code"in error&&typeof error.code==="string"?error.code:"unknown error"}async function readJson(path,readText){let text;try{text=await readText(path)}catch(error){let code=errorCode2(error);return code==="ENOENT"?{kind:"missing"}:{kind:"unreadable",code}}try{return{kind:"ok",value:JSON.parse(text)}}catch{return{kind:"invalid"}}}function fieldsOf(value){return typeof value==="object"&&value!==null?value:{}}function isRunOutcome(value,runId){let fields=fieldsOf(value),childExit=fieldsOf(fields.childExit);return fields.version===1&&fields.runId===runId&&typeof fields.finishedAt==="string"&&(fields.attempt===void 0||typeof fields.attempt==="number"&&Number.isInteger(fields.attempt)&&fields.attempt>0)&&typeof fields.childExit==="object"&&fields.childExit!==null&&(childExit.code===null||typeof childExit.code==="number")&&(childExit.signal===null||typeof childExit.signal==="string")&&typeof fields.timedOut==="boolean"}function stuck(runId,reason){return{state:"stuck",runId,reason}}async function launcherLiveness(pid,recordedStart,probe){let liveness=(probe.getPidLiveness??getPidLiveness)(pid);if(liveness!=="alive"||typeof recordedStart!=="string")return liveness;let actualStart=await(probe.getProcessStartIdentity??getProcessStartIdentity)(pid).catch(()=>null);if(actualStart!==null&&startIdentitiesComparable(recordedStart,actualStart)&&recordedStart!==actualStart)return"dead";return"alive"}async function classifyReflectionLockHolder(reflectionDir,probe={}){let readText=probe.readText??((path)=>readFile(path,"utf8")),active=await readJson(join(reflectionDir,"active.lock"),readText);if(active.kind==="missing")return{state:"none"};if(active.kind==="unreadable")return stuck("unknown",`active.lock could not be read (${active.code})`);if(active.kind==="invalid")return stuck("unknown","active.lock is not valid JSON");let fields=fieldsOf(active.value),runId=typeof fields.runId==="string"?fields.runId:"unknown",launcherPid=typeof fields.launcherPid==="number"?fields.launcherPid:void 0,launcherHostname=typeof fields.launcherHostname==="string"?fields.launcherHostname:void 0;if(launcherPid===void 0||launcherHostname===void 0)return stuck(runId,"its launcher identity is missing");if(launcherHostname!==(probe.hostname??readHostname)())return stuck(runId,`it is owned by host ${launcherHostname}, which cannot be checked from here`);let launcher=await launcherLiveness(launcherPid,fields.launcherProcessStart,probe);if(launcher==="alive")return{state:"live",runId};if(launcher==="unknown")return stuck(runId,`launcher pid ${launcherPid} could not be checked`);let runDir=join(reflectionDir,"runs",runId),outcome=await readJson(join(runDir,"outcome.json"),readText);if(outcome.kind==="missing")return stuck(runId,`launcher pid ${launcherPid} is gone and the run recorded no outcome`);if(outcome.kind==="unreadable")return stuck(runId,`its outcome could not be read (${outcome.code})`);if(outcome.kind==="invalid")return stuck(runId,"its outcome is not valid JSON");if(!isRunOutcome(outcome.value,runId))return stuck(runId,"its outcome is not a recorded run outcome");let claim=await readJson(join(runDir,"terminal-claim.json"),readText);if(claim.kind==="unreadable")return stuck(runId,`its terminal claim could not be read (${claim.code})`);if(claim.kind==="invalid")return stuck(runId,"its terminal claim is not valid JSON");if(claim.kind==="ok"){let claimantPid=fieldsOf(claim.value).claimantPid;if(typeof claimantPid!=="number")return stuck(runId,"its terminal claim names no claimant");let claimant=(probe.getPidLiveness??getPidLiveness)(claimantPid);if(claimant==="alive")return{state:"live",runId};if(claimant==="unknown")return stuck(runId,`publish claimant pid ${claimantPid} could not be checked`)}return{state:"dead",runId}}export{classifyReflectionLockHolder};
|
package/bin/lib/self-update.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { join } from "node:path"
|
|
1
|
+
import { dirname, join } from "node:path"
|
|
2
2
|
import { runChild } from "./child-process.js"
|
|
3
3
|
import { fetchNpmDistTagsSync } from "./npm-dist-tags.js"
|
|
4
|
-
import { channelDistTagVersion, channelPackageSpec, packageManifest, readJson, releaseChannel, resolveSenpi, updateTarget } from "./package-paths.js"
|
|
4
|
+
import { channelDistTagVersion, channelPackageSpec, packageManifest, packageRoot, readJson, releaseChannel, resolveSenpi, updateTarget } from "./package-paths.js"
|
|
5
5
|
import { isPrintOnlyUpdate, updateUsageAnswer } from "./update-args.js"
|
|
6
|
+
import { findHolders, heldTarget, isLockFailure, listWindowsProcesses, LOCK_RETRY_DELAYS_MS } from "./update-lock.js"
|
|
6
7
|
|
|
7
8
|
export { isPrintOnlyUpdate }
|
|
8
9
|
|
|
@@ -34,9 +35,14 @@ export function formatVersionChange(before, after) {
|
|
|
34
35
|
* prove the install moved (#9198). An unreachable registry falls back to the unpinned channel spec.
|
|
35
36
|
* `run` defaults to `runChild` so tests inject a spawn without touching the child-process helper.
|
|
36
37
|
*
|
|
38
|
+
* On Windows a manager failure whose stderr says a file is held (EPERM/EBUSY, #10090) is retried with
|
|
39
|
+
* backoff. If the file stays held, the report names the file, the processes of this install that hold it
|
|
40
|
+
* and one action, and only an install that can no longer be read is reinstalled at the previous version; any readable version is kept.
|
|
41
|
+
*
|
|
37
42
|
* @typedef {{ omo: string, engine: string }} InstalledVersion
|
|
38
|
-
* @typedef {{ status: number | null, signal: string | null }} ChildResult
|
|
39
|
-
* @typedef {{ stdio?: "inherit", windowsHide?: boolean, env?: NodeJS.ProcessEnv }} RunOptions
|
|
43
|
+
* @typedef {{ status: number | null, signal: string | null, stderr?: string }} ChildResult
|
|
44
|
+
* @typedef {{ stdio?: "inherit", windowsHide?: boolean, env?: NodeJS.ProcessEnv, captureStderr?: boolean }} RunOptions
|
|
45
|
+
* @typedef {import("./update-lock.js").ProcessEntry} ProcessEntry
|
|
40
46
|
* @typedef {{ manager: string, command: string, argv: string[], env?: Record<string, string> }} UpdateTarget
|
|
41
47
|
* @typedef {{
|
|
42
48
|
* resolveUpdate?: (targetVersion?: string) => UpdateTarget,
|
|
@@ -46,6 +52,11 @@ export function formatVersionChange(before, after) {
|
|
|
46
52
|
* run?: (command: string, args: string[], options?: RunOptions) => Promise<ChildResult>,
|
|
47
53
|
* readInstalled?: () => InstalledVersion,
|
|
48
54
|
* env?: NodeJS.ProcessEnv,
|
|
55
|
+
* platform?: NodeJS.Platform,
|
|
56
|
+
* sleep?: (ms: number) => Promise<void>,
|
|
57
|
+
* listProcesses?: () => ProcessEntry[],
|
|
58
|
+
* installDir?: string,
|
|
59
|
+
* selfPids?: number[],
|
|
49
60
|
* }} SelfUpdateOptions
|
|
50
61
|
* @param {string[]} args
|
|
51
62
|
* @param {SelfUpdateOptions} [options]
|
|
@@ -60,6 +71,8 @@ export async function runSelfUpdate(args, options = {}) {
|
|
|
60
71
|
const run = options.run ?? runChild
|
|
61
72
|
const readInstalled = options.readInstalled ?? readInstalledVersion
|
|
62
73
|
const env = options.env ?? process.env
|
|
74
|
+
const platform = options.platform ?? process.platform
|
|
75
|
+
const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)))
|
|
63
76
|
|
|
64
77
|
const usage = updateUsageAnswer(args)
|
|
65
78
|
if (usage !== undefined) {
|
|
@@ -85,20 +98,37 @@ export async function runSelfUpdate(args, options = {}) {
|
|
|
85
98
|
}
|
|
86
99
|
log(formatUpdateCommand(update))
|
|
87
100
|
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
result = await run(command, argv, {
|
|
101
|
+
const install = async (target) => {
|
|
102
|
+
const [command, ...argv] = target.argv
|
|
103
|
+
return run(command, argv, {
|
|
92
104
|
stdio: "inherit",
|
|
93
105
|
windowsHide: true,
|
|
94
|
-
env: { ...env, ...
|
|
106
|
+
env: { ...env, ...target.env },
|
|
107
|
+
captureStderr: platform === "win32",
|
|
95
108
|
})
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
109
|
+
}
|
|
110
|
+
const failed = (result) => Boolean(result.signal) || (result.status ?? 1) !== 0
|
|
111
|
+
const heldOnWindows = (result) => platform === "win32" && !result.signal && isLockFailure(result.stderr)
|
|
112
|
+
|
|
113
|
+
let result
|
|
114
|
+
for (let attempt = 0; ; attempt += 1) {
|
|
115
|
+
try {
|
|
116
|
+
result = await install(update)
|
|
117
|
+
} catch {
|
|
118
|
+
error(`omo: update failed; retry with: ${update.command}`)
|
|
119
|
+
return 1
|
|
120
|
+
}
|
|
121
|
+
if (!failed(result) || !heldOnWindows(result) || attempt >= LOCK_RETRY_DELAYS_MS.length) break
|
|
122
|
+
const delay = LOCK_RETRY_DELAYS_MS[attempt]
|
|
123
|
+
log(`omo: ${heldTarget(result.stderr) ?? "a package file"} is held by another process; retrying in ${delay / 1000}s (attempt ${attempt + 2} of ${LOCK_RETRY_DELAYS_MS.length + 1})`)
|
|
124
|
+
await sleep(delay)
|
|
99
125
|
}
|
|
100
126
|
|
|
101
|
-
if (result
|
|
127
|
+
if (failed(result) && heldOnWindows(result)) {
|
|
128
|
+
await reportHeldInstall({ result, before, install, resolveUpdate, readInstalled, error, options, attempts: LOCK_RETRY_DELAYS_MS.length + 1 })
|
|
129
|
+
return 1
|
|
130
|
+
}
|
|
131
|
+
if (failed(result)) {
|
|
102
132
|
error(`omo: update failed; retry with: ${update.command}`)
|
|
103
133
|
return result.status ?? 1
|
|
104
134
|
}
|
|
@@ -112,3 +142,56 @@ export async function runSelfUpdate(args, options = {}) {
|
|
|
112
142
|
log(formatVersionChange(before, after))
|
|
113
143
|
return 0
|
|
114
144
|
}
|
|
145
|
+
|
|
146
|
+
function readInstalledOrUndefined(readInstalled) {
|
|
147
|
+
try {
|
|
148
|
+
return readInstalled()
|
|
149
|
+
} catch {
|
|
150
|
+
return undefined
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
async function reportHeldInstall({ result, before, install, resolveUpdate, readInstalled, error, options, attempts }) {
|
|
155
|
+
const held = heldTarget(result.stderr)
|
|
156
|
+
const file = held ?? "a package file"
|
|
157
|
+
const listProcesses = options.listProcesses ?? listWindowsProcesses
|
|
158
|
+
const installDir = options.installDir ?? dirname(packageRoot)
|
|
159
|
+
const selfPids = options.selfPids ?? [process.pid, process.ppid]
|
|
160
|
+
const holders = findHolders(installDir, listProcesses(), selfPids, held)
|
|
161
|
+
|
|
162
|
+
error(`omo: update stopped: Windows would not let the package manager replace ${file}; it was still held after ${attempts} attempts.`)
|
|
163
|
+
if (holders.length > 0) {
|
|
164
|
+
error(`omo: held by ${holders.map((holder) => `${holder.name} (pid ${holder.pid})`).join(", ")}`)
|
|
165
|
+
const names = [...new Set(holders.map((holder) => holder.name))].join(", ")
|
|
166
|
+
error(`omo: Quit ${names} and run omo update again.`)
|
|
167
|
+
} else {
|
|
168
|
+
error("omo: No omo command-line process was found holding it. Another app (for example the OmO desktop app or an editor) or antivirus may be holding it: close it, or wait a minute, then run omo update again.")
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const now = readInstalledOrUndefined(readInstalled)
|
|
172
|
+
if (now?.omo === before.omo) {
|
|
173
|
+
error(`omo: omo ${before.omo} is still installed.`)
|
|
174
|
+
return
|
|
175
|
+
}
|
|
176
|
+
// Any readable omo is a working install, even when the pinned target is unknown (registry down): the
|
|
177
|
+
// manager can fail moving an old dependency after the new omo-ai is in place, and reinstalling over it
|
|
178
|
+
// would undo a working update and hit the same held file. Only an unreadable install is restored.
|
|
179
|
+
if (now !== undefined) {
|
|
180
|
+
error(`omo: omo ${now.omo} is installed, but the package manager did not finish; run omo update again afterwards to complete it.`)
|
|
181
|
+
return
|
|
182
|
+
}
|
|
183
|
+
const previous = resolveUpdate(before.omo)
|
|
184
|
+
let restored
|
|
185
|
+
try {
|
|
186
|
+
restored = await install(previous)
|
|
187
|
+
} catch {
|
|
188
|
+
restored = { status: 1, signal: null }
|
|
189
|
+
}
|
|
190
|
+
const after = readInstalledOrUndefined(readInstalled)
|
|
191
|
+
if ((restored.status ?? 1) === 0 && !restored.signal && after?.omo === before.omo) {
|
|
192
|
+
error(`omo: restored omo ${before.omo}.`)
|
|
193
|
+
return
|
|
194
|
+
}
|
|
195
|
+
const when = holders.length > 0 ? "after quitting the holder" : "once the file is released"
|
|
196
|
+
error(`omo: the previous omo ${before.omo} could not be restored; ${when}, run: ${previous.command}`)
|
|
197
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process"
|
|
2
|
+
|
|
3
|
+
// Bun reports a file Windows will not let it move or replace as EPERM/EBUSY (NtSetInformationFile).
|
|
4
|
+
// EACCES is left out: on Windows it is a permission problem (a protected prefix), which no retry fixes.
|
|
5
|
+
const LOCK_PATTERN = /\b(EPERM|EBUSY)\b|NtSetInformationFile|being used by another process/i
|
|
6
|
+
// A bare EPERM is also npm's spelling of a real permission failure (mkdir under a protected prefix), so it
|
|
7
|
+
// only counts as a lock when the failing call moved or deleted an existing file.
|
|
8
|
+
const CERTAIN_LOCK = /NtSetInformationFile|\bEBUSY\b|being used by another process/i
|
|
9
|
+
const MOVE_OR_DELETE_SYSCALL = /\bsyscall:? '?(rename|unlink|rmdir)\b|\b(rename|unlink|rmdir) '/i
|
|
10
|
+
const NPM_PATH_LINE = /^npm (?:error|ERR!) path (.+)$/
|
|
11
|
+
|
|
12
|
+
/** Backoff between attempts while the file is held; the lock is usually a short antivirus scan. */
|
|
13
|
+
export const LOCK_RETRY_DELAYS_MS = [2000, 5000]
|
|
14
|
+
|
|
15
|
+
/** @param {string | undefined} stderr */
|
|
16
|
+
export function isLockFailure(stderr) {
|
|
17
|
+
if (typeof stderr !== "string") return false
|
|
18
|
+
if (CERTAIN_LOCK.test(stderr)) return true
|
|
19
|
+
return /\bEPERM\b/.test(stderr) && MOVE_OR_DELETE_SYSCALL.test(stderr)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The quoted package or path Bun names on the failing line (or the line before it), if any.
|
|
24
|
+
* @param {string | undefined} stderr
|
|
25
|
+
*/
|
|
26
|
+
export function heldTarget(stderr) {
|
|
27
|
+
if (typeof stderr !== "string") return undefined
|
|
28
|
+
const lines = stderr.split(/\r?\n/)
|
|
29
|
+
for (let index = lines.length - 1; index >= 0; index -= 1) {
|
|
30
|
+
if (!LOCK_PATTERN.test(lines[index])) continue
|
|
31
|
+
for (const line of [lines[index], lines[index - 1] ?? ""]) {
|
|
32
|
+
const quoted = /"([^"]+)"|'([^']+)'/.exec(line)
|
|
33
|
+
if (quoted) return quoted[1] ?? quoted[2]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
// npm names the file on its own unquoted `npm error path <path>` line.
|
|
37
|
+
for (const line of lines) {
|
|
38
|
+
const npmPath = NPM_PATH_LINE.exec(line.trim())
|
|
39
|
+
if (npmPath) return npmPath[1].trim()
|
|
40
|
+
}
|
|
41
|
+
return undefined
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @typedef {{ pid: number, name: string, commandLine?: string | null, executablePath?: string | null }} ProcessEntry
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
function normalizePath(path) {
|
|
49
|
+
return path.replaceAll("/", "\\").replace(/\\+$/, "").toLowerCase()
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// The packages omo runs processes from: the launcher and its pinned senpi engine.
|
|
53
|
+
const OMO_PACKAGES = ["omo-ai", "@code-yeongyu"]
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Processes running from, or started with a path inside, omo's own packages or the held package in the
|
|
57
|
+
* global `node_modules`, minus this update's own processes. Other global CLIs share that directory but
|
|
58
|
+
* cannot hold these files, so they are not reported; anything outside it (an antivirus scan) is invisible.
|
|
59
|
+
* @param {string} installDir the global `node_modules` omo is installed in
|
|
60
|
+
* @param {readonly ProcessEntry[]} processes
|
|
61
|
+
* @param {readonly number[]} excludePids
|
|
62
|
+
* @param {string | undefined} held the package or path the manager reported as held
|
|
63
|
+
*/
|
|
64
|
+
export function findHolders(installDir, processes, excludePids, held = undefined) {
|
|
65
|
+
const root = normalizePath(installDir)
|
|
66
|
+
const needles = OMO_PACKAGES.map((name) => `${root}\\${normalizePath(name)}\\`)
|
|
67
|
+
let heldPath
|
|
68
|
+
if (held !== undefined) {
|
|
69
|
+
const target = normalizePath(held)
|
|
70
|
+
heldPath = /^[a-z]:\\|^\\\\/.test(target) ? target : `${root}\\${target}`
|
|
71
|
+
needles.push(`${heldPath}\\`)
|
|
72
|
+
}
|
|
73
|
+
return processes.filter((entry) => {
|
|
74
|
+
if (excludePids.includes(entry.pid)) return false
|
|
75
|
+
// npm can name the held file itself; the process running exactly that executable holds it.
|
|
76
|
+
if (heldPath !== undefined && typeof entry.executablePath === "string" && normalizePath(entry.executablePath) === heldPath) return true
|
|
77
|
+
return [entry.executablePath, entry.commandLine].some((value) => {
|
|
78
|
+
if (typeof value !== "string") return false
|
|
79
|
+
const path = normalizePath(value)
|
|
80
|
+
return needles.some((needle) => path.includes(needle))
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Every process on this Windows machine with its path and command line, through CIM. Fail-open: a host
|
|
87
|
+
* where the query cannot run reports no holders rather than failing the update report.
|
|
88
|
+
* @returns {ProcessEntry[]}
|
|
89
|
+
*/
|
|
90
|
+
export function listWindowsProcesses() {
|
|
91
|
+
try {
|
|
92
|
+
const output = execFileSync(
|
|
93
|
+
"powershell.exe",
|
|
94
|
+
[
|
|
95
|
+
"-NoProfile",
|
|
96
|
+
"-NonInteractive",
|
|
97
|
+
"-Command",
|
|
98
|
+
"Get-CimInstance Win32_Process | Select-Object ProcessId,Name,ExecutablePath,CommandLine | ConvertTo-Json -Compress",
|
|
99
|
+
],
|
|
100
|
+
{ encoding: "utf8", windowsHide: true, timeout: 15_000, maxBuffer: 32 * 1024 * 1024, stdio: ["ignore", "pipe", "ignore"] },
|
|
101
|
+
)
|
|
102
|
+
const parsed = JSON.parse(output)
|
|
103
|
+
const rows = Array.isArray(parsed) ? parsed : [parsed]
|
|
104
|
+
return rows.map((row) => ({
|
|
105
|
+
pid: Number(row.ProcessId),
|
|
106
|
+
name: String(row.Name ?? ""),
|
|
107
|
+
executablePath: row.ExecutablePath ?? null,
|
|
108
|
+
commandLine: row.CommandLine ?? null,
|
|
109
|
+
}))
|
|
110
|
+
} catch {
|
|
111
|
+
return []
|
|
112
|
+
}
|
|
113
|
+
}
|
package/package.json
CHANGED
package/plugin/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [5.1.46] - 2026-10-24
|
|
11
|
+
|
|
12
|
+
**OmO Native init-deep committed mode no longer dead-ends.** Committed mode now finishes through its own pull-request handoff instead of pointing at a skill that does not ship with OmO Native, and it reports how to finish by hand when no PR can be opened. Thanks to @HolisticDeveloper for the report and @surlymochan for the fix. ([#11228](https://github.com/code-yeongyu/oh-my-openagent/pull/11228), fixes [#9686](https://github.com/code-yeongyu/oh-my-openagent/issues/9686))
|
|
13
|
+
|
|
14
|
+
**The stale-reflection-lock test leaves no background writer behind when removing its temporary root.** Its teardown closes the memory wiring and awaits facts reconciliation and maintenance before removal, so a late lock publication cannot recreate the directory and make the temp-leak guard blame another test. ([#11225](https://github.com/code-yeongyu/oh-my-openagent/pull/11225))
|
|
15
|
+
|
|
16
|
+
**ulw-research ships a Markdown block model for checking Markdown and post deliverables.** It splits a Markdown report into headings, paragraphs, list items, table rows, code blocks and quotes with exact text offsets, and sorts sections with the same classifier as the HTML checks; an unclosed code fence is reported instead of passing silently, and no check uses it yet. The HTML checks now also treat a section headed exactly "Closing" as the closing section. ([#11153](https://github.com/code-yeongyu/oh-my-openagent/pull/11153), part of [#11009](https://github.com/code-yeongyu/oh-my-openagent/issues/11009))
|
|
17
|
+
|
|
18
|
+
**ulw-research ships checked polish edits and a polish diff for research reports.** Polish changes text nodes only: tags, every attribute, comments, and script/style/template content stay byte-identical, including attribute order and quoting. `polish-apply` rejects markup changes and edits that change a fact, number, unit, ticker, or required hedge, and checks cumulative edits against the original report; `polish-diff` applies the same rules to the whole report. An edit may not contain `<`, `>` or `&`, and may not touch a character reference even without them; both gates also compare the whole-document skeleton (every markup token and every character reference, byte for byte), so entities and markup are left untouched. Both gates refuse documents with markup the checker cannot model exactly. Markup changes require the full fidelity gates. Severities come from the defect registry. Nothing in the CLI calls them yet. ([#11152](https://github.com/code-yeongyu/oh-my-openagent/pull/11152), part of [#11009](https://github.com/code-yeongyu/oh-my-openagent/issues/11009))
|
|
19
|
+
|
|
20
|
+
**Re-extracting a conversation no longer counts the same agreement correction again.** Corrections are bound to validated user turns and recorded atomically with their replay receipts. Distinct turns on the same date still count separately; acknowledgement, drop and eviction retain replay history. Pending records from older versions use a documented agreement/date migration. ([#11214](https://github.com/code-yeongyu/oh-my-openagent/pull/11214), fixes [#11191](https://github.com/code-yeongyu/oh-my-openagent/issues/11191))
|
|
21
|
+
|
|
22
|
+
**The LSP MCP server negotiates supported protocol versions.** It preserves supported client versions and answers unsupported or missing versions with `2025-06-18`, rather than claiming an arbitrary protocol revision. ([#11208](https://github.com/code-yeongyu/oh-my-openagent/pull/11208))
|
|
23
|
+
|
|
24
|
+
**Skill MCP tool errors are reported as errors.** Structured output and result metadata reach the caller, tool failures are not retried as connection failures, and plain content keeps its existing output format. ([#11207](https://github.com/code-yeongyu/oh-my-openagent/pull/11207))
|
|
25
|
+
|
|
26
|
+
**The repository now has a security policy.** `SECURITY.md` explains how to report a vulnerability privately through GitHub's Security tab, what to include, and when to expect triage and an acknowledgement; `CONTRIBUTING.md` links to it. Adapted from the policy proposed by @marklapointe in [#10752](https://github.com/code-yeongyu/oh-my-openagent/pull/10752). ([#11221](https://github.com/code-yeongyu/oh-my-openagent/pull/11221))
|
|
27
|
+
|
|
28
|
+
**ulw-research can check that a report's sentences keep the meaning of their sources.** It pairs each report sentence with the quote, claim or original text it rests on, and records drift only when two independent readers name the same kind of change; a single reader's flag is kept as a minor warning. A pair no reader judged, or a pair that needs the strong reader and only got the cheap one, is reported as unverified instead of passing as clean. Nothing in the CLI runs it yet. ([#11151](https://github.com/code-yeongyu/oh-my-openagent/pull/11151), part of [#11009](https://github.com/code-yeongyu/oh-my-openagent/issues/11009))
|
|
29
|
+
|
|
30
|
+
**Skill MCP catalogs include every page.** Tools, resources, and prompts follow opaque pagination cursors in order, with a clear error if a server exceeds 100 pages. ([#11204](https://github.com/code-yeongyu/oh-my-openagent/pull/11204))
|
|
31
|
+
|
|
32
|
+
**`omo update` on Windows survives a package file that another process holds.** When `bun add -g` fails with `EPERM` (`NtSetInformationFile`) because a file of the install is in use, `omo update` retries twice with a short backoff. If the file stays held, it names the file and the omo processes holding it, tells you to quit them and run `omo update` again, and keeps whatever version is installed, reinstalling the previous one only if the failed run left an unreadable install. ([#10090](https://github.com/code-yeongyu/oh-my-openagent/issues/10090), [#11125](https://github.com/code-yeongyu/oh-my-openagent/pull/11125))
|
|
33
|
+
|
|
34
|
+
**A held abandoned test directory no longer fails a new run during preload.** Cleanup retries through the shared tree remover, skips roots still held with EBUSY, EPERM, ENOTEMPTY or EACCES, and continues with the other abandoned roots. Unrelated filesystem errors still fail the run, and Bun's panic-only retry keeps its existing test-failure checks. ([#11190](https://github.com/code-yeongyu/oh-my-openagent/pull/11190), refs [#11135](https://github.com/code-yeongyu/oh-my-openagent/issues/11135) and [#8990](https://github.com/code-yeongyu/oh-my-openagent/issues/8990))
|
|
35
|
+
|
|
36
|
+
**Usage summaries from older versions no longer stay on disk after an upgrade.** Versions 5.1.34 to 5.1.44 kept session summaries in a `rollups` folder that nothing reads or sends any more. The first start after upgrading now deletes it, whether telemetry is on or off, and never follows a link out of that folder. With telemetry turned off in `omo.json`, a summary file that was cut short by a crash is deleted too. ([#10234](https://github.com/code-yeongyu/oh-my-openagent/issues/10234)) ([#11147](https://github.com/code-yeongyu/oh-my-openagent/pull/11147)) (batch [#11168](https://github.com/code-yeongyu/oh-my-openagent/pull/11168))
|
|
37
|
+
|
|
38
|
+
**Computer-use cancellation retains engine crash diagnostics.** Cancelled and timed-out calls keep their error code and carry the engine exit diagnostic as their cause. Capability-query permission failures remain structured tool results, hard engine diagnostics survive unrelated successful replies, and legacy launch refusals now share the structured record's exit-code and UTF-8 size rules. ([#11150](https://github.com/code-yeongyu/oh-my-openagent/pull/11150)) Follow-up to [#11086](https://github.com/code-yeongyu/oh-my-openagent/pull/11086), part of [#11073](https://github.com/code-yeongyu/oh-my-openagent/issues/11073). (batch [#11168](https://github.com/code-yeongyu/oh-my-openagent/pull/11168))
|
|
39
|
+
|
|
40
|
+
**Reflection and dream children share a machine-wide FIFO concurrency cap.** The default is one running child across memory identities, configurable with `memory.reflection.max_concurrent_runs`. Queued runs retain their execution budget and remain protected from crash reconciliation until admitted. ([#11161](https://github.com/code-yeongyu/oh-my-openagent/pull/11161), fixes [#11154](https://github.com/code-yeongyu/oh-my-openagent/issues/11154)) (batch [#11168](https://github.com/code-yeongyu/oh-my-openagent/pull/11168))
|
|
41
|
+
|
|
42
|
+
**Memory reflection no longer stops for good when its host dies during a run.** If the host died after a run had finished but before it was published, `runtime/reflection/active.lock` stayed held and every later reflection request only queued behind it until someone removed the file by hand. Now `/reflect` and every later turn settle a run whose launcher and publish claimant are both gone and whose outcome was recorded, so the queued request runs. A lock whose owner can't be checked is never reclaimed; it is reported with the next step, in the session and in `omo doctor`. Thanks to @Bearmancer for the report. ([#10377](https://github.com/code-yeongyu/oh-my-openagent/issues/10377), [#10388](https://github.com/code-yeongyu/oh-my-openagent/pull/10388), [#10528](https://github.com/code-yeongyu/oh-my-openagent/pull/10528)) (batch [#11168](https://github.com/code-yeongyu/oh-my-openagent/pull/11168))
|
|
43
|
+
|
|
44
|
+
**One bad memory entry no longer discards a whole reflection run, and credential-shaped prose is not a secret.** Completion validation used to fail the entire run when any entry was refused (secret-like content, invalid frontmatter, a `description` over 1024 characters), so automatic reflection parked after a few runs. It now rewrites the run's branch as one commit without the refused entries, keeps the valid ones, and reports each dropped path with its reason (never the matched value); a run whose entries are all refused lands as no changes. The secret scanner and the pre-commit hook no longer flag assignments whose value only refers to a secret (`process.env.X`, `$VAR`, `{{ slot }}`, `[FILTERED]`, the `Bearer` word, null/example literals), while a real value still matches. The dream's `path_orphan` finding now says when a file has no frontmatter, and its persona tells it to add a `description` in the same commit as the move instead of a bare `git mv`, which validation refused on every run. Thanks to @PGY0403 (#10385) and @floweredao (#10511) for the reports. ([#10385](https://github.com/code-yeongyu/oh-my-openagent/issues/10385), [#10511](https://github.com/code-yeongyu/oh-my-openagent/issues/10511), [#10528](https://github.com/code-yeongyu/oh-my-openagent/pull/10528)) (batch [#11168](https://github.com/code-yeongyu/oh-my-openagent/pull/11168))
|
|
45
|
+
|
|
46
|
+
**Held packaging-test directories are recorded without failing cleanup.** The packed memory-sync probe and abandoned-root sweep share one best-effort removal guard, with no retries. Every held root is printed in the test log; Windows diagnostics are bounded to 30 seconds and include the holder's pid, image and parent pid when identified, or the diagnostic failure. Unrelated filesystem errors and unrecorded leaks still fail. ([#11218](https://github.com/code-yeongyu/oh-my-openagent/pull/11218), part of [#11135](https://github.com/code-yeongyu/oh-my-openagent/issues/11135))
|
|
47
|
+
|
|
10
48
|
## [5.1.45] - 2026-10-24
|
|
11
49
|
|
|
12
50
|
**Reading the end of a long session takes 42 ms and 68 MB instead of 40 s and 1.8 GB.** `session_read`, `session_search` and `session_info` page through OpenCode's message API instead of loading the whole session: on a 23,000-message session, `session_read` with `limit: 2, from_end: true` dropped from 39.6 s and 1,848 MB peak memory to 42 ms and 68 MB, and a search that runs out its 60-second timeout now stops reading when it returns, where it used to read another 228 MB in the background ([#10738](https://github.com/code-yeongyu/oh-my-openagent/issues/10738), [#10741](https://github.com/code-yeongyu/oh-my-openagent/pull/10741)).
|
|
@@ -17,8 +55,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
17
55
|
|
|
18
56
|
**ulw-research ships a fact ledger, a fidelity state file and a claim index for research reports.** They give each research run a machine-readable record of its facts and verified claims; nothing in the CLI uses them yet. ([#11046](https://github.com/code-yeongyu/oh-my-openagent/pull/11046), part of [#11009](https://github.com/code-yeongyu/oh-my-openagent/issues/11009); batch [#11148](https://github.com/code-yeongyu/oh-my-openagent/pull/11148))
|
|
19
57
|
|
|
20
|
-
**Windows dori sidecar paths pass the extension's path checks.** The omo-senpi tests accept the Windows form of the sidecar path, so the Windows suite no longer fails on a correct path. ([#11111](https://github.com/code-yeongyu/oh-my-openagent/pull/11111), fixes [#11110](https://github.com/code-yeongyu/oh-my-openagent/issues/11110))
|
|
21
|
-
|
|
22
58
|
**Child-task, workflow and workpool wake sources report kind `children`.** ([#11114](https://github.com/code-yeongyu/oh-my-openagent/pull/11114), part of [#10782](https://github.com/code-yeongyu/oh-my-openagent/issues/10782))
|
|
23
59
|
|
|
24
60
|
**An unreadable workpool store no longer drops or falsely clears the children wake source.** ([#11118](https://github.com/code-yeongyu/oh-my-openagent/pull/11118), part of [#10782](https://github.com/code-yeongyu/oh-my-openagent/issues/10782))
|
|
@@ -88,7 +124,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
88
124
|
**The frontend draft guard now catches promotional copy, emoji icons, hype badges and vanity stats, not only accent stripes ([#11022](https://github.com/code-yeongyu/oh-my-openagent/pull/11022)).** One command, `check-draft-guard.ts`, runs the accent-stripe rules plus four checks on visible markup text: promotional filler in English and Korean copy, an emoji used as an icon, a badge whose only content is a hype label such as "New" or "AI-powered", and a stat tile holding a marketing-form number such as "10x", "500+" or "24/7"; a measured figure such as "42%" or "1.2k" passes. Code (TypeScript generics and comparisons included), scripts, styles, comments, hidden elements, bound values and badges that carry a state attribute are not flagged. React component tags such as `<Badge>` and `<Stat value="10x">`, `cn()` class lists, and announced attributes such as `aria-label` and `placeholder` are checked too. The frontend and visualize skills now run it before visual QA in place of `check-accent-stripes.ts`, which still works on its own. Both commands now skip a dangling symlink in a scanned folder instead of crashing, and report an unreadable path given on the command line with exit 2.
|
|
89
125
|
|
|
90
126
|
**A memory sync that stops working now says so in the TUI, with what to do.** When a sync cycle failed, the error went only to the log, and the status kept reporting the last successful sync. Now the memory footer shows `sync blocked` while sync is failing, and one notice says why and what to do: `/memory unlock <path>` for a git lock left behind by a crashed writer, sign in again for an expired sign-in, or check your connection when the sync service cannot be reached. A single dropped request still retries quietly; the offline notice appears only after three failed cycles in a row. When sync recovers, a notice says so and the footer clears. ([#10637](https://github.com/code-yeongyu/oh-my-openagent/issues/10637), [#10958](https://github.com/code-yeongyu/oh-my-openagent/pull/10958))
|
|
91
|
-
**Agents can now reach the dori extension through the one toolkit SDK, and a retried turn never repeats a call that already ran.** With the `dori` section on, the toolkit gains its route, reply, room, send, thread, describe, file, rules, iam, call and work namespaces, and `help()` lists them with their signatures; with it off they do not exist and no dori code loads. Every call carries the caller the engine stamped and a replay key, so a replayed turn gets the recorded result back, a replay with different arguments stops with a typed error, and one older than seven days is refused instead of running again. A session waiting on a dori request also wakes when a macOS file watch drops the wake event, instead of sleeping until its timeout. ([#10458](https://github.com/code-yeongyu/oh-my-openagent/pull/10458))
|
|
92
127
|
|
|
93
128
|
**Store extensions can expose session-callable ops as real tools, and their worker no longer drags a schema library into every store.** A store extension's `sessionCallable` declaration can now carry a `toolName`, `description` and JSON Schema `parameters` per op: the session's engine registers it as `ext_<extension>_<toolName>`, the tool takes the calling session's durable id from the engine (never from arguments), and the worker stamps `caller_session_durable_id` and, when the caller thread_create'd the target, `caller_created_target` inside the op's own transaction. Args naming either caller field are refused before validation; the public `extensionCall` channel refuses every declared session op. The worker validates op arguments itself against a JSON Schema subset (`type`, `properties`, `required`, `additionalProperties` true/false, `enum`, `const`, `pattern`, length/item/number bounds, `items`, `anyOf`), and `register()` refuses any other keyword, so no constraint is skipped - which also removed typebox/value from the store worker: its bundle drops from 206 KB to 115 KB and every worker spawn (and idle-retire respawn) stops paying for its module graph. A declared `await` with `statusOp`/`expireOp`/`timeoutMs` arms a wake-file wait, and `thread_creations` records who created which session durably across host restarts. ([#9551](https://github.com/code-yeongyu/oh-my-openagent/pull/9551))
|
|
94
129
|
|
|
@@ -138,10 +173,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
138
173
|
|
|
139
174
|
**A builtin model profile can run on your own provider.** When the only provider serving a profile's model is one you declared in `models.json` (for example an API-key proxy serving `claude-opus-5-5`), Daily · Normal and the other builtin lanes now pick it instead of reporting that no model is available. Only the models you declared for that provider count, the lane's own providers still come first, and gateways you never declared still never serve a builtin lane. Reported by 채완. ([#10493](https://github.com/code-yeongyu/oh-my-openagent/pull/10493), [#10485](https://github.com/code-yeongyu/oh-my-openagent/issues/10485))
|
|
140
175
|
|
|
141
|
-
**A config with escaped non-ASCII text no longer loads the gateway -> dori migration at every start.** The startup check now looks only for `\u` escapes of the letters in `gateway`, so a prompt written with escaped characters no longer imports the migration sidecar on each launch; a legacy `gateway` section, however it is spelled, is still migrated. ([#11051](https://github.com/code-yeongyu/oh-my-openagent/pull/11051), fixes [#10910](https://github.com/code-yeongyu/oh-my-openagent/issues/10910))
|
|
142
|
-
|
|
143
|
-
**`omo dori` loads a separately installed `dori-extension` package.** The loader verifies its package identity, host contract and resolved entry path before importing it. Existing `gateway` configuration migrates to `dori`, and `omo gateway` remains a deprecated alias for one release. Without a `dori` section, doctor adds no extension rows. ([#10315](https://github.com/code-yeongyu/oh-my-openagent/issues/10315), [#10421](https://github.com/code-yeongyu/oh-my-openagent/pull/10421))
|
|
144
|
-
|
|
145
176
|
**`/mass-ulw` and `run mass ulw ...` now enter the mode instead of offering a pointer the model could skip.** The slash command (`/mass-ulw`, `/mulw`, `/ulw-research`) or a prompt that starts with `run`, `start`, `use`, `do` or `execute` followed by the keyword (`run mass ulw research on <link>`; in Korean, `mass ulw 돌려줘` or `실행해줘`) now carries a binding instruction: read the skill before any other tool call, and run mass-ulw as workflow runs. Before, the hint asked the model to decide whether you meant it, and in a real run it skipped mass-ulw and started no workflow. Any other mention, including a prompt that only ends with `mass ulw research` or asks a question, still gets the hint, and quoted, relayed, negated and delegated mentions never arm it. A single-quoted name (`'omo-senpi ultrawork ...'`) and a relay header naming several recipients (`[a -> b + c]`) now count as quotes and relays for `ulw` too, so they no longer arm ultrawork ([#10810](https://github.com/code-yeongyu/oh-my-openagent/issues/10810), [#10822](https://github.com/code-yeongyu/oh-my-openagent/pull/10822)).
|
|
146
177
|
|
|
147
178
|
**A session can consult the memory of a project it touches.** The first successful read, edit or write under a child project with existing memory lists its note paths and descriptions, without injecting note bodies. Linked projects in a non-git workspace and linked worktrees follow the session's `auto_identity` mode. Kibitzer ranks up to three recently touched projects separately from the session's own notes, reserves up to half its seats for them, and uses the same persisted search-term cache for each repository. Project notes receive read-only grants; their `system/` tree, git metadata, writes and enumeration remain denied. Both `memory.project_scope.nudge` and `.recall` default to `true` and can be disabled separately. ([#10044](https://github.com/code-yeongyu/oh-my-openagent/issues/10044), [#10921](https://github.com/code-yeongyu/oh-my-openagent/pull/10921))
|
|
@@ -890,8 +921,6 @@ Thanks also to @Dante-dan ([#9575](https://github.com/code-yeongyu/oh-my-openage
|
|
|
890
921
|
|
|
891
922
|
**omo runs on senpi 2026.10.8.** The bundled Claude Agent SDK moves to 0.3.289 (Claude Code 2.1.289); `continue_from_leaf` acknowledges when the continued turn starts, so a long desktop continuation no longer times out; code mode gets Python kernel tools beside a parked cell. Full list: [senpi 2026.10.8](https://github.com/code-yeongyu/senpi/releases/tag/v2026.10.8).
|
|
892
923
|
|
|
893
|
-
**omo can now inject a chat gateway scope's operating rules into bound sessions** as one block in the system prompt; it takes effect once the gateway connector that pushes them ships. Every other session's prompt is unchanged. ([#9540](https://github.com/code-yeongyu/oh-my-openagent/pull/9540))
|
|
894
|
-
|
|
895
924
|
## [5.1.16] - 2026-10-04
|
|
896
925
|
|
|
897
926
|
**After an upgrade, the first turn no longer fails with "No provider available" while an old engine host is still around.** 5.1.16 runs on senpi 2026.10.7, where `host handoff` (which the desktop runs when the engine changed) can replace an old host that still serves the client's own socket with no session open, instead of refusing it until the host is drained by hand. A host that holds a session is still refused, with the command that retires it. `host status` also names the right engine build for a generation started by a handoff. ([senpi#2701](https://github.com/code-yeongyu/senpi/issues/2701), [senpi#2698](https://github.com/code-yeongyu/senpi/issues/2698))
|
|
@@ -49,7 +49,7 @@ Understand the current memory landscape before changing anything. Start with the
|
|
|
49
49
|
Read `$AUDIT_PATH` and repair findings before consolidation:
|
|
50
50
|
- `link_dangling`: point at the file now holding the content, or remove a link whose target is gone for good; report which.
|
|
51
51
|
- `content_duplicate`: merge into the more specific home and leave a one-line pointer in the other.
|
|
52
|
-
- `path_orphan`: use `git mv` into the home its content belongs to.
|
|
52
|
+
- `path_orphan`: use `git mv` into the home its content belongs to. If the file has no frontmatter (the finding says so), add a one-line `description:` frontmatter in the same commit as the move; a bare move of such a file is refused by completion validation and would be dropped. If you cannot write an honest description, leave the file where it is.
|
|
53
53
|
- `frontmatter_invalid`: leave to the writer owning the file unless only the description is missing.
|
|
54
54
|
|
|
55
55
|
Never touch `system/boundaries.md` or `system/agreements.md`, and never delete evidence. Report unresolved findings with reasons.
|
|
@@ -27,8 +27,8 @@ When the payload has `agreements` and the `record_agreement` tool is available,
|
|
|
27
27
|
|
|
28
28
|
- If an item in `agreements` already requires what the person is correcting, call `record_agreement` with `{"action":"reaffirm","id":"<that item's id>","date":"YYYY-MM-DD"}`. Add `"text"` with a stronger wording only when that item is `by: "agent"`; never reword a `by: "human"` item.
|
|
29
29
|
- Otherwise call it with `{"action":"new","applies":"global"|"project","text":"...","date":"YYYY-MM-DD"}`. Use `project` when the rule is about this repository only. Write the text as one imperative rule in the person's language, at most 240 characters.
|
|
30
|
-
-
|
|
31
|
-
-
|
|
30
|
+
- Include `source: {sessionId, messageId}` on every call: copy the entry's `sessionId` and the correcting user turn's `source_message_id`. Only user turns in `entries` qualify, not `lead` context or assistant suggestions.
|
|
31
|
+
- One call per agreement per user turn. Repeated copies of the same turn count once; distinct user turns count separately, even on the same date. Never invent an id.
|
|
32
32
|
|
|
33
33
|
Facts about how to treat the person stay `record_fact` person records; rules about how the agent must work go to `record_agreement`.
|
|
34
34
|
|