workbite 0.1.18 → 0.1.20
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/README.md +183 -155
- package/bin/workbite.js +13 -13
- package/lib/agent.js +240 -240
- package/lib/archive.js +334 -334
- package/lib/boot-provenance.js +54 -54
- package/lib/cli.js +334 -324
- package/lib/common.js +68 -68
- package/lib/diagnostics.js +238 -238
- package/lib/download.js +53 -53
- package/lib/install.js +274 -274
- package/lib/mcp-task-context.js +188 -0
- package/lib/mcp.js +671 -612
- package/lib/private-state.js +116 -116
- package/lib/runtime.js +775 -775
- package/lib/startup-lock.js +71 -71
- package/lib/transfer.js +113 -113
- package/lib/update.js +86 -0
- package/package.json +35 -30
- package/release.json +24 -17
- package/skills/workbite-native/SKILL.md +126 -98
- package/skills/workbite-native/agents/openai.yaml +4 -4
- package/skills/workbite-native/references/commands.md +213 -213
- package/skills/workbite-native/references/task-fields.md +208 -208
- package/skills/workbite-native/references/transfer.md +204 -204
|
@@ -1,204 +1,204 @@
|
|
|
1
|
-
# Task graph transfer (unreleased source)
|
|
2
|
-
|
|
3
|
-
Use this workflow only for an explicitly requested cross-workspace Task
|
|
4
|
-
transfer, and only when the installed native client advertises each exact
|
|
5
|
-
command and flag. This reference describes additive source work; it is not
|
|
6
|
-
a release or installation claim. An unavailable command, owner route or
|
|
7
|
-
required proof stops that operation. Do not emulate it with per-Task writes,
|
|
8
|
-
raw HTTP, file copies or legacy apply. Never start an owner or backend to
|
|
9
|
-
make a transfer command work.
|
|
10
|
-
|
|
11
|
-
## Bind and preview
|
|
12
|
-
|
|
13
|
-
Read source and destination status separately. Record each absolute workspace
|
|
14
|
-
path and independently verified UID; Task display IDs alone do not identify
|
|
15
|
-
a workspace. The source and destination each need their already running,
|
|
16
|
-
verified WorkBite owner. Bind the explicit pair on every command below.
|
|
17
|
-
`SOURCE_ABS`, `SOURCE_UUID`, `TARGET_ABS`, `TARGET_UUID` and digest placeholders
|
|
18
|
-
must be replaced with the verified values. Files contain private workspace
|
|
19
|
-
data; choose a private local destination and do not publish them.
|
|
20
|
-
|
|
21
|
-
```text
|
|
22
|
-
workbite agent --workspace SOURCE_ABS --workspace-uid SOURCE_UUID export --output tasks-transfer.json
|
|
23
|
-
workbite agent --workspace TARGET_ABS --workspace-uid TARGET_UUID import --input-file tasks-transfer.json --mode new --dry-run
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Export options `--include-history` and `--redact` are used only when
|
|
27
|
-
advertised and appropriate to the requested result. Check the actual export
|
|
28
|
-
projection before claiming redacted content can reproduce an unredacted
|
|
29
|
-
workspace. Current `--redact` replaces Task titles, Objective text/quarter,
|
|
30
|
-
and Key Result text/target, clears Task detail/tags/notes/subtasks, and keeps
|
|
31
|
-
IDs, graph links, statuses and numeric progress. It refuses
|
|
32
|
-
`--include-history` together with `--redact`. The remaining graph and IDs may
|
|
33
|
-
still identify the source. `--include-history` projects observable event
|
|
34
|
-
IDs/types/Task IDs/timestamps and planning-status facts, excluding the private
|
|
35
|
-
idempotency ledger and opaque event details. Default export does not promise
|
|
36
|
-
full history. Output is validated and published privately/atomically; an existing output file is refused,
|
|
37
|
-
not overwritten. Without `--output`, inspect the advertised stdout form.
|
|
38
|
-
|
|
39
|
-
The UTF-8 envelope format is `workbite.task-transfer.v1`, containing
|
|
40
|
-
`source_workspace_uid`, `tasks`, `objectives` (including Key Results), optional
|
|
41
|
-
`source_history` and `source_digest`. The source digest binds the canonical
|
|
42
|
-
payload with its own `source_digest` member excluded. Do not hand-edit an
|
|
43
|
-
archive and assume its digest remains valid.
|
|
44
|
-
The entire archive AND HTTP import body must fit the advertised transfer
|
|
45
|
-
limit (at most 1 MiB); wrapper overhead counts. The archive admits at most
|
|
46
|
-
1000 Tasks and at most 1000 Objectives, with validated Key Results.
|
|
47
|
-
The whole graph is one atomic batch, with no silent chunking or partial
|
|
48
|
-
imports. Ordinary Task packets remain limited to 32768 bytes.
|
|
49
|
-
|
|
50
|
-
`--dry-run` is read-only: it records no intent and changes no Task, Objective
|
|
51
|
-
or authority document. Inspect its mapping, conflicts and normalized plan,
|
|
52
|
-
including `source_digest`, `plan_digest` and `expected_snapshot_digest`.
|
|
53
|
-
The target snapshot digest covers every canonical authority document,
|
|
54
|
-
excluding only transfer receipt rows (`method: TRANSFER`) from
|
|
55
|
-
`activity.json`'s idempotency list to avoid hashing the receipt into itself.
|
|
56
|
-
It retains activity events, planning facts, allocator state, other intents
|
|
57
|
-
and authority timestamps; it is not a transport/time-based freshness token.
|
|
58
|
-
Never invent these proofs. Re-preview after a target change.
|
|
59
|
-
|
|
60
|
-
- `--mode new` requires an empty target Task collection. Preservation of
|
|
61
|
-
display IDs (`--preserve-ids`) is permitted only in that empty target;
|
|
62
|
-
local UUIDs and status/audit facts are still generated afresh. Retained
|
|
63
|
-
display-ID high-water can also refuse preservation in an empty roster.
|
|
64
|
-
- `--mode merge` appends distinct Tasks with generated target IDs through the
|
|
65
|
-
reviewed mappings and reports conflicts; it never silently overwrites
|
|
66
|
-
existing records. Review Objective and Key Result mapping as well as
|
|
67
|
-
parent/dependency links. An unresolved mapping
|
|
68
|
-
or conflict must be resolved by a supported plan, not guessed by the agent.
|
|
69
|
-
The current source appends fresh Objectives and Key Results with its
|
|
70
|
-
generated ID map. It does not reconcile them with existing target
|
|
71
|
-
Objectives, support caller-supplied mappings, or deduplicate repeat
|
|
72
|
-
archives under a new intent. Do not claim those features are implemented.
|
|
73
|
-
|
|
74
|
-
## Apply exactly the previewed plan
|
|
75
|
-
|
|
76
|
-
Explicit user intent for the transfer authorizes its preview/apply sequence;
|
|
77
|
-
there is no extra per-Task approval or five-Task cap. If preview exposes an
|
|
78
|
-
ambiguity outside that intent, resolve it before applying. Keep the archive,
|
|
79
|
-
mode and `--preserve-ids` choice identical between preview and apply.
|
|
80
|
-
|
|
81
|
-
```text
|
|
82
|
-
workbite agent --workspace TARGET_ABS --workspace-uid TARGET_UUID import --input-file tasks-transfer.json --mode new --intent-id wb.import.20261015.demo --plan-digest sha256:PLAN_HEX --expected-snapshot-digest sha256:TARGET_HEX --id-map imported-ids.json
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Use the actual preview's 64-hex digests, not these placeholders. `--id-map`
|
|
86
|
-
requests a private validated output artifact, not an input mapping or
|
|
87
|
-
permission to overwrite an existing file. A failed local output publication
|
|
88
|
-
does not prove the authority write failed; preserve the intent and inspect
|
|
89
|
-
import status. Never re-import under a new intent just to regenerate a file.
|
|
90
|
-
|
|
91
|
-
Apply binds one stable intent to the archive's `source_digest`, mode,
|
|
92
|
-
`plan_digest` and expected target snapshot. Full Task/Objective/Key Result
|
|
93
|
-
schema and the complete graph must be validated before effects, including
|
|
94
|
-
late cycles and unresolved references. Two-pass ID remapping occurs only in
|
|
95
|
-
a staged/private reducer snapshot. All authority changes, batch receipt and
|
|
96
|
-
source provenance commit in one native owner transaction. A partial external
|
|
97
|
-
per-Task commit is not an admitted implementation of this workflow.
|
|
98
|
-
|
|
99
|
-
## Status, replay and rollback
|
|
100
|
-
|
|
101
|
-
```text
|
|
102
|
-
workbite agent --workspace TARGET_ABS --workspace-uid TARGET_UUID import-status --intent-id wb.import.20261015.demo
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Import status is read-only and bound to that workspace and intent. A
|
|
106
|
-
committed receipt, rather than similar-looking Tasks or process exit alone,
|
|
107
|
-
settles the outcome. Preserve the returned import ID, ID map and resulting
|
|
108
|
-
`receipt.after_snapshot_digest` for observation and a possible separately
|
|
109
|
-
requested rollback. Receipt lookup precedes snapshot CAS: an identical replay returns the original
|
|
110
|
-
receipt even after later edits. Changed content under the same intent is an
|
|
111
|
-
idempotency conflict. A fresh intent is a new operation: importing the same
|
|
112
|
-
archive under another intent can append another mapped graph. The ordinary
|
|
113
|
-
same-intent idempotency guarantee is not arbitrary fresh-intent deduplication.
|
|
114
|
-
Never change intent merely to retry a lost answer or regenerate an output file.
|
|
115
|
-
|
|
116
|
-
On timeout, lost, unreadable or oversized bounded response, `commit_unknown`
|
|
117
|
-
or an unknown import status, stop writes and retain the exact intent, archive
|
|
118
|
-
and proof values. Recover by reading `import-status` with that original intent;
|
|
119
|
-
a response bound can hide a successful commit. Unknown never means not
|
|
120
|
-
committed. Do not resend automatically or choose a fresh intent.
|
|
121
|
-
Only retry the identical operation if the advertised recovery contract
|
|
122
|
-
explicitly permits it for the observed reason. Task `operation-status` is not
|
|
123
|
-
a substitute for `import-status`.
|
|
124
|
-
|
|
125
|
-
Rollback needs explicit user intent for undoing the exact owned import, its
|
|
126
|
-
`import_id`, and the expected current snapshot digest from that receipt or
|
|
127
|
-
an advertised read. Use a separate stable rollback intent:
|
|
128
|
-
|
|
129
|
-
```text
|
|
130
|
-
workbite agent --workspace TARGET_ABS --workspace-uid TARGET_UUID import-rollback --intent-id wb.rollback.20261015.demo --import-id IMPORT_ID --expected-snapshot-digest sha256:CURRENT_HEX
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Rollback requires the unique retained import receipt bound to its original
|
|
134
|
-
intent and workspace, complete source archive/digest and ID map evidence,
|
|
135
|
-
and the retained pre-import graph/status snapshot. The current authority
|
|
136
|
-
snapshot must exactly match that import receipt's `after_snapshot_digest`
|
|
137
|
-
under snapshot CAS: even an unrelated authority edit prevents rollback.
|
|
138
|
-
Missing or incomplete proofs refuse rollback. Do not manually delete imported
|
|
139
|
-
records or restore raw files. Successful rollback preserves display-ID
|
|
140
|
-
high-water and idempotency fences, and appends a durable
|
|
141
|
-
rollback receipt. It does not erase evidence or rewind authority history.
|
|
142
|
-
The native source status route also observes retained rollback receipts by
|
|
143
|
-
rollback intent; verify `receipt.operation` is `tasks.import-rollback`:
|
|
144
|
-
|
|
145
|
-
```text
|
|
146
|
-
workbite agent --workspace TARGET_ABS --workspace-uid TARGET_UUID import-status --intent-id wb.rollback.20261015.demo
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
Use this only when the installed status contract supports rollback receipts.
|
|
150
|
-
Otherwise report the uncertainty and keep the intent; do not invent a
|
|
151
|
-
recovery command or retry the mutation.
|
|
152
|
-
|
|
153
|
-
## Data fidelity and authority
|
|
154
|
-
|
|
155
|
-
Transfer preserves admitted normal Task metadata, Task graph relationships,
|
|
156
|
-
Objective/Key Result links and explicit source-to-target ID mappings. Target
|
|
157
|
-
UUIDs, actor identities, status facts and audit records belong to the target
|
|
158
|
-
owner and must not be blindly injected from source records. Source timestamps
|
|
159
|
-
and provenance remain source-only evidence. Optional `source_history` is an
|
|
160
|
-
archived source record, never a claim that those actions occurred locally.
|
|
161
|
-
The current transfer source validates and preserves nonempty Task notes and
|
|
162
|
-
subtasks using the same nested-array rules as ordinary Task writes (at most
|
|
163
|
-
128 items per array). Supplied note dates remain user data. Supplied Subtask
|
|
164
|
-
display IDs remain scoped to each newly generated target parent; omitted IDs
|
|
165
|
-
are allocated within that parent. No source Task UUID or status fact is
|
|
166
|
-
installed as target authority. This source behavior still requires reviewed
|
|
167
|
-
integration and matching installed capability proof before use. Use official
|
|
168
|
-
backup/restore when required fidelity is outside the transfer schema. Source
|
|
169
|
-
evidence enters only through that closed schema.
|
|
170
|
-
Do not import arbitrary Capture, worklog, attachment or runtime state unless
|
|
171
|
-
a future advertised schema explicitly supports it.
|
|
172
|
-
|
|
173
|
-
A Task transfer is not a full-fidelity workspace relocation or backup restore.
|
|
174
|
-
For full workspace/history recovery, use the component's official backup /
|
|
175
|
-
restore procedure appropriate to its storage format, under separate explicit
|
|
176
|
-
operator authorization and its owner-stop/lease/identity requirements. This
|
|
177
|
-
Skill does not run restore or copy SSOT files. Moving a folder, installing a
|
|
178
|
-
new bundle or refreshing a Skill is not part of transfer.
|
|
179
|
-
|
|
180
|
-
## MCP and native transport
|
|
181
|
-
|
|
182
|
-
For MCP, use a transfer tool only if the running server's `tools/list`
|
|
183
|
-
advertises it, with exactly its input schema and bound workspace UID. The
|
|
184
|
-
source tool names are `workbite_export`, `workbite_import`,
|
|
185
|
-
`workbite_import_status` and `workbite_import_rollback`. Import takes the
|
|
186
|
-
archive object and `mode`, `dry_run`, optional `preserve_ids`; apply adds
|
|
187
|
-
`intent_id`, `plan_digest`, `expected_snapshot_digest`. Keep those values
|
|
188
|
-
identical to preview. Preview takes no intent/proofs. Tool names in source
|
|
189
|
-
alone do not prove that the installed native client or
|
|
190
|
-
running owner implements them. There is no raw HTTP or shell workaround.
|
|
191
|
-
|
|
192
|
-
The npm launcher owns bounded input-file reads and private output files; the
|
|
193
|
-
native client consumes the archive via its existing stdin envelope. Only the
|
|
194
|
-
native owner implements the authority HTTP routes:
|
|
195
|
-
|
|
196
|
-
| Route | Method and body/query |
|
|
197
|
-
|---|---|
|
|
198
|
-
| `/api/v1/agent/tasks/export` | GET: `workspace_uid`, `include_history`, `redact` |
|
|
199
|
-
| `/api/v1/agent/tasks/import` | POST: `workspace_uid`, `archive`, `mode`, `dry_run`, `preserve_ids`, `plan_digest`, `expected_snapshot_digest`; preview proofs may be null |
|
|
200
|
-
| `/api/v1/agent/tasks/import-status` | GET: `workspace_uid`, `intent_id` |
|
|
201
|
-
| `/api/v1/agent/tasks/import-rollback` | POST: exactly `workspace_uid`, `import_id`, `expected_snapshot_digest`; the new rollback intent is only the idempotency header |
|
|
202
|
-
|
|
203
|
-
`Idempotency-Key` is present only on import apply and rollback. These are
|
|
204
|
-
implementation seams, not instructions to call HTTP from the Skill.
|
|
1
|
+
# Task graph transfer (unreleased source)
|
|
2
|
+
|
|
3
|
+
Use this workflow only for an explicitly requested cross-workspace Task
|
|
4
|
+
transfer, and only when the installed native client advertises each exact
|
|
5
|
+
command and flag. This reference describes additive source work; it is not
|
|
6
|
+
a release or installation claim. An unavailable command, owner route or
|
|
7
|
+
required proof stops that operation. Do not emulate it with per-Task writes,
|
|
8
|
+
raw HTTP, file copies or legacy apply. Never start an owner or backend to
|
|
9
|
+
make a transfer command work.
|
|
10
|
+
|
|
11
|
+
## Bind and preview
|
|
12
|
+
|
|
13
|
+
Read source and destination status separately. Record each absolute workspace
|
|
14
|
+
path and independently verified UID; Task display IDs alone do not identify
|
|
15
|
+
a workspace. The source and destination each need their already running,
|
|
16
|
+
verified WorkBite owner. Bind the explicit pair on every command below.
|
|
17
|
+
`SOURCE_ABS`, `SOURCE_UUID`, `TARGET_ABS`, `TARGET_UUID` and digest placeholders
|
|
18
|
+
must be replaced with the verified values. Files contain private workspace
|
|
19
|
+
data; choose a private local destination and do not publish them.
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
workbite agent --workspace SOURCE_ABS --workspace-uid SOURCE_UUID export --output tasks-transfer.json
|
|
23
|
+
workbite agent --workspace TARGET_ABS --workspace-uid TARGET_UUID import --input-file tasks-transfer.json --mode new --dry-run
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Export options `--include-history` and `--redact` are used only when
|
|
27
|
+
advertised and appropriate to the requested result. Check the actual export
|
|
28
|
+
projection before claiming redacted content can reproduce an unredacted
|
|
29
|
+
workspace. Current `--redact` replaces Task titles, Objective text/quarter,
|
|
30
|
+
and Key Result text/target, clears Task detail/tags/notes/subtasks, and keeps
|
|
31
|
+
IDs, graph links, statuses and numeric progress. It refuses
|
|
32
|
+
`--include-history` together with `--redact`. The remaining graph and IDs may
|
|
33
|
+
still identify the source. `--include-history` projects observable event
|
|
34
|
+
IDs/types/Task IDs/timestamps and planning-status facts, excluding the private
|
|
35
|
+
idempotency ledger and opaque event details. Default export does not promise
|
|
36
|
+
full history. Output is validated and published privately/atomically; an existing output file is refused,
|
|
37
|
+
not overwritten. Without `--output`, inspect the advertised stdout form.
|
|
38
|
+
|
|
39
|
+
The UTF-8 envelope format is `workbite.task-transfer.v1`, containing
|
|
40
|
+
`source_workspace_uid`, `tasks`, `objectives` (including Key Results), optional
|
|
41
|
+
`source_history` and `source_digest`. The source digest binds the canonical
|
|
42
|
+
payload with its own `source_digest` member excluded. Do not hand-edit an
|
|
43
|
+
archive and assume its digest remains valid.
|
|
44
|
+
The entire archive AND HTTP import body must fit the advertised transfer
|
|
45
|
+
limit (at most 1 MiB); wrapper overhead counts. The archive admits at most
|
|
46
|
+
1000 Tasks and at most 1000 Objectives, with validated Key Results.
|
|
47
|
+
The whole graph is one atomic batch, with no silent chunking or partial
|
|
48
|
+
imports. Ordinary Task packets remain limited to 32768 bytes.
|
|
49
|
+
|
|
50
|
+
`--dry-run` is read-only: it records no intent and changes no Task, Objective
|
|
51
|
+
or authority document. Inspect its mapping, conflicts and normalized plan,
|
|
52
|
+
including `source_digest`, `plan_digest` and `expected_snapshot_digest`.
|
|
53
|
+
The target snapshot digest covers every canonical authority document,
|
|
54
|
+
excluding only transfer receipt rows (`method: TRANSFER`) from
|
|
55
|
+
`activity.json`'s idempotency list to avoid hashing the receipt into itself.
|
|
56
|
+
It retains activity events, planning facts, allocator state, other intents
|
|
57
|
+
and authority timestamps; it is not a transport/time-based freshness token.
|
|
58
|
+
Never invent these proofs. Re-preview after a target change.
|
|
59
|
+
|
|
60
|
+
- `--mode new` requires an empty target Task collection. Preservation of
|
|
61
|
+
display IDs (`--preserve-ids`) is permitted only in that empty target;
|
|
62
|
+
local UUIDs and status/audit facts are still generated afresh. Retained
|
|
63
|
+
display-ID high-water can also refuse preservation in an empty roster.
|
|
64
|
+
- `--mode merge` appends distinct Tasks with generated target IDs through the
|
|
65
|
+
reviewed mappings and reports conflicts; it never silently overwrites
|
|
66
|
+
existing records. Review Objective and Key Result mapping as well as
|
|
67
|
+
parent/dependency links. An unresolved mapping
|
|
68
|
+
or conflict must be resolved by a supported plan, not guessed by the agent.
|
|
69
|
+
The current source appends fresh Objectives and Key Results with its
|
|
70
|
+
generated ID map. It does not reconcile them with existing target
|
|
71
|
+
Objectives, support caller-supplied mappings, or deduplicate repeat
|
|
72
|
+
archives under a new intent. Do not claim those features are implemented.
|
|
73
|
+
|
|
74
|
+
## Apply exactly the previewed plan
|
|
75
|
+
|
|
76
|
+
Explicit user intent for the transfer authorizes its preview/apply sequence;
|
|
77
|
+
there is no extra per-Task approval or five-Task cap. If preview exposes an
|
|
78
|
+
ambiguity outside that intent, resolve it before applying. Keep the archive,
|
|
79
|
+
mode and `--preserve-ids` choice identical between preview and apply.
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
workbite agent --workspace TARGET_ABS --workspace-uid TARGET_UUID import --input-file tasks-transfer.json --mode new --intent-id wb.import.20261015.demo --plan-digest sha256:PLAN_HEX --expected-snapshot-digest sha256:TARGET_HEX --id-map imported-ids.json
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Use the actual preview's 64-hex digests, not these placeholders. `--id-map`
|
|
86
|
+
requests a private validated output artifact, not an input mapping or
|
|
87
|
+
permission to overwrite an existing file. A failed local output publication
|
|
88
|
+
does not prove the authority write failed; preserve the intent and inspect
|
|
89
|
+
import status. Never re-import under a new intent just to regenerate a file.
|
|
90
|
+
|
|
91
|
+
Apply binds one stable intent to the archive's `source_digest`, mode,
|
|
92
|
+
`plan_digest` and expected target snapshot. Full Task/Objective/Key Result
|
|
93
|
+
schema and the complete graph must be validated before effects, including
|
|
94
|
+
late cycles and unresolved references. Two-pass ID remapping occurs only in
|
|
95
|
+
a staged/private reducer snapshot. All authority changes, batch receipt and
|
|
96
|
+
source provenance commit in one native owner transaction. A partial external
|
|
97
|
+
per-Task commit is not an admitted implementation of this workflow.
|
|
98
|
+
|
|
99
|
+
## Status, replay and rollback
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
workbite agent --workspace TARGET_ABS --workspace-uid TARGET_UUID import-status --intent-id wb.import.20261015.demo
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Import status is read-only and bound to that workspace and intent. A
|
|
106
|
+
committed receipt, rather than similar-looking Tasks or process exit alone,
|
|
107
|
+
settles the outcome. Preserve the returned import ID, ID map and resulting
|
|
108
|
+
`receipt.after_snapshot_digest` for observation and a possible separately
|
|
109
|
+
requested rollback. Receipt lookup precedes snapshot CAS: an identical replay returns the original
|
|
110
|
+
receipt even after later edits. Changed content under the same intent is an
|
|
111
|
+
idempotency conflict. A fresh intent is a new operation: importing the same
|
|
112
|
+
archive under another intent can append another mapped graph. The ordinary
|
|
113
|
+
same-intent idempotency guarantee is not arbitrary fresh-intent deduplication.
|
|
114
|
+
Never change intent merely to retry a lost answer or regenerate an output file.
|
|
115
|
+
|
|
116
|
+
On timeout, lost, unreadable or oversized bounded response, `commit_unknown`
|
|
117
|
+
or an unknown import status, stop writes and retain the exact intent, archive
|
|
118
|
+
and proof values. Recover by reading `import-status` with that original intent;
|
|
119
|
+
a response bound can hide a successful commit. Unknown never means not
|
|
120
|
+
committed. Do not resend automatically or choose a fresh intent.
|
|
121
|
+
Only retry the identical operation if the advertised recovery contract
|
|
122
|
+
explicitly permits it for the observed reason. Task `operation-status` is not
|
|
123
|
+
a substitute for `import-status`.
|
|
124
|
+
|
|
125
|
+
Rollback needs explicit user intent for undoing the exact owned import, its
|
|
126
|
+
`import_id`, and the expected current snapshot digest from that receipt or
|
|
127
|
+
an advertised read. Use a separate stable rollback intent:
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
workbite agent --workspace TARGET_ABS --workspace-uid TARGET_UUID import-rollback --intent-id wb.rollback.20261015.demo --import-id IMPORT_ID --expected-snapshot-digest sha256:CURRENT_HEX
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Rollback requires the unique retained import receipt bound to its original
|
|
134
|
+
intent and workspace, complete source archive/digest and ID map evidence,
|
|
135
|
+
and the retained pre-import graph/status snapshot. The current authority
|
|
136
|
+
snapshot must exactly match that import receipt's `after_snapshot_digest`
|
|
137
|
+
under snapshot CAS: even an unrelated authority edit prevents rollback.
|
|
138
|
+
Missing or incomplete proofs refuse rollback. Do not manually delete imported
|
|
139
|
+
records or restore raw files. Successful rollback preserves display-ID
|
|
140
|
+
high-water and idempotency fences, and appends a durable
|
|
141
|
+
rollback receipt. It does not erase evidence or rewind authority history.
|
|
142
|
+
The native source status route also observes retained rollback receipts by
|
|
143
|
+
rollback intent; verify `receipt.operation` is `tasks.import-rollback`:
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
workbite agent --workspace TARGET_ABS --workspace-uid TARGET_UUID import-status --intent-id wb.rollback.20261015.demo
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Use this only when the installed status contract supports rollback receipts.
|
|
150
|
+
Otherwise report the uncertainty and keep the intent; do not invent a
|
|
151
|
+
recovery command or retry the mutation.
|
|
152
|
+
|
|
153
|
+
## Data fidelity and authority
|
|
154
|
+
|
|
155
|
+
Transfer preserves admitted normal Task metadata, Task graph relationships,
|
|
156
|
+
Objective/Key Result links and explicit source-to-target ID mappings. Target
|
|
157
|
+
UUIDs, actor identities, status facts and audit records belong to the target
|
|
158
|
+
owner and must not be blindly injected from source records. Source timestamps
|
|
159
|
+
and provenance remain source-only evidence. Optional `source_history` is an
|
|
160
|
+
archived source record, never a claim that those actions occurred locally.
|
|
161
|
+
The current transfer source validates and preserves nonempty Task notes and
|
|
162
|
+
subtasks using the same nested-array rules as ordinary Task writes (at most
|
|
163
|
+
128 items per array). Supplied note dates remain user data. Supplied Subtask
|
|
164
|
+
display IDs remain scoped to each newly generated target parent; omitted IDs
|
|
165
|
+
are allocated within that parent. No source Task UUID or status fact is
|
|
166
|
+
installed as target authority. This source behavior still requires reviewed
|
|
167
|
+
integration and matching installed capability proof before use. Use official
|
|
168
|
+
backup/restore when required fidelity is outside the transfer schema. Source
|
|
169
|
+
evidence enters only through that closed schema.
|
|
170
|
+
Do not import arbitrary Capture, worklog, attachment or runtime state unless
|
|
171
|
+
a future advertised schema explicitly supports it.
|
|
172
|
+
|
|
173
|
+
A Task transfer is not a full-fidelity workspace relocation or backup restore.
|
|
174
|
+
For full workspace/history recovery, use the component's official backup /
|
|
175
|
+
restore procedure appropriate to its storage format, under separate explicit
|
|
176
|
+
operator authorization and its owner-stop/lease/identity requirements. This
|
|
177
|
+
Skill does not run restore or copy SSOT files. Moving a folder, installing a
|
|
178
|
+
new bundle or refreshing a Skill is not part of transfer.
|
|
179
|
+
|
|
180
|
+
## MCP and native transport
|
|
181
|
+
|
|
182
|
+
For MCP, use a transfer tool only if the running server's `tools/list`
|
|
183
|
+
advertises it, with exactly its input schema and bound workspace UID. The
|
|
184
|
+
source tool names are `workbite_export`, `workbite_import`,
|
|
185
|
+
`workbite_import_status` and `workbite_import_rollback`. Import takes the
|
|
186
|
+
archive object and `mode`, `dry_run`, optional `preserve_ids`; apply adds
|
|
187
|
+
`intent_id`, `plan_digest`, `expected_snapshot_digest`. Keep those values
|
|
188
|
+
identical to preview. Preview takes no intent/proofs. Tool names in source
|
|
189
|
+
alone do not prove that the installed native client or
|
|
190
|
+
running owner implements them. There is no raw HTTP or shell workaround.
|
|
191
|
+
|
|
192
|
+
The npm launcher owns bounded input-file reads and private output files; the
|
|
193
|
+
native client consumes the archive via its existing stdin envelope. Only the
|
|
194
|
+
native owner implements the authority HTTP routes:
|
|
195
|
+
|
|
196
|
+
| Route | Method and body/query |
|
|
197
|
+
|---|---|
|
|
198
|
+
| `/api/v1/agent/tasks/export` | GET: `workspace_uid`, `include_history`, `redact` |
|
|
199
|
+
| `/api/v1/agent/tasks/import` | POST: `workspace_uid`, `archive`, `mode`, `dry_run`, `preserve_ids`, `plan_digest`, `expected_snapshot_digest`; preview proofs may be null |
|
|
200
|
+
| `/api/v1/agent/tasks/import-status` | GET: `workspace_uid`, `intent_id` |
|
|
201
|
+
| `/api/v1/agent/tasks/import-rollback` | POST: exactly `workspace_uid`, `import_id`, `expected_snapshot_digest`; the new rollback intent is only the idempotency header |
|
|
202
|
+
|
|
203
|
+
`Idempotency-Key` is present only on import apply and rollback. These are
|
|
204
|
+
implementation seams, not instructions to call HTTP from the Skill.
|