@ouro.bot/cli 0.1.0-alpha.1556 → 0.1.0-alpha.1558
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/changelog.json +12 -0
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/desk.lock.json +3 -3
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/vendor/desk/.claude-plugin/plugin.json +1 -1
- package/vendor/desk/.ouro-desk.json +3 -3
- package/vendor/desk/CHANGELOG.md +640 -0
- package/vendor/desk/activation/copilot-root.flattened-bundle.json +2 -2
- package/vendor/desk/activation/desk.activation.json +5 -5
- package/vendor/desk/agency.json +1 -1
- package/vendor/desk/docs/issue-drains.md +8 -6
- package/vendor/desk/docs/sessions.md +1 -1
- package/vendor/desk/hooks/lib/boot-checks.cjs +1 -1
- package/vendor/desk/hooks/lib/child-agent.cjs +2 -2
- package/vendor/desk/hooks/lib/factory-end.cjs +4 -1
- package/vendor/desk/mcp/README.md +9 -1
- package/vendor/desk/mcp/bootstrap.cjs +64 -38
- package/vendor/desk/mcp/idle-proxy.cjs +14 -6
- package/vendor/desk/mcp/scripts/crew.js +3 -3
- package/vendor/desk/mcp/scripts/drains-launcher.mjs +6 -5
- package/vendor/desk/mcp/scripts/factory.js +15 -6
- package/vendor/desk/mcp/scripts/local-recovery.js +89 -7
- package/vendor/desk/mcp/scripts/resolve-desk-root.js +1 -2
- package/vendor/desk/mcp/src/actions/desk-session.actions.mts +16 -1
- package/vendor/desk/mcp/src/actions/desk.actions.mts +2 -2
- package/vendor/desk/mcp/src/actions/generated/desk/actions.json +36 -1
- package/vendor/desk/mcp/src/actions/generated/desk/mcp.json +34 -1
- package/vendor/desk/mcp/src/activation/superpowers-context.js +9 -0
- package/vendor/desk/mcp/src/crew/workspace.js +30 -4
- package/vendor/desk/mcp/src/desk/card-commit-guard.js +3 -2
- package/vendor/desk/mcp/src/desk/content-home.js +16 -0
- package/vendor/desk/mcp/src/indexer/discover.js +8 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-claims.ts +2 -1
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-command.ts +20 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/mcp.ts +1 -1
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/xray.ts +40 -2
- package/vendor/desk/mcp/src/runtime/boot.js +0 -1
- package/vendor/desk/mcp/src/runtime/deliver.js +42 -5
- package/vendor/desk/mcp/src/runtime/drains-cli.js +9 -1
- package/vendor/desk/mcp/src/runtime/drains.js +479 -40
- package/vendor/desk/mcp/src/runtime/hosted.js +5 -3
- package/vendor/desk/mcp/src/runtime/pending-migrations.js +5 -1
- package/vendor/desk/mcp/src/runtime/pr-publication.js +55 -29
- package/vendor/desk/mcp/src/runtime/relays.js +10 -1
- package/vendor/desk/mcp/src/runtime/remote-identity.js +22 -0
- package/vendor/desk/mcp/src/runtime/sessions-cli.js +6 -6
- package/vendor/desk/mcp/src/runtime/sync-worker.js +10 -8
- package/vendor/desk/mcp/src/runtime/unmerged-saves.js +29 -3
- package/vendor/desk/mcp/src/server.js +3 -2
- package/vendor/desk/mcp/src/tool-names.js +0 -2
- package/vendor/desk/mcp/src/tool-schemas.js +3 -8
- package/vendor/desk/mcp/src/tools/archive-links.js +3 -0
- package/vendor/desk/mcp/src/tools/desk-save.js +8 -3
- package/vendor/desk/mcp/src/tools/move.js +32 -3
- package/vendor/desk/mcp/src/tools/sibling-desk.js +10 -4
- package/vendor/desk/mcp/src/tools/status.js +9 -6
- package/vendor/desk/mcp/src/tools/task-log.js +6 -2
- package/vendor/desk/mcp/src/tools/task.js +17 -5
- package/vendor/desk/mcp/src/util/citations.js +54 -0
- package/vendor/desk/mcp/web-auth.cjs +17 -0
- package/vendor/desk/mcp/web-sso.cjs +52 -0
- package/vendor/desk/plugin.json +2 -2
- package/vendor/desk/skills/add-workspace-mcp/SKILL.md +2 -2
- package/vendor/desk/skills/archive-workflow/SKILL.md +1 -1
- package/vendor/desk/skills/coordinating-lanes/SKILL.md +24 -0
- package/vendor/desk/skills/evidence-discipline/SKILL.md +8 -12
- package/vendor/desk/skills/git-hygiene/SKILL.md +6 -0
- package/vendor/desk/skills/interaction-style/SKILL.md +4 -2
- package/vendor/desk/skills/live-ui-iteration/SKILL.md +35 -0
- package/vendor/desk/skills/operator-voice-comments/SKILL.md +4 -0
- package/vendor/desk/skills/outside-approval/SKILL.md +10 -0
- package/vendor/desk/skills/pr-feedback-on-own-pr/SKILL.md +5 -1
- package/vendor/desk/skills/pr-reviewer-audit/SKILL.md +1 -1
- package/vendor/desk/skills/pr-reviewer-audit/helpers/audit.py +19 -1
- package/vendor/desk/skills/pr-reviewer-audit/helpers/test_audit.py +37 -1
- package/vendor/desk/skills/pr-self-review/SKILL.md +1 -1
- package/vendor/desk/skills/pr-surface-hygiene/SKILL.md +28 -4
- package/vendor/desk/skills/pr-surface-hygiene/check-visual-proof.cjs +27 -14
- package/vendor/desk/skills/prior-art/SKILL.md +14 -0
- package/vendor/desk/skills/runtime-symptom-investigation/SKILL.md +5 -1
- package/vendor/desk/skills/session-resumption/SKILL.md +3 -1
- package/vendor/desk/skills/using-desk/SKILL.md +3 -3
- package/vendor/desk/skills/using-superpowers-with-desk/SKILL.md +2 -0
- package/vendor/desk/skills/visual-proof/SKILL.md +42 -0
- package/vendor/desk/skills/work-orchestration/SKILL.md +17 -2
|
@@ -299,6 +299,20 @@ export function replay({ git, spawnGit, paths, onto, commits, prefix }) {
|
|
|
299
299
|
return { head: wt(["rev-parse", "HEAD"]).stdout.trim(), replayed, skipped }
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
+
// A refusal that is neither the network, the credentials, a timeout nor the remote having moved on is a hook or a remote rule.
|
|
303
|
+
const refusedByHook = (pushed) => classifyPullFailure({ stderr: pushed.stderr, timedOut: pushed.status === null }) === "other" && !/\[rejected\]/u.test(pushed.stderr)
|
|
304
|
+
|
|
305
|
+
// Pushes the rebuilt commit from a full checkout of it, so a pre-push hook sees the tree that would land. Returns `fallback`, the
|
|
306
|
+
// first push's result, when that checkout cannot be made.
|
|
307
|
+
function pushFromCandidate({ git, spawnGit, paths, upstream, built, onto, fallback }) {
|
|
308
|
+
removeWorktree(git, paths)
|
|
309
|
+
const added = git(["-c", `core.hooksPath=${paths.hooks}`, "worktree", "add", "--detach", "--force", "--no-checkout", paths.tree, built.head], CHECKOUT_TIMEOUT_MS)
|
|
310
|
+
if (added.status !== 0) return fallback
|
|
311
|
+
const inTree = runner(spawnGit, paths.tree)
|
|
312
|
+
if (inTree(["-c", `core.hooksPath=${paths.hooks}`, "read-tree", "-mu", "HEAD"], CHECKOUT_TIMEOUT_MS).status !== 0) return fallback
|
|
313
|
+
return inTree(["push", "--quiet", upstream.remote, `${built.head}:${upstream.merge}`], NETWORK_TIMEOUT_MS, lfsSkipEnv(git, onto, built.head))
|
|
314
|
+
}
|
|
315
|
+
|
|
302
316
|
export function upstreamOf(git) {
|
|
303
317
|
const branch = git(["symbolic-ref", "-q", "--short", "HEAD"]).stdout.trim()
|
|
304
318
|
const remote = git(["config", `branch.${branch}.remote`]).stdout.trim()
|
|
@@ -390,7 +404,12 @@ export function deliver({ root, env = process.env, spawnGit = spawnSync, deliver
|
|
|
390
404
|
const recovery = error.message.includes("Fix:") ? "" : `. Fix: run ${publicationRecovery(root)}`
|
|
391
405
|
return { state: "failed", reason: "publication_blocked", error: error.message + recovery, publication: error.publication ?? null, delivered: [], skipped: [] }
|
|
392
406
|
}
|
|
393
|
-
} else
|
|
407
|
+
} else {
|
|
408
|
+
pushed = built.head === onto ? { status: 0 } : git(["push", "--quiet", upstream.remote, `${built.head}:${upstream.merge}`], NETWORK_TIMEOUT_MS, lfsSkipEnv(git, onto, built.head))
|
|
409
|
+
// A repository's own pre-push hook tests the tree it runs in. After a replay that tree is the shared checkout, which has not
|
|
410
|
+
// received the commits already on the remote, so it can refuse a push the rebuilt tree would pass (#1680).
|
|
411
|
+
if (pushed.status !== 0 && !fastForward && refusedByHook(pushed)) pushed = pushFromCandidate({ git, spawnGit, paths, upstream, built, onto, fallback: pushed })
|
|
412
|
+
}
|
|
394
413
|
cleanup()
|
|
395
414
|
if (pushed.status === 0) {
|
|
396
415
|
git(["update-ref", upstream.tracking, target])
|
|
@@ -432,6 +451,21 @@ function removeIdenticalUntracked(git, target, stderr) {
|
|
|
432
451
|
return removed
|
|
433
452
|
}
|
|
434
453
|
|
|
454
|
+
// A tracked file whose working-tree bytes are exactly the incoming file's is staged: the checkout puts the same bytes back, and a stale index entry no longer refuses the move.
|
|
455
|
+
function stageIdenticalTracked(git, target, stderr) {
|
|
456
|
+
const top = git(["rev-parse", "--show-toplevel"]).stdout.trim()
|
|
457
|
+
let staged = 0
|
|
458
|
+
for (const match of stderr.matchAll(/^(?:error: )?Entry '(.+)' not uptodate\./gmu)) {
|
|
459
|
+
const file = match[1]
|
|
460
|
+
const incoming = git(["rev-parse", "--verify", "--quiet", `${target}:${file}`]).stdout.trim()
|
|
461
|
+
const local = git(["hash-object", "--", path.join(top, file)]).stdout.trim()
|
|
462
|
+
if (incoming !== local) continue
|
|
463
|
+
git(["add", "--", path.join(top, file)])
|
|
464
|
+
staged += 1
|
|
465
|
+
}
|
|
466
|
+
return staged
|
|
467
|
+
}
|
|
468
|
+
|
|
435
469
|
/**
|
|
436
470
|
* Moves the checkout with its upstream only when both name the same branch. A checkout on another branch (a worktree on a
|
|
437
471
|
* feature branch that tracks the default branch) keeps its branch: moving it would move the work it holds.
|
|
@@ -447,16 +481,19 @@ function followsUpstream({ git, upstream, head, target }) {
|
|
|
447
481
|
* an untracked file in the way, leaves the checkout where it was (`behind`), naming what stopped it.
|
|
448
482
|
*/
|
|
449
483
|
function catchUp({ git, upstream, head, target }) {
|
|
484
|
+
// Moving the checkout writes its files, so Git LFS must smudge them: with the skip on, a changed LFS file would land as its pointer.
|
|
485
|
+
const smudge = { GIT_LFS_SKIP_SMUDGE: "0" }
|
|
450
486
|
const now = git(["rev-parse", "HEAD"]).stdout.trim()
|
|
451
487
|
if (now === target) return { state: "current" }
|
|
452
488
|
if (now !== head) return { state: "behind", reason: "moved" }
|
|
453
489
|
// Git's index may hold stale file stamps, and refreshing them stats every file; do it only when the move is refused for them.
|
|
454
|
-
let moved = git(["read-tree", "-m", "-u", head, target], CHECKOUT_TIMEOUT_MS)
|
|
490
|
+
let moved = git(["read-tree", "-m", "-u", head, target], CHECKOUT_TIMEOUT_MS, smudge)
|
|
455
491
|
if (moved.status !== 0 && /not uptodate/u.test(moved.stderr)) {
|
|
456
492
|
git(["update-index", "-q", "--refresh"])
|
|
457
|
-
moved = git(["read-tree", "-m", "-u", head, target], CHECKOUT_TIMEOUT_MS)
|
|
493
|
+
moved = git(["read-tree", "-m", "-u", head, target], CHECKOUT_TIMEOUT_MS, smudge)
|
|
458
494
|
}
|
|
459
|
-
if (moved.status !== 0 &&
|
|
495
|
+
if (moved.status !== 0 && stageIdenticalTracked(git, target, moved.stderr) > 0) moved = git(["read-tree", "-m", "-u", head, target], CHECKOUT_TIMEOUT_MS, smudge)
|
|
496
|
+
if (moved.status !== 0 && removeIdenticalUntracked(git, target, moved.stderr) > 0) moved = git(["read-tree", "-m", "-u", head, target], CHECKOUT_TIMEOUT_MS, smudge)
|
|
460
497
|
if (moved.status !== 0) {
|
|
461
498
|
const named = [...moved.stderr.matchAll(/^(?:error: )?Entry '(.+)' (?:not uptodate|would be overwritten)/gmu)].map((match) => match[1])
|
|
462
499
|
return { state: "behind", reason: "local_changes", paths: [...new Set([...named, ...namedUntrackedPaths(moved.stderr)])] }
|
|
@@ -464,6 +501,6 @@ function catchUp({ git, upstream, head, target }) {
|
|
|
464
501
|
// Through HEAD, so the move is in HEAD's reflog as well as the branch's; the old value makes it a compare-and-swap.
|
|
465
502
|
if (git(["update-ref", "-m", "desk: catch up with delivered commits", "HEAD", target, head]).status === 0) return { state: "caught_up" }
|
|
466
503
|
// Another commit landed in the moment between: put the files back to match the branch as it now is.
|
|
467
|
-
git(["read-tree", "-m", "-u", target, "HEAD"], CHECKOUT_TIMEOUT_MS)
|
|
504
|
+
git(["read-tree", "-m", "-u", target, "HEAD"], CHECKOUT_TIMEOUT_MS, smudge)
|
|
468
505
|
return { state: "behind", reason: "moved" }
|
|
469
506
|
}
|
|
@@ -177,7 +177,15 @@ function drainsCli({ script, env, now, connect, listProcesses, signedIn, fetchHo
|
|
|
177
177
|
const paths = pathsOf(hookPaths({ env }), input)
|
|
178
178
|
return withDesk({ status: await hookStatus({ paths, now: now(), fetchImpl: fetchHooks, token: hookToken, env }) }, { script, env })
|
|
179
179
|
}),
|
|
180
|
-
command("runtimes status", { ...READ, summary: "Name the Copilot server runtimes started without Desk's plugin, and how to recover." }, () =>
|
|
180
|
+
command("runtimes status", { ...READ, summary: "Name the Copilot server runtimes started without Desk's plugin, and how to recover." }, () => {
|
|
181
|
+
let processes
|
|
182
|
+
try {
|
|
183
|
+
processes = listProcesses()
|
|
184
|
+
} catch (error) {
|
|
185
|
+
throw new AxError({ code: "process-list-failed", exit: 1, thing: "runtimes status", problem: `ps could not list this host's processes, probably because ps is missing or blocked here (${error.message})`, fix: "Run ps -axo pid=,command= yourself to see why it fails, then run runtimes status again." })
|
|
186
|
+
}
|
|
187
|
+
return { status: pluginlessRuntimeLines(findPluginlessRuntimes(processes)) }
|
|
188
|
+
}),
|
|
181
189
|
],
|
|
182
190
|
})
|
|
183
191
|
}
|