@launchsecure/launch-kit 0.0.27 → 0.0.28
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/beacon/beacon.mjs +1003 -440
- package/dist/beacon/beacon.mjs.map +1 -1
- package/dist/beacon/beacon.umd.js +45 -24
- package/dist/beacon/beacon.umd.js.map +1 -1
- package/dist/beacon/types/capture/events.d.ts +20 -0
- package/dist/beacon/types/capture/events.d.ts.map +1 -0
- package/dist/beacon/types/element.d.ts +1 -0
- package/dist/beacon/types/element.d.ts.map +1 -1
- package/dist/beacon/types/index.d.ts +2 -1
- package/dist/beacon/types/index.d.ts.map +1 -1
- package/dist/beacon/types/monitor/dom.d.ts +13 -0
- package/dist/beacon/types/monitor/dom.d.ts.map +1 -0
- package/dist/beacon/types/monitor/index.d.ts +19 -0
- package/dist/beacon/types/monitor/index.d.ts.map +1 -0
- package/dist/beacon/types/monitor/network.d.ts +12 -0
- package/dist/beacon/types/monitor/network.d.ts.map +1 -0
- package/dist/beacon/types/monitor/transport.d.ts +27 -0
- package/dist/beacon/types/monitor/transport.d.ts.map +1 -0
- package/dist/beacon/types/monitor/types.d.ts +117 -0
- package/dist/beacon/types/monitor/types.d.ts.map +1 -0
- package/dist/beacon/types/types.d.ts +10 -0
- package/dist/beacon/types/types.d.ts.map +1 -1
- package/dist/beacon/types/ui/drawer.d.ts +3 -1
- package/dist/beacon/types/ui/drawer.d.ts.map +1 -1
- package/dist/beacon/types/ui/monitor-panel.d.ts +19 -0
- package/dist/beacon/types/ui/monitor-panel.d.ts.map +1 -0
- package/dist/server/beacon-monitor-entry.js +353 -0
- package/dist/server/cli.js +50 -2
- package/dist/server/council-entry.js +0 -0
- package/dist/server/course-entry.js +246 -0
- package/dist/server/fb-wizard.js +0 -0
- package/dist/server/init-entry.js +394 -64
- package/dist/server/orbit-entry.js +187 -24
- package/package.json +24 -23
- package/scaffolds/ls-marketplace/.claude-plugin/marketplace.json +15 -0
- package/scaffolds/ls-marketplace/plugins/ls/.claude-plugin/plugin.json +28 -0
- package/scaffolds/ls-marketplace/plugins/ls/commands/activate-beacon.md +216 -0
- package/scaffolds/ls-marketplace/plugins/ls/commands/beacon-array.md +92 -0
- package/scaffolds/ls-marketplace/plugins/ls/commands/beacon-clear.md +68 -0
- package/scaffolds/ls-marketplace/plugins/ls/commands/beacon-pulse.md +80 -0
- package/scaffolds/ls-marketplace/plugins/ls/commands/beacon-scan.md +62 -0
- package/scaffolds/ls-marketplace/plugins/ls/commands/show-mcp-status.md +109 -0
- package/scaffolds/ls-marketplace/plugins/ls/commands/standup.md +177 -0
- package/scaffolds/migrate-safety/scripts/migrate-with-backup.sh +0 -0
- package/scaffolds/recall-hook/scripts/ensure-recall.sh +69 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Draft a daily standup from work done since the last push, group themes using launch-chart, show the draft, and post to LaunchSecure Comm Hub as a daily_update after explicit confirmation.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Standup
|
|
6
|
+
|
|
7
|
+
Generates a daily-update comment for the LaunchSecure Comm Hub. Pulls commits since the last push (with fallbacks), groups them by codebase layer/module using `launch-chart`, drafts a summary in the project's house style, shows it to the user, and posts only after the user confirms. Never posts without explicit "yes".
|
|
8
|
+
|
|
9
|
+
## Preflight
|
|
10
|
+
|
|
11
|
+
1. Verify `.launch-secure.cred.config` exists at the repo root. If missing, abort and tell the user to run `npx launch-kit init` first — without the cred file the `launch-secure` MCP cannot authenticate, so we cannot read prior standups or post the new one.
|
|
12
|
+
2. Verify we are inside a git repo (`git rev-parse --git-dir`). If not, abort with a clear message.
|
|
13
|
+
3. Record the current branch (`git rev-parse --abbrev-ref HEAD`).
|
|
14
|
+
4. Detect whether `launch-chart` is wired by calling `mcp__launch-chart__detect_project_stack`. If the call fails or returns nothing, fall back to git-only grouping (note this in the final summary).
|
|
15
|
+
|
|
16
|
+
## Gather
|
|
17
|
+
|
|
18
|
+
Pull data from layered sources, in this order:
|
|
19
|
+
|
|
20
|
+
### 1. Determine the window
|
|
21
|
+
|
|
22
|
+
- **Primary**: `git log --reverse --pretty=format:'%h%x09%an%x09%ae%x09%s%n%b%n%x00' @{push}..HEAD`. The `@{push}` revspec resolves to where this branch was last pushed; the diff is commits ahead of upstream.
|
|
23
|
+
- **Fallback 1**: if the primary returns empty OR `@{push}` errors with `unknown revision`, query the `launch-secure` MCP via `communication_read({ tag: "daily_update", limit: 1 })`. Take the most recent comment's `createdAt`; gather commits since then via `git log --since="<that timestamp>"`.
|
|
24
|
+
- **Fallback 2**: if no prior `daily_update` exists either, use `git log --since="24 hours ago"`.
|
|
25
|
+
|
|
26
|
+
Tell the user which window was used in one short line ("Using commits since last push (12 commits)" or "No commits since last push — falling back to commits since 2026-05-20 14:01 (last standup)").
|
|
27
|
+
|
|
28
|
+
### 2. Collect change context
|
|
29
|
+
|
|
30
|
+
- `git diff --stat @{push}..HEAD` (or whichever window was chosen) — file paths + line counts. Drives theme grouping in the next step.
|
|
31
|
+
- `git log --pretty=format:'%h %s' <window>` — short subject lines for quick scan.
|
|
32
|
+
- Branch names + PR references in commit messages (look for `#<digits>`, `LS-<id>`, branch slugs like `fix/foo-bar`). These are work-item handles.
|
|
33
|
+
|
|
34
|
+
### 3. Group by layer/module using launch-chart
|
|
35
|
+
|
|
36
|
+
This is the chart's job — do **not** group by file path string-matching. For each changed file (deduped from the diff stat):
|
|
37
|
+
|
|
38
|
+
- Call `mcp__launch-chart__read_graph({ search: "<file basename>", layer: "<best guess: ui|api|db|static>" })` to resolve the file to a graph node, OR
|
|
39
|
+
- Call `mcp__launch-chart__read_graph({ node_id: "<full path>" })` if the file path matches a known node id format
|
|
40
|
+
|
|
41
|
+
From the resolved nodes, pull each node's `module` and `layer` fields. Group commits/files into themes by `module` first, then by `layer` when `module` is missing. Common LS modules: `auth`, `pda`, `pda-guides`, `pda-shell`, `radar`, `chart`, `orbit`, `recall`, `comms`, `board`, `webhooks`, `feedback`, `briefs`, `mcp`, etc.
|
|
42
|
+
|
|
43
|
+
If a file doesn't resolve in the chart (new file, non-TS, config), bucket it under "Misc" or by directory (`scripts/`, `docs/`, `.github/`).
|
|
44
|
+
|
|
45
|
+
### 4. Audit pass (optional, skip if it slows things down)
|
|
46
|
+
|
|
47
|
+
Call `mcp__launch-chart__audit_layer({ layer: "all" })` to surface any drift introduced today (schema_drift, unprotected_routes, dead_screens, hardcoded_values). If the audit reports new issues that didn't exist before (best-effort — compare against the prior standup's audit if possible, otherwise just report current state), flag them in the closing `----` block.
|
|
48
|
+
|
|
49
|
+
### 5. Blast radius for the biggest changes (deploy-safety signal)
|
|
50
|
+
|
|
51
|
+
For the top-3 files by lines-changed in `git diff --stat`, call `mcp__launch-chart__blast_points({ node_id: "<file>", hops: 2 })`. If any of them has a blast radius of >10 dependent nodes, note it as a deploy-risk signal in the `----` block ("touched X which has 24 downstream consumers — review before deploy").
|
|
52
|
+
|
|
53
|
+
### 6. Work-item linkage
|
|
54
|
+
|
|
55
|
+
For each work-item handle found in commit messages, call `mcp__launch-secure__work_items_list` (or `work_item_get` if you have an ID) to pull title + status. If any work items were closed today (status changed to DONE/COMPLETED), call them out in the closing block.
|
|
56
|
+
|
|
57
|
+
### 7. Release detection
|
|
58
|
+
|
|
59
|
+
A commit qualifies the post for the `release` tag if ANY of the following are true:
|
|
60
|
+
- `package.json` `version` field changed in `git diff @{push}..HEAD -- package.json`
|
|
61
|
+
- A migration file under `prisma/migrations/` was added or `prisma/schema.prisma` changed
|
|
62
|
+
- A deploy/publish was mentioned in commit subjects (regex: `\b(publish|release|deploy|bump)\b`)
|
|
63
|
+
- A new bin or export was added to a package's `package.json`
|
|
64
|
+
|
|
65
|
+
If any are true, set `addReleaseTag = true`. Otherwise `false`.
|
|
66
|
+
|
|
67
|
+
## Draft
|
|
68
|
+
|
|
69
|
+
Produce the standup in the **exact** house format. This is the format Prajyot uses for human-written daily updates (verified against the May 18, 19, 20 posts in the Comm Hub):
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
Hey @everyone
|
|
73
|
+
|
|
74
|
+
Pushed <N> commits to <branch> today. Highlights:
|
|
75
|
+
|
|
76
|
+
→ <Theme 1>
|
|
77
|
+
- <outcome bullet, not a commit message>
|
|
78
|
+
- <outcome bullet>
|
|
79
|
+
|
|
80
|
+
→ <Theme 2>
|
|
81
|
+
- <outcome bullet>
|
|
82
|
+
|
|
83
|
+
→ <Theme N>
|
|
84
|
+
- <outcome bullet>
|
|
85
|
+
|
|
86
|
+
----
|
|
87
|
+
|
|
88
|
+
<one-line PSA or deploy-safety note. Examples: "TS clean, no schema/migration changes, safe to deploy." or "Includes prisma migration <name> — run migrate-with-backup.sh before deploy.">
|
|
89
|
+
|
|
90
|
+
Thanks
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Strict format rules:**
|
|
94
|
+
|
|
95
|
+
- `Hey @everyone` — exactly this. Not "Hey team", not "Hi everyone". Single line, blank line after.
|
|
96
|
+
- `Pushed N commits to <branch> today. Highlights:` — replace `<branch>` with the actual branch from preflight. If the window was a fallback (not "since last push"), say "Drafted N commits' worth of work on <branch> today. Highlights:" instead — be honest about the window.
|
|
97
|
+
- `→ <Theme>` — right-arrow + space + theme name. Theme names come from chart's `module` grouping (e.g. "→ Radar", "→ Webhooks", "→ Chart / Freshness"). Capitalize the first letter.
|
|
98
|
+
- `- <bullet>` — plain hyphen + space. Bullets are **outcomes**, not commit messages. Translate "feat(radar): add transcript view" into "Structured transcript view with overlay reply drawer". Drop scope prefixes and verb tense.
|
|
99
|
+
- Blank line between themes.
|
|
100
|
+
- `----` — four hyphens, on its own line, blank line above and below.
|
|
101
|
+
- The closing block: one short line is fine. Don't pad.
|
|
102
|
+
- `Thanks` — exact word, no comma, no name signature (the post's author is attached automatically).
|
|
103
|
+
|
|
104
|
+
**Constraints:**
|
|
105
|
+
|
|
106
|
+
- Plain text only. No `**bold**`, no `*italic*`, no backticks, no `# headers`, no markdown link syntax. The Comm Hub renders as plain text.
|
|
107
|
+
- Aim for ≤ 350 words total. Standups are skim-able; trim aggressively.
|
|
108
|
+
- Top 3–6 themes is the sweet spot. If you have 20 commits in 12 different modules, collapse the small ones into a "→ Misc" theme.
|
|
109
|
+
- Bullets should be **outcome-shaped**: what landed in the product, not what the diff did. "Multi-select EventTypesPicker on subscription forms" beats "modified components/webhooks/EventTypesPicker.tsx".
|
|
110
|
+
- Mention work-item closures and any deploy-affecting changes (migrations, env var changes, breaking API changes) in the closing block.
|
|
111
|
+
|
|
112
|
+
## Confirm
|
|
113
|
+
|
|
114
|
+
Show the draft to the user verbatim in a code-fenced block (so they see plain-text formatting as-is), then ask **exactly**:
|
|
115
|
+
|
|
116
|
+
> "Post this as a daily_update to LS Comm Hub? Reply `yes` to post, `edit` to revise, or `cancel` to abort."
|
|
117
|
+
|
|
118
|
+
Responses:
|
|
119
|
+
|
|
120
|
+
- **`yes`, `y`, `ok`, `post it`** — proceed to duplicate check + post.
|
|
121
|
+
- **`edit`, `change <thing>`, free-form revisions** — apply the edits, regenerate the draft, re-show, re-ask.
|
|
122
|
+
- **`cancel`, `no`, `nope`** — abort. Don't post. Don't keep partial state.
|
|
123
|
+
|
|
124
|
+
Anything ambiguous → treat as "edit, what would you like changed?".
|
|
125
|
+
|
|
126
|
+
## Duplicate check
|
|
127
|
+
|
|
128
|
+
Before posting, call `mcp__launch-secure__communication_read({ tag: "daily_update", limit: 5 })`. If any returned comment has:
|
|
129
|
+
- `resourceType: "comment"` (not `"daily_update"` — that's bot-only, distinct stream)
|
|
130
|
+
- `author.email` matches the current user's email (from `git config user.email`)
|
|
131
|
+
- `createdAt` within the last 12 hours
|
|
132
|
+
|
|
133
|
+
…then a manual daily_update already exists from today. Offer:
|
|
134
|
+
|
|
135
|
+
> "A daily_update already exists from you today (posted at <time>, <preview-50-chars>). Choose: `replace` to update it (communication_update), `append` to post another, `cancel` to stop."
|
|
136
|
+
|
|
137
|
+
- **replace** → call `mcp__launch-secure__communication_update({ id: "<existing-id>", content: <new-draft> })`. Preserve tags.
|
|
138
|
+
- **append** → proceed to post.
|
|
139
|
+
- **cancel** → abort.
|
|
140
|
+
|
|
141
|
+
## Post
|
|
142
|
+
|
|
143
|
+
Call `mcp__launch-secure__communication_write`:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
{
|
|
147
|
+
resourceType: "comment",
|
|
148
|
+
content: "<the final draft, plain text>",
|
|
149
|
+
tags: addReleaseTag ? ["daily_update", "release"] : ["daily_update"]
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
`org_slug` and `project_slug` are auto-supplied from the cred config via the MCP's headersHelper — do NOT pass them yourself.
|
|
154
|
+
|
|
155
|
+
On success: report the comment ID and a friendly "posted to LS Comm Hub" line. If the response includes a URL field, surface it.
|
|
156
|
+
|
|
157
|
+
On failure: surface the error verbatim. Don't retry automatically — auth or schema errors deserve human attention. The draft is preserved in chat so the user can retry manually.
|
|
158
|
+
|
|
159
|
+
## Tag handling
|
|
160
|
+
|
|
161
|
+
Before adding any tag, you may verify it exists via `mcp__launch-secure__tags_list`. The `daily_update` and `release` tags are standard in LS projects; if either is missing, the post will still succeed but the tag won't attach. Surface this as a warning, not a blocker.
|
|
162
|
+
|
|
163
|
+
## Idempotency
|
|
164
|
+
|
|
165
|
+
Re-running `/ls:standup`:
|
|
166
|
+
- Always re-pulls the window fresh. No cached state.
|
|
167
|
+
- Duplicate check handles same-day reposts.
|
|
168
|
+
- The draft is never written to disk — only shown in chat. User can copy it manually if they cancel.
|
|
169
|
+
|
|
170
|
+
## Notes for the assistant
|
|
171
|
+
|
|
172
|
+
- Use `launch-chart` for grouping, not grep/glob. The whole point is producing themes that match how the codebase is organized, not how files are named.
|
|
173
|
+
- The user's preference is short, terse standups (verified style across May 18→20 posts). Default to under-rather-than-over.
|
|
174
|
+
- "Outcome bullet, not commit message" is the single most important transform. A standup full of "feat(x): add y" reads like a changelog, not a status.
|
|
175
|
+
- Never assume `release` tag without evidence (see Release detection above). False positives confuse downstream consumers.
|
|
176
|
+
- Don't ask the user clarifying questions before drafting — produce a first cut, then iterate. The draft is cheap; the conversation isn't.
|
|
177
|
+
- If `launch-chart` is unavailable (no `.launchchart.json`, MCP not responding), fall back to grouping by top-level path segment (`src/app/api/` → "API", `src/client/components/board/` → "Board", etc.) and note "chart unavailable, grouped by path" in chat (not in the post).
|
|
File without changes
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Ensures the launch-recall watcher is running. Designed for the Claude Code
|
|
3
|
+
# SessionStart hook (.claude/settings.json). Idempotent: silently no-ops if
|
|
4
|
+
# recall isn't configured, logs OK if watcher is already alive, spawns a
|
|
5
|
+
# detached watcher if it isn't.
|
|
6
|
+
#
|
|
7
|
+
# Portable across two layouts:
|
|
8
|
+
# - Dev: project has packages/cli/dist/server/recall-entry.js (e.g.
|
|
9
|
+
# launchsecure-v2 itself) → spawn via `node`.
|
|
10
|
+
# - Customer: project doesn't ship launch-kit → spawn via
|
|
11
|
+
# `npx -y -p @launchsecure/launch-kit launch-recall watch`. First run
|
|
12
|
+
# downloads from npm (slow); subsequent runs use the npx cache.
|
|
13
|
+
#
|
|
14
|
+
# Exits 0 in all cases — recall failing should never block Claude Code startup.
|
|
15
|
+
|
|
16
|
+
set -u
|
|
17
|
+
|
|
18
|
+
REPO_ROOT="${CLAUDE_PROJECT_DIR:-$(pwd)}"
|
|
19
|
+
RECALL_DIR="$REPO_ROOT/.recall"
|
|
20
|
+
PIDFILE="$RECALL_DIR/watch.pid"
|
|
21
|
+
LOCAL_RECALL_BIN="$REPO_ROOT/packages/cli/dist/server/recall-entry.js"
|
|
22
|
+
|
|
23
|
+
# No recall configured here — exit quietly. Hook is safe to ship in any repo;
|
|
24
|
+
# it only acts when there's a shadow-git to protect.
|
|
25
|
+
if [[ ! -d "$RECALL_DIR/repo.git" ]]; then
|
|
26
|
+
exit 0
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
# Watcher already alive?
|
|
30
|
+
if [[ -f "$PIDFILE" ]]; then
|
|
31
|
+
pid="$(cat "$PIDFILE" 2>/dev/null || true)"
|
|
32
|
+
if [[ -n "${pid:-}" ]] && kill -0 "$pid" 2>/dev/null; then
|
|
33
|
+
echo "[recall] watcher alive (pid $pid)" >&2
|
|
34
|
+
exit 0
|
|
35
|
+
fi
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# Pick spawn command. Prefer the local dev build (instant) over npx (slow on
|
|
39
|
+
# first run because of the npm download).
|
|
40
|
+
if [[ -f "$LOCAL_RECALL_BIN" ]]; then
|
|
41
|
+
SPAWN_CMD=(node "$LOCAL_RECALL_BIN" watch)
|
|
42
|
+
via="local dev build"
|
|
43
|
+
else
|
|
44
|
+
SPAWN_CMD=(npx -y -p @launchsecure/launch-kit launch-recall watch)
|
|
45
|
+
via="npx (initial download may take a moment)"
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
echo "[recall] starting watcher via $via" >&2
|
|
49
|
+
|
|
50
|
+
# Spawn detached. nohup + redirected fds + & keeps the watcher alive past this
|
|
51
|
+
# script's exit. disown removes it from the shell's job table.
|
|
52
|
+
nohup "${SPAWN_CMD[@]}" >/dev/null 2>&1 &
|
|
53
|
+
disown 2>/dev/null || true
|
|
54
|
+
|
|
55
|
+
# Brief check — long enough for the local-dev path, not long enough to block
|
|
56
|
+
# session start when npx is downloading.
|
|
57
|
+
sleep 0.5
|
|
58
|
+
|
|
59
|
+
if [[ -f "$PIDFILE" ]]; then
|
|
60
|
+
newpid="$(cat "$PIDFILE" 2>/dev/null || true)"
|
|
61
|
+
if [[ -n "${newpid:-}" ]] && kill -0 "$newpid" 2>/dev/null; then
|
|
62
|
+
echo "[recall] watcher started (pid $newpid)" >&2
|
|
63
|
+
exit 0
|
|
64
|
+
fi
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# Spawn is still in flight (likely npx download). Don't block session start.
|
|
68
|
+
echo "[recall] watcher spawn initiated — check with /ls:show-mcp-status in a moment" >&2
|
|
69
|
+
exit 0
|