@skrr-ai/cli 0.1.119 → 0.1.120
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/dist/base-command.d.ts +31 -0
- package/dist/base-command.js +106 -4
- package/dist/commands/commands.js +11 -0
- package/dist/commands/commitments/action-proposal.d.ts +13 -0
- package/dist/commands/commitments/action-proposal.js +39 -0
- package/dist/commands/commitments/action-proposals/decide.js +8 -1
- package/dist/commands/commitments/action-proposals/execute.js +11 -1
- package/dist/commands/commitments/create.js +2 -2
- package/dist/commands/commitments/doctor.d.ts +8 -0
- package/dist/commands/commitments/doctor.js +22 -0
- package/dist/commands/commitments/execute-remediation.js +12 -1
- package/dist/commands/commitments/observations.js +2 -2
- package/dist/commands/commitments/pack/bind.d.ts +18 -1
- package/dist/commands/commitments/pack/bind.js +66 -8
- package/dist/commands/commitments/pack/plan.d.ts +4 -1
- package/dist/commands/commitments/pack/plan.js +30 -2
- package/dist/commands/commitments/update.js +8 -2
- package/dist/commands/completion/index.js +1 -1
- package/dist/commands/completion/values.js +1 -1
- package/dist/commands/computer-use/audio.d.ts +1 -0
- package/dist/commands/computer-use/audio.js +1 -0
- package/dist/commands/computer-use/browser.d.ts +1 -0
- package/dist/commands/computer-use/browser.js +1 -0
- package/dist/commands/computer-use/disable.d.ts +1 -0
- package/dist/commands/computer-use/disable.js +1 -0
- package/dist/commands/computer-use/enable.d.ts +1 -0
- package/dist/commands/computer-use/enable.js +1 -0
- package/dist/commands/computer-use/index.d.ts +1 -0
- package/dist/commands/computer-use/index.js +1 -0
- package/dist/commands/computer-use/install.d.ts +1 -0
- package/dist/commands/computer-use/install.js +1 -0
- package/dist/commands/computer-use/recover.d.ts +1 -0
- package/dist/commands/computer-use/recover.js +1 -0
- package/dist/commands/computer-use/status.d.ts +1 -0
- package/dist/commands/computer-use/status.js +1 -0
- package/dist/commands/computer-use/stop.d.ts +1 -0
- package/dist/commands/computer-use/stop.js +1 -0
- package/dist/commands/context.js +16 -11
- package/dist/commands/convos/recovery.js +1 -1
- package/dist/commands/daemon/diagnostics.d.ts +9 -0
- package/dist/commands/daemon/diagnostics.js +53 -0
- package/dist/commands/daemon/index.js +2 -0
- package/dist/commands/daemon/maintenance/attest.d.ts +15 -0
- package/dist/commands/daemon/maintenance/attest.js +52 -0
- package/dist/commands/daemon/maintenance/hold.d.ts +17 -0
- package/dist/commands/daemon/maintenance/hold.js +70 -0
- package/dist/commands/daemon/maintenance/index.d.ts +12 -0
- package/dist/commands/daemon/maintenance/index.js +30 -0
- package/dist/commands/daemon/maintenance/resume.d.ts +13 -0
- package/dist/commands/daemon/maintenance/resume.js +36 -0
- package/dist/commands/daemon/maintenance/status.d.ts +13 -0
- package/dist/commands/daemon/maintenance/status.js +36 -0
- package/dist/commands/doctor.d.ts +4 -1
- package/dist/commands/doctor.js +50 -6
- package/dist/commands/followups/plans/cancel-batch.js +6 -3
- package/dist/commands/followups/plans/capacity.js +7 -3
- package/dist/commands/followups/plans/observability.js +11 -3
- package/dist/commands/followups/plans/preferences/set.js +26 -8
- package/dist/commands/followups/plans/preferences.js +1 -1
- package/dist/commands/followups/plans/show.js +1 -1
- package/dist/commands/goals/key-results/assess.d.ts +36 -0
- package/dist/commands/goals/key-results/assess.js +110 -0
- package/dist/commands/goals/key-results/history.d.ts +30 -0
- package/dist/commands/goals/key-results/history.js +104 -0
- package/dist/commands/goals/key-results/list.d.ts +5 -4
- package/dist/commands/goals/key-results/list.js +12 -6
- package/dist/commands/goals/key-results/show.d.ts +4 -2
- package/dist/commands/goals/key-results/show.js +25 -4
- package/dist/commands/goals/key-results/update.d.ts +4 -0
- package/dist/commands/goals/key-results/update.js +18 -24
- package/dist/commands/goals/plan-now.js +12 -1
- package/dist/commands/goals/planner-compare.d.ts +30 -0
- package/dist/commands/goals/planner-compare.js +136 -0
- package/dist/commands/machines/dedicated/service/exec.d.ts +3 -0
- package/dist/commands/machines/dedicated/service/exec.js +70 -11
- package/dist/commands/machines/hosted/destroy.d.ts +1 -0
- package/dist/commands/machines/hosted/destroy.js +11 -1
- package/dist/commands/machines/hosted/exec.d.ts +1 -0
- package/dist/commands/machines/hosted/exec.js +12 -1
- package/dist/commands/machines/hosted/index.js +1 -0
- package/dist/commands/machines/hosted/operation.d.ts +14 -0
- package/dist/commands/machines/hosted/operation.js +51 -0
- package/dist/commands/machines/hosted/pull.js +1 -1
- package/dist/commands/machines/hosted/start.js +6 -2
- package/dist/commands/spaces/auto-executor/compare.d.ts +18 -0
- package/dist/commands/spaces/auto-executor/compare.js +139 -0
- package/dist/commands/spaces/auto-executor/runs.d.ts +3 -0
- package/dist/commands/spaces/auto-executor/runs.js +13 -1
- package/dist/commands/spaces/charter/create-from-description.d.ts +21 -0
- package/dist/commands/spaces/charter/create-from-description.js +77 -0
- package/dist/commands/spaces/charter/show.d.ts +22 -0
- package/dist/commands/spaces/charter/show.js +61 -0
- package/dist/commands/spaces/heartbeats/list.d.ts +1 -16
- package/dist/commands/spaces/heartbeats/list.js +13 -0
- package/dist/commands/spaces/install-template.js +3 -0
- package/dist/commands/spaces/loops/migrate.d.ts +32 -0
- package/dist/commands/spaces/loops/migrate.js +103 -0
- package/dist/commands/spaces/loops/release.d.ts +14 -0
- package/dist/commands/spaces/loops/release.js +59 -0
- package/dist/commands/spaces/notebook.d.ts +25 -0
- package/dist/commands/spaces/notebook.js +75 -0
- package/dist/commands/spaces/proposals/discard.d.ts +17 -0
- package/dist/commands/spaces/proposals/discard.js +17 -0
- package/dist/commands/spaces/proposals/keep.d.ts +17 -0
- package/dist/commands/spaces/proposals/keep.js +17 -0
- package/dist/commands/spaces/proposals/list.d.ts +24 -0
- package/dist/commands/spaces/proposals/list.js +89 -0
- package/dist/commands/spaces/skills/propose.d.ts +29 -0
- package/dist/commands/spaces/skills/propose.js +82 -0
- package/dist/commands/spaces/templates/fork.js +3 -0
- package/dist/commands/spaces/triggers/show.js +6 -0
- package/dist/commands/spaces/workflows/retry.d.ts +1 -0
- package/dist/commands/spaces/workflows/retry.js +8 -1
- package/dist/commands/spaces/workflows/triggers/create.js +3 -2
- package/dist/commands/spaces/workflows/triggers/fire.js +4 -0
- package/dist/commands/spaces/workflows/triggers/update.js +2 -1
- package/dist/commands/spaces/write-policy/set.d.ts +22 -0
- package/dist/commands/spaces/write-policy/set.js +82 -0
- package/dist/commands/spaces/write-policy/show.d.ts +19 -0
- package/dist/commands/spaces/write-policy/show.js +49 -0
- package/dist/commands/store/artifacts/receipt.d.ts +14 -0
- package/dist/commands/store/artifacts/receipt.js +34 -0
- package/dist/commands/store/artifacts/release.d.ts +2 -0
- package/dist/commands/store/artifacts/release.js +11 -0
- package/dist/commands/store/governance/publish-release.d.ts +2 -0
- package/dist/commands/store/governance/publish-release.js +30 -1
- package/dist/commands/store/governance/release-receipt.d.ts +12 -0
- package/dist/commands/store/governance/release-receipt.js +32 -0
- package/dist/commands/tasks/approvals/list.d.ts +11 -5
- package/dist/commands/tasks/approvals/list.js +13 -6
- package/dist/commands/tasks/attachments/facts.d.ts +12 -0
- package/dist/commands/tasks/attachments/facts.js +29 -0
- package/dist/commands/tasks/attachments/upload.d.ts +1 -0
- package/dist/commands/tasks/attachments/upload.js +16 -0
- package/dist/commands/tasks/bulk-update.js +35 -1
- package/dist/commands/tasks/context.d.ts +15 -0
- package/dist/commands/tasks/context.js +69 -0
- package/dist/commands/tasks/copy.d.ts +18 -0
- package/dist/commands/tasks/copy.js +85 -0
- package/dist/commands/tasks/create-tree.js +97 -23
- package/dist/commands/tasks/create.js +9 -1
- package/dist/commands/tasks/deliverable/add.js +20 -10
- package/dist/commands/tasks/move.js +8 -1
- package/dist/commands/tasks/operations/show.d.ts +16 -0
- package/dist/commands/tasks/operations/show.js +98 -0
- package/dist/commands/tasks/operations/wait.d.ts +22 -0
- package/dist/commands/tasks/operations/wait.js +114 -0
- package/dist/commands/tasks/preflight.d.ts +1 -0
- package/dist/commands/tasks/preflight.js +11 -1
- package/dist/commands/tasks/rearm-recurrence.js +4 -0
- package/dist/commands/tasks/result/show.js +22 -0
- package/dist/commands/tasks/result/submit.d.ts +1 -0
- package/dist/commands/tasks/result/submit.js +3 -0
- package/dist/commands/tasks/retry-receipt.d.ts +15 -0
- package/dist/commands/tasks/retry-receipt.js +89 -0
- package/dist/commands/tasks/retry-review.d.ts +16 -0
- package/dist/commands/tasks/retry-review.js +66 -0
- package/dist/commands/tasks/retry.d.ts +4 -8
- package/dist/commands/tasks/retry.js +34 -68
- package/dist/commands/tasks/runs.d.ts +21 -0
- package/dist/commands/tasks/runs.js +95 -0
- package/dist/commands/tasks/show.d.ts +2 -0
- package/dist/commands/tasks/show.js +15 -1
- package/dist/commands/tasks/start-receipt.d.ts +15 -0
- package/dist/commands/tasks/start-receipt.js +95 -0
- package/dist/commands/tasks/start.d.ts +4 -0
- package/dist/commands/tasks/start.js +49 -3
- package/dist/commands/tasks/update.js +3 -0
- package/dist/commands/tasks/upsert.js +17 -3
- package/dist/commands/tasks/watch.d.ts +3 -0
- package/dist/commands/tasks/watch.js +85 -20
- package/dist/commands/wiki/history.d.ts +33 -0
- package/dist/commands/wiki/history.js +134 -0
- package/dist/commands/wiki/ls.d.ts +2 -0
- package/dist/commands/wiki/ls.js +8 -0
- package/dist/commands/wiki/update.d.ts +3 -1
- package/dist/commands/wiki/update.js +24 -2
- package/dist/commands/wiki/write.d.ts +22 -0
- package/dist/commands/wiki/write.js +144 -6
- package/dist/generated/agent-guides.json +81 -81
- package/dist/generated/managed-instruction-guides.json +1 -1
- package/dist/lib/agent-guides.d.ts +9 -0
- package/dist/lib/agent-guides.js +23 -1
- package/dist/lib/agentic-stream.d.ts +5 -0
- package/dist/lib/agentic-stream.js +122 -3
- package/dist/lib/auth-diagnostics.d.ts +39 -0
- package/dist/lib/auth-diagnostics.js +71 -0
- package/dist/lib/cli-client-identity.d.ts +6 -0
- package/dist/lib/cli-client-identity.js +16 -0
- package/dist/lib/cli-installation-diagnostics.d.ts +52 -0
- package/dist/lib/cli-installation-diagnostics.js +254 -0
- package/dist/lib/command-hygiene.d.ts +45 -0
- package/dist/lib/command-hygiene.js +413 -0
- package/dist/lib/commitments.d.ts +64 -3
- package/dist/lib/commitments.js +34 -6
- package/dist/lib/completion-index.d.ts +16 -4
- package/dist/lib/completion-index.js +50 -14
- package/dist/lib/config.js +7 -1
- package/dist/lib/daemon-maintenance-command.d.ts +22 -0
- package/dist/lib/daemon-maintenance-command.js +39 -0
- package/dist/lib/daemon-maintenance.d.ts +275 -0
- package/dist/lib/daemon-maintenance.js +1035 -0
- package/dist/lib/dedicated-service.d.ts +3 -2
- package/dist/lib/dedicated-service.js +11 -3
- package/dist/lib/governed-store.d.ts +8 -0
- package/dist/lib/governed-store.js +5 -0
- package/dist/lib/hosted-machines.d.ts +33 -2
- package/dist/lib/hosted-machines.js +19 -1
- package/dist/lib/json-output.d.ts +1 -1
- package/dist/lib/machines.d.ts +9 -1
- package/dist/lib/machines.js +15 -1
- package/dist/lib/node-adapter.js +13 -0
- package/dist/lib/record-output.d.ts +22 -0
- package/dist/lib/record-output.js +78 -0
- package/dist/lib/roles.d.ts +3 -3
- package/dist/lib/scoped-memory-command.d.ts +18 -0
- package/dist/lib/scoped-memory-command.js +53 -2
- package/dist/lib/space-charter.d.ts +49 -0
- package/dist/lib/space-charter.js +78 -0
- package/dist/lib/space-loop-migration.d.ts +18 -0
- package/dist/lib/space-loop-migration.js +128 -0
- package/dist/lib/space-notebook.d.ts +22 -0
- package/dist/lib/space-notebook.js +140 -0
- package/dist/lib/space-proposal-decision-command.d.ts +36 -0
- package/dist/lib/space-proposal-decision-command.js +108 -0
- package/dist/lib/space-proposals.d.ts +44 -0
- package/dist/lib/space-proposals.js +186 -0
- package/dist/lib/space-templates.d.ts +8 -0
- package/dist/lib/space-templates.js +17 -0
- package/dist/lib/space-write-policy.d.ts +24 -0
- package/dist/lib/space-write-policy.js +103 -0
- package/dist/lib/task-agent-context-capabilities.d.ts +10 -0
- package/dist/lib/task-agent-context-capabilities.js +22 -0
- package/dist/lib/task-agent-context-compatibility.d.ts +9 -0
- package/dist/lib/task-agent-context-compatibility.js +30 -0
- package/dist/lib/task-asset-upload.d.ts +22 -0
- package/dist/lib/task-asset-upload.js +257 -29
- package/dist/lib/task-batch.d.ts +15 -1
- package/dist/lib/task-batch.js +35 -2
- package/dist/lib/task-operation-watch.d.ts +66 -0
- package/dist/lib/task-operation-watch.js +159 -0
- package/dist/lib/task-resolver.d.ts +1 -1
- package/dist/lib/task-resolver.js +4 -3
- package/dist/lib/task-work.d.ts +1 -1
- package/dist/lib/task-work.js +35 -1
- package/dist/lib/task-write-attribution.d.ts +14 -0
- package/dist/lib/task-write-attribution.js +35 -2
- package/dist/lib/triggers.d.ts +11 -0
- package/dist/lib/triggers.js +7 -0
- package/dist/lib/wiki-update.d.ts +1 -0
- package/dist/lib/wiki-update.js +10 -1
- package/dist/lib/wiki.js +4 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +9 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +31 -15
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.js +1 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +13 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/guidedUpdate.d.ts +370 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/guidedUpdate.js +315 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/maintenanceReportWire.d.ts +178 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/maintenanceReportWire.js +262 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.d.ts +51 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.js +106 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +9 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +32 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.js +1 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +33 -14
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/guidedUpdate.d.ts +370 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/guidedUpdate.js +404 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/maintenanceReportWire.d.ts +178 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/maintenanceReportWire.js +342 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.d.ts +51 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.js +138 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +20 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +27085 -20250
- package/oclif.manifest.json +10566 -7247
- package/package.json +20 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.describeKnowledgeDefault = describeKnowledgeDefault;
|
|
3
4
|
const core_1 = require("@oclif/core");
|
|
4
5
|
const base_command_1 = require("../../../base-command");
|
|
5
6
|
const commitments_1 = require("../../../lib/commitments");
|
|
@@ -10,11 +11,18 @@ const web_url_1 = require("../../../lib/web-url");
|
|
|
10
11
|
* Binding is idempotent by design — the API answers 200 with `reused: true`
|
|
11
12
|
* rather than minting a second draft, because a retried bind used to leave
|
|
12
13
|
* duplicate Commitments behind (OSK-5763).
|
|
14
|
+
*
|
|
15
|
+
* `--space` binds the Pack into a Space as that Space's loop: held by the
|
|
16
|
+
* Space's lead unless `--agent` names another member, owned by the person
|
|
17
|
+
* binding, who must be the Space's execution-principal user and hold SHARE on
|
|
18
|
+
* it. The server refuses, and writes nothing, when the Space cannot take it.
|
|
13
19
|
*/
|
|
14
20
|
class CommitmentsPackBind extends base_command_1.BaseCommand {
|
|
15
21
|
static description = 'Create the Commitment a Pack describes (idempotent)';
|
|
16
22
|
static examples = [
|
|
17
23
|
'<%= config.bin %> commitments pack bind --pack pr_ci_guardian --agent <agent-id> --repository owner/repo --required-check "Pipeline Summary" --installation-id 155117997',
|
|
24
|
+
'<%= config.bin %> commitments pack bind --pack <pack-id> --space <space-id>',
|
|
25
|
+
'<%= config.bin %> commitments pack bind --pack goal_advance --space <space-id> --goal <goal-id> --interval-minutes 1440',
|
|
18
26
|
];
|
|
19
27
|
static flags = {
|
|
20
28
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
@@ -25,7 +33,20 @@ class CommitmentsPackBind extends base_command_1.BaseCommand {
|
|
|
25
33
|
'pack-version': core_1.Flags.string({
|
|
26
34
|
description: 'Pack version (defaults to the latest installed)',
|
|
27
35
|
}),
|
|
28
|
-
agent: core_1.Flags.string({
|
|
36
|
+
agent: core_1.Flags.string({
|
|
37
|
+
description: 'Agent ID that will hold the Commitment (with --space, defaults to the Space lead)',
|
|
38
|
+
}),
|
|
39
|
+
space: core_1.Flags.string({
|
|
40
|
+
description: "Space ID to bind the Pack into as that Space's loop (you must be its execution-principal user)",
|
|
41
|
+
}),
|
|
42
|
+
goal: core_1.Flags.string({
|
|
43
|
+
description: 'Goal ID the Pack advances (goal_advance; the Goal must be in --space)',
|
|
44
|
+
}),
|
|
45
|
+
'interval-minutes': core_1.Flags.integer({
|
|
46
|
+
description: "How often a goal_advance loop looks when nothing wakes it, in minutes (default one day; the Goal's events wake it sooner)",
|
|
47
|
+
min: 1,
|
|
48
|
+
max: 30 * 24 * 60,
|
|
49
|
+
}),
|
|
29
50
|
repository: core_1.Flags.string({ description: 'Repository the Pack binds to, as owner/repo' }),
|
|
30
51
|
'required-check': core_1.Flags.string({
|
|
31
52
|
description: 'Required CI check name (repeatable). Must match a real Check Run name.',
|
|
@@ -47,20 +68,27 @@ class CommitmentsPackBind extends base_command_1.BaseCommand {
|
|
|
47
68
|
const { flags } = await this.parse(CommitmentsPackBind);
|
|
48
69
|
const requiredChecks = (flags['required-check'] ?? []).map((c) => c.trim()).filter(Boolean);
|
|
49
70
|
const grants = (flags.grant ?? []).map((g) => g.trim()).filter(Boolean);
|
|
50
|
-
|
|
51
|
-
|
|
71
|
+
if (!flags.agent && !flags.space) {
|
|
72
|
+
this.error('Pass --agent (the Agent that holds it) or --space (bind it into a Space).', {
|
|
73
|
+
exit: 1,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
// The API rejects both too; failing here costs no round trip and names the
|
|
77
|
+
// two flags the caller actually typed. Whether a Grant is needed at all is
|
|
78
|
+
// the Pack's plan to say (PR / CI Guardian needs one; most Packs do not),
|
|
79
|
+
// so neither is the server's to refuse.
|
|
52
80
|
if (flags['installation-id'] && grants.length) {
|
|
53
81
|
this.error('Choose either --installation-id or --grant, not both.', { exit: 1 });
|
|
54
82
|
}
|
|
55
|
-
if (!flags['installation-id'] && !grants.length) {
|
|
56
|
-
this.error('Pass --installation-id (GitHub App) or at least one --grant.', { exit: 1 });
|
|
57
|
-
}
|
|
58
83
|
let result;
|
|
59
84
|
try {
|
|
60
85
|
result = await commitments_1.commitmentPackApi.bind({
|
|
61
86
|
packId: flags.pack,
|
|
62
87
|
...(flags['pack-version'] ? { version: flags['pack-version'] } : {}),
|
|
63
|
-
agentId: flags.agent,
|
|
88
|
+
...(flags.agent ? { agentId: flags.agent } : {}),
|
|
89
|
+
...(flags.space ? { spaceId: flags.space } : {}),
|
|
90
|
+
...(flags.goal ? { goalId: flags.goal } : {}),
|
|
91
|
+
...(flags['interval-minutes'] ? { intervalMs: flags['interval-minutes'] * 60_000 } : {}),
|
|
64
92
|
...(flags.repository ? { repository: flags.repository } : {}),
|
|
65
93
|
...(requiredChecks.length ? { requiredChecks } : {}),
|
|
66
94
|
...(flags['installation-id'] ? { installationId: flags['installation-id'] } : {}),
|
|
@@ -76,7 +104,18 @@ class CommitmentsPackBind extends base_command_1.BaseCommand {
|
|
|
76
104
|
this.log(JSON.stringify((0, web_url_1.withCommitmentUrl)(this.cliConfig.baseURL, result), null, 2));
|
|
77
105
|
return;
|
|
78
106
|
}
|
|
79
|
-
this.log(`${result.reused ? 'Reused existing' : 'Created'} commitment ${result.commitment?.id} from ${result.pack?.id}@${result.pack?.version}`);
|
|
107
|
+
this.log(`${result.reused ? 'Reused existing' : 'Created'} commitment ${result.commitment?.id} from ${result.pack?.id ?? result.plan?.pack?.id}@${result.pack?.version ?? result.plan?.pack?.version}`);
|
|
108
|
+
const loop = result.spaceLoop;
|
|
109
|
+
if (loop) {
|
|
110
|
+
const holder = loop.holder === 'space_lead' ? ' (the Space lead)' : '';
|
|
111
|
+
this.log(`Space loop: ${loop.spaceId}, held by ${loop.agentId}${holder}`);
|
|
112
|
+
const knowledge = describeKnowledgeDefault(loop.knowledgeScope);
|
|
113
|
+
if (knowledge)
|
|
114
|
+
this.log(`Space knowledge: ${knowledge}`);
|
|
115
|
+
}
|
|
116
|
+
for (const link of result.workLinks ?? []) {
|
|
117
|
+
this.log(`Linked ${link.targetType} ${link.targetId} (${link.roles.join(', ')})`);
|
|
118
|
+
}
|
|
80
119
|
const { url } = (0, web_url_1.withCommitmentUrl)(this.cliConfig.baseURL, {
|
|
81
120
|
id: result.commitment?.id,
|
|
82
121
|
});
|
|
@@ -86,3 +125,22 @@ class CommitmentsPackBind extends base_command_1.BaseCommand {
|
|
|
86
125
|
}
|
|
87
126
|
}
|
|
88
127
|
exports.default = CommitmentsPackBind;
|
|
128
|
+
/**
|
|
129
|
+
* The Space knowledge default a loop's home link reports
|
|
130
|
+
* (`CommitmentSpaceLoop.KNOWLEDGE_DEFAULT_OUTCOMES`), in words. Empty for an
|
|
131
|
+
* outcome this CLI does not know, rather than a guess.
|
|
132
|
+
*/
|
|
133
|
+
function describeKnowledgeDefault(scope) {
|
|
134
|
+
switch (scope?.default) {
|
|
135
|
+
case 'applied':
|
|
136
|
+
return "on — the loop reads this Space's memory and wiki";
|
|
137
|
+
case 'owner_declared':
|
|
138
|
+
return `${scope.enabled ? 'on' : 'off'}, as its owner had already set it`;
|
|
139
|
+
case 'owner_decision_required':
|
|
140
|
+
return 'off until its owner turns it on (it was bound with an Agent or token credential)';
|
|
141
|
+
case 'not_applied':
|
|
142
|
+
return 'off — the default could not be written, so it stays off until its owner turns it on';
|
|
143
|
+
default:
|
|
144
|
+
return '';
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -13,7 +13,10 @@ export default class CommitmentsPackPlan extends BaseCommand {
|
|
|
13
13
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
14
|
pack: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
15
|
'pack-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
-
agent: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
space: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
goal: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'interval-minutes': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
20
|
repository: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
21
|
'required-check': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
22
|
'installation-id': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -14,6 +14,8 @@ class CommitmentsPackPlan extends base_command_1.BaseCommand {
|
|
|
14
14
|
static description = 'Draft the Commitment a Pack would create, without creating it (read-only)';
|
|
15
15
|
static examples = [
|
|
16
16
|
'<%= config.bin %> commitments pack plan --pack pr_ci_guardian --agent <agent-id> --repository owner/repo --required-check "Pipeline Summary"',
|
|
17
|
+
'<%= config.bin %> commitments pack plan --pack <pack-id> --space <space-id>',
|
|
18
|
+
'<%= config.bin %> commitments pack plan --pack goal_advance --space <space-id> --goal <goal-id>',
|
|
17
19
|
];
|
|
18
20
|
static flags = {
|
|
19
21
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
@@ -24,7 +26,20 @@ class CommitmentsPackPlan extends base_command_1.BaseCommand {
|
|
|
24
26
|
'pack-version': core_1.Flags.string({
|
|
25
27
|
description: 'Pack version (defaults to the latest installed)',
|
|
26
28
|
}),
|
|
27
|
-
agent: core_1.Flags.string({
|
|
29
|
+
agent: core_1.Flags.string({
|
|
30
|
+
description: 'Agent ID that will hold the Commitment (with --space, defaults to the Space lead)',
|
|
31
|
+
}),
|
|
32
|
+
space: core_1.Flags.string({
|
|
33
|
+
description: "Space ID to bind the Pack into as that Space's loop",
|
|
34
|
+
}),
|
|
35
|
+
goal: core_1.Flags.string({
|
|
36
|
+
description: 'Goal ID the Pack advances (goal_advance; the Goal must be in --space)',
|
|
37
|
+
}),
|
|
38
|
+
'interval-minutes': core_1.Flags.integer({
|
|
39
|
+
description: "How often a goal_advance loop looks when nothing wakes it, in minutes (default one day; the Goal's events wake it sooner)",
|
|
40
|
+
min: 1,
|
|
41
|
+
max: 30 * 24 * 60,
|
|
42
|
+
}),
|
|
28
43
|
repository: core_1.Flags.string({ description: 'Repository the Pack binds to, as owner/repo' }),
|
|
29
44
|
'required-check': core_1.Flags.string({
|
|
30
45
|
description: 'Required CI check name (repeatable). Must match a real Check Run name.',
|
|
@@ -38,12 +53,20 @@ class CommitmentsPackPlan extends base_command_1.BaseCommand {
|
|
|
38
53
|
// Check NAMES are free text and legitimately contain commas, so they are
|
|
39
54
|
// never comma-split the way an id list would be.
|
|
40
55
|
const requiredChecks = (flags['required-check'] ?? []).map((c) => c.trim()).filter(Boolean);
|
|
56
|
+
if (!flags.agent && !flags.space) {
|
|
57
|
+
this.error('Pass --agent (the Agent that holds it) or --space (bind it into a Space).', {
|
|
58
|
+
exit: 1,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
41
61
|
let result;
|
|
42
62
|
try {
|
|
43
63
|
result = await commitments_1.commitmentPackApi.plan({
|
|
44
64
|
packId: flags.pack,
|
|
45
65
|
...(flags['pack-version'] ? { version: flags['pack-version'] } : {}),
|
|
46
|
-
agentId: flags.agent,
|
|
66
|
+
...(flags.agent ? { agentId: flags.agent } : {}),
|
|
67
|
+
...(flags.space ? { spaceId: flags.space } : {}),
|
|
68
|
+
...(flags.goal ? { goalId: flags.goal } : {}),
|
|
69
|
+
...(flags['interval-minutes'] ? { intervalMs: flags['interval-minutes'] * 60_000 } : {}),
|
|
47
70
|
...(flags.repository ? { repository: flags.repository } : {}),
|
|
48
71
|
...(requiredChecks.length ? { requiredChecks } : {}),
|
|
49
72
|
...(flags['installation-id'] ? { installationId: flags['installation-id'] } : {}),
|
|
@@ -59,6 +82,11 @@ class CommitmentsPackPlan extends base_command_1.BaseCommand {
|
|
|
59
82
|
}
|
|
60
83
|
this.log(`Pack: ${result.pack?.id}@${result.pack?.version}`);
|
|
61
84
|
this.log(`planDigest: ${result.planDigest}`);
|
|
85
|
+
const placement = result.spacePlacement;
|
|
86
|
+
if (placement) {
|
|
87
|
+
const holder = placement.holder === 'space_lead' ? ' (the Space lead)' : '';
|
|
88
|
+
this.log(`Space loop: ${placement.spaceId}, held by ${placement.agentId}${holder}`);
|
|
89
|
+
}
|
|
62
90
|
this.log('\nNothing was created. Pass this digest to `skrr commitments pack bind --plan-digest`.');
|
|
63
91
|
}
|
|
64
92
|
}
|
|
@@ -32,7 +32,7 @@ const commitments_1 = require("../../lib/commitments");
|
|
|
32
32
|
*/
|
|
33
33
|
class CommitmentsUpdate extends base_command_1.BaseCommand {
|
|
34
34
|
static description = "Update a commitment's contract (title, target, cadence, sources). A cadence is manual, an interval or daily clock times; " +
|
|
35
|
-
'
|
|
35
|
+
'activeHours and daysOfWeek in --from-json select hours and weekdays. No holiday, business-day or trading-calendar fields';
|
|
36
36
|
static examples = [
|
|
37
37
|
'<%= config.bin %> commitments update <commitment-id> --cadence 12h',
|
|
38
38
|
'<%= config.bin %> commitments update <commitment-id> --title "Ship v2 (Q3)" --outcome "v2 is live for all users"',
|
|
@@ -43,7 +43,7 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
|
|
|
43
43
|
<%= config.bin %> commitments show <commitment-id> --json
|
|
44
44
|
cat > commitment-patch.json <<'JSON'
|
|
45
45
|
{
|
|
46
|
-
"cadence": { "mode": "
|
|
46
|
+
"cadence": { "mode": "interval", "intervalMs": 3600000, "activeHours": { "start": "09:00", "end": "22:00" }, "daysOfWeek": ["mon", "tue", "wed", "thu", "fri"], "timezone": "Asia/Shanghai" },
|
|
47
47
|
"policy": { "executionBudget": { "maxObservationRunsPerDay": 0 } }
|
|
48
48
|
}
|
|
49
49
|
JSON
|
|
@@ -350,6 +350,12 @@ JSON
|
|
|
350
350
|
delete cadence.jitterRatio;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
+
if (!['interval', 'daily', 'event_plus_interval'].includes(String(cadence.mode)) &&
|
|
354
|
+
!Object.hasOwn(authoredCadence ?? {}, 'activeHours'))
|
|
355
|
+
delete cadence.activeHours;
|
|
356
|
+
if (!['interval', 'event_plus_interval', 'daily'].includes(String(cadence.mode)) &&
|
|
357
|
+
!Object.hasOwn(authoredCadence ?? {}, 'daysOfWeek'))
|
|
358
|
+
delete cadence.daysOfWeek;
|
|
353
359
|
payload.cadence = cadence;
|
|
354
360
|
if (payload.expectedVersion === undefined && current?.version !== undefined) {
|
|
355
361
|
payload.expectedVersion = current.version;
|
|
@@ -45,7 +45,7 @@ class Completion extends base_command_1.BaseCommand {
|
|
|
45
45
|
const { args, flags } = await this.parse(Completion);
|
|
46
46
|
// This is intentionally best-effort. `completion` is useful before login
|
|
47
47
|
// and when offline; static manifest-derived suggestions still work either way.
|
|
48
|
-
await (0, completion_index_1.refreshCompletionIndex)(this.config.cacheDir);
|
|
48
|
+
await (0, completion_index_1.refreshCompletionIndex)(this.config.cacheDir, this.completionCacheScope());
|
|
49
49
|
if (flags['refresh-cache'])
|
|
50
50
|
return;
|
|
51
51
|
const shell = args.shell;
|
|
@@ -19,7 +19,7 @@ class CompletionValues extends base_command_1.BaseCommand {
|
|
|
19
19
|
async run() {
|
|
20
20
|
const { args } = await this.parse(CompletionValues);
|
|
21
21
|
// Never log or fail here: shell command substitution treats output as data.
|
|
22
|
-
const values = await (0, completion_index_1.completionCandidates)(this.config.cacheDir, args.kind, args.query ?? '');
|
|
22
|
+
const values = await (0, completion_index_1.completionCandidates)(this.config.cacheDir, this.completionCacheScope(), args.kind, args.query ?? '');
|
|
23
23
|
if (values.length > 0)
|
|
24
24
|
this.log(values.join('\n'));
|
|
25
25
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const computer_use_1 = require("../../lib/computer-use");
|
|
4
4
|
class ComputerUseAudio extends computer_use_1.ComputerUseCommand {
|
|
5
|
+
static strict = false;
|
|
5
6
|
static summary = 'Configure optional computer audio with status, enable or disable';
|
|
6
7
|
static description = 'Flags are forwarded unchanged. Run `skrrd computer-use audio --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
|
|
7
8
|
action = 'audio';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const computer_use_1 = require("../../lib/computer-use");
|
|
4
4
|
class ComputerUseBrowser extends computer_use_1.ComputerUseCommand {
|
|
5
|
+
static strict = false;
|
|
5
6
|
static summary = 'Configure original Chrome, inspect its extension, and manage its native host';
|
|
6
7
|
static description = 'Actions: status, enable, disable, setup, update, verify. Setup uses the original LCU installer: private relay files belong to the selected skrr profile, while native-host registration is shared by the desktop account and supported Chromium browsers. Verify initializes the original MCP schema without browser actions. Flags are forwarded unchanged; run `skrrd computer-use browser --help` for all options.';
|
|
7
8
|
static examples = [
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const computer_use_1 = require("../../lib/computer-use");
|
|
4
4
|
class ComputerUseDisable extends computer_use_1.ComputerUseCommand {
|
|
5
|
+
static strict = false;
|
|
5
6
|
static summary = 'Revoke Computer Use consent and stop the active controller';
|
|
6
7
|
static description = 'Flags are forwarded unchanged. Run `skrrd computer-use disable --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
|
|
7
8
|
action = 'disable';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const computer_use_1 = require("../../lib/computer-use");
|
|
4
4
|
class ComputerUseEnable extends computer_use_1.ComputerUseCommand {
|
|
5
|
+
static strict = false;
|
|
5
6
|
static summary = 'Enable Computer Use locally; --cloud-agents separately grants cloud Agent access';
|
|
6
7
|
static description = 'Flags are forwarded unchanged. Run `skrrd computer-use enable --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
|
|
7
8
|
action = 'enable';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const computer_use_1 = require("../../lib/computer-use");
|
|
4
4
|
class ComputerUse extends computer_use_1.ComputerUseCommand {
|
|
5
|
+
static strict = false;
|
|
5
6
|
static summary = 'Install and control optional Computer Use on this machine';
|
|
6
7
|
static description = 'Computer Use uses your installed official app runtime. Run `skrr computer-use status`; use `skrrd computer-use --help` for all options, including --profile and --json.';
|
|
7
8
|
action = undefined;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const computer_use_1 = require("../../lib/computer-use");
|
|
4
4
|
class ComputerUseInstall extends computer_use_1.ComputerUseCommand {
|
|
5
|
+
static strict = false;
|
|
5
6
|
static summary = 'Install a pinned thin release from an explicit local archive and trusted SHA-256';
|
|
6
7
|
static description = 'Flags are forwarded unchanged. Run `skrrd computer-use install --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
|
|
7
8
|
action = 'install';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const computer_use_1 = require("../../lib/computer-use");
|
|
4
4
|
class ComputerUseRecover extends computer_use_1.ComputerUseCommand {
|
|
5
|
+
static strict = false;
|
|
5
6
|
static summary = 'Retry runtime recovery only after confirmed execution cleanup';
|
|
6
7
|
static description = 'Flags are forwarded unchanged. Run `skrrd computer-use recover --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
|
|
7
8
|
action = 'recover';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const computer_use_1 = require("../../lib/computer-use");
|
|
4
4
|
class ComputerUseStatus extends computer_use_1.ComputerUseCommand {
|
|
5
|
+
static strict = false;
|
|
5
6
|
static summary = 'Show configuration and live Computer Use availability without desktop interaction';
|
|
6
7
|
static description = 'Flags are forwarded unchanged. Run `skrrd computer-use status --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
|
|
7
8
|
action = 'status';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const computer_use_1 = require("../../lib/computer-use");
|
|
4
4
|
class ComputerUseStop extends computer_use_1.ComputerUseCommand {
|
|
5
|
+
static strict = false;
|
|
5
6
|
static summary = 'Stop the running Computer Use controller and confirm cleanup';
|
|
6
7
|
static description = 'Flags are forwarded unchanged. Run `skrrd computer-use stop --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
|
|
7
8
|
action = 'stop';
|
package/dist/commands/context.js
CHANGED
|
@@ -26,9 +26,11 @@ class Context extends base_command_1.BaseCommand {
|
|
|
26
26
|
async run() {
|
|
27
27
|
const { flags } = await this.parse(Context);
|
|
28
28
|
const runtime = (0, runtime_context_1.readRuntimeContext)();
|
|
29
|
+
const unboundRuntime = !runtime.agent?.boundToSession;
|
|
30
|
+
const authResolution = this.authResolution();
|
|
29
31
|
// The task block must answer the same question an id-less `skrr tasks …`
|
|
30
32
|
// does, or a reader concludes "no task" while the next command it runs
|
|
31
|
-
// acts on the checked-out
|
|
33
|
+
// acts on the checked-out canonical task branch. The resolver's
|
|
32
34
|
// precedence is preserved exactly: runtime-bound sources first, the git
|
|
33
35
|
// branch only after them — a daemon-bound task must not silently become
|
|
34
36
|
// whichever branch is checked out.
|
|
@@ -55,6 +57,8 @@ class Context extends base_command_1.BaseCommand {
|
|
|
55
57
|
node: process.version,
|
|
56
58
|
},
|
|
57
59
|
server: this.cliConfig.baseURL,
|
|
60
|
+
// Additive provenance: `server` remains a string for existing scripts.
|
|
61
|
+
serverSource: authResolution.server.source,
|
|
58
62
|
profile: (0, keychain_1.getActiveProfile)(),
|
|
59
63
|
config: {
|
|
60
64
|
path: (0, config_1.getConfigPath)(),
|
|
@@ -66,6 +70,7 @@ class Context extends base_command_1.BaseCommand {
|
|
|
66
70
|
tokenKind: this.resolvedCredential?.kind ?? null,
|
|
67
71
|
account,
|
|
68
72
|
accountError,
|
|
73
|
+
resolution: authResolution,
|
|
69
74
|
},
|
|
70
75
|
/**
|
|
71
76
|
* The workspace this machine works in.
|
|
@@ -94,19 +99,20 @@ class Context extends base_command_1.BaseCommand {
|
|
|
94
99
|
writeAttribution: (0, task_write_attribution_1.runtimeWriteAttribution)(runtime),
|
|
95
100
|
warnings: [
|
|
96
101
|
...runtime.warnings,
|
|
97
|
-
...(
|
|
102
|
+
...(unboundRuntime ? [(0, task_write_attribution_1.runtimeWriteAttribution)(runtime).notice] : []),
|
|
98
103
|
],
|
|
104
|
+
setup: unboundRuntime ? { agentRuntime: (0, task_write_attribution_1.unboundRuntimeSetup)(this.config.bin) } : null,
|
|
99
105
|
agent: runtime.agent,
|
|
100
106
|
task: { ...runtime.task, resolved: resolvedTask },
|
|
101
107
|
conversation: runtime.conversation,
|
|
102
|
-
recommendations: recommendationsFor(runtime),
|
|
108
|
+
recommendations: recommendationsFor(runtime, this.config.bin),
|
|
103
109
|
};
|
|
104
110
|
if (flags.json) {
|
|
105
111
|
this.log(JSON.stringify(payload, null, 2));
|
|
106
112
|
return;
|
|
107
113
|
}
|
|
108
114
|
this.log(`Runtime: ${runtime.kind}`);
|
|
109
|
-
this.log(`Server: ${
|
|
115
|
+
this.log(`Server: ${authResolution.server.origin ?? 'configured server (invalid URL)'} (${payload.serverSource})`);
|
|
110
116
|
this.log(
|
|
111
117
|
// "Workspace", never "Space" — they are different things in this product
|
|
112
118
|
// and this whole workstream exists because the two got conflated.
|
|
@@ -126,8 +132,8 @@ class Context extends base_command_1.BaseCommand {
|
|
|
126
132
|
this.log(`Task: ${runtime.task.identifier ?? resolvedTask.id} (${resolvedTask.source})`);
|
|
127
133
|
}
|
|
128
134
|
this.log(`Task writes: ${payload.writeAttribution.notice}`);
|
|
129
|
-
if (
|
|
130
|
-
this.log(task_write_attribution_1.
|
|
135
|
+
if (unboundRuntime)
|
|
136
|
+
this.log((0, task_write_attribution_1.agentBindingGuidance)(this.config.bin));
|
|
131
137
|
if (runtime.warnings.length > 0) {
|
|
132
138
|
this.log('Warnings:');
|
|
133
139
|
for (const warning of runtime.warnings)
|
|
@@ -136,12 +142,11 @@ class Context extends base_command_1.BaseCommand {
|
|
|
136
142
|
}
|
|
137
143
|
}
|
|
138
144
|
exports.default = Context;
|
|
139
|
-
function recommendationsFor(runtime) {
|
|
145
|
+
function recommendationsFor(runtime, bin) {
|
|
140
146
|
const recommendations = [];
|
|
141
|
-
if (!runtime.agent)
|
|
142
|
-
recommendations.push(task_write_attribution_1.
|
|
143
|
-
|
|
144
|
-
else if (!runtime.agent.canonical) {
|
|
147
|
+
if (!runtime.agent?.boundToSession)
|
|
148
|
+
recommendations.push((0, task_write_attribution_1.agentBindingGuidance)(bin));
|
|
149
|
+
if (runtime.agent && !runtime.agent.canonical) {
|
|
145
150
|
recommendations.push('Prefer OVERSKY_SESSION_AGENT_ID over legacy OVERSKY_AGENT_ID in daemon runtimes.');
|
|
146
151
|
}
|
|
147
152
|
if (runtime.isDaemonSession && !runtime.session.requestId) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class DaemonDiagnostics extends Command {
|
|
3
|
+
static aliases: string[];
|
|
4
|
+
static summary: string;
|
|
5
|
+
static description: string;
|
|
6
|
+
static strict: boolean;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
run(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const exec_runtime_binary_1 = require("../../lib/exec-runtime-binary");
|
|
5
|
+
class DaemonDiagnostics extends core_1.Command {
|
|
6
|
+
// `skrr daemons <sub>` — the plural is advertised as an alias for the
|
|
7
|
+
// whole topic, and without a per-command alias only the bare topic
|
|
8
|
+
// resolved: every subcommand under it failed.
|
|
9
|
+
static aliases = ['daemons:diagnostics'];
|
|
10
|
+
static summary = 'Write a support bundle (status, logs, run history) as one text file, with secrets masked';
|
|
11
|
+
static description = (0, exec_runtime_binary_1.forwardedFlagsNote)('diagnostics');
|
|
12
|
+
static strict = false; // forward all args verbatim — see run()
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> daemon diagnostics',
|
|
15
|
+
'<%= config.bin %> daemon diagnostics --lines 1000',
|
|
16
|
+
'<%= config.bin %> daemon diagnostics --out -',
|
|
17
|
+
'<%= config.bin %> daemon diagnostics --profile work',
|
|
18
|
+
];
|
|
19
|
+
async run() {
|
|
20
|
+
// The bundle is what answers "send me your logs", so it is reached for when
|
|
21
|
+
// something is already wrong — often on a machine whose runtime has not been
|
|
22
|
+
// updated since before the verb existed. A bare forward would then be
|
|
23
|
+
// unsafe: a stale runtime treats a subcommand it does not know as `start`,
|
|
24
|
+
// which collides with the healthy daemon's singleton lock and reports an
|
|
25
|
+
// alarming startup failure instead of the real cause. So the runtime's
|
|
26
|
+
// top-level help is read first (it starts nothing), and only a runtime that
|
|
27
|
+
// positively lacks the verb is refused; one whose help cannot be read is
|
|
28
|
+
// forwarded to, as every other wrapper does.
|
|
29
|
+
//
|
|
30
|
+
// `this.argv`, NOT `this.parse()`: `strict = false` relaxes POSITIONAL arity
|
|
31
|
+
// and oclif still rejects any flag this command has not declared, which
|
|
32
|
+
// would make `--out` and `--lines` unreachable (OSK-296).
|
|
33
|
+
const argv = this.argv;
|
|
34
|
+
try {
|
|
35
|
+
if ((await (0, exec_runtime_binary_1.runtimeBinarySupportsSubcommand)('diagnostics')) === false) {
|
|
36
|
+
this.error('The installed skrr background service is older than this skrr CLI and has no ' +
|
|
37
|
+
'`diagnostics` command. Update it with `skrr daemon update`, then rerun ' +
|
|
38
|
+
'`skrr daemon diagnostics`. Until then `skrr daemon logs` prints its recent log; ' +
|
|
39
|
+
'do not stop a healthy running daemon to work around this.', { exit: 2 });
|
|
40
|
+
}
|
|
41
|
+
const code = await (0, exec_runtime_binary_1.execRuntimeBinary)(['diagnostics', ...argv]);
|
|
42
|
+
this.exit(code);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
if (err.message === 'runtime-binary-not-installed') {
|
|
46
|
+
this.log((0, exec_runtime_binary_1.notInstalledMessage)());
|
|
47
|
+
this.exit(127);
|
|
48
|
+
}
|
|
49
|
+
throw err;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.default = DaemonDiagnostics;
|
|
@@ -28,6 +28,7 @@ class Daemon extends core_1.Command {
|
|
|
28
28
|
'<%= config.bin %> daemon stop',
|
|
29
29
|
'<%= config.bin %> daemon update',
|
|
30
30
|
'<%= config.bin %> daemon logs',
|
|
31
|
+
'<%= config.bin %> daemon diagnostics',
|
|
31
32
|
'<%= config.bin %> daemon recover-offline-queue --apply',
|
|
32
33
|
'<%= config.bin %> daemon usage --refresh',
|
|
33
34
|
'<%= config.bin %> daemon byok status',
|
|
@@ -49,6 +50,7 @@ class Daemon extends core_1.Command {
|
|
|
49
50
|
this.log(' skrr daemon status — show running state and config');
|
|
50
51
|
this.log(' skrr daemon config — set config, e.g. a tool category: --mode bash=manual');
|
|
51
52
|
this.log(' skrr daemon logs — tail recent daemon logs');
|
|
53
|
+
this.log(' skrr daemon diagnostics — write a support bundle (status, logs) to send with a bug report');
|
|
52
54
|
this.log(' skrr daemon recover-offline-queue — restore recoverable offline WALs');
|
|
53
55
|
this.log(' skrr daemon usage — show local Claude Code and Codex usage limits');
|
|
54
56
|
this.log(' skrr daemon byok — manage local BYOK Keychain credentials');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DaemonMaintenanceCommand } from '../../../lib/daemon-maintenance-command';
|
|
2
|
+
export default class DaemonMaintenanceAttest extends DaemonMaintenanceCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
machine: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
ready: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
proceed: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
generation: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|