create-snipara 1.3.14 → 1.3.15

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 (3) hide show
  1. package/README.md +26 -3
  2. package/dist/index.js +49 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -19,7 +19,7 @@ Use it for:
19
19
  - Hosted MCP onboarding for Codex, Claude Code, Cursor, ChatGPT Desktop, and similar clients
20
20
  - free account signup with reviewed Context + Memory
21
21
  - local project wiring, `doctor`, `repair`, and `upgrade`
22
- - GitHub repository sync approval when the current folder is a GitHub repo
22
+ - GitHub repository sync and PR Answer Packs approval when the current folder is a GitHub repo
23
23
 
24
24
  ## Why It Exists
25
25
 
@@ -99,6 +99,7 @@ That distinction matters:
99
99
  - opens the browser device-flow free Context + Memory account flow when needed
100
100
  - writes Hosted MCP configuration
101
101
  - detects a GitHub remote and can open the Snipara GitHub App automation path
102
+ - explains the GitHub PR Answer Packs path for AI-assisted pull request workflows
102
103
  - installs `snipara-companion` by default for local managed workflows
103
104
  - installs optional `snipara-sandbox`
104
105
  - configures `.mcp.json`
@@ -116,7 +117,7 @@ That distinction matters:
116
117
  Keep the package roles simple:
117
118
 
118
119
  - `create-snipara` = connect the user to Hosted MCP Context + Memory
119
- - `create-snipara --github` = connect the current GitHub repository through the browser approval flow
120
+ - `create-snipara --github` = connect the current GitHub repository through the browser approval flow for repository sync and PR Answer Packs
120
121
  - `snipara-business` = prepare business context from local or mounted folders
121
122
  - Hosted MCP = the runtime surface the LLM actually uses after setup
122
123
 
@@ -347,12 +348,31 @@ The browser flow lets the user:
347
348
  - create or reuse the matching Snipara project
348
349
  - enable push sync
349
350
  - start the first documentation sync
351
+ - enable PR Answer Packs for AI-assisted pull request workflows
350
352
 
351
353
  Hosted memory stays attached to the same Snipara account.
352
354
 
355
+ ### PR Answer Packs
356
+
357
+ PR Answer Packs are generated by the hosted Snipara GitHub App, not by a local
358
+ MCP command. Once the repository is connected, Snipara can attach scoped
359
+ repository context to pull requests, including impacted symbols, architecture
360
+ notes, related history, conventions, and linked documentation.
361
+
362
+ Use this path for GitHub-native coding-agent workflows:
363
+
364
+ ```bash
365
+ npx create-snipara --github
366
+ ```
367
+
368
+ Keep using `snipara-companion` for local planning, code impact checks, and
369
+ memory commits. Keep using Hosted MCP for agent context retrieval. Do not use
370
+ `snipara-mcp` as a separate PR Answer Packs setup path unless Snipara exposes a
371
+ dedicated MCP tool for it.
372
+
353
373
  Recommended explanation to users:
354
374
 
355
- > `create-snipara` connects your LLM from the terminal. GitHub sync is approved in the browser because GitHub requires the user to choose which account, organization, and repositories Snipara can read.
375
+ > `create-snipara` connects your LLM from the terminal. GitHub sync and PR Answer Packs are approved in the browser because GitHub requires the user to choose which account, organization, and repositories Snipara can read.
356
376
 
357
377
  ## API Key Requirements
358
378
 
@@ -402,6 +422,9 @@ npx create-snipara --github
402
422
 
403
423
  Best when the current folder is a GitHub repository and the user wants code or docs sync through the GitHub App.
404
424
 
425
+ PR Answer Packs are part of this hosted GitHub App path. They do not require a
426
+ separate local MCP package.
427
+
405
428
  ### Connect the current repository with a path filter
406
429
 
407
430
  ```bash
package/dist/index.js CHANGED
@@ -9,12 +9,13 @@ import fs from "fs";
9
9
  import path from "path";
10
10
  import { execSync, spawn } from "child_process";
11
11
  import { homedir } from "os";
12
- var VERSION = "1.3.14";
12
+ var VERSION = "1.3.15";
13
13
  var BASE_URL = "https://www.snipara.com";
14
14
  var API_URL = "https://api.snipara.com";
15
15
  var COMPANION_PACKAGE_NAME = "snipara-companion";
16
16
  var COMPANION_COMMAND_NAME = "snipara-companion";
17
17
  var LEGACY_COMPANION_COMMAND_NAME = "rlm-hook";
18
+ var GITHUB_ANSWER_PACKS_LABEL = "GitHub PR Answer Packs";
18
19
  var MCP_PACKAGE_NAME = "snipara-mcp";
19
20
  var SANDBOX_PACKAGE_NAME = "snipara-sandbox[all]";
20
21
  var SANDBOX_SERVER_NAME = "snipara-sandbox";
@@ -214,8 +215,23 @@ async function runUpgrade(options) {
214
215
  async function runPrintConfig(options) {
215
216
  const detection = detectEnvironment();
216
217
  const answers = loadExistingAnswers(options);
218
+ const githubRepo = detectGitRepository();
219
+ const githubAnswerPacks = githubRepo ? `${githubRepo.fullName} can be connected with npx create-snipara --github` : "requires a GitHub-backed git remote";
217
220
  if (options.json) {
218
- console.log(JSON.stringify({ detection, inferredSetup: answers }, null, 2));
221
+ console.log(
222
+ JSON.stringify(
223
+ {
224
+ detection,
225
+ github: {
226
+ repository: githubRepo,
227
+ answerPacks: githubAnswerPacks
228
+ },
229
+ inferredSetup: answers
230
+ },
231
+ null,
232
+ 2
233
+ )
234
+ );
219
235
  return;
220
236
  }
221
237
  console.log(chalk.bold("\n\u{1F4E6} Current Setup\n"));
@@ -230,6 +246,8 @@ async function runPrintConfig(options) {
230
246
  console.log(` Local snipara-mcp package: ${answers.installMcp ? "enabled" : "disabled"}`);
231
247
  console.log(` Snipara Sandbox: ${answers.installRuntime ? "enabled" : "disabled"}`);
232
248
  console.log(` Hooks: ${answers.installHooks ? "enabled" : "disabled"}`);
249
+ console.log(` GitHub repo: ${githubRepo ? githubRepo.fullName : "not detected"}`);
250
+ console.log(` ${GITHUB_ANSWER_PACKS_LABEL}: ${githubAnswerPacks}`);
233
251
  console.log(` Existing .mcp.json: ${detection.files.mcpConfig ? "yes" : "no"}`);
234
252
  console.log(` Companion pack: ${detection.files.sniparaCompanionPack ? "yes" : "no"}`);
235
253
  console.log("");
@@ -386,7 +404,7 @@ async function gatherConfiguration(options) {
386
404
  {
387
405
  type: (_, values) => detectedGitRepo && showAdvancedPrompts && !options.skipGithub && (values.profile || initialProfile) !== "runtime-only" ? "confirm" : null,
388
406
  name: "configureGitHub",
389
- message: detectedGitRepo ? `Open GitHub automation setup for ${detectedGitRepo.fullName} after local config?` : "Open GitHub automation setup after local config?",
407
+ message: detectedGitRepo ? `Open GitHub automation and PR Answer Packs setup for ${detectedGitRepo.fullName} after local config?` : "Open GitHub automation setup after local config?",
390
408
  initial: true
391
409
  },
392
410
  {
@@ -1341,6 +1359,15 @@ function getCompanionCommands(answers) {
1341
1359
  purpose: `Install ${COMPANION_PACKAGE_NAME} so this project can run ${COMPANION_COMMAND_NAME} onboard-folder without using the dashboard.`
1342
1360
  }
1343
1361
  ];
1362
+ const githubAnswerPacksCommand = answers.githubRepo ? {
1363
+ title: "Connect GitHub PR Answer Packs",
1364
+ command: `npx create-snipara --github${answers.githubPath ? ` --github-path ${answers.githubPath}` : ""}`,
1365
+ purpose: `Open the Snipara GitHub App flow for ${answers.githubRepo.fullName}. After the repo is connected, Snipara can generate scoped PR Answer Packs for GitHub-native agent workflows.`
1366
+ } : {
1367
+ title: "Connect a GitHub repo for PR Answer Packs",
1368
+ command: "npx create-snipara --github",
1369
+ purpose: "Run this from a GitHub-backed repository to approve the Snipara GitHub App and enable repository sync plus PR Answer Packs."
1370
+ };
1344
1371
  return [
1345
1372
  {
1346
1373
  title: "Bootstrap local companion",
@@ -1387,6 +1414,7 @@ function getCompanionCommands(answers) {
1387
1414
  command: `${COMPANION_COMMAND_NAME} code impact --changed-files src/api/webhooks.ts tests/webhooks.test.ts --diff-summary "webhook retry hardening"`,
1388
1415
  purpose: "Use paid Context code impact analysis to surface likely tests, docs, routes, config, and risks."
1389
1416
  },
1417
+ githubAnswerPacksCommand,
1390
1418
  {
1391
1419
  title: "Upload or refresh a doc",
1392
1420
  command: `${COMPANION_COMMAND_NAME} upload --path docs/local-playbook.md --file ./docs/local-playbook.md`,
@@ -1447,6 +1475,7 @@ This project uses Snipara as a hosted-first context and memory layer with local
1447
1475
  - Installed local snipara-mcp package: \`${answers.installMcp ? "yes" : "no"}\`
1448
1476
  - Installed Snipara Sandbox: \`${answers.installRuntime ? "yes" : "no"}\`
1449
1477
  - Generated hooks: \`${answers.installHooks ? "yes" : "no"}\`
1478
+ - GitHub repository: \`${answers.githubRepo ? answers.githubRepo.fullName : "not-detected"}\`
1450
1479
 
1451
1480
  ## Local Detection Snapshot
1452
1481
 
@@ -1476,6 +1505,15 @@ Apply only after reviewing the manifest:
1476
1505
 
1477
1506
  For source-code repositories, use the GitHub OAuth/code onboarding path instead of \`onboard-folder\`.
1478
1507
 
1508
+ ## GitHub PR Answer Packs
1509
+
1510
+ PR Answer Packs are generated by the hosted Snipara GitHub App, not by a local MCP command.
1511
+ They attach scoped repository context to pull requests so coding agents can load impacted symbols,
1512
+ architecture notes, related history, conventions, and linked documentation without rescanning the
1513
+ entire repository.
1514
+
1515
+ ${answers.githubRepo ? `This folder maps to \`${answers.githubRepo.fullName}\`. Use the GitHub App setup link below to connect the repo and enable PR Answer Packs for new or updated pull requests.` : `Run \`npx create-snipara --github\` from a GitHub-backed repository to open the approval flow for repository sync and PR Answer Packs.`}
1516
+
1479
1517
  ## GitHub Repository Automation
1480
1518
 
1481
1519
  ${answers.githubRepo ? `Detected repository: \`${answers.githubRepo.fullName}\` on branch \`${answers.githubRepo.branch}\`.
@@ -1484,7 +1522,7 @@ Open the Snipara GitHub App setup and connect this repository:
1484
1522
 
1485
1523
  \`${buildGitHubAutomationUrl(answers)}\`
1486
1524
 
1487
- After connection, Snipara creates or reuses the repository project, enables push sync, starts the first documentation sync, and keeps hosted memory available through the same account.` : `No GitHub repository was detected for this folder. Run \`npx create-snipara --github\` from a GitHub-backed git repository to open the repo automation path.`}
1525
+ After connection, Snipara creates or reuses the repository project, enables push sync, starts the first documentation sync, and can publish PR Answer Packs through GitHub-native PR surfaces. Hosted memory stays available through the same account.` : `No GitHub repository was detected for this folder. Run \`npx create-snipara --github\` from a GitHub-backed git repository to open the repo automation path.`}
1488
1526
 
1489
1527
  ## Suggested Commands
1490
1528
 
@@ -1565,7 +1603,7 @@ async function openGitHubAutomation(answers) {
1565
1603
  console.log(
1566
1604
  ` Opening Snipara GitHub setup for ${chalk.cyan(answers.githubRepo.fullName)} on branch ${chalk.cyan(
1567
1605
  answers.githubRepo.branch
1568
- )}.`
1606
+ )}. This enables repository sync and PR Answer Packs after browser approval.`
1569
1607
  );
1570
1608
  console.log(chalk.dim(` ${url}
1571
1609
  `));
@@ -1630,6 +1668,12 @@ async function runValidation(answers, includeHostedCheck) {
1630
1668
  status: answers.installHooks && answers.aiClient === "claude-code" ? detection.files.claudeDir ? "pass" : "warn" : "pass",
1631
1669
  detail: answers.installHooks && answers.aiClient === "claude-code" ? detection.files.claudeDir ? "~/.claude detected" : "~/.claude missing" : "Hooks not requested"
1632
1670
  });
1671
+ const githubRepo = answers.githubRepo || detectGitRepository();
1672
+ checks.push({
1673
+ name: "github_answer_packs",
1674
+ status: answers.configureGitHub ? "pass" : githubRepo ? "warn" : "pass",
1675
+ detail: answers.configureGitHub ? `GitHub App setup link generated for ${githubRepo?.fullName || "detected repo"}; PR Answer Packs are enabled after browser approval` : githubRepo ? `GitHub repo ${githubRepo.fullName} detected; run npx create-snipara --github to connect PR Answer Packs` : "No GitHub repo detected; PR Answer Packs require the GitHub App setup path"
1676
+ });
1633
1677
  if (includeHostedCheck && answers.apiKeyType !== "none" && !answers.apiKey.includes("YOUR_")) {
1634
1678
  checks.push(...await testHostedConnection(answers));
1635
1679
  } else if (includeHostedCheck) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-snipara",
3
- "version": "1.3.14",
3
+ "version": "1.3.15",
4
4
  "description": "Onboard Snipara Hosted MCP Context + Memory with auth, companion workflows, and optional Snipara Sandbox",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",