create-snipara 2.0.14 → 2.0.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 +4 -4
  2. package/dist/index.js +25 -255
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -29,7 +29,7 @@ Use it for:
29
29
  - free account signup with reviewed Context + Memory
30
30
  - local project wiring, `doctor`, `repair`, and `upgrade`
31
31
  - local source activation without GitHub, plus optional GitHub repository sync and PR Answer Packs approval when the current folder is a GitHub repo
32
- - day-zero Project Intelligence proof: a First Work Brief, a ready-to-run `snipara_context_query`, a small hosted README/docs seed sync for virgin projects, review-only decision archaeology candidates, possible doc-staleness findings, and an estimated context economy report from the user's own repository
32
+ - day-zero proof with a ready-to-ask grounded question and a small hosted README/docs seed sync for new projects; advanced briefs, memory candidates, and diagnostics remain available in the generated activation artifacts
33
33
 
34
34
  ## Why It Exists
35
35
 
@@ -404,7 +404,7 @@ The intended split is:
404
404
 
405
405
  - `create-snipara`: Context + Memory onboarding, auth, config, inspect, repair, and upgrade
406
406
  - `snipara-openclaw-install`: OpenClaw-only setup wrapper that remains narrower than `create-snipara`
407
- - `snipara-companion`: default local workflow helper
407
+ - `snipara-companion`: optional local workflow helper after first value
408
408
  - `snipara-mcp`: local stdio bridge, client-package development, compatibility, and testing
409
409
  - `snipara-sandbox`: optional local execution engine
410
410
 
@@ -416,8 +416,8 @@ companion add workflow ergonomics:
416
416
  - use Hosted MCP as the core Snipara surface
417
417
  - use `AGENTS.md` for project instructions
418
418
  - use the selected pack under `.snipara/companion/`, for example `CODEX.md`, `CURSOR.md`, or `GEMINI.md`
419
- - use the default `hosted-companion` path when you want compaction-safe local phase commits
420
- - choose `hosted-only` or `--skip-companion` only in locked-down environments
419
+ - start with the default `hosted-only` path for the shortest route to a grounded answer
420
+ - choose `hosted-companion` after first value when you want compaction-safe local phase commits
421
421
  - use local `snipara-mcp` only for stdio compatibility, development, or tests
422
422
 
423
423
  Claude Code, Cursor, and Kimi Code CLI can receive generated automation files when
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.14",
16
+ version: "2.0.15",
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",
@@ -23,7 +23,7 @@ var package_default = {
23
23
  scripts: {
24
24
  build: "tsup src/index.ts --format esm --dts --clean",
25
25
  dev: "tsup src/index.ts --format esm --watch",
26
- prepublishOnly: "npm run build",
26
+ prepack: "npm run build",
27
27
  pretest: "pnpm build",
28
28
  test: "node --test test/*.test.cjs",
29
29
  "pack:smoke": "bash ../../scripts/smoke-node-package.sh packages/create-snipara create-snipara create-snipara --help",
@@ -4715,51 +4715,6 @@ function describeJsonRpcError(data) {
4715
4715
  const code = data.error.code !== void 0 ? ` ${data.error.code}` : "";
4716
4716
  return `JSON-RPC error${code}: ${data.error.message || "unknown error"}`;
4717
4717
  }
4718
- function getCheck(report, name) {
4719
- return report.checks.find((check) => check.name === name);
4720
- }
4721
- function formatCheckStatus(check) {
4722
- if (!check) {
4723
- return "not checked";
4724
- }
4725
- if (check.status === "pass") {
4726
- return `OK - ${check.detail}`;
4727
- }
4728
- if (check.status === "fail") {
4729
- return `FAILED - ${check.detail}`;
4730
- }
4731
- return `NEEDS ATTENTION - ${check.detail}`;
4732
- }
4733
- function printSetupVerdict(answers, report) {
4734
- const hostedConnection = getCheck(report, "hosted_connection");
4735
- const sniparaTools = getCheck(report, "hosted_snipara_tools");
4736
- const legacyTools = getCheck(report, "hosted_legacy_tools_hidden");
4737
- const codexConfig = getCheck(report, "codex_config");
4738
- const mistralConfig = getCheck(report, "mistral_config");
4739
- const claudeTools = getCheck(report, "claude_tools_visible");
4740
- console.log(chalk.bold("\nSetup verdict:\n"));
4741
- console.log(` Config written: ${answers.profile !== "runtime-only" ? "OK" : "not requested"}`);
4742
- console.log(` Hosted MCP: ${formatCheckStatus(hostedConnection)}`);
4743
- if (sniparaTools) {
4744
- console.log(` Snipara tools: ${formatCheckStatus(sniparaTools)}`);
4745
- }
4746
- if (legacyTools) {
4747
- console.log(` Legacy tool duplicates: ${formatCheckStatus(legacyTools)}`);
4748
- }
4749
- if (codexConfig) {
4750
- console.log(` Codex config: ${formatCheckStatus(codexConfig)}`);
4751
- }
4752
- if (mistralConfig) {
4753
- console.log(` Mistral config: ${formatCheckStatus(mistralConfig)}`);
4754
- }
4755
- if (answers.aiClient === "claude-code" || answers.aiClient === "claude-desktop") {
4756
- console.log(
4757
- ` Claude loaded MCP: ${claudeTools ? formatCheckStatus(claudeTools) : "not verified"}`
4758
- );
4759
- } else {
4760
- console.log(" AI client loaded MCP: not verifiable from this terminal");
4761
- }
4762
- }
4763
4718
  function formatActivationStatus(status) {
4764
4719
  if (status === "ready") {
4765
4720
  return chalk.green("\u2713 ready");
@@ -4776,60 +4731,14 @@ function formatActivationStatus(status) {
4776
4731
  return chalk.dim("skipped");
4777
4732
  }
4778
4733
  function printActivationSummary(manifest) {
4779
- console.log(chalk.bold("\nProject Intelligence activation:\n"));
4780
- const orderedLanes = [
4781
- ["Connected", manifest.lanes.connection],
4782
- ["AI client configured", manifest.lanes.clientConfig],
4783
- ["Repository analyzed", manifest.lanes.localSnapshot],
4784
- ["Context index", manifest.lanes.contextIndex],
4785
- ["Code Graph", manifest.lanes.codeGraph],
4786
- ["Memory candidates", manifest.lanes.memoryCandidates],
4787
- ["Initial handoff", manifest.lanes.handoff],
4788
- ["First Work Brief", manifest.lanes.firstBrief],
4789
- ["GitHub sync", manifest.lanes.githubSync]
4790
- ];
4791
- for (const [label, lane] of orderedLanes) {
4792
- console.log(` ${formatActivationStatus(lane.status)} ${label} - ${lane.detail}`);
4793
- }
4794
- console.log(chalk.bold("\nFirst Work Brief:\n"));
4795
- for (const section of manifest.firstBrief.sections) {
4796
- console.log(` ${section.title}`);
4797
- for (const line of section.lines.slice(0, 2)) {
4798
- console.log(chalk.dim(` - ${line}`));
4799
- }
4800
- }
4801
- console.log(chalk.bold("\nDay-zero proof:\n"));
4802
- console.log(` Tool: ${manifest.dayZeroQuery.tool}`);
4803
- console.log(` Query: ${manifest.dayZeroQuery.query}`);
4804
- console.log(
4805
- chalk.dim(
4806
- ` Target: ${manifest.activationMetric.targetMinutes} minutes to a true, non-obvious own-repo answer.`
4807
- )
4808
- );
4734
+ const contextLane = manifest.dayZeroCorpus.status === "failed" ? { status: "failed", detail: manifest.dayZeroCorpus.detail } : manifest.dayZeroCorpus.status === "submitted" || manifest.dayZeroCorpus.status === "queued" ? { status: "indexing", detail: manifest.dayZeroCorpus.detail } : manifest.lanes.contextIndex;
4735
+ console.log(chalk.bold("\nActivation status:\n"));
4809
4736
  console.log(
4810
- chalk.dim(
4811
- ` Day-zero corpus: ${manifest.dayZeroCorpus.status} - ${manifest.dayZeroCorpus.detail}`
4812
- )
4813
- );
4814
- console.log(chalk.bold("\nActivation surface:\n"));
4815
- console.log(` Engine: ${manifest.surfaceContract.engine}`);
4816
- console.log(` Entry point: ${manifest.surfaceContract.entryPoint}`);
4817
- console.log(chalk.dim(` Role: ${manifest.surfaceContract.clientRole}`));
4818
- console.log(chalk.dim(` Next: ${manifest.surfaceContract.nextSurfaceAction}`));
4819
- console.log(chalk.bold("\nAgent readiness:\n"));
4820
- console.log(` ${manifest.agentReadiness.summary}`);
4821
- for (const finding of manifest.agentReadiness.stalenessFindings.slice(0, 3)) {
4822
- console.log(chalk.dim(` - ${finding.source}: ${finding.summary}`));
4823
- }
4824
- console.log(chalk.bold("\nContext economy:\n"));
4825
- console.log(
4826
- ` Estimated ${manifest.contextEconomy.estimatedRetrievedTokens.toLocaleString("en-US")} tokens retrieved instead of ${manifest.contextEconomy.rawWindowBaselineTokens.toLocaleString("en-US")} raw-window tokens.`
4827
- );
4828
- console.log(
4829
- chalk.dim(
4830
- ` Saved about ${manifest.contextEconomy.estimatedSavedTokens.toLocaleString("en-US")} tokens (${manifest.contextEconomy.savingsPercent}%). ${manifest.contextEconomy.note}`
4831
- )
4737
+ ` ${formatActivationStatus(manifest.lanes.connection.status)} Connected - ${manifest.lanes.connection.detail}`
4832
4738
  );
4739
+ console.log(` ${formatActivationStatus(contextLane.status)} Context - ${contextLane.detail}`);
4740
+ console.log(` ${chalk.dim("\u25CB pending")} First grounded answer`);
4741
+ console.log(chalk.yellow("\n Activation pending: first grounded answer needed."));
4833
4742
  console.log(
4834
4743
  chalk.dim(
4835
4744
  `
@@ -4840,12 +4749,7 @@ function printActivationSummary(manifest) {
4840
4749
  console.log(chalk.dim(` Initial handoff: ${manifest.artifacts.handoffPath}`));
4841
4750
  }
4842
4751
  if (manifest.artifacts.memoryCandidatesPath) {
4843
- console.log(chalk.dim(` Memory candidates: ${manifest.artifacts.memoryCandidatesPath}`));
4844
- }
4845
- if (manifest.mode === "starter") {
4846
- console.log(
4847
- chalk.dim(` Starter tour: ${BASE_URL}/demo#sixty-second-demo and ${BASE_URL}/dashboard`)
4848
- );
4752
+ console.log(chalk.dim(` Advanced details: ${manifest.artifacts.memoryCandidatesPath}`));
4849
4753
  }
4850
4754
  }
4851
4755
  function printSuccess(answers, report, activationManifest) {
@@ -4853,160 +4757,28 @@ function printSuccess(answers, report, activationManifest) {
4853
4757
  chalk.green(`
4854
4758
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
4855
4759
  \u2551 \u2551
4856
- \u2551 ${chalk.bold("\u2713 Setup Complete!")} \u2551
4760
+ \u2551 ${chalk.bold("\u2713 Connection Ready")} \u2551
4857
4761
  \u2551 \u2551
4858
4762
  \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
4859
4763
  `)
4860
4764
  );
4861
- console.log(chalk.bold("Installed profile:\n"));
4862
- console.log(` ${chalk.green("\u2713")} ${answers.profile}`);
4863
- printSetupVerdict(answers, report);
4864
- console.log(chalk.bold("\nWhat was installed:\n"));
4865
- if (answers.installMcp) {
4866
- console.log(
4867
- chalk.green(" \u2713 snipara-mcp") + chalk.dim(" - Local stdio compatibility package")
4868
- );
4869
- }
4870
- if (answers.installRuntime) {
4871
- console.log(
4872
- chalk.green(` \u2713 ${stripExtras(SANDBOX_PACKAGE_NAME)}`) + chalk.dim(" - Safe code execution")
4873
- );
4874
- }
4875
- if (answers.installOrchestrator) {
4876
- console.log(
4877
- chalk.green(` \u2713 ${ORCHESTRATOR_PACKAGE_NAME}`) + chalk.dim(" - Production gates, drift checks, and htask workflows")
4878
- );
4879
- }
4880
- if (answers.installCompanion) {
4881
- console.log(
4882
- chalk.green(` \u2713 ${COMPANION_PACKAGE_NAME}`) + chalk.dim(" - Local companion workflows and hook bootstrap")
4883
- );
4884
- }
4885
- if (answers.installHooks) {
4886
- console.log(chalk.green(" \u2713 hooks") + chalk.dim(" - Local session lifecycle scripts"));
4887
- }
4888
- if (answers.profile !== "runtime-only") {
4889
- console.log(chalk.green(" \u2713 .mcp.json") + chalk.dim(" - Hosted MCP config"));
4890
- }
4891
- if (answers.aiClient === "claude-code" && answers.profile !== "runtime-only") {
4892
- console.log(
4893
- chalk.green(" \u2713 Claude Code") + chalk.dim(" - .mcp.json MCP config, .claude/settings.json hooks when enabled")
4894
- );
4895
- }
4896
- if (answers.aiClient === "kimi" && answers.profile !== "runtime-only") {
4897
- console.log(
4898
- chalk.green(" \u2713 Kimi Code CLI") + chalk.dim(" - .kimi-code/mcp.json with environment-backed authentication")
4899
- );
4900
- }
4901
- console.log(
4902
- chalk.green(" \u2713 .snipara/companion") + chalk.dim(" - Doctor report and optional command references")
4903
- );
4765
+ console.log(` Profile: ${answers.profile}`);
4904
4766
  if (activationManifest) {
4905
4767
  printActivationSummary(activationManifest);
4906
4768
  }
4907
4769
  const failedChecks = report.checks.filter((check) => check.status === "fail");
4908
4770
  const warnedChecks = report.checks.filter((check) => check.status === "warn");
4909
- console.log(chalk.bold("\nNext steps:\n"));
4910
- let nextStep = 1;
4911
- const printNextStep = (message) => {
4912
- console.log(` ${nextStep}. ${message}`);
4913
- nextStep += 1;
4914
- };
4915
- printNextStep("Restart your AI client if you created or changed hosted MCP config.");
4916
- if (!answers.installCompanion && answers.profile !== "runtime-only") {
4917
- printNextStep(
4918
- "Ask your AI client for a first grounded answer using snipara_context_query before enabling local workflow helpers."
4919
- );
4920
- }
4921
- if (answers.aiClient === "claude-code") {
4922
- printNextStep(
4923
- "For Claude Code, start a new session and confirm Snipara appears in Settings -> MCP or ToolSearch."
4924
- );
4925
- printNextStep(
4926
- `If Snipara tools are missing, run: ${CREATE_SNIPARA_NPX_COMMAND} doctor --client claude-code`
4927
- );
4928
- }
4929
- if (answers.aiClient === "claude-desktop") {
4930
- printNextStep(
4931
- "For Claude Desktop, confirm the Snipara server appears in the desktop MCP settings after restart."
4932
- );
4933
- printNextStep(
4934
- `If Snipara tools are missing, run: ${CREATE_SNIPARA_NPX_COMMAND} doctor --client claude-desktop`
4935
- );
4936
- }
4937
- if (answers.aiClient === "kimi") {
4938
- printNextStep(
4939
- "For Kimi Code CLI, export SNIPARA_API_KEY before launch and run /mcp to verify the project-local server."
4940
- );
4941
- printNextStep(
4942
- `To enable Companion lifecycle hooks, run ${COMPANION_NPX_COMMAND} automations install --client kimi, review .kimi-code/snipara-plugin, then install it in Kimi with /plugins install .kimi-code/snipara-plugin.`
4943
- );
4944
- printNextStep(
4945
- "Keep manual approval for risky tools because Kimi hooks are fail-open and are not a standalone security boundary."
4946
- );
4947
- }
4948
- if (answers.aiClient === "codex") {
4949
- printNextStep(
4950
- "For Codex, merge .snipara/templates/codex-config.toml into ~/.codex/config.toml if the app does not read project .codex/config.toml."
4951
- );
4952
- printNextStep(
4953
- "Restart Codex after changing ~/.codex/config.toml so it rediscovers the hosted Snipara MCP tools."
4954
- );
4955
- printNextStep(
4956
- "If Codex shows only the lean Snipara tool set, that is expected. Use snipara_help(query=...) for routed guidance, confirm specialist opt-in surfaces with snipara_help(list_all=true), and request exact htask or swarm tools only when the workflow explicitly needs them."
4957
- );
4958
- printNextStep(
4959
- "If Codex still does not expose the hosted task-routing tools, prefer snipara-orchestrator swarm-* and htask-* for shared queue or multi-agent task work."
4960
- );
4961
- }
4962
- if (answers.aiClient === "mistral") {
4963
- printNextStep(
4964
- "For Mistral Le Chat, add .snipara/templates/mistral-le-chat-mcp.json as a Custom MCP Connector reference in Connectors."
4965
- );
4966
- printNextStep(
4967
- "For Mistral Vibe, keep .vibe/config.toml or ~/.vibe/config.toml on the generated SNIPARA_API_KEY-backed streamable-http server block, then restart Vibe."
4968
- );
4969
- printNextStep(
4970
- "For LangChain JavaScript, adapt .snipara/templates/mistral-langchain-tools.ts to bind Snipara recall, context_query, and settings tools to ChatMistralAI."
4971
- );
4972
- }
4973
- printNextStep(
4974
- `Run ${CREATE_SNIPARA_NPX_COMMAND} doctor anytime you want a fresh local validation report.`
4975
- );
4976
- if (answers.installCompanion) {
4977
- printNextStep("Open .snipara/companion/README.md for local commands and repair flow.");
4978
- printNextStep(
4979
- `${COMPANION_COMMAND_NAME} ${MIN_COMPANION_VERSION}+ is installed for low-latency local hooks.`
4980
- );
4981
- printNextStep(`Activate local source context now with: ${COMPANION_NPX_COMMAND} source init .`);
4982
- printNextStep(
4983
- `Use ${COMPANION_NPX_COMMAND} recall / query / plan / upload / task-commit for explicit local workflows and as a fallback when an AI client exposes only a partial MCP surface.`
4984
- );
4985
- printNextStep(
4986
- `For business folders, preview with: ${COMPANION_NPX_COMMAND} onboard-folder ./client-export --source-provider local_folder --write-manifest ./snipara-onboard.json`
4987
- );
4988
- printNextStep(
4989
- `Apply after review with: ${COMPANION_NPX_COMMAND} onboard-folder ./client-export --source-provider local_folder --apply`
4990
- );
4991
- } else if (answers.profile !== "runtime-only") {
4992
- printNextStep(
4993
- `Enable Companion, guards, managed workflows, and local folder helpers later with: ${CREATE_SNIPARA_NPX_COMMAND} repair --with-companion`
4994
- );
4995
- }
4996
- if (answers.installRuntime && !answers.runSandboxInit) {
4997
- printNextStep(
4998
- `Run ${SANDBOX_COMMAND_NAME} init when you want to choose sandbox/docker/local execution.`
4999
- );
5000
- }
5001
- if (answers.installOrchestrator) {
5002
- printNextStep(
5003
- `Use ${ORCHESTRATOR_COMMAND_NAME} explicitly for production proof gates, drift checks, or htask coordination.`
5004
- );
5005
- }
5006
- if (answers.githubRepo) {
5007
- printNextStep(
5008
- `Connect GitHub automation for ${answers.githubRepo.fullName} from the generated Snipara link.`
5009
- );
4771
+ console.log(chalk.bold("\nNext action:\n"));
4772
+ if (activationManifest) {
4773
+ console.log(" Restart your AI client or open a new agent session, then ask:");
4774
+ console.log(chalk.cyan(`
4775
+ "${activationManifest.dayZeroQuery.query}"
4776
+ `));
4777
+ console.log(chalk.dim(` If Snipara tools are missing: ${CREATE_SNIPARA_NPX_COMMAND} doctor`));
4778
+ } else if (answers.installRuntime && !answers.runSandboxInit) {
4779
+ console.log(` Run ${SANDBOX_COMMAND_NAME} init to choose an execution backend.`);
4780
+ } else {
4781
+ console.log(` Run ${CREATE_SNIPARA_NPX_COMMAND} doctor to verify the installation.`);
5010
4782
  }
5011
4783
  if (failedChecks.length > 0 || warnedChecks.length > 0) {
5012
4784
  console.log(chalk.bold("\nValidation summary:\n"));
@@ -5014,11 +4786,9 @@ function printSuccess(answers, report, activationManifest) {
5014
4786
  const symbol = check.status === "fail" ? chalk.red("\u2717") : chalk.yellow("!");
5015
4787
  console.log(` ${symbol} ${check.name}: ${check.detail}`);
5016
4788
  }
5017
- console.log(
5018
- chalk.dim(`
5019
- Run ${CREATE_SNIPARA_NPX_COMMAND} repair to rebuild local wiring.
5020
- `)
5021
- );
4789
+ console.log(chalk.dim(`
4790
+ Repair local wiring: ${CREATE_SNIPARA_NPX_COMMAND} repair
4791
+ `));
5022
4792
  } else {
5023
4793
  console.log(
5024
4794
  chalk.dim(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-snipara",
3
- "version": "2.0.14",
3
+ "version": "2.0.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",
@@ -10,7 +10,7 @@
10
10
  "scripts": {
11
11
  "build": "tsup src/index.ts --format esm --dts --clean",
12
12
  "dev": "tsup src/index.ts --format esm --watch",
13
- "prepublishOnly": "npm run build",
13
+ "prepack": "npm run build",
14
14
  "pretest": "pnpm build",
15
15
  "test": "node --test test/*.test.cjs",
16
16
  "pack:smoke": "bash ../../scripts/smoke-node-package.sh packages/create-snipara create-snipara create-snipara --help",