@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.
- package/LICENSE +201 -74
- package/NOTICE +2 -0
- package/README.md +3 -3
- package/dashboard/README.md +10 -1
- package/dashboard/dashboard-data.mjs +23 -13
- package/dashboard/dashboard.html +58 -0
- package/dashboard/lib/processes.mjs +1 -1
- package/dashboard/lib/run-logs.d.mts +34 -0
- package/dashboard/lib/run-logs.mjs +218 -0
- package/dashboard/lib/semantic-model.mjs +4 -3
- package/dashboard/serve.mjs +4 -4
- package/dashboard/start-broadcast.mjs +1 -1
- package/dashboard/start.mjs +1 -1
- package/dist/{add-HTYIFKMN.js → add-YTCDLPUS.js} +4 -4
- package/dist/{chunk-SMGFN3Z4.js → chunk-2FQX2O4I.js} +4 -4
- package/dist/{chunk-PNG7LO2F.js → chunk-3DGTPONS.js} +1 -1
- package/dist/{chunk-VY7MTPJ2.js → chunk-426GITN7.js} +1 -1
- package/dist/{chunk-2IPXQFJE.js → chunk-4CRBUEJ6.js} +2 -2
- package/dist/{chunk-STGFBAYT.js → chunk-4U7DLAQH.js} +11 -19
- package/dist/{chunk-77V75A7O.js → chunk-5B4DVO6C.js} +1 -1
- package/dist/{chunk-4IWG5CVE.js → chunk-B3VR5YBQ.js} +10 -5
- package/dist/{chunk-OUQZC744.js → chunk-B5CH47OS.js} +852 -74
- package/dist/{chunk-2RDRMGD3.js → chunk-BBVBYQJO.js} +2 -2
- package/dist/chunk-C26I6HTO.js +39 -0
- package/dist/{chunk-AW74INUW.js → chunk-DBPNGZNH.js} +6 -5
- package/dist/{chunk-DQA434Y4.js → chunk-DBXDV5O7.js} +3 -3
- package/dist/{chunk-S6GMFDKV.js → chunk-DRND2KYV.js} +2 -2
- package/dist/{chunk-F4VMYR7U.js → chunk-GN4SAZF2.js} +4 -4
- package/dist/{chunk-ZXKZBTXE.js → chunk-HAFRAXGV.js} +1 -1
- package/dist/{chunk-CBCW5R5J.js → chunk-MCH3E46V.js} +2 -2
- package/dist/{chunk-WW3YZKHW.js → chunk-NDIGZXFF.js} +26 -5
- package/dist/{chunk-TFZ2JUXH.js → chunk-PAB35H27.js} +523 -73
- package/dist/{chunk-NQ7IQ5XT.js → chunk-PFEUZXVT.js} +1 -1
- package/dist/{chunk-W24CMQ32.js → chunk-PPKX55GI.js} +3 -3
- package/dist/{chunk-ZCTSUQRR.js → chunk-T6P5ZMG2.js} +3 -3
- package/dist/{chunk-N3HTJVBR.js → chunk-VTOUQAVR.js} +1 -1
- package/dist/{chunk-B73KQ5KX.js → chunk-WFXHMP47.js} +11 -11
- package/dist/chunk-WGLPZXNU.js +45 -0
- package/dist/{chunk-KD2MYBB6.js → chunk-WUWRGOUV.js} +2 -2
- package/dist/{contribute-C6AW2P6J.js → contribute-A7NCWTUM.js} +5 -5
- package/dist/{cursor-awareness-KTL2RGKD.js → cursor-awareness-TN5JXD2C.js} +3 -3
- package/dist/{diff-VHNR62SI.js → diff-4MDU5SLE.js} +6 -6
- package/dist/{doctor-PET2HRRJ.js → doctor-MQAXOFKM.js} +16 -14
- package/dist/{dogfood-KKFVRWT6.js → dogfood-2JAHSYQA.js} +4 -4
- package/dist/{handoff-3UI6VKVG.js → handoff-MK5JG3J5.js} +4 -4
- package/dist/{hook-DYIMKJYL.js → hook-D2WHBKRN.js} +12 -12
- package/dist/index.js +26 -24
- package/dist/{init-Q4LBM6KT.js → init-7T6KNDFE.js} +17 -16
- package/dist/install-6G3D7J4U.js +35 -0
- package/dist/{monitors-QV2IS3MP.js → monitors-PDXBLB3U.js} +1 -1
- package/dist/{plan-index-JMC7Z4DW.js → plan-index-V7T5MKL6.js} +3 -3
- package/dist/{public-inbound-radar-WP3XF7GS.js → public-inbound-radar-5U4JMBRU.js} +3 -3
- package/dist/{remote-issues-SZ4HDQL5.js → remote-issues-APYOMIJC.js} +4 -4
- package/dist/{run-I3BFGULT.js → run-MWOI7UW5.js} +7 -6
- package/dist/{run-plan-FO7CL4M3.js → run-plan-UWQD3BIJ.js} +37 -6
- package/dist/{scan-NI2SWJ2E.js → scan-3MIUE7OR.js} +2 -2
- package/dist/{setup-global-M42GEODI.js → setup-global-AT4DD3MG.js} +9 -9
- package/dist/{status-XPVQVQMX.js → status-MXNTBKPL.js} +11 -11
- package/dist/{update-FJ2EBZVO.js → update-P62637ZI.js} +12 -12
- package/package.json +10 -6
- package/dist/chunk-5VCOWTTP.js +0 -6
- 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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @dadado/agent-kit-cli
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@dadado/agent-kit-cli)
|
|
4
|
-
[](LICENSE)
|
|
5
|
+
[](https://nodejs.org)
|
|
6
6
|
[](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
|
|
14
|
+
From your project root (Node.js 22.12+):
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
npx @dadado/agent-kit-cli@latest install
|
package/dashboard/README.md
CHANGED
|
@@ -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,
|
|
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 {
|
|
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.
|
|
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.
|
|
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)) {
|
package/dashboard/dashboard.html
CHANGED
|
@@ -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 || /[
|
|
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[];
|