@devflow-tools/cli 0.16.24 → 0.16.26

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.
@@ -1 +1 @@
1
- {"version":3,"file":"with-server.d.ts","sourceRoot":"","sources":["../../src/lib/with-server.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAKjB,MAAM,oBAAoB,CAAC;AAI5B,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,UAAU,CAAC,CAAC,EAChC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,CAAC,CAAC,EAClD,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,IAAI,GAAE,iBAAsB,GAC3B,OAAO,CAAC,CAAC,CAAC,CA8BZ"}
1
+ {"version":3,"file":"with-server.d.ts","sourceRoot":"","sources":["../../src/lib/with-server.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAMjB,MAAM,oBAAoB,CAAC;AAI5B,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,UAAU,CAAC,CAAC,EAChC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,CAAC,CAAC,EAClD,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,IAAI,GAAE,iBAAsB,GAC3B,OAAO,CAAC,CAAC,CAAC,CA+BZ"}
@@ -1,9 +1,10 @@
1
1
  import chalk from "chalk";
2
- import { DevFlowApiClient, acquireRuntimeHttpCircuit, registerRuntimeHttpFailure, registerRuntimeHttpSuccess, resolveRuntimeEndpoint, } from "@devflow-tools/sdk";
2
+ import { DevFlowApiClient, acquireRuntimeHttpCircuit, getLocalApiKey, registerRuntimeHttpFailure, registerRuntimeHttpSuccess, resolveRuntimeEndpoint, } from "@devflow-tools/sdk";
3
3
  const pingCache = new Map();
4
4
  const PING_TTL_MS = 30_000;
5
5
  export async function withServer(projectRoot, serverFn, localFn, opts = {}) {
6
6
  const serverUrl = opts.serverUrl ?? resolveRuntimeEndpoint().url;
7
+ const apiKey = resolveApiKey(serverUrl);
7
8
  if (opts.skipServer) {
8
9
  return localFn();
9
10
  }
@@ -15,7 +16,7 @@ export async function withServer(projectRoot, serverFn, localFn, opts = {}) {
15
16
  else {
16
17
  const circuit = acquireRuntimeHttpCircuit(serverUrl, '/api/health');
17
18
  if (circuit.allowed) {
18
- const client = new DevFlowApiClient({ baseUrl: serverUrl, projectRoot });
19
+ const client = new DevFlowApiClient({ baseUrl: serverUrl, projectRoot, apiKey });
19
20
  reachable = await client.ping();
20
21
  if (reachable)
21
22
  registerRuntimeHttpSuccess(serverUrl, '/api/health');
@@ -25,10 +26,26 @@ export async function withServer(projectRoot, serverFn, localFn, opts = {}) {
25
26
  }
26
27
  }
27
28
  if (reachable) {
28
- const client = new DevFlowApiClient({ baseUrl: serverUrl, projectRoot });
29
+ const client = new DevFlowApiClient({ baseUrl: serverUrl, projectRoot, apiKey });
29
30
  return serverFn(client);
30
31
  }
31
32
  console.error(chalk.dim(" (server not running, using local engine — telemetry disabled)"));
32
33
  return localFn();
33
34
  }
35
+ function resolveApiKey(serverUrl) {
36
+ const explicit = process.env.DEVFLOW_API_KEY?.trim();
37
+ if (explicit)
38
+ return explicit;
39
+ try {
40
+ const hostname = new URL(serverUrl).hostname.toLocaleLowerCase('en-US');
41
+ if (hostname === 'localhost' || hostname === '127.0.0.1'
42
+ || hostname === '::1' || hostname === '[::1]') {
43
+ return getLocalApiKey();
44
+ }
45
+ }
46
+ catch {
47
+ // Invalid endpoints fall through to the existing local-engine fallback.
48
+ }
49
+ return undefined;
50
+ }
34
51
  //# sourceMappingURL=with-server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"with-server.js","sourceRoot":"","sources":["../../src/lib/with-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,MAAM,SAAS,GAAG,IAAI,GAAG,EAA2C,CAAC;AACrE,MAAM,WAAW,GAAG,MAAM,CAAC;AAO3B,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,WAAmB,EACnB,QAAkD,EAClD,OAAyB,EACzB,OAA0B,EAAE;IAE5B,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,sBAAsB,EAAE,CAAC,GAAG,CAAC;IAEjE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,OAAO,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,IAAI,SAAS,GAAG,KAAK,CAAC;IAEtB,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,MAAM,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,EAAE,GAAG,WAAW,EAAE,CAAC;QACnD,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5B,CAAC;SAAM,CAAC;QACN,MAAM,OAAO,GAAG,yBAAyB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QACpE,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,MAAM,GAAG,IAAI,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,CAAC;YACzE,SAAS,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAChC,IAAI,SAAS;gBAAE,0BAA0B,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;;gBAC/D,0BAA0B,CAAC,SAA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AAQ,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACxE,IAAI,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,WAAW;eACnD,QAAQ,KAAK,KAAK,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;YAChD,OAAO,cAAc,EAAE,CAAC;QAC1B,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,wEAAwE;IAC1E,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "devflow",
3
3
  "description": "DevFlow — Developer Intelligence Platform: project context, code graph, knowledge base, memory engine, and workflow automation with 14 domain plugins",
4
- "version": "0.16.24",
4
+ "version": "0.16.26",
5
5
  "author": {
6
6
  "name": "DevFlow"
7
7
  },
@@ -19,7 +19,7 @@
19
19
  "WebFetch"
20
20
  ],
21
21
  "source": "core",
22
- "sourceVersion": "0.16.24",
22
+ "sourceVersion": "0.16.26",
23
23
  "requiresContext": true,
24
24
  "evidenceMode": "mixed",
25
25
  "skillPath": "skills/devflow:context/SKILL.md"
@@ -38,7 +38,7 @@
38
38
  "Explore"
39
39
  ],
40
40
  "source": "core",
41
- "sourceVersion": "0.16.24",
41
+ "sourceVersion": "0.16.26",
42
42
  "requiresContext": true,
43
43
  "evidenceMode": "mixed",
44
44
  "skillPath": "skills/devflow:graph/SKILL.md"
@@ -52,7 +52,7 @@
52
52
  "WebFetch"
53
53
  ],
54
54
  "source": "core",
55
- "sourceVersion": "0.16.24",
55
+ "sourceVersion": "0.16.26",
56
56
  "requiresContext": true,
57
57
  "evidenceMode": "mixed",
58
58
  "skillPath": "skills/devflow:knowledge/SKILL.md"
@@ -71,7 +71,7 @@
71
71
  "Explore"
72
72
  ],
73
73
  "source": "core",
74
- "sourceVersion": "0.16.24",
74
+ "sourceVersion": "0.16.26",
75
75
  "requiresContext": true,
76
76
  "evidenceMode": "mixed",
77
77
  "skillPath": "skills/devflow:memory/SKILL.md"
@@ -82,7 +82,7 @@
82
82
  ],
83
83
  "blockedNative": [],
84
84
  "source": "core",
85
- "sourceVersion": "0.16.24",
85
+ "sourceVersion": "0.16.26",
86
86
  "requiresContext": true,
87
87
  "evidenceMode": "mixed",
88
88
  "skillPath": "skills/devflow:workflow/SKILL.md"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devflow-tools/claude-code-plugin",
3
- "version": "0.16.24",
3
+ "version": "0.16.26",
4
4
  "description": "DevFlow — Developer Intelligence Platform for Claude Code",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -8,21 +8,25 @@
8
8
  "verify:manifest": "npx tsx scripts/sync-plugin-manifest.ts --check",
9
9
  "build": "npm run sync:manifest && npx tsx scripts/inject-gates.ts",
10
10
  "deploy": "npm run sync:manifest && npx tsx scripts/inject-gates.ts --deploy",
11
- "prepack": "npm run verify:manifest"
11
+ "prepack": "npm run verify:manifest && npm run verify:runtime-dependencies",
12
+ "verify:runtime-dependencies": "npx tsx scripts/verify-runtime-dependencies.ts"
12
13
  },
13
14
  "dependencies": {
14
- "@devflow-tools/database": "0.16.24",
15
- "@devflow-tools/memory-engine": "0.16.24",
16
- "@devflow-tools/sdk": "0.16.24",
17
- "@devflow-tools/telemetry": "0.16.24",
18
- "@devflow-tools/workflow-engine": "0.16.24"
15
+ "@devflow-tools/benchmark": "0.16.26",
16
+ "@devflow-tools/context-engine": "0.16.26",
17
+ "@devflow-tools/database": "0.16.26",
18
+ "@devflow-tools/memory-engine": "0.16.26",
19
+ "@devflow-tools/sdk": "0.16.26",
20
+ "@devflow-tools/server": "0.16.26",
21
+ "@devflow-tools/telemetry": "0.16.26",
22
+ "@devflow-tools/workflow-engine": "0.16.26"
19
23
  },
20
24
  "allowScripts": {
21
25
  "better-sqlite3@12.11.1": true,
22
26
  "sharp@0.32.6": true
23
27
  },
24
28
  "devDependencies": {
25
- "@devflow-tools/mcp-server": "0.16.24"
29
+ "@devflow-tools/mcp-server": "0.16.26"
26
30
  },
27
31
  "keywords": [
28
32
  "pi-package",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devflow-tools/cli",
3
- "version": "0.16.24",
3
+ "version": "0.16.26",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -12,31 +12,31 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@colbymchenry/codegraph": "^1.1.1",
15
- "@devflow-tools/adapters": "0.16.24",
16
- "@devflow-tools/benchmark": "0.16.24",
17
- "@devflow-tools/context-engine": "0.16.24",
18
- "@devflow-tools/database": "0.16.24",
19
- "@devflow-tools/knowledge-engine": "0.16.24",
20
- "@devflow-tools/mcp-server": "0.16.24",
21
- "@devflow-tools/memory-engine": "0.16.24",
22
- "@devflow-tools/plugin-animation": "0.16.24",
23
- "@devflow-tools/plugin-css": "0.16.24",
24
- "@devflow-tools/plugin-docker": "0.16.24",
25
- "@devflow-tools/plugin-electron": "0.16.24",
26
- "@devflow-tools/plugin-git": "0.16.24",
27
- "@devflow-tools/plugin-graphql": "0.16.24",
28
- "@devflow-tools/plugin-nest": "0.16.24",
29
- "@devflow-tools/plugin-nextjs": "0.16.24",
30
- "@devflow-tools/plugin-performance": "0.16.24",
31
- "@devflow-tools/plugin-react": "0.16.24",
32
- "@devflow-tools/plugin-tailwind": "0.16.24",
33
- "@devflow-tools/plugin-taro": "0.16.24",
34
- "@devflow-tools/plugin-ui-layout": "0.16.24",
35
- "@devflow-tools/plugin-vue": "0.16.24",
36
- "@devflow-tools/sdk": "0.16.24",
37
- "@devflow-tools/server": "0.16.24",
38
- "@devflow-tools/telemetry": "0.16.24",
39
- "@devflow-tools/workflow-engine": "0.16.24",
15
+ "@devflow-tools/adapters": "0.16.26",
16
+ "@devflow-tools/benchmark": "0.16.26",
17
+ "@devflow-tools/context-engine": "0.16.26",
18
+ "@devflow-tools/database": "0.16.26",
19
+ "@devflow-tools/knowledge-engine": "0.16.26",
20
+ "@devflow-tools/mcp-server": "0.16.26",
21
+ "@devflow-tools/memory-engine": "0.16.26",
22
+ "@devflow-tools/plugin-animation": "0.16.26",
23
+ "@devflow-tools/plugin-css": "0.16.26",
24
+ "@devflow-tools/plugin-docker": "0.16.26",
25
+ "@devflow-tools/plugin-electron": "0.16.26",
26
+ "@devflow-tools/plugin-git": "0.16.26",
27
+ "@devflow-tools/plugin-graphql": "0.16.26",
28
+ "@devflow-tools/plugin-nest": "0.16.26",
29
+ "@devflow-tools/plugin-nextjs": "0.16.26",
30
+ "@devflow-tools/plugin-performance": "0.16.26",
31
+ "@devflow-tools/plugin-react": "0.16.26",
32
+ "@devflow-tools/plugin-tailwind": "0.16.26",
33
+ "@devflow-tools/plugin-taro": "0.16.26",
34
+ "@devflow-tools/plugin-ui-layout": "0.16.26",
35
+ "@devflow-tools/plugin-vue": "0.16.26",
36
+ "@devflow-tools/sdk": "0.16.26",
37
+ "@devflow-tools/server": "0.16.26",
38
+ "@devflow-tools/telemetry": "0.16.26",
39
+ "@devflow-tools/workflow-engine": "0.16.26",
40
40
  "@inquirer/prompts": "^7.10.1",
41
41
  "chalk": "^5.3.0",
42
42
  "commander": "^12.0.0"
@@ -49,5 +49,5 @@
49
49
  "dist",
50
50
  "bin"
51
51
  ],
52
- "gitHead": "b21cfa5fadfa43922e724b49156645504b88be34"
52
+ "gitHead": "1972fd3dc463e84c5fb7c28de527494d8a903653"
53
53
  }