@harness-lab/cli 0.2.6 → 0.2.7
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/assets/workshop-bundle/SKILL.md +13 -0
- package/assets/workshop-bundle/bundle-manifest.json +8 -8
- package/assets/workshop-bundle/content/facilitation/master-guide.md +94 -3
- package/assets/workshop-bundle/content/talks/context-is-king.md +35 -3
- package/assets/workshop-bundle/docs/harness-cli-foundation.md +8 -1
- package/assets/workshop-bundle/workshop-blueprint/day-structure.md +25 -0
- package/assets/workshop-bundle/workshop-skill/facilitator.md +34 -0
- package/package.json +1 -1
- package/src/client.js +9 -0
- package/src/run-cli.js +40 -0
|
@@ -249,6 +249,12 @@ Prefer invoking `harness workshop update-instance` over raw API scripts.
|
|
|
249
249
|
Use this when the facilitator wants to correct or refine date, venue, room, address, or event title without resetting the instance.
|
|
250
250
|
Support `contentLang` changes explicitly so facilitators can choose workshop delivery language per instance without changing admin UI language.
|
|
251
251
|
|
|
252
|
+
### `workshop facilitator reset-instance <instance-id>`
|
|
253
|
+
|
|
254
|
+
Reset one existing workshop instance from the selected blueprint template. Requires facilitator session.
|
|
255
|
+
Prefer invoking `harness workshop reset-instance` over raw API scripts.
|
|
256
|
+
Use this when the facilitator wants fresh canonical agenda, runner, and presenter content for a live instance and accepts that local runtime state will be reinitialized.
|
|
257
|
+
|
|
252
258
|
### `workshop facilitator remove-instance`
|
|
253
259
|
|
|
254
260
|
Remove a workshop instance from the active list without deleting its archive history. Requires facilitator session.
|
|
@@ -267,6 +273,13 @@ Inspect and edit the local agenda copy for one workshop instance. Requires facil
|
|
|
267
273
|
|
|
268
274
|
Inspect and edit presenter scenes for one workshop instance. This includes listing scenes for an agenda item, creating a new scene, editing content, changing default scene, reordering scenes, and enabling or hiding scenes. Requires facilitator session.
|
|
269
275
|
|
|
276
|
+
Rules for rich scenes:
|
|
277
|
+
- keep scenes agenda-linked and room-facing rather than inventing a freeform slide deck
|
|
278
|
+
- prefer one dominant voice per scene and one main idea per scene
|
|
279
|
+
- use reviewed local blueprint assets for reusable visuals instead of ad hoc remote image URLs
|
|
280
|
+
- treat runtime scene edits as instance-local until a maintainer deliberately publishes them back into the repo
|
|
281
|
+
- when richer scene authoring or promotion is involved, follow `docs/presenter-rich-scene-authoring.md`
|
|
282
|
+
|
|
270
283
|
### `workshop facilitator archive`
|
|
271
284
|
|
|
272
285
|
Archive the current workshop instance with optional notes.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifestVersion": 1,
|
|
3
3
|
"bundleName": "harness-lab-workshop",
|
|
4
|
-
"bundleVersion": "0.2.
|
|
5
|
-
"contentHash": "
|
|
4
|
+
"bundleVersion": "0.2.7",
|
|
5
|
+
"contentHash": "db5557fe004d30755c4912015667daf2095c70081780f8a3418bd772e2fb9a49",
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "content/challenge-cards/.gitkeep",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"path": "content/facilitation/master-guide.md",
|
|
37
|
-
"sha256": "
|
|
37
|
+
"sha256": "f0edc5eef8c7bc0efc67672e184edecce46fa5fd5e9820cfda0b28fbb8cb1a8f"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "content/project-briefs/.gitkeep",
|
|
@@ -98,11 +98,11 @@
|
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"path": "content/talks/context-is-king.md",
|
|
101
|
-
"sha256": "
|
|
101
|
+
"sha256": "4d0972fefac067de0b8803698b44bdf8ab0bee64b181d50d1ac5e26a92eb7089"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"path": "docs/harness-cli-foundation.md",
|
|
105
|
-
"sha256": "
|
|
105
|
+
"sha256": "80b321da32d110f141e1bd6a089ccc84f2a04066d76ba0258f530cc333dbaae4"
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"path": "docs/learner-reference-gallery.md",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
"path": "SKILL.md",
|
|
137
|
-
"sha256": "
|
|
137
|
+
"sha256": "64ddc1bf36265ea8321b2634d34499e83a8c1692e5cb10c6f30b1b07f1d51975"
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "workshop-blueprint/agenda.json",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
"path": "workshop-blueprint/day-structure.md",
|
|
149
|
-
"sha256": "
|
|
149
|
+
"sha256": "4980768b9e8b71d47cec19764b317d99c830908a0298c6f104e8d7bd37320966"
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
"path": "workshop-blueprint/edit-boundaries.md",
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
184
|
"path": "workshop-skill/facilitator.md",
|
|
185
|
-
"sha256": "
|
|
185
|
+
"sha256": "ab4721564c1dee2a24c7d4dfda229c2cfa56f5bec89a8b3580b541d9baa13e7f"
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
"path": "workshop-skill/follow-up-package.md",
|
|
@@ -4,19 +4,55 @@
|
|
|
4
4
|
|
|
5
5
|
### Cíl
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Spustit den jako room-facing launch pro celý workshop, ne jako provozní brief k dopoledni.
|
|
8
8
|
|
|
9
9
|
### Klíčová message
|
|
10
10
|
|
|
11
|
-
> „Dnes nejde o to být nejrychlejší. Jde o to
|
|
11
|
+
> „Dnes nejde o to být nejrychlejší. Jde o to postavit práci tak, aby ji cizí tým dokázal převzít a posunout dál.“
|
|
12
12
|
|
|
13
13
|
### Co potřebuje zaznít
|
|
14
14
|
|
|
15
|
-
-
|
|
15
|
+
- Nezačínáme tool demo ani soutěž v promptování.
|
|
16
|
+
- Budeme se učit, stavět, předávat i přebírat. Ten oblouk dne je záměr workshopu.
|
|
16
17
|
- Jde o práci s agentem tak, aby po vás zůstával použitelný kontext.
|
|
17
18
|
- Odpolední část prověří, jestli repo opravdu unese převzetí dalším týmem.
|
|
18
19
|
- Pokud nějaké důležité pravidlo žije jen v hovoru u stolu, ještě neexistuje.
|
|
19
20
|
|
|
21
|
+
### Doporučený sled beatů
|
|
22
|
+
|
|
23
|
+
1. day-opening promise
|
|
24
|
+
2. proč na tom záleží právě teď
|
|
25
|
+
3. analogie typu Lego duck: stejné ingredience, různé použitelné výsledky
|
|
26
|
+
4. krátká pohybová aktivace podle zkušenosti s AI agenty
|
|
27
|
+
5. první pracovní kontrakt pro Build fázi 1
|
|
28
|
+
|
|
29
|
+
### Lego-duck analogie
|
|
30
|
+
|
|
31
|
+
Použijte ji krátce a věcně.
|
|
32
|
+
|
|
33
|
+
Pointa:
|
|
34
|
+
|
|
35
|
+
- stejný agent neznamená stejný výsledek
|
|
36
|
+
- kvalitu neurčuje samotný model
|
|
37
|
+
- kontext, mantinely a ověřování jsou součást výsledku
|
|
38
|
+
|
|
39
|
+
Nevést jako zábavnou odbočku. Vést jako vysvětlení, proč je harness engineering tvůrčí a inženýrská disciplína zároveň.
|
|
40
|
+
|
|
41
|
+
### Pohybová aktivace
|
|
42
|
+
|
|
43
|
+
Použijte krátké rozdělení místnosti podle aktuální zkušenosti s AI agenty:
|
|
44
|
+
|
|
45
|
+
- používám skoro denně
|
|
46
|
+
- používám, ale opatrně
|
|
47
|
+
- jsem spíš na startu
|
|
48
|
+
- jsem skeptický, ale chci důkaz
|
|
49
|
+
|
|
50
|
+
Pravidla:
|
|
51
|
+
|
|
52
|
+
- ne dělat z toho networking kolo
|
|
53
|
+
- stačí přesun a 2 krátké hlasy
|
|
54
|
+
- pointa není seniorita, ale kalibrace místnosti a signál, že den je participativní
|
|
55
|
+
|
|
20
56
|
### Co má facilitátor průběžně vracet
|
|
21
57
|
|
|
22
58
|
- „Kde by to našel další tým bez vás?“
|
|
@@ -24,6 +60,61 @@ Nastavit energii dne a jasně pojmenovat, o čem workshop je.
|
|
|
24
60
|
- „Je `AGENTS.md` mapa, nebo už se z něj stává dump?“
|
|
25
61
|
- „Jaký je další bezpečný krok pro cizího člověka nebo agenta?“
|
|
26
62
|
|
|
63
|
+
### První pracovní kontrakt
|
|
64
|
+
|
|
65
|
+
Po launchi potřebuje místnost ještě jednu konkrétní věc:
|
|
66
|
+
|
|
67
|
+
- co má být po prvním build bloku opravdu vidět
|
|
68
|
+
- co nestačí jen slíbit
|
|
69
|
+
|
|
70
|
+
Do oběda má být vidět:
|
|
71
|
+
|
|
72
|
+
- repo a `README`, které dávají smysl cizímu člověku
|
|
73
|
+
- `AGENTS.md` jako krátká mapa
|
|
74
|
+
- plan nebo jasně vedená implementační stopa
|
|
75
|
+
- první explicitní check před dalším generováním
|
|
76
|
+
|
|
77
|
+
## Context is King talk
|
|
78
|
+
|
|
79
|
+
### Cíl
|
|
80
|
+
|
|
81
|
+
Proměnit energii z openingu v přesnou tezi a čistý most do Build fáze 1.
|
|
82
|
+
|
|
83
|
+
### Klíčová message
|
|
84
|
+
|
|
85
|
+
> „Kontext je páka, ne kosmetika.“
|
|
86
|
+
|
|
87
|
+
### Co potřebuje zaznít
|
|
88
|
+
|
|
89
|
+
- Neučíme se lépe promptovat. Učíme se postavit repo a workflow, ve kterém agent i cizí tým dokážou bezpečně pokračovat.
|
|
90
|
+
- `AGENTS.md`, skills, runbooky a checks jsou týmová infrastruktura, ne polish navíc.
|
|
91
|
+
- Team lead nestojí modelu za zády a nediktuje další větu každých třicet sekund.
|
|
92
|
+
- Po talku se tým vrací k repu s mapou, planem a prvním checkem, ne s lovem na chytřejší prompt.
|
|
93
|
+
|
|
94
|
+
### Mikro-cvičení
|
|
95
|
+
|
|
96
|
+
Použijte stejný malý task ve dvou podmínkách:
|
|
97
|
+
|
|
98
|
+
1. prompt blob
|
|
99
|
+
2. krátké zadání s `Goal`, `Context`, `Constraints`, `Done When`
|
|
100
|
+
|
|
101
|
+
Nenechte to sklouznout do debaty o tom, který model je chytřejší.
|
|
102
|
+
|
|
103
|
+
Pointa:
|
|
104
|
+
|
|
105
|
+
- přenos záměru
|
|
106
|
+
- přenos mantinelů
|
|
107
|
+
- přenos done criteria
|
|
108
|
+
|
|
109
|
+
### Most do Build fáze 1
|
|
110
|
+
|
|
111
|
+
Na konci talku má být jasné:
|
|
112
|
+
|
|
113
|
+
- teorie tím končí
|
|
114
|
+
- tým se vrací k repu
|
|
115
|
+
- nejdřív vzniká mapa a první explicitní check
|
|
116
|
+
- teprve potom dává smysl další feature motion
|
|
117
|
+
|
|
27
118
|
## Build fáze 1
|
|
28
119
|
|
|
29
120
|
### Viditelný milestone board
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
# Context is King
|
|
2
2
|
|
|
3
|
-
## Otevírací
|
|
3
|
+
## Otevírací modul
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Tenhle workshop skill i dashboard vznikly stejným způsobem, jakým dnes budeme pracovat my: s AI agentem, ale s důrazem na kontext. Nejde mi o prodej nástroje. Jde mi o to ukázat disciplínu, která z nástroje dělá použitelného spolupracovníka.
|
|
6
|
+
|
|
7
|
+
Rámec pro room launch:
|
|
8
|
+
|
|
9
|
+
- dnes nezačínáme tool demo ani soutěž v promptování
|
|
10
|
+
- budeme se učit, stavět, předávat i přebírat
|
|
11
|
+
- odpoledne se ukáže, co z práce přežije bez nás
|
|
6
12
|
|
|
7
13
|
## Klíčová linka
|
|
8
14
|
|
|
@@ -12,9 +18,26 @@ Moje hlavní věta pro dnešek:
|
|
|
12
18
|
|
|
13
19
|
> Neučíme se "lépe promptovat". Učíme se postavit repo a workflow, ve kterém agent i cizí tým dokážou bezpečně pokračovat.
|
|
14
20
|
|
|
21
|
+
## Analogický beat
|
|
22
|
+
|
|
23
|
+
Když dáte lidem stejné kostky, nevznikne jedna správná kachna. Stejně tak ze stejného modelu nevzniká jedna správná práce. Rozdíl nedělá jen model. Rozdíl dělá kontext, mantinely, ověřování a představivost týmu.
|
|
24
|
+
|
|
25
|
+
Pointa analogie:
|
|
26
|
+
|
|
27
|
+
- stejný agent neznamená stejný výsledek
|
|
28
|
+
- kvalitu neurčuje samotný model
|
|
29
|
+
- pracovní systém kolem agenta je součást výsledku
|
|
30
|
+
|
|
15
31
|
## Mikro-cvičení
|
|
16
32
|
|
|
17
|
-
Všichni dostanou stejný malý
|
|
33
|
+
Všichni dostanou stejný malý task. Jedna varianta bude prompt blob. Druhá varianta bude krátké zadání se 4 prvky a s odkazem na kontext zapsaný v repu. Pak porovnáme výsledky. Nehledáme „nejhezčí prompt“. Hledáme způsob práce, který přenese záměr, omezení a done criteria i do dalšího kroku.
|
|
34
|
+
|
|
35
|
+
4 prvky pro druhou variantu:
|
|
36
|
+
|
|
37
|
+
- Goal
|
|
38
|
+
- Context
|
|
39
|
+
- Constraints
|
|
40
|
+
- Done When
|
|
18
41
|
|
|
19
42
|
## Hlavní teze
|
|
20
43
|
|
|
@@ -37,6 +60,15 @@ Všichni dostanou stejný malý úkol. Jedna varianta bude prompt blob. Druhá v
|
|
|
37
60
|
- Když agent dělá víc, já musím lépe ověřovat.
|
|
38
61
|
- Handoff není závěr dne. Je to průběžná podmínka celé práce.
|
|
39
62
|
|
|
63
|
+
## Most do Build fáze 1
|
|
64
|
+
|
|
65
|
+
Po tomhle talku se tým nemá vracet k repu s pocitem, že potřebuje jen chytřejší prompt. Má se vracet s jedním jasným očekáváním:
|
|
66
|
+
|
|
67
|
+
- nejdřív krátká mapa v repu
|
|
68
|
+
- potom plan
|
|
69
|
+
- potom první explicitní check
|
|
70
|
+
- teprve potom další feature motion
|
|
71
|
+
|
|
40
72
|
## Závěr
|
|
41
73
|
|
|
42
74
|
Odpoledne nezažijete jen to, že „AI někdy funguje a někdy ne“. Zažijete, jak moc výsledek závisí na kvalitě pracovního systému, který kolem agenta postavíte.
|
|
@@ -8,7 +8,7 @@ Current implementation in this repo:
|
|
|
8
8
|
|
|
9
9
|
- lives in the repository `harness-cli/` package and ships publicly as `@harness-lab/cli`
|
|
10
10
|
- distributes a portable participant workshop skill bundle through `harness skill install`
|
|
11
|
-
- covers `auth login/logout/status` plus `workshop status/create-instance/update-instance/prepare/remove-instance/archive/phase set`
|
|
11
|
+
- covers `auth login/logout/status` plus `workshop status/create-instance/update-instance/reset-instance/prepare/remove-instance/archive/phase set`
|
|
12
12
|
- targets the existing shared dashboard facilitator APIs
|
|
13
13
|
- is tested for browser/device auth, local-dev Basic Auth fallback, and cookie-backed Neon bootstrap fallback
|
|
14
14
|
- stores sessions in a local file under `HARNESS_CLI_HOME` or `~/.harness` by default
|
|
@@ -41,6 +41,7 @@ Required commands:
|
|
|
41
41
|
- `harness workshop status`
|
|
42
42
|
- `harness workshop create-instance`
|
|
43
43
|
- `harness workshop update-instance`
|
|
44
|
+
- `harness workshop reset-instance <instance-id>`
|
|
44
45
|
- `harness workshop archive`
|
|
45
46
|
- `harness workshop prepare`
|
|
46
47
|
- `harness workshop remove-instance`
|
|
@@ -90,6 +91,7 @@ Current command posture:
|
|
|
90
91
|
|
|
91
92
|
- explicit target required:
|
|
92
93
|
- `harness workshop update-instance <instance-id>`
|
|
94
|
+
- `harness workshop reset-instance <instance-id>`
|
|
93
95
|
- `harness workshop prepare <instance-id>`
|
|
94
96
|
- `harness workshop remove-instance <instance-id>`
|
|
95
97
|
- explicit target is the created resource:
|
|
@@ -115,6 +117,11 @@ Current step-up posture:
|
|
|
115
117
|
- the existing CLI command set (`workshop status/archive/phase set`) may run on a valid brokered device session
|
|
116
118
|
- future higher-risk commands such as facilitator grant/revoke or destructive instance mutations should require a fresh browser approval window rather than silently reusing an older CLI session
|
|
117
119
|
|
|
120
|
+
Content refresh posture:
|
|
121
|
+
|
|
122
|
+
- after changing authored participant-facing sources in `workshop-skill/`, `content/`, or `workshop-blueprint/`, refresh the portable bundle and verify it before shipping facilitator or participant guidance
|
|
123
|
+
- when those changes must land in already-created workshop instances, `workshop reset-instance` is the intended re-import path
|
|
124
|
+
|
|
118
125
|
## Session Storage Posture
|
|
119
126
|
|
|
120
127
|
Default storage backend:
|
|
@@ -103,6 +103,31 @@ Habit installed:
|
|
|
103
103
|
- cleanup and codification are part of delivery
|
|
104
104
|
- repeated pain should become a better template, check, or runbook
|
|
105
105
|
|
|
106
|
+
## Narrative Spine
|
|
107
|
+
|
|
108
|
+
The day should not feel like separate agenda cards. Each phase should change what the room now understands and what it is ready to do next.
|
|
109
|
+
|
|
110
|
+
- `opening`:
|
|
111
|
+
Shift the room from "AI hackathon energy" to "continuation-quality discipline." The key belief is that handoff without verbal rescue is part of the assignment from the first hour.
|
|
112
|
+
- `talk`:
|
|
113
|
+
Shift the room from a vague sense that context matters to a precise thesis: harness engineering is team infrastructure, not prompt cosmetics.
|
|
114
|
+
- `demo`:
|
|
115
|
+
Shift the room from abstract agreement to an observable workflow. The room should see context, plan, implementation, and review as one repeatable system.
|
|
116
|
+
- `build-1`:
|
|
117
|
+
Shift teams from listening to evidence. Before lunch, the repo needs to show map, plan, one executable check, and one verified step.
|
|
118
|
+
- `intermezzo-1`:
|
|
119
|
+
Shift from isolated table work to shared learning. The room should hear concrete repo signals, not generic progress reporting.
|
|
120
|
+
- `lunch-reset`:
|
|
121
|
+
Shift from local progress to handoff readiness. Going to lunch without a readable next safe step should feel unfinished.
|
|
122
|
+
- `rotation`:
|
|
123
|
+
Shift from authorship to inheritance. The receiving team must read first, diagnose second, and edit only after it can explain the state.
|
|
124
|
+
- `build-2`:
|
|
125
|
+
Shift from frustration to codification. Weak continuation signals should turn into clearer repo guidance, stronger checks, and better runbooks.
|
|
126
|
+
- `intermezzo-2`:
|
|
127
|
+
Shift from anecdotes about the afternoon to concrete continuation evidence. The room should identify which repo signals actually saved time.
|
|
128
|
+
- `reveal`:
|
|
129
|
+
Shift from reflection to adoption. The close should turn signals from the day into next-week practice and into improvements to the reusable workshop blueprint.
|
|
130
|
+
|
|
106
131
|
## What Must Survive In The Repo
|
|
107
132
|
|
|
108
133
|
- goal and constraints
|
|
@@ -177,6 +177,32 @@ Rules:
|
|
|
177
177
|
- do not use reset for an ordinary title, venue, or room correction
|
|
178
178
|
- if the route returns `400`, the payload is wrong; if it returns `404`, the instance does not exist
|
|
179
179
|
|
|
180
|
+
### `/workshop facilitator reset-instance <instance-id>`
|
|
181
|
+
|
|
182
|
+
Preferred path:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
harness workshop reset-instance sample-workshop-demo-orbit --template-id blueprint-default
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Raw API reference:
|
|
189
|
+
|
|
190
|
+
```http
|
|
191
|
+
PATCH {DASHBOARD_URL}/api/workshop/instances/{instanceId}
|
|
192
|
+
Content-Type: application/json
|
|
193
|
+
|
|
194
|
+
{
|
|
195
|
+
"action": "reset",
|
|
196
|
+
"templateId": "blueprint-default"
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Rules:
|
|
201
|
+
- use this when the goal is to re-import fresh blueprint-owned workshop content into an existing instance
|
|
202
|
+
- warn that reset archives current runtime state first and then clears live runtime state for the instance
|
|
203
|
+
- prefer `update-instance` for ordinary metadata corrections; reset is the high-impact operation
|
|
204
|
+
- if the facilitator does not specify a template, keep the current template unless there is a clear reason to switch
|
|
205
|
+
|
|
180
206
|
### `/workshop facilitator prepare`
|
|
181
207
|
|
|
182
208
|
Preferred path:
|
|
@@ -291,6 +317,14 @@ Presenter scenes are agenda-linked, room-facing outputs for the facilitator and
|
|
|
291
317
|
- delete a local scene
|
|
292
318
|
- read and optionally edit `facilitatorNotes`, `sourceRefs`, and `blocks`
|
|
293
319
|
|
|
320
|
+
Rich-scene rules:
|
|
321
|
+
|
|
322
|
+
- keep presenter scenes agenda-linked; do not invent a separate slide-deck source of truth
|
|
323
|
+
- prefer one dominant voice and one main idea per scene
|
|
324
|
+
- for reusable visuals, prefer reviewed local blueprint assets and metadata over ad hoc remote image URLs
|
|
325
|
+
- runtime edits remain instance-local until a maintainer deliberately publishes them back into the repo
|
|
326
|
+
- when working in the source repo, use the maintainer playbook in `docs/presenter-rich-scene-authoring.md` for drafting, refinement, and publish-back
|
|
327
|
+
|
|
294
328
|
Per-instance route:
|
|
295
329
|
|
|
296
330
|
```http
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -108,6 +108,15 @@ export function createHarnessClient({ fetchFn, session }) {
|
|
|
108
108
|
body: { action: "update_metadata", ...input },
|
|
109
109
|
});
|
|
110
110
|
},
|
|
111
|
+
resetWorkshopInstance(instanceId, templateId) {
|
|
112
|
+
return request(`/api/workshop/instances/${encodeURIComponent(instanceId)}`, {
|
|
113
|
+
method: "PATCH",
|
|
114
|
+
body: {
|
|
115
|
+
action: "reset",
|
|
116
|
+
...(templateId ? { templateId } : {}),
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
},
|
|
111
120
|
prepareWorkshopInstance(instanceId) {
|
|
112
121
|
return request("/api/workshop", {
|
|
113
122
|
method: "POST",
|
package/src/run-cli.js
CHANGED
|
@@ -178,6 +178,7 @@ function printUsage(io, ui) {
|
|
|
178
178
|
"harness workshop archive [--notes TEXT]",
|
|
179
179
|
"harness workshop create-instance [<instance-id>] [--template-id ID] [--event-title TEXT] [--city CITY]",
|
|
180
180
|
"harness workshop update-instance <instance-id> [--event-title TEXT] [--city CITY]",
|
|
181
|
+
"harness workshop reset-instance <instance-id> [--template-id ID]",
|
|
181
182
|
"harness workshop prepare <instance-id>",
|
|
182
183
|
"harness workshop remove-instance <instance-id>",
|
|
183
184
|
"harness workshop phase set <phase-id>",
|
|
@@ -731,6 +732,41 @@ async function handleWorkshopPrepare(io, ui, env, positionals, flags, deps) {
|
|
|
731
732
|
}
|
|
732
733
|
}
|
|
733
734
|
|
|
735
|
+
async function handleWorkshopResetInstance(io, ui, env, positionals, flags, deps) {
|
|
736
|
+
const session = await requireSession(io, ui, env);
|
|
737
|
+
if (!session) {
|
|
738
|
+
return 1;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
const instanceId = await readRequiredCommandValue(
|
|
742
|
+
io,
|
|
743
|
+
flags,
|
|
744
|
+
["id", "instance-id"],
|
|
745
|
+
"Instance id: ",
|
|
746
|
+
readOptionalPositional(positionals, 2),
|
|
747
|
+
);
|
|
748
|
+
if (!instanceId) {
|
|
749
|
+
ui.status("error", "Instance id is required.", { stream: "stderr" });
|
|
750
|
+
return 1;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
try {
|
|
754
|
+
const client = createHarnessClient({ fetchFn: deps.fetchFn, session });
|
|
755
|
+
const result = await client.resetWorkshopInstance(
|
|
756
|
+
instanceId,
|
|
757
|
+
readStringFlag(flags, "template-id", "template"),
|
|
758
|
+
);
|
|
759
|
+
ui.json("Workshop Reset Instance", result);
|
|
760
|
+
return 0;
|
|
761
|
+
} catch (error) {
|
|
762
|
+
if (error instanceof HarnessApiError) {
|
|
763
|
+
ui.status("error", `Reset instance failed: ${error.message}`, { stream: "stderr" });
|
|
764
|
+
return 1;
|
|
765
|
+
}
|
|
766
|
+
throw error;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
734
770
|
async function handleWorkshopRemoveInstance(io, ui, env, positionals, flags, deps) {
|
|
735
771
|
const session = await requireSession(io, ui, env);
|
|
736
772
|
if (!session) {
|
|
@@ -856,6 +892,10 @@ export async function runCli(argv, io, deps = {}) {
|
|
|
856
892
|
return handleWorkshopUpdateInstance(io, ui, io.env, positionals, flags, mergedDeps);
|
|
857
893
|
}
|
|
858
894
|
|
|
895
|
+
if (scope === "workshop" && action === "reset-instance") {
|
|
896
|
+
return handleWorkshopResetInstance(io, ui, io.env, positionals, flags, mergedDeps);
|
|
897
|
+
}
|
|
898
|
+
|
|
859
899
|
if (scope === "workshop" && action === "prepare") {
|
|
860
900
|
return handleWorkshopPrepare(io, ui, io.env, positionals, flags, mergedDeps);
|
|
861
901
|
}
|