pi-background-tasks 2.5.0 → 2.6.0

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.
Files changed (203) hide show
  1. package/BACKGROUND-TASKS-INSTRUCTIONS.md +1 -1
  2. package/README.md +70 -25
  3. package/TESTING.md +42 -2
  4. package/TEST_PLAN.md +7 -4
  5. package/dist/extensions/anthropic-attribution-child.js +4 -0
  6. package/dist/extensions/anthropic-attribution-child.js.map +1 -0
  7. package/dist/extensions/anthropic-attribution.js +107 -0
  8. package/dist/extensions/anthropic-attribution.js.map +1 -0
  9. package/dist/extensions/background-tasks.js +2 -0
  10. package/dist/extensions/background-tasks.js.map +1 -0
  11. package/dist/extensions/delegate-child.js +2 -0
  12. package/dist/extensions/delegate-child.js.map +1 -0
  13. package/dist/extensions/fusion-child.js +2 -0
  14. package/dist/extensions/fusion-child.js.map +1 -0
  15. package/dist/package.json +5 -0
  16. package/dist/src/core/anthropic-attribution-path.js +24 -0
  17. package/dist/src/core/anthropic-attribution-path.js.map +1 -0
  18. package/dist/src/core/anthropic-attribution.js +2247 -0
  19. package/dist/src/core/anthropic-attribution.js.map +1 -0
  20. package/dist/src/core/attested-pi-contract.js +5 -0
  21. package/dist/src/core/attested-pi-contract.js.map +1 -0
  22. package/dist/src/core/attested-pi-run.js +749 -0
  23. package/dist/src/core/attested-pi-run.js.map +1 -0
  24. package/dist/src/core/canonical-json.js +19 -0
  25. package/dist/src/core/canonical-json.js.map +1 -0
  26. package/dist/src/core/common.js +787 -0
  27. package/dist/src/core/common.js.map +1 -0
  28. package/dist/src/core/config.js +78 -0
  29. package/dist/src/core/config.js.map +1 -0
  30. package/dist/src/core/context/parent-snapshot.js +75 -0
  31. package/dist/src/core/context/parent-snapshot.js.map +1 -0
  32. package/dist/src/core/context/token-budget.js +631 -0
  33. package/dist/src/core/context/token-budget.js.map +1 -0
  34. package/dist/src/core/context/visible-conversation-v2.js +390 -0
  35. package/dist/src/core/context/visible-conversation-v2.js.map +1 -0
  36. package/dist/src/core/delegate/artifacts.js +357 -0
  37. package/dist/src/core/delegate/artifacts.js.map +1 -0
  38. package/dist/src/core/delegate/budget.js +266 -0
  39. package/dist/src/core/delegate/budget.js.map +1 -0
  40. package/dist/src/core/delegate/facade-contract.js +7 -0
  41. package/dist/src/core/delegate/facade-contract.js.map +1 -0
  42. package/dist/src/core/delegate/hook-contract-evidence.json +18 -0
  43. package/dist/src/core/delegate/hook-contract.js +124 -0
  44. package/dist/src/core/delegate/hook-contract.js.map +1 -0
  45. package/dist/src/core/delegate/launch.js +366 -0
  46. package/dist/src/core/delegate/launch.js.map +1 -0
  47. package/dist/src/core/delegate/result-package.js +293 -0
  48. package/dist/src/core/delegate/result-package.js.map +1 -0
  49. package/dist/src/core/delegate/runner.js +398 -0
  50. package/dist/src/core/delegate/runner.js.map +1 -0
  51. package/dist/src/core/delegate/seed.js +334 -0
  52. package/dist/src/core/delegate/seed.js.map +1 -0
  53. package/dist/src/core/delegate/types.js +103 -0
  54. package/dist/src/core/delegate/types.js.map +1 -0
  55. package/dist/src/core/durable-fs.js +372 -0
  56. package/dist/src/core/durable-fs.js.map +1 -0
  57. package/dist/src/core/extension-api.js +382 -0
  58. package/dist/src/core/extension-api.js.map +1 -0
  59. package/dist/src/core/fusion/artifacts.js +654 -0
  60. package/dist/src/core/fusion/artifacts.js.map +1 -0
  61. package/dist/src/core/fusion/budget.js +949 -0
  62. package/dist/src/core/fusion/budget.js.map +1 -0
  63. package/dist/src/core/fusion/child-protocol.js +176 -0
  64. package/dist/src/core/fusion/child-protocol.js.map +1 -0
  65. package/dist/src/core/fusion/claude-cache.js +156 -0
  66. package/dist/src/core/fusion/claude-cache.js.map +1 -0
  67. package/dist/src/core/fusion/clean-context.js +64 -0
  68. package/dist/src/core/fusion/clean-context.js.map +1 -0
  69. package/dist/src/core/fusion/config.js +349 -0
  70. package/dist/src/core/fusion/config.js.map +1 -0
  71. package/dist/src/core/fusion/context.js +184 -0
  72. package/dist/src/core/fusion/context.js.map +1 -0
  73. package/dist/src/core/fusion/evaluation.js +696 -0
  74. package/dist/src/core/fusion/evaluation.js.map +1 -0
  75. package/dist/src/core/fusion/facade-contract.js +3 -0
  76. package/dist/src/core/fusion/facade-contract.js.map +1 -0
  77. package/dist/src/core/fusion/orchestrator.js +867 -0
  78. package/dist/src/core/fusion/orchestrator.js.map +1 -0
  79. package/dist/src/core/fusion/output-contract.js +27 -0
  80. package/dist/src/core/fusion/output-contract.js.map +1 -0
  81. package/dist/src/core/fusion/pi-child.js +1741 -0
  82. package/dist/src/core/fusion/pi-child.js.map +1 -0
  83. package/dist/src/core/fusion/prompts.js +260 -0
  84. package/dist/src/core/fusion/prompts.js.map +1 -0
  85. package/dist/src/core/fusion/result-package.js +857 -0
  86. package/dist/src/core/fusion/result-package.js.map +1 -0
  87. package/dist/src/core/fusion/source-policy.js +259 -0
  88. package/dist/src/core/fusion/source-policy.js.map +1 -0
  89. package/dist/src/core/fusion/types.js +207 -0
  90. package/dist/src/core/fusion/types.js.map +1 -0
  91. package/dist/src/core/fusion/web-fetch.js +777 -0
  92. package/dist/src/core/fusion/web-fetch.js.map +1 -0
  93. package/dist/src/core/fusion/workflows.js +126 -0
  94. package/dist/src/core/fusion/workflows.js.map +1 -0
  95. package/dist/src/core/lazy-module.js +181 -0
  96. package/dist/src/core/lazy-module.js.map +1 -0
  97. package/dist/src/core/pi-launch.js +431 -0
  98. package/dist/src/core/pi-launch.js.map +1 -0
  99. package/dist/src/core/registry.js +3331 -0
  100. package/dist/src/core/registry.js.map +1 -0
  101. package/dist/src/core/reload-shell-owner.js +1396 -0
  102. package/dist/src/core/reload-shell-owner.js.map +1 -0
  103. package/dist/src/core/shell-policy.js +80 -0
  104. package/dist/src/core/shell-policy.js.map +1 -0
  105. package/dist/src/core/task-durable.js +51 -0
  106. package/dist/src/core/task-durable.js.map +1 -0
  107. package/dist/src/core/update-check.js +92 -0
  108. package/dist/src/core/update-check.js.map +1 -0
  109. package/dist/src/core/windows-taskkill.js +185 -0
  110. package/dist/src/core/windows-taskkill.js.map +1 -0
  111. package/dist/src/delegate-child-extension.js +776 -0
  112. package/dist/src/delegate-child-extension.js.map +1 -0
  113. package/dist/src/delegate-extension.js +746 -0
  114. package/dist/src/delegate-extension.js.map +1 -0
  115. package/dist/src/extension.js +953 -0
  116. package/dist/src/extension.js.map +1 -0
  117. package/dist/src/fusion-child-extension.js +760 -0
  118. package/dist/src/fusion-child-extension.js.map +1 -0
  119. package/dist/src/fusion-extension.js +1030 -0
  120. package/dist/src/fusion-extension.js.map +1 -0
  121. package/dist/src/ui/background-tasks-manager.js +689 -0
  122. package/dist/src/ui/background-tasks-manager.js.map +1 -0
  123. package/dist/src/ui/fusion-model-selector.js +277 -0
  124. package/dist/src/ui/fusion-model-selector.js.map +1 -0
  125. package/docs/INDEX.md +35 -33
  126. package/docs/api/eventbus-v1.md +21 -5
  127. package/docs/choose-a-workflow.md +2 -0
  128. package/docs/commands/bg-clear.md +3 -3
  129. package/docs/commands/bg-update.md +3 -3
  130. package/docs/commands/bg.md +18 -6
  131. package/docs/commands/claude-cache.md +4 -4
  132. package/docs/commands/fusion-models.md +49 -4
  133. package/docs/commands/fusion.md +3 -3
  134. package/docs/commands/jobs.md +3 -3
  135. package/docs/commands/kill.md +3 -3
  136. package/docs/commands/logs.md +3 -3
  137. package/docs/commands/task-manager.md +5 -5
  138. package/docs/concepts/completion-delivery.md +6 -2
  139. package/docs/getting-started.md +7 -1
  140. package/docs/manifest.json +228 -42
  141. package/docs/operations/configuration.md +58 -5
  142. package/docs/operations/releasing.md +4 -2
  143. package/docs/operations/testing.md +22 -0
  144. package/docs/operations/troubleshooting.md +6 -2
  145. package/docs/read-before-edit.md +44 -31
  146. package/docs/reference/runtime-contracts.md +87 -51
  147. package/docs/reference/shortcuts-and-dock.md +28 -14
  148. package/docs/subsystems/anthropic-attribution.md +23 -11
  149. package/docs/subsystems/attested-pi-runs.md +12 -7
  150. package/docs/subsystems/background-task-runtime.md +53 -11
  151. package/docs/subsystems/child-launch-durability-and-safety.md +28 -9
  152. package/docs/subsystems/delegation.md +16 -3
  153. package/docs/subsystems/docs-freshness-gate.md +14 -7
  154. package/docs/subsystems/fusion.md +36 -11
  155. package/docs/subsystems/host-ui-and-telemetry.md +22 -9
  156. package/docs/tools/bg_delegate.md +3 -1
  157. package/docs/tools/bg_kill.md +3 -1
  158. package/docs/tools/bg_logs.md +3 -1
  159. package/docs/tools/bg_result.md +5 -3
  160. package/docs/tools/bg_run.md +31 -5
  161. package/docs/tools/bg_run_pi_attested.md +3 -1
  162. package/docs/tools/bg_status.md +3 -1
  163. package/docs/tools/fusion_investigate.md +3 -1
  164. package/docs/tools/fusion_reason.md +3 -1
  165. package/docs/tools/fusion_research.md +3 -1
  166. package/docs/tools/fusion_validate.md +3 -1
  167. package/extensions/anthropic-attribution-child.ts +3 -0
  168. package/extensions/anthropic-attribution.ts +166 -1
  169. package/package.json +12 -10
  170. package/src/core/anthropic-attribution-path.ts +5 -4
  171. package/src/core/anthropic-attribution.ts +293 -113
  172. package/src/core/attested-pi-contract.ts +4 -0
  173. package/src/core/attested-pi-run.ts +468 -81
  174. package/src/core/canonical-json.ts +21 -0
  175. package/src/core/common.ts +450 -40
  176. package/src/core/config.ts +121 -0
  177. package/src/core/context/visible-conversation-v2.ts +3 -6
  178. package/src/core/delegate/artifacts.ts +13 -9
  179. package/src/core/delegate/budget.ts +13 -6
  180. package/src/core/delegate/facade-contract.ts +6 -0
  181. package/src/core/delegate/result-package.ts +32 -14
  182. package/src/core/delegate/runner.ts +129 -58
  183. package/src/core/delegate/seed.ts +5 -7
  184. package/src/core/durable-fs.ts +178 -30
  185. package/src/core/extension-api.ts +36 -8
  186. package/src/core/fusion/artifacts.ts +17 -16
  187. package/src/core/fusion/clean-context.ts +8 -5
  188. package/src/core/fusion/config.ts +2 -1
  189. package/src/core/fusion/context.ts +2 -6
  190. package/src/core/fusion/facade-contract.ts +2 -0
  191. package/src/core/fusion/orchestrator.ts +3 -3
  192. package/src/core/fusion/prompts.ts +1 -1
  193. package/src/core/fusion/result-package.ts +259 -72
  194. package/src/core/fusion/source-policy.ts +43 -17
  195. package/src/core/lazy-module.ts +215 -0
  196. package/src/core/pi-launch.ts +390 -65
  197. package/src/core/registry.ts +2010 -381
  198. package/src/core/reload-shell-owner.ts +1662 -0
  199. package/src/core/shell-policy.ts +134 -0
  200. package/src/core/task-durable.ts +67 -0
  201. package/src/delegate-extension.ts +404 -144
  202. package/src/extension.ts +387 -114
  203. package/src/fusion-extension.ts +202 -96
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "attestation_state": [
3
3
  {
4
- "authored_body_sha256": "sha256:8b8a883eb261dd221d348724fb43ae13fac19eb52a30f688d55ff80b2039be98",
4
+ "authored_body_sha256": "sha256:d71aace12a6d092e963a2d99915f94d45c34c4f93e3ce936837dc6182dc1d6d3",
5
5
  "covers_sources": [
6
6
  "src/core/extension-api.ts"
7
7
  ],
8
8
  "doc_id": "api/eventbus-v1",
9
- "notes": "Reviewed EventBus channels, closed schemas, operations, request correlation and rejection, close unsubscribe behavior, terminal ordering, latched publication, retry semantics, and at-least-once deduplication guidance.",
10
9
  "rel": "docs/api/eventbus-v1.md",
11
10
  "required": true,
12
11
  "reviewer": "gpt-5.5-final-eventbus-reviewer",
13
- "state": "pass"
12
+ "state": "stale-authored-prose"
14
13
  },
15
14
  {
16
15
  "authored_body_sha256": "sha256:810591c82ced086e1622be9b037db88c8a667856580895dc90cd5af54c6e2107",
@@ -26,8 +25,9 @@
26
25
  "state": "stale-authored-prose"
27
26
  },
28
27
  {
29
- "authored_body_sha256": "sha256:d74e15a5d9c67a6602e341a68a08d8ed06edb0769cc114e689d5702ebab2b575",
28
+ "authored_body_sha256": "sha256:63e32141e9ae60dcc02b3b5e757c5ce39ab38adb1edb9b34ac459894607651fb",
30
29
  "covers_sources": [
30
+ "extensions/anthropic-attribution-child.ts",
31
31
  "extensions/anthropic-attribution.ts",
32
32
  "src/core/anthropic-attribution-path.ts",
33
33
  "src/core/anthropic-attribution.ts"
@@ -38,8 +38,9 @@
38
38
  "state": "missing"
39
39
  },
40
40
  {
41
- "authored_body_sha256": "sha256:0840d793b8c18869f9a3bb8a72beeb602824ed1a580161f3456126af8af9b459",
41
+ "authored_body_sha256": "sha256:462e0604e3965782da8aee1f77a113f454d60d905b8e58ecb622b8979d111a00",
42
42
  "covers_sources": [
43
+ "src/core/attested-pi-contract.ts",
43
44
  "src/core/attested-pi-run.ts"
44
45
  ],
45
46
  "doc_id": "subsystems/attested-pi-runs",
@@ -49,10 +50,12 @@
49
50
  "state": "stale-authored-prose"
50
51
  },
51
52
  {
52
- "authored_body_sha256": "sha256:253948c8b1f4dd339b0c1eeabd6e8addf584fe208a0f71c3a7f094921ff4547f",
53
+ "authored_body_sha256": "sha256:2d05c5c7b510ef46489113efc08158e2dee1eb3c5883456c4ddf23fdc57f87c2",
53
54
  "covers_sources": [
54
55
  "src/core/common.ts",
55
56
  "src/core/registry.ts",
57
+ "src/core/reload-shell-owner.ts",
58
+ "src/core/shell-policy.ts",
56
59
  "src/core/windows-taskkill.ts"
57
60
  ],
58
61
  "doc_id": "subsystems/background-task-runtime",
@@ -62,10 +65,12 @@
62
65
  "state": "stale-authored-prose"
63
66
  },
64
67
  {
65
- "authored_body_sha256": "sha256:40ee5dac92b9e873d6a9f71a59c03ff1ccd44d6717a13d3be18f74b19e68326e",
68
+ "authored_body_sha256": "sha256:cf4daaf407a01768f451f2374b5bb0a98efd7b4e5e0db07768c04e66a087f368",
66
69
  "covers_sources": [
70
+ "src/core/canonical-json.ts",
67
71
  "src/core/durable-fs.ts",
68
- "src/core/pi-launch.ts"
72
+ "src/core/pi-launch.ts",
73
+ "src/core/task-durable.ts"
69
74
  ],
70
75
  "doc_id": "subsystems/child-launch-durability-and-safety",
71
76
  "rel": "docs/subsystems/child-launch-durability-and-safety.md",
@@ -74,11 +79,12 @@
74
79
  "state": "stale-authored-prose"
75
80
  },
76
81
  {
77
- "authored_body_sha256": "sha256:67fbb232e66bf0b9f4c1a81b54ec5476c0aae929ed0f0777d57601afcac8e08b",
82
+ "authored_body_sha256": "sha256:5555c0344c4bdba65e71575163febe4d672a60a5ff944c260604270ceb4cdc69",
78
83
  "covers_sources": [
79
84
  "extensions/delegate-child.ts",
80
85
  "src/core/delegate/artifacts.ts",
81
86
  "src/core/delegate/budget.ts",
87
+ "src/core/delegate/facade-contract.ts",
82
88
  "src/core/delegate/hook-contract-evidence.json",
83
89
  "src/core/delegate/hook-contract.ts",
84
90
  "src/core/delegate/launch.ts",
@@ -86,6 +92,7 @@
86
92
  "src/core/delegate/runner.ts",
87
93
  "src/core/delegate/seed.ts",
88
94
  "src/core/delegate/types.ts",
95
+ "src/core/lazy-module.ts",
89
96
  "src/delegate-child-extension.ts",
90
97
  "src/delegate-extension.ts"
91
98
  ],
@@ -96,7 +103,7 @@
96
103
  "state": "stale-authored-prose"
97
104
  },
98
105
  {
99
- "authored_body_sha256": "sha256:cd882ae075d47e97e2fb45709d7ac044811eedb68e2377b1742ac44147297aa4",
106
+ "authored_body_sha256": "sha256:97f8ae7b3d811704207fc40fc4126ab85d58e9dd86cb59d496291a2313d85463",
100
107
  "covers_sources": [
101
108
  "extensions/fusion-child.ts",
102
109
  "src/core/fusion/artifacts.ts",
@@ -107,6 +114,7 @@
107
114
  "src/core/fusion/config.ts",
108
115
  "src/core/fusion/context.ts",
109
116
  "src/core/fusion/evaluation.ts",
117
+ "src/core/fusion/facade-contract.ts",
110
118
  "src/core/fusion/orchestrator.ts",
111
119
  "src/core/fusion/output-contract.ts",
112
120
  "src/core/fusion/pi-child.ts",
@@ -127,9 +135,10 @@
127
135
  "state": "stale-authored-prose"
128
136
  },
129
137
  {
130
- "authored_body_sha256": "sha256:caa46c3699124e0860a6f53f1bf6d31506e7eb8ad89c1871a5efeecc21a1d413",
138
+ "authored_body_sha256": "sha256:b3b66442d3fdb151d99c93f2a536f93e85eec6604a074424d34929b0bce7935a",
131
139
  "covers_sources": [
132
140
  "extensions/background-tasks.ts",
141
+ "src/core/config.ts",
133
142
  "src/core/update-check.ts",
134
143
  "src/extension.ts",
135
144
  "src/ui/background-tasks-manager.ts"
@@ -141,6 +150,62 @@
141
150
  "state": "stale-authored-prose"
142
151
  }
143
152
  ],
153
+ "configuration_variants": {
154
+ "default_dock_shortcut": "shift+down",
155
+ "default_features": [
156
+ "process",
157
+ "delegate",
158
+ "fusion",
159
+ "attested",
160
+ "attribution"
161
+ ],
162
+ "dock_shortcut_values": [
163
+ "shift+down",
164
+ "ctrl+alt+b",
165
+ "off"
166
+ ],
167
+ "feature_values": [
168
+ "process",
169
+ "delegate",
170
+ "fusion",
171
+ "attested",
172
+ "attribution"
173
+ ],
174
+ "source": "src/core/config.ts"
175
+ },
176
+ "default_public_surface_ids": [
177
+ "command:bg",
178
+ "command:bg-clear",
179
+ "command:bg-tasks",
180
+ "command:bg-update",
181
+ "command:claude-cache",
182
+ "command:fusion",
183
+ "command:fusion-models",
184
+ "command:jobs",
185
+ "command:kill",
186
+ "command:logs",
187
+ "command:tasks",
188
+ "eventbus:background-task-v1",
189
+ "renderer:background-task-notification",
190
+ "renderer:fusion-result",
191
+ "shortcut:ctrl+alt+c",
192
+ "shortcut:shift+down",
193
+ "tool:bg_delegate",
194
+ "tool:bg_kill",
195
+ "tool:bg_logs",
196
+ "tool:bg_result",
197
+ "tool:bg_run",
198
+ "tool:bg_run_pi_attested",
199
+ "tool:bg_status",
200
+ "tool:fusion_investigate",
201
+ "tool:fusion_reason",
202
+ "tool:fusion_research",
203
+ "tool:fusion_validate",
204
+ "workflow:investigate",
205
+ "workflow:reason",
206
+ "workflow:research",
207
+ "workflow:validate"
208
+ ],
144
209
  "docs": {
145
210
  "INDEX": {
146
211
  "audience": "user",
@@ -375,6 +440,7 @@
375
440
  "audience": "user",
376
441
  "covers_sources": [],
377
442
  "covers_surfaces": [
443
+ "shortcut:ctrl+alt+b",
378
444
  "shortcut:ctrl+alt+c",
379
445
  "shortcut:shift+down"
380
446
  ],
@@ -386,6 +452,7 @@
386
452
  "subsystems/anthropic-attribution": {
387
453
  "audience": "maintainer",
388
454
  "covers_sources": [
455
+ "extensions/anthropic-attribution-child.ts",
389
456
  "extensions/anthropic-attribution.ts",
390
457
  "src/core/anthropic-attribution-path.ts",
391
458
  "src/core/anthropic-attribution.ts"
@@ -399,6 +466,7 @@
399
466
  "subsystems/attested-pi-runs": {
400
467
  "audience": "maintainer",
401
468
  "covers_sources": [
469
+ "src/core/attested-pi-contract.ts",
402
470
  "src/core/attested-pi-run.ts"
403
471
  ],
404
472
  "covers_surfaces": [],
@@ -412,6 +480,8 @@
412
480
  "covers_sources": [
413
481
  "src/core/common.ts",
414
482
  "src/core/registry.ts",
483
+ "src/core/reload-shell-owner.ts",
484
+ "src/core/shell-policy.ts",
415
485
  "src/core/windows-taskkill.ts"
416
486
  ],
417
487
  "covers_surfaces": [],
@@ -423,8 +493,10 @@
423
493
  "subsystems/child-launch-durability-and-safety": {
424
494
  "audience": "maintainer",
425
495
  "covers_sources": [
496
+ "src/core/canonical-json.ts",
426
497
  "src/core/durable-fs.ts",
427
- "src/core/pi-launch.ts"
498
+ "src/core/pi-launch.ts",
499
+ "src/core/task-durable.ts"
428
500
  ],
429
501
  "covers_surfaces": [],
430
502
  "mode": "authored",
@@ -438,6 +510,7 @@
438
510
  "extensions/delegate-child.ts",
439
511
  "src/core/delegate/artifacts.ts",
440
512
  "src/core/delegate/budget.ts",
513
+ "src/core/delegate/facade-contract.ts",
441
514
  "src/core/delegate/hook-contract-evidence.json",
442
515
  "src/core/delegate/hook-contract.ts",
443
516
  "src/core/delegate/launch.ts",
@@ -445,6 +518,7 @@
445
518
  "src/core/delegate/runner.ts",
446
519
  "src/core/delegate/seed.ts",
447
520
  "src/core/delegate/types.ts",
521
+ "src/core/lazy-module.ts",
448
522
  "src/delegate-child-extension.ts",
449
523
  "src/delegate-extension.ts"
450
524
  ],
@@ -475,6 +549,7 @@
475
549
  "src/core/fusion/config.ts",
476
550
  "src/core/fusion/context.ts",
477
551
  "src/core/fusion/evaluation.ts",
552
+ "src/core/fusion/facade-contract.ts",
478
553
  "src/core/fusion/orchestrator.ts",
479
554
  "src/core/fusion/output-contract.ts",
480
555
  "src/core/fusion/pi-child.ts",
@@ -504,6 +579,7 @@
504
579
  "audience": "maintainer",
505
580
  "covers_sources": [
506
581
  "extensions/background-tasks.ts",
582
+ "src/core/config.ts",
507
583
  "src/core/update-check.ts",
508
584
  "src/extension.ts",
509
585
  "src/ui/background-tasks-manager.ts"
@@ -813,8 +889,8 @@
813
889
  "node": ">=22.19.0"
814
890
  },
815
891
  "entrypoints": [
816
- "./extensions/anthropic-attribution.ts",
817
- "./extensions/background-tasks.ts"
892
+ "./dist/extensions/anthropic-attribution.js",
893
+ "./dist/extensions/background-tasks.js"
818
894
  ],
819
895
  "files": [
820
896
  "BACKGROUND-TASKS-INSTRUCTIONS.md",
@@ -824,6 +900,7 @@
824
900
  "TESTING.md",
825
901
  "TEST_PLAN.md",
826
902
  "THIRD_PARTY_NOTICES.md",
903
+ "dist/",
827
904
  "docs/",
828
905
  "extensions/",
829
906
  "logo.png",
@@ -832,7 +909,7 @@
832
909
  "image": "https://raw.githubusercontent.com/ismailsaleekh/pi-background-tasks/main/logo.png",
833
910
  "name": "pi-background-tasks",
834
911
  "type": "module",
835
- "version": "2.5.0"
912
+ "version": "2.6.0"
836
913
  },
837
914
  "public_surface_ids": [
838
915
  "command:bg",
@@ -849,6 +926,7 @@
849
926
  "eventbus:background-task-v1",
850
927
  "renderer:background-task-notification",
851
928
  "renderer:fusion-result",
929
+ "shortcut:ctrl+alt+b",
852
930
  "shortcut:ctrl+alt+c",
853
931
  "shortcut:shift+down",
854
932
  "tool:bg_delegate",
@@ -870,90 +948,114 @@
870
948
  "public_surfaces": {
871
949
  "command": [
872
950
  {
873
- "description": "Start a shell command as a tracked background task: /bg [--agent] [--name \"Task name\"] <command>",
951
+ "availability": "always",
952
+ "default_available": true,
953
+ "description": "Start a tracked shell command: /bg [--survive-reload] [--agent] [--name \"Task name\"] <command>",
874
954
  "id": "command:bg",
875
955
  "kind": "command",
876
956
  "name": "bg",
877
- "source": "src/extension.ts:517"
957
+ "source": "src/extension.ts:750"
878
958
  },
879
959
  {
960
+ "availability": "always",
961
+ "default_available": true,
880
962
  "description": "Clear finished background task footer notices",
881
963
  "id": "command:bg-clear",
882
964
  "kind": "command",
883
965
  "name": "bg-clear",
884
- "source": "src/extension.ts:559"
966
+ "source": "src/extension.ts:793"
885
967
  },
886
968
  {
969
+ "availability": "always",
970
+ "default_available": true,
887
971
  "description": "Open the background task manager UI",
888
972
  "id": "command:bg-tasks",
889
973
  "kind": "command",
890
974
  "name": "bg-tasks",
891
- "source": "src/extension.ts:551"
975
+ "source": "src/extension.ts:785"
892
976
  },
893
977
  {
978
+ "availability": "always",
979
+ "default_available": true,
894
980
  "description": "Show how to update pi-background-tasks to the latest published version",
895
981
  "id": "command:bg-update",
896
982
  "kind": "command",
897
983
  "name": "bg-update",
898
- "source": "src/extension.ts:567"
984
+ "source": "src/extension.ts:801"
899
985
  },
900
986
  {
987
+ "availability": "feature:attribution",
988
+ "default_available": true,
901
989
  "description": "Show or set Claude cache retention for this session (short, long, default)",
902
990
  "id": "command:claude-cache",
903
991
  "kind": "command",
904
992
  "name": "claude-cache",
905
- "source": "src/core/anthropic-attribution.ts:3026"
993
+ "source": "src/core/anthropic-attribution.ts:3206"
906
994
  },
907
995
  {
996
+ "availability": "feature:fusion",
997
+ "default_available": true,
908
998
  "description": "Start fixed-purpose Fusion reason in the background and return immediately.",
909
999
  "id": "command:fusion",
910
1000
  "kind": "command",
911
1001
  "name": "fusion",
912
- "source": "src/fusion-extension.ts:996"
1002
+ "source": "src/fusion-extension.ts:1083"
913
1003
  },
914
1004
  {
1005
+ "availability": "feature:fusion",
1006
+ "default_available": true,
915
1007
  "description": "Open the five-slot global fusion model selector.",
916
1008
  "id": "command:fusion-models",
917
1009
  "kind": "command",
918
1010
  "name": "fusion-models",
919
- "source": "src/fusion-extension.ts:1029"
1011
+ "source": "src/fusion-extension.ts:1123"
920
1012
  },
921
1013
  {
1014
+ "availability": "always",
1015
+ "default_available": true,
922
1016
  "description": "List running and recent background tasks",
923
1017
  "id": "command:jobs",
924
1018
  "kind": "command",
925
1019
  "name": "jobs",
926
- "source": "src/extension.ts:605"
1020
+ "source": "src/extension.ts:850"
927
1021
  },
928
1022
  {
1023
+ "availability": "always",
1024
+ "default_available": true,
929
1025
  "description": "Stop a running background task: /kill <id>",
930
1026
  "id": "command:kill",
931
1027
  "kind": "command",
932
1028
  "name": "kill",
933
- "source": "src/extension.ts:649"
1029
+ "source": "src/extension.ts:894"
934
1030
  },
935
1031
  {
1032
+ "availability": "always",
1033
+ "default_available": true,
936
1034
  "description": "Show bounded output from a background task: /logs <id> [maxBytes]",
937
1035
  "id": "command:logs",
938
1036
  "kind": "command",
939
1037
  "name": "logs",
940
- "source": "src/extension.ts:618"
1038
+ "source": "src/extension.ts:863"
941
1039
  },
942
1040
  {
1041
+ "availability": "always",
1042
+ "default_available": true,
943
1043
  "description": "Open the Claude-like background task manager UI",
944
1044
  "id": "command:tasks",
945
1045
  "kind": "command",
946
1046
  "name": "tasks",
947
- "source": "src/extension.ts:543"
1047
+ "source": "src/extension.ts:777"
948
1048
  }
949
1049
  ],
950
1050
  "eventbus": [
951
1051
  {
1052
+ "availability": "always",
952
1053
  "channels": {
953
1054
  "request": "pi-background-tasks:request:v1",
954
1055
  "response": "pi-background-tasks:response:v1",
955
1056
  "terminal": "pi-background-tasks:terminal:v1"
956
1057
  },
1058
+ "default_available": true,
957
1059
  "id": "eventbus:background-task-v1",
958
1060
  "kind": "eventbus",
959
1061
  "name": "background-task-v1",
@@ -969,36 +1071,55 @@
969
1071
  ],
970
1072
  "renderer": [
971
1073
  {
1074
+ "availability": "always",
1075
+ "default_available": true,
972
1076
  "id": "renderer:background-task-notification",
973
1077
  "kind": "renderer",
974
1078
  "name": "background-task-notification",
975
- "source": "src/extension.ts:426"
1079
+ "source": "src/extension.ts:627"
976
1080
  },
977
1081
  {
1082
+ "availability": "feature:fusion",
1083
+ "default_available": true,
978
1084
  "id": "renderer:fusion-result",
979
1085
  "kind": "renderer",
980
1086
  "name": "fusion-result",
981
- "source": "src/fusion-extension.ts:980"
1087
+ "source": "src/fusion-extension.ts:1067"
982
1088
  }
983
1089
  ],
984
1090
  "shortcut": [
985
1091
  {
1092
+ "availability": "dock:ctrl+alt+b",
1093
+ "default_available": false,
1094
+ "description": "Open focused background task footer dock",
1095
+ "id": "shortcut:ctrl+alt+b",
1096
+ "kind": "shortcut",
1097
+ "name": "ctrl+alt+b",
1098
+ "source": "src/extension.ts:834"
1099
+ },
1100
+ {
1101
+ "availability": "always",
1102
+ "default_available": true,
986
1103
  "description": "Clear finished background task footer notices (terminal-dependent fallback for /bg-clear)",
987
1104
  "id": "shortcut:ctrl+alt+c",
988
1105
  "kind": "shortcut",
989
1106
  "name": "ctrl+alt+c",
990
- "source": "src/extension.ts:597"
1107
+ "source": "src/extension.ts:842"
991
1108
  },
992
1109
  {
1110
+ "availability": "dock:shift+down",
1111
+ "default_available": true,
993
1112
  "description": "Open focused background task footer dock",
994
1113
  "id": "shortcut:shift+down",
995
1114
  "kind": "shortcut",
996
1115
  "name": "shift+down",
997
- "source": "src/extension.ts:590"
1116
+ "source": "src/extension.ts:825"
998
1117
  }
999
1118
  ],
1000
1119
  "tool": [
1001
1120
  {
1121
+ "availability": "feature:delegate",
1122
+ "default_available": true,
1002
1123
  "description": "Launch one background Pi agent seeded with a frozen projection of the current conversation, then return a launch receipt immediately. The child has its own session, a route pinned at launch that is never substituted, and read-only tools. Extension discovery is isolated by default; ambient mode supports extension-registered providers but executes arbitrary discovered extension code. Retrieve its verified answer with bg_result.",
1003
1124
  "id": "tool:bg_delegate",
1004
1125
  "kind": "tool",
@@ -1083,9 +1204,11 @@
1083
1204
  ],
1084
1205
  "type": "object"
1085
1206
  },
1086
- "source": "src/delegate-extension.ts:340"
1207
+ "source": "src/delegate-extension.ts:500"
1087
1208
  },
1088
1209
  {
1210
+ "availability": "always",
1211
+ "default_available": true,
1089
1212
  "description": "Stop a running background task by ID. Fails loudly if the task is unknown or already finished.",
1090
1213
  "id": "tool:bg_kill",
1091
1214
  "kind": "tool",
@@ -1107,9 +1230,11 @@
1107
1230
  ],
1108
1231
  "type": "object"
1109
1232
  },
1110
- "source": "src/extension.ts:908"
1233
+ "source": "src/extension.ts:1181"
1111
1234
  },
1112
1235
  {
1236
+ "availability": "always",
1237
+ "default_available": true,
1113
1238
  "description": "Read bounded output from a background task for deliberate inspection; this is not a waiting primitive. Output is capped at 50.0KB for model safety and points to the full output file when truncated.",
1114
1239
  "id": "tool:bg_logs",
1115
1240
  "kind": "tool",
@@ -1141,9 +1266,11 @@
1141
1266
  ],
1142
1267
  "type": "object"
1143
1268
  },
1144
- "source": "src/extension.ts:863"
1269
+ "source": "src/extension.ts:1136"
1145
1270
  },
1146
1271
  {
1272
+ "availability": "any(feature:delegate,feature:fusion)",
1273
+ "default_available": true,
1147
1274
  "description": "Retrieve a hash-verified result from a bg_delegate or background Fusion task. Never blocks: a running task returns a typed not-ready result. Oversized answers are never truncated.",
1148
1275
  "id": "tool:bg_result",
1149
1276
  "kind": "tool",
@@ -1171,9 +1298,11 @@
1171
1298
  ],
1172
1299
  "type": "object"
1173
1300
  },
1174
- "source": "src/delegate-extension.ts:516"
1301
+ "source": "src/delegate-extension.ts:757"
1175
1302
  },
1176
1303
  {
1304
+ "availability": "always",
1305
+ "default_available": true,
1177
1306
  "description": "Start a named long-running shell command in the background and return immediately with a task ID and output path. By default, completed, failed, or killed terminal state is delivered automatically as <background-task-notification> and starts a follow-up agent turn; do not sleep or poll merely to wait. Output is written to .pi/tasks and model-visible logs are bounded to 50.0KB.",
1178
1307
  "id": "tool:bg_run",
1179
1308
  "kind": "tool",
@@ -1212,6 +1341,10 @@
1212
1341
  "description": "Whether to deliver the durable terminal notification. Default: true; disable only when deliberately taking over completion monitoring.",
1213
1342
  "type": "boolean"
1214
1343
  },
1344
+ "surviveReload": {
1345
+ "description": "Opt in to retaining this exact ordinary isAgent:false shell execution across a real same-process Pi reload. Default: false. Unsupported for agent, managed, delegate, Fusion, and attested tasks.",
1346
+ "type": "boolean"
1347
+ },
1215
1348
  "timeoutSeconds": {
1216
1349
  "description": "Optional timeout; task is failed and killed when exceeded",
1217
1350
  "type": "number"
@@ -1228,9 +1361,11 @@
1228
1361
  ],
1229
1362
  "type": "object"
1230
1363
  },
1231
- "source": "src/extension.ts:682"
1364
+ "source": "src/extension.ts:927"
1232
1365
  },
1233
1366
  {
1367
+ "availability": "feature:attested",
1368
+ "default_available": true,
1234
1369
  "description": "Opt-in evidence-oriented direct Pi spawn. Launches exactly one `pi --mode json` child, records raw Pi events/stderr, hashes prompt/report/output, observes OAuth through ModelRegistry, and emits a strict attestation sidecar only after successful completion.",
1235
1370
  "id": "tool:bg_run_pi_attested",
1236
1371
  "kind": "tool",
@@ -1289,9 +1424,11 @@
1289
1424
  ],
1290
1425
  "type": "object"
1291
1426
  },
1292
- "source": "src/extension.ts:767"
1427
+ "source": "src/extension.ts:1036"
1293
1428
  },
1294
1429
  {
1430
+ "availability": "always",
1431
+ "default_available": true,
1295
1432
  "description": "Inspect one background task or list all running/recent background tasks. This is a point-in-time inspection tool, not a waiting primitive.",
1296
1433
  "id": "tool:bg_status",
1297
1434
  "kind": "tool",
@@ -1313,9 +1450,11 @@
1313
1450
  "required": [],
1314
1451
  "type": "object"
1315
1452
  },
1316
- "source": "src/extension.ts:832"
1453
+ "source": "src/extension.ts:1105"
1317
1454
  },
1318
1455
  {
1456
+ "availability": "feature:fusion",
1457
+ "default_available": true,
1319
1458
  "description": "Start a five-model Fusion investigation as a tracked background task and return immediately after durable preflight. Retrieve the verified result with bg_result after notification. Candidate children run in clean bounded read-only contexts.",
1320
1459
  "id": "tool:fusion_investigate",
1321
1460
  "kind": "tool",
@@ -1376,9 +1515,11 @@
1376
1515
  ],
1377
1516
  "type": "object"
1378
1517
  },
1379
- "source": "src/fusion-extension.ts:1197"
1518
+ "source": "src/fusion-extension.ts:1305"
1380
1519
  },
1381
1520
  {
1521
+ "availability": "feature:fusion",
1522
+ "default_available": true,
1382
1523
  "description": "Start a five-model Fusion reason workflow as a tracked background task and return immediately after durable preflight. Retrieve the verified result with bg_result after notification. Candidate children receive the reason projection and no tools; evaluator and merger also run without tools.",
1383
1524
  "id": "tool:fusion_reason",
1384
1525
  "kind": "tool",
@@ -1404,9 +1545,11 @@
1404
1545
  ],
1405
1546
  "type": "object"
1406
1547
  },
1407
- "source": "src/fusion-extension.ts:1179"
1548
+ "source": "src/fusion-extension.ts:1287"
1408
1549
  },
1409
1550
  {
1551
+ "availability": "feature:fusion",
1552
+ "default_available": true,
1410
1553
  "description": "Start a five-model Fusion research workflow as a tracked background task and return immediately after durable preflight. Retrieve the verified result with bg_result after notification. Targeted URL fetch is not web search; fetched pages and URLs are untrusted.",
1411
1554
  "id": "tool:fusion_research",
1412
1555
  "kind": "tool",
@@ -1493,9 +1636,11 @@
1493
1636
  ],
1494
1637
  "type": "object"
1495
1638
  },
1496
- "source": "src/fusion-extension.ts:1216"
1639
+ "source": "src/fusion-extension.ts:1324"
1497
1640
  },
1498
1641
  {
1642
+ "availability": "feature:fusion",
1643
+ "default_available": true,
1499
1644
  "description": "Start an advisory, read-only Fusion validation review as a tracked background task and return immediately after durable preflight. Retrieve the verified result with bg_result after notification. It is not a build/test/lint substitute and never modifies files.",
1500
1645
  "id": "tool:fusion_validate",
1501
1646
  "kind": "tool",
@@ -1623,12 +1768,14 @@
1623
1768
  ],
1624
1769
  "type": "object"
1625
1770
  },
1626
- "source": "src/fusion-extension.ts:1236"
1771
+ "source": "src/fusion-extension.ts:1344"
1627
1772
  }
1628
1773
  ],
1629
1774
  "workflow": [
1630
1775
  {
1776
+ "availability": "feature:fusion",
1631
1777
  "contextKind": "clean_task",
1778
+ "default_available": true,
1632
1779
  "id": "workflow:investigate",
1633
1780
  "kind": "workflow",
1634
1781
  "name": "investigate",
@@ -1636,7 +1783,9 @@
1636
1783
  "toolName": "fusion_investigate"
1637
1784
  },
1638
1785
  {
1786
+ "availability": "feature:fusion",
1639
1787
  "contextKind": "session_projection",
1788
+ "default_available": true,
1640
1789
  "id": "workflow:reason",
1641
1790
  "kind": "workflow",
1642
1791
  "name": "reason",
@@ -1644,7 +1793,9 @@
1644
1793
  "toolName": "fusion_reason"
1645
1794
  },
1646
1795
  {
1796
+ "availability": "feature:fusion",
1647
1797
  "contextKind": "clean_task",
1798
+ "default_available": true,
1648
1799
  "id": "workflow:research",
1649
1800
  "kind": "workflow",
1650
1801
  "name": "research",
@@ -1652,7 +1803,9 @@
1652
1803
  "toolName": "fusion_research"
1653
1804
  },
1654
1805
  {
1806
+ "availability": "feature:fusion",
1655
1807
  "contextKind": "clean_task",
1808
+ "default_available": true,
1656
1809
  "id": "workflow:validate",
1657
1810
  "kind": "workflow",
1658
1811
  "name": "validate",
@@ -1663,6 +1816,9 @@
1663
1816
  },
1664
1817
  "schema_version": "pi-background-tasks.docs-manifest.v2",
1665
1818
  "source_to_docs": {
1819
+ "extensions/anthropic-attribution-child.ts": [
1820
+ "subsystems/anthropic-attribution"
1821
+ ],
1666
1822
  "extensions/anthropic-attribution.ts": [
1667
1823
  "subsystems/anthropic-attribution"
1668
1824
  ],
@@ -1681,12 +1837,21 @@
1681
1837
  "src/core/anthropic-attribution.ts": [
1682
1838
  "subsystems/anthropic-attribution"
1683
1839
  ],
1840
+ "src/core/attested-pi-contract.ts": [
1841
+ "subsystems/attested-pi-runs"
1842
+ ],
1684
1843
  "src/core/attested-pi-run.ts": [
1685
1844
  "subsystems/attested-pi-runs"
1686
1845
  ],
1846
+ "src/core/canonical-json.ts": [
1847
+ "subsystems/child-launch-durability-and-safety"
1848
+ ],
1687
1849
  "src/core/common.ts": [
1688
1850
  "subsystems/background-task-runtime"
1689
1851
  ],
1852
+ "src/core/config.ts": [
1853
+ "subsystems/host-ui-and-telemetry"
1854
+ ],
1690
1855
  "src/core/context/parent-snapshot.ts": [
1691
1856
  "concepts/context-projection-and-budgeting"
1692
1857
  ],
@@ -1702,6 +1867,9 @@
1702
1867
  "src/core/delegate/budget.ts": [
1703
1868
  "subsystems/delegation"
1704
1869
  ],
1870
+ "src/core/delegate/facade-contract.ts": [
1871
+ "subsystems/delegation"
1872
+ ],
1705
1873
  "src/core/delegate/hook-contract-evidence.json": [
1706
1874
  "subsystems/delegation"
1707
1875
  ],
@@ -1753,6 +1921,9 @@
1753
1921
  "src/core/fusion/evaluation.ts": [
1754
1922
  "subsystems/fusion"
1755
1923
  ],
1924
+ "src/core/fusion/facade-contract.ts": [
1925
+ "subsystems/fusion"
1926
+ ],
1756
1927
  "src/core/fusion/orchestrator.ts": [
1757
1928
  "subsystems/fusion"
1758
1929
  ],
@@ -1780,12 +1951,24 @@
1780
1951
  "src/core/fusion/workflows.ts": [
1781
1952
  "subsystems/fusion"
1782
1953
  ],
1954
+ "src/core/lazy-module.ts": [
1955
+ "subsystems/delegation"
1956
+ ],
1783
1957
  "src/core/pi-launch.ts": [
1784
1958
  "subsystems/child-launch-durability-and-safety"
1785
1959
  ],
1786
1960
  "src/core/registry.ts": [
1787
1961
  "subsystems/background-task-runtime"
1788
1962
  ],
1963
+ "src/core/reload-shell-owner.ts": [
1964
+ "subsystems/background-task-runtime"
1965
+ ],
1966
+ "src/core/shell-policy.ts": [
1967
+ "subsystems/background-task-runtime"
1968
+ ],
1969
+ "src/core/task-durable.ts": [
1970
+ "subsystems/child-launch-durability-and-safety"
1971
+ ],
1789
1972
  "src/core/update-check.ts": [
1790
1973
  "subsystems/host-ui-and-telemetry"
1791
1974
  ],
@@ -1857,6 +2040,9 @@
1857
2040
  "renderer:fusion-result": [
1858
2041
  "subsystems/fusion"
1859
2042
  ],
2043
+ "shortcut:ctrl+alt+b": [
2044
+ "reference/shortcuts-and-dock"
2045
+ ],
1860
2046
  "shortcut:ctrl+alt+c": [
1861
2047
  "reference/shortcuts-and-dock"
1862
2048
  ],