@flowrail/init 0.0.9 → 0.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/dist/index.js CHANGED
File without changes
package/dist/init.js CHANGED
@@ -28,6 +28,7 @@
28
28
  */
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.runInit = runInit;
31
+ const app_instance_1 = require("./app-instance");
31
32
  const claude_settings_1 = require("./claude-settings");
32
33
  const connectivity_1 = require("./connectivity");
33
34
  const doctor_script_1 = require("./doctor-script");
@@ -114,6 +115,26 @@ async function runInit(options = {}) {
114
115
  fetcher: options.connectivityFetcher,
115
116
  });
116
117
  log('✓ connectivity check passed');
118
+ // ADR-019 M0': mint-if-absent app-instance identity + registration.
119
+ // Runs after connectivity (the register call needs the server) and is
120
+ // fail-soft — ensureAppInstance itself degrades to a local-only mint
121
+ // on any registration failure, and this belt-and-suspenders catch
122
+ // covers unexpected throws (e.g. an unwritable .flowrail/).
123
+ try {
124
+ const rebind = argv.includes('--rebind') || env['FLOWRAIL_APP_REBIND'] === '1';
125
+ const appResult = await (0, app_instance_1.ensureAppInstance)({
126
+ projectRoot,
127
+ mcpBaseUrl,
128
+ apiKey,
129
+ rebind,
130
+ log,
131
+ registerApp: options.appRegistrar,
132
+ });
133
+ log(`✓ app instance ${appResult.appInstanceId} (${appResult.status}) — .flowrail/app.json`);
134
+ }
135
+ catch (err) {
136
+ log(`FlowRail: app-instance identity step failed (${messageForError(err)}); continuing.`);
137
+ }
117
138
  if (!noScan) {
118
139
  log('→ scanning your existing dependencies for known CVEs…');
119
140
  const scanner = options.repoScanner ?? repo_scan_trigger_1.defaultRepoScanner;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowrail/init",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "One-shot FlowRail installer for Claude Code. Wires PreToolUse hooks, MCP server config, and skill markdown into a tester's repo, then probes the FlowRail server with their bearer.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -31,7 +31,7 @@
31
31
  "prepublishOnly": "npm run build && npm test"
32
32
  },
33
33
  "dependencies": {
34
- "@flowrail/skills": "0.0.4"
34
+ "@flowrail/skills": "0.0.5"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/jest": "^29.5.12",