create-snipara 1.3.33 → 1.3.35

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 (2) hide show
  1. package/dist/index.js +21 -9
  2. package/package.json +1 -1
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: "1.3.33",
16
+ version: "1.3.35",
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",
@@ -1230,8 +1230,7 @@ Agent task lifecycle:
1230
1230
  8. Use \`snipara_plan\` or \`snipara_decompose\` only for FULL-mode work and only
1231
1231
  when the hosted server exposes them.
1232
1232
  9. When the LLM has produced a visible multi-phase plan and \`snipara-companion\`
1233
- is installed, run \`snipara-companion workflow start --goal "<goal>" --plan-file
1234
- <plan_file>\`, then use \`workflow phase-start\`, \`workflow phase-commit\`,
1233
+ is installed, run \`snipara-companion workflow start --goal "<goal>" --plan-file <plan_file>\`, then use \`workflow phase-start\`, \`workflow phase-commit\`,
1235
1234
  \`workflow resume\`, and \`final-commit\` so compaction cannot lose the next
1236
1235
  phase.
1237
1236
  10. Use local file reads, \`rg\`, git commands, and test commands for exact edits,
@@ -1641,18 +1640,31 @@ async function createCompanionConfig(answers) {
1641
1640
  }
1642
1641
  const configDir = path.join(process.cwd(), ".snipara", "companion");
1643
1642
  const configPath = path.join(configDir, "config.json");
1643
+ const globalConfigPath = getGlobalCompanionConfigPath();
1644
1644
  fs.mkdirSync(configDir, { recursive: true });
1645
+ fs.mkdirSync(path.dirname(globalConfigPath), { recursive: true });
1646
+ const existingGlobalConfig = readCompanionConfigFile(globalConfigPath);
1645
1647
  const existingWorkspaceConfig = readCompanionConfigFile(configPath);
1646
- const workspaceConfig = {
1647
- ...existingWorkspaceConfig,
1648
+ const globalConfig = {
1649
+ ...existingGlobalConfig,
1648
1650
  apiKey: answers.apiKey,
1649
- apiUrl: API_URL,
1650
- projectId: answers.projectId || answers.projectSlug,
1651
+ apiUrl: API_URL
1652
+ };
1653
+ const workspaceConfig = {
1654
+ projectId: answers.projectSlug,
1651
1655
  sessionId: typeof existingWorkspaceConfig.sessionId === "string" && existingWorkspaceConfig.sessionId ? existingWorkspaceConfig.sessionId : `sess_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`
1652
1656
  };
1657
+ fs.writeFileSync(globalConfigPath, JSON.stringify(globalConfig, null, 2) + "\n");
1653
1658
  fs.writeFileSync(configPath, JSON.stringify(workspaceConfig, null, 2) + "\n");
1654
- ensureGitignoreEntry(".snipara/companion/config.json", "# Snipara local companion config");
1655
- console.log(chalk.green(" \u2713 Configured local companion config"));
1659
+ ensureGitignoreEntry(
1660
+ ".snipara/companion/config.json",
1661
+ "# Snipara local companion workspace config"
1662
+ );
1663
+ console.log(chalk.green(" \u2713 Configured global companion auth"));
1664
+ console.log(chalk.green(" \u2713 Configured local companion workspace"));
1665
+ }
1666
+ function getGlobalCompanionConfigPath() {
1667
+ return path.join(homedir(), ".rlmsaas", "config.json");
1656
1668
  }
1657
1669
  function readCompanionConfigFile(filePath) {
1658
1670
  if (!fs.existsSync(filePath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-snipara",
3
- "version": "1.3.33",
3
+ "version": "1.3.35",
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",