@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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { KeyResultEvidenceRef } from '@skrr-ai/data-provider';
|
|
2
|
+
import { BaseCommand } from '../../../base-command';
|
|
3
|
+
/**
|
|
4
|
+
* `skrr goals key-results assess <goal-id> <kr-id>` — record a judgment of a
|
|
5
|
+
* key result (OSK-17987, decision D4). Wraps
|
|
6
|
+
* `POST /api/goals/:goalId/key-results/:krId/assessments` (data-provider
|
|
7
|
+
* `assessKeyResult`).
|
|
8
|
+
*
|
|
9
|
+
* How a key result is going is a judgment, and an Agent may make it — marking
|
|
10
|
+
* it `done` included. Nothing is refused for what is judged; the server records
|
|
11
|
+
* WHO judged (from the authenticated runtime: a Run proves an Agent, otherwise
|
|
12
|
+
* the credential decides), why, and on what evidence, and keeps every judgment
|
|
13
|
+
* (`goals key-results history`). A person overrides by judging again.
|
|
14
|
+
*/
|
|
15
|
+
export default class GoalsKeyResultsAssess extends BaseCommand {
|
|
16
|
+
static description: string;
|
|
17
|
+
static examples: string[];
|
|
18
|
+
static args: {
|
|
19
|
+
goalId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
20
|
+
krId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
21
|
+
};
|
|
22
|
+
static flags: {
|
|
23
|
+
status: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
rationale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
evidence: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
|
+
progress: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
28
|
+
};
|
|
29
|
+
run(): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* `<kind>:<id-or-uri>` → a reference. A value that looks like a URL is a `uri`,
|
|
33
|
+
* anything else an `id` — the same reading `tasks expectations assess` uses.
|
|
34
|
+
* Exported for `assess.spec.ts`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function parseEvidenceRef(raw: string): KeyResultEvidenceRef;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseEvidenceRef = parseEvidenceRef;
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
6
|
+
const base_command_1 = require("../../../base-command");
|
|
7
|
+
const history_1 = require("./history");
|
|
8
|
+
/**
|
|
9
|
+
* `skrr goals key-results assess <goal-id> <kr-id>` — record a judgment of a
|
|
10
|
+
* key result (OSK-17987, decision D4). Wraps
|
|
11
|
+
* `POST /api/goals/:goalId/key-results/:krId/assessments` (data-provider
|
|
12
|
+
* `assessKeyResult`).
|
|
13
|
+
*
|
|
14
|
+
* How a key result is going is a judgment, and an Agent may make it — marking
|
|
15
|
+
* it `done` included. Nothing is refused for what is judged; the server records
|
|
16
|
+
* WHO judged (from the authenticated runtime: a Run proves an Agent, otherwise
|
|
17
|
+
* the credential decides), why, and on what evidence, and keeps every judgment
|
|
18
|
+
* (`goals key-results history`). A person overrides by judging again.
|
|
19
|
+
*/
|
|
20
|
+
class GoalsKeyResultsAssess extends base_command_1.BaseCommand {
|
|
21
|
+
static description = 'Record a judgment of a key result: its status, why, and what it rests on';
|
|
22
|
+
static examples = [
|
|
23
|
+
'<%= config.bin %> goals key-results assess <goal-id> <kr-id> --status at_risk --rationale "Signups flat for two weeks"',
|
|
24
|
+
'<%= config.bin %> goals key-results assess <goal-id> <kr-id> --status done --rationale "Shipped and adopted" --evidence task:OSK-42 --evidence url:https://example.com/dashboard',
|
|
25
|
+
'<%= config.bin %> goals key-results assess <goal-id> <kr-id> --status on_track --progress 60 --rationale "3 of 5 cohorts migrated"',
|
|
26
|
+
];
|
|
27
|
+
static args = {
|
|
28
|
+
goalId: core_1.Args.string({ description: 'Goal ID', required: true, ignoreStdin: true }),
|
|
29
|
+
krId: core_1.Args.string({ description: 'Key Result ID', required: true, ignoreStdin: true }),
|
|
30
|
+
};
|
|
31
|
+
static flags = {
|
|
32
|
+
status: core_1.Flags.string({
|
|
33
|
+
description: 'Your judgment of how the key result is going',
|
|
34
|
+
required: true,
|
|
35
|
+
options: [...data_provider_1.KEY_RESULT_STATUS_VALUES],
|
|
36
|
+
}),
|
|
37
|
+
rationale: core_1.Flags.string({
|
|
38
|
+
description: 'Why: what you looked at and what it showed',
|
|
39
|
+
required: true,
|
|
40
|
+
}),
|
|
41
|
+
evidence: core_1.Flags.string({
|
|
42
|
+
description: 'What it rests on, as <kind>:<id-or-uri> (repeatable)',
|
|
43
|
+
multiple: true,
|
|
44
|
+
}),
|
|
45
|
+
progress: core_1.Flags.integer({
|
|
46
|
+
description: 'Optional: how far along it is, 0–100',
|
|
47
|
+
min: 0,
|
|
48
|
+
max: 100,
|
|
49
|
+
}),
|
|
50
|
+
json: core_1.Flags.boolean({ description: 'Output the assessed key result as JSON' }),
|
|
51
|
+
};
|
|
52
|
+
async run() {
|
|
53
|
+
this.requireAuth();
|
|
54
|
+
const { args, flags } = await this.parse(GoalsKeyResultsAssess);
|
|
55
|
+
let evidenceRefs = [];
|
|
56
|
+
try {
|
|
57
|
+
evidenceRefs = (flags.evidence || []).map(parseEvidenceRef);
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
this.error(err.message, { exit: 1 });
|
|
61
|
+
}
|
|
62
|
+
let kr;
|
|
63
|
+
try {
|
|
64
|
+
kr = await data_provider_1.dataService.assessKeyResult({
|
|
65
|
+
goalId: args.goalId,
|
|
66
|
+
krId: args.krId,
|
|
67
|
+
data: {
|
|
68
|
+
status: flags.status,
|
|
69
|
+
rationale: flags.rationale,
|
|
70
|
+
...(flags.progress !== undefined ? { progress: flags.progress } : {}),
|
|
71
|
+
...(evidenceRefs.length > 0 ? { evidenceRefs } : {}),
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
catch (err) {
|
|
76
|
+
this.handleApiError(err);
|
|
77
|
+
}
|
|
78
|
+
// An unattended judgment the Space's write policy held for approval
|
|
79
|
+
// (`202 pending_approval`, OSK-17994): nothing was recorded yet.
|
|
80
|
+
if (this.reportHeldSpaceWrite(kr, { json: flags.json }))
|
|
81
|
+
return;
|
|
82
|
+
if (flags.json) {
|
|
83
|
+
this.printJsonResult(kr);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const k = kr;
|
|
87
|
+
// Echo what the SERVER recorded — in particular who it says judged, which
|
|
88
|
+
// is read from this process's credential and Run, not from anything sent.
|
|
89
|
+
this.log(`Assessed key result ${k.id ?? args.krId} on goal ${args.goalId}.`);
|
|
90
|
+
if (k.assessment) {
|
|
91
|
+
for (const line of (0, history_1.describeAssessment)(k.assessment))
|
|
92
|
+
this.log(line);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.default = GoalsKeyResultsAssess;
|
|
97
|
+
/**
|
|
98
|
+
* `<kind>:<id-or-uri>` → a reference. A value that looks like a URL is a `uri`,
|
|
99
|
+
* anything else an `id` — the same reading `tasks expectations assess` uses.
|
|
100
|
+
* Exported for `assess.spec.ts`.
|
|
101
|
+
*/
|
|
102
|
+
function parseEvidenceRef(raw) {
|
|
103
|
+
const split = raw.indexOf(':');
|
|
104
|
+
if (split < 1 || split === raw.length - 1) {
|
|
105
|
+
throw new Error(`--evidence must be <kind>:<id-or-uri> (got "${raw}")`);
|
|
106
|
+
}
|
|
107
|
+
const kind = raw.slice(0, split);
|
|
108
|
+
const value = raw.slice(split + 1);
|
|
109
|
+
return /^https?:|^file:/.test(value) ? { kind, uri: value } : { kind, id: value };
|
|
110
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { KeyResultAssessment } from '@skrr-ai/data-provider';
|
|
2
|
+
import { BaseCommand } from '../../../base-command';
|
|
3
|
+
/**
|
|
4
|
+
* `skrr goals key-results history <goal-id> <kr-id>` — every judgment of a key
|
|
5
|
+
* result, newest first (OSK-17987). Wraps
|
|
6
|
+
* `GET /api/goals/:goalId/key-results/:krId/assessments` (data-provider
|
|
7
|
+
* `listKeyResultAssessments`).
|
|
8
|
+
*
|
|
9
|
+
* Each row says who judged — `agent`, `person` or `automation`, as the server
|
|
10
|
+
* read it from the credential and Run, never as the writer claimed — and an
|
|
11
|
+
* override reads as one: a person's row directly above an agent's.
|
|
12
|
+
*/
|
|
13
|
+
export default class GoalsKeyResultsHistory extends BaseCommand {
|
|
14
|
+
static description: string;
|
|
15
|
+
static examples: string[];
|
|
16
|
+
static args: {
|
|
17
|
+
goalId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
18
|
+
krId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
19
|
+
};
|
|
20
|
+
static flags: {
|
|
21
|
+
limit: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
cursor: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
};
|
|
25
|
+
run(): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
/** `agent`, `person`, `automation` — what the server recorded, never guessed. */
|
|
28
|
+
export declare function describeAssessor(assessment: KeyResultAssessment | undefined | null): string;
|
|
29
|
+
/** The lines `assess` and `show` print for one judgment. */
|
|
30
|
+
export declare function describeAssessment(assessment: KeyResultAssessment): string[];
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.describeAssessor = describeAssessor;
|
|
4
|
+
exports.describeAssessment = describeAssessment;
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
7
|
+
const base_command_1 = require("../../../base-command");
|
|
8
|
+
const format_1 = require("../../../lib/format");
|
|
9
|
+
/**
|
|
10
|
+
* `skrr goals key-results history <goal-id> <kr-id>` — every judgment of a key
|
|
11
|
+
* result, newest first (OSK-17987). Wraps
|
|
12
|
+
* `GET /api/goals/:goalId/key-results/:krId/assessments` (data-provider
|
|
13
|
+
* `listKeyResultAssessments`).
|
|
14
|
+
*
|
|
15
|
+
* Each row says who judged — `agent`, `person` or `automation`, as the server
|
|
16
|
+
* read it from the credential and Run, never as the writer claimed — and an
|
|
17
|
+
* override reads as one: a person's row directly above an agent's.
|
|
18
|
+
*/
|
|
19
|
+
class GoalsKeyResultsHistory extends base_command_1.BaseCommand {
|
|
20
|
+
static description = "List a key result's judgments, newest first";
|
|
21
|
+
static examples = [
|
|
22
|
+
'<%= config.bin %> goals key-results history <goal-id> <kr-id>',
|
|
23
|
+
'<%= config.bin %> goals key-results history <goal-id> <kr-id> --limit 50 --json',
|
|
24
|
+
];
|
|
25
|
+
static args = {
|
|
26
|
+
goalId: core_1.Args.string({ description: 'Goal ID', required: true, ignoreStdin: true }),
|
|
27
|
+
krId: core_1.Args.string({ description: 'Key Result ID', required: true, ignoreStdin: true }),
|
|
28
|
+
};
|
|
29
|
+
static flags = {
|
|
30
|
+
limit: core_1.Flags.integer({ description: 'How many judgments to show (1–100)', min: 1, max: 100 }),
|
|
31
|
+
cursor: core_1.Flags.string({ description: 'Continue from a previous page' }),
|
|
32
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
33
|
+
};
|
|
34
|
+
async run() {
|
|
35
|
+
this.requireAuth();
|
|
36
|
+
const { args, flags } = await this.parse(GoalsKeyResultsHistory);
|
|
37
|
+
let page;
|
|
38
|
+
try {
|
|
39
|
+
page = await data_provider_1.dataService.listKeyResultAssessments(args.goalId, args.krId, {
|
|
40
|
+
...(flags.limit !== undefined ? { limit: flags.limit } : {}),
|
|
41
|
+
...(flags.cursor ? { cursor: flags.cursor } : {}),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
this.handleApiError(err);
|
|
46
|
+
}
|
|
47
|
+
if (flags.json) {
|
|
48
|
+
this.printJsonResult(page);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const entries = page?.data ?? [];
|
|
52
|
+
if (entries.length === 0) {
|
|
53
|
+
this.log('No judgments recorded for this key result.');
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
(0, format_1.renderTable)(entries.map((entry) => ({
|
|
57
|
+
rev: String(entry.revisionNumber ?? '-'),
|
|
58
|
+
at: formatAt(entry.assessment?.at),
|
|
59
|
+
status: String(entry.assessment?.status ?? '-'),
|
|
60
|
+
by: describeAssessor(entry.assessment),
|
|
61
|
+
progress: typeof entry.assessment?.progress === 'number'
|
|
62
|
+
? `${Math.round(entry.assessment.progress)}%`
|
|
63
|
+
: '-',
|
|
64
|
+
why: oneLine(entry.assessment?.rationale) || '(no reason given)',
|
|
65
|
+
})), [
|
|
66
|
+
{ key: 'rev', header: 'REV' },
|
|
67
|
+
{ key: 'at', header: 'AT' },
|
|
68
|
+
{ key: 'status', header: 'STATUS' },
|
|
69
|
+
{ key: 'by', header: 'BY' },
|
|
70
|
+
{ key: 'progress', header: 'PROGRESS' },
|
|
71
|
+
{ key: 'why', header: 'WHY', maxWidth: 60 },
|
|
72
|
+
], (line) => this.log(line));
|
|
73
|
+
if (page?.has_more && page.next_cursor) {
|
|
74
|
+
this.log(`More: --cursor ${page.next_cursor}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.default = GoalsKeyResultsHistory;
|
|
79
|
+
/** `agent`, `person`, `automation` — what the server recorded, never guessed. */
|
|
80
|
+
function describeAssessor(assessment) {
|
|
81
|
+
const kind = assessment?.assessedBy?.kind;
|
|
82
|
+
return kind === 'agent' || kind === 'person' || kind === 'automation' ? kind : 'unattributed';
|
|
83
|
+
}
|
|
84
|
+
/** The lines `assess` and `show` print for one judgment. */
|
|
85
|
+
function describeAssessment(assessment) {
|
|
86
|
+
const lines = [`Status: ${assessment.status} (${describeAssessor(assessment)})`];
|
|
87
|
+
if (typeof assessment.progress === 'number') {
|
|
88
|
+
lines.push(`Progress: ${Math.round(assessment.progress)}% (judged)`);
|
|
89
|
+
}
|
|
90
|
+
lines.push(`Why: ${oneLine(assessment.rationale) || '(no reason given)'}`);
|
|
91
|
+
for (const ref of assessment.evidenceRefs ?? []) {
|
|
92
|
+
lines.push(`Evidence: ${ref.kind}:${ref.id ?? ref.uri ?? ''}`);
|
|
93
|
+
}
|
|
94
|
+
if (assessment.runId)
|
|
95
|
+
lines.push(`Run: ${assessment.runId}`);
|
|
96
|
+
lines.push(`At: ${formatAt(assessment.at)}`);
|
|
97
|
+
return lines;
|
|
98
|
+
}
|
|
99
|
+
function oneLine(text) {
|
|
100
|
+
return typeof text === 'string' ? text.replace(/\s+/g, ' ').trim() : '';
|
|
101
|
+
}
|
|
102
|
+
function formatAt(at) {
|
|
103
|
+
return at ? String(at).slice(0, 19).replace('T', ' ') : '-';
|
|
104
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { BaseCommand } from '../../../base-command';
|
|
2
2
|
/**
|
|
3
3
|
* `skrr goals key-results list <goal-id>` — the goal's Key Results (the
|
|
4
|
-
* measurable OKR outcomes under it).
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `
|
|
4
|
+
* measurable OKR outcomes under it). PROGRESS is the current judgment's number
|
|
5
|
+
* when it stated one (decision D4), else the server-computed linked-task ratio
|
|
6
|
+
* for `auto` KRs and the stored `progress` for `manual` ones
|
|
7
|
+
* (`resolveKeyResultProgress`). BY is who set the status; TASKS DONE is the
|
|
8
|
+
* activity signal (linked tasks done / linked), shown beside the judgment.
|
|
8
9
|
*
|
|
9
10
|
* Wraps `GET /api/goals/:goalId/key-results` (data-provider `listKeyResults`).
|
|
10
11
|
*/
|
|
@@ -7,10 +7,11 @@ const base_command_1 = require("../../../base-command");
|
|
|
7
7
|
const format_1 = require("../../../lib/format");
|
|
8
8
|
/**
|
|
9
9
|
* `skrr goals key-results list <goal-id>` — the goal's Key Results (the
|
|
10
|
-
* measurable OKR outcomes under it).
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `
|
|
10
|
+
* measurable OKR outcomes under it). PROGRESS is the current judgment's number
|
|
11
|
+
* when it stated one (decision D4), else the server-computed linked-task ratio
|
|
12
|
+
* for `auto` KRs and the stored `progress` for `manual` ones
|
|
13
|
+
* (`resolveKeyResultProgress`). BY is who set the status; TASKS DONE is the
|
|
14
|
+
* activity signal (linked tasks done / linked), shown beside the judgment.
|
|
14
15
|
*
|
|
15
16
|
* Wraps `GET /api/goals/:goalId/key-results` (data-provider `listKeyResults`).
|
|
16
17
|
*/
|
|
@@ -50,13 +51,17 @@ class GoalsKeyResultsList extends base_command_1.BaseCommand {
|
|
|
50
51
|
.sort((a, b) => (a.order ?? 0) - (b.order ?? 0))
|
|
51
52
|
.map((kr) => {
|
|
52
53
|
const progress = (0, data_provider_1.resolveKeyResultProgress)(kr);
|
|
54
|
+
const activity = (0, data_provider_1.resolveKeyResultActivity)(kr);
|
|
53
55
|
return {
|
|
54
56
|
id: String(kr.id ?? '-'),
|
|
55
57
|
title: String(kr.title ?? '-'),
|
|
56
58
|
status: String(kr.status ?? '-'),
|
|
59
|
+
// Who set the status: the server's reading of the credential and Run.
|
|
60
|
+
by: (0, data_provider_1.keyResultAssessorKind)(kr) ?? '-',
|
|
57
61
|
mode: String(kr.progressMode ?? '-'),
|
|
58
62
|
progress: typeof progress === 'number' ? `${Math.round(progress)}%` : '-',
|
|
59
|
-
|
|
63
|
+
// Linked tasks done — activity beside the judgment, not the progress.
|
|
64
|
+
activity: activity ? `${activity.done}/${activity.total}` : '-',
|
|
60
65
|
order: String(kr.order ?? 0),
|
|
61
66
|
};
|
|
62
67
|
});
|
|
@@ -64,9 +69,10 @@ class GoalsKeyResultsList extends base_command_1.BaseCommand {
|
|
|
64
69
|
{ key: 'id', header: 'ID' },
|
|
65
70
|
{ key: 'title', header: 'TITLE', maxWidth: 44 },
|
|
66
71
|
{ key: 'status', header: 'STATUS' },
|
|
72
|
+
{ key: 'by', header: 'BY' },
|
|
67
73
|
{ key: 'mode', header: 'MODE' },
|
|
68
74
|
{ key: 'progress', header: 'PROGRESS' },
|
|
69
|
-
{ key: '
|
|
75
|
+
{ key: 'activity', header: 'TASKS DONE' },
|
|
70
76
|
{ key: 'order', header: 'ORDER' },
|
|
71
77
|
], (line) => this.log(line));
|
|
72
78
|
}
|
|
@@ -2,8 +2,10 @@ import { BaseCommand } from '../../../base-command';
|
|
|
2
2
|
/**
|
|
3
3
|
* `skrr goals key-results show <goal-id> <kr-id>` — full detail for one key
|
|
4
4
|
* result. Wraps `GET /api/goals/:goalId/key-results/:krId` (data-provider
|
|
5
|
-
* `getKeyResult`).
|
|
6
|
-
*
|
|
5
|
+
* `getKeyResult`). Progress is the current judgment's number when it stated
|
|
6
|
+
* one (decision D4); otherwise the server-computed value for `auto` KRs and the
|
|
7
|
+
* stored `progress` for `manual` ones. Linked-task completion is printed
|
|
8
|
+
* separately as ACTIVITY, and the status says who set it.
|
|
7
9
|
*/
|
|
8
10
|
export default class GoalsKeyResultsShow extends BaseCommand {
|
|
9
11
|
static description: string;
|
|
@@ -3,11 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
4
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
5
|
const base_command_1 = require("../../../base-command");
|
|
6
|
+
const history_1 = require("./history");
|
|
6
7
|
/**
|
|
7
8
|
* `skrr goals key-results show <goal-id> <kr-id>` — full detail for one key
|
|
8
9
|
* result. Wraps `GET /api/goals/:goalId/key-results/:krId` (data-provider
|
|
9
|
-
* `getKeyResult`).
|
|
10
|
-
*
|
|
10
|
+
* `getKeyResult`). Progress is the current judgment's number when it stated
|
|
11
|
+
* one (decision D4); otherwise the server-computed value for `auto` KRs and the
|
|
12
|
+
* stored `progress` for `manual` ones. Linked-task completion is printed
|
|
13
|
+
* separately as ACTIVITY, and the status says who set it.
|
|
11
14
|
*/
|
|
12
15
|
class GoalsKeyResultsShow extends base_command_1.BaseCommand {
|
|
13
16
|
static description = 'Show a key result';
|
|
@@ -38,18 +41,36 @@ class GoalsKeyResultsShow extends base_command_1.BaseCommand {
|
|
|
38
41
|
}
|
|
39
42
|
const k = kr;
|
|
40
43
|
const progress = (0, data_provider_1.resolveKeyResultProgress)(k);
|
|
44
|
+
const assessment = (0, data_provider_1.currentKeyResultAssessment)(k);
|
|
45
|
+
const activity = (0, data_provider_1.resolveKeyResultActivity)(k);
|
|
41
46
|
this.log(`ID: ${k.id}`);
|
|
42
47
|
this.log(`Goal: ${k.goalId}`);
|
|
43
48
|
this.log(`Title: ${k.title}`);
|
|
44
49
|
if (k.description) {
|
|
45
50
|
this.log(`Description: ${k.description}`);
|
|
46
51
|
}
|
|
47
|
-
this.log(`Status: ${k.status}`);
|
|
52
|
+
this.log(`Status: ${k.status} ${assessment ? `(${(0, history_1.describeAssessor)(assessment)})` : '(not assessed)'}`);
|
|
48
53
|
this.log(`Mode: ${k.progressMode}`);
|
|
49
54
|
this.log(`Progress: ${typeof progress === 'number' ? `${Math.round(progress)}%` : '-'}`);
|
|
50
|
-
if (
|
|
55
|
+
if (typeof assessment?.progress === 'number') {
|
|
56
|
+
this.log(' (judged in the latest assessment)');
|
|
57
|
+
}
|
|
58
|
+
else if (k.progressMode === 'auto') {
|
|
51
59
|
this.log(` (computed from ${k._linkedTaskCount ?? 0} linked task(s))`);
|
|
52
60
|
}
|
|
61
|
+
this.log(`Activity: ${activity ? `${activity.done} of ${activity.total} linked task(s) done` : '-'}`);
|
|
62
|
+
if (assessment) {
|
|
63
|
+
const why = assessment.rationale?.replace(/\s+/g, ' ').trim();
|
|
64
|
+
this.log(`Judged: ${String(assessment.at ?? '')
|
|
65
|
+
.slice(0, 19)
|
|
66
|
+
.replace('T', ' ')}`);
|
|
67
|
+
this.log(`Why: ${why || '(no reason given)'}`);
|
|
68
|
+
for (const ref of assessment.evidenceRefs ?? []) {
|
|
69
|
+
this.log(`Evidence: ${ref.kind}:${ref.id ?? ref.uri ?? ''}`);
|
|
70
|
+
}
|
|
71
|
+
if (assessment.runId)
|
|
72
|
+
this.log(`Run: ${assessment.runId}`);
|
|
73
|
+
}
|
|
53
74
|
this.log(`Order: ${k.order ?? 0}`);
|
|
54
75
|
}
|
|
55
76
|
}
|
|
@@ -4,6 +4,10 @@ import { BaseCommand } from '../../../base-command';
|
|
|
4
4
|
* `PATCH /api/goals/:goalId/key-results/:krId` (data-provider `updateKeyResult`).
|
|
5
5
|
* Only the fields you pass change. `--clear-description` sends `description:
|
|
6
6
|
* null`, the server's signal to clear the field (distinct from an empty string).
|
|
7
|
+
*
|
|
8
|
+
* `--status` and `--progress` are a judgment (decision D4): the server records
|
|
9
|
+
* them as an assessment with who made it and no reason. To say why and on what
|
|
10
|
+
* evidence, use `goals key-results assess`.
|
|
7
11
|
*/
|
|
8
12
|
export default class GoalsKeyResultsUpdate extends BaseCommand {
|
|
9
13
|
static description: string;
|
|
@@ -6,11 +6,16 @@ const core_1 = require("@oclif/core");
|
|
|
6
6
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
7
7
|
const base_command_1 = require("../../../base-command");
|
|
8
8
|
const prompt_1 = require("../../../lib/prompt");
|
|
9
|
+
const history_1 = require("./history");
|
|
9
10
|
/**
|
|
10
11
|
* `skrr goals key-results update <goal-id> <kr-id>` — patch a key result. Wraps
|
|
11
12
|
* `PATCH /api/goals/:goalId/key-results/:krId` (data-provider `updateKeyResult`).
|
|
12
13
|
* Only the fields you pass change. `--clear-description` sends `description:
|
|
13
14
|
* null`, the server's signal to clear the field (distinct from an empty string).
|
|
15
|
+
*
|
|
16
|
+
* `--status` and `--progress` are a judgment (decision D4): the server records
|
|
17
|
+
* them as an assessment with who made it and no reason. To say why and on what
|
|
18
|
+
* evidence, use `goals key-results assess`.
|
|
14
19
|
*/
|
|
15
20
|
class GoalsKeyResultsUpdate extends base_command_1.BaseCommand {
|
|
16
21
|
static description = 'Update a key result';
|
|
@@ -92,6 +97,10 @@ class GoalsKeyResultsUpdate extends base_command_1.BaseCommand {
|
|
|
92
97
|
catch (err) {
|
|
93
98
|
this.handleApiError(err);
|
|
94
99
|
}
|
|
100
|
+
// A status or progress edit is a judgment the Space's write policy may hold
|
|
101
|
+
// for approval (`202 pending_approval`, OSK-17994): nothing was changed yet.
|
|
102
|
+
if (this.reportHeldSpaceWrite(updated, { json: flags.json }))
|
|
103
|
+
return;
|
|
95
104
|
if (flags.json) {
|
|
96
105
|
this.log(JSON.stringify(updated, null, 2));
|
|
97
106
|
return;
|
|
@@ -106,10 +115,15 @@ class GoalsKeyResultsUpdate extends base_command_1.BaseCommand {
|
|
|
106
115
|
.map((field) => `${field}=${describeField(k, field)}`)
|
|
107
116
|
.join(' ');
|
|
108
117
|
this.log(`Updated key result ${k.id ?? args.krId} on goal ${args.goalId}: ${echo}`);
|
|
109
|
-
//
|
|
110
|
-
//
|
|
111
|
-
|
|
112
|
-
|
|
118
|
+
// A status or progress edit is recorded as a judgment; say whose the server
|
|
119
|
+
// recorded it as (read from this credential and Run, not from anything
|
|
120
|
+
// sent), and that it carries no reason.
|
|
121
|
+
if (flags.status !== undefined || flags.progress !== undefined) {
|
|
122
|
+
const assessment = k.assessment;
|
|
123
|
+
if (assessment) {
|
|
124
|
+
this.log(`Recorded as a judgment by: ${(0, history_1.describeAssessor)(assessment)}, with no reason given. ` +
|
|
125
|
+
'Use `goals key-results assess --rationale` to say why.');
|
|
126
|
+
}
|
|
113
127
|
}
|
|
114
128
|
// `done` beside `25%` on one row, with nothing reconciling them. The two
|
|
115
129
|
// ARE independent axes — a key result can be closed out incomplete, and
|
|
@@ -148,23 +162,3 @@ function describeField(kr, field) {
|
|
|
148
162
|
return '(not returned)';
|
|
149
163
|
return typeof value === 'string' ? value : JSON.stringify(value);
|
|
150
164
|
}
|
|
151
|
-
/**
|
|
152
|
-
* Why an `auto` key result reads as `-` from the CLI.
|
|
153
|
-
*
|
|
154
|
-
* Auto progress is computed from tasks linked to THIS key result
|
|
155
|
-
* (`Task.keyResultIds`), and the task↔key-result link is a DOCUMENTED
|
|
156
|
-
* omission from the CLI surface — it sits in `domain-api-parity.spec.ts`'s
|
|
157
|
-
* allowlist with a stated reason. So `--progress-mode auto` is offered by a
|
|
158
|
-
* surface that cannot make it move, and `resolveKeyResultProgress` renders
|
|
159
|
-
* `_computedProgress ?? null` for auto, i.e. `-`, while a `--progress` value
|
|
160
|
-
* you set is stored and returned by `update`.
|
|
161
|
-
*
|
|
162
|
-
* The result was one CLI reporting two different values for one field: the
|
|
163
|
-
* write echoed 40 and the list showed `-`. Saying so at the point of use is
|
|
164
|
-
* the honest fix; silently rendering the stored number instead would hide a
|
|
165
|
-
* real distinction (a manual value is not a computed one), and adding the
|
|
166
|
-
* link command would reverse a recorded decision.
|
|
167
|
-
*/
|
|
168
|
-
const AUTO_MODE_NOTE = 'Auto progress is computed from tasks linked to this key result, and linking a task to a key ' +
|
|
169
|
-
'result is deliberately not in the CLI — so this reads as "-" here until it is linked ' +
|
|
170
|
-
'elsewhere. Use --progress-mode manual to track a number from the CLI.';
|
|
@@ -23,7 +23,12 @@ const TIMEOUT_STATUSES = new Set([408, 504, 524]);
|
|
|
23
23
|
* to run later. Everything else (`goal_archived`, `goal_planner_disabled`, …)
|
|
24
24
|
* needs the user to change something first, so a script retrying it would spin.
|
|
25
25
|
*/
|
|
26
|
-
const TRANSIENT_SKIP_REASONS = new Set([
|
|
26
|
+
const TRANSIENT_SKIP_REASONS = new Set([
|
|
27
|
+
'lock_held',
|
|
28
|
+
'not_due',
|
|
29
|
+
'schedule_superseded',
|
|
30
|
+
'goal_turn_unreadable',
|
|
31
|
+
]);
|
|
27
32
|
/**
|
|
28
33
|
* Turn the planner's internal `reason` enum into a sentence.
|
|
29
34
|
*
|
|
@@ -66,6 +71,10 @@ function describePlannerReason(reason) {
|
|
|
66
71
|
return 'the planner ran and found nothing to add or refine';
|
|
67
72
|
case 'one_voice_busy':
|
|
68
73
|
return 'another agent was already speaking for this owner, so the tick stayed quiet';
|
|
74
|
+
case 'goal_loop_holds_turn':
|
|
75
|
+
return "a goal_advance loop holds this goal's planning turn, so the planner stood down (ask the loop instead: `commitments check-now <id>`; cancelling it or detaching its advance link hands the goal back)";
|
|
76
|
+
case 'goal_turn_unreadable':
|
|
77
|
+
return 'whether a goal_advance loop holds this goal could not be read, so the planner did not run';
|
|
69
78
|
default:
|
|
70
79
|
// `one_voice_<something>` is a family the server composes at run time.
|
|
71
80
|
if (reason.startsWith('one_voice_')) {
|
|
@@ -199,9 +208,11 @@ class GoalsPlanNow extends base_command_1.BaseCommand {
|
|
|
199
208
|
const retry = transient
|
|
200
209
|
? ` Re-run \`${this.config.bin} goals plan-now ${args.id}\` to try again.`
|
|
201
210
|
: '';
|
|
211
|
+
const loop = r?.commitmentId ? ` The loop is commitment ${r.commitmentId}.` : '';
|
|
202
212
|
this.failWithCliError({
|
|
203
213
|
message: `The planner did not run for goal ${args.id}` +
|
|
204
214
|
(reasonText ? `: ${reasonText}.` : '.') +
|
|
215
|
+
loop +
|
|
205
216
|
backfilled +
|
|
206
217
|
retry,
|
|
207
218
|
code: 'PLANNER_TICK_NOT_RUN',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type GoalPlanningComparison } from '@skrr-ai/data-provider';
|
|
2
|
+
import { BaseCommand } from '../../base-command';
|
|
3
|
+
/** The comparison as the lines the command prints. Pure, so it is tested as such. */
|
|
4
|
+
export declare function comparisonLines(result: GoalPlanningComparison): string[];
|
|
5
|
+
/**
|
|
6
|
+
* `skrr goals planner-compare <goal-id>` (OSK-18012): GoalPlanner beside the
|
|
7
|
+
* Goal's `goal_advance` loop, read from `GET /api/goals/:goalId/planning-comparison`.
|
|
8
|
+
*
|
|
9
|
+
* What it is for: the evidence to retire the planner for this Goal. Over a
|
|
10
|
+
* window of at least seven days in which each holder held the Goal: the loop
|
|
11
|
+
* turned at the Goal's pace (its turns and the planner ticks it held), it judged
|
|
12
|
+
* the key results (the planner never does), its open and failed work is no
|
|
13
|
+
* worse than the planner's, the key results it held over moved no worse, and
|
|
14
|
+
* concurrent turns are 0. Every stop of the loop is explained in its Cycles
|
|
15
|
+
* (`commitments cycles <id>`).
|
|
16
|
+
*/
|
|
17
|
+
export default class GoalsPlannerCompare extends BaseCommand {
|
|
18
|
+
static description: string;
|
|
19
|
+
static examples: string[];
|
|
20
|
+
static args: {
|
|
21
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
22
|
+
};
|
|
23
|
+
static flags: {
|
|
24
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
25
|
+
days: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
|
+
since: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
until: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
|
+
};
|
|
29
|
+
run(): Promise<void>;
|
|
30
|
+
}
|