@dadado/agent-kit-cli 5.17.0 → 6.0.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 (62) hide show
  1. package/LICENSE +201 -74
  2. package/NOTICE +2 -0
  3. package/README.md +3 -3
  4. package/dashboard/README.md +10 -1
  5. package/dashboard/dashboard-data.mjs +23 -13
  6. package/dashboard/dashboard.html +58 -0
  7. package/dashboard/lib/processes.mjs +1 -1
  8. package/dashboard/lib/run-logs.d.mts +34 -0
  9. package/dashboard/lib/run-logs.mjs +218 -0
  10. package/dashboard/lib/semantic-model.mjs +4 -3
  11. package/dashboard/serve.mjs +4 -4
  12. package/dashboard/start-broadcast.mjs +1 -1
  13. package/dashboard/start.mjs +1 -1
  14. package/dist/{add-HTYIFKMN.js → add-YTCDLPUS.js} +4 -4
  15. package/dist/{chunk-SMGFN3Z4.js → chunk-2FQX2O4I.js} +4 -4
  16. package/dist/{chunk-PNG7LO2F.js → chunk-3DGTPONS.js} +1 -1
  17. package/dist/{chunk-VY7MTPJ2.js → chunk-426GITN7.js} +1 -1
  18. package/dist/{chunk-2IPXQFJE.js → chunk-4CRBUEJ6.js} +2 -2
  19. package/dist/{chunk-STGFBAYT.js → chunk-4U7DLAQH.js} +11 -19
  20. package/dist/{chunk-77V75A7O.js → chunk-5B4DVO6C.js} +1 -1
  21. package/dist/{chunk-4IWG5CVE.js → chunk-B3VR5YBQ.js} +10 -5
  22. package/dist/{chunk-OUQZC744.js → chunk-B5CH47OS.js} +852 -74
  23. package/dist/{chunk-2RDRMGD3.js → chunk-BBVBYQJO.js} +2 -2
  24. package/dist/chunk-C26I6HTO.js +39 -0
  25. package/dist/{chunk-AW74INUW.js → chunk-DBPNGZNH.js} +6 -5
  26. package/dist/{chunk-DQA434Y4.js → chunk-DBXDV5O7.js} +3 -3
  27. package/dist/{chunk-S6GMFDKV.js → chunk-DRND2KYV.js} +2 -2
  28. package/dist/{chunk-F4VMYR7U.js → chunk-GN4SAZF2.js} +4 -4
  29. package/dist/{chunk-ZXKZBTXE.js → chunk-HAFRAXGV.js} +1 -1
  30. package/dist/{chunk-CBCW5R5J.js → chunk-MCH3E46V.js} +2 -2
  31. package/dist/{chunk-WW3YZKHW.js → chunk-NDIGZXFF.js} +26 -5
  32. package/dist/{chunk-TFZ2JUXH.js → chunk-PAB35H27.js} +523 -73
  33. package/dist/{chunk-NQ7IQ5XT.js → chunk-PFEUZXVT.js} +1 -1
  34. package/dist/{chunk-W24CMQ32.js → chunk-PPKX55GI.js} +3 -3
  35. package/dist/{chunk-ZCTSUQRR.js → chunk-T6P5ZMG2.js} +3 -3
  36. package/dist/{chunk-N3HTJVBR.js → chunk-VTOUQAVR.js} +1 -1
  37. package/dist/{chunk-B73KQ5KX.js → chunk-WFXHMP47.js} +11 -11
  38. package/dist/chunk-WGLPZXNU.js +45 -0
  39. package/dist/{chunk-KD2MYBB6.js → chunk-WUWRGOUV.js} +2 -2
  40. package/dist/{contribute-C6AW2P6J.js → contribute-A7NCWTUM.js} +5 -5
  41. package/dist/{cursor-awareness-KTL2RGKD.js → cursor-awareness-TN5JXD2C.js} +3 -3
  42. package/dist/{diff-VHNR62SI.js → diff-4MDU5SLE.js} +6 -6
  43. package/dist/{doctor-PET2HRRJ.js → doctor-MQAXOFKM.js} +16 -14
  44. package/dist/{dogfood-KKFVRWT6.js → dogfood-2JAHSYQA.js} +4 -4
  45. package/dist/{handoff-3UI6VKVG.js → handoff-MK5JG3J5.js} +4 -4
  46. package/dist/{hook-DYIMKJYL.js → hook-D2WHBKRN.js} +12 -12
  47. package/dist/index.js +26 -24
  48. package/dist/{init-Q4LBM6KT.js → init-7T6KNDFE.js} +17 -16
  49. package/dist/install-6G3D7J4U.js +35 -0
  50. package/dist/{monitors-QV2IS3MP.js → monitors-PDXBLB3U.js} +1 -1
  51. package/dist/{plan-index-JMC7Z4DW.js → plan-index-V7T5MKL6.js} +3 -3
  52. package/dist/{public-inbound-radar-WP3XF7GS.js → public-inbound-radar-5U4JMBRU.js} +3 -3
  53. package/dist/{remote-issues-SZ4HDQL5.js → remote-issues-APYOMIJC.js} +4 -4
  54. package/dist/{run-I3BFGULT.js → run-MWOI7UW5.js} +7 -6
  55. package/dist/{run-plan-FO7CL4M3.js → run-plan-UWQD3BIJ.js} +37 -6
  56. package/dist/{scan-NI2SWJ2E.js → scan-3MIUE7OR.js} +2 -2
  57. package/dist/{setup-global-M42GEODI.js → setup-global-AT4DD3MG.js} +9 -9
  58. package/dist/{status-XPVQVQMX.js → status-MXNTBKPL.js} +11 -11
  59. package/dist/{update-FJ2EBZVO.js → update-P62637ZI.js} +12 -12
  60. package/package.json +10 -6
  61. package/dist/chunk-5VCOWTTP.js +0 -6
  62. package/dist/install-RHOS3OYZ.js +0 -34
package/LICENSE CHANGED
@@ -1,75 +1,202 @@
1
- Required Notice: Copyright (c) 2026 agent-kit-startup
2
1
 
3
- # PolyForm Noncommercial License 1.0.0
4
-
5
- <https://polyformproject.org/licenses/noncommercial/1.0.0>
6
-
7
- ## Acceptance
8
-
9
- In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
10
-
11
- ## Copyright License
12
-
13
- The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
14
-
15
- ## Distribution License
16
-
17
- The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
18
-
19
- ## Notices
20
-
21
- You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
22
-
23
- > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
24
-
25
- ## Changes and New Works License
26
-
27
- The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
28
-
29
- ## Patent License
30
-
31
- The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
32
-
33
- ## Noncommercial Purposes
34
-
35
- Any noncommercial purpose is a permitted purpose.
36
-
37
- ## Personal Uses
38
-
39
- Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
40
-
41
- ## Noncommercial Organizations
42
-
43
- Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
44
-
45
- ## Fair Use
46
-
47
- You may have "fair use" rights for the software under the law. These terms do not limit them.
48
-
49
- ## No Other Rights
50
-
51
- These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
52
-
53
- ## Patent Defense
54
-
55
- If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
56
-
57
- ## Violations
58
-
59
- The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
60
-
61
- ## No Liability
62
-
63
- ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
64
-
65
- ## Definitions
66
-
67
- The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
68
-
69
- **You** refers to the individual or entity agreeing to these terms.
70
-
71
- **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
72
-
73
- **Your licenses** are all the licenses granted to you for the software under these terms.
74
-
75
- **Use** means anything you do with the software requiring one of your licenses.
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,2 @@
1
+ Mission Kit
2
+ Copyright 2026 The Mission Kit Authors
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @dadado/agent-kit-cli
2
2
 
3
3
  [![npm version of @dadado/agent-kit-cli](https://img.shields.io/npm/v/%40dadado%2Fagent-kit-cli?label=npm&color=0C8DEB)](https://www.npmjs.com/package/@dadado/agent-kit-cli)
4
- [![License: PolyForm Noncommercial 1.0.0](https://img.shields.io/badge/license-PolyForm--Noncommercial--1.0.0-blue)](LICENSE)
5
- [![Node.js >=20](https://img.shields.io/badge/node-%3E%3D20-339933)](https://nodejs.org)
4
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
5
+ [![Node.js >=22.12](https://img.shields.io/badge/node-%3E%3D22.12-339933)](https://nodejs.org)
6
6
  [![Latest release of the public agent-kit repository](https://img.shields.io/github/v/release/agent-kit-startup/agent-kit?label=release&color=00D0E7)](https://github.com/agent-kit-startup/agent-kit/releases/latest)
7
7
 
8
8
  <img src="https://raw.githubusercontent.com/agent-kit-startup/agent-kit/main/dashboard/logo.svg" alt="Mission Kit helmet mark" width="120">
@@ -11,7 +11,7 @@ Agent Kit CLI: HITL operating-layer install and tooling for AI-assisted IDEs (ru
11
11
 
12
12
  ## Install
13
13
 
14
- From your project root (Node.js 20+):
14
+ From your project root (Node.js 22.12+):
15
15
 
16
16
  ```bash
17
17
  npx @dadado/agent-kit-cli@latest install
@@ -10,7 +10,7 @@ directly, and `packages/cli/dashboard/` is a generated copy (gitignored, produce
10
10
  | `start.mjs` / `start-broadcast.mjs` | loopback and LAN entry points, per-workspace port allocation |
11
11
  | `dashboard-data.mjs` | snapshot builder for the panel |
12
12
  | `dashboard.html`, `open.html` | panel and share shell |
13
- | `lib/*.mjs` | guards, semantic model, live refresh, browser open, terminal snapshot |
13
+ | `lib/*.mjs` | guards, semantic model, live refresh, browser open, terminal snapshot, headless run feed (`run-logs.mjs`) |
14
14
  | `lib/guards.d.mts` | hand-written types consumed by the CLI package (parity is pinned by a test) |
15
15
 
16
16
  ## Where the tests live
@@ -24,6 +24,15 @@ before it fans out to the workspace packages).
24
24
  `dashboard.html` is outside Biome's scope; CSS/HTML-only changes are covered by
25
25
  `packages/cli/src/dashboard/plugin-ux-validation.test.ts` instead.
26
26
 
27
+ ## Embedding (action seam, CSP readiness)
28
+
29
+ A host page can replace the copy-to-clipboard default by defining
30
+ `window.__MISSION_CONTROL_ACTIONS__ = { perform(action) }` before the panel's script runs;
31
+ every action is one `{ kind: "copy", text, subject, destination, toastMessage }` record. The web
32
+ dashboard keeps the copy-only default. Contract, CSP readiness counts and the innerHTML sink
33
+ audit: `docs/mission-control-embedding.md`. The snapshot shape is versioned by `dashboardDataVersion`
34
+ and published as `docs/contracts/mission-control-snapshot.schema.json`.
35
+
27
36
  ## Git tab and DevOps tab
28
37
 
29
38
  The Git tab (`#git`) keeps the pre-rendered `git log --graph` markdown block and adds a
@@ -5,11 +5,11 @@
5
5
  // Outputs JSON to stdout (consumed by dashboard.html)
6
6
 
7
7
  import { execFileSync } from "node:child_process";
8
- import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
8
+ import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
9
9
  import { dirname, join, resolve } from "node:path";
10
10
  import {
11
- MAX_STRING,
12
11
  allowlistConfig,
12
+ MAX_STRING,
13
13
  parseGitStatusShort,
14
14
  resolveSnapshotRepoRoot,
15
15
  truncateStr,
@@ -17,22 +17,22 @@ import {
17
17
  import { projectSlugFromRoot } from "./lib/live-refresh.mjs";
18
18
  import { PIPELINE_CACHE_ENV, readCachedPipeline } from "./lib/pipeline-cache.mjs";
19
19
  import { selectWorkspaceProcesses } from "./lib/processes.mjs";
20
+ import { collectRunLogs } from "./lib/run-logs.mjs";
20
21
  import {
21
- EXTERNAL_REPORT_FILE_RE,
22
- FIELD_REPORT_CADENCE_LEDGER_REL,
23
- FLIGHT_LOG_LEDGER_REL,
24
- MAX_AGENT_PROMPTS,
25
- MAX_EXTERNAL_REPORTS,
26
- MAX_GIT_ACTIVITY,
27
- MISSION_TIMING_LEDGER_REL,
28
- SUBAGENT_TRANSCRIPT_FILE_RE,
29
22
  buildMissionControlView,
30
23
  collectDeferredCheckIds,
31
24
  collectReadinessPendingFromReport,
32
25
  describeProcess,
33
26
  detectAwaitingPrompt,
34
27
  dismissedAttentionIds,
28
+ EXTERNAL_REPORT_FILE_RE,
35
29
  extractChatSnippet,
30
+ FIELD_REPORT_CADENCE_LEDGER_REL,
31
+ FLIGHT_LOG_LEDGER_REL,
32
+ MAX_AGENT_PROMPTS,
33
+ MAX_EXTERNAL_REPORTS,
34
+ MAX_GIT_ACTIVITY,
35
+ MISSION_TIMING_LEDGER_REL,
36
36
  parseCadenceLedger,
37
37
  parseExternalReport,
38
38
  parseFieldReportDismissals,
@@ -41,10 +41,11 @@ import {
41
41
  parseHandoffMarkdown,
42
42
  parseMissionTimingLedger,
43
43
  parseSubagentRun,
44
+ SUBAGENT_TRANSCRIPT_FILE_RE,
44
45
  serializeFlightLogLedger,
45
46
  serializeMissionTimingLedger,
46
47
  } from "./lib/semantic-model.mjs";
47
- import { MAX_TERMINAL_BYTES, buildTerminalSnapshotFields } from "./lib/terminal-snapshot.mjs";
48
+ import { buildTerminalSnapshotFields, MAX_TERMINAL_BYTES } from "./lib/terminal-snapshot.mjs";
48
49
 
49
50
  const KIT_ROOT = resolve(import.meta.dirname, "..");
50
51
  /** Snapshot root: consumer workspace when MISSION_CONTROL_REPO_ROOT is set, else kit tree. */
@@ -131,7 +132,7 @@ function redactTerminalOutput(text) {
131
132
 
132
133
  const SNAPSHOT = {
133
134
  _schema: {
134
- version: "1.3.0",
135
+ version: "1.5.0",
135
136
  description: "Mission Control dashboard data model",
136
137
  fields: {
137
138
  generatedAt: "ISO-8601 timestamp of snapshot generation",
@@ -148,6 +149,8 @@ const SNAPSHOT = {
148
149
  "Best-effort DevOps signal: pipeline ({available, runs[], reason?} recent gh run list rows; reason is 'budget' when the shared snapshot budget ran out before gh was attempted, or 'call-failed' when gh was attempted and missing/unauthenticated/timed out/errored; reason is only present when available is false; fetchedAt is the ISO time gh was last attempted, reused from serve.mjs for up to 60s) and deploy ({tags[], changelog} v* git tags + latest CHANGELOG release entry as a 'what shipped recently' proxy, not a live infra poll)",
149
150
  terminals:
150
151
  "Active Cursor terminal sessions with metadata, output line count, and capped lastOutput",
152
+ runLogs:
153
+ "Newest headless agent-kit run / tick logs from <state root>/loop-logs (AGENT_KIT_STATE_ROOT: .cursor by default, or .agent-kit; no ~/.cursor dependency): format, session id, capped last agent text, result, LOOP_TICK_RESULT line, HITL gate ids and reply stamps (1.5.0)",
151
154
  processes:
152
155
  "Running process snapshots (node, serve.mjs, git operations) with elapsed time and a generated narration per process",
153
156
  skills: "Available skills discovered in .cursor/skills/",
@@ -156,7 +159,7 @@ const SNAPSHOT = {
156
159
  },
157
160
  },
158
161
  generatedAt: new Date().toISOString(),
159
- dashboardDataVersion: "1.4.0",
162
+ dashboardDataVersion: "1.5.0",
160
163
  plans: [],
161
164
  system: {
162
165
  repoRoot: ROOT,
@@ -167,6 +170,7 @@ const SNAPSHOT = {
167
170
  memory: {},
168
171
  git: {},
169
172
  terminals: [],
173
+ runLogs: [],
170
174
  processes: [],
171
175
  skills: [],
172
176
  health: { status: "ok", checks: [] },
@@ -769,6 +773,12 @@ if (existsSync(terminalProjectPath)) {
769
773
  }
770
774
  }
771
775
 
776
+ // 7b. Headless run feed (<state root>/loop-logs, AGENT_KIT_STATE_ROOT): the kit's own transcript source,
777
+ // independent of ~/.cursor/projects (embeddable contract, 1.5.0).
778
+ if (withinSnapshotBudget(200)) {
779
+ SNAPSHOT.runLogs = collectRunLogs(ROOT, { redact: redactTerminalOutput });
780
+ }
781
+
772
782
  // 8. Config
773
783
  const configPath = join(ROOT, ".cursor", "context", "config.json");
774
784
  if (existsSync(configPath)) {
@@ -4874,6 +4874,8 @@ function copyActionTitle(subject, destination, text) {
4874
4874
  function copyForPaste(text, subject, destination) {
4875
4875
  return copyToClipboard(text, {
4876
4876
  toastMessage: copyToastMessage(subject || text, destination, text),
4877
+ subject: subject || '',
4878
+ destination: destination || '',
4877
4879
  });
4878
4880
  }
4879
4881
 
@@ -5185,6 +5187,8 @@ async function copyRepoPath(relPath) {
5185
5187
  if (!relPath) return;
5186
5188
  await copyToClipboard(relPath, {
5187
5189
  toastMessage: pathCopyToastMessage(relPath),
5190
+ subject: `path ${relPath}`,
5191
+ destination: 'filePicker',
5188
5192
  });
5189
5193
  }
5190
5194
 
@@ -5683,6 +5687,42 @@ function renderGitHygieneHint(git) {
5683
5687
  `;
5684
5688
  }
5685
5689
 
5690
+ // ===== Action seam (contract: docs/mission-control-embedding.md) =====
5691
+ /**
5692
+ * One action interface, two implementations. Every dashboard action is a typed
5693
+ * `{ kind: 'copy', text, subject, destination, toastMessage }` record. The open
5694
+ * web dashboard keeps the default implementation: copy to the clipboard and
5695
+ * name the paste destination (copy-only, ADR 2026-07-25). A host page (an
5696
+ * embedding app) may define `window.__MISSION_CONTROL_ACTIONS__ = { perform(action) }`
5697
+ * before this script runs; it then receives the frozen record instead and
5698
+ * validates it host-side against its own allowlist. The dashboard never names
5699
+ * a command for a host to run and adds no other action kind.
5700
+ * Contract: docs/mission-control-embedding.md.
5701
+ */
5702
+ const MISSION_CONTROL_ACTION_KINDS = Object.freeze(['copy']);
5703
+
5704
+ /** Host action implementation injected by an embedding page, or null (web default). */
5705
+ function missionControlActionHost() {
5706
+ const host = typeof window !== 'undefined' ? window.__MISSION_CONTROL_ACTIONS__ : null;
5707
+ return host && typeof host.perform === 'function' ? host : null;
5708
+ }
5709
+
5710
+ /**
5711
+ * Hand one action record to the injected host. The host's `{ message }` (or
5712
+ * the copy-vocabulary label) is confirmed in the toast; a rejection is shown
5713
+ * as an error and never retried here.
5714
+ */
5715
+ async function performHostAction(host, action, opts) {
5716
+ try {
5717
+ const result = await host.perform(Object.freeze({ ...action }));
5718
+ const message = result && typeof result.message === 'string' ? result.message : action.toastMessage;
5719
+ if (!opts.silent) showToast(message, !!(result && result.ok === false));
5720
+ } catch (err) {
5721
+ const reason = err && err.message ? err.message : String(err);
5722
+ showToast(`Action failed: ${reason}`, true);
5723
+ }
5724
+ }
5725
+
5686
5726
  // ===== Copy to clipboard + toast (Phase 1) =====
5687
5727
  /** Fallback confirmation. Callers should pass a destination-aware message. */
5688
5728
  function copyToastLabel(text) {
@@ -5692,6 +5732,20 @@ function copyToastLabel(text) {
5692
5732
  async function copyToClipboard(text, options) {
5693
5733
  const opts = options || {};
5694
5734
  const label = opts.toastMessage || copyToastLabel(text);
5735
+ const host = missionControlActionHost();
5736
+ if (host) {
5737
+ return performHostAction(
5738
+ host,
5739
+ {
5740
+ kind: MISSION_CONTROL_ACTION_KINDS[0],
5741
+ text: String(text ?? ''),
5742
+ subject: String(opts.subject || ''),
5743
+ destination: String(opts.destination || ''),
5744
+ toastMessage: label,
5745
+ },
5746
+ opts,
5747
+ );
5748
+ }
5695
5749
  try {
5696
5750
  if (navigator.clipboard && navigator.clipboard.writeText) {
5697
5751
  await navigator.clipboard.writeText(text);
@@ -5999,6 +6053,8 @@ function copyConfigSnippet(group) {
5999
6053
  for (const key of keys) snippet[key] = payload[key];
6000
6054
  void copyToClipboard(JSON.stringify(snippet, null, 2), {
6001
6055
  toastMessage: 'Copied config snippet - paste into .cursor/context/config.json',
6056
+ subject: 'config snippet',
6057
+ destination: '.cursor/context/config.json',
6002
6058
  });
6003
6059
  return false;
6004
6060
  }
@@ -6014,6 +6070,8 @@ function copyStaticConfigSnippet(id) {
6014
6070
  if (!snippet) return false;
6015
6071
  void copyToClipboard(JSON.stringify(snippet, null, 2), {
6016
6072
  toastMessage: 'Copied config snippet - paste into .cursor/context/config.json (not writable via tab)',
6073
+ subject: 'config snippet',
6074
+ destination: '.cursor/context/config.json',
6017
6075
  });
6018
6076
  return false;
6019
6077
  }
@@ -17,7 +17,7 @@ function mentionsPath(cmd, needle) {
17
17
  const at = cmd.indexOf(needle, from);
18
18
  if (at === -1) return false;
19
19
  const next = cmd[at + needle.length];
20
- if (next === undefined || /[\/\s"':]/.test(next)) return true;
20
+ if (next === undefined || /[/\s"':]/.test(next)) return true;
21
21
  from = at + 1;
22
22
  }
23
23
  }
@@ -0,0 +1,34 @@
1
+ /** Ambient types for dashboard/lib/run-logs.mjs (consumed by CLI TypeScript). */
2
+
3
+ export const MAX_RUN_LOGS: 10;
4
+ export const MAX_RUN_LOG_BYTES: number;
5
+ export const MAX_RUN_LOG_TEXT: 600;
6
+
7
+ export interface RunLogSummary {
8
+ format: "stream-json" | "codex" | "acp" | null;
9
+ sessionId: string | null;
10
+ events: number;
11
+ lastText: string;
12
+ result: { isError: boolean; subtype: string | null; text: string } | null;
13
+ sentinel: string | null;
14
+ gates: string[];
15
+ replies: string[];
16
+ }
17
+
18
+ export interface RunLogRow extends RunLogSummary {
19
+ id: string;
20
+ kind: "tick" | "run";
21
+ path: string;
22
+ updatedAt: string;
23
+ bytes: number;
24
+ source: "loop-logs";
25
+ }
26
+
27
+ export function resolveRunnerStateDir(
28
+ env?: Record<string, string | undefined>,
29
+ ): ".cursor" | ".agent-kit";
30
+ export function summarizeRunLog(text: string, redact?: (s: string) => string): RunLogSummary;
31
+ export function collectRunLogs(
32
+ root: string,
33
+ opts?: { stateDir?: string; redact?: (s: string) => string; max?: number },
34
+ ): RunLogRow[];