@devflow-tools/cli 0.16.25 → 0.16.27
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/lib/with-server.d.ts.map +1 -1
- package/dist/lib/with-server.js +20 -3
- package/dist/lib/with-server.js.map +1 -1
- package/dist/plugin-files/.claude-plugin/plugin.json +1 -1
- package/dist/plugin-files/dist/command-registry.json +5 -5
- package/dist/plugin-files/dist/hooks/hook-daemon.js +21 -21
- package/dist/plugin-files/dist/hooks/session-end.js +4 -4
- package/dist/plugin-files/dist/hooks/user-prompt-submit.js +3 -3
- package/dist/plugin-files/package.json +10 -10
- package/package.json +27 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-server.d.ts","sourceRoot":"","sources":["../../src/lib/with-server.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,
|
|
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"}
|
package/dist/lib/with-server.js
CHANGED
|
@@ -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;
|
|
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,cAAc,EACd,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,E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AQ,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,iEAAiE,CAAC,CAAC,CAAC;IAC5F,OAAO,OAAO,EAAE,CAAC;AACnB,CAAC;AAED,SAAS,aAAa,CAAC,SAAiB;IACtC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,IAAI,EAAE,CAAC;IACrD,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAC9B,IAAI,CAAC;QACH,MAAM,QAAQ,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.
|
|
4
|
+
"version": "0.16.27",
|
|
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.
|
|
22
|
+
"sourceVersion": "0.16.27",
|
|
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.
|
|
41
|
+
"sourceVersion": "0.16.27",
|
|
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.
|
|
55
|
+
"sourceVersion": "0.16.27",
|
|
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.
|
|
74
|
+
"sourceVersion": "0.16.27",
|
|
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.
|
|
85
|
+
"sourceVersion": "0.16.27",
|
|
86
86
|
"requiresContext": true,
|
|
87
87
|
"evidenceMode": "mixed",
|
|
88
88
|
"skillPath": "skills/devflow:workflow/SKILL.md"
|