@launchsecure/launch-kit 0.0.28 → 0.0.29

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.
Files changed (23) hide show
  1. package/dist/server/chart-serve.js +3 -1
  2. package/dist/server/cli.js +231 -221
  3. package/dist/server/council-entry.js +0 -0
  4. package/dist/server/course-entry.js +3 -3
  5. package/dist/server/fb-wizard.js +0 -0
  6. package/dist/server/graph-mcp-entry.js +35 -72
  7. package/dist/server/init-entry.js +794 -195
  8. package/package.json +22 -21
  9. package/scaffolds/ls-marketplace/.claude-plugin/marketplace.json +4 -4
  10. package/scaffolds/ls-marketplace/plugins/{ls → kit}/.claude-plugin/plugin.json +1 -10
  11. package/scaffolds/ls-marketplace/plugins/{ls → kit}/commands/activate-beacon.md +2 -2
  12. package/scaffolds/ls-marketplace/plugins/kit/commands/activate-statusline.md +46 -0
  13. package/scaffolds/ls-marketplace/plugins/{ls → kit}/commands/beacon-array.md +3 -3
  14. package/scaffolds/ls-marketplace/plugins/{ls → kit}/commands/beacon-clear.md +2 -2
  15. package/scaffolds/ls-marketplace/plugins/{ls → kit}/commands/beacon-pulse.md +7 -7
  16. package/scaffolds/ls-marketplace/plugins/{ls → kit}/commands/beacon-scan.md +7 -7
  17. package/scaffolds/ls-marketplace/plugins/kit/commands/deactivate-statusline.md +34 -0
  18. package/scaffolds/ls-marketplace/plugins/{ls → kit}/commands/show-mcp-status.md +6 -6
  19. package/scaffolds/ls-marketplace/plugins/{ls → kit}/commands/standup.md +52 -38
  20. package/scaffolds/migrate-safety/scripts/migrate-with-backup.sh +0 -0
  21. package/scaffolds/recall-hook/scripts/ensure-recall.sh +0 -0
  22. package/scaffolds/statusline/statusline-mcp.sh +192 -0
  23. package/scaffolds/statusline/statusline-wrapper.sh +50 -0
File without changes
@@ -99,14 +99,14 @@ function fail(msg) {
99
99
  function readCredFile2() {
100
100
  const cred = readCredFile(process.cwd());
101
101
  if (!cred) {
102
- fail(`${CONFIG_FILENAME} not found in ${process.cwd()}. Run \`npx launch-kit init \u2026\` first.`);
102
+ fail(`${CONFIG_FILENAME} not found in ${process.cwd()}. Run \`npx @launchsecure/launch-kit init \u2026\` first.`);
103
103
  }
104
104
  return cred;
105
105
  }
106
106
  function toNested2(cred) {
107
107
  const nested = toNested(cred);
108
108
  if (!nested) {
109
- fail(`${CONFIG_FILENAME} is missing required fields (pat, orgSlug, projectSlug, serverUrl) and has no profiles. Run \`npx launch-kit init \u2026\` to (re)bootstrap.`);
109
+ fail(`${CONFIG_FILENAME} is missing required fields (pat, orgSlug, projectSlug, serverUrl) and has no profiles. Run \`npx @launchsecure/launch-kit init \u2026\` to (re)bootstrap.`);
110
110
  }
111
111
  return nested;
112
112
  }
@@ -185,7 +185,7 @@ function cmdRm(argv) {
185
185
  function updateMcpUrl(serverUrl) {
186
186
  const p = path2.join(process.cwd(), MCP_FILENAME);
187
187
  if (!fs2.existsSync(p)) {
188
- info(`(no ${MCP_FILENAME} \u2014 skipped URL update; run \`npx launch-kit init \u2026\` to wire MCP)`);
188
+ info(`(no ${MCP_FILENAME} \u2014 skipped URL update; run \`npx @launchsecure/launch-kit init \u2026\` to wire MCP)`);
189
189
  return "missing-file";
190
190
  }
191
191
  let mcp;
File without changes
@@ -752,9 +752,9 @@ function buildEffectsIndex(layerOutputs) {
752
752
  return idx;
753
753
  }
754
754
  function writeEffectsIndex(rootDir, idx) {
755
- const path3 = (0, import_node_path8.join)(rootDir, LAUNCHSECURE_DIR, "graphs", "effects-index.json");
756
- atomicWriteFileSync(path3, JSON.stringify(idx, null, 2) + "\n");
757
- return path3;
755
+ const path2 = (0, import_node_path8.join)(rootDir, LAUNCHSECURE_DIR, "graphs", "effects-index.json");
756
+ atomicWriteFileSync(path2, JSON.stringify(idx, null, 2) + "\n");
757
+ return path2;
758
758
  }
759
759
  var import_node_path8;
760
760
  var init_effects_index = __esm({
@@ -1065,10 +1065,10 @@ async function generateGraph(rootDir, layer) {
1065
1065
  return results;
1066
1066
  }
1067
1067
  function readEffectsIndex(rootDir) {
1068
- const path3 = (0, import_node_path10.join)(rootDir, GRAPHS_DIR2, "effects-index.json");
1069
- if (!(0, import_node_fs8.existsSync)(path3)) return null;
1068
+ const path2 = (0, import_node_path10.join)(rootDir, GRAPHS_DIR2, "effects-index.json");
1069
+ if (!(0, import_node_fs8.existsSync)(path2)) return null;
1070
1070
  try {
1071
- return JSON.parse((0, import_node_fs8.readFileSync)(path3, "utf-8"));
1071
+ return JSON.parse((0, import_node_fs8.readFileSync)(path2, "utf-8"));
1072
1072
  } catch {
1073
1073
  return null;
1074
1074
  }
@@ -4106,12 +4106,12 @@ var init_sql_migrations = __esm({
4106
4106
  function loadApiRoutesFromOutput(apiOutput) {
4107
4107
  const routes = [];
4108
4108
  for (const n of apiOutput.nodes) {
4109
- const path3 = n.path;
4110
- if (!path3 || typeof path3 !== "string") continue;
4109
+ const path2 = n.path;
4110
+ if (!path2 || typeof path2 !== "string") continue;
4111
4111
  routes.push({
4112
- path: path3,
4112
+ path: path2,
4113
4113
  nodeId: n.id,
4114
- segments: path3.split("/").filter(Boolean)
4114
+ segments: path2.split("/").filter(Boolean)
4115
4115
  });
4116
4116
  }
4117
4117
  return routes;
@@ -4203,16 +4203,16 @@ function resolveFetchCall(call, apiPathMap, apiRoutes) {
4203
4203
  if (call.isConcat) {
4204
4204
  return { kind: "dynamic", normalizedUrl: raw };
4205
4205
  }
4206
- const { path: path3, hadInterpolation } = normalizeFetchUrl(raw);
4207
- if (!path3.startsWith("/")) {
4208
- return { kind: "unresolved", normalizedUrl: path3 };
4206
+ const { path: path2, hadInterpolation } = normalizeFetchUrl(raw);
4207
+ if (!path2.startsWith("/")) {
4208
+ return { kind: "unresolved", normalizedUrl: path2 };
4209
4209
  }
4210
- const segs = path3.split("/").filter(Boolean);
4210
+ const segs = path2.split("/").filter(Boolean);
4211
4211
  if (hadInterpolation && segs.length > 0 && segs[0].startsWith(":")) {
4212
- return { kind: "dynamic", normalizedUrl: path3 };
4212
+ return { kind: "dynamic", normalizedUrl: path2 };
4213
4213
  }
4214
- const exact = apiPathMap.get(path3);
4215
- if (exact) return { kind: "resolved", nodeId: exact, normalizedUrl: path3 };
4214
+ const exact = apiPathMap.get(path2);
4215
+ if (exact) return { kind: "resolved", nodeId: exact, normalizedUrl: path2 };
4216
4216
  let bestScore = -1;
4217
4217
  let bestId = null;
4218
4218
  for (const r of apiRoutes) {
@@ -4223,21 +4223,21 @@ function resolveFetchCall(call, apiPathMap, apiRoutes) {
4223
4223
  }
4224
4224
  }
4225
4225
  if (bestId && bestScore > 0) {
4226
- return { kind: "resolved", nodeId: bestId, normalizedUrl: path3 };
4226
+ return { kind: "resolved", nodeId: bestId, normalizedUrl: path2 };
4227
4227
  }
4228
- return { kind: "unresolved", normalizedUrl: path3 };
4228
+ return { kind: "unresolved", normalizedUrl: path2 };
4229
4229
  }
4230
4230
  function resolveUrlPath(urlPath, apiPathMap, apiRoutes) {
4231
- const { path: path3, hadInterpolation } = normalizeFetchUrl(urlPath);
4232
- if (!path3.startsWith("/")) {
4233
- return { kind: "unresolved", normalizedUrl: path3 };
4231
+ const { path: path2, hadInterpolation } = normalizeFetchUrl(urlPath);
4232
+ if (!path2.startsWith("/")) {
4233
+ return { kind: "unresolved", normalizedUrl: path2 };
4234
4234
  }
4235
- const segs = path3.split("/").filter(Boolean);
4235
+ const segs = path2.split("/").filter(Boolean);
4236
4236
  if (hadInterpolation && segs.length > 0 && segs[0].startsWith(":")) {
4237
- return { kind: "dynamic", normalizedUrl: path3 };
4237
+ return { kind: "dynamic", normalizedUrl: path2 };
4238
4238
  }
4239
- const exact = apiPathMap.get(path3);
4240
- if (exact) return { kind: "resolved", nodeId: exact, normalizedUrl: path3 };
4239
+ const exact = apiPathMap.get(path2);
4240
+ if (exact) return { kind: "resolved", nodeId: exact, normalizedUrl: path2 };
4241
4241
  let bestScore = -1;
4242
4242
  let bestId = null;
4243
4243
  for (const r of apiRoutes) {
@@ -4248,9 +4248,9 @@ function resolveUrlPath(urlPath, apiPathMap, apiRoutes) {
4248
4248
  }
4249
4249
  }
4250
4250
  if (bestId && bestScore > 0) {
4251
- return { kind: "resolved", nodeId: bestId, normalizedUrl: path3 };
4251
+ return { kind: "resolved", nodeId: bestId, normalizedUrl: path2 };
4252
4252
  }
4253
- return { kind: "unresolved", normalizedUrl: path3 };
4253
+ return { kind: "unresolved", normalizedUrl: path2 };
4254
4254
  }
4255
4255
  var init_api_route_matching = __esm({
4256
4256
  "src/server/graph/core/api-route-matching.ts"() {
@@ -5271,9 +5271,9 @@ function collectTargets(apiOutput, uiOutput) {
5271
5271
  const out = [];
5272
5272
  for (const n of apiOutput?.nodes ?? []) {
5273
5273
  if (n.type !== "endpoint") continue;
5274
- const path3 = n.path;
5275
- if (typeof path3 !== "string" || !path3) continue;
5276
- out.push({ id: n.id, route: path3, layer: "api" });
5274
+ const path2 = n.path;
5275
+ if (typeof path2 !== "string" || !path2) continue;
5276
+ out.push({ id: n.id, route: path2, layer: "api" });
5277
5277
  }
5278
5278
  for (const n of uiOutput?.nodes ?? []) {
5279
5279
  if (n.type !== "page") continue;
@@ -6446,8 +6446,10 @@ async function startChartServer(opts = {}) {
6446
6446
  req.on("end", () => {
6447
6447
  try {
6448
6448
  const newConfig = JSON.parse(body);
6449
+ const existingConfig = loadConfig(reqRoot);
6450
+ const merged = { ...existingConfig, ...newConfig };
6449
6451
  const configPath = import_node_path24.default.join(reqRoot, LAUNCHCHART_CONFIG_FILE);
6450
- import_node_fs21.default.writeFileSync(configPath, JSON.stringify(newConfig, null, 2) + "\n", "utf-8");
6452
+ import_node_fs21.default.writeFileSync(configPath, JSON.stringify(merged, null, 2) + "\n", "utf-8");
6451
6453
  res.writeHead(200, { "Content-Type": "application/json" });
6452
6454
  res.end(JSON.stringify({ ok: true }));
6453
6455
  } catch (err2) {
@@ -8042,8 +8044,7 @@ function handleStartChartServer(args) {
8042
8044
  const portArgs = args.port ? ["--port", String(args.port)] : [];
8043
8045
  const child = (0, import_node_child_process2.spawn)(process.execPath, [entryPath, "serve", ...portArgs], {
8044
8046
  detached: true,
8045
- stdio: ["ignore", out, err2],
8046
- env: { ...process.env, LAUNCH_CHART_AUTOSERVE: "" }
8047
+ stdio: ["ignore", out, err2]
8047
8048
  });
8048
8049
  child.unref();
8049
8050
  return okJson({
@@ -8805,44 +8806,7 @@ Example: blast_points(node_id: "server/auth/middleware.ts", hops: 2) \u2192 retu
8805
8806
  });
8806
8807
 
8807
8808
  // src/server/graph-mcp-entry.ts
8808
- var import_node_child_process3 = require("node:child_process");
8809
- var import_node_fs25 = require("node:fs");
8810
- var import_node_path29 = __toESM(require("node:path"));
8811
- var import_node_os3 = require("node:os");
8812
- var import_node_fs26 = require("node:fs");
8813
- init_launch_kit_paths();
8814
8809
  init_lockfile();
8815
- function logStderr(msg) {
8816
- process.stderr.write(`[launch-chart] ${msg}
8817
- `);
8818
- }
8819
- function maybeAutoServe() {
8820
- if (process.env.LAUNCH_CHART_AUTOSERVE !== "1") return;
8821
- const rootDir = process.cwd();
8822
- setProjectRoot(rootDir);
8823
- const existing = getLiveLock(rootDir);
8824
- if (existing) {
8825
- logStderr(`autoserve: reusing existing server at ${existing.url}`);
8826
- return;
8827
- }
8828
- try {
8829
- const logDir = import_node_path29.default.join((0, import_node_os3.homedir)(), LAUNCHSECURE_DIR);
8830
- (0, import_node_fs26.mkdirSync)(logDir, { recursive: true });
8831
- const logPath = import_node_path29.default.join(logDir, "launch-chart.log");
8832
- const out = (0, import_node_fs25.openSync)(logPath, "a");
8833
- const err2 = (0, import_node_fs25.openSync)(logPath, "a");
8834
- const entryPath = process.argv[1];
8835
- const child = (0, import_node_child_process3.spawn)(process.execPath, [entryPath, "serve"], {
8836
- detached: true,
8837
- stdio: ["ignore", out, err2],
8838
- env: { ...process.env, LAUNCH_CHART_AUTOSERVE: "" }
8839
- });
8840
- child.unref();
8841
- logStderr(`autoserve: spawned detached serve process (pid ${child.pid}, log: ${logPath})`);
8842
- } catch (err2) {
8843
- logStderr(`autoserve: failed to spawn \u2014 ${err2}`);
8844
- }
8845
- }
8846
8810
  async function main() {
8847
8811
  setProjectRoot(process.cwd());
8848
8812
  const argv = process.argv.slice(2);
@@ -8858,7 +8822,6 @@ async function main() {
8858
8822
  await handleGraphCommand2(mapped, argv.slice(1));
8859
8823
  process.exit(0);
8860
8824
  }
8861
- maybeAutoServe();
8862
8825
  const { startGraphMcpServer: startGraphMcpServer2 } = await Promise.resolve().then(() => (init_graph_mcp(), graph_mcp_exports));
8863
8826
  startGraphMcpServer2();
8864
8827
  }