create-snipara 2.0.10 → 2.0.11

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/README.md CHANGED
@@ -14,6 +14,9 @@ npx create-snipara
14
14
  creates or reuses auth, writes Hosted MCP config, and prepares the local project
15
15
  so an LLM client can use Snipara context and reviewed memory. The default path is
16
16
  hosted-only so the first success is a grounded answer, not a local tooling tour.
17
+ It is also the canonical activation engine behind editor setup docs: VS Code can
18
+ surface activation as a native command, Cursor can pair OpenVSX UI with Hosted
19
+ MCP, but both paths should land on the same project context.
17
20
 
18
21
  Use it when the goal is outcome-first agent work: the user asks for judgment,
19
22
  implementation, release, or verification, and the agent handles Snipara context,
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import { homedir } from "os";
13
13
  // package.json
14
14
  var package_default = {
15
15
  name: "create-snipara",
16
- version: "2.0.10",
16
+ version: "2.0.11",
17
17
  description: "Onboard Snipara Hosted MCP Context + Memory with auth, companion workflows, and optional Snipara Sandbox",
18
18
  main: "dist/index.js",
19
19
  type: "module",
@@ -427,6 +427,9 @@ function writeInitialHandoff(answers, manifest) {
427
427
  `Repo path: ${manifest.repoPath}`,
428
428
  `Git branch: ${manifest.git.branch ?? "not detected"}`,
429
429
  `Git remote: ${manifest.git.remote ?? "not detected"}`,
430
+ `Activation doctrine: ${manifest.surfaceContract.doctrine}`,
431
+ `Activation engine: ${manifest.surfaceContract.engine}`,
432
+ `Entry point: ${manifest.surfaceContract.entryPoint}`,
430
433
  "",
431
434
  "## Activation lanes",
432
435
  ...Object.entries(manifest.lanes).map(
@@ -440,6 +443,7 @@ function writeInitialHandoff(answers, manifest) {
440
443
  ...recentCommits.length > 0 ? recentCommits.map((line) => `- ${line}`) : ["- not available"],
441
444
  "",
442
445
  "## Next",
446
+ `- ${manifest.surfaceContract.nextSurfaceAction}`,
443
447
  "- Ask the coding agent what it should know before editing the first target area.",
444
448
  "- Review memory candidates before accepting durable memory.",
445
449
  "- Connect GitHub later for PRs, reviews, team sync, and continuous sync.",
@@ -549,6 +553,7 @@ function findDecisionArchaeologySources(cwd) {
549
553
  return [.../* @__PURE__ */ new Set([...directSources, ...archaeologySources])].slice(0, 80);
550
554
  }
551
555
  function createInitialFirstWorkBrief(answers, detection, scan) {
556
+ const surfaceContract = buildActivationSurfaceContract(answers.aiClient);
552
557
  const githubLine = answers.githubRepo ? `GitHub detected: ${answers.githubRepo.fullName}` : "No GitHub integration required for first value.";
553
558
  const commands = scan.scripts.length > 0 ? scan.scripts.join(", ") : "no package scripts detected";
554
559
  const docs = scan.files.candidateDocs.length > 0 ? scan.files.candidateDocs.join(", ") : "no standard docs detected";
@@ -566,6 +571,7 @@ function createInitialFirstWorkBrief(answers, detection, scan) {
566
571
  detection.inGitRepo ? "Local Git repository detected." : "Local folder detected.",
567
572
  githubLine,
568
573
  `AI client: ${getClientDisplayName(answers.aiClient)}.`,
574
+ `Activation entry point: ${surfaceContract.entryPoint}.`,
569
575
  `Languages: ${languages}.`
570
576
  ]
571
577
  },
@@ -594,7 +600,10 @@ function createInitialFirstWorkBrief(answers, detection, scan) {
594
600
  },
595
601
  {
596
602
  title: "Suggested next task",
597
- lines: ["Ask your agent what it should know before editing the first target area."]
603
+ lines: [
604
+ surfaceContract.nextSurfaceAction,
605
+ "Ask your agent what it should know before editing the first target area."
606
+ ]
598
607
  },
599
608
  {
600
609
  title: "Top impacted modules",
@@ -612,10 +621,12 @@ function createActivationManifest(answers, detection, mode = "default", scan) {
612
621
  const hasCompanion = answers.installCompanion;
613
622
  const localScan = scan ?? detectLocalActivationScan(detection);
614
623
  const dayZeroQuery = "What is this project, what is currently in flight, and what should an agent know before making the first edit?";
624
+ const surfaceContract = buildActivationSurfaceContract(answers.aiClient);
615
625
  return {
616
626
  version: "create-snipara-activation-v1",
617
627
  activationId: buildActivationId(),
618
628
  mode,
629
+ surfaceContract,
619
630
  activationMetric: {
620
631
  name: "time_to_how_did_it_know_that",
621
632
  targetMinutes: 5,
@@ -3330,6 +3341,49 @@ function readCompanionConfigFile(filePath) {
3330
3341
  return {};
3331
3342
  }
3332
3343
  }
3344
+ function buildActivationSurfaceContract(client) {
3345
+ const shared = {
3346
+ doctrine: "one_activation_engine_multiple_entry_points",
3347
+ engine: "create-snipara",
3348
+ firstSuccessState: "Hosted MCP connected, local workspace context seeded, and a First Work Brief ready for the next agent session.",
3349
+ mustNotDuplicate: [
3350
+ "Local source scan heuristics",
3351
+ "First Work Brief generation",
3352
+ "memory-candidate extraction",
3353
+ "Hosted MCP config contract"
3354
+ ]
3355
+ };
3356
+ if (client === "cursor") {
3357
+ return {
3358
+ ...shared,
3359
+ entryPoint: "Cursor extension or Cursor agent instructions call create-snipara",
3360
+ clientRole: "Lightweight editor surface: expose rules, skills, and the canonical bootstrap path; do not fork activation logic.",
3361
+ nextSurfaceAction: "In Cursor, ask the agent to run or verify `npx create-snipara@latest init --client cursor --starter`, then use the generated rules and Hosted MCP tools."
3362
+ };
3363
+ }
3364
+ if (client === "vscode") {
3365
+ return {
3366
+ ...shared,
3367
+ entryPoint: "VS Code extension command or create-snipara bootstrap",
3368
+ clientRole: "Native editor UX surface: provide SecretStorage, progress, panels, status, and Copilot handoff while keeping activation semantics aligned with create-snipara.",
3369
+ nextSurfaceAction: "In VS Code, run `Snipara: Activate Workspace` when the extension is installed, or keep using this generated pack when bootstrapping from the terminal."
3370
+ };
3371
+ }
3372
+ if (client === "claude-code") {
3373
+ return {
3374
+ ...shared,
3375
+ entryPoint: "Claude Code plugin or create-snipara bootstrap",
3376
+ clientRole: "Agent-first surface: load Hosted MCP and project instructions, then use Companion only for explicit local continuity workflows.",
3377
+ nextSurfaceAction: "Start a new Claude Code session and validate Snipara tools before enabling hooks or managed workflows."
3378
+ };
3379
+ }
3380
+ return {
3381
+ ...shared,
3382
+ entryPoint: `${getClientDisplayName(client)} setup generated by create-snipara`,
3383
+ clientRole: "MCP-compatible surface: consume the generated Hosted MCP reference and AGENTS.md rather than owning a separate activation model.",
3384
+ nextSurfaceAction: "Restart or reload the client, verify Snipara tools, then ask the first grounded project question from the generated First Work Brief."
3385
+ };
3386
+ }
3333
3387
  function getClientGuidance(client) {
3334
3388
  if (client === "claude-code") {
3335
3389
  return [
@@ -3339,6 +3393,7 @@ function getClientGuidance(client) {
3339
3393
  }
3340
3394
  if (client === "cursor") {
3341
3395
  return [
3396
+ "Cursor is a lightweight editor entry point: use create-snipara as the canonical activation engine, then let Cursor consume the generated rules and Hosted MCP context.",
3342
3397
  "Cursor reads the generated .mcp.json directly, so the hosted Snipara MCP surface is available after restart.",
3343
3398
  "Use the companion CLI only for explicit upload, planning, chunk lookup, doctor, and task commit workflows outside the editor UI."
3344
3399
  ];
@@ -3374,6 +3429,7 @@ function getClientGuidance(client) {
3374
3429
  }
3375
3430
  if (client === "vscode") {
3376
3431
  return [
3432
+ "VS Code can provide native activation UX, but create-snipara remains the canonical activation contract for generated files and local briefing semantics.",
3377
3433
  "VS Code and Copilot-style clients should use Hosted MCP plus AGENTS.md for project workflow rules.",
3378
3434
  "Use .snipara/templates/vscode-mcp-reference.json as the Snipara server reference when adding an MCP server."
3379
3435
  ];
@@ -3639,11 +3695,24 @@ function buildClientPackMarkdown(answers, commands, guidance) {
3639
3695
  const bootstrapCommand = commands.find(
3640
3696
  (command) => command.title === "Bootstrap local companion"
3641
3697
  );
3698
+ const surfaceContract = buildActivationSurfaceContract(answers.aiClient);
3642
3699
  return `# Snipara Pack: ${clientName}
3643
3700
 
3644
3701
  This pack is the client-specific overlay for the generated Snipara project setup.
3645
3702
  Use \`AGENTS.md\` as the shared source of agent behavior, then apply the client-specific files below.
3646
3703
 
3704
+ ## Activation Contract
3705
+
3706
+ - Doctrine: one activation engine, multiple entry points
3707
+ - Canonical engine: \`${surfaceContract.engine}\`
3708
+ - Entry point: ${surfaceContract.entryPoint}
3709
+ - Client role: ${surfaceContract.clientRole}
3710
+ - First success state: ${surfaceContract.firstSuccessState}
3711
+ - Next surface action: ${surfaceContract.nextSurfaceAction}
3712
+
3713
+ The client-specific files in this pack should not reimplement local source scanning,
3714
+ First Work Brief generation, memory-candidate extraction, or Hosted MCP config semantics.
3715
+
3647
3716
  ## Hosted MCP
3648
3717
 
3649
3718
  - Endpoint: \`${buildHostedMcpEndpoint(answers)}\`
@@ -3692,6 +3761,8 @@ async function createCompanionPack(answers) {
3692
3761
  const readme = `# Snipara Companion Pack
3693
3762
 
3694
3763
  This project uses Snipara as a hosted-first project intelligence layer with source-backed context, reviewed memory, and local companion workflow helpers.
3764
+ The activation doctrine is: one shared activation engine, multiple entry points.
3765
+ \`create-snipara\` is the canonical bootstrap; editor extensions and plugins should provide UI, rules, or handoff affordances without forking the activation engine.
3695
3766
 
3696
3767
  ## Install Profile
3697
3768
 
@@ -3721,6 +3792,18 @@ This project uses Snipara as a hosted-first project intelligence layer with sour
3721
3792
 
3722
3793
  ${guidance.map((line) => `- ${line}`).join("\n")}
3723
3794
 
3795
+ ## Activation Continuity Loop
3796
+
3797
+ After the First Work Brief, use Companion when local continuity matters:
3798
+
3799
+ 1. Start or resume with \`${COMPANION_NPX_COMMAND} session-bootstrap --include-session-context --max-context-tokens 1000\`.
3800
+ 2. Refresh local source context with \`${COMPANION_NPX_COMMAND} source sync --json\` after meaningful doc or code movement.
3801
+ 3. Before risky edits, use \`${COMPANION_NPX_COMMAND} code impact --changed-files <files> --diff-summary "<change>"\`.
3802
+ 4. End durable work with \`${COMPANION_NPX_COMMAND} task-commit --summary "<what changed>" --files <files>\`.
3803
+
3804
+ Keep quick editor usage in the editor. Use Companion for explicit continuity, source refresh,
3805
+ workflow phase state, guards, impact checks, business-folder onboarding, and durable task memory.
3806
+
3724
3807
  ## Business Folder Onboarding
3725
3808
 
3726
3809
  Use this when Claude, ChatGPT, Codex, or another LLM client has already materialized Drive, Notion, Gmail, or local business files into a folder.
@@ -4511,6 +4594,11 @@ function printActivationSummary(manifest) {
4511
4594
  ` Day-zero corpus: ${manifest.dayZeroCorpus.status} - ${manifest.dayZeroCorpus.detail}`
4512
4595
  )
4513
4596
  );
4597
+ console.log(chalk.bold("\nActivation surface:\n"));
4598
+ console.log(` Engine: ${manifest.surfaceContract.engine}`);
4599
+ console.log(` Entry point: ${manifest.surfaceContract.entryPoint}`);
4600
+ console.log(chalk.dim(` Role: ${manifest.surfaceContract.clientRole}`));
4601
+ console.log(chalk.dim(` Next: ${manifest.surfaceContract.nextSurfaceAction}`));
4514
4602
  console.log(chalk.bold("\nAgent readiness:\n"));
4515
4603
  console.log(` ${manifest.agentReadiness.summary}`);
4516
4604
  for (const finding of manifest.agentReadiness.stalenessFindings.slice(0, 3)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-snipara",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
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",