@telepath-computer/television 0.1.128 → 0.1.141
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/dist/cli.cjs +2091 -6806
- package/dist/onboarding/television-onboarding.html +65 -0
- package/dist/skills/television/SKILL.md +135 -180
- package/dist/skills/{television-calendar → tv-calendar}/SKILL.md +4 -5
- package/dist/skills/{television-table → tv-table}/SKILL.md +1 -1
- package/dist/skills/{television-theme → tv-theme}/SKILL.md +10 -10
- package/dist/views/markdown/index.html +19 -17
- package/dist/web/assets/artifact-bridge-C9leJZpr.js +1 -0
- package/dist/web/assets/clouds-CAYIArXj.jpg +0 -0
- package/dist/web/assets/favicon-DaYMFRha.svg +71 -0
- package/dist/web/assets/main-DpUX4mxP.js +706 -0
- package/dist/web/assets/main-nlkzBlam.css +1 -0
- package/dist/web/assets/urlUnsupported-DBXzijdI.js +1 -0
- package/dist/web/index.html +4 -2
- package/dist/web/views/url-unsupported/index.html +97 -0
- package/package.json +1 -1
- package/dist/web/assets/index-BvBbQr_I.js +0 -709
- package/dist/web/assets/index-C__bLj7I.css +0 -1
- package/dist/web/assets/wallpaper-s-ICws44wH.jpg +0 -0
- /package/dist/skills/{television-calendar → tv-calendar}/calendar.css +0 -0
- /package/dist/skills/{television-calendar → tv-calendar}/calendar.js +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Welcome to Television</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
color-scheme: light;
|
|
10
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
11
|
+
background: #f6f2ea;
|
|
12
|
+
color: #1f2933;
|
|
13
|
+
}
|
|
14
|
+
body {
|
|
15
|
+
margin: 0;
|
|
16
|
+
min-height: 100vh;
|
|
17
|
+
display: grid;
|
|
18
|
+
place-items: center;
|
|
19
|
+
padding: 48px;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
}
|
|
22
|
+
main {
|
|
23
|
+
max-width: 760px;
|
|
24
|
+
background: rgba(255, 255, 255, 0.78);
|
|
25
|
+
border: 1px solid rgba(31, 41, 51, 0.12);
|
|
26
|
+
border-radius: 28px;
|
|
27
|
+
padding: 44px;
|
|
28
|
+
box-shadow: 0 24px 80px rgba(31, 41, 51, 0.12);
|
|
29
|
+
}
|
|
30
|
+
h1 {
|
|
31
|
+
margin: 0 0 16px;
|
|
32
|
+
font-size: clamp(2.4rem, 7vw, 5rem);
|
|
33
|
+
line-height: 0.95;
|
|
34
|
+
letter-spacing: -0.06em;
|
|
35
|
+
}
|
|
36
|
+
p {
|
|
37
|
+
margin: 0 0 18px;
|
|
38
|
+
font-size: 1.1rem;
|
|
39
|
+
line-height: 1.65;
|
|
40
|
+
}
|
|
41
|
+
ul {
|
|
42
|
+
margin: 24px 0 0;
|
|
43
|
+
padding-left: 1.3rem;
|
|
44
|
+
line-height: 1.7;
|
|
45
|
+
}
|
|
46
|
+
code {
|
|
47
|
+
background: rgba(31, 41, 51, 0.08);
|
|
48
|
+
border-radius: 0.4em;
|
|
49
|
+
padding: 0.1em 0.35em;
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
52
|
+
</head>
|
|
53
|
+
<body>
|
|
54
|
+
<main>
|
|
55
|
+
<h1>Welcome to Television</h1>
|
|
56
|
+
<p>Television is a shared display for artifacts created by agents, tools, and people.</p>
|
|
57
|
+
<p>This onboarding artifact was installed automatically on first launch. It lives in your Television storage folder as <code>artifacts/television-onboarding.html</code>.</p>
|
|
58
|
+
<ul>
|
|
59
|
+
<li>Create HTML or Markdown artifacts from the CLI or API.</li>
|
|
60
|
+
<li>Edit file-backed artifacts on disk and connected clients update automatically.</li>
|
|
61
|
+
<li>Use themes to customize the whole display.</li>
|
|
62
|
+
</ul>
|
|
63
|
+
</main>
|
|
64
|
+
</body>
|
|
65
|
+
</html>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: television
|
|
3
|
-
description: Mental model, when to
|
|
3
|
+
description: Mental model, when to create artifacts, and how Television's bundled skills fit together. Read for screen, artifact, and CLI work.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
|
|
@@ -8,15 +8,15 @@ description: Mental model, when to use Television vs chat, and how Television's
|
|
|
8
8
|
|
|
9
9
|
Television is a persistent artifact screen for agents.
|
|
10
10
|
|
|
11
|
-
Load this skill when you need to create, update, inspect,
|
|
11
|
+
Load this skill when you need to create, update, inspect, focus, delete, or otherwise manage Television screens and artifacts.
|
|
12
12
|
|
|
13
13
|
Re-read this skill only if it is not already in your context or you know it changed.
|
|
14
14
|
|
|
15
15
|
## When to use Television
|
|
16
16
|
|
|
17
|
-
Prefer Television when
|
|
17
|
+
Prefer Television when the result would be better as a persistent, scannable artifact than as an inline conversational reply. When a response would otherwise be long, structured, visual, research-heavy, or significantly clearer as HTML, markdown, or a table, prefer creating a Television artifact as the primary response.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Short, conversational replies belong in the agent's own output. Television is for results the user will want to scan, compare, revisit, or treat as a working surface.
|
|
20
20
|
|
|
21
21
|
Use judgment. Do not create an artifact for every response, but do prefer one when:
|
|
22
22
|
|
|
@@ -28,41 +28,32 @@ Use judgment. Do not create an artifact for every response, but do prefer one wh
|
|
|
28
28
|
|
|
29
29
|
Ground this decision in the user's likely experience. Ask yourself what will be easier for them to read, compare, revisit, or act on next.
|
|
30
30
|
|
|
31
|
-
When the artifact is the real answer, keep the final
|
|
31
|
+
When the artifact is the real answer, keep the final reply short. Tell the user what you created, what they will see, and where to find it rather than duplicating the full content in a conversational reply.
|
|
32
32
|
|
|
33
33
|
## Mental model
|
|
34
34
|
|
|
35
35
|
### Core entities
|
|
36
36
|
|
|
37
37
|
- A **screen** is a named viewer surface with a layout.
|
|
38
|
-
- An **artifact** is a
|
|
39
|
-
- Screen
|
|
38
|
+
- An **artifact** is a registry record shown on exactly one screen.
|
|
39
|
+
- Screen layout is the source of truth for where an artifact appears.
|
|
40
40
|
|
|
41
|
-
That
|
|
41
|
+
That relationship matters:
|
|
42
42
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
- an artifact
|
|
43
|
+
- creating an artifact places it on a screen immediately
|
|
44
|
+
- repositioning is a browser UI drag/drop gesture; the CLI does not expose layout mutation today
|
|
45
|
+
- deleting an artifact removes its registry record and its card from the screen
|
|
46
|
+
- moving the same underlying path or URL to another screen means deleting the old artifact and creating a new artifact with the same path or URL on the target screen
|
|
46
47
|
|
|
47
|
-
### Artifact
|
|
48
|
+
### Artifact shapes
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
Television artifacts point to one of three shapes:
|
|
50
51
|
|
|
51
|
-
- **
|
|
52
|
-
- **
|
|
53
|
-
- **
|
|
52
|
+
- **Single file** — an absolute markdown or HTML file.
|
|
53
|
+
- **Directory** — a folder with `index.html` plus sibling assets.
|
|
54
|
+
- **URL** — an external `http(s)://` page or local web app URL.
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
- **pending** — staged work not yet committed
|
|
58
|
-
- **committed** — live and visible
|
|
59
|
-
- **trash** — moved out of the live tree
|
|
60
|
-
|
|
61
|
-
Important consequences:
|
|
62
|
-
|
|
63
|
-
- only **web-bundle** artifacts can be pending
|
|
64
|
-
- **markdown** and **url** artifacts are committed immediately
|
|
65
|
-
- there is no restore-from-trash workflow in the current scope
|
|
56
|
+
Register files and directories with `tv create-path-artifact`; register URLs with `tv create-url-artifact`. See `artifact-workflow.md` for choosing a shape and authoring the underlying content.
|
|
66
57
|
|
|
67
58
|
### User-facing framing
|
|
68
59
|
|
|
@@ -70,8 +61,8 @@ Think in terms of what the user believes exists and where they expect to find it
|
|
|
70
61
|
|
|
71
62
|
Questions to keep straight:
|
|
72
63
|
|
|
73
|
-
- should this result
|
|
74
|
-
- should
|
|
64
|
+
- should this result be markdown, HTML, or a URL pointer?
|
|
65
|
+
- where should the underlying file live?
|
|
75
66
|
- should it appear on the current screen, another existing screen, or a new screen?
|
|
76
67
|
- should the user see it immediately, or should it be prepared without moving their attention yet?
|
|
77
68
|
|
|
@@ -81,9 +72,9 @@ Those questions interact, but they are not the same question.
|
|
|
81
72
|
|
|
82
73
|
Television guidance is split across bundled skills.
|
|
83
74
|
|
|
84
|
-
- Use this skill for screens, focus, artifact
|
|
75
|
+
- Use this skill for screens, focus, artifact decisions, and the `tv` CLI. Required means the knowledge is required, not that you must re-read it before every Television action.
|
|
85
76
|
- Install the bundled Television skills into the agent harness skills folder with `tv skills install <path>` (for example `~/.openclaw/skills`, `~/.hermes/skills`, or `~/.agents/skills`) or use `tv skills install -i` before artifact authoring work.
|
|
86
|
-
- For
|
|
77
|
+
- For specialized HTML work, load the matching skill such as `tv-calendar` or `tv-table`.
|
|
87
78
|
|
|
88
79
|
`markdown editor UI recovery` remains out of scope for the current Television workflow.
|
|
89
80
|
|
|
@@ -94,7 +85,7 @@ Use this document when you need to reason about what the `tv` CLI can do, which
|
|
|
94
85
|
|
|
95
86
|
## Agent recovery surfaces
|
|
96
87
|
|
|
97
|
-
The `television` skill is the primary guidance surface for Television screens, focus, and
|
|
88
|
+
The `television` skill is the primary guidance surface for Television screens, focus, and artifact work. Keep that guidance available; re-read it only if it is not already in context or you know it changed.
|
|
98
89
|
|
|
99
90
|
Install bundled Television skills with either:
|
|
100
91
|
|
|
@@ -116,24 +107,22 @@ tv help
|
|
|
116
107
|
tv help <command>
|
|
117
108
|
```
|
|
118
109
|
|
|
119
|
-
`tv help <command>` is the source of truth for per-command semantics that are not obvious from the name —
|
|
110
|
+
`tv help <command>` is the source of truth for per-command semantics that are not obvious from the name — focus decisions, cascading effects, JSON vs plain-text output, and distinctions between superficially similar commands (delete-artifact vs remove-screen, focus-screen vs focus-artifact). Read it before choosing a command when you are unsure.
|
|
120
111
|
|
|
121
112
|
Commands group into four intents:
|
|
122
113
|
|
|
123
114
|
- **Screen and display commands** — create, inspect, remove, or switch screens, or change the active display theme (`create-screen`, `list-screens`, `get-screen`, `remove-screen`, `focus-screen`, `focus-status`, `set-theme`).
|
|
124
|
-
- **Artifact creation
|
|
125
|
-
- **Artifact
|
|
115
|
+
- **Artifact creation commands** — register path or URL artifacts (`create-path-artifact`, `create-url-artifact`).
|
|
116
|
+
- **Artifact management commands** — inspect, retitle, focus, list, or delete existing artifacts (`delete-artifact`, `get-artifact`, `list-artifacts`, `update-artifact`, `focus-artifact`).
|
|
126
117
|
- **Server and environment commands** — operate on the Television server itself (`serve`, `status`, `stop`, `storage-path`, `skills install`).
|
|
127
118
|
|
|
128
119
|
When the CLI rejects a command, follow the directive it prints rather than guessing flags.
|
|
129
120
|
|
|
130
121
|
### Server operation notes
|
|
131
122
|
|
|
132
|
-
`tv serve` starts the local server. Bare `tv serve` binds `127.0.0.1` and is tokenless. Use `--listen <ipv4>` (repeatable or comma-separated) to add IPv4 listeners; any `--listen` requires an explicit global auth choice with `--auth` or `--no-auth`. Workflow commands connect to `localhost:<port>` only; use `--port`, `TELEVISION_PORT`, or the default `32848` rather than `--server`. When targeting non-default storage, pass `--storage-path` or set `TELEVISION_STORAGE_PATH` so the CLI reads the matching token
|
|
123
|
+
`tv serve` starts the local server. Bare `tv serve` binds `127.0.0.1` and is tokenless. Use `--listen <ipv4>` (repeatable or comma-separated) to add IPv4 listeners; any `--listen` requires an explicit global auth choice with `--auth` or `--no-auth`. Workflow commands connect to `localhost:<port>` only; use `--port`, `TELEVISION_PORT`, or the default `32848` rather than `--server`. When targeting non-default storage, pass `--storage-path` or set `TELEVISION_STORAGE_PATH` so the CLI reads the matching token from `<storagePath>/state/token`.
|
|
133
124
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
`tv serve --persist` installs or refreshes the user system service. It captures the serve flags and relevant environment at install time (`--listen`, `--auth`/`--no-auth`, `--port`, `--storage-path`, `PATH`, `TELEVISION_PORT`, `TELEVISION_STORAGE_PATH`). When an ACP agent is configured, it also captures canonical `TELEVISION_ACP_AGENT` and matching `OPENCLAW_*` or `HERMES_*` variables, and validates the ACP command against that captured PATH before changing the installed service. When no agent is configured, ACP env capture and preflight are skipped and the service runs with chat disabled. Rerun it after changing listen/auth/port settings, PATH, ACP agent env vars, the ACP agent install, or the Node/TV install. The refresh is non-atomic: if uninstall succeeds but install fails, fix the env and rerun `tv serve --persist`.
|
|
125
|
+
`tv serve --persist` installs or refreshes the user system service. It captures the serve flags and relevant environment at install time (`--listen`, `--auth`/`--no-auth`, `--port`, `--storage-path`, `PATH`, `TELEVISION_PORT`, `TELEVISION_STORAGE_PATH`). Rerun it after changing listen/auth/port settings, PATH, or the Node/TV install. The refresh is non-atomic: if uninstall succeeds but install fails, fix the env and rerun `tv serve --persist`.
|
|
137
126
|
|
|
138
127
|
`tv serve --persist-uninstall` removes the service and is equivalent to `tv stop`. Both are idempotent and print `{ "status": "stopped" }` whether or not a service was installed.
|
|
139
128
|
|
|
@@ -155,14 +144,14 @@ Television separates state changes from focus. Choosing where an artifact lives
|
|
|
155
144
|
There is a persisted focused screen.
|
|
156
145
|
There is not a persisted focused artifact.
|
|
157
146
|
|
|
158
|
-
Important consequence: creating
|
|
147
|
+
Important consequence: creating something does not by itself answer whether the user should be taken to it now.
|
|
159
148
|
|
|
160
149
|
## Required explicit focus decisions
|
|
161
150
|
|
|
162
|
-
Create
|
|
151
|
+
Create commands require an explicit focus decision.
|
|
163
152
|
|
|
164
153
|
- `tv create-screen` requires exactly one of `--focus-screen` or `--no-focus`
|
|
165
|
-
- `tv create-
|
|
154
|
+
- `tv create-path-artifact` and `tv create-url-artifact` require exactly one of `--focus-artifact` or `--no-focus`
|
|
166
155
|
|
|
167
156
|
If you omit that decision, the CLI rejects the command. Dedicated `focus-screen` and `focus-artifact` commands can also move attention later as separate steps.
|
|
168
157
|
|
|
@@ -199,14 +188,14 @@ These are illustrative, not exhaustive. When the language is ambiguous or unusua
|
|
|
199
188
|
|
|
200
189
|
## Screen placement
|
|
201
190
|
|
|
202
|
-
Artifact creation commands require `--screen` because new artifacts need immediate screen membership.
|
|
191
|
+
Artifact creation commands require `--screen` because new artifacts need immediate screen membership. Repositioning an artifact on its current screen is a browser UI drag/drop gesture; the CLI does not expose layout mutation today. To move the same underlying path or URL to a different screen, delete the old artifact and create a new artifact on the target screen with the same path or URL.
|
|
203
192
|
|
|
204
193
|
Think carefully about whether the user means:
|
|
205
194
|
|
|
206
195
|
- create something new on a screen
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
196
|
+
- reposition an artifact on its current screen in the browser UI
|
|
197
|
+
- delete an artifact from its screen
|
|
198
|
+
- recreate the same path or URL on a different screen
|
|
210
199
|
|
|
211
200
|
Those are different operations with different consequences. The per-command help text spells out which is which.
|
|
212
201
|
|
|
@@ -214,8 +203,8 @@ Those are different operations with different consequences. The per-command help
|
|
|
214
203
|
|
|
215
204
|
When deciding where an artifact should go:
|
|
216
205
|
|
|
217
|
-
- If the current screen is the right place and the user should see the result immediately, create
|
|
218
|
-
- If the current screen is the right place but the work should appear without interrupting their reading flow, create
|
|
206
|
+
- If the current screen is the right place and the user should see the result immediately, create the artifact there with `--focus-artifact`.
|
|
207
|
+
- If the current screen is the right place but the work should appear without interrupting their reading flow, create it with `--no-focus`.
|
|
219
208
|
- If the work belongs on a different existing screen, place it there. Then decide whether to focus or merely tell the user where it is.
|
|
220
209
|
- Sometimes a new screen is the right call.
|
|
221
210
|
|
|
@@ -232,38 +221,58 @@ Default to placing things on an existing screen unless one of those conditions i
|
|
|
232
221
|
|
|
233
222
|
# Artifact workflow
|
|
234
223
|
|
|
235
|
-
Read this document for Television artifact
|
|
224
|
+
Read this document for Television artifact work: creating files, registering path or URL artifacts, browser-only repositioning, deleting, and updating titles.
|
|
236
225
|
|
|
237
226
|
If you need bundled Television authoring skills installed first, copy them into the agent harness skills folder with `tv skills install <path>` (for example `~/.openclaw/skills`, `~/.hermes/skills`, or `~/.agents/skills`) or use `tv skills install -i`.
|
|
238
227
|
|
|
239
|
-
If you are authoring a specialized HTML artifact, read the matching
|
|
228
|
+
If you are authoring a specialized HTML artifact, read the matching skill after this one — for example `tv-calendar` or `tv-table`.
|
|
240
229
|
|
|
241
230
|
## Choosing the artifact kind
|
|
242
231
|
|
|
243
|
-
Television has three artifact
|
|
232
|
+
Television has three artifact shapes. Pick the one that fits the result:
|
|
244
233
|
|
|
245
|
-
- **
|
|
246
|
-
- **
|
|
247
|
-
- **
|
|
234
|
+
- **Single file** — one self-contained markdown (`.md`) or HTML (`.html`) file on disk. Use when the artifact needs no dependent CSS, JS, images, or additional pages.
|
|
235
|
+
- **Directory** — a folder on disk containing `index.html` plus sibling assets (CSS, JS, images, additional pages). Use when the artifact needs richer structure: custom stylesheets, scripts, images, or multi-page navigation.
|
|
236
|
+
- **URL** — an external `http(s)://` web page or web app, or a locally running web server (e.g. `http://localhost:3000`). Use for remote pages, local web apps the agent does not manage, or any live web resource. Do not use URL artifacts for content Television should manage the lifecycle of — use a path artifact instead.
|
|
248
237
|
|
|
249
|
-
|
|
238
|
+
Single files and directories are both registered with `tv create-path-artifact`. URL artifacts use `tv create-url-artifact`.
|
|
250
239
|
|
|
251
|
-
|
|
240
|
+
Within path artifacts, choose the content shape:
|
|
252
241
|
|
|
253
|
-
|
|
242
|
+
- **HTML file or directory** — default for most artifacts. HTML gives Television its best rendering: styled layout, hierarchy, visual structure, and the canonical stylesheet. Use HTML whenever the result is a presentation, summary, dashboard, comparison, reference, or anything the user will primarily read rather than edit.
|
|
243
|
+
- **Markdown file** — use when the result is a document the user will want to edit directly: notes, drafts, working documents, or content that will be revised outside Television.
|
|
254
244
|
|
|
255
|
-
|
|
245
|
+
If you are unsure between HTML and markdown, default to HTML.
|
|
246
|
+
|
|
247
|
+
## Where to place new artifact files
|
|
248
|
+
|
|
249
|
+
Television registers pointers — the file lifecycle is yours, not Television's. Deleting an artifact removes the registry record, not the underlying file or folder, regardless of where it lives.
|
|
250
|
+
|
|
251
|
+
**Default for HTML (single file or directory): `~/.television/artifacts/`.** HTML artifacts are pure presentation — Television is where they live and get used, so the default folder is the right home. Put them there unless the user has told you otherwise. Create the directory if it does not exist.
|
|
252
|
+
|
|
253
|
+
**Markdown is different.** A markdown artifact is usually a user-owned document — a note, draft, write-up — that has a life outside Television. Putting one in `~/.television/artifacts/` is suspect: the user will likely want it alongside their other documents. For markdown, co-locate with the project, repo, notes folder, or workspace where a new document of that kind would naturally belong if the user had asked for one outside Television. If no such home is obvious from context, ask the user where it should go rather than dropping it in the default folder.
|
|
254
|
+
|
|
255
|
+
For HTML, put the file somewhere else only when the user has explicitly directed you to — either in this request, or via a durable instruction (project `AGENTS.md`/`CLAUDE.md`, a standing preference, an earlier "from now on…" in this session). Examples of explicit direction: "save it in the repo", "put it in my notes folder", "drop it in the agent workspace".
|
|
256
256
|
|
|
257
|
-
-
|
|
258
|
-
- If the user asked you to do web research and create a report, where would you put it?
|
|
257
|
+
Do not co-locate HTML artifacts with project files, repo trees, notes folders, or agent workspaces on your own initiative — even when it seems natural. The default for HTML is `~/.television/artifacts/`.
|
|
259
258
|
|
|
260
|
-
|
|
259
|
+
### File and folder naming
|
|
261
260
|
|
|
262
|
-
|
|
261
|
+
Use durable, descriptive names that capture the artifact's subject specifically — favor `q3-revenue-by-region.html` over `report.html`. For HTML artifacts in the default folder, good names are how you'll find one again later among the others.
|
|
263
262
|
|
|
264
|
-
|
|
263
|
+
For directory artifacts the folder name is the primary identifier — files inside are typically generic (`index.html`, `styles.css`).
|
|
265
264
|
|
|
266
|
-
Always tell the user where you put
|
|
265
|
+
Always tell the user where you put the file.
|
|
266
|
+
|
|
267
|
+
## Accepted path targets
|
|
268
|
+
|
|
269
|
+
`tv create-path-artifact` accepts three path shapes:
|
|
270
|
+
|
|
271
|
+
- **Single markdown file** ending in `.md` or `.markdown`
|
|
272
|
+
- **Single HTML file** ending in `.htm` or `.html`
|
|
273
|
+
- **HTML directory** — a path ending in `/` or `\` whose root contains `index.html` or `index.htm`, plus any sibling assets
|
|
274
|
+
|
|
275
|
+
The path must be absolute, existing, and readable by the server.
|
|
267
276
|
|
|
268
277
|
## Authoring quality
|
|
269
278
|
|
|
@@ -283,7 +292,7 @@ Anti-patterns to avoid:
|
|
|
283
292
|
- cursory or low-effort data collection
|
|
284
293
|
- fake completeness — padding to look thorough
|
|
285
294
|
- brittle one-off hacks that a later agent cannot reproduce
|
|
286
|
-
- hidden dependencies that are not documented
|
|
295
|
+
- hidden dependencies that are not documented next to the artifact
|
|
287
296
|
|
|
288
297
|
## Before creating artifacts
|
|
289
298
|
|
|
@@ -304,174 +313,120 @@ Good examples:
|
|
|
304
313
|
|
|
305
314
|
- "Starting the artifact now."
|
|
306
315
|
- "Reviewing the draft and source material."
|
|
307
|
-
- "
|
|
308
|
-
- "
|
|
316
|
+
- "Writing the HTML and checking it in the browser."
|
|
317
|
+
- "Registering the artifact on your screen."
|
|
309
318
|
- "Done."
|
|
310
319
|
|
|
311
320
|
Avoid:
|
|
312
321
|
|
|
313
322
|
- multi-paragraph progress reports or long retrospective narration during execution
|
|
314
323
|
- verbose bullet lists for routine workflow steps (use bullets only when the user explicitly asks)
|
|
315
|
-
- workflow jargon ("calling
|
|
316
|
-
|
|
317
|
-
## Web-bundle workflow
|
|
324
|
+
- workflow jargon ("calling create-path-artifact", "registering the path artifact") unless the user is debugging Television itself
|
|
318
325
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
The recommended workflow for new Television-owned web bundles is the pending workflow:
|
|
322
|
-
|
|
323
|
-
```bash
|
|
324
|
-
tv create-web-bundle-artifact --screen "<screen-id>" --title "Artifact title" --focus-artifact
|
|
325
|
-
```
|
|
326
|
+
## Markdown path artifacts
|
|
326
327
|
|
|
327
|
-
|
|
328
|
+
1. Write the markdown file.
|
|
329
|
+
2. Register it:
|
|
328
330
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
- `artifact.md` — bundle documentation for future agents (see below)
|
|
333
|
-
- `memory.md` — maintenance log for future agents (see below)
|
|
334
|
-
- a data-oriented supporting file when the artifact has non-trivial underlying data (see "Data before presentation")
|
|
335
|
-
|
|
336
|
-
### Data before presentation
|
|
337
|
-
|
|
338
|
-
Before authoring the final HTML, think through the underlying data in a pure-data way.
|
|
339
|
-
|
|
340
|
-
Ask yourself:
|
|
341
|
-
|
|
342
|
-
- what facts exist?
|
|
343
|
-
- what structure do they have?
|
|
344
|
-
- what is missing?
|
|
345
|
-
- what separation between data and presentation would help the next agent?
|
|
346
|
-
|
|
347
|
-
Capture this reasoning in a supporting document inside the bundle — pick a file name and format that fits the data (a markdown table, a JSON snapshot, a YAML manifest, whatever expresses the data cleanly). Author this data-oriented asset **before** the presentation assets. The staged workflow (data first, then presentation) keeps the thinking discipline visible and gives the next agent a clear handle on what the rendering is built from.
|
|
348
|
-
|
|
349
|
-
### `artifact.md`
|
|
350
|
-
|
|
351
|
-
`artifact.md` is the bundle's self-documentation for the next agent. Write it so that an agent reading only this file can pick up the artifact and continue work on it.
|
|
352
|
-
|
|
353
|
-
Structure it with these sections:
|
|
354
|
-
|
|
355
|
-
- **User intent** — what the user actually asked for, in their language. Use direct quotes where helpful, close paraphrase where clearer. Write this section *first*, before any other authoring work: it anchors the artifact in the user's actual ask and keeps you from retrofitting intent from memory after the fact.
|
|
356
|
-
- **Purpose** — what the artifact is for and what success looks like.
|
|
357
|
-
- **Data sources** — where the underlying facts came from and how they were obtained.
|
|
358
|
-
- **Rendering** — how `public/index.html` should present the result, and why this presentation fits the data.
|
|
359
|
-
- **Update workflow** — how a future agent should refresh or modify the artifact correctly.
|
|
360
|
-
- **Non-goals** — important exclusions, especially when it would be easy to overbuild (e.g., "this is a static report, not a live dashboard").
|
|
331
|
+
```bash
|
|
332
|
+
tv create-path-artifact --screen "<screen-id>" --title "Artifact title" --path /absolute/path/to/file.md --focus-artifact
|
|
333
|
+
```
|
|
361
334
|
|
|
362
|
-
|
|
335
|
+
Rules:
|
|
363
336
|
|
|
364
|
-
|
|
337
|
+
- The file must already exist and be readable.
|
|
338
|
+
- Television's markdown editor reads and writes the pointed-to file.
|
|
339
|
+
- Deleting the artifact removes the registry record, not the markdown file.
|
|
365
340
|
|
|
366
|
-
|
|
341
|
+
## HTML path artifacts
|
|
367
342
|
|
|
368
|
-
|
|
343
|
+
HTML can be a single file or a directory bundle.
|
|
369
344
|
|
|
370
|
-
-
|
|
371
|
-
- limitations of the source material or rendering
|
|
372
|
-
- problems encountered and how they were resolved
|
|
373
|
-
- what changed in each edit pass
|
|
374
|
-
- anything a future agent should watch for
|
|
345
|
+
Single-file example:
|
|
375
346
|
|
|
376
|
-
|
|
347
|
+
```bash
|
|
348
|
+
tv create-path-artifact --screen "<screen-id>" --title "Artifact title" --path /absolute/path/to/report.html --focus-artifact
|
|
349
|
+
```
|
|
377
350
|
|
|
378
|
-
|
|
351
|
+
Directory example:
|
|
379
352
|
|
|
380
|
-
|
|
381
|
-
|
|
353
|
+
```bash
|
|
354
|
+
tv create-path-artifact --screen "<screen-id>" --title "Artifact title" --path /absolute/path/to/dashboard/ --focus-artifact
|
|
355
|
+
```
|
|
382
356
|
|
|
383
|
-
|
|
384
|
-
tv create-web-bundle-artifact --screen "<screen-id>" --title "Artifact title" --focus-artifact
|
|
385
|
-
```
|
|
357
|
+
A directory artifact needs root `index.html` or `index.htm`. Keep sibling assets relative so they resolve through the artifact proxy:
|
|
386
358
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
7. Commit:
|
|
359
|
+
```html
|
|
360
|
+
<link rel="stylesheet" href="./styles.css" />
|
|
361
|
+
<script type="module" src="./main.js"></script>
|
|
362
|
+
```
|
|
392
363
|
|
|
393
|
-
|
|
394
|
-
tv commit-artifact --id "<artifact-id>"
|
|
395
|
-
```
|
|
364
|
+
Use `/canonical/v1/styles.css` for Television's canonical artifact stylesheet:
|
|
396
365
|
|
|
397
|
-
|
|
366
|
+
```html
|
|
367
|
+
<link rel="stylesheet" href="/canonical/v1/styles.css" />
|
|
368
|
+
```
|
|
398
369
|
|
|
399
|
-
###
|
|
370
|
+
### Suggested HTML file set
|
|
400
371
|
|
|
401
|
-
|
|
372
|
+
For durable HTML artifacts, write nearby documentation so a future agent can maintain the work:
|
|
402
373
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
374
|
+
- `index.html` — rendered page
|
|
375
|
+
- `artifact.md` — purpose, user intent, data sources, rendering notes, update workflow, non-goals
|
|
376
|
+
- `memory.md` — maintenance log
|
|
377
|
+
- data source file when the artifact has non-trivial underlying data
|
|
406
378
|
|
|
407
|
-
|
|
379
|
+
For single-file artifacts, keep these files in the same directory. For directory artifacts, put `index.html` at the registered root and keep supporting files next to it unless the user's workspace convention says otherwise.
|
|
408
380
|
|
|
409
|
-
|
|
381
|
+
### Data before presentation
|
|
410
382
|
|
|
411
|
-
|
|
383
|
+
Before authoring the final HTML, think through the underlying data in a pure-data way.
|
|
412
384
|
|
|
413
|
-
|
|
385
|
+
Ask yourself:
|
|
414
386
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
387
|
+
- what facts exist?
|
|
388
|
+
- what structure do they have?
|
|
389
|
+
- what is missing?
|
|
390
|
+
- what separation between data and presentation would help the next agent?
|
|
418
391
|
|
|
419
|
-
|
|
392
|
+
Capture this reasoning in a supporting document or data file before the presentation work.
|
|
420
393
|
|
|
421
|
-
|
|
422
|
-
tv abandon-artifact --id "<artifact-id>"
|
|
423
|
-
```
|
|
394
|
+
## Updating an artifact
|
|
424
395
|
|
|
425
|
-
|
|
396
|
+
To update markdown or HTML content, edit the pointed-to file or directory in place. Television watches supported path targets and refreshes connected clients.
|
|
426
397
|
|
|
427
|
-
|
|
398
|
+
To retitle an artifact:
|
|
428
399
|
|
|
429
400
|
```bash
|
|
430
|
-
tv
|
|
401
|
+
tv update-artifact --id "<artifact-id>" --title "New title"
|
|
431
402
|
```
|
|
432
403
|
|
|
433
|
-
|
|
404
|
+
Artifact repositioning on its current screen is a browser UI drag/drop gesture; the CLI does not expose layout mutation today.
|
|
434
405
|
|
|
435
|
-
|
|
406
|
+
To move the same underlying path or URL to another screen, delete the existing artifact and create a new one on the target screen with the same `--path` or `--url`.
|
|
436
407
|
|
|
437
|
-
|
|
408
|
+
To delete the registry record and remove its card from its screen:
|
|
438
409
|
|
|
439
410
|
```bash
|
|
440
|
-
tv
|
|
411
|
+
tv delete-artifact --id "<artifact-id>"
|
|
441
412
|
```
|
|
442
413
|
|
|
443
|
-
Rules:
|
|
444
|
-
|
|
445
|
-
- `--path` must be absolute
|
|
446
|
-
- the file must already exist and be readable
|
|
447
|
-
- Television watches the file for changes but does not own or delete it
|
|
448
|
-
|
|
449
414
|
## URL artifacts
|
|
450
415
|
|
|
451
|
-
URL artifacts point at
|
|
416
|
+
URL artifacts point at external `http(s)://` pages.
|
|
452
417
|
|
|
453
418
|
```bash
|
|
454
419
|
tv create-url-artifact --screen "<screen-id>" --title "Artifact title" --url https://example.com --no-focus
|
|
455
420
|
```
|
|
456
421
|
|
|
457
|
-
Use this when the right answer is to embed a live page rather than author a Television-owned artifact.
|
|
458
|
-
|
|
459
422
|
Rules:
|
|
460
423
|
|
|
461
|
-
- `--url` must be `http://` or `https
|
|
462
|
-
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
## Abandoning staged work
|
|
467
|
-
|
|
468
|
-
If staged web-bundle work should be discarded rather than committed:
|
|
469
|
-
|
|
470
|
-
```bash
|
|
471
|
-
tv abandon-artifact --id "<artifact-id>"
|
|
472
|
-
```
|
|
424
|
+
- `--url` must be `http://` or `https://`.
|
|
425
|
+
- Electron displays the URL in a webview.
|
|
426
|
+
- Browser clients show a local unsupported placeholder.
|
|
427
|
+
- Television does not fetch or watch the remote page.
|
|
473
428
|
|
|
474
|
-
|
|
429
|
+
If the browser placeholder is not sufficient, create a markdown or HTML path artifact that links to the page and summarizes what the user needs from it.
|
|
475
430
|
|
|
476
431
|
# HTML artifact style
|
|
477
432
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: tv-calendar
|
|
3
3
|
description: Author self-contained HTML calendar artifacts using the bundled calendar-week elements and copied calendar assets.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Authoring a calendar week
|
|
7
7
|
|
|
8
|
-
Know the main `television` skill first. Re-read it only if it is not already in your context or you know it changed. It defines the general Television workflow,
|
|
8
|
+
Know the main `television` skill first. Re-read it only if it is not already in your context or you know it changed. It defines the general Television workflow, path artifact registration, and the canonical HTML house style. This skill only adds calendar-specific guidance.
|
|
9
9
|
|
|
10
10
|
A working-week calendar with a generated header strip, all-day band, time axis,
|
|
11
11
|
and timed event grid. The agent only authors a single `<calendar-week>` plus
|
|
@@ -15,10 +15,9 @@ flat sibling `<calendar-event>` children. The component renders the rest.
|
|
|
15
15
|
|
|
16
16
|
Every calendar artifact must be self-contained. Read `calendar.css` and
|
|
17
17
|
`calendar.js` from this skill folder and carry them into the artifact output
|
|
18
|
-
instead of referencing `/skills/
|
|
18
|
+
instead of referencing `/skills/tv-calendar/...` URLs.
|
|
19
19
|
|
|
20
|
-
For a Television
|
|
21
|
-
directory and reference them relatively:
|
|
20
|
+
For a Television HTML directory artifact, copy both files into the registered directory next to `index.html` and reference them relatively:
|
|
22
21
|
|
|
23
22
|
```html
|
|
24
23
|
<link rel="stylesheet" href="/canonical/v1/styles.css" />
|