@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,186 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.spaceProposalsApi = exports.SpaceProposalDecisionError = void 0;
|
|
4
|
+
exports.spaceMemoryProducerLine = spaceMemoryProducerLine;
|
|
5
|
+
exports.spaceProposalRow = spaceProposalRow;
|
|
6
|
+
exports.spaceProposalDetailLines = spaceProposalDetailLines;
|
|
7
|
+
exports.emptySpaceInboxLines = emptySpaceInboxLines;
|
|
8
|
+
/**
|
|
9
|
+
* The Space proposals inbox on the CLI (OSK-17993): `skrr spaces proposals
|
|
10
|
+
* list|keep|discard`.
|
|
11
|
+
*
|
|
12
|
+
* The inbox is a READ-TIME projection (`GET /api/spaces/:spaceId/proposals`).
|
|
13
|
+
* It has no decision endpoint of its own, and neither does this file: a keep
|
|
14
|
+
* or discard is sent to the endpoint the ITEM names (`decisionRoute`), which
|
|
15
|
+
* is the owning object's existing one, and that endpoint authorizes the
|
|
16
|
+
* decider. One entry per route kind in `DECIDERS`; the record type makes a
|
|
17
|
+
* new route kind fail to compile here until it is given one.
|
|
18
|
+
*/
|
|
19
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
20
|
+
class SpaceProposalDecisionError extends Error {
|
|
21
|
+
code;
|
|
22
|
+
constructor(message, code) {
|
|
23
|
+
super(message);
|
|
24
|
+
this.code = code;
|
|
25
|
+
this.name = 'SpaceProposalDecisionError';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.SpaceProposalDecisionError = SpaceProposalDecisionError;
|
|
29
|
+
const DECIDERS = {
|
|
30
|
+
// The Proposal Inbox's own decision endpoint, pinned to the reviewed revision.
|
|
31
|
+
proposal_inbox: (route, input) => {
|
|
32
|
+
if (!input.expected) {
|
|
33
|
+
throw new SpaceProposalDecisionError('This proposal is decided against the exact revision you reviewed: pass --expected with ' +
|
|
34
|
+
'the REVISION JSON that `spaces proposals list` printed for it.', 'PROPOSAL_EXPECTED_REQUIRED');
|
|
35
|
+
}
|
|
36
|
+
return data_provider_1.dataService.decideProposal(route.kind, route.sourceId, {
|
|
37
|
+
decision: input.decision,
|
|
38
|
+
expected: input.expected,
|
|
39
|
+
...(input.reason ? { reason: input.reason } : {}),
|
|
40
|
+
...(input.reasonCode ? { reasonCode: input.reasonCode } : {}),
|
|
41
|
+
via: 'cli',
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
// A suggestion on a page (OSK-17997): its own decision endpoint. Keep is
|
|
45
|
+
// accept, which applies a page revision proposal to the page.
|
|
46
|
+
doc_suggestion: (route, input) => data_provider_1.dataService.decideDocCommentSuggestion({
|
|
47
|
+
docType: route.docType,
|
|
48
|
+
docId: route.docId,
|
|
49
|
+
threadId: route.threadId,
|
|
50
|
+
decision: input.decision === 'keep' ? 'accept' : 'reject',
|
|
51
|
+
}),
|
|
52
|
+
// The Memory Store's own commit/reject, through the Agent that proposed it.
|
|
53
|
+
memory_store_proposal: (route, input) => {
|
|
54
|
+
if (!route.agentId) {
|
|
55
|
+
throw new SpaceProposalDecisionError('This Memory proposal names no Agent to decide it through.', 'PROPOSAL_DECISION_UNAVAILABLE');
|
|
56
|
+
}
|
|
57
|
+
return data_provider_1.dataService.decideAgentMemoryStoreProposal(route.agentId, route.storeId, route.proposalId, input.decision === 'keep' ? 'commit' : 'reject', { spaceId: route.spaceId, ...(input.reason ? { reason: input.reason } : {}) });
|
|
58
|
+
},
|
|
59
|
+
// The Learning service's own doors on the Space's lessons (OSK-17998), pinned
|
|
60
|
+
// to the version the item was listed at. The key is the decision on that
|
|
61
|
+
// version, so a retry replays rather than deciding twice.
|
|
62
|
+
space_lesson: (route, input) => {
|
|
63
|
+
const idempotencyKey = (0, data_provider_1.spaceLessonDecisionKey)(input.decision, route);
|
|
64
|
+
if (input.decision === 'keep') {
|
|
65
|
+
return data_provider_1.dataService.promoteSpaceLesson(route.spaceId, route.storeId, route.memoryId, {
|
|
66
|
+
expectedVersionId: route.expectedVersionId,
|
|
67
|
+
idempotencyKey,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return data_provider_1.dataService.dismissSpaceLesson(route.spaceId, route.storeId, route.memoryId, {
|
|
71
|
+
expectedVersionId: route.expectedVersionId,
|
|
72
|
+
idempotencyKey,
|
|
73
|
+
reason: data_provider_1.SPACE_LESSON_DISMISS_REASON_FOR[input.reasonCode || 'other'],
|
|
74
|
+
...(input.reason ? { note: input.reason } : {}),
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
exports.spaceProposalsApi = {
|
|
79
|
+
list(spaceId, params = {}) {
|
|
80
|
+
return data_provider_1.dataService.listSpaceProposals(spaceId, params);
|
|
81
|
+
},
|
|
82
|
+
show(spaceId, itemId) {
|
|
83
|
+
return data_provider_1.dataService.getSpaceProposal(spaceId, itemId);
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* Send one decision to the endpoint `item.decisionRoute` names. Refuses
|
|
87
|
+
* before any transport when the item says the caller cannot take it.
|
|
88
|
+
*/
|
|
89
|
+
decide(item, input) {
|
|
90
|
+
if (!item.canDecide || !item.availableDecisions.includes(input.decision)) {
|
|
91
|
+
const why = item.undecidableReason
|
|
92
|
+
? data_provider_1.PROPOSAL_UNDECIDABLE_TEXT[item.undecidableReason]
|
|
93
|
+
: `It does not take "${input.decision}"`;
|
|
94
|
+
throw new SpaceProposalDecisionError(`You cannot ${input.decision} ${item.id}: ${why}.`, 'PROPOSAL_DECISION_UNAVAILABLE');
|
|
95
|
+
}
|
|
96
|
+
const route = item.decisionRoute;
|
|
97
|
+
const decider = DECIDERS[route.via];
|
|
98
|
+
if (!decider) {
|
|
99
|
+
throw new SpaceProposalDecisionError(`This CLI does not know how to decide a ${route.via} item; update skrr.`, 'PROPOSAL_DECISION_ROUTE_UNKNOWN');
|
|
100
|
+
}
|
|
101
|
+
return decider(route, input);
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Who made a Space Memory proposal when it was not the Agent it names
|
|
106
|
+
* (OSK-18000, `memory.producer`). The Agent is named as the one it was filed
|
|
107
|
+
* through, never as its author. A producer this build predates is shown by its
|
|
108
|
+
* own name.
|
|
109
|
+
*/
|
|
110
|
+
const MEMORY_PRODUCER_TEXT = {
|
|
111
|
+
autodream: 'suggested by the daily memory consolidation for this space',
|
|
112
|
+
};
|
|
113
|
+
/** The attribution line of a Memory proposal the platform made, or null for the Agent's own. */
|
|
114
|
+
function spaceMemoryProducerLine(item) {
|
|
115
|
+
const producer = item.kind === 'memory_proposal' ? item.memory?.producer : undefined;
|
|
116
|
+
if (!producer)
|
|
117
|
+
return null;
|
|
118
|
+
const said = MEMORY_PRODUCER_TEXT[producer] || `suggested by the platform (${producer})`;
|
|
119
|
+
const agent = item.agent?.name || item.agent?.id;
|
|
120
|
+
return agent ? `${said}, filed through agent ${agent}` : said;
|
|
121
|
+
}
|
|
122
|
+
const SCOPE_LABEL = {
|
|
123
|
+
space_write: 'held write',
|
|
124
|
+
space_loop: 'space loop',
|
|
125
|
+
space_memory: 'memory',
|
|
126
|
+
space_page: 'page',
|
|
127
|
+
space_skill: 'skill',
|
|
128
|
+
};
|
|
129
|
+
/** One row of `spaces proposals list`, in the order printed. */
|
|
130
|
+
function spaceProposalRow(item) {
|
|
131
|
+
let note = '—';
|
|
132
|
+
if (item.canDecide)
|
|
133
|
+
note = 'you can decide';
|
|
134
|
+
else if (item.undecidableReason && item.undecidableReason !== 'settled')
|
|
135
|
+
note = data_provider_1.PROPOSAL_UNDECIDABLE_TEXT[item.undecidableReason];
|
|
136
|
+
const scope = item.scopes.map((value) => SCOPE_LABEL[value] || value).join(', ');
|
|
137
|
+
const elsewhere = item.writesElsewhere
|
|
138
|
+
? ` (+${item.writesElsewhere} write${item.writesElsewhere === 1 ? '' : 's'} elsewhere)`
|
|
139
|
+
: '';
|
|
140
|
+
return {
|
|
141
|
+
id: item.id,
|
|
142
|
+
title: `${item.title}${elsewhere}`,
|
|
143
|
+
scope,
|
|
144
|
+
disposition: item.disposition,
|
|
145
|
+
deadline: item.deadline || '—',
|
|
146
|
+
note,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The lines under the table: the writes each held bundle would make here, and,
|
|
151
|
+
* for a bundle the caller can decide, the exact revision to pin `keep` to.
|
|
152
|
+
*/
|
|
153
|
+
function spaceProposalDetailLines(item, binName) {
|
|
154
|
+
const lines = [];
|
|
155
|
+
for (const write of item.writes || []) {
|
|
156
|
+
lines.push(` ${item.id} ${write.operation} ${write.title || write.taskId || ''}`.trimEnd());
|
|
157
|
+
}
|
|
158
|
+
if (item.kind === 'memory_proposal' && item.memory?.claim) {
|
|
159
|
+
lines.push(` ${item.id} ${item.memory.path || ''}: ${item.memory.claim}`.trimEnd());
|
|
160
|
+
}
|
|
161
|
+
const produced = spaceMemoryProducerLine(item);
|
|
162
|
+
if (produced)
|
|
163
|
+
lines.push(` ${item.id} ${produced}`);
|
|
164
|
+
if (item.kind === 'page_suggestion' && item.page) {
|
|
165
|
+
const where = item.page.anchor
|
|
166
|
+
? (0, data_provider_1.describePageSectionAnchor)(item.page.anchor)
|
|
167
|
+
: 'the marked text';
|
|
168
|
+
lines.push(` ${item.id} ${item.page.pageTitle || item.page.pageId}: ${where}`);
|
|
169
|
+
if (item.page.truncated)
|
|
170
|
+
lines.push(` ${item.id} (texts shortened here; open the page to read all of it)`);
|
|
171
|
+
}
|
|
172
|
+
if (item.kind === 'space_lesson' && item.lesson) {
|
|
173
|
+
const steps = item.lesson.steps === 1 ? '1 step' : `${item.lesson.steps ?? 0} steps`;
|
|
174
|
+
lines.push(` ${item.id} skill: ${item.lesson.goal || item.title} (${steps})`);
|
|
175
|
+
}
|
|
176
|
+
if (item.canDecide && item.decisionRoute.via === 'proposal_inbox') {
|
|
177
|
+
lines.push(` ${binName} spaces proposals keep ${item.spaceId} ${item.id} --expected '${JSON.stringify(item.decisionRoute.expected)}'`);
|
|
178
|
+
}
|
|
179
|
+
return lines;
|
|
180
|
+
}
|
|
181
|
+
/** What an empty page means: "none" only once the inbox is exhausted. */
|
|
182
|
+
function emptySpaceInboxLines(nextCursor) {
|
|
183
|
+
return nextCursor
|
|
184
|
+
? ['No proposals on this page; the cursor below continues.']
|
|
185
|
+
: ['No proposals for this space.'];
|
|
186
|
+
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* "publish" actually sends) are unit-testable without a CLI harness. That is
|
|
7
7
|
* the same split `lib/workflow-templates.ts` uses for the sibling domain.
|
|
8
8
|
*/
|
|
9
|
+
import type { InstantiateSpaceTemplateOutcomes } from '@skrr-ai/data-provider';
|
|
9
10
|
export type CliFailure = {
|
|
10
11
|
code: string;
|
|
11
12
|
message: string;
|
|
@@ -119,4 +120,11 @@ export declare function buildCreatePayload({ body, title, description, shortDesc
|
|
|
119
120
|
}): BuildResult<Record<string, unknown>>;
|
|
120
121
|
/** Section name → row count, for the human-readable `show` / `create` output. */
|
|
121
122
|
export declare function summarizeSnapshot(snapshot: unknown): string;
|
|
123
|
+
/**
|
|
124
|
+
* One line per wiki page an install created as something other than what the
|
|
125
|
+
* template carried — today, a template charter created as an ordinary page
|
|
126
|
+
* because the Space already held a live charter. Pages that installed as they
|
|
127
|
+
* were print nothing; `--json` carries every page's outcome.
|
|
128
|
+
*/
|
|
129
|
+
export declare function wikiPageInstallNotices(outcomes: InstantiateSpaceTemplateOutcomes | undefined): string[];
|
|
122
130
|
export {};
|
|
@@ -16,6 +16,8 @@ exports.buildVisibilityPayload = buildVisibilityPayload;
|
|
|
16
16
|
exports.buildForkPayload = buildForkPayload;
|
|
17
17
|
exports.buildCreatePayload = buildCreatePayload;
|
|
18
18
|
exports.summarizeSnapshot = summarizeSnapshot;
|
|
19
|
+
exports.wikiPageInstallNotices = wikiPageInstallNotices;
|
|
20
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
19
21
|
/**
|
|
20
22
|
* `slotRef=agentId` pairs → the `agentMapping` record the API takes.
|
|
21
23
|
*
|
|
@@ -254,3 +256,18 @@ function summarizeSnapshot(snapshot) {
|
|
|
254
256
|
.map(([key, value]) => `${value.length} ${key}`);
|
|
255
257
|
return parts.length ? parts.join(', ') : 'empty snapshot';
|
|
256
258
|
}
|
|
259
|
+
const [, INSTALLED_AS_DOC] = data_provider_1.TEMPLATE_WIKI_PAGE_INSTALL_OUTCOMES;
|
|
260
|
+
/**
|
|
261
|
+
* One line per wiki page an install created as something other than what the
|
|
262
|
+
* template carried — today, a template charter created as an ordinary page
|
|
263
|
+
* because the Space already held a live charter. Pages that installed as they
|
|
264
|
+
* were print nothing; `--json` carries every page's outcome.
|
|
265
|
+
*/
|
|
266
|
+
function wikiPageInstallNotices(outcomes) {
|
|
267
|
+
return (outcomes?.wikiPages ?? [])
|
|
268
|
+
.filter((page) => page.outcome === INSTALLED_AS_DOC)
|
|
269
|
+
.map((page) => {
|
|
270
|
+
const existing = page.charterPageId ? ` (${page.charterPageId})` : '';
|
|
271
|
+
return `Note: the template's charter "${page.title}" was added as an ordinary page (${page.pageId}), because this space already has a charter${existing} and a space holds one at a time.`;
|
|
272
|
+
});
|
|
273
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Space write policy on the CLI (OSK-17988): how `skrr spaces write-policy`
|
|
3
|
+
* prints a policy, and how every task write prints a write the Space held for
|
|
4
|
+
* approval (`202 { status: 'pending_approval' }`).
|
|
5
|
+
*
|
|
6
|
+
* The vocabulary and the effective-mode reading are `@skrr-ai/data-provider`'s
|
|
7
|
+
* (`spaces/writePolicy.ts`); the server sends the effective rows, and this file
|
|
8
|
+
* only prints them, so the CLI cannot show a mode the server does not apply.
|
|
9
|
+
*/
|
|
10
|
+
import type { SpaceWritePendingResponse, SpaceWritePolicyResponse } from '@skrr-ai/data-provider';
|
|
11
|
+
/** A task write the Space write policy held for approval (`202`), not a written task. */
|
|
12
|
+
export declare function isSpaceWritePendingResponse(value: unknown): value is SpaceWritePendingResponse;
|
|
13
|
+
/** The lines `spaces write-policy show` prints. */
|
|
14
|
+
export declare function writePolicyLines(view: SpaceWritePolicyResponse): string[];
|
|
15
|
+
/**
|
|
16
|
+
* The lines a task command prints when the Space held its write for approval.
|
|
17
|
+
* Says plainly that nothing was written, where the approval is, and how to
|
|
18
|
+
* look at it.
|
|
19
|
+
*/
|
|
20
|
+
export declare function spaceWritePendingLines(body: SpaceWritePendingResponse, { binName }: {
|
|
21
|
+
binName: string;
|
|
22
|
+
}): string[];
|
|
23
|
+
/** Map a `--member-automation` / `--principal-automation` value to a stored cell (`default` resets). */
|
|
24
|
+
export declare function cellValue(value: string | undefined): string | null | undefined;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isSpaceWritePendingResponse = isSpaceWritePendingResponse;
|
|
4
|
+
exports.writePolicyLines = writePolicyLines;
|
|
5
|
+
exports.spaceWritePendingLines = spaceWritePendingLines;
|
|
6
|
+
exports.cellValue = cellValue;
|
|
7
|
+
/**
|
|
8
|
+
* The status a held write answers with. Typed as the contract's own literal, so
|
|
9
|
+
* a rename in `@skrr-ai/data-provider` fails to compile here; a value rather
|
|
10
|
+
* than an import so that every task command, which calls this on every write,
|
|
11
|
+
* does not depend on the package's runtime surface.
|
|
12
|
+
*/
|
|
13
|
+
const PENDING_STATUS = 'pending_approval';
|
|
14
|
+
/** A task write the Space write policy held for approval (`202`), not a written task. */
|
|
15
|
+
function isSpaceWritePendingResponse(value) {
|
|
16
|
+
return Boolean(value &&
|
|
17
|
+
typeof value === 'object' &&
|
|
18
|
+
value.status === PENDING_STATUS &&
|
|
19
|
+
value.proposal);
|
|
20
|
+
}
|
|
21
|
+
const WRITER_LABEL = {
|
|
22
|
+
principal_automation: "the Space's own automation (its execution principal)",
|
|
23
|
+
member_automation: "other members' agents",
|
|
24
|
+
};
|
|
25
|
+
const MODE_LABEL = {
|
|
26
|
+
auto: 'auto (written at once)',
|
|
27
|
+
propose: 'propose (held for approval)',
|
|
28
|
+
refuse: 'refuse',
|
|
29
|
+
};
|
|
30
|
+
/** The lines `spaces write-policy show` prints. */
|
|
31
|
+
function writePolicyLines(view) {
|
|
32
|
+
const lines = [`Write policy for space ${view.spaceId}`];
|
|
33
|
+
let currentClass = '';
|
|
34
|
+
for (const row of view.rows) {
|
|
35
|
+
if (row.writeClass !== currentClass) {
|
|
36
|
+
currentClass = row.writeClass;
|
|
37
|
+
lines.push('', ` ${row.writeClass}`);
|
|
38
|
+
}
|
|
39
|
+
const notes = [];
|
|
40
|
+
if (row.source === 'default')
|
|
41
|
+
notes.push('default');
|
|
42
|
+
else
|
|
43
|
+
notes.push(`set; default ${row.default}`);
|
|
44
|
+
if (row.capped)
|
|
45
|
+
notes.push(`the Workspace requires approval for ${row.writeClass}, so stored "auto" reads as propose`);
|
|
46
|
+
// A class with no proposal path yet refuses what it would hold (OSK-17994);
|
|
47
|
+
// a page class holds only a body write, as a suggestion (OSK-17997).
|
|
48
|
+
// `proposalPath` is absent from a server older than the field.
|
|
49
|
+
if (row.mode === 'propose' && row.proposalPath === null)
|
|
50
|
+
notes.push('cannot be proposed yet, so an unattended write is refused');
|
|
51
|
+
if (row.mode === 'propose' && row.proposalPath === 'page_suggestion')
|
|
52
|
+
notes.push('a body edit becomes a suggestion on the page; other page changes are refused');
|
|
53
|
+
// OSK-17998: a new skill is proposed as a lesson; nothing else about skills can be.
|
|
54
|
+
if (row.mode === 'propose' && row.proposalPath === 'space_lesson')
|
|
55
|
+
notes.push('a new skill is proposed as a lesson a person promotes; a removal or pin is refused');
|
|
56
|
+
lines.push(` ${(WRITER_LABEL[row.writerClass] || row.writerClass).padEnd(52)} ${MODE_LABEL[row.mode] || row.mode} (${notes.join('; ')})`);
|
|
57
|
+
}
|
|
58
|
+
if (view.requireApprovalActionClasses.length) {
|
|
59
|
+
lines.push('', `Workspace approval ceiling: ${view.requireApprovalActionClasses.join(', ')} can never be auto here.`);
|
|
60
|
+
}
|
|
61
|
+
lines.push('', 'Interactive writes (a person in the app or at their own CLI) are not governed by this policy.');
|
|
62
|
+
return lines;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The lines a task command prints when the Space held its write for approval.
|
|
66
|
+
* Says plainly that nothing was written, where the approval is, and how to
|
|
67
|
+
* look at it.
|
|
68
|
+
*/
|
|
69
|
+
function spaceWritePendingLines(body, { binName }) {
|
|
70
|
+
const proposal = body.proposal;
|
|
71
|
+
if (proposal.kind === 'page_suggestion') {
|
|
72
|
+
// A page revision proposal (OSK-17997): a suggestion thread on the page,
|
|
73
|
+
// decided from the Space inbox or on the page itself.
|
|
74
|
+
const lines = [
|
|
75
|
+
'Held for approval: nothing was written yet.',
|
|
76
|
+
body.message,
|
|
77
|
+
`Suggestion: ${proposal.id} on page ${proposal.pageId || ''}`.trimEnd(),
|
|
78
|
+
];
|
|
79
|
+
if (proposal.duplicate)
|
|
80
|
+
lines.push('The same suggestion was already pending; it was not made twice.');
|
|
81
|
+
if (proposal.spaceId) {
|
|
82
|
+
lines.push(`Review it: ${binName} spaces proposals list ${proposal.spaceId} --kind page_suggestion`);
|
|
83
|
+
}
|
|
84
|
+
return lines;
|
|
85
|
+
}
|
|
86
|
+
const lines = [
|
|
87
|
+
'Held for approval: nothing was written yet.',
|
|
88
|
+
body.message,
|
|
89
|
+
`Approval bundle: ${proposal.id} (item ${proposal.itemId})`,
|
|
90
|
+
];
|
|
91
|
+
if (proposal.commitmentId) {
|
|
92
|
+
lines.push(`Review it: ${binName} commitments action-proposals ${proposal.commitmentId}`);
|
|
93
|
+
}
|
|
94
|
+
if (proposal.expiresAt)
|
|
95
|
+
lines.push(`Expires: ${proposal.expiresAt}`);
|
|
96
|
+
return lines;
|
|
97
|
+
}
|
|
98
|
+
/** Map a `--member-automation` / `--principal-automation` value to a stored cell (`default` resets). */
|
|
99
|
+
function cellValue(value) {
|
|
100
|
+
if (value === undefined)
|
|
101
|
+
return undefined;
|
|
102
|
+
return value === 'default' ? null : value;
|
|
103
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic capabilities advertised by a CLI that can safely render Task Agent
|
|
3
|
+
* Context recovery instructions. This ships with the CLI (unlike build-only
|
|
4
|
+
* scripts) so an installed package never depends on the source checkout.
|
|
5
|
+
*
|
|
6
|
+
* The release build validates this exact compiled module against the API
|
|
7
|
+
* catalog and the oclif manifest generated for that release.
|
|
8
|
+
*/
|
|
9
|
+
export declare const TASK_AGENT_CONTEXT_COMMAND_IDS: readonly ["tasks:context", "tasks:preflight", "tasks:show", "tasks:start-receipt", "tasks:retry-receipt"];
|
|
10
|
+
export declare function taskAgentContextCommandCapability(commandId: string): string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TASK_AGENT_CONTEXT_COMMAND_IDS = void 0;
|
|
4
|
+
exports.taskAgentContextCommandCapability = taskAgentContextCommandCapability;
|
|
5
|
+
/**
|
|
6
|
+
* Semantic capabilities advertised by a CLI that can safely render Task Agent
|
|
7
|
+
* Context recovery instructions. This ships with the CLI (unlike build-only
|
|
8
|
+
* scripts) so an installed package never depends on the source checkout.
|
|
9
|
+
*
|
|
10
|
+
* The release build validates this exact compiled module against the API
|
|
11
|
+
* catalog and the oclif manifest generated for that release.
|
|
12
|
+
*/
|
|
13
|
+
exports.TASK_AGENT_CONTEXT_COMMAND_IDS = [
|
|
14
|
+
'tasks:context',
|
|
15
|
+
'tasks:preflight',
|
|
16
|
+
'tasks:show',
|
|
17
|
+
'tasks:start-receipt',
|
|
18
|
+
'tasks:retry-receipt',
|
|
19
|
+
];
|
|
20
|
+
function taskAgentContextCommandCapability(commandId) {
|
|
21
|
+
return `task-agent-context.command.${commandId.replace(/:/g, '-')}.v1`;
|
|
22
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CommandManifest } from './command-manifest';
|
|
2
|
+
export declare const TASK_AGENT_CONTEXT_CAPABILITIES_HEADER = "X-Skrr-Task-Context-Capabilities";
|
|
3
|
+
export declare function taskAgentContextCapabilities(manifest: CommandManifest): string[];
|
|
4
|
+
/**
|
|
5
|
+
* The header is a UI compatibility declaration, never a permission claim.
|
|
6
|
+
* If the local manifest cannot be read we advertise nothing and let the
|
|
7
|
+
* server produce an explicit verification/update recovery state.
|
|
8
|
+
*/
|
|
9
|
+
export declare function taskAgentContextRequestHeaders(rootDir: string): Record<string, string>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TASK_AGENT_CONTEXT_CAPABILITIES_HEADER = void 0;
|
|
4
|
+
exports.taskAgentContextCapabilities = taskAgentContextCapabilities;
|
|
5
|
+
exports.taskAgentContextRequestHeaders = taskAgentContextRequestHeaders;
|
|
6
|
+
const command_manifest_1 = require("./command-manifest");
|
|
7
|
+
const task_agent_context_capabilities_1 = require("./task-agent-context-capabilities");
|
|
8
|
+
exports.TASK_AGENT_CONTEXT_CAPABILITIES_HEADER = 'X-Skrr-Task-Context-Capabilities';
|
|
9
|
+
function taskAgentContextCapabilities(manifest) {
|
|
10
|
+
const commands = manifest.commands ?? {};
|
|
11
|
+
return task_agent_context_capabilities_1.TASK_AGENT_CONTEXT_COMMAND_IDS
|
|
12
|
+
.filter((commandId) => Boolean(commands[commandId]))
|
|
13
|
+
.map((commandId) => (0, task_agent_context_capabilities_1.taskAgentContextCommandCapability)(commandId));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The header is a UI compatibility declaration, never a permission claim.
|
|
17
|
+
* If the local manifest cannot be read we advertise nothing and let the
|
|
18
|
+
* server produce an explicit verification/update recovery state.
|
|
19
|
+
*/
|
|
20
|
+
function taskAgentContextRequestHeaders(rootDir) {
|
|
21
|
+
try {
|
|
22
|
+
const capabilities = taskAgentContextCapabilities((0, command_manifest_1.loadCommandManifest)(rootDir));
|
|
23
|
+
return capabilities.length > 0
|
|
24
|
+
? { [exports.TASK_AGENT_CONTEXT_CAPABILITIES_HEADER]: capabilities.join(',') }
|
|
25
|
+
: {};
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -24,6 +24,8 @@ export interface TaskAssetLedgerResource {
|
|
|
24
24
|
expectationIds?: string[];
|
|
25
25
|
}
|
|
26
26
|
export interface UploadedTaskAsset {
|
|
27
|
+
/** Success is returned only after the server verifies the stored attachment. */
|
|
28
|
+
status: 'ready';
|
|
27
29
|
/** The canonical Task relationship and exact Resource version recorded by this upload. */
|
|
28
30
|
resourceReceipt?: TaskResourceWriteReceipt;
|
|
29
31
|
id: string;
|
|
@@ -62,6 +64,8 @@ export declare function uploadTaskAssetFile(opts: {
|
|
|
62
64
|
filePath: string;
|
|
63
65
|
role?: TaskAssetRole;
|
|
64
66
|
ledger?: TaskAssetLedgerResource;
|
|
67
|
+
/** Resume only this exact existing multipart attachment; never create a replacement intent. */
|
|
68
|
+
resumeAttachmentId?: string;
|
|
65
69
|
}): Promise<UploadedTaskAsset>;
|
|
66
70
|
/**
|
|
67
71
|
* Upload every `--attach` file and return the reference objects an Update or
|
|
@@ -82,6 +86,24 @@ export declare function taskAssetMarkdownRef(asset: {
|
|
|
82
86
|
id: string;
|
|
83
87
|
filename: string;
|
|
84
88
|
}): string;
|
|
89
|
+
export type TaskAssetUploadRecovery = {
|
|
90
|
+
taskId: string;
|
|
91
|
+
attachmentId: string;
|
|
92
|
+
sessionId?: string;
|
|
93
|
+
transport: 'multipart';
|
|
94
|
+
};
|
|
95
|
+
/** A bounded recovery receipt, never a storage credential or claim that bytes are ready. */
|
|
96
|
+
export declare function taskAssetUploadRecovery(error: unknown): TaskAssetUploadRecovery | undefined;
|
|
97
|
+
/** PUT one bounded file range and report only the actual storage receipt and streamed bytes. */
|
|
98
|
+
export declare function putFilePartToStorage(p: {
|
|
99
|
+
uploadUrl: string;
|
|
100
|
+
filePath: string;
|
|
101
|
+
offset: number;
|
|
102
|
+
byteLength: number;
|
|
103
|
+
}): Promise<{
|
|
104
|
+
etag: string;
|
|
105
|
+
byteLength: number;
|
|
106
|
+
}>;
|
|
85
107
|
/** sha256 of a file, read as a stream: a 250MB recording never sits in memory. */
|
|
86
108
|
export declare function sha256OfFile(filePath: string): Promise<string>;
|
|
87
109
|
/**
|