agent-canvas 0.2.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -17
- package/bin/agent-canvas.js +7 -7
- package/bin/agent-canvas.ts +48 -37
- package/bin/lib/commands/daemon.ts +46 -43
- package/bin/lib/commands/exec.ts +100 -100
- package/bin/lib/commands/fetch.ts +15 -15
- package/bin/lib/commands/install.ts +36 -36
- package/bin/lib/commands/instructions.ts +51 -51
- package/bin/lib/commands/push.ts +115 -97
- package/bin/lib/commands/review.ts +190 -0
- package/bin/lib/commands/watch.ts +24 -24
- package/bin/lib/config.ts +12 -12
- package/bin/lib/daemon-lifecycle.ts +47 -51
- package/bin/lib/helpers.ts +82 -76
- package/bin/lib/instructions/app-review.md +88 -0
- package/bin/lib/instructions/component-checklist.md +7 -5
- package/bin/lib/instructions/component-custom.md +20 -14
- package/bin/lib/instructions/component-diff.md +4 -3
- package/bin/lib/instructions/component-item.md +18 -8
- package/bin/lib/instructions/component-markdown.md +4 -2
- package/bin/lib/instructions/component-mermaid.md +12 -6
- package/bin/lib/instructions/component-multichoice.md +6 -2
- package/bin/lib/instructions/component-note.md +1 -1
- package/bin/lib/instructions/component-priority.md +1 -1
- package/bin/lib/instructions/component-rangeinput.md +9 -2
- package/bin/lib/instructions/component-secretinput.md +12 -11
- package/bin/lib/instructions/component-svg.md +62 -16
- package/bin/lib/instructions/component-table.md +6 -6
- package/bin/lib/instructions/component-usefeedback.md +8 -8
- package/bin/lib/instructions/component-userinput.md +6 -2
- package/bin/lib/instructions/flow-feature.md +22 -5
- package/bin/lib/instructions/flow-plan.md +5 -5
- package/bin/lib/instructions/flow-runbook.md +28 -25
- package/bin/lib/instructions/overview.md +27 -18
- package/bin/lib/instructions/theming.md +5 -0
- package/daemon/build.ts +171 -152
- package/daemon/client/App.tsx +1205 -1077
- package/daemon/client/CompareView.tsx +478 -458
- package/daemon/client/FileBrowser.tsx +241 -203
- package/daemon/client/FileViewer.tsx +220 -211
- package/daemon/client/OverviewView.tsx +283 -267
- package/daemon/client/ReviewerIdentityDialog.tsx +72 -71
- package/daemon/client/RevisionSelect.tsx +111 -95
- package/daemon/client/SessionSwitcher.tsx +81 -81
- package/daemon/client/ShareDialog.tsx +211 -212
- package/daemon/client/apiSchemas.ts +78 -0
- package/daemon/client/canvas-runtime.ts +1 -1
- package/daemon/client/clientApi.ts +194 -206
- package/daemon/client/components/SecretInput.tsx +138 -138
- package/daemon/client/components/index.ts +2 -2
- package/daemon/client/domDiff.ts +341 -333
- package/daemon/client/errorMessage.ts +3 -0
- package/daemon/client/exportMarkdown.ts +222 -201
- package/daemon/client/lcs.ts +19 -14
- package/daemon/client/shareCrypto.ts +57 -57
- package/daemon/client/unifiedDiff.ts +660 -649
- package/daemon/dist/annotations-runtime.js +1 -1
- package/daemon/dist/client.css +2 -2
- package/daemon/dist/client.js +77 -80
- package/daemon/dist/components.js +59 -59
- package/daemon/dist/preact-compat.js +1 -1
- package/daemon/dist/review.js +361 -0
- package/daemon/dist/runtime.js +1 -1
- package/daemon/langMap.ts +24 -6
- package/daemon/review-widget/anchor.ts +187 -0
- package/daemon/review-widget/client.ts +95 -0
- package/daemon/review-widget/index.tsx +36 -0
- package/daemon/review-widget/markup.ts +71 -0
- package/daemon/review-widget/screenshot.ts +91 -0
- package/daemon/review-widget/source.ts +103 -0
- package/daemon/review-widget/styles.css +359 -0
- package/daemon/review-widget/text-modules.d.ts +4 -0
- package/daemon/review-widget/tsconfig.json +16 -0
- package/daemon/review-widget/widget.tsx +436 -0
- package/daemon/src/components.ts +3 -3
- package/daemon/src/handlers/api.ts +330 -328
- package/daemon/src/handlers/files.ts +112 -106
- package/daemon/src/handlers/static.ts +47 -46
- package/daemon/src/handlers/uploads.ts +61 -56
- package/daemon/src/paths.ts +13 -10
- package/daemon/src/remote-feedback.ts +192 -192
- package/daemon/src/review/markdown.ts +52 -0
- package/daemon/src/review/model.ts +132 -0
- package/daemon/src/review/proxy.ts +177 -0
- package/daemon/src/review/server.ts +199 -0
- package/daemon/src/review/store.ts +151 -0
- package/daemon/src/server.ts +127 -86
- package/daemon/src/share.ts +163 -169
- package/daemon/src/stubFetch.ts +7 -0
- package/daemon/tsconfig.json +19 -19
- package/package.json +47 -47
- package/skills/canvas/SKILL.md +5 -1
- package/bin/lib/commands/exec.test.ts +0 -27
- package/bin/lib/helpers.test.ts +0 -79
- package/daemon/src/files-api.test.ts +0 -78
- package/daemon/src/remote-feedback.test.ts +0 -165
- package/daemon/src/secrets-api.test.ts +0 -123
- package/daemon/src/share-e2e.test.ts +0 -277
- package/daemon/src/share.test.ts +0 -289
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
all: initial;
|
|
3
|
+
--bg: #ffffff;
|
|
4
|
+
--bg-muted: #f4f4f5;
|
|
5
|
+
--text: #18181b;
|
|
6
|
+
--text-muted: #71717a;
|
|
7
|
+
--border: #e4e4e7;
|
|
8
|
+
--accent: #6d28d9;
|
|
9
|
+
--accent-text: #ffffff;
|
|
10
|
+
--accent-soft: #ede9fe;
|
|
11
|
+
--ok: #15803d;
|
|
12
|
+
--ok-soft: #dcfce7;
|
|
13
|
+
--warn: #b45309;
|
|
14
|
+
--warn-soft: #fef3c7;
|
|
15
|
+
--shadow: 0 8px 28px rgba(24, 24, 27, 0.18), 0 1px 3px rgba(24, 24, 27, 0.12);
|
|
16
|
+
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
17
|
+
font-size: 13px;
|
|
18
|
+
line-height: 1.45;
|
|
19
|
+
color: var(--text);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@media (prefers-color-scheme: dark) {
|
|
23
|
+
:host {
|
|
24
|
+
--bg: #18181b;
|
|
25
|
+
--bg-muted: #27272a;
|
|
26
|
+
--text: #f4f4f5;
|
|
27
|
+
--text-muted: #a1a1aa;
|
|
28
|
+
--border: #3f3f46;
|
|
29
|
+
--accent: #a78bfa;
|
|
30
|
+
--accent-text: #18181b;
|
|
31
|
+
--accent-soft: #2e1065;
|
|
32
|
+
--ok: #4ade80;
|
|
33
|
+
--ok-soft: #14532d;
|
|
34
|
+
--warn: #fbbf24;
|
|
35
|
+
--warn-soft: #451a03;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
* {
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
button {
|
|
44
|
+
font: inherit;
|
|
45
|
+
color: inherit;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
border: 1px solid var(--border);
|
|
48
|
+
background: var(--bg);
|
|
49
|
+
border-radius: 6px;
|
|
50
|
+
padding: 4px 10px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
button:hover {
|
|
54
|
+
background: var(--bg-muted);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
button.primary {
|
|
58
|
+
background: var(--accent);
|
|
59
|
+
border-color: var(--accent);
|
|
60
|
+
color: var(--accent-text);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
button.primary:hover {
|
|
64
|
+
filter: brightness(1.08);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
button.ghost {
|
|
68
|
+
border-color: transparent;
|
|
69
|
+
background: transparent;
|
|
70
|
+
color: var(--text-muted);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
button:disabled {
|
|
74
|
+
opacity: 0.5;
|
|
75
|
+
cursor: default;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
textarea {
|
|
79
|
+
font: inherit;
|
|
80
|
+
color: inherit;
|
|
81
|
+
width: 100%;
|
|
82
|
+
min-height: 72px;
|
|
83
|
+
resize: vertical;
|
|
84
|
+
padding: 8px;
|
|
85
|
+
border: 1px solid var(--border);
|
|
86
|
+
border-radius: 6px;
|
|
87
|
+
background: var(--bg);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
textarea:focus {
|
|
91
|
+
outline: 2px solid var(--accent);
|
|
92
|
+
outline-offset: -1px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.toolbar {
|
|
96
|
+
position: fixed;
|
|
97
|
+
right: 16px;
|
|
98
|
+
bottom: 16px;
|
|
99
|
+
z-index: 2147483646;
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
gap: 6px;
|
|
103
|
+
padding: 6px;
|
|
104
|
+
background: var(--bg);
|
|
105
|
+
border: 1px solid var(--border);
|
|
106
|
+
border-radius: 10px;
|
|
107
|
+
box-shadow: var(--shadow);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.toolbar.beside-panel {
|
|
111
|
+
right: calc(min(380px, 100vw) + 16px);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.toolbar button.active {
|
|
115
|
+
background: var(--accent);
|
|
116
|
+
border-color: var(--accent);
|
|
117
|
+
color: var(--accent-text);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.presence {
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
gap: 6px;
|
|
124
|
+
padding: 0 6px;
|
|
125
|
+
color: var(--text-muted);
|
|
126
|
+
font-size: 12px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.dot {
|
|
130
|
+
width: 8px;
|
|
131
|
+
height: 8px;
|
|
132
|
+
border-radius: 50%;
|
|
133
|
+
background: var(--text-muted);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.dot.on {
|
|
137
|
+
background: var(--ok);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.dot.off-line {
|
|
141
|
+
background: var(--warn);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.highlight {
|
|
145
|
+
position: fixed;
|
|
146
|
+
z-index: 2147483644;
|
|
147
|
+
pointer-events: none;
|
|
148
|
+
border: 2px solid var(--accent);
|
|
149
|
+
background: color-mix(in srgb, var(--accent) 10%, transparent);
|
|
150
|
+
border-radius: 3px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.highlight.flash {
|
|
154
|
+
animation: flash 1.2s ease-out;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@keyframes flash {
|
|
158
|
+
from {
|
|
159
|
+
background: color-mix(in srgb, var(--accent) 35%, transparent);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.pin {
|
|
164
|
+
position: fixed;
|
|
165
|
+
z-index: 2147483645;
|
|
166
|
+
min-width: 22px;
|
|
167
|
+
height: 22px;
|
|
168
|
+
padding: 0 6px;
|
|
169
|
+
border-radius: 11px 11px 11px 2px;
|
|
170
|
+
border: 2px solid var(--bg);
|
|
171
|
+
background: var(--accent);
|
|
172
|
+
color: var(--accent-text);
|
|
173
|
+
font-size: 11px;
|
|
174
|
+
font-weight: 600;
|
|
175
|
+
line-height: 18px;
|
|
176
|
+
text-align: center;
|
|
177
|
+
box-shadow: var(--shadow);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.pin.queued,
|
|
181
|
+
.pin.working {
|
|
182
|
+
background: var(--warn);
|
|
183
|
+
color: var(--bg);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.pin.resolved {
|
|
187
|
+
background: var(--ok);
|
|
188
|
+
color: var(--bg);
|
|
189
|
+
opacity: 0.7;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.popover {
|
|
193
|
+
position: fixed;
|
|
194
|
+
z-index: 2147483647;
|
|
195
|
+
width: 320px;
|
|
196
|
+
padding: 10px;
|
|
197
|
+
background: var(--bg);
|
|
198
|
+
border: 1px solid var(--border);
|
|
199
|
+
border-radius: 10px;
|
|
200
|
+
box-shadow: var(--shadow);
|
|
201
|
+
display: flex;
|
|
202
|
+
flex-direction: column;
|
|
203
|
+
gap: 8px;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.target {
|
|
207
|
+
color: var(--text-muted);
|
|
208
|
+
font-size: 12px;
|
|
209
|
+
overflow: hidden;
|
|
210
|
+
text-overflow: ellipsis;
|
|
211
|
+
white-space: nowrap;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.actions {
|
|
215
|
+
display: flex;
|
|
216
|
+
justify-content: flex-end;
|
|
217
|
+
gap: 6px;
|
|
218
|
+
flex-wrap: wrap;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.option {
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
gap: 6px;
|
|
225
|
+
color: var(--text-muted);
|
|
226
|
+
font-size: 12px;
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.hint {
|
|
231
|
+
color: var(--text-muted);
|
|
232
|
+
font-size: 11px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.panel {
|
|
236
|
+
position: fixed;
|
|
237
|
+
top: 0;
|
|
238
|
+
right: 0;
|
|
239
|
+
bottom: 0;
|
|
240
|
+
z-index: 2147483646;
|
|
241
|
+
width: min(380px, 100vw);
|
|
242
|
+
display: flex;
|
|
243
|
+
flex-direction: column;
|
|
244
|
+
background: var(--bg);
|
|
245
|
+
border-left: 1px solid var(--border);
|
|
246
|
+
box-shadow: var(--shadow);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.panel header {
|
|
250
|
+
display: flex;
|
|
251
|
+
align-items: center;
|
|
252
|
+
gap: 8px;
|
|
253
|
+
padding: 12px;
|
|
254
|
+
border-bottom: 1px solid var(--border);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.panel header h2 {
|
|
258
|
+
flex: 1;
|
|
259
|
+
margin: 0;
|
|
260
|
+
font-size: 14px;
|
|
261
|
+
font-weight: 600;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.tabs {
|
|
265
|
+
display: flex;
|
|
266
|
+
gap: 4px;
|
|
267
|
+
padding: 8px 12px;
|
|
268
|
+
border-bottom: 1px solid var(--border);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.tabs button.active {
|
|
272
|
+
background: var(--bg-muted);
|
|
273
|
+
font-weight: 600;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.threads {
|
|
277
|
+
flex: 1;
|
|
278
|
+
overflow-y: auto;
|
|
279
|
+
padding: 12px;
|
|
280
|
+
display: flex;
|
|
281
|
+
flex-direction: column;
|
|
282
|
+
gap: 10px;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.empty {
|
|
286
|
+
color: var(--text-muted);
|
|
287
|
+
text-align: center;
|
|
288
|
+
padding: 24px 8px;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.thread {
|
|
292
|
+
border: 1px solid var(--border);
|
|
293
|
+
border-radius: 8px;
|
|
294
|
+
padding: 10px;
|
|
295
|
+
display: flex;
|
|
296
|
+
flex-direction: column;
|
|
297
|
+
gap: 8px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.thread.current {
|
|
301
|
+
border-color: var(--accent);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.thread-head {
|
|
305
|
+
display: flex;
|
|
306
|
+
align-items: center;
|
|
307
|
+
gap: 6px;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.thread-head .target {
|
|
311
|
+
flex: 1;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.badge {
|
|
315
|
+
font-size: 11px;
|
|
316
|
+
font-weight: 600;
|
|
317
|
+
padding: 1px 6px;
|
|
318
|
+
border-radius: 4px;
|
|
319
|
+
background: var(--bg-muted);
|
|
320
|
+
color: var(--text-muted);
|
|
321
|
+
white-space: nowrap;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.badge.queued,
|
|
325
|
+
.badge.working {
|
|
326
|
+
background: var(--warn-soft);
|
|
327
|
+
color: var(--warn);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.badge.resolved {
|
|
331
|
+
background: var(--ok-soft);
|
|
332
|
+
color: var(--ok);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.comment {
|
|
336
|
+
display: flex;
|
|
337
|
+
flex-direction: column;
|
|
338
|
+
gap: 2px;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.comment .author {
|
|
342
|
+
font-size: 11px;
|
|
343
|
+
font-weight: 600;
|
|
344
|
+
color: var(--text-muted);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.comment.agent .author {
|
|
348
|
+
color: var(--accent);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.comment .body {
|
|
352
|
+
white-space: pre-wrap;
|
|
353
|
+
overflow-wrap: anywhere;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.error {
|
|
357
|
+
color: var(--warn);
|
|
358
|
+
font-size: 12px;
|
|
359
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"jsxImportSource": "preact",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"noUncheckedIndexedAccess": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"types": []
|
|
14
|
+
},
|
|
15
|
+
"include": ["**/*.ts", "**/*.tsx", "../src/review/model.ts"]
|
|
16
|
+
}
|