@telepath-computer/television 0.1.27 → 0.1.29
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 +21 -10
- package/dist/browser/assets/index-Bi8GHwko.js +548 -0
- package/dist/browser/assets/index-BporpGDZ.css +1 -0
- package/dist/browser/index.html +2 -2
- package/dist/cli.cjs +43922 -80546
- package/dist/electron.cjs +42950 -79935
- package/dist/views/text/index.html +38 -0
- package/dist/views/text/manifest.json +5 -0
- package/package.json +26 -15
- package/skill/SKILL.md +365 -100
- package/dist/artifact-runtime/index.js +0 -986
- package/dist/artifact-runtime/style.css +0 -1
- package/dist/browser/assets/index-C0Ygc25s.js +0 -555
- package/dist/browser/assets/index-D0BGTUk2.css +0 -1
package/skill/SKILL.md
CHANGED
|
@@ -1,171 +1,283 @@
|
|
|
1
1
|
# Television
|
|
2
2
|
|
|
3
|
-
Television is a
|
|
3
|
+
Television is a persistent artifact screen for agents. Use it when the user
|
|
4
|
+
should be able to inspect, revisit, and refine a file-backed result instead of
|
|
5
|
+
only reading a chat reply.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
If you lose context, run:
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
tv
|
|
10
|
+
tv help
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
That command prints this full skill as one blob. There is no topic-scoped help
|
|
14
|
+
in the current implementation.
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
tv serve
|
|
15
|
-
```
|
|
16
|
+
## Mental model
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
- A **screen** is the screen and layout container.
|
|
19
|
+
- An **artifact** is one displayed result on that screen.
|
|
20
|
+
- An **internal artifact** is a Television-managed bundle. You create a pending
|
|
21
|
+
bundle, edit files in that bundle, then commit it.
|
|
22
|
+
- An **external artifact** is a pointer to an existing absolute file on disk.
|
|
23
|
+
Television displays that file but does not own or delete it.
|
|
24
|
+
- **Pending** means a create or edit is staged but not yet committed.
|
|
25
|
+
- **Trash** means metadata and committed internal bundles moved out of the live
|
|
26
|
+
tree. There is no restore workflow in the current scope.
|
|
18
27
|
|
|
19
|
-
|
|
28
|
+
The core workflow is:
|
|
20
29
|
|
|
21
|
-
|
|
30
|
+
1. Decide whether the result should be internal or external.
|
|
31
|
+
2. Create or stage the artifact with the CLI.
|
|
32
|
+
3. For internal artifacts, edit files in the pending bundle.
|
|
33
|
+
4. Commit when the validation rules are satisfied.
|
|
22
34
|
|
|
23
|
-
|
|
24
|
-
- `title`: user-visible title shown in the workspace
|
|
25
|
-
- `path`: absolute file path to the artifact source on disk
|
|
35
|
+
## User communication during multi-step workflows
|
|
26
36
|
|
|
27
|
-
|
|
37
|
+
When you are doing a multi-step artifact workflow, keep the user informed as you
|
|
38
|
+
progress.
|
|
28
39
|
|
|
29
|
-
|
|
40
|
+
Required communication style:
|
|
30
41
|
|
|
31
|
-
|
|
42
|
+
- verbalize key actions and decisions as they happen
|
|
43
|
+
- keep the language concise
|
|
44
|
+
- prefer short updates over long explanations
|
|
45
|
+
- frame updates in the user's world and goals, not in the internal mechanics of the skill or CLI workflow
|
|
46
|
+
- avoid technical workflow jargon unless the user explicitly asks for it
|
|
47
|
+
- do not write reports, long paragraphs, or chatty summaries while the work is in progress
|
|
48
|
+
- do not use lists unless the user explicitly asks for one
|
|
49
|
+
- optimize for speed and token efficiency
|
|
32
50
|
|
|
33
|
-
|
|
34
|
-
- `path`: absolute path to a `.md` file
|
|
51
|
+
Good examples:
|
|
35
52
|
|
|
36
|
-
|
|
53
|
+
- "Starting the artifact now."
|
|
54
|
+
- "Reviewing the draft and source material."
|
|
55
|
+
- "Updating the HTML and efficiently navigating the artifact creation flow."
|
|
56
|
+
- "The artifact did not pass validation yet; fixing the draft notes and retrying."
|
|
57
|
+
- "Finalizing the artifact now."
|
|
58
|
+
- "Done."
|
|
37
59
|
|
|
38
|
-
|
|
60
|
+
Bad examples:
|
|
39
61
|
|
|
40
|
-
|
|
62
|
+
- multi-paragraph progress reports
|
|
63
|
+
- long retrospective narration during execution
|
|
64
|
+
- verbose bullet lists for routine workflow steps
|
|
41
65
|
|
|
42
|
-
|
|
43
|
-
- `path`: absolute path to an `.html` file
|
|
66
|
+
## Internal versus external
|
|
44
67
|
|
|
45
|
-
|
|
68
|
+
Use an **internal artifact** when:
|
|
46
69
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
70
|
+
- the artifact is purpose-built for Television
|
|
71
|
+
- Television should own the bundle structure
|
|
72
|
+
- future agents should be able to maintain the result by reading bundle files
|
|
73
|
+
- you need a staged create or staged edit workflow
|
|
50
74
|
|
|
51
|
-
|
|
52
|
-
<p>Hello</p>
|
|
53
|
-
```
|
|
75
|
+
Use an **external artifact** when:
|
|
54
76
|
|
|
55
|
-
|
|
77
|
+
- a real file already exists on disk
|
|
78
|
+
- the user wants Television to display that existing file
|
|
79
|
+
- you do not need a Television-managed bundle
|
|
56
80
|
|
|
57
|
-
|
|
81
|
+
Decision rule:
|
|
58
82
|
|
|
59
|
-
|
|
83
|
+
- If the result should be maintained as a Television-owned long-lived artifact,
|
|
84
|
+
choose internal.
|
|
85
|
+
- If the result is already a real file outside Television and should stay that
|
|
86
|
+
way, choose external.
|
|
60
87
|
|
|
61
|
-
|
|
88
|
+
Supported artifact types:
|
|
62
89
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
tv serve --persist # install as a background system service
|
|
66
|
-
tv serve --port 3000 # custom port
|
|
67
|
-
tv serve --public # no auth (open access)
|
|
68
|
-
```
|
|
90
|
+
- `text/markdown`
|
|
91
|
+
- `text/html`
|
|
69
92
|
|
|
70
|
-
|
|
93
|
+
## Internal bundle files
|
|
71
94
|
|
|
72
|
-
|
|
73
|
-
tv stop
|
|
74
|
-
```
|
|
95
|
+
Every internal artifact bundle contains:
|
|
75
96
|
|
|
76
|
-
|
|
97
|
+
- `artifact.md`
|
|
98
|
+
- `data.json`
|
|
99
|
+
- `memory.md`
|
|
100
|
+
- `public/index.md` or `public/index.html`
|
|
77
101
|
|
|
78
|
-
|
|
79
|
-
tv status
|
|
80
|
-
```
|
|
102
|
+
Fresh pending bundles are intentionally minimal:
|
|
81
103
|
|
|
82
|
-
|
|
104
|
+
- `artifact.md` is blank
|
|
105
|
+
- `memory.md` is blank
|
|
106
|
+
- `public/index.md` or `public/index.html` is blank
|
|
107
|
+
- `data.json` is exactly `{}`
|
|
83
108
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
```
|
|
109
|
+
The scaffold is not commit-valid by itself. Learn the required structure from
|
|
110
|
+
this skill, not from placeholder content in the scaffold.
|
|
87
111
|
|
|
88
|
-
###
|
|
112
|
+
### `artifact.md`
|
|
89
113
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
114
|
+
`artifact.md` is the contract for the artifact. It explains what the artifact
|
|
115
|
+
is for, what conceptual material it is based on, how it should render, and how
|
|
116
|
+
later agents should maintain it.
|
|
117
|
+
|
|
118
|
+
Before commit, `artifact.md` must be non-empty and contain all of these exact
|
|
119
|
+
headings:
|
|
120
|
+
|
|
121
|
+
```md
|
|
122
|
+
## User intent
|
|
123
|
+
## Purpose
|
|
124
|
+
## Data shape
|
|
125
|
+
## Data sources
|
|
126
|
+
## Rendering
|
|
127
|
+
## Update workflow
|
|
128
|
+
## Non-goals
|
|
93
129
|
```
|
|
94
130
|
|
|
95
|
-
|
|
131
|
+
What each section should capture:
|
|
96
132
|
|
|
97
|
-
|
|
133
|
+
- `## User intent`: faithful restatement or quotation of what the user actually said they wanted; this is critical and should preserve the user's language as closely as practical, including requests, feedback, complaints, constraints, and guidance
|
|
134
|
+
- `## Purpose`: what the artifact is trying to achieve
|
|
135
|
+
- `## Data shape`: the conceptual shape you reasoned about while authoring; for markdown artifacts this will often just be `{}`
|
|
136
|
+
- `## Data sources`: where the underlying facts, notes, or source material came from and how they were obtained
|
|
137
|
+
- `## Rendering`: how `public/index.md` or `public/index.html` should present it
|
|
138
|
+
- `## Update workflow`: how future agents should refresh or modify it
|
|
139
|
+
- `## Non-goals`: what is intentionally excluded, especially application-like runtime behavior
|
|
98
140
|
|
|
99
|
-
|
|
100
|
-
tv create-artifact --path "/absolute/path/to/plan.md"
|
|
101
|
-
tv create-artifact --type html --path "/absolute/path/to/dashboard.html"
|
|
102
|
-
tv create-artifact --path "/absolute/path/to/plan.md" --workspace "workspace-id"
|
|
103
|
-
```
|
|
141
|
+
### `data.json`
|
|
104
142
|
|
|
105
|
-
|
|
143
|
+
`data.json` is a **thinking artifact**, not a runtime payload.
|
|
106
144
|
|
|
107
|
-
|
|
145
|
+
Its purpose is to help the model separate:
|
|
108
146
|
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
- html paths must end in `.html`
|
|
112
|
-
- file must exist
|
|
113
|
-
- file must be readable
|
|
147
|
+
- reasoning / planning / authoring structure
|
|
148
|
+
- from final presentation in `public/index.md` or `public/index.html`
|
|
114
149
|
|
|
115
|
-
|
|
150
|
+
Use it to capture the pure conceptual shape of what you are about to render.
|
|
151
|
+
This is an authoring aid for agents, not an application data layer.
|
|
116
152
|
|
|
117
|
-
|
|
153
|
+
Hard rules:
|
|
118
154
|
|
|
119
|
-
|
|
155
|
+
- **Do not treat `data.json` as live runtime state.**
|
|
156
|
+
- **Do not write HTML/JS that loads, depends on, or synchronizes against `data.json`.**
|
|
157
|
+
- **Do not build application-like data-driven artifacts.**
|
|
158
|
+
- **We do not support runtime data-backed artifacts at this time.**
|
|
159
|
+
- Artifacts are static markdown or static HTML documents.
|
|
160
|
+
- HTML artifacts may include JavaScript and extra assets under `public/`, but
|
|
161
|
+
that JavaScript must stay presentation-oriented and self-contained, not
|
|
162
|
+
driven by `data.json` as an application state container.
|
|
120
163
|
|
|
121
|
-
|
|
122
|
-
|
|
164
|
+
For `text/markdown` artifacts, leave `data.json` as exactly:
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{}
|
|
123
168
|
```
|
|
124
169
|
|
|
125
|
-
|
|
170
|
+
There is usually little value in separating content from presentation for
|
|
171
|
+
markdown artifacts, so prefer `{}` unless there is a very strong authoring
|
|
172
|
+
reason not to.
|
|
126
173
|
|
|
127
|
-
|
|
174
|
+
For `text/html` artifacts, use `data.json` only when it helps you think clearly
|
|
175
|
+
about the material before rendering. It may describe the conceptual structure
|
|
176
|
+
of the artifact, but it must not become a runtime contract.
|
|
128
177
|
|
|
129
|
-
|
|
130
|
-
- next best: put workspace-specific generated files in the Television data directory
|
|
131
|
-
- third best: put the file in the OpenClaw workspace if it is just transient working material
|
|
178
|
+
Validation rule:
|
|
132
179
|
|
|
133
|
-
|
|
180
|
+
- `data.json` must exist and contain valid JSON
|
|
134
181
|
|
|
135
|
-
|
|
182
|
+
The current validator does not require the JSON value to be an object, but an
|
|
183
|
+
object is the normal choice.
|
|
136
184
|
|
|
137
|
-
###
|
|
185
|
+
### `memory.md`
|
|
138
186
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
187
|
+
`memory.md` is the working scratchpad for later agents. Record decisions,
|
|
188
|
+
limitations, data-retrieval notes, problems encountered, what changed, and what
|
|
189
|
+
should be watched during future edits.
|
|
142
190
|
|
|
143
|
-
|
|
191
|
+
Required validation anchors:
|
|
144
192
|
|
|
145
|
-
|
|
146
|
-
|
|
193
|
+
- `memory.md` must contain `## Activity Log`
|
|
194
|
+
- `memory.md` must contain at least one UTC timestamp in exact
|
|
195
|
+
`YYYY-MM-DDTHH:MM:SSZ` format
|
|
196
|
+
- at least one timestamp must be from the last 30 minutes when you commit
|
|
197
|
+
|
|
198
|
+
The minimum required heading is:
|
|
199
|
+
|
|
200
|
+
```md
|
|
201
|
+
## Activity Log
|
|
147
202
|
```
|
|
148
203
|
|
|
149
|
-
|
|
204
|
+
What to record beyond that is up to the artifact and the work performed.
|
|
205
|
+
|
|
206
|
+
### `public/index.md` and `public/index.html`
|
|
207
|
+
|
|
208
|
+
This is the rendered entry file that Television serves.
|
|
209
|
+
|
|
210
|
+
- Markdown artifacts use `public/index.md`
|
|
211
|
+
- HTML artifacts use `public/index.html`
|
|
212
|
+
- the entry file must match the artifact `type`
|
|
213
|
+
- the entry file must be non-empty before commit
|
|
214
|
+
|
|
215
|
+
For HTML artifacts:
|
|
216
|
+
|
|
217
|
+
- `public/index.html` is a full HTML document, not a body fragment
|
|
218
|
+
- additional public assets may live under `public/`
|
|
219
|
+
- keep paths relative to `public/`
|
|
220
|
+
|
|
221
|
+
## Quality bar
|
|
222
|
+
|
|
223
|
+
Build artifacts that are durable, truthful, and maintainable by later agents.
|
|
224
|
+
|
|
225
|
+
Required quality standards:
|
|
226
|
+
|
|
227
|
+
- be faithful to source data
|
|
228
|
+
- do not invent or hallucinate missing facts
|
|
229
|
+
- do not silently truncate a dataset and pretend it is complete
|
|
230
|
+
- prefer truth over completeness when those goals conflict
|
|
231
|
+
- make limitations, sampling, missing data, and freshness visible
|
|
232
|
+
- keep rendering aligned with the reasoning captured in `artifact.md`, `data.json`, and `memory.md`
|
|
233
|
+
- keep `data.json` as an authoring/thinking artifact rather than a runtime dependency
|
|
234
|
+
- keep the artifact maintainable by a future agent reading only the bundle files
|
|
235
|
+
|
|
236
|
+
Anti-patterns:
|
|
237
|
+
|
|
238
|
+
- cursory or low-effort data collection
|
|
239
|
+
- fake data added to make the artifact look complete
|
|
240
|
+
- brittle one-off hacks that a later agent cannot reproduce
|
|
241
|
+
- hidden dependencies that are not documented in `artifact.md` or `memory.md`
|
|
242
|
+
- layout churn during simple data refreshes when the data model did not change
|
|
243
|
+
|
|
244
|
+
## HTML house style
|
|
245
|
+
|
|
246
|
+
HTML artifacts should feel intentional and readable inside Television tiles.
|
|
150
247
|
|
|
151
|
-
|
|
248
|
+
Television provides a full base stylesheet for HTML artifacts. Only add custom
|
|
249
|
+
CSS when you need something not covered by the built-in styles. Prefer the base
|
|
250
|
+
styles and theme tokens so artifacts stay visually coherent with the rest of
|
|
251
|
+
Television.
|
|
252
|
+
|
|
253
|
+
House-style guidance:
|
|
254
|
+
|
|
255
|
+
- use semantic HTML first
|
|
256
|
+
- keep the most important information near the top
|
|
257
|
+
- design for small, medium, and large tile sizes
|
|
258
|
+
- avoid horizontal overflow unless there is no reasonable alternative
|
|
259
|
+
- make empty states and error states explicit
|
|
260
|
+
- prefer the built-in HTML styling before inventing custom component chrome
|
|
152
261
|
|
|
153
262
|
### Elements
|
|
154
263
|
|
|
155
|
-
|
|
264
|
+
Standard elements already have sensible defaults, so you usually do not need to
|
|
265
|
+
style from scratch:
|
|
156
266
|
|
|
157
|
-
-
|
|
267
|
+
- headings (`h1`–`h6`) — sized and weighted
|
|
158
268
|
- `p`, `ul`, `ol` — readable defaults
|
|
159
269
|
- `code` and `pre` — monospace, muted background
|
|
160
270
|
- `blockquote` — left border, muted text
|
|
161
271
|
- `table`, `th`, `td` — bordered, striped headers
|
|
162
|
-
- `button` — styled with border and hover state; use `size="sm"` or `size="md"`
|
|
272
|
+
- `button` — styled with border and hover state; use `size="sm"` or `size="md"` when appropriate
|
|
163
273
|
- `hr` — subtle border
|
|
164
274
|
- `a` — inherits color by default
|
|
165
275
|
|
|
166
276
|
### `.prose` class
|
|
167
277
|
|
|
168
|
-
|
|
278
|
+
Use a `.prose` wrapper for document-style HTML where readable vertical rhythm is
|
|
279
|
+
appropriate. Do not rely on `.prose` for dashboards, tables, control surfaces,
|
|
280
|
+
or dense custom layouts.
|
|
169
281
|
|
|
170
282
|
```html
|
|
171
283
|
<div class="prose">
|
|
@@ -180,14 +292,15 @@ Adds document-style vertical spacing between block elements. Wrap long-form cont
|
|
|
180
292
|
|
|
181
293
|
### CSS variables
|
|
182
294
|
|
|
183
|
-
Use
|
|
295
|
+
Use the existing Television tokens when they are available in the runtime.
|
|
296
|
+
These are the preferred way to stay aligned with the app theme.
|
|
184
297
|
|
|
185
298
|
Colors:
|
|
186
299
|
- `--color-bg` — page background
|
|
187
|
-
- `--color-bg-muted` — subtle background
|
|
188
|
-
- `--color-surface` — card
|
|
300
|
+
- `--color-bg-muted` — subtle background
|
|
301
|
+
- `--color-surface` — card or panel background
|
|
189
302
|
- `--color-text` — primary text
|
|
190
|
-
- `--color-text-muted` — secondary
|
|
303
|
+
- `--color-text-muted` — secondary or label text
|
|
191
304
|
- `--color-border` — border color
|
|
192
305
|
|
|
193
306
|
Spacing:
|
|
@@ -198,7 +311,7 @@ Spacing:
|
|
|
198
311
|
- `--space-24`
|
|
199
312
|
- `--space-32`
|
|
200
313
|
|
|
201
|
-
|
|
314
|
+
Fonts:
|
|
202
315
|
- `--font-sans`
|
|
203
316
|
- `--font-mono`
|
|
204
317
|
|
|
@@ -211,3 +324,155 @@ Text sizes:
|
|
|
211
324
|
Radius:
|
|
212
325
|
- `--radius-sm`
|
|
213
326
|
- `--radius-md`
|
|
327
|
+
|
|
328
|
+
## Workflows
|
|
329
|
+
|
|
330
|
+
### Create new internal artifact
|
|
331
|
+
|
|
332
|
+
1. Decide that the result should be an internal artifact.
|
|
333
|
+
2. Start the pending bundle:
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
tv create-internal-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title"
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
Or:
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
tv create-internal-artifact --screen "<screen-id>" --type text/html --title "Artifact title"
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
3. Read the returned pending path and edit files there.
|
|
346
|
+
4. Write `artifact.md`.
|
|
347
|
+
5. In `artifact.md`, capture the user's language faithfully in `## User intent` before doing the rest of the authoring work. Use direct quotes when helpful, or a close paraphrase when that is clearer, but keep it representative of what the user actually said they wanted.
|
|
348
|
+
6. Think through the artifact in a pure way and write `data.json` only as an authoring aid.
|
|
349
|
+
7. For markdown artifacts, leave `data.json` as `{}` unless there is a compelling authoring reason not to.
|
|
350
|
+
8. Render `public/index.md` or `public/index.html`.
|
|
351
|
+
9. Append a current timestamped activity entry in `memory.md`.
|
|
352
|
+
10. Commit:
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
tv commit-pending-artifact --id "<artifact-id>"
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Update internal artifact with fresh data
|
|
359
|
+
|
|
360
|
+
1. Stage the edit:
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
tv edit-internal-artifact --id "<artifact-id>"
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
2. Read `artifact.md`, `data.json`, and `memory.md` before changing anything.
|
|
367
|
+
3. Refresh the underlying facts or source material.
|
|
368
|
+
4. Update `data.json` only if it helps clarify the authoring plan.
|
|
369
|
+
5. For markdown artifacts, prefer to keep `data.json` as `{}`.
|
|
370
|
+
6. Make the minimum rendering changes needed to keep the artifact correct.
|
|
371
|
+
7. Record what changed in `memory.md`.
|
|
372
|
+
8. Commit:
|
|
373
|
+
|
|
374
|
+
```bash
|
|
375
|
+
tv commit-pending-artifact --id "<artifact-id>"
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
Avoid unnecessary layout or styling churn during data-only refreshes.
|
|
379
|
+
|
|
380
|
+
### Modify internal artifact from user feedback
|
|
381
|
+
|
|
382
|
+
1. Stage the edit:
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
tv edit-internal-artifact --id "<artifact-id>"
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
2. Read `artifact.md`, `data.json`, and `memory.md`.
|
|
389
|
+
3. Update `artifact.md` if the user intent or non-goals changed.
|
|
390
|
+
4. When the user has added feedback, complaints, corrections, or new guidance, update `## User intent` so it remains a faithful record of what the user actually wants now. Preserve the user's language as closely as practical, using direct quotes or close paraphrases.
|
|
391
|
+
5. Update `data.json` only if it improves the authoring model of the artifact.
|
|
392
|
+
6. For markdown artifacts, prefer to keep `data.json` as `{}`.
|
|
393
|
+
7. Adjust `public/index.md` or `public/index.html` as narrowly as possible.
|
|
394
|
+
8. Record the request, decision, and resulting change in `memory.md`.
|
|
395
|
+
9. Commit:
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
tv commit-pending-artifact --id "<artifact-id>"
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### Abandon pending work
|
|
402
|
+
|
|
403
|
+
If the staged work should be discarded instead of committed:
|
|
404
|
+
|
|
405
|
+
```bash
|
|
406
|
+
tv abandon-pending-artifact --id "<artifact-id>"
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Create external artifact
|
|
410
|
+
|
|
411
|
+
Use this when the file already exists on disk and Television should display it
|
|
412
|
+
without owning a bundle:
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
tv create-external-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title" --path /absolute/path/to/file.md
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
Or:
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
tv create-external-artifact --screen "<screen-id>" --type text/html --title "Artifact title" --path /absolute/path/to/file.html
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
Rules:
|
|
425
|
+
|
|
426
|
+
- `--path` must be absolute
|
|
427
|
+
- the file must already exist and be readable
|
|
428
|
+
- the extension must match `type`
|
|
429
|
+
- external artifacts do not use pending create, pending edit, commit, or abandon
|
|
430
|
+
|
|
431
|
+
## CLI reference
|
|
432
|
+
|
|
433
|
+
Workflow commands:
|
|
434
|
+
|
|
435
|
+
```bash
|
|
436
|
+
tv create-internal-artifact --screen "<screen-id>" --type <text/markdown|text/html> --title "Artifact title"
|
|
437
|
+
tv edit-internal-artifact --id "<artifact-id>"
|
|
438
|
+
tv commit-pending-artifact --id "<artifact-id>"
|
|
439
|
+
tv abandon-pending-artifact --id "<artifact-id>"
|
|
440
|
+
tv create-external-artifact --screen "<screen-id>" --type <text/markdown|text/html> --title "Artifact title" --path /absolute/path
|
|
441
|
+
tv update-artifact --id "<artifact-id>" --title "New title"
|
|
442
|
+
tv remove-artifact --id "<artifact-id>" --screen "<screen-id>"
|
|
443
|
+
tv remove-screen --id "<screen-id>"
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
Read and server commands:
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
tv list-screens
|
|
450
|
+
tv get-screen --id "<screen-id>"
|
|
451
|
+
tv create-screen --name "Screen name"
|
|
452
|
+
tv storage-path
|
|
453
|
+
tv status
|
|
454
|
+
tv serve
|
|
455
|
+
tv stop
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
CLI behavior notes:
|
|
459
|
+
|
|
460
|
+
- workflow and mutation commands print plain text
|
|
461
|
+
- read commands print JSON
|
|
462
|
+
- `tv get-screen` includes artifact `kind` and `status`
|
|
463
|
+
- `tv remove-artifact` removes the artifact reference from the named screen; if another screen still references it, the artifact is unlinked and kept alive; otherwise it cascades to trash/discard
|
|
464
|
+
- `tv update-artifact` changes title metadata only
|
|
465
|
+
- when the CLI reports an error, follow the directive to run `tv help`
|
|
466
|
+
|
|
467
|
+
## Deferred or out of scope
|
|
468
|
+
|
|
469
|
+
These are not part of the current implementation:
|
|
470
|
+
|
|
471
|
+
- `tv help <topic>`
|
|
472
|
+
- restore-from-trash
|
|
473
|
+
- pending-listing commands
|
|
474
|
+
- attestation or nonce commands
|
|
475
|
+
- stale pending cleanup or stale trash cleanup
|
|
476
|
+
- markdown editor UI recovery
|
|
477
|
+
- client-side pending presentation work
|
|
478
|
+
- multi-section help output
|