@telepath-computer/television 0.1.83 → 0.1.85

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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
6
6
  <title>Television</title>
7
- <script type="module" crossorigin src="./assets/index-BoxpwxlP.js"></script>
7
+ <script type="module" crossorigin src="./assets/index-D3-COwxd.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="./assets/index-DfsusTzY.css">
9
9
  </head>
10
10
  <body></body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telepath-computer/television",
3
- "version": "0.1.83",
3
+ "version": "0.1.85",
4
4
  "type": "module",
5
5
  "main": "dist/cli.cjs",
6
6
  "bin": {
@@ -1,29 +0,0 @@
1
- {
2
- "version": "0.1.10",
3
- "files": [
4
- {
5
- "path": "SKILL.md",
6
- "description": "Mental model, when to use Television vs chat, and routing to companion docs. Always read first."
7
- },
8
- {
9
- "path": "cli-capabilities.md",
10
- "description": "The `tv` CLI command surface plus the complete focus story — model, required decisions, theory of mind, phrase cues, screen placement, and the `--no-focus` communication rule."
11
- },
12
- {
13
- "path": "artifact-workflow.md",
14
- "description": "Artifact lifecycle work — markdown vs HTML, prescriptive recipes for create/update/modify/abandon/external/url, internal bundle structure and validation, in-flight narration style, and the quality bar."
15
- },
16
- {
17
- "path": "html-house-style.md",
18
- "description": "House style and conventions for authoring HTML artifacts that render inside Television."
19
- },
20
- {
21
- "path": "artifact-types/calendar.md",
22
- "description": "Authoring conventions for the calendar artifact kind."
23
- },
24
- {
25
- "path": "artifact-types/table.md",
26
- "description": "Authoring conventions for the record-table artifact kind: dense, Airtable-style tables of records."
27
- }
28
- ]
29
- }
@@ -1,285 +0,0 @@
1
- ---
2
- description: Artifact lifecycle work — markdown vs HTML, prescriptive recipes for create/update/modify/abandon/external/url, internal bundle structure and validation, in-flight narration style, and the quality bar.
3
- ---
4
-
5
-
6
- # Artifact workflow
7
-
8
- Read this document for Television artifact lifecycle work — creating, updating, committing, abandoning, attaching, detaching, deleting.
9
-
10
- The artifact-vs-chat decision and the mental model live in `SKILL.md`. The CLI command surface, focus decisions, and screen-placement guidance live in `cli-capabilities.md`. This doc covers everything else: which type to use, the staged lifecycle for internal artifacts, what each bundle file contains, validation rules, the quality bar, and the prescriptive recipes.
11
-
12
- If you are authoring an HTML artifact, also read `html-house-style.md` and check `artifact-types/` for any matching kind-specific doc.
13
-
14
- ## Markdown or HTML
15
-
16
- Once you have decided to make an artifact, choose the type:
17
-
18
- - **markdown** when the result is primarily textual and benefits from simple structured reading. Headings, lists, code blocks, links. Most research summaries, comparisons, and write-ups.
19
- - **HTML** when richer layout, stronger visual hierarchy, or more custom presentation will make the result substantially better. Dashboards, multi-column layouts, custom-styled cards, simple interactive widgets, anything where typographic prose is not the dominant mode.
20
-
21
- Default to markdown. HTML is more work to author, more work to maintain, and only pays off when the visual structure is doing real communicative work.
22
-
23
- ## Authoring quality
24
-
25
- This applies to every artifact you author or maintain — internal, external, or URL.
26
-
27
- Build artifacts that are durable, truthful, and maintainable by later agents.
28
-
29
- Required standards:
30
-
31
- - be faithful to source material
32
- - do not invent missing facts to make the artifact look complete
33
- - do not silently truncate a dataset and pretend it is comprehensive
34
- - prefer truth over completeness when those goals conflict
35
- - make limitations, sampling, gaps, and freshness visible when they matter
36
- - keep the rendering aligned with the reasoning captured in the bundle files (for internal artifacts)
37
- - keep the artifact maintainable by a future agent reading only the bundle (for internal artifacts)
38
-
39
- Anti-patterns to avoid:
40
-
41
- - cursory or low-effort data collection
42
- - fake completeness — padding to look thorough
43
- - brittle one-off hacks that a later agent cannot reproduce
44
- - hidden dependencies that are not documented in the bundle
45
- - unnecessary layout or styling churn during a simple data refresh
46
-
47
- ## Before creating artifacts
48
-
49
- Before starting artifact-creation tool work, briefly tell the user what you are about to make. Artifact creation can take noticeable time, and the user may not otherwise be able to tell what is happening during the agent loop.
50
-
51
- Also work expediently. Do not skip lifecycle or validation steps, but avoid unnecessary extra steps when building the artifact. There is real user wait time while artifact creation is in progress.
52
-
53
- ## In-flight narration style
54
-
55
- While a multi-step artifact workflow is running, narrate concisely so the user knows you are still working. Frame updates in their world and goals, not in CLI mechanics or workflow jargon.
56
-
57
- Required style:
58
-
59
- - verbalize key actions and decisions as they happen
60
- - keep updates short — a sentence per beat, not a paragraph
61
- - prefer the user's framing over Television's internal machinery
62
- - do not write reports, retrospective summaries, or chatty explanations while work is in progress
63
- - do not use bullet lists unless the user explicitly asks for one
64
- - optimize for speed and token efficiency
65
-
66
- Good examples:
67
-
68
- - "Starting the artifact now."
69
- - "Reviewing the draft and source material."
70
- - "Updating the HTML and moving through the artifact creation flow."
71
- - "The artifact did not pass validation; fixing the draft notes and retrying."
72
- - "Finalizing the artifact now."
73
- - "Done."
74
-
75
- Avoid:
76
-
77
- - multi-paragraph progress reports
78
- - long retrospective narration during execution
79
- - verbose bullet lists for routine workflow steps
80
- - workflow jargon ("calling commit-pending-artifact", "validator rejected memory.md") unless the user is debugging Television itself
81
-
82
- ## Internal bundle structure
83
-
84
- Internal artifacts are Television-managed bundles. Every internal artifact bundle contains:
85
-
86
- - `artifact.md`
87
- - `data.json`
88
- - `memory.md`
89
- - `public/index.md` or `public/index.html`
90
-
91
- Fresh pending bundles are intentionally minimal. Do not treat the scaffold as meaningfully authored content — the structure below describes what each file must contain before commit.
92
-
93
- External artifacts and URL artifacts have no bundle and no pending lifecycle.
94
-
95
- ### `artifact.md`
96
-
97
- `artifact.md` is the contract for the artifact. It explains what the artifact is for, what material it is based on, how it should render, and how later agents should maintain it.
98
-
99
- Before commit, `artifact.md` must be non-empty and contain all of these exact headings:
100
-
101
- ```md
102
- ## User intent
103
- ## Purpose
104
- ## Data shape
105
- ## Data sources
106
- ## Rendering
107
- ## Update workflow
108
- ## Non-goals
109
- ```
110
-
111
- Section guidance:
112
-
113
- - `## User intent` — faithfully preserve what the user actually wants, including requests, constraints, corrections, complaints, and feedback when those matter. Use direct quotes when helpful.
114
- - `## Purpose` — what the artifact is trying to achieve.
115
- - `## Data shape` — the conceptual structure you used while authoring. For markdown artifacts this is often just `{}`.
116
- - `## Data sources` — where the underlying facts came from and how they were obtained.
117
- - `## Rendering` — how the public entry file should present the result.
118
- - `## Update workflow` — how a future agent should refresh or modify it correctly.
119
- - `## Non-goals` — important exclusions, especially when it would be easy to overbuild (e.g., "this is a static report, not a live dashboard").
120
-
121
- ### `data.json`
122
-
123
- `data.json` is a thinking artifact, not a runtime payload.
124
-
125
- Use it to clarify authoring structure when that helps you think, not to create an application state layer.
126
-
127
- Hard rules:
128
-
129
- - do not treat `data.json` as live runtime state
130
- - do not build HTML/JS that depends on `data.json` as an application data source
131
- - do not turn Television artifacts into runtime data-backed apps through `data.json`
132
- - artifacts are static markdown or static HTML documents; HTML artifacts may include presentation-oriented JavaScript and assets under `public/`, but JS must not be driven by `data.json` as application state
133
-
134
- For markdown artifacts, prefer to leave `data.json` as exactly:
135
-
136
- ```json
137
- {}
138
- ```
139
-
140
- For HTML artifacts, use `data.json` only when it materially helps your authoring process.
141
-
142
- Validation requires that `data.json` exist and contain valid JSON.
143
-
144
- ### `memory.md`
145
-
146
- `memory.md` is for maintenance-oriented notes to future agents.
147
-
148
- Record decisions, limitations, source-retrieval notes, problems encountered, what changed, and anything that should be watched during future edits.
149
-
150
- Required validation anchors:
151
-
152
- - `memory.md` must contain `## Activity Log`
153
- - it must contain at least one UTC timestamp in exact `YYYY-MM-DDTHH:MM:SSZ` format
154
- - at least one timestamp must be fresh enough for commit validation (recent enough to prove this commit is current)
155
-
156
- ### Public entry file
157
-
158
- This is what Television actually renders.
159
-
160
- - markdown artifacts use `public/index.md`
161
- - HTML artifacts use `public/index.html`
162
- - the entry file must match the artifact type
163
- - the entry file must be non-empty before commit
164
- - HTML artifacts may include additional public assets under `public/`; keep paths relative
165
-
166
- For HTML artifacts, also read `html-house-style.md`.
167
-
168
- ## Workflows
169
-
170
- These recipes are prescriptive on purpose. The lifecycle steps and their order matter — `commit-pending-artifact` will refuse a bundle that has not satisfied the validation anchors above.
171
-
172
- ### Create a new internal artifact
173
-
174
- 1. Confirm internal is the right kind for this result (the result should be Television-owned and maintainable by future agents).
175
- 2. Tell the user what you are about to make before starting tool work.
176
- 3. Stage the pending bundle:
177
-
178
- ```bash
179
- tv create-internal-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title" --focus-artifact
180
- ```
181
-
182
- Or, for HTML:
183
-
184
- ```bash
185
- tv create-internal-artifact --screen "<screen-id>" --type text/html --title "Artifact title" --no-focus
186
- ```
187
-
188
- `--screen` is required so the artifact has immediate screen membership. `--focus-artifact` or `--no-focus` is required so focus is an explicit choice. (See `cli-capabilities.md` for how to make that choice.)
189
-
190
- 4. Read the returned pending path. Edit files there.
191
- 5. Write `## User intent` in `artifact.md` **first**, before authoring anything else. Capture the user's language faithfully — direct quotes when helpful, close paraphrase when clearer. The rest of the bundle should serve that intent, so writing it first anchors the work and keeps you from retrofitting intent from memory after the fact.
192
- 6. Fill out the remaining required `artifact.md` headings: `## Purpose`, `## Data shape`, `## Data sources`, `## Rendering`, `## Update workflow`, `## Non-goals`.
193
- 7. Use `data.json` only as an authoring aid — not as runtime state. For markdown artifacts, leave it as `{}` unless there is a strong authoring reason not to.
194
- 8. Render `public/index.md` or `public/index.html`. The entry file must match the artifact type and must be non-empty.
195
- 9. Append a current UTC-timestamped entry under `## Activity Log` in `memory.md` (format: `YYYY-MM-DDTHH:MM:SSZ`). At least one timestamp must be fresh enough to satisfy commit validation.
196
- 10. Commit:
197
-
198
- ```bash
199
- tv commit-pending-artifact --id "<artifact-id>"
200
- ```
201
-
202
- If the validator rejects the commit, read the directive, fix the bundle, and retry. Do not bypass validation by editing committed state directly.
203
-
204
- ### Update an internal artifact with fresh data
205
-
206
- 1. Stage the edit:
207
-
208
- ```bash
209
- tv edit-internal-artifact --id "<artifact-id>"
210
- ```
211
-
212
- 2. Read `artifact.md`, `data.json`, and `memory.md` before changing anything. They tell you what the artifact is, what shape it expects, and what prior agents decided.
213
- 3. Refresh the underlying facts or source material.
214
- 4. Update `data.json` only if it improves the authoring model. For markdown artifacts, prefer to keep it as `{}`.
215
- 5. Make the minimum rendering changes needed to keep the artifact correct. Avoid layout or styling churn during a data-only refresh — that breaks the user's mental model of "same artifact, fresher data."
216
- 6. Append a current UTC-timestamped entry to `## Activity Log` in `memory.md` describing what changed.
217
- 7. Commit:
218
-
219
- ```bash
220
- tv commit-pending-artifact --id "<artifact-id>"
221
- ```
222
-
223
- ### Modify an internal artifact from user feedback
224
-
225
- 1. Stage the edit (`tv edit-internal-artifact --id "<artifact-id>"`).
226
- 2. Read `artifact.md`, `data.json`, and `memory.md`.
227
- 3. Update `## User intent` in `artifact.md` so it remains a faithful record of what the user actually wants now. Preserve the user's new language as direct quotes or close paraphrases. Old intent that no longer reflects the current ask should be revised, not just appended to.
228
- 4. Update `## Non-goals` if the user has ruled something out.
229
- 5. Adjust `data.json` only if the authoring model changed.
230
- 6. Adjust `public/index.md` or `public/index.html` as narrowly as the change requires.
231
- 7. Append an `## Activity Log` entry capturing the request, the decision, and the resulting change with a current timestamp.
232
- 8. Commit.
233
-
234
- ### Abandon pending work
235
-
236
- If staged work should be discarded rather than committed:
237
-
238
- ```bash
239
- tv abandon-pending-artifact --id "<artifact-id>"
240
- ```
241
-
242
- For a pending create, the artifact never becomes live. For a pending edit, the previously committed version is kept unchanged.
243
-
244
- ### Create an external artifact
245
-
246
- External artifacts point at a file that already exists on disk. Television displays it and watches for changes, but does not own it — there is no bundle and no pending lifecycle.
247
-
248
- ```bash
249
- tv create-external-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title" --path /absolute/path/to/file.md --focus-artifact
250
- ```
251
-
252
- Or:
253
-
254
- ```bash
255
- tv create-external-artifact --screen "<screen-id>" --type text/html --title "Artifact title" --path /absolute/path/to/file.html --no-focus
256
- ```
257
-
258
- Rules:
259
-
260
- - `--path` must be absolute
261
- - the file must already exist and be readable
262
- - the extension must match `--type`
263
- - there is no pending create / pending edit / commit / abandon flow
264
- - `tv delete-artifact` only forgets the pointer; the underlying file is never deleted
265
-
266
- ### Create a URL artifact
267
-
268
- URL artifacts embed a live `http(s)://` page. They commit immediately and have no pending lifecycle.
269
-
270
- ```bash
271
- tv create-url-artifact --screen "<screen-id>" --title "Artifact title" --url https://example.com --focus-artifact
272
- ```
273
-
274
- Or:
275
-
276
- ```bash
277
- tv create-url-artifact --screen "<screen-id>" --title "Artifact title" --url https://example.com --no-focus
278
- ```
279
-
280
- Rules:
281
-
282
- - `--url` must be `http://` or `https://`
283
- - the type is always `text/html` — do not pass `--type`
284
- - in the desktop app the page renders in a sandboxed `<webview>`; in the browser it renders in an `<iframe>`
285
- - some sites block embedding (X-Frame-Options, CSP); if the page may be one of those, prefer an internal artifact that links to the page
@@ -1,145 +0,0 @@
1
- ---
2
- description: The `tv` CLI command surface plus the complete focus story — model, required decisions, theory of mind, phrase cues, screen placement, and the `--no-focus` communication rule.
3
- ---
4
-
5
-
6
- # TV CLI capabilities
7
-
8
- Use this document when you need to reason about what the `tv` CLI can do, which command family fits the user's request, and how focus and screen placement should be decided.
9
-
10
- ## Agent recovery surfaces
11
-
12
- The Television skill is the primary agent guidance surface.
13
-
14
- If the skill is installed, load/read `television` and then use the companion docs.
15
-
16
- If the skill is not installed, use:
17
-
18
- ```bash
19
- tv skills show
20
- ```
21
-
22
- That lists the bundled Television skill files, prints the skill root, and tells you how to read one file directly.
23
-
24
- To read a specific bundled skill file directly:
25
-
26
- ```bash
27
- tv skills show <relative-path>
28
- ```
29
-
30
- `tv help` is normal CLI help plus routing pointers. It is not the old mega-skill blob anymore.
31
-
32
- ## Command surface
33
-
34
- The CLI is the source of truth for command syntax and per-command behavior. Run:
35
-
36
- ```bash
37
- tv help
38
- ```
39
-
40
- for the full command list. For details, flags, and behavioral nuance for a single command, run:
41
-
42
- ```bash
43
- tv help <command>
44
- ```
45
-
46
- The help text is intentionally written to surface non-obvious semantics — idempotency, cascading effects, transient vs persistent state changes, JSON vs plain-text output, and so on. Read it before choosing a command, especially when two commands look superficially similar (detach vs delete, focus-screen vs focus-artifact, attach vs create).
47
-
48
- Commands group into four intents:
49
-
50
- - **Screen commands** — create, inspect, remove, or switch screens (`create-screen`, `list-screens`, `get-screen`, `remove-screen`, `focus-screen`, `focus-status`).
51
- - **Artifact creation and lifecycle commands** — create or maintain artifact content (`create-internal-artifact`, `edit-internal-artifact`, `commit-pending-artifact`, `abandon-pending-artifact`, `create-external-artifact`, `create-url-artifact`).
52
- - **Artifact membership and removal commands** — place, unplace, inspect, retitle, or remove an existing artifact (`attach-artifact`, `detach-artifact`, `delete-artifact`, `get-artifact`, `list-artifacts`, `update-artifact`, `focus-artifact`).
53
- - **Server and environment commands** — operate on the Television server itself (`serve`, `status`, `stop`, `storage-path`).
54
-
55
- When the CLI rejects a command, follow the directive it prints rather than guessing flags.
56
-
57
- ## Read vs mutate
58
-
59
- Read commands print JSON. Mutation and workflow commands print plain text.
60
-
61
- Use read commands when you need authoritative state for planning or verification. Use mutation commands when you are intentionally changing Television state.
62
-
63
- ## Focus model
64
-
65
- Television separates state changes from focus. Choosing where an artifact lives is one decision; choosing whether the user's attention moves there is a separate one.
66
-
67
- - **screen focus** is persistent: which screen the user is currently looking at
68
- - **artifact focus** is transient: clients may switch screens first, then scroll and highlight the artifact
69
-
70
- There is a persisted focused screen.
71
- There is not a persisted focused artifact.
72
-
73
- Important consequence: creating or attaching something does not by itself answer whether the user should be taken to it now.
74
-
75
- ## Required explicit focus decisions
76
-
77
- Create and attach commands require an explicit focus decision.
78
-
79
- - `tv create-screen` requires exactly one of `--focus-screen` or `--no-focus`
80
- - `tv create-internal-artifact`, `tv create-external-artifact`, `tv create-url-artifact`, and `tv attach-artifact` require exactly one of `--focus-artifact` or `--no-focus`
81
-
82
- 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.
83
-
84
- ## Choosing the focus directive
85
-
86
- Think about the user's current attention stream before deciding. Use theory of mind: what are they probably attending to right now? Do they expect an immediate reveal, or would moving their view feel jarring? What will they likely want to do next?
87
-
88
- Rules of thumb:
89
-
90
- - **focus now** when seeing the result immediately is part of successfully answering the request
91
- - **`--no-focus`** when the user is likely to want the result available without breaking their current flow, or when the work should run in the background
92
- - **direct `focus-screen` / `focus-artifact` commands** when placement and attention movement should happen as separate steps
93
-
94
- If you used `--no-focus`, explicitly tell the user what you did and where it went. Otherwise the Television display may not visibly change and the user may not know whether anything happened. Same applies if you placed something on a non-current screen without focusing it: name the screen. If you did move focus, say so, because that affects what the user will see next.
95
-
96
- ## Listening for focus intent in the user's language
97
-
98
- The user's phrasing is a strong cue — not a deterministic rule, but a real signal worth listening for.
99
-
100
- Phrases that usually indicate the user wants attention moved (use a focus flag, or a direct `focus-screen` / `focus-artifact` command):
101
-
102
- - "show me", "show me that", "let me see it", "let me review it"
103
- - "switch to", "change to", "go to", "take me there", "open it"
104
- - "put it on screen", "put it on my screen", "bring it up"
105
- - references to the **active**, **current**, **showing**, or **visible** screen or artifact
106
-
107
- Phrases that usually indicate the user wants the work to happen without disturbing their current view (use `--no-focus`):
108
-
109
- - "in the background", "while I'm doing X", "while I work on Y go and do Z"
110
- - "set this up", "prepare it", "wire it in", "get it ready"
111
- - "don't interrupt me", "leave my screen alone", "don't switch"
112
-
113
- These are illustrative, not exhaustive. When the language is ambiguous or unusual, reason about the user's attention stream instead of pattern-matching keywords.
114
-
115
- ## Screen placement
116
-
117
- Artifact creation commands require `--screen` because new artifacts need immediate screen membership. Use `attach-artifact` and `detach-artifact` when the artifact already exists and you are changing where it appears.
118
-
119
- Think carefully about whether the user means:
120
-
121
- - create something new on a screen
122
- - place an existing artifact on a screen
123
- - stop showing an artifact on a screen
124
- - globally delete an artifact everywhere
125
-
126
- Those are different operations with different consequences. The per-command help text spells out which is which.
127
-
128
- ### Choosing the right screen
129
-
130
- When deciding where an artifact should go:
131
-
132
- - If the current screen is the right place and the user should see the result immediately, create or attach the artifact there with `--focus-artifact`.
133
- - If the current screen is the right place but the work should appear without interrupting their reading flow, create or attach with `--no-focus`.
134
- - 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.
135
- - Sometimes a new screen is the right call.
136
-
137
- ### When to create a new screen
138
-
139
- Reach for `tv create-screen` when:
140
-
141
- - the request is meaningfully separate from the current screen's purpose
142
- - the result should become its own durable workspace the user can return to
143
- - mixing it into the current screen would make the user's mental model worse (e.g., a research dossier vs a live dashboard, or two unrelated topics that should not share a strip)
144
-
145
- Default to placing things on an existing screen unless one of those conditions is true. Spawning a new screen for every request fragments the user's workspace; spawning none ever forces unrelated content together.