my-durable 0.0.0-stage → 0.0.2

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 (259) hide show
  1. package/.env.example +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +328 -2
  4. package/ai_docs/durable_pi/announcement.md +860 -0
  5. package/ai_docs/durable_pi/changelog.md +51 -0
  6. package/ai_docs/durable_pi/chord-delta-findings.md +362 -0
  7. package/ai_docs/durable_pi/coding-agent-integration.md +70 -0
  8. package/ai_docs/durable_pi/pico-v5-chord-usage.md +391 -0
  9. package/ai_docs/durable_pi/pico-v5-handoff.md +921 -0
  10. package/ai_docs/durable_pi/readme.md +617 -0
  11. package/ai_docs/durable_pi/sources.md +22 -0
  12. package/ai_docs/durable_pi/spec.md +4696 -0
  13. package/ai_docs/durable_pi/vacation-planner.md +57 -0
  14. package/ai_docs/pi/chord.md +268 -0
  15. package/ai_docs/pi/cli-integration.md +110 -0
  16. package/ai_docs/pi/cli.md +325 -0
  17. package/ai_docs/pi/codemode.md +211 -0
  18. package/ai_docs/pi/compaction.md +467 -0
  19. package/ai_docs/pi/configuration.md +51 -0
  20. package/ai_docs/pi/containerization.md +187 -0
  21. package/ai_docs/pi/custom-provider.md +177 -0
  22. package/ai_docs/pi/environment-variables.md +102 -0
  23. package/ai_docs/pi/extensions.md +278 -0
  24. package/ai_docs/pi/how-pi-works.md +53 -0
  25. package/ai_docs/pi/index.md +43 -0
  26. package/ai_docs/pi/json.md +230 -0
  27. package/ai_docs/pi/keybindings.md +198 -0
  28. package/ai_docs/pi/llama-cpp.md +118 -0
  29. package/ai_docs/pi/mcp.md +274 -0
  30. package/ai_docs/pi/message-types.md +265 -0
  31. package/ai_docs/pi/models.md +209 -0
  32. package/ai_docs/pi/overview.md +166 -0
  33. package/ai_docs/pi/packages.md +133 -0
  34. package/ai_docs/pi/pi-agent-core.md +568 -0
  35. package/ai_docs/pi/pi-ai.md +1942 -0
  36. package/ai_docs/pi/prompt-templates.md +63 -0
  37. package/ai_docs/pi/providers.md +204 -0
  38. package/ai_docs/pi/quickstart.md +140 -0
  39. package/ai_docs/pi/readme.md +99 -0
  40. package/ai_docs/pi/rpc-commands.md +864 -0
  41. package/ai_docs/pi/rpc-extension-ui.md +204 -0
  42. package/ai_docs/pi/rpc.md +197 -0
  43. package/ai_docs/pi/sdk.md +151 -0
  44. package/ai_docs/pi/security.md +103 -0
  45. package/ai_docs/pi/session-format.md +297 -0
  46. package/ai_docs/pi/sessions.md +70 -0
  47. package/ai_docs/pi/settings.md +173 -0
  48. package/ai_docs/pi/shell-aliases.md +97 -0
  49. package/ai_docs/pi/skills.md +97 -0
  50. package/ai_docs/pi/slash-commands.md +64 -0
  51. package/ai_docs/pi/sources.md +57 -0
  52. package/ai_docs/pi/terminal-setup.md +223 -0
  53. package/ai_docs/pi/termux.md +121 -0
  54. package/ai_docs/pi/themes.md +140 -0
  55. package/ai_docs/pi/tmux.md +59 -0
  56. package/ai_docs/pi/toolkit.md +168 -0
  57. package/ai_docs/pi/tui.md +129 -0
  58. package/ai_docs/pi/usage.md +98 -0
  59. package/ai_docs/pi/virtual-models.md +118 -0
  60. package/ai_docs/pi/windows.md +71 -0
  61. package/apps/dpi-backend/.nvmrc +1 -0
  62. package/apps/dpi-backend/API.md +99 -0
  63. package/apps/dpi-backend/README.md +119 -0
  64. package/apps/dpi-backend/deploy/backend.env.example +9 -0
  65. package/apps/dpi-backend/deploy/dpi-backend.plist +26 -0
  66. package/apps/dpi-backend/deploy/dpi-backend.service +22 -0
  67. package/apps/dpi-backend/package.json +33 -0
  68. package/apps/dpi-backend/prompts/one_sentence.md +3 -0
  69. package/apps/dpi-backend/prompts/smart_ass_opus_fix.md +169 -0
  70. package/apps/dpi-backend/scripts/check-contract.mjs +151 -0
  71. package/apps/dpi-backend/scripts/migrate-playground.ts +66 -0
  72. package/apps/dpi-backend/scripts/record-nested-fixture.mts +154 -0
  73. package/apps/dpi-backend/scripts/token.ts +57 -0
  74. package/apps/dpi-backend/src/addons.ts +139 -0
  75. package/apps/dpi-backend/src/auth.ts +20 -0
  76. package/apps/dpi-backend/src/config.ts +54 -0
  77. package/apps/dpi-backend/src/contract-check.ts +118 -0
  78. package/apps/dpi-backend/src/errors.ts +50 -0
  79. package/apps/dpi-backend/src/extensions.ts +510 -0
  80. package/apps/dpi-backend/src/faux.ts +80 -0
  81. package/apps/dpi-backend/src/history.ts +165 -0
  82. package/apps/dpi-backend/src/idempotency.ts +20 -0
  83. package/apps/dpi-backend/src/jev.ts +43 -0
  84. package/apps/dpi-backend/src/jobs.ts +790 -0
  85. package/apps/dpi-backend/src/main.ts +76 -0
  86. package/apps/dpi-backend/src/model-catalog.ts +180 -0
  87. package/apps/dpi-backend/src/pairing-files.ts +142 -0
  88. package/apps/dpi-backend/src/pairing.ts +459 -0
  89. package/apps/dpi-backend/src/routes.ts +217 -0
  90. package/apps/dpi-backend/src/shared-state.ts +85 -0
  91. package/apps/dpi-backend/src/store.ts +1240 -0
  92. package/apps/dpi-backend/src/streams.ts +256 -0
  93. package/apps/dpi-backend/src/tunnel.ts +955 -0
  94. package/apps/dpi-backend/tsconfig.json +13 -0
  95. package/apps/dpi-playground/README.md +83 -0
  96. package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-CFGc7lHT.js +77 -0
  97. package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-DFdKpwm_.css +1 -0
  98. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/anthropic.png +0 -0
  99. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/deepseek.png +0 -0
  100. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/durable-pi.svg +14 -0
  101. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/gemini.png +0 -0
  102. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/grok.png +0 -0
  103. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/kimi.png +0 -0
  104. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/lab.png +0 -0
  105. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/meta.png +0 -0
  106. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/minimax.png +0 -0
  107. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/openai.png +0 -0
  108. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/qwen.png +0 -0
  109. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/xiaomi.png +0 -0
  110. package/apps/dpi-playground/apps/dpi-playground-fe/dist/icons/zai.png +0 -0
  111. package/apps/dpi-playground/apps/dpi-playground-fe/dist/index.html +16 -0
  112. package/apps/dpi-playground/apps/dpi-playground-fe/index.html +15 -0
  113. package/apps/dpi-playground/apps/dpi-playground-fe/package.json +5 -0
  114. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/anthropic.png +0 -0
  115. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/deepseek.png +0 -0
  116. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/durable-pi.svg +14 -0
  117. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/gemini.png +0 -0
  118. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/grok.png +0 -0
  119. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/kimi.png +0 -0
  120. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/lab.png +0 -0
  121. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/meta.png +0 -0
  122. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/minimax.png +0 -0
  123. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/openai.png +0 -0
  124. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/qwen.png +0 -0
  125. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/xiaomi.png +0 -0
  126. package/apps/dpi-playground/apps/dpi-playground-fe/public/icons/zai.png +0 -0
  127. package/apps/dpi-playground/apps/dpi-playground-fe/src/App.vue +180 -0
  128. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/commands.ts +119 -0
  129. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/composables.ts +129 -0
  130. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/hub.ts +40 -0
  131. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/icon-path.ts +7 -0
  132. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/ids.ts +2 -0
  133. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/jobs.ts +80 -0
  134. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/link-policy.ts +16 -0
  135. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/markdown-policy.ts +115 -0
  136. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/markdown.ts +60 -0
  137. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/pair-close.ts +23 -0
  138. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/pair-handoff.ts +56 -0
  139. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/pair.ts +166 -0
  140. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/qrcode.ts +323 -0
  141. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/signature.ts +146 -0
  142. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/store.ts +373 -0
  143. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/stream.ts +183 -0
  144. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/AgentView.vue +342 -0
  145. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/Composer.vue +198 -0
  146. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/ContextBar.vue +254 -0
  147. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/DeviceCredentialsDialog.vue +40 -0
  148. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/DeviceIcon.vue +56 -0
  149. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/DirBrowser.vue +95 -0
  150. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/ExtensionsPanel.vue +96 -0
  151. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/HelpDialog.vue +69 -0
  152. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/Inspector.vue +425 -0
  153. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/JobCard.vue +221 -0
  154. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/MobileNav.vue +39 -0
  155. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/ModelPicker.vue +71 -0
  156. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/NetworkSidebar.vue +236 -0
  157. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/NewSessionDialog.vue +114 -0
  158. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/OfflinePanel.vue +128 -0
  159. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/PairDeviceWizard.vue +433 -0
  160. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/PromptDialog.vue +89 -0
  161. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/StateEditor.vue +179 -0
  162. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TasksPanel.vue +280 -0
  163. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/Toast.vue +11 -0
  164. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TokenManager.vue +175 -0
  165. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TopBar.vue +114 -0
  166. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TranscriptItem.vue +152 -0
  167. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TreeRow.vue +195 -0
  168. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TunnelStatusBar.vue +107 -0
  169. package/apps/dpi-playground/apps/dpi-playground-fe/src/extensions.css +105 -0
  170. package/apps/dpi-playground/apps/dpi-playground-fe/src/jobs.css +655 -0
  171. package/apps/dpi-playground/apps/dpi-playground-fe/src/main.ts +22 -0
  172. package/apps/dpi-playground/apps/dpi-playground-fe/src/network.css +675 -0
  173. package/apps/dpi-playground/apps/dpi-playground-fe/src/style.css +3203 -0
  174. package/apps/dpi-playground/apps/dpi-playground-fe/tsconfig.json +16 -0
  175. package/apps/dpi-playground/apps/dpi-playground-fe/vite.config.ts +14 -0
  176. package/apps/dpi-playground/apps/dpi-playground-hub/package.json +5 -0
  177. package/apps/dpi-playground/apps/dpi-playground-hub/src/audit.ts +406 -0
  178. package/apps/dpi-playground/apps/dpi-playground-hub/src/client-ip.ts +72 -0
  179. package/apps/dpi-playground/apps/dpi-playground-hub/src/credentials.ts +265 -0
  180. package/apps/dpi-playground/apps/dpi-playground-hub/src/guard.ts +43 -0
  181. package/apps/dpi-playground/apps/dpi-playground-hub/src/http-errors.ts +156 -0
  182. package/apps/dpi-playground/apps/dpi-playground-hub/src/identity.ts +60 -0
  183. package/apps/dpi-playground/apps/dpi-playground-hub/src/limiter.ts +165 -0
  184. package/apps/dpi-playground/apps/dpi-playground-hub/src/main.ts +460 -0
  185. package/apps/dpi-playground/apps/dpi-playground-hub/src/monitor.ts +320 -0
  186. package/apps/dpi-playground/apps/dpi-playground-hub/src/mux.ts +277 -0
  187. package/apps/dpi-playground/apps/dpi-playground-hub/src/pairing.ts +816 -0
  188. package/apps/dpi-playground/apps/dpi-playground-hub/src/proxy.ts +128 -0
  189. package/apps/dpi-playground/apps/dpi-playground-hub/src/rotation.ts +583 -0
  190. package/apps/dpi-playground/apps/dpi-playground-hub/src/seed.ts +11 -0
  191. package/apps/dpi-playground/apps/dpi-playground-hub/src/transport.ts +108 -0
  192. package/apps/dpi-playground/apps/dpi-playground-hub/src/tunnel-token.ts +11 -0
  193. package/apps/dpi-playground/apps/dpi-playground-hub/src/tunnel-transport.ts +560 -0
  194. package/apps/dpi-playground/apps/dpi-playground-hub/src/tunnel.ts +873 -0
  195. package/apps/dpi-playground/apps/dpi-playground-hub/tsconfig.json +13 -0
  196. package/apps/dpi-playground/package.json +37 -0
  197. package/apps/dpi-sdk/README.md +74 -0
  198. package/apps/dpi-sdk/package.json +20 -0
  199. package/apps/dpi-sdk/scripts/net.ts +73 -0
  200. package/apps/dpi-sdk/src/api.ts +631 -0
  201. package/apps/dpi-sdk/src/app-state.ts +111 -0
  202. package/apps/dpi-sdk/src/client.ts +330 -0
  203. package/apps/dpi-sdk/src/errors.ts +16 -0
  204. package/apps/dpi-sdk/src/jobs.ts +99 -0
  205. package/apps/dpi-sdk/src/models.ts +472 -0
  206. package/apps/dpi-sdk/src/node/chunk.ts +488 -0
  207. package/apps/dpi-sdk/src/node/config.ts +175 -0
  208. package/apps/dpi-sdk/src/node/drivers.ts +402 -0
  209. package/apps/dpi-sdk/src/node/ops.ts +114 -0
  210. package/apps/dpi-sdk/src/node/private-dir.ts +48 -0
  211. package/apps/dpi-sdk/src/node/registry-migration.ts +549 -0
  212. package/apps/dpi-sdk/src/node/registry.ts +390 -0
  213. package/apps/dpi-sdk/src/node/sse-writer.ts +151 -0
  214. package/apps/dpi-sdk/src/protocol/backoff.ts +31 -0
  215. package/apps/dpi-sdk/src/protocol/limits.ts +199 -0
  216. package/apps/dpi-sdk/src/protocol/pairing.ts +311 -0
  217. package/apps/dpi-sdk/src/protocol/rest-routes.ts +105 -0
  218. package/apps/dpi-sdk/src/protocol/tunnel.ts +331 -0
  219. package/apps/dpi-sdk/src/sse.ts +117 -0
  220. package/apps/dpi-sdk/src/transcript.ts +291 -0
  221. package/apps/dpi-sdk/tsconfig.json +13 -0
  222. package/apps/dpi-sdk/w +20 -0
  223. package/apps/dpi-tui/README.md +54 -0
  224. package/apps/dpi-tui/bin/dpi-tui.mjs +5 -0
  225. package/apps/dpi-tui/package.json +20 -0
  226. package/apps/dpi-tui/src/app.ts +433 -0
  227. package/apps/dpi-tui/src/commands.ts +151 -0
  228. package/apps/dpi-tui/src/main.ts +122 -0
  229. package/apps/dpi-tui/src/pairing.ts +287 -0
  230. package/apps/dpi-tui/src/pickers.ts +238 -0
  231. package/apps/dpi-tui/src/render.ts +164 -0
  232. package/apps/dpi-tui/src/theme.ts +57 -0
  233. package/apps/dpi-tui/tsconfig.json +14 -0
  234. package/bin/device.mjs +5 -0
  235. package/bin/hub.mjs +5 -0
  236. package/bin/tui.mjs +5 -0
  237. package/deploy/Caddyfile +120 -0
  238. package/docs/verification.md +102 -0
  239. package/dpi-network.example.yaml +62 -0
  240. package/images/01_durable_agent_network.svg +185 -0
  241. package/images/02_pi_made_durable.svg +204 -0
  242. package/images/03_restart_mid_tool.svg +168 -0
  243. package/images/07_one_api_every_client.svg +123 -0
  244. package/images/08_device_session_agent.svg +123 -0
  245. package/images/09_compact_keep_history.svg +143 -0
  246. package/images/10_shared_app_state.svg +177 -0
  247. package/images/11_durable_jobs_wait.svg +141 -0
  248. package/images/12_tools_change_mid_run.svg +231 -0
  249. package/images/13_hook_blocks_tool.svg +122 -0
  250. package/images/14_fork_at_any_entry.svg +119 -0
  251. package/images/15_web_client.png +0 -0
  252. package/images/16_terminal_client.svg +43 -0
  253. package/images/17_devices_are_data.svg +182 -0
  254. package/images/18_should_every_agent_be_durable.svg +118 -0
  255. package/images/19_sqlite_on_every_device.svg +155 -0
  256. package/images/20_admission_and_effects.svg +134 -0
  257. package/justfile +33 -0
  258. package/package.json +41 -4
  259. package/scripts/verify.mjs +210 -0
@@ -0,0 +1,655 @@
1
+ /* Durable jobs (run cards in the chat, the job list in Tasks), the task tree, and the context bar. */
2
+
3
+ /* ------------------------------------------------------------------ run card */
4
+
5
+ .job-run {
6
+ min-width: 0;
7
+ margin: 14px 0 6px;
8
+ border: 1px solid #5a3a3e;
9
+ border-left: 4px solid var(--accent);
10
+ background: linear-gradient(180deg, #2a1b1d, #221617);
11
+ border-radius: 9px;
12
+ padding: 16px 18px 14px;
13
+ color: var(--fg);
14
+ }
15
+ .job-run.is-completed {
16
+ border-left-color: var(--ok);
17
+ }
18
+ .job-run.is-waiting {
19
+ border-left-color: var(--warn);
20
+ }
21
+ .job-run.is-failed,
22
+ .job-run.is-declined,
23
+ .job-run.is-aborted {
24
+ border-left-color: #8d6a6d;
25
+ }
26
+ .job-run-head {
27
+ display: flex;
28
+ align-items: center;
29
+ gap: 12px;
30
+ }
31
+ .job-run-icon {
32
+ display: grid;
33
+ place-items: center;
34
+ width: 40px;
35
+ height: 40px;
36
+ flex: none;
37
+ border-radius: 9px;
38
+ background: #3d2629;
39
+ color: var(--accent);
40
+ }
41
+ .job-run-titles {
42
+ min-width: 0;
43
+ flex: 1;
44
+ }
45
+ .job-run-titles h3 {
46
+ margin: 2px 0 0;
47
+ font-family: var(--font-title);
48
+ font-size: 19px;
49
+ font-weight: 750;
50
+ }
51
+ .job-run-eyebrow {
52
+ display: flex;
53
+ flex-wrap: wrap;
54
+ align-items: center;
55
+ gap: 4px 12px;
56
+ font-size: 16px;
57
+ letter-spacing: 1.2px;
58
+ color: var(--secondary);
59
+ }
60
+ .job-run-repeat {
61
+ display: inline-flex;
62
+ align-items: center;
63
+ gap: 5px;
64
+ letter-spacing: 0;
65
+ color: var(--fg);
66
+ }
67
+ .job-run-status {
68
+ display: inline-flex;
69
+ align-items: center;
70
+ gap: 7px;
71
+ flex: none;
72
+ padding: 4px 9px;
73
+ border-radius: 5px;
74
+ background: #352728;
75
+ font-size: 16px;
76
+ }
77
+ .job-run-status i {
78
+ width: 7px;
79
+ height: 7px;
80
+ border-radius: 50%;
81
+ background: currentColor;
82
+ }
83
+ .job-run-status.running {
84
+ color: var(--accent);
85
+ }
86
+ .job-run-status.running i {
87
+ animation: pulse 1.5s infinite;
88
+ }
89
+ .job-run-status.waiting {
90
+ color: var(--warn);
91
+ }
92
+ .job-run-status.completed {
93
+ color: var(--ok);
94
+ }
95
+ .job-run-about {
96
+ margin: 12px 0 8px;
97
+ font-size: 16px;
98
+ line-height: 1.55;
99
+ }
100
+ .job-run-meta {
101
+ display: flex;
102
+ flex-wrap: wrap;
103
+ gap: 6px 14px;
104
+ font-family: var(--font-mono);
105
+ font-size: 16px;
106
+ color: var(--secondary);
107
+ }
108
+ .job-run-input,
109
+ .job-run-resumed {
110
+ color: var(--fg);
111
+ }
112
+ .job-run-resumed {
113
+ color: var(--warn);
114
+ }
115
+
116
+ /* The phase stepper wraps onto new lines instead of scrolling. */
117
+ .job-stepper {
118
+ display: flex;
119
+ flex-wrap: wrap;
120
+ align-items: center;
121
+ gap: 8px 0;
122
+ list-style: none;
123
+ margin: 16px 0 12px;
124
+ padding: 0;
125
+ }
126
+ .job-stepper li {
127
+ display: inline-flex;
128
+ align-items: center;
129
+ }
130
+ .job-stepper li:not(:last-child)::after {
131
+ content: "→";
132
+ margin: 0 8px;
133
+ color: #8d6a6d;
134
+ }
135
+ .job-chip {
136
+ display: inline-flex;
137
+ align-items: center;
138
+ gap: 7px;
139
+ padding: 4px 11px 4px 4px;
140
+ border: 1px solid #4a3638;
141
+ border-radius: 999px;
142
+ background: #241819;
143
+ font-size: 16px;
144
+ }
145
+ .job-step-dot {
146
+ display: grid;
147
+ place-items: center;
148
+ width: 24px;
149
+ height: 24px;
150
+ border-radius: 50%;
151
+ background: #3a2a2c;
152
+ font-family: var(--font-mono);
153
+ font-size: 15px;
154
+ }
155
+ .ph-done .job-chip {
156
+ border-color: #3f6b52;
157
+ }
158
+ .ph-done .job-step-dot {
159
+ background: #24543a;
160
+ color: #b9f2cf;
161
+ }
162
+ .ph-running .job-chip {
163
+ border-color: var(--accent);
164
+ box-shadow: 0 0 0 3px #ff899722;
165
+ }
166
+ .ph-running .job-step-dot {
167
+ background: #5a2a31;
168
+ color: var(--accent);
169
+ }
170
+ .ph-waiting .job-chip {
171
+ border-color: var(--warn);
172
+ box-shadow: 0 0 0 3px #f2c94c22;
173
+ }
174
+ .ph-waiting .job-step-dot {
175
+ background: #574719;
176
+ color: var(--warn);
177
+ }
178
+ .ph-failed .job-chip,
179
+ .ph-aborted .job-chip {
180
+ border-color: #8d4a52;
181
+ }
182
+ .job-stepper .ph-skipped {
183
+ opacity: 0.55;
184
+ }
185
+ .job-step-progress {
186
+ font-family: var(--font-mono);
187
+ color: var(--secondary);
188
+ }
189
+
190
+ .job-phases {
191
+ display: grid;
192
+ grid-template-columns: minmax(0, 1fr);
193
+ gap: 6px;
194
+ }
195
+ .job-phase {
196
+ border: 1px solid #3c2b2d;
197
+ border-radius: 7px;
198
+ background: #1f1415;
199
+ }
200
+ .job-phase.ph-running {
201
+ border-color: #6a3a41;
202
+ }
203
+ .job-phase.ph-waiting {
204
+ border-color: #6b5a24;
205
+ }
206
+ .job-phase.ph-skipped,
207
+ .job-phase.ph-pending {
208
+ opacity: 0.7;
209
+ }
210
+ .job-phase > summary {
211
+ display: flex;
212
+ align-items: baseline;
213
+ flex-wrap: wrap;
214
+ gap: 4px 10px;
215
+ padding: 9px 12px;
216
+ list-style: none;
217
+ cursor: pointer;
218
+ font-size: 16px;
219
+ }
220
+ .job-phase summary::-webkit-details-marker {
221
+ display: none;
222
+ }
223
+ .job-phase-n {
224
+ font-family: var(--font-mono);
225
+ color: var(--secondary);
226
+ }
227
+ .job-phase-summary {
228
+ flex: 1;
229
+ min-width: 160px;
230
+ color: #e6d7d8;
231
+ }
232
+ .job-phase-time {
233
+ margin-left: auto;
234
+ font-family: var(--font-mono);
235
+ color: var(--secondary);
236
+ }
237
+ .job-phase-about,
238
+ .job-phase-empty {
239
+ margin: 0;
240
+ padding: 0 12px 8px 34px;
241
+ font-size: 16px;
242
+ color: var(--secondary);
243
+ }
244
+ .job-steps {
245
+ list-style: none;
246
+ margin: 0;
247
+ padding: 0 12px 10px 34px;
248
+ display: grid;
249
+ grid-template-columns: minmax(0, 1fr);
250
+ gap: 5px;
251
+ }
252
+ .job-steps > li {
253
+ display: block;
254
+ font-size: 16px;
255
+ }
256
+ .job-steps summary,
257
+ .job-step-line {
258
+ display: flex;
259
+ align-items: center;
260
+ gap: 9px;
261
+ min-width: 0;
262
+ list-style: none;
263
+ }
264
+ .job-steps summary {
265
+ cursor: pointer;
266
+ }
267
+ .job-steps summary::after {
268
+ content: "⌄";
269
+ margin-left: 2px;
270
+ color: var(--secondary);
271
+ }
272
+ .job-steps details[open] summary::after {
273
+ content: "⌃";
274
+ }
275
+ .job-steps code {
276
+ min-width: 0;
277
+ overflow: hidden;
278
+ text-overflow: ellipsis;
279
+ white-space: nowrap;
280
+ font-family: var(--font-mono);
281
+ font-size: 16px;
282
+ background: #2c1e20;
283
+ border-radius: 4px;
284
+ padding: 1px 6px;
285
+ }
286
+ .job-steps .k-tool code {
287
+ flex: none;
288
+ border: 1px solid #5a3a3e;
289
+ }
290
+ .job-step-kind {
291
+ color: var(--secondary);
292
+ }
293
+ .job-steps .k-tool .job-step-kind,
294
+ .job-steps .k-agent .job-step-kind {
295
+ color: var(--accent);
296
+ }
297
+ .job-step-text {
298
+ min-width: 0;
299
+ color: var(--fg);
300
+ }
301
+ .job-step-args {
302
+ min-width: 0;
303
+ overflow: hidden;
304
+ text-overflow: ellipsis;
305
+ white-space: nowrap;
306
+ font-family: var(--font-mono);
307
+ color: var(--secondary);
308
+ }
309
+ .job-step-state {
310
+ display: inline-flex;
311
+ align-items: center;
312
+ gap: 5px;
313
+ flex: none;
314
+ font-family: var(--font-mono);
315
+ color: var(--secondary);
316
+ }
317
+ .job-steps .st-done .job-step-state svg {
318
+ color: var(--ok);
319
+ }
320
+ .job-steps .st-error .job-step-state svg {
321
+ color: #ff8997;
322
+ }
323
+ .job-steps .st-waiting .job-step-state svg {
324
+ color: var(--warn);
325
+ }
326
+ .job-steps pre {
327
+ margin: 4px 0 2px 25px;
328
+ padding: 7px 9px;
329
+ max-height: 180px;
330
+ overflow: auto;
331
+ white-space: pre-wrap;
332
+ background: #180f10;
333
+ border-radius: 5px;
334
+ font-size: 16px;
335
+ color: #e6d7d8;
336
+ }
337
+ .job-step-link {
338
+ margin: 2px 0 0 25px;
339
+ }
340
+
341
+ .job-approval {
342
+ margin-top: 12px;
343
+ padding: 12px 14px;
344
+ border: 1px solid #8a7330;
345
+ background: #2c2514;
346
+ border-radius: 8px;
347
+ }
348
+ .job-approval > div:first-child {
349
+ display: flex;
350
+ align-items: center;
351
+ gap: 8px;
352
+ color: var(--warn);
353
+ }
354
+ .job-approval p {
355
+ margin: 6px 0 10px;
356
+ font-size: 16px;
357
+ line-height: 1.5;
358
+ }
359
+ .job-approval-buttons {
360
+ display: flex;
361
+ flex-wrap: wrap;
362
+ gap: 8px;
363
+ }
364
+ .job-run-foot {
365
+ display: flex;
366
+ align-items: center;
367
+ flex-wrap: wrap;
368
+ gap: 8px 14px;
369
+ margin-top: 12px;
370
+ padding-top: 10px;
371
+ border-top: 1px solid #3c2b2d;
372
+ font-size: 16px;
373
+ color: var(--secondary);
374
+ }
375
+ .job-run-foot span {
376
+ flex: 1;
377
+ min-width: 220px;
378
+ }
379
+
380
+ /* ------------------------------------------------------------------ Tasks tab */
381
+
382
+ .job-def {
383
+ margin-top: 12px;
384
+ padding: 13px;
385
+ border: 1px solid #453536;
386
+ border-radius: 8px;
387
+ background: #241819;
388
+ }
389
+ .job-def-head {
390
+ display: flex;
391
+ align-items: center;
392
+ flex-wrap: wrap;
393
+ gap: 8px;
394
+ }
395
+ .job-def-head svg {
396
+ color: var(--accent);
397
+ }
398
+ .job-def-head strong {
399
+ margin-right: auto;
400
+ font-size: 16px;
401
+ }
402
+ .job-def p {
403
+ margin: 8px 0;
404
+ font-size: 16px;
405
+ line-height: 1.5;
406
+ }
407
+ .job-chain {
408
+ display: flex;
409
+ flex-wrap: wrap;
410
+ gap: 6px 4px;
411
+ list-style: none;
412
+ margin: 8px 0;
413
+ padding: 0;
414
+ }
415
+ .job-chain li {
416
+ display: inline-flex;
417
+ align-items: center;
418
+ gap: 5px;
419
+ padding: 3px 9px 3px 3px;
420
+ border: 1px solid #4a3638;
421
+ border-radius: 999px;
422
+ font-size: 16px;
423
+ }
424
+ .job-chain li span {
425
+ display: grid;
426
+ place-items: center;
427
+ width: 20px;
428
+ height: 20px;
429
+ border-radius: 50%;
430
+ background: #3a2a2c;
431
+ font-family: var(--font-mono);
432
+ font-size: 14px;
433
+ }
434
+ .job-chain li:not(:last-child)::after {
435
+ content: "→";
436
+ margin-left: 4px;
437
+ color: #8d6a6d;
438
+ }
439
+ .job-def-meta {
440
+ display: flex;
441
+ flex-wrap: wrap;
442
+ gap: 6px;
443
+ }
444
+ .job-def-meta code {
445
+ font-family: var(--font-mono);
446
+ font-size: 16px;
447
+ color: var(--secondary);
448
+ overflow-wrap: anywhere;
449
+ }
450
+ .job-def-last {
451
+ display: flex;
452
+ flex-wrap: wrap;
453
+ align-items: center;
454
+ gap: 6px 10px;
455
+ margin-top: 10px;
456
+ font-size: 16px;
457
+ }
458
+ .job-def-last .text-button {
459
+ margin-top: 0;
460
+ }
461
+ .job-def-run {
462
+ margin-top: 12px;
463
+ }
464
+
465
+ .task-tree {
466
+ list-style: none;
467
+ margin: 0 0 12px;
468
+ padding: 0;
469
+ display: grid;
470
+ gap: 4px;
471
+ }
472
+ .task-row {
473
+ display: flex;
474
+ flex-wrap: wrap;
475
+ align-items: center;
476
+ gap: 4px 8px;
477
+ padding: 7px 10px;
478
+ margin-left: calc(var(--depth) * 18px);
479
+ border: 1px solid #3c2b2d;
480
+ border-left: 3px solid #5a3a3e;
481
+ border-radius: 6px;
482
+ background: #211617;
483
+ font-size: 16px;
484
+ }
485
+ .task-row[data-task-kind="pi.tool"] {
486
+ border-left-color: var(--accent);
487
+ }
488
+ .task-row[data-task-kind^="demo.job."] {
489
+ border-left-color: var(--warn);
490
+ }
491
+ .task-row small {
492
+ width: 100%;
493
+ font-family: var(--font-mono);
494
+ font-size: 16px;
495
+ color: var(--secondary);
496
+ }
497
+ .task-row .text-button {
498
+ margin-top: 0;
499
+ }
500
+ .task-phase {
501
+ font-family: var(--font-mono);
502
+ color: var(--secondary);
503
+ }
504
+
505
+ /* ------------------------------------------------------------------ context bar */
506
+
507
+ .context-section {
508
+ margin-top: 18px;
509
+ }
510
+ .context-numbers {
511
+ display: flex;
512
+ align-items: baseline;
513
+ flex-wrap: wrap;
514
+ gap: 6px 8px;
515
+ font-size: 16px;
516
+ }
517
+ .context-numbers strong {
518
+ font-family: var(--font-title);
519
+ font-size: 22px;
520
+ }
521
+ .context-pct {
522
+ font-family: var(--font-mono);
523
+ color: var(--secondary);
524
+ }
525
+ .context-compacting {
526
+ display: inline-flex;
527
+ align-items: center;
528
+ gap: 6px;
529
+ margin-left: auto;
530
+ color: var(--warn);
531
+ }
532
+ .context-compacting i {
533
+ width: 7px;
534
+ height: 7px;
535
+ border-radius: 50%;
536
+ background: currentColor;
537
+ animation: pulse 1.2s infinite;
538
+ }
539
+ .context-bar {
540
+ position: relative;
541
+ height: 14px;
542
+ margin: 40px 0 44px;
543
+ border-radius: 7px;
544
+ background: #2d2122;
545
+ border: 1px solid #453536;
546
+ touch-action: none;
547
+ }
548
+ .context-bar.off .context-marker {
549
+ opacity: 0.45;
550
+ }
551
+ .context-fill {
552
+ position: absolute;
553
+ inset: 0 auto 0 0;
554
+ border-radius: 7px 0 0 7px;
555
+ background: linear-gradient(90deg, #8a3a45, var(--accent));
556
+ transition: width 0.3s;
557
+ }
558
+ .context-fill.hot {
559
+ background: linear-gradient(90deg, #8a3a45, var(--warn));
560
+ }
561
+ .context-reserve {
562
+ position: absolute;
563
+ top: 0;
564
+ right: 0;
565
+ bottom: 0;
566
+ border-radius: 0 7px 7px 0;
567
+ background: repeating-linear-gradient(135deg, #ffffff10 0 5px, transparent 5px 10px);
568
+ border-left: 1px solid #8d6a6d;
569
+ }
570
+ .context-marker {
571
+ position: absolute;
572
+ top: -7px;
573
+ width: 4px;
574
+ height: 26px;
575
+ padding: 0;
576
+ margin-left: -2px;
577
+ border-radius: 2px;
578
+ background: var(--warn);
579
+ cursor: ew-resize;
580
+ touch-action: none;
581
+ }
582
+ .context-marker::before {
583
+ content: "";
584
+ position: absolute;
585
+ inset: -4px -10px;
586
+ }
587
+ .context-marker.wait {
588
+ background: var(--fg);
589
+ }
590
+ .context-marker-label {
591
+ position: absolute;
592
+ left: 50%;
593
+ transform: translateX(-50%);
594
+ white-space: nowrap;
595
+ font-size: 16px;
596
+ font-family: var(--font-mono);
597
+ color: var(--warn);
598
+ pointer-events: none;
599
+ }
600
+ .context-marker.auto .context-marker-label {
601
+ bottom: calc(100% + 4px);
602
+ }
603
+ .context-marker.wait .context-marker-label {
604
+ top: calc(100% + 4px);
605
+ color: var(--fg);
606
+ }
607
+ /* Labels near either end grow inward so they stay inside the panel. */
608
+ .context-marker.label-start .context-marker-label {
609
+ left: -2px;
610
+ transform: none;
611
+ }
612
+ .context-marker.label-end .context-marker-label {
613
+ left: auto;
614
+ right: -2px;
615
+ transform: none;
616
+ }
617
+ .context-hint {
618
+ margin: 0 0 10px;
619
+ }
620
+ .context-details-toggle {
621
+ display: inline-flex;
622
+ align-items: center;
623
+ gap: 4px;
624
+ padding: 0;
625
+ color: var(--warn);
626
+ font-size: 16px;
627
+ letter-spacing: 0;
628
+ }
629
+ .compaction-modal p {
630
+ margin: 0 0 12px;
631
+ font-size: 16px;
632
+ line-height: 1.6;
633
+ }
634
+ .modal .context-toggle {
635
+ flex-direction: row;
636
+ align-items: center;
637
+ gap: 8px;
638
+ margin-top: 6px;
639
+ }
640
+ .modal .context-toggle input {
641
+ width: auto;
642
+ padding: 0;
643
+ }
644
+ .context-toggle {
645
+ display: flex;
646
+ align-items: center;
647
+ flex-wrap: wrap;
648
+ gap: 4px 8px;
649
+ font-size: 16px;
650
+ }
651
+ .context-toggle small {
652
+ width: 100%;
653
+ font-size: 16px;
654
+ color: var(--secondary);
655
+ }
@@ -0,0 +1,22 @@
1
+ import { createApp } from "vue";
2
+ import App from "./App.vue";
3
+ import { ui } from "./client/store";
4
+ import { barePairHome, readPairHandoff } from "./client/pair-handoff";
5
+ import "./style.css";
6
+ import "./network.css";
7
+ import "./jobs.css";
8
+ import "./extensions.css";
9
+ const url = new URL(window.location.href);
10
+ if (/^\/pair\/?$/.test(url.pathname)) {
11
+ const handoff = readPairHandoff(url);
12
+ if (handoff) {
13
+ url.search = "";
14
+ url.hash = "";
15
+ window.history.replaceState(window.history.state, "", url);
16
+ ui.dialog = { kind: "pair", handoff };
17
+ } else {
18
+ // bare /pair: no handoff to resume — do not re-open the wizard or mint a fresh code
19
+ window.history.replaceState(window.history.state, "", barePairHome(url));
20
+ }
21
+ }
22
+ createApp(App).mount("#app");