@intutic/cli 2.2.0 → 2.4.0
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/README.md +8 -8
- package/dist/cli.d.ts +0 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +582 -21
- package/dist/cli.js.map +1 -1
- package/dist/commands/apiCommand.d.ts +40 -0
- package/dist/commands/apiCommand.d.ts.map +1 -0
- package/dist/commands/apiCommand.js +88 -0
- package/dist/commands/apiCommand.js.map +1 -0
- package/dist/commands/budget.d.ts +4 -0
- package/dist/commands/budget.d.ts.map +1 -1
- package/dist/commands/budget.js +8 -0
- package/dist/commands/budget.js.map +1 -1
- package/dist/commands/budgetLimits.d.ts +70 -0
- package/dist/commands/budgetLimits.d.ts.map +1 -0
- package/dist/commands/budgetLimits.js +223 -0
- package/dist/commands/budgetLimits.js.map +1 -0
- package/dist/commands/compliance.d.ts +122 -0
- package/dist/commands/compliance.d.ts.map +1 -0
- package/dist/commands/compliance.js +278 -0
- package/dist/commands/compliance.js.map +1 -0
- package/dist/commands/connect.d.ts +26 -1
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +109 -51
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/credentials.d.ts +6 -2
- package/dist/commands/credentials.d.ts.map +1 -1
- package/dist/commands/credentials.js +99 -10
- package/dist/commands/credentials.js.map +1 -1
- package/dist/commands/decision.d.ts +4 -4
- package/dist/commands/decision.js +4 -4
- package/dist/commands/disconnect.d.ts +4 -0
- package/dist/commands/disconnect.d.ts.map +1 -1
- package/dist/commands/disconnect.js +17 -3
- package/dist/commands/disconnect.js.map +1 -1
- package/dist/commands/doctor.d.ts +0 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +0 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/enforce.d.ts +1 -1
- package/dist/commands/enforce.js +1 -1
- package/dist/commands/enterprise.d.ts +3 -2
- package/dist/commands/enterprise.d.ts.map +1 -1
- package/dist/commands/enterprise.js +11 -3
- package/dist/commands/enterprise.js.map +1 -1
- package/dist/commands/env.js +1 -1
- package/dist/commands/exec.d.ts +2 -3
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/exec.js +4 -5
- package/dist/commands/exec.js.map +1 -1
- package/dist/commands/gateLiveness.d.ts +15 -0
- package/dist/commands/gateLiveness.d.ts.map +1 -0
- package/dist/commands/gateLiveness.js +34 -0
- package/dist/commands/gateLiveness.js.map +1 -0
- package/dist/commands/gateway.d.ts +14 -4
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +34 -4
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/github.d.ts +20 -0
- package/dist/commands/github.d.ts.map +1 -0
- package/dist/commands/github.js +41 -0
- package/dist/commands/github.js.map +1 -0
- package/dist/commands/guardrails.d.ts +28 -2
- package/dist/commands/guardrails.d.ts.map +1 -1
- package/dist/commands/guardrails.js +233 -24
- package/dist/commands/guardrails.js.map +1 -1
- package/dist/commands/incidents.d.ts +32 -0
- package/dist/commands/incidents.d.ts.map +1 -0
- package/dist/commands/incidents.js +94 -0
- package/dist/commands/incidents.js.map +1 -0
- package/dist/commands/init.d.ts +1 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install-daemon.d.ts +1 -1
- package/dist/commands/install-daemon.js +2 -2
- package/dist/commands/integrity.d.ts +10 -2
- package/dist/commands/integrity.d.ts.map +1 -1
- package/dist/commands/integrity.js +3 -3
- package/dist/commands/integrity.js.map +1 -1
- package/dist/commands/inventory.d.ts +60 -0
- package/dist/commands/inventory.d.ts.map +1 -0
- package/dist/commands/inventory.js +141 -0
- package/dist/commands/inventory.js.map +1 -0
- package/dist/commands/judge.d.ts +1 -1
- package/dist/commands/judge.js +2 -2
- package/dist/commands/judge.js.map +1 -1
- package/dist/commands/login.d.ts +0 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +0 -1
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.d.ts +0 -1
- package/dist/commands/logout.d.ts.map +1 -1
- package/dist/commands/logout.js +0 -1
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/mcp.d.ts +31 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +65 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/notifications.d.ts +54 -0
- package/dist/commands/notifications.d.ts.map +1 -0
- package/dist/commands/notifications.js +151 -0
- package/dist/commands/notifications.js.map +1 -0
- package/dist/commands/org.d.ts +3 -3
- package/dist/commands/org.js +3 -3
- package/dist/commands/policy.d.ts +6 -1
- package/dist/commands/policy.d.ts.map +1 -1
- package/dist/commands/policy.js +77 -37
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/rollback.d.ts.map +1 -1
- package/dist/commands/rollback.js +3 -1
- package/dist/commands/rollback.js.map +1 -1
- package/dist/commands/routing.d.ts +1 -1
- package/dist/commands/routing.js +1 -1
- package/dist/commands/rules.d.ts +74 -0
- package/dist/commands/rules.d.ts.map +1 -0
- package/dist/commands/rules.js +283 -0
- package/dist/commands/rules.js.map +1 -0
- package/dist/commands/settings.d.ts +44 -0
- package/dist/commands/settings.d.ts.map +1 -0
- package/dist/commands/settings.js +110 -0
- package/dist/commands/settings.js.map +1 -0
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.js +1 -1
- package/dist/commands/siem.d.ts +53 -0
- package/dist/commands/siem.d.ts.map +1 -0
- package/dist/commands/siem.js +132 -0
- package/dist/commands/siem.js.map +1 -0
- package/dist/commands/skill.d.ts +5 -5
- package/dist/commands/skill.js +7 -7
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/status.d.ts +0 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +2 -3
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/syncContext.d.ts +0 -1
- package/dist/commands/syncContext.d.ts.map +1 -1
- package/dist/commands/syncContext.js +0 -1
- package/dist/commands/syncContext.js.map +1 -1
- package/dist/commands/team.d.ts +2 -2
- package/dist/commands/team.js +2 -2
- package/dist/commands/traces.d.ts +0 -3
- package/dist/commands/traces.d.ts.map +1 -1
- package/dist/commands/traces.js +0 -3
- package/dist/commands/traces.js.map +1 -1
- package/dist/commands/usage.d.ts +41 -0
- package/dist/commands/usage.d.ts.map +1 -0
- package/dist/commands/usage.js +129 -0
- package/dist/commands/usage.js.map +1 -0
- package/dist/commands/whoami.d.ts +0 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +0 -1
- package/dist/commands/whoami.js.map +1 -1
- package/dist/config/keychain.d.ts +0 -1
- package/dist/config/keychain.d.ts.map +1 -1
- package/dist/config/keychain.js +0 -1
- package/dist/config/keychain.js.map +1 -1
- package/dist/config/paths.d.ts +0 -1
- package/dist/config/paths.d.ts.map +1 -1
- package/dist/config/paths.js +0 -1
- package/dist/config/paths.js.map +1 -1
- package/dist/config/store.d.ts +0 -1
- package/dist/config/store.d.ts.map +1 -1
- package/dist/config/store.js +0 -1
- package/dist/config/store.js.map +1 -1
- package/dist/harness/ag2.d.ts +1 -1
- package/dist/harness/ag2.js +1 -1
- package/dist/harness/agentFramework.d.ts +1 -1
- package/dist/harness/agentFramework.js +1 -1
- package/dist/harness/agenticOrchestrator.d.ts +1 -1
- package/dist/harness/agenticOrchestrator.js +2 -2
- package/dist/harness/agenticOrchestrator.js.map +1 -1
- package/dist/harness/agentsMd.d.ts +24 -0
- package/dist/harness/agentsMd.d.ts.map +1 -0
- package/dist/harness/agentsMd.js +28 -0
- package/dist/harness/agentsMd.js.map +1 -0
- package/dist/harness/aider.d.ts +3 -1
- package/dist/harness/aider.d.ts.map +1 -1
- package/dist/harness/aider.js +9 -7
- package/dist/harness/aider.js.map +1 -1
- package/dist/harness/antigravity.d.ts +23 -5
- package/dist/harness/antigravity.d.ts.map +1 -1
- package/dist/harness/antigravity.js +45 -55
- package/dist/harness/antigravity.js.map +1 -1
- package/dist/harness/autogen.d.ts +1 -1
- package/dist/harness/autogen.js +2 -2
- package/dist/harness/autogen.js.map +1 -1
- package/dist/harness/claudeCode.d.ts +22 -1
- package/dist/harness/claudeCode.d.ts.map +1 -1
- package/dist/harness/claudeCode.js +47 -3
- package/dist/harness/claudeCode.js.map +1 -1
- package/dist/harness/cline.d.ts.map +1 -1
- package/dist/harness/cline.js +14 -23
- package/dist/harness/cline.js.map +1 -1
- package/dist/harness/codex.d.ts +6 -1
- package/dist/harness/codex.d.ts.map +1 -1
- package/dist/harness/codex.js +23 -21
- package/dist/harness/codex.js.map +1 -1
- package/dist/harness/continue.d.ts +10 -4
- package/dist/harness/continue.d.ts.map +1 -1
- package/dist/harness/continue.js +22 -22
- package/dist/harness/continue.js.map +1 -1
- package/dist/harness/cursor.d.ts +5 -2
- package/dist/harness/cursor.d.ts.map +1 -1
- package/dist/harness/cursor.js +19 -23
- package/dist/harness/cursor.js.map +1 -1
- package/dist/harness/detector.d.ts +0 -1
- package/dist/harness/detector.d.ts.map +1 -1
- package/dist/harness/detector.js +0 -1
- package/dist/harness/detector.js.map +1 -1
- package/dist/harness/dsh.d.ts +5 -3
- package/dist/harness/dsh.d.ts.map +1 -1
- package/dist/harness/dsh.js +17 -29
- package/dist/harness/dsh.js.map +1 -1
- package/dist/harness/eve.d.ts +3 -4
- package/dist/harness/eve.d.ts.map +1 -1
- package/dist/harness/eve.js +3 -4
- package/dist/harness/eve.js.map +1 -1
- package/dist/harness/githubCopilot.d.ts +4 -1
- package/dist/harness/githubCopilot.d.ts.map +1 -1
- package/dist/harness/githubCopilot.js +12 -20
- package/dist/harness/githubCopilot.js.map +1 -1
- package/dist/harness/goose.d.ts +7 -3
- package/dist/harness/goose.d.ts.map +1 -1
- package/dist/harness/goose.js +18 -21
- package/dist/harness/goose.js.map +1 -1
- package/dist/harness/grok.d.ts +2 -2
- package/dist/harness/grok.d.ts.map +1 -1
- package/dist/harness/grok.js +13 -24
- package/dist/harness/grok.js.map +1 -1
- package/dist/harness/hermes.d.ts +6 -0
- package/dist/harness/hermes.d.ts.map +1 -1
- package/dist/harness/hermes.js +17 -16
- package/dist/harness/hermes.js.map +1 -1
- package/dist/harness/muse.d.ts +3 -7
- package/dist/harness/muse.d.ts.map +1 -1
- package/dist/harness/muse.js +15 -35
- package/dist/harness/muse.js.map +1 -1
- package/dist/harness/n8n.d.ts +13 -14
- package/dist/harness/n8n.d.ts.map +1 -1
- package/dist/harness/n8n.js +21 -181
- package/dist/harness/n8n.js.map +1 -1
- package/dist/harness/openWebUI.d.ts.map +1 -1
- package/dist/harness/openWebUI.js +5 -4
- package/dist/harness/openWebUI.js.map +1 -1
- package/dist/harness/openaiAgents.d.ts +1 -1
- package/dist/harness/openaiAgents.js +2 -2
- package/dist/harness/openaiAgents.js.map +1 -1
- package/dist/harness/openclaw.d.ts +8 -0
- package/dist/harness/openclaw.d.ts.map +1 -1
- package/dist/harness/openclaw.js +27 -12
- package/dist/harness/openclaw.js.map +1 -1
- package/dist/harness/opencode.d.ts +4 -5
- package/dist/harness/opencode.d.ts.map +1 -1
- package/dist/harness/opencode.js +15 -30
- package/dist/harness/opencode.js.map +1 -1
- package/dist/harness/openhands.d.ts +9 -3
- package/dist/harness/openhands.d.ts.map +1 -1
- package/dist/harness/openhands.js +30 -24
- package/dist/harness/openhands.js.map +1 -1
- package/dist/harness/pi.d.ts +7 -2
- package/dist/harness/pi.d.ts.map +1 -1
- package/dist/harness/pi.js +19 -18
- package/dist/harness/pi.js.map +1 -1
- package/dist/harness/rooCode.d.ts +12 -5
- package/dist/harness/rooCode.d.ts.map +1 -1
- package/dist/harness/rooCode.js +23 -39
- package/dist/harness/rooCode.js.map +1 -1
- package/dist/harness/rulesFiles.d.ts +53 -0
- package/dist/harness/rulesFiles.d.ts.map +1 -0
- package/dist/harness/rulesFiles.js +106 -0
- package/dist/harness/rulesFiles.js.map +1 -0
- package/dist/harness/smolagents.d.ts +2 -2
- package/dist/harness/smolagents.js +3 -3
- package/dist/harness/smolagents.js.map +1 -1
- package/dist/harness/types.d.ts +20 -6
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/harness/types.js +1 -95
- package/dist/harness/types.js.map +1 -1
- package/dist/harness/windsurf.d.ts +6 -1
- package/dist/harness/windsurf.d.ts.map +1 -1
- package/dist/harness/windsurf.js +21 -24
- package/dist/harness/windsurf.js.map +1 -1
- package/dist/harness/xirp.d.ts +1 -2
- package/dist/harness/xirp.d.ts.map +1 -1
- package/dist/harness/xirp.js +2 -3
- package/dist/harness/xirp.js.map +1 -1
- package/dist/lib/api.d.ts +27 -1
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +55 -18
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/ciscoScanner.d.ts +1 -1
- package/dist/lib/ciscoScanner.js +1 -1
- package/dist/lib/decisionsLogRefresh.d.ts.map +1 -1
- package/dist/lib/decisionsLogRefresh.js +6 -7
- package/dist/lib/decisionsLogRefresh.js.map +1 -1
- package/dist/lib/deviceReport.d.ts +15 -0
- package/dist/lib/deviceReport.d.ts.map +1 -1
- package/dist/lib/deviceReport.js +30 -0
- package/dist/lib/deviceReport.js.map +1 -1
- package/dist/lib/gitHooks.d.ts +0 -1
- package/dist/lib/gitHooks.d.ts.map +1 -1
- package/dist/lib/gitHooks.js +8 -9
- package/dist/lib/gitHooks.js.map +1 -1
- package/dist/lib/gracefulShutdown.d.ts +1 -1
- package/dist/lib/gracefulShutdown.js +1 -1
- package/dist/lib/hash.d.ts +0 -1
- package/dist/lib/hash.d.ts.map +1 -1
- package/dist/lib/hash.js +0 -1
- package/dist/lib/hash.js.map +1 -1
- package/dist/lib/inventory.d.ts +47 -0
- package/dist/lib/inventory.d.ts.map +1 -0
- package/dist/lib/inventory.js +106 -0
- package/dist/lib/inventory.js.map +1 -0
- package/dist/lib/logger.d.ts +0 -1
- package/dist/lib/logger.d.ts.map +1 -1
- package/dist/lib/logger.js +0 -1
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/mdmManifest.d.ts +30 -2
- package/dist/lib/mdmManifest.d.ts.map +1 -1
- package/dist/lib/mdmManifest.js +50 -2
- package/dist/lib/mdmManifest.js.map +1 -1
- package/dist/lib/onboarding.d.ts +0 -1
- package/dist/lib/onboarding.d.ts.map +1 -1
- package/dist/lib/onboarding.js +1 -2
- package/dist/lib/onboarding.js.map +1 -1
- package/dist/lib/policySnapshot.d.ts +3 -2
- package/dist/lib/policySnapshot.d.ts.map +1 -1
- package/dist/lib/policySnapshot.js +6 -3
- package/dist/lib/policySnapshot.js.map +1 -1
- package/dist/lib/process.d.ts +5 -1
- package/dist/lib/process.d.ts.map +1 -1
- package/dist/lib/process.js +13 -4
- package/dist/lib/process.js.map +1 -1
- package/dist/lib/providerProbe.d.ts +3 -3
- package/dist/lib/providerProbe.d.ts.map +1 -1
- package/dist/lib/providerProbe.js +15 -7
- package/dist/lib/providerProbe.js.map +1 -1
- package/dist/lib/sandbox/firecracker.d.ts +3 -3
- package/dist/lib/sandbox/firecracker.js +3 -3
- package/dist/lib/sandbox/index.d.ts +2 -2
- package/dist/lib/sandbox/index.js +2 -2
- package/dist/lib/sandbox/oci.d.ts +1 -1
- package/dist/lib/sandbox/oci.js +1 -1
- package/dist/lib/sandbox/types.d.ts +1 -1
- package/dist/lib/sandbox/types.js +1 -1
- package/dist/lib/sopFrontMatter.d.ts +1 -1
- package/dist/lib/sopFrontMatter.js +1 -1
- package/package.json +6 -5
- package/resources/sandbox/Dockerfile +1 -1
- package/resources/sandbox/entrypoint.sh +4 -4
- package/resources/sandbox/firecracker-launch.sh +1 -1
- package/dist/harness/base.d.ts +0 -24
- package/dist/harness/base.d.ts.map +0 -1
- package/dist/harness/base.js +0 -74
- package/dist/harness/base.js.map +0 -1
package/dist/lib/api.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Uses native fetch() (Node 18+). All requests include
|
|
5
5
|
* Authorization: Bearer <apiKey> header.
|
|
6
6
|
*
|
|
7
|
-
* LLD #8 — Sync Daemon / CLI
|
|
8
7
|
* @module
|
|
9
8
|
*/
|
|
10
9
|
import { toonDecode as sharedToonDecode } from '@intutic/shared-types';
|
|
@@ -15,6 +14,24 @@ import { injectTraceHeaders } from './otelPropagation.js';
|
|
|
15
14
|
* @param controlPlaneUrl - Base URL (e.g., http://localhost:3001 or https://api.intutic.ai)
|
|
16
15
|
* @param apiKey - API key (vk_*) or JWT access token
|
|
17
16
|
*/
|
|
17
|
+
/**
|
|
18
|
+
* The error a failed call throws. A 403 carries the server's `detail` when it
|
|
19
|
+
* gives one (a role guard names the roles that may make the call), so a member
|
|
20
|
+
* whose role cannot do something is told which role can, not shown raw JSON.
|
|
21
|
+
*/
|
|
22
|
+
export function apiFailure(method, path, status, text) {
|
|
23
|
+
if (status === 403) {
|
|
24
|
+
try {
|
|
25
|
+
const body = JSON.parse(text);
|
|
26
|
+
if (typeof body.detail === 'string')
|
|
27
|
+
return new Error(`API ${method} ${path} refused (403): ${body.detail}`);
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// Not JSON: fall through to the raw text.
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return new Error(`API ${method} ${path} failed (${status}): ${text}`);
|
|
34
|
+
}
|
|
18
35
|
export function createApiClient(controlPlaneUrl, apiKey) {
|
|
19
36
|
const baseHeaders = {
|
|
20
37
|
'Content-Type': 'application/json',
|
|
@@ -33,10 +50,29 @@ export function createApiClient(controlPlaneUrl, apiKey) {
|
|
|
33
50
|
});
|
|
34
51
|
if (!res.ok) {
|
|
35
52
|
const text = await res.text().catch(() => 'Unknown error');
|
|
36
|
-
throw
|
|
53
|
+
throw apiFailure(method, path, res.status, text);
|
|
37
54
|
}
|
|
38
55
|
return unwrapToonEnvelope(await res.json());
|
|
39
56
|
}
|
|
57
|
+
/** A JSON request whose non-2xx answer is returned, not thrown; a body that is not JSON comes back as `{ error: text }`. */
|
|
58
|
+
async function withStatus(method, path, body) {
|
|
59
|
+
const headers = { ...baseHeaders };
|
|
60
|
+
injectTraceHeaders(headers);
|
|
61
|
+
const res = await fetch(`${controlPlaneUrl}${path}`, {
|
|
62
|
+
method,
|
|
63
|
+
headers,
|
|
64
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
65
|
+
});
|
|
66
|
+
const text = await res.text();
|
|
67
|
+
let parsed;
|
|
68
|
+
try {
|
|
69
|
+
parsed = JSON.parse(text);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
parsed = { error: text };
|
|
73
|
+
}
|
|
74
|
+
return { status: res.status, body: unwrapToonEnvelope(parsed) };
|
|
75
|
+
}
|
|
40
76
|
return {
|
|
41
77
|
async fetchConfig(workspaceId) {
|
|
42
78
|
return request('POST', '/api/v1/sync/config', { workspaceId });
|
|
@@ -72,26 +108,27 @@ export function createApiClient(controlPlaneUrl, apiKey) {
|
|
|
72
108
|
}
|
|
73
109
|
return { status: res.status, body: body };
|
|
74
110
|
},
|
|
111
|
+
async getFile(path) {
|
|
112
|
+
const headers = { Authorization: baseHeaders.Authorization };
|
|
113
|
+
injectTraceHeaders(headers);
|
|
114
|
+
const res = await fetch(`${controlPlaneUrl}${path}`, { method: 'GET', headers });
|
|
115
|
+
if (!res.ok) {
|
|
116
|
+
const text = await res.text().catch(() => 'Unknown error');
|
|
117
|
+
throw apiFailure('GET', path, res.status, text);
|
|
118
|
+
}
|
|
119
|
+
return new Uint8Array(await res.arrayBuffer());
|
|
120
|
+
},
|
|
75
121
|
async post(path, body) {
|
|
76
122
|
return request('POST', path, body);
|
|
77
123
|
},
|
|
78
124
|
async postWithStatus(path, body) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const text = await res.text();
|
|
87
|
-
let parsed;
|
|
88
|
-
try {
|
|
89
|
-
parsed = JSON.parse(text);
|
|
90
|
-
}
|
|
91
|
-
catch {
|
|
92
|
-
parsed = { error: text };
|
|
93
|
-
}
|
|
94
|
-
return { status: res.status, body: unwrapToonEnvelope(parsed) };
|
|
125
|
+
return withStatus('POST', path, body);
|
|
126
|
+
},
|
|
127
|
+
async putWithStatus(path, body) {
|
|
128
|
+
return withStatus('PUT', path, body);
|
|
129
|
+
},
|
|
130
|
+
async delWithStatus(path) {
|
|
131
|
+
return withStatus('DELETE', path);
|
|
95
132
|
},
|
|
96
133
|
async postForm(path, form) {
|
|
97
134
|
const headers = { Authorization: baseHeaders.Authorization };
|
package/dist/lib/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/lib/api.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/lib/api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AA8DzD;;;;;GAKG;AACH;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,IAAY,EAAE,MAAc,EAAE,IAAY;IACnF,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAyB,CAAA;YACrD,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;gBAAE,OAAO,IAAI,KAAK,CAAC,OAAO,MAAM,IAAI,IAAI,mBAAmB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;QAC9G,CAAC;QAAC,MAAM,CAAC;YACP,0CAA0C;QAC5C,CAAC;IACH,CAAC;IACD,OAAO,IAAI,KAAK,CAAC,OAAO,MAAM,IAAI,IAAI,YAAY,MAAM,MAAM,IAAI,EAAE,CAAC,CAAA;AACvE,CAAC;AAED,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5
5
|
* command-pipeline taint analysis, and (with `--use-behavioral`) full
|
|
6
6
|
* AST/dataflow analysis of skill content — genuinely deeper than this
|
|
7
7
|
* codebase's own regex-genre scanning (`packages/shared-types/src/scriptScan.ts`,
|
|
8
|
-
* Phase S2).
|
|
8
|
+
* Phase S2). This integration is the
|
|
9
9
|
* follow-up to that phase's deliberately-scoped pattern matching.
|
|
10
10
|
*
|
|
11
11
|
* # Why a shell-out, not a dependency
|
package/dist/lib/ciscoScanner.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* command-pipeline taint analysis, and (with `--use-behavioral`) full
|
|
6
6
|
* AST/dataflow analysis of skill content — genuinely deeper than this
|
|
7
7
|
* codebase's own regex-genre scanning (`packages/shared-types/src/scriptScan.ts`,
|
|
8
|
-
* Phase S2).
|
|
8
|
+
* Phase S2). This integration is the
|
|
9
9
|
* follow-up to that phase's deliberately-scoped pattern matching.
|
|
10
10
|
*
|
|
11
11
|
* # Why a shell-out, not a dependency
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decisionsLogRefresh.d.ts","sourceRoot":"","sources":["../../src/lib/decisionsLogRefresh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"decisionsLogRefresh.d.ts","sourceRoot":"","sources":["../../src/lib/decisionsLogRefresh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CA2BnG"}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { loadCredentials } from '../config/store.js';
|
|
15
15
|
import { createApiClient } from './api.js';
|
|
16
|
-
import { refreshDecisionsDigest } from '@intutic/sync-daemon';
|
|
17
|
-
import {
|
|
16
|
+
import { refreshDecisionsDigest, retireClaudeMdDigest } from '@intutic/sync-daemon';
|
|
17
|
+
import { loadConfig } from '../config/store.js';
|
|
18
18
|
/**
|
|
19
19
|
* Checks `WorkspaceSettings.decisionsLogEnabled` before writing anything.
|
|
20
20
|
*
|
|
@@ -34,16 +34,15 @@ export async function refreshDecisionsLog(workspaceRoot) {
|
|
|
34
34
|
if (!settings?.decisionsLogEnabled) {
|
|
35
35
|
return { refreshed: false, reason: 'decisionsLogEnabled is off' };
|
|
36
36
|
}
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
// draw from the way the daemon's sync loop does.
|
|
37
|
+
// Every harness this machine governs gets the entries where it reads
|
|
38
|
+
// its instructions, as on the daemon's own cycle.
|
|
39
|
+
await retireClaudeMdDigest(workspaceRoot);
|
|
41
40
|
const result = await refreshDecisionsDigest({
|
|
42
41
|
controlPlaneUrl: creds.controlPlaneUrl,
|
|
43
42
|
apiKey: creds.apiKey,
|
|
44
43
|
workspaceId: creds.workspaceId,
|
|
45
44
|
workspaceRoot,
|
|
46
|
-
harnesses: [
|
|
45
|
+
harnesses: (loadConfig()?.harnesses ?? []),
|
|
47
46
|
});
|
|
48
47
|
return result ? { refreshed: true } : { refreshed: false, reason: 'digest fetch failed' };
|
|
49
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decisionsLogRefresh.js","sourceRoot":"","sources":["../../src/lib/decisionsLogRefresh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"decisionsLogRefresh.js","sourceRoot":"","sources":["../../src/lib/decisionsLogRefresh.ts"],"names":[],"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AAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAA;IAC3F,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAA;IACvF,CAAC;AACH,CAAC"}
|
|
@@ -23,4 +23,19 @@ export interface ReportDeviceStateOptions {
|
|
|
23
23
|
* surfacing, this function never throws over it.
|
|
24
24
|
*/
|
|
25
25
|
export declare function reportDeviceState(opts?: ReportDeviceStateOptions): Promise<DeviceReportResult>;
|
|
26
|
+
/** How long `intutic disconnect` waits for the control plane before going on without it. */
|
|
27
|
+
export declare const DISCONNECT_REPORT_TIMEOUT_MS = 5000;
|
|
28
|
+
/**
|
|
29
|
+
* Tells the control plane this machine ran `intutic disconnect`
|
|
30
|
+
* (`POST /api/v1/devices/disconnect`), so it stops expecting the machine's
|
|
31
|
+
* gates and does not read the machine going quiet as a fault. Sent before
|
|
32
|
+
* disconnect removes the credentials, under the fingerprint the device and
|
|
33
|
+
* the AI inventory report. Never throws, and gives up after
|
|
34
|
+
* {@link DISCONNECT_REPORT_TIMEOUT_MS}: an unreachable control plane must not
|
|
35
|
+
* stop a disconnect.
|
|
36
|
+
*/
|
|
37
|
+
export declare function reportDisconnect(opts: {
|
|
38
|
+
scope: 'machine' | 'harness';
|
|
39
|
+
harnesses: readonly string[];
|
|
40
|
+
}): Promise<DeviceReportResult>;
|
|
26
41
|
//# sourceMappingURL=deviceReport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceReport.d.ts","sourceRoot":"","sources":["../../src/lib/deviceReport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"deviceReport.d.ts","sourceRoot":"","sources":["../../src/lib/deviceReport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAWH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC,GAAG,CAAC,EAAE,OAAO,CAAA;CACd;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,GAAE,wBAA6B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA8BxG;AAED,4FAA4F;AAC5F,eAAO,MAAM,4BAA4B,OAAQ,CAAA;AAEjD;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,KAAK,EAAE,SAAS,GAAG,SAAS,CAAA;IAC5B,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;CAC7B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAe9B"}
|
package/dist/lib/deviceReport.js
CHANGED
|
@@ -13,6 +13,7 @@ import { loadCredentials } from '../config/store.js';
|
|
|
13
13
|
import { resolveControlPlaneUrl } from '../config/paths.js';
|
|
14
14
|
import { createApiClient } from './api.js';
|
|
15
15
|
import { readEnforcementState } from './enforcementState.js';
|
|
16
|
+
import { inventoryDeviceIdentity } from './inventory.js';
|
|
16
17
|
const { version: cliVersion } = createRequire(import.meta.url)('../../package.json');
|
|
17
18
|
/**
|
|
18
19
|
* Reads `~/.intutic/` credentials and the local enforcement state file, and
|
|
@@ -52,4 +53,33 @@ export async function reportDeviceState(opts = {}) {
|
|
|
52
53
|
return { reported: false, reason: err instanceof Error ? err.message : String(err) };
|
|
53
54
|
}
|
|
54
55
|
}
|
|
56
|
+
/** How long `intutic disconnect` waits for the control plane before going on without it. */
|
|
57
|
+
export const DISCONNECT_REPORT_TIMEOUT_MS = 5_000;
|
|
58
|
+
/**
|
|
59
|
+
* Tells the control plane this machine ran `intutic disconnect`
|
|
60
|
+
* (`POST /api/v1/devices/disconnect`), so it stops expecting the machine's
|
|
61
|
+
* gates and does not read the machine going quiet as a fault. Sent before
|
|
62
|
+
* disconnect removes the credentials, under the fingerprint the device and
|
|
63
|
+
* the AI inventory report. Never throws, and gives up after
|
|
64
|
+
* {@link DISCONNECT_REPORT_TIMEOUT_MS}: an unreachable control plane must not
|
|
65
|
+
* stop a disconnect.
|
|
66
|
+
*/
|
|
67
|
+
export async function reportDisconnect(opts) {
|
|
68
|
+
try {
|
|
69
|
+
const creds = await loadCredentials();
|
|
70
|
+
if (!creds)
|
|
71
|
+
return { reported: false, reason: 'not authenticated' };
|
|
72
|
+
const device = await inventoryDeviceIdentity(cliVersion);
|
|
73
|
+
const res = await fetch(`${resolveControlPlaneUrl()}/api/v1/devices/disconnect`, {
|
|
74
|
+
method: 'POST',
|
|
75
|
+
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${creds.apiKey}` },
|
|
76
|
+
body: JSON.stringify({ fingerprint: device.fingerprint, hostname: device.hostname, scope: opts.scope, harnesses: opts.harnesses }),
|
|
77
|
+
signal: AbortSignal.timeout(DISCONNECT_REPORT_TIMEOUT_MS),
|
|
78
|
+
});
|
|
79
|
+
return res.ok ? { reported: true } : { reported: false, reason: `the control plane answered ${res.status}` };
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
return { reported: false, reason: err instanceof Error ? err.message : String(err) };
|
|
83
|
+
}
|
|
84
|
+
}
|
|
55
85
|
//# sourceMappingURL=deviceReport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceReport.js","sourceRoot":"","sources":["../../src/lib/deviceReport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,oBAAoB,EAAE,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K;YAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAA;QACnE,MAAM,MAAM,GAAG,MAAM,uBAAuB,CAAC,UAAU,CAAC,CAAA;QACxD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,sBAAsB,EAAE,4BAA4B,EAAE;YAC/E,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,UAAU,KAAK,CAAC,MAAM,EAAE,EAAE;YACxF,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;YAClI,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,4BAA4B,CAAC;SAC1D,CAAC,CAAA;QACF,OAAO,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B,GAAG,CAAC,MAAM,EAAE,EAAE,CAAA;IAC9G,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAA;IACtF,CAAC;AACH,CAAC"}
|
package/dist/lib/gitHooks.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitHooks.d.ts","sourceRoot":"","sources":["../../src/lib/gitHooks.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"gitHooks.d.ts","sourceRoot":"","sources":["../../src/lib/gitHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA8IH;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAkG7E"}
|
package/dist/lib/gitHooks.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Installs post-commit and post-checkout hooks into the workspace's
|
|
5
5
|
* `.git/hooks/` directory to trigger real-time branch/commit tracking.
|
|
6
6
|
*
|
|
7
|
-
* LLD #14 — gitHooks.ts
|
|
8
7
|
* HLD §3.14 — Real-Time State Mirroring (Git hooks context integration)
|
|
9
8
|
*
|
|
10
9
|
* @module
|
|
@@ -20,8 +19,8 @@ const PRE_COMMIT_MARKER = '# Intutic Pre-Commit Secret Scan';
|
|
|
20
19
|
/** Marker line identifying a post-merge hook as ours — same overwrite guard as pre-commit. */
|
|
21
20
|
const POST_MERGE_MARKER = '# Intutic Post-Merge Decisions Log Refresh';
|
|
22
21
|
/**
|
|
23
|
-
* Git-context tracking hook content, shared by post-commit and post-checkout
|
|
24
|
-
*
|
|
22
|
+
* Git-context tracking hook content, shared by post-commit and post-checkout:
|
|
23
|
+
* both fire the same best-effort branch/commit sync, backgrounded
|
|
25
24
|
* and output-suppressed so it never adds latency to the Git command that
|
|
26
25
|
* triggered it.
|
|
27
26
|
*/
|
|
@@ -36,8 +35,8 @@ fi
|
|
|
36
35
|
}
|
|
37
36
|
/**
|
|
38
37
|
* Optional post-merge hook: refreshes the governed decisions log
|
|
39
|
-
* (`.intutic/DECISIONS.md`
|
|
40
|
-
* harness
|
|
38
|
+
* (`.intutic/DECISIONS.md` and the recent entries in each governed
|
|
39
|
+
* harness's instructions file) right after a merge, rather than leaving a developer
|
|
41
40
|
* waiting for the daemon's next ~30s poll. `decisions-log-refresh` itself
|
|
42
41
|
* no-ops (and never errors the shell) when `decisionsLogEnabled` is off or
|
|
43
42
|
* the developer isn't authenticated — see `decisionsLogRefresh.ts`.
|
|
@@ -88,7 +87,7 @@ if [ -n "$findings" ]; then
|
|
|
88
87
|
exit 1
|
|
89
88
|
fi
|
|
90
89
|
|
|
91
|
-
#
|
|
90
|
+
# Warn-only skill-content scan of staged skill-surface additions
|
|
92
91
|
# (.agents/skills/**, .claude/skills/**). Advisory only — this NEVER
|
|
93
92
|
# refuses the commit, unlike the secret scan above. See skillScan.ts's
|
|
94
93
|
# module doc comment for why: the pattern table's false-positive rate
|
|
@@ -106,7 +105,7 @@ exit 0
|
|
|
106
105
|
* Writes one hook file at `<hooksDir>/<name>` unless a foreign (non-Intutic)
|
|
107
106
|
* hook already occupies that path — the shared never-clobber-a-foreign-hook,
|
|
108
107
|
* marker-based-idempotent-rerun behavior every hook `installGitHooks` manages
|
|
109
|
-
* now follows (
|
|
108
|
+
* now follows (previously only pre-commit and post-merge had it).
|
|
110
109
|
*
|
|
111
110
|
* Reads the existing file first: absent, or already carrying `marker` (a
|
|
112
111
|
* previous install of this same hook, safe to overwrite with the current
|
|
@@ -163,7 +162,7 @@ export async function installGitHooks(workspaceRoot) {
|
|
|
163
162
|
try {
|
|
164
163
|
await node_fs.mkdir(hooksDir, { recursive: true });
|
|
165
164
|
// Git-context tracking hooks (post-commit, post-checkout). Marker-
|
|
166
|
-
// disciplined the same way pre-commit and post-merge are below
|
|
165
|
+
// disciplined the same way pre-commit and post-merge are below:
|
|
167
166
|
// never clobber a hook that isn't ours. Until this fix these two
|
|
168
167
|
// overwrote whatever was already at their paths unconditionally — a
|
|
169
168
|
// team's own post-commit/post-checkout script (a notification hook, a
|
|
@@ -188,7 +187,7 @@ export async function installGitHooks(workspaceRoot) {
|
|
|
188
187
|
// Optional post-merge hook (governed decisions log refresh). Marker-
|
|
189
188
|
// disciplined the same way pre-commit is above — never clobber a
|
|
190
189
|
// post-merge hook that isn't ours. Post-commit/post-checkout above now
|
|
191
|
-
// follow this exact same pattern too (
|
|
190
|
+
// follow this exact same pattern too (previously they did not:
|
|
192
191
|
// they unconditionally overwrote whatever was already at those paths,
|
|
193
192
|
// noted as a latent overreach rather than fixed alongside this hook's
|
|
194
193
|
// original addition, since changing existing-install behavior needed its
|
package/dist/lib/gitHooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitHooks.js","sourceRoot":"","sources":["../../src/lib/gitHooks.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"gitHooks.js","sourceRoot":"","sources":["../../src/lib/gitHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,SAAS,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAEjC,8FAA8F;AAC9F,MAAM,kBAAkB,GAAG,iCAAiC,CAAA;AAE5D,+EAA+E;AAC/E,MAAM,iBAAiB,GAAG,kCAAkC,CAAA;AAE5D,8FAA8F;AAC9F,MAAM,iBAAiB,GAAG,4CAA4C,CAAA;AAEtE;;;;;GAKG;AACH,SAAS,qBAAqB;IAC5B,OAAO;;EAEP,kBAAkB;;;;CAInB,CAAC,IAAI,EAAE,GAAG,IAAI,CAAA;AACf,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAS,gBAAgB;IACvB,OAAO;;EAEP,iBAAiB;;;;CAIlB,CAAC,IAAI,EAAE,GAAG,IAAI,CAAA;AACf,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAS,gBAAgB;IACvB,OAAO;;EAEP,iBAAiB;;;;oGAIiF,wBAAwB,EAAE;;;;;;;;;;;;;;;;;;;;;;CAsB7H,CAAC,SAAS,EAAE,CAAA;AACb,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,KAAK,UAAU,uBAAuB,CACpC,QAAgB,EAChB,IAAY,EACZ,OAAe,EACf,MAAc,EACd,WAAmB;I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AS,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;QAChE,IAAI,kBAAkB;YAAE,SAAS,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAA;QAC1E,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzB,GAAG,CAAC,IAAI,CAAC,qCAAqC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACxE,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CAAC,iFAAiF,CAAC,CAAA;QAC7F,CAAC;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,8BAA8B,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAC1F,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC"}
|
package/dist/lib/hash.d.ts
CHANGED
package/dist/lib/hash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/lib/hash.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/lib/hash.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,qEAAqE;AACrE,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGhE;AAED,4DAA4D;AAC5D,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAElD"}
|
package/dist/lib/hash.js
CHANGED
package/dist/lib/hash.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../src/lib/hash.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../src/lib/hash.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,qEAAqE;AACrE,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,QAAgB;IAC7C,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAA;IACxC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC3D,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACpE,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The machine's AI inventory, as `intutic connect` reports it every few
|
|
3
|
+
* minutes: every harness the detection rules find (connected or not), plus
|
|
4
|
+
* what the sync daemon reads about each (`collectDeviceInventory`), sent with
|
|
5
|
+
* the same device fingerprint `intutic enforce` reports under.
|
|
6
|
+
*
|
|
7
|
+
* Detection lives here because the rules are the CLI's harness adapters
|
|
8
|
+
* (`../harness/detector.ts`); the daemon package does not depend on the CLI.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import type { InventoryDeviceIdentity } from '@intutic/shared-types';
|
|
13
|
+
import { type DetectedHarness } from '@intutic/sync-daemon';
|
|
14
|
+
/** At the default 30-second poll, every five minutes, starting with the first poll. */
|
|
15
|
+
export declare const INVENTORY_EVERY_N_POLLS = 10;
|
|
16
|
+
export declare function shouldReportInventoryThisIteration(pollIteration: number): boolean;
|
|
17
|
+
/** The newest installed version of each extension-based harness, from directory names alone. */
|
|
18
|
+
export declare function vscodeExtensionVersions(home?: string): Promise<Map<string, string>>;
|
|
19
|
+
/**
|
|
20
|
+
* Every harness whose detection rule matches this machine and workspace. A
|
|
21
|
+
* rule that throws counts as not detected: one broken probe must not hide
|
|
22
|
+
* the rest.
|
|
23
|
+
*/
|
|
24
|
+
export declare function detectInstalledHarnesses(workspaceRoot: string, home?: string): Promise<DetectedHarness[]>;
|
|
25
|
+
/**
|
|
26
|
+
* This machine as `/api/v1/devices` knows it: the fingerprint in the local
|
|
27
|
+
* enforcement state when `intutic enforce` or `connect` has written one, so
|
|
28
|
+
* both views name the same device; otherwise the same fingerprint computed now.
|
|
29
|
+
*/
|
|
30
|
+
export declare function inventoryDeviceIdentity(cliVersion: string): Promise<InventoryDeviceIdentity>;
|
|
31
|
+
/**
|
|
32
|
+
* Detects, collects and sends the inventory. Never throws: the sync loop must
|
|
33
|
+
* not stop over a report the next cycle repeats anyway.
|
|
34
|
+
*/
|
|
35
|
+
export declare function reportMachineInventory(opts: {
|
|
36
|
+
controlPlaneUrl: string;
|
|
37
|
+
apiKey: string;
|
|
38
|
+
workspaceRoot: string;
|
|
39
|
+
configured: readonly string[];
|
|
40
|
+
/** Harnesses `intutic disconnect --harness` removed from this machine (config `disconnectedHarnesses`). */
|
|
41
|
+
disconnected?: readonly string[];
|
|
42
|
+
cliVersion: string;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
reported: boolean;
|
|
45
|
+
reason?: string;
|
|
46
|
+
}>;
|
|
47
|
+
//# sourceMappingURL=inventory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../../src/lib/inventory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,EAAiD,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAI1G,uFAAuF;AACvF,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAEzC,wBAAgB,kCAAkC,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAEjF;AAaD,gGAAgG;AAChG,wBAAsB,uBAAuB,CAAC,IAAI,GAAE,MAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAiBpG;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,GAAE,MAAkB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAU1H;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAMlG;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,eAAe,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,2GAA2G;IAC3G,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,UAAU,EAAE,MAAM,CAAA;CACnB,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAiBlD"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The machine's AI inventory, as `intutic connect` reports it every few
|
|
3
|
+
* minutes: every harness the detection rules find (connected or not), plus
|
|
4
|
+
* what the sync daemon reads about each (`collectDeviceInventory`), sent with
|
|
5
|
+
* the same device fingerprint `intutic enforce` reports under.
|
|
6
|
+
*
|
|
7
|
+
* Detection lives here because the rules are the CLI's harness adapters
|
|
8
|
+
* (`../harness/detector.ts`); the daemon package does not depend on the CLI.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import { readdir } from 'node:fs/promises';
|
|
13
|
+
import { homedir, hostname } from 'node:os';
|
|
14
|
+
import { join } from 'node:path';
|
|
15
|
+
import { collectDeviceInventory, reportDeviceInventory } from '@intutic/sync-daemon';
|
|
16
|
+
import { ALL_ADAPTERS } from '../harness/detector.js';
|
|
17
|
+
import { computeFingerprint, readEnforcementState } from './enforcementState.js';
|
|
18
|
+
/** At the default 30-second poll, every five minutes, starting with the first poll. */
|
|
19
|
+
export const INVENTORY_EVERY_N_POLLS = 10;
|
|
20
|
+
export function shouldReportInventoryThisIteration(pollIteration) {
|
|
21
|
+
return pollIteration % INVENTORY_EVERY_N_POLLS === 0;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* VS Code extensions whose installed directory name carries the version
|
|
25
|
+
* (`<publisher>.<name>-<version>`), the one version source cheap enough to
|
|
26
|
+
* read on every inventory cycle.
|
|
27
|
+
*/
|
|
28
|
+
const VSCODE_EXTENSION_PREFIX = {
|
|
29
|
+
'cline': 'saoudrizwan.claude-dev-',
|
|
30
|
+
'roo-code': 'rooveterinaryinc.roo-cline-',
|
|
31
|
+
'continue': 'continue.continue-',
|
|
32
|
+
};
|
|
33
|
+
/** The newest installed version of each extension-based harness, from directory names alone. */
|
|
34
|
+
export async function vscodeExtensionVersions(home = homedir()) {
|
|
35
|
+
let entries;
|
|
36
|
+
try {
|
|
37
|
+
entries = await readdir(join(home, '.vscode', 'extensions'));
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return new Map();
|
|
41
|
+
}
|
|
42
|
+
const out = new Map();
|
|
43
|
+
for (const [harness, prefix] of Object.entries(VSCODE_EXTENSION_PREFIX)) {
|
|
44
|
+
const versions = entries
|
|
45
|
+
.filter((e) => e.startsWith(prefix))
|
|
46
|
+
.map((e) => /^\d+\.\d+\.\d+/.exec(e.slice(prefix.length))?.[0])
|
|
47
|
+
.filter((v) => v !== undefined)
|
|
48
|
+
.sort((a, b) => b.localeCompare(a, undefined, { numeric: true }));
|
|
49
|
+
if (versions[0])
|
|
50
|
+
out.set(harness, versions[0]);
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Every harness whose detection rule matches this machine and workspace. A
|
|
56
|
+
* rule that throws counts as not detected: one broken probe must not hide
|
|
57
|
+
* the rest.
|
|
58
|
+
*/
|
|
59
|
+
export async function detectInstalledHarnesses(workspaceRoot, home = homedir()) {
|
|
60
|
+
const versions = await vscodeExtensionVersions(home);
|
|
61
|
+
const found = [];
|
|
62
|
+
for (const adapter of ALL_ADAPTERS) {
|
|
63
|
+
const detected = await adapter.detect(workspaceRoot).catch(() => false);
|
|
64
|
+
if (!detected)
|
|
65
|
+
continue;
|
|
66
|
+
const version = versions.get(adapter.type);
|
|
67
|
+
found.push(version ? { type: adapter.type, version } : { type: adapter.type });
|
|
68
|
+
}
|
|
69
|
+
return found;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* This machine as `/api/v1/devices` knows it: the fingerprint in the local
|
|
73
|
+
* enforcement state when `intutic enforce` or `connect` has written one, so
|
|
74
|
+
* both views name the same device; otherwise the same fingerprint computed now.
|
|
75
|
+
*/
|
|
76
|
+
export async function inventoryDeviceIdentity(cliVersion) {
|
|
77
|
+
const state = await readEnforcementState();
|
|
78
|
+
if (state) {
|
|
79
|
+
return { fingerprint: state.fingerprint, hostname: state.hostname, platform: state.platform, cliVersion };
|
|
80
|
+
}
|
|
81
|
+
return { fingerprint: await computeFingerprint(), hostname: hostname(), platform: process.platform, cliVersion };
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Detects, collects and sends the inventory. Never throws: the sync loop must
|
|
85
|
+
* not stop over a report the next cycle repeats anyway.
|
|
86
|
+
*/
|
|
87
|
+
export async function reportMachineInventory(opts) {
|
|
88
|
+
try {
|
|
89
|
+
const [detected, device] = await Promise.all([
|
|
90
|
+
detectInstalledHarnesses(opts.workspaceRoot),
|
|
91
|
+
inventoryDeviceIdentity(opts.cliVersion),
|
|
92
|
+
]);
|
|
93
|
+
const inventory = await collectDeviceInventory({
|
|
94
|
+
workspaceRoot: opts.workspaceRoot,
|
|
95
|
+
detected,
|
|
96
|
+
configured: opts.configured,
|
|
97
|
+
disconnected: opts.disconnected,
|
|
98
|
+
});
|
|
99
|
+
const reported = await reportDeviceInventory(opts.controlPlaneUrl, opts.apiKey, device, inventory);
|
|
100
|
+
return reported ? { reported } : { reported, reason: 'the control plane did not accept it' };
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
return { reported: false, reason: err instanceof Error ? err.message : String(err) };
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=inventory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.js","sourceRoot":"","sources":["../../src/lib/inventory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAwB,MAAM,sBAAsB,CAAA;AAC1G,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAEhF,uFAAuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAA;AAEzC,MAAM,UAAU,kCAAkC,CAAC,aAAqB;IACtE,OAAO,aAAa,GAAG,uBAAuB,KAAK,CAAC,CAAA;AACtD,CAAC;AAED;;;;GAIG;AACH,MAAM,uBAAuB,GAAqC;IAChE,OAAO,EAAE,yBAAyB;IAClC,UAAU,EAAE,6BAA6B;IACzC,UAAU,EAAE,oBAAoB;CACjC,CAAA;AAED,gGAAgG;AAChG,MAAM,CAAC,KAAK,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5C,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC;SACzC,CAAC,CAAA;QACF,MAAM,SAAS,GAAG,MAAM,sBAAsB,CAAC;YAC7C,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,QAAQ;YACR,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAA;QACF,MAAM,QAAQ,GAAG,MAAM,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAA;QAClG,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,qCAAqC,EAAE,CAAA;IAC9F,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAA;IACtF,CAAC;AACH,CAAC"}
|
package/dist/lib/logger.d.ts
CHANGED
package/dist/lib/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,GAAG;cACJ,MAAM,GAAG,IAAI;iBAIV,MAAM,GAAG,IAAI;cAIhB,MAAM,GAAG,IAAI;eAIZ,MAAM,GAAG,IAAI;aAIf,MAAM,GAAG,IAAI;IAItB,sCAAsC;iBACzB,MAAM,SAAS,MAAM,GAAG,IAAI;IAIzC,8BAA8B;gBAClB,MAAM,GAAG,IAAI;CAG1B,CAAA"}
|