@skillrecordings/cli 0.10.2 → 0.11.1

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.
@@ -53,7 +53,7 @@ import {
53
53
  storeDraftSuccess,
54
54
  validate,
55
55
  validateSync
56
- } from "./chunk-TFLLCHUX.js";
56
+ } from "./chunk-JKFLTZHH.js";
57
57
  import "./chunk-KEV3QKXP.js";
58
58
  import "./chunk-HK3PEWFD.js";
59
59
  import "./chunk-WYKL32C3.js";
@@ -117,4 +117,4 @@ export {
117
117
  validate,
118
118
  validateSync
119
119
  };
120
- //# sourceMappingURL=pipeline-DRKFIH73.js.map
120
+ //# sourceMappingURL=pipeline-P3CLQVOL.js.map
@@ -0,0 +1,52 @@
1
+ import {
2
+ ActionsTable,
3
+ ApprovalRequestsTable,
4
+ AppsTable,
5
+ AuditLogTable,
6
+ ConversationsTable,
7
+ DeadLetterQueueTable,
8
+ IdempotencyKeysTable,
9
+ TrustScoresTable,
10
+ WebhookPayloadSnapshotsTable,
11
+ and,
12
+ asc,
13
+ closeDb,
14
+ database,
15
+ desc,
16
+ env,
17
+ eq,
18
+ getDb,
19
+ gt,
20
+ gte,
21
+ lt,
22
+ lte,
23
+ or,
24
+ sql
25
+ } from "./chunk-TBO2ZHJH.js";
26
+ import "./chunk-WFANXVQG.js";
27
+ export {
28
+ ActionsTable,
29
+ ApprovalRequestsTable,
30
+ AppsTable,
31
+ AuditLogTable,
32
+ ConversationsTable,
33
+ DeadLetterQueueTable,
34
+ IdempotencyKeysTable,
35
+ TrustScoresTable,
36
+ WebhookPayloadSnapshotsTable,
37
+ and,
38
+ asc,
39
+ closeDb,
40
+ database,
41
+ desc,
42
+ env,
43
+ eq,
44
+ getDb,
45
+ gt,
46
+ gte,
47
+ lt,
48
+ lte,
49
+ or,
50
+ sql
51
+ };
52
+ //# sourceMappingURL=src-IKPHU6BF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "name": "@skillrecordings/cli",
3
- "version": "0.10.2",
3
+ "version": "0.11.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "skill": "./bin/skill.mjs"
7
7
  },
8
- "files": ["dist", "bin", ".env.encrypted"],
8
+ "files": ["dist", "bin", "plugin"],
9
9
  "scripts": {
10
10
  "dev": "bun src/index.ts",
11
11
  "build": "tsup",
12
+ "build:compile": "bun build.ts",
12
13
  "check-types": "tsc --noEmit",
13
- "test": "vitest --run"
14
+ "test": "vitest --run",
15
+ "plugin:sync": "bun src/index.ts plugin sync"
14
16
  },
15
17
  "devDependencies": {
16
18
  "@repo/typescript-config": "*",
@@ -18,18 +20,18 @@
18
20
  "@skillrecordings/database": "workspace:*",
19
21
  "@skillrecordings/front-sdk": "workspace:*",
20
22
  "@skillrecordings/memory": "workspace:*",
21
- "@skillrecordings/sdk": "workspace:*",
22
23
  "@types/node": "^22.15.3",
23
24
  "tsup": "^8.5.0",
24
- "typescript": "5.9.2"
25
+ "typescript": "5.9.2",
26
+ "@vitest/coverage-v8": "^3.0.0"
25
27
  },
26
28
  "dependencies": {
29
+ "@1password/sdk": "^0.2.1",
27
30
  "@axiomhq/js": "^1.3.1",
28
31
  "@inquirer/prompts": "^8.2.0",
29
32
  "age-encryption": "^0.3.0",
30
33
  "ai": "^6.0.49",
31
34
  "commander": "^12.1.0",
32
- "dotenv-flow": "^4.1.0",
33
35
  "glob": "^13.0.0",
34
36
  "gray-matter": "^4.0.3",
35
37
  "mysql2": "^3.16.1",
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "skill-cli",
3
+ "version": "1.0.0",
4
+ "displayName": "Skill Recordings CLI",
5
+ "description": "Front inbox management and support agent tooling",
6
+ "author": "Skill Recordings",
7
+ "skills": ["front-inbox"],
8
+ "cliVersion": "${PACKAGE_JSON_VERSION}"
9
+ }
@@ -0,0 +1,360 @@
1
+ # Front Inbox Management
2
+
3
+ A Claude Code skill for managing Skill Recordings Front inboxes via the `skill` CLI.
4
+ This skill is agent-first and optimized for rapid, safe inbox operations.
5
+ It includes product inbox aliases, HATEOAS chaining guidance, and daily briefing workflows.
6
+
7
+ ## Activation
8
+
9
+ Use this skill automatically when a user mentions any of the following:
10
+ - inbox
11
+ - front
12
+ - triage
13
+ - archive
14
+ - tags
15
+ - any product name listed in the alias table
16
+
17
+ ## Scope
18
+
19
+ This skill is intentionally narrow.
20
+ It focuses on Front inbox management and daily cross-inbox briefings.
21
+ Do not use it for billing, refunds, or content support.
22
+
23
+ ## Required Environment
24
+
25
+ - `FRONT_API_TOKEN`
26
+
27
+ If the token is missing, report the issue and suggest checking `FRONT_API_TOKEN`.
28
+
29
+ ## Inbox Aliases
30
+
31
+ These aliases resolve to Front inbox IDs.
32
+ All aliases are case-insensitive.
33
+
34
+ | Product | Inbox ID | Aliases |
35
+ | --- | --- | --- |
36
+ | Total TypeScript | `inb_3srbb` | `TT`, `typescript`, `total` |
37
+ | Pro Tailwind | `inb_3pqh3` | `tailwind`, `ptw` |
38
+ | AI Hero | `inb_4bj7r` | `ai-hero`, `aihero` |
39
+ | Epic React | `inb_1bwzr` | `react`, `kcd` |
40
+ | Epic Web | `inb_jqs2t` | `epicweb` |
41
+ | Epic AI | `inb_jqs11` | `epicai` |
42
+ | egghead | `inb_1c77r` | `egg` |
43
+ | Just JavaScript | `inb_2odqf` | `justjs`, `jj` |
44
+ | Testing Accessibility | `inb_3bkef` | `a11y` |
45
+ | Pro Next.js | `inb_43olj` | `nextjs`, `pro-next` |
46
+
47
+ When a user provides an alias, expand it to the corresponding inbox ID.
48
+ If the alias is ambiguous or unknown, ask a clarifying question.
49
+
50
+ ## Command Reference
51
+
52
+ Always prefer JSON output for agent parsing.
53
+ Use `--json` when running commands.
54
+
55
+ ### `skill front inbox`
56
+
57
+ Purpose: list all inboxes with pending counts.
58
+
59
+ Examples:
60
+ ```bash
61
+ skill front inbox --json
62
+ ```
63
+
64
+ ### `skill front triage`
65
+
66
+ Purpose: get pending conversations in JSON for a specific inbox.
67
+
68
+ Examples:
69
+ ```bash
70
+ skill front triage -i inb_3srbb --json
71
+ ```
72
+
73
+ ### `skill front conversation`
74
+
75
+ Purpose: fetch full conversation with messages.
76
+
77
+ Examples:
78
+ ```bash
79
+ skill front conversation cnv_123 -m --json
80
+ ```
81
+
82
+ ### `skill front bulk-archive`
83
+
84
+ Purpose: preview bulk actions with `--dry-run`.
85
+
86
+ Examples:
87
+ ```bash
88
+ skill front bulk-archive -i inb_3srbb --filter "tag:handled" --dry-run --json
89
+ ```
90
+
91
+ ### `skill front tags`
92
+
93
+ Purpose: list all tags used in an inbox.
94
+
95
+ Examples:
96
+ ```bash
97
+ skill front tags inb_3srbb --json
98
+ ```
99
+
100
+ ## HATEOAS Chaining Rules
101
+
102
+ The CLI returns HATEOAS metadata for Front resources.
103
+ Follow these rules when chaining calls.
104
+
105
+ Rules:
106
+ - Always use `--json` for agent parsing.
107
+ - Follow `_actions` from responses to chain operations.
108
+ - Non-destructive actions such as `mark-read` or `tag` can be auto-executed.
109
+ - Destructive actions such as `archive` or `delete` require explicit user approval.
110
+ - Always run with `--dry-run` before `bulk-archive`.
111
+ - When `_actions` has multiple items, ask the user which to prioritize.
112
+
113
+ HATEOAS response fields:
114
+ - `_type` identifies the entity type.
115
+ - `_links` includes related resources.
116
+ - `_actions` includes next-step operations.
117
+
118
+ ## Daily Briefing Flow
119
+
120
+ Goal: produce a cross-inbox summary and pick a focus area.
121
+
122
+ Steps:
123
+ 1. Query all inboxes in parallel with `skill front triage`.
124
+ 2. Extract pending counts and urgent tags.
125
+ 3. Synthesize a concise summary.
126
+ 4. Ask the user: “What should I focus on?”
127
+ 5. Execute actions based on the user’s response.
128
+
129
+ Example summary format:
130
+ - `TT: 5 pending (2 urgent), AI Hero: 3 pending (0 urgent)`
131
+
132
+ ## Error Handling
133
+
134
+ Connection errors:
135
+ - Suggest checking `FRONT_API_TOKEN`.
136
+
137
+ Rate limits:
138
+ - Use exponential backoff.
139
+ - Retry with increasing delays before giving up.
140
+
141
+ Malformed responses:
142
+ - Fall back to text output and ask the user how to proceed.
143
+
144
+ ## Working Notes
145
+
146
+ Prefer to work inbox-by-inbox unless the user explicitly asks for a global sweep.
147
+ Confirm the inbox ID before destructive operations.
148
+ Respect human-in-the-loop approval requirements.
149
+
150
+ ## Examples
151
+
152
+ See the examples in `examples/` for real command flows.
153
+ Use these as templates and adapt to the user’s needs.
154
+
155
+ ---
156
+
157
+ ## Extended Guidance
158
+
159
+ The following sections provide more detailed operational guidance.
160
+ They are intentionally verbose to support consistent behavior.
161
+
162
+ ### Triage Principles
163
+
164
+ Triage is for sorting actionable vs non-actionable conversations.
165
+ Use tags to mark status, urgency, and next steps.
166
+ Always log actions in a short summary.
167
+
168
+ Common triage categories:
169
+ - Actionable
170
+ - Needs follow-up
171
+ - Duplicate
172
+ - Noise
173
+ - Spam
174
+
175
+ ### Tagging Standards
176
+
177
+ Use tags consistently across inboxes.
178
+ If a tag does not exist, ask before creating a new one.
179
+ Avoid creating near-duplicate tags.
180
+
181
+ Examples of standard tags:
182
+ - `urgent`
183
+ - `billing`
184
+ - `account`
185
+ - `bug`
186
+ - `feature-request`
187
+
188
+ ### Conversation Review
189
+
190
+ When reading a conversation:
191
+ - Check the subject line.
192
+ - Check sender and recipient.
193
+ - Read the latest message first.
194
+ - Verify tags and assignee.
195
+
196
+ If a response is needed:
197
+ - Draft a short response summary.
198
+ - Ask for approval before sending.
199
+
200
+ ### Bulk Archive Guidance
201
+
202
+ Bulk archive should be used carefully.
203
+ Always run with `--dry-run` first.
204
+ Ensure the filter is specific and includes a tag or status.
205
+ Confirm with the user before executing without `--dry-run`.
206
+
207
+ ### HATEOAS Examples
208
+
209
+ Example: chain from inbox list to triage.
210
+
211
+ 1. Run inbox list.
212
+ ```bash
213
+ skill front inbox --json
214
+ ```
215
+
216
+ 2. Choose the inbox with highest pending count.
217
+ 3. Follow `_actions.triage` for that inbox.
218
+ 4. Run triage with the resolved inbox ID.
219
+
220
+ Example: mark read.
221
+
222
+ 1. Get conversation details.
223
+ ```bash
224
+ skill front conversation cnv_123 -m --json
225
+ ```
226
+
227
+ 2. Follow `_actions.mark-read` and execute.
228
+
229
+ Example: archive.
230
+
231
+ 1. Get conversation details.
232
+ 2. If `_actions.archive` exists, ask the user for approval.
233
+ 3. Execute the archive action after approval.
234
+
235
+ ### Daily Briefing Deep Dive
236
+
237
+ The daily briefing is a repeatable flow.
238
+ It should be fast, consistent, and non-destructive.
239
+
240
+ Recommended flow order:
241
+ - Total TypeScript
242
+ - Pro Tailwind
243
+ - AI Hero
244
+ - Epic React
245
+ - Epic Web
246
+ - Epic AI
247
+ - egghead
248
+ - Just JavaScript
249
+ - Testing Accessibility
250
+ - Pro Next.js
251
+
252
+ For each inbox:
253
+ - Capture pending count.
254
+ - Count urgent items.
255
+ - Note any blocked or escalated threads.
256
+
257
+ Synthesize into a single sentence summary.
258
+ Ask the user what to focus on next.
259
+
260
+ ### Structured Summary Template
261
+
262
+ Use this format when reporting to the user:
263
+
264
+ ```
265
+ Summary: TT: X pending (Y urgent), AI Hero: X pending (Y urgent), Epic React: X pending (Y urgent)
266
+ Recommendation: Focus on TT and AI Hero first.
267
+ Question: What should I focus on?
268
+ ```
269
+
270
+ ### Suggested Next Actions
271
+
272
+ If the user asks for a plan, propose one of these:
273
+ - Start with highest urgent count.
274
+ - Clear handled-tagged conversations via bulk archive.
275
+ - Review recent unassigned threads.
276
+
277
+ ### Safety Checks
278
+
279
+ Before destructive actions:
280
+ - Confirm the inbox and filter.
281
+ - Re-run `--dry-run` if the filter changed.
282
+ - Ask for explicit approval.
283
+
284
+ ### Troubleshooting
285
+
286
+ If commands fail:
287
+ - Confirm CLI is installed and `skill` resolves.
288
+ - Confirm `FRONT_API_TOKEN` is set.
289
+ - Retry with `--json` for full response detail.
290
+
291
+ ### Escalation Path
292
+
293
+ If the user reports unexpected failures:
294
+ - Suggest running `skill front inbox --json`.
295
+ - Ask for the error output.
296
+ - Provide targeted guidance based on the error.
297
+
298
+ ### Support Boundaries
299
+
300
+ Do not send messages directly.
301
+ Always ask for approval before drafting or sending replies.
302
+ Avoid auto-archiving when context is unclear.
303
+
304
+ ### Recap Checklist
305
+
306
+ Use this checklist before closing a triage session:
307
+ - Inbox processed
308
+ - Urgent items identified
309
+ - Bulk actions reviewed with `--dry-run`
310
+ - Summary shared with the user
311
+
312
+ ### Additional References
313
+
314
+ - `skill front inbox`
315
+ - `skill front triage`
316
+ - `skill front conversation`
317
+ - `skill front bulk-archive`
318
+ - `skill front tags`
319
+
320
+ ### Output Format Expectations
321
+
322
+ JSON output should be parseable and consistent.
323
+ If JSON output fails, fall back to text and ask for guidance.
324
+
325
+ ### Example: Alias Expansion
326
+
327
+ User: “Check TT inbox.”
328
+ Action: Expand `TT` to `inb_3srbb` and proceed with triage.
329
+
330
+ User: “Check Pro Next.”
331
+ Action: Expand `pro-next` to `inb_43olj` and proceed.
332
+
333
+ ### Example: Urgent Tag Sweep
334
+
335
+ Run triage for each inbox.
336
+ Collect tags with `urgent` or `escalated`.
337
+ Report counts and ask for focus.
338
+
339
+ ### Example: Safe Bulk Archive
340
+
341
+ 1. Run `--dry-run` with a specific tag filter.
342
+ 2. Share the preview with the user.
343
+ 3. If approved, re-run without `--dry-run`.
344
+
345
+ ### Example: Conversation Detail Follow-up
346
+
347
+ When the user asks for details:
348
+ - Fetch the conversation.
349
+ - Summarize the latest message.
350
+ - Offer next actions using `_actions`.
351
+
352
+ ### Example: Cross-Inbox Summary
353
+
354
+ Provide a compact summary in one line.
355
+ Follow it with a clear question asking for focus.
356
+
357
+ ### End State
358
+
359
+ This skill should make inbox management predictable and safe.
360
+ Always prefer clarity over speed when making decisions.
@@ -0,0 +1,16 @@
1
+ # Example: Bulk Archive with Dry Run
2
+
3
+ Goal: preview handled-tag conversations before archiving.
4
+
5
+ Dry run:
6
+ ```bash
7
+ skill front bulk-archive -i inb_3srbb --filter "tag:handled" --dry-run --json
8
+ ```
9
+
10
+ Review the preview output with the user.
11
+ Only proceed after explicit approval.
12
+
13
+ Execute after approval:
14
+ ```bash
15
+ skill front bulk-archive -i inb_3srbb --filter "tag:handled" --json
16
+ ```
@@ -0,0 +1,16 @@
1
+ # Example: Triage Total TypeScript
2
+
3
+ Goal: fetch pending conversations for Total TypeScript and summarize urgency.
4
+
5
+ Command:
6
+ ```bash
7
+ skill front triage -i inb_3srbb --json
8
+ ```
9
+
10
+ Expected flow:
11
+ - Parse JSON response.
12
+ - Note pending count and urgent tags.
13
+ - Ask the user what to focus on next.
14
+
15
+ Follow-up question:
16
+ What should I focus on in the TT inbox?
package/.env.encrypted DELETED
Binary file