@intutic/sync-daemon 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 +1 -1
- package/dist/agentReporter.d.ts +23 -11
- package/dist/agentReporter.d.ts.map +1 -1
- package/dist/agentReporter.js +20 -13
- package/dist/agentReporter.js.map +1 -1
- package/dist/configReader.d.ts +1 -3
- package/dist/configReader.d.ts.map +1 -1
- package/dist/configReader.js +0 -2
- package/dist/configReader.js.map +1 -1
- package/dist/configWriter.d.ts +11 -12
- package/dist/configWriter.d.ts.map +1 -1
- package/dist/configWriter.js +35 -58
- package/dist/configWriter.js.map +1 -1
- package/dist/disconnect/harnesses.d.ts +0 -2
- package/dist/disconnect/harnesses.d.ts.map +1 -1
- package/dist/disconnect/harnesses.js +157 -80
- package/dist/disconnect/harnesses.js.map +1 -1
- package/dist/disconnect/index.d.ts.map +1 -1
- package/dist/disconnect/index.js +11 -1
- package/dist/disconnect/index.js.map +1 -1
- package/dist/disconnect/mcp.d.ts +21 -0
- package/dist/disconnect/mcp.d.ts.map +1 -1
- package/dist/disconnect/mcp.js +71 -0
- package/dist/disconnect/mcp.js.map +1 -1
- package/dist/disconnect/recognise.d.ts +2 -2
- package/dist/disconnect/recognise.d.ts.map +1 -1
- package/dist/disconnect/recognise.js +15 -5
- package/dist/disconnect/recognise.js.map +1 -1
- package/dist/harness/aiderConfigMerger.d.ts +28 -8
- package/dist/harness/aiderConfigMerger.d.ts.map +1 -1
- package/dist/harness/aiderConfigMerger.js +59 -11
- package/dist/harness/aiderConfigMerger.js.map +1 -1
- package/dist/harness/antigravityCliHooks.d.ts +61 -0
- package/dist/harness/antigravityCliHooks.d.ts.map +1 -0
- package/dist/harness/antigravityCliHooks.js +207 -0
- package/dist/harness/antigravityCliHooks.js.map +1 -0
- package/dist/harness/antigravityHooks.d.ts +12 -2
- package/dist/harness/antigravityHooks.d.ts.map +1 -1
- package/dist/harness/antigravityHooks.js +36 -16
- package/dist/harness/antigravityHooks.js.map +1 -1
- package/dist/harness/antigravityProducts.d.ts +40 -0
- package/dist/harness/antigravityProducts.d.ts.map +1 -0
- package/dist/harness/antigravityProducts.js +109 -0
- package/dist/harness/antigravityProducts.js.map +1 -0
- package/dist/harness/claudeAgentsMd.d.ts +29 -0
- package/dist/harness/claudeAgentsMd.d.ts.map +1 -0
- package/dist/harness/claudeAgentsMd.js +80 -0
- package/dist/harness/claudeAgentsMd.js.map +1 -0
- package/dist/harness/claudeCodeHooks.d.ts +6 -5
- package/dist/harness/claudeCodeHooks.d.ts.map +1 -1
- package/dist/harness/claudeCodeHooks.js +98 -24
- package/dist/harness/claudeCodeHooks.js.map +1 -1
- package/dist/harness/clineHooks.d.ts +0 -1
- package/dist/harness/clineHooks.d.ts.map +1 -1
- package/dist/harness/clineHooks.js +10 -4
- package/dist/harness/clineHooks.js.map +1 -1
- package/dist/harness/codexHooks.d.ts +2 -0
- package/dist/harness/codexHooks.d.ts.map +1 -1
- package/dist/harness/codexHooks.js +12 -4
- package/dist/harness/codexHooks.js.map +1 -1
- package/dist/harness/cursorHooks.d.ts +5 -2
- package/dist/harness/cursorHooks.d.ts.map +1 -1
- package/dist/harness/cursorHooks.js +9 -3
- package/dist/harness/cursorHooks.js.map +1 -1
- package/dist/harness/dshHooks.d.ts +5 -5
- package/dist/harness/dshHooks.d.ts.map +1 -1
- package/dist/harness/dshHooks.js +5 -5
- package/dist/harness/gateArtifacts.d.ts +35 -0
- package/dist/harness/gateArtifacts.d.ts.map +1 -0
- package/dist/harness/gateArtifacts.js +88 -0
- package/dist/harness/gateArtifacts.js.map +1 -0
- package/dist/harness/gateBody.d.ts +186 -69
- package/dist/harness/gateBody.d.ts.map +1 -1
- package/dist/harness/gateBody.js +820 -182
- package/dist/harness/gateBody.js.map +1 -1
- package/dist/harness/gateSightings.d.ts +47 -0
- package/dist/harness/gateSightings.d.ts.map +1 -0
- package/dist/harness/gateSightings.js +159 -0
- package/dist/harness/gateSightings.js.map +1 -0
- package/dist/harness/githubCopilotHooks.d.ts.map +1 -1
- package/dist/harness/githubCopilotHooks.js +7 -1
- package/dist/harness/githubCopilotHooks.js.map +1 -1
- package/dist/harness/gooseHardener.d.ts +0 -1
- package/dist/harness/gooseHardener.d.ts.map +1 -1
- package/dist/harness/gooseHardener.js +1 -1
- package/dist/harness/gooseHardener.js.map +1 -1
- package/dist/harness/gooseHooks.d.ts +14 -1
- package/dist/harness/gooseHooks.d.ts.map +1 -1
- package/dist/harness/gooseHooks.js +55 -29
- package/dist/harness/gooseHooks.js.map +1 -1
- package/dist/harness/grokHooks.d.ts +2 -2
- package/dist/harness/grokHooks.d.ts.map +1 -1
- package/dist/harness/grokHooks.js +11 -6
- package/dist/harness/grokHooks.js.map +1 -1
- package/dist/harness/hermesHooks.d.ts +18 -8
- package/dist/harness/hermesHooks.d.ts.map +1 -1
- package/dist/harness/hermesHooks.js +48 -17
- package/dist/harness/hermesHooks.js.map +1 -1
- package/dist/harness/mcpAutoWrite.d.ts +24 -9
- package/dist/harness/mcpAutoWrite.d.ts.map +1 -1
- package/dist/harness/mcpAutoWrite.js +218 -25
- package/dist/harness/mcpAutoWrite.js.map +1 -1
- package/dist/harness/museHooks.d.ts +3 -3
- package/dist/harness/museHooks.d.ts.map +1 -1
- package/dist/harness/museHooks.js +9 -5
- package/dist/harness/museHooks.js.map +1 -1
- package/dist/harness/n8nHooks.d.ts +0 -1
- package/dist/harness/n8nHooks.d.ts.map +1 -1
- package/dist/harness/n8nHooks.js +4 -1
- package/dist/harness/n8nHooks.js.map +1 -1
- package/dist/harness/openCodeHooks.d.ts +2 -2
- package/dist/harness/openCodeHooks.d.ts.map +1 -1
- package/dist/harness/openCodeHooks.js +7 -3
- package/dist/harness/openCodeHooks.js.map +1 -1
- package/dist/harness/openWebuiHooks.d.ts +0 -1
- package/dist/harness/openWebuiHooks.d.ts.map +1 -1
- package/dist/harness/openWebuiHooks.js +5 -1
- package/dist/harness/openWebuiHooks.js.map +1 -1
- package/dist/harness/openclawHooks.d.ts +70 -18
- package/dist/harness/openclawHooks.d.ts.map +1 -1
- package/dist/harness/openclawHooks.js +213 -161
- package/dist/harness/openclawHooks.js.map +1 -1
- package/dist/harness/openhandsHooks.d.ts +24 -10
- package/dist/harness/openhandsHooks.d.ts.map +1 -1
- package/dist/harness/openhandsHooks.js +49 -48
- package/dist/harness/openhandsHooks.js.map +1 -1
- package/dist/harness/piHooks.d.ts +52 -17
- package/dist/harness/piHooks.d.ts.map +1 -1
- package/dist/harness/piHooks.js +177 -166
- package/dist/harness/piHooks.js.map +1 -1
- package/dist/harness/protectedPaths.d.ts +107 -25
- package/dist/harness/protectedPaths.d.ts.map +1 -1
- package/dist/harness/protectedPaths.js +342 -48
- package/dist/harness/protectedPaths.js.map +1 -1
- package/dist/harness/rulesSection.d.ts +62 -0
- package/dist/harness/rulesSection.d.ts.map +1 -0
- package/dist/harness/rulesSection.js +145 -0
- package/dist/harness/rulesSection.js.map +1 -0
- package/dist/harness/windsurfHooks.d.ts +0 -1
- package/dist/harness/windsurfHooks.d.ts.map +1 -1
- package/dist/harness/windsurfHooks.js +4 -1
- package/dist/harness/windsurfHooks.js.map +1 -1
- package/dist/index.d.ts +12 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +53 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +133 -0
- package/dist/inventory.js.map +1 -0
- package/dist/lib/complianceProbes.d.ts +2 -1
- package/dist/lib/complianceProbes.d.ts.map +1 -1
- package/dist/lib/complianceProbes.js +1 -1
- package/dist/lib/complianceProbes.js.map +1 -1
- package/dist/lib/decisionsDigest.d.ts +34 -16
- package/dist/lib/decisionsDigest.d.ts.map +1 -1
- package/dist/lib/decisionsDigest.js +105 -46
- package/dist/lib/decisionsDigest.js.map +1 -1
- package/dist/lib/egressPolicy.d.ts +2 -2
- package/dist/lib/egressPolicy.js +2 -2
- package/dist/lib/mcpRegistryPy.d.ts +11 -0
- package/dist/lib/mcpRegistryPy.d.ts.map +1 -0
- package/dist/lib/mcpRegistryPy.js +173 -0
- package/dist/lib/mcpRegistryPy.js.map +1 -0
- package/dist/lib/phrasesPy.d.ts +11 -0
- package/dist/lib/phrasesPy.d.ts.map +1 -0
- package/dist/lib/phrasesPy.js +351 -0
- package/dist/lib/phrasesPy.js.map +1 -0
- package/dist/lib/policySnapshot.d.ts +46 -10
- package/dist/lib/policySnapshot.d.ts.map +1 -1
- package/dist/lib/policySnapshot.js +136 -47
- package/dist/lib/policySnapshot.js.map +1 -1
- package/dist/lib/processPoller.d.ts.map +1 -1
- package/dist/lib/processPoller.js +9 -2
- package/dist/lib/processPoller.js.map +1 -1
- package/dist/lib/regexLinearity.d.ts +43 -0
- package/dist/lib/regexLinearity.d.ts.map +1 -0
- package/dist/lib/regexLinearity.js +275 -0
- package/dist/lib/regexLinearity.js.map +1 -0
- package/dist/lib/runtimeEnv.d.ts +1 -3
- package/dist/lib/runtimeEnv.d.ts.map +1 -1
- package/dist/lib/runtimeEnv.js +0 -2
- package/dist/lib/runtimeEnv.js.map +1 -1
- package/dist/lib/sequencePy.d.ts +10 -0
- package/dist/lib/sequencePy.d.ts.map +1 -0
- package/dist/lib/sequencePy.js +102 -0
- package/dist/lib/sequencePy.js.map +1 -0
- package/dist/sessionReporter.d.ts +17 -11
- package/dist/sessionReporter.d.ts.map +1 -1
- package/dist/sessionReporter.js +36 -23
- package/dist/sessionReporter.js.map +1 -1
- package/dist/skillWriter.d.ts +23 -5
- package/dist/skillWriter.d.ts.map +1 -1
- package/dist/skillWriter.js +159 -16
- package/dist/skillWriter.js.map +1 -1
- package/dist/syncCycle.d.ts.map +1 -1
- package/dist/syncCycle.js +21 -9
- package/dist/syncCycle.js.map +1 -1
- package/dist/trajectoryMonitor.d.ts +1 -3
- package/dist/trajectoryMonitor.d.ts.map +1 -1
- package/dist/trajectoryMonitor.js +1 -4
- package/dist/trajectoryMonitor.js.map +1 -1
- package/dist/watcher/driftWatcher.d.ts +0 -1
- package/dist/watcher/driftWatcher.d.ts.map +1 -1
- package/dist/watcher/driftWatcher.js +1 -2
- package/dist/watcher/driftWatcher.js.map +1 -1
- package/dist/watcher/settingsGuard.d.ts +33 -7
- package/dist/watcher/settingsGuard.d.ts.map +1 -1
- package/dist/watcher/settingsGuard.js +373 -61
- package/dist/watcher/settingsGuard.js.map +1 -1
- package/dist/watcher/vscodeHookSettings.d.ts +30 -0
- package/dist/watcher/vscodeHookSettings.d.ts.map +1 -0
- package/dist/watcher/vscodeHookSettings.js +170 -0
- package/dist/watcher/vscodeHookSettings.js.map +1 -0
- package/dist/wsClient.d.ts +0 -1
- package/dist/wsClient.d.ts.map +1 -1
- package/dist/wsClient.js +0 -1
- package/dist/wsClient.js.map +1 -1
- package/package.json +5 -5
- package/dist/harness/claudeDesktopHooks.d.ts +0 -33
- package/dist/harness/claudeDesktopHooks.d.ts.map +0 -1
- package/dist/harness/claudeDesktopHooks.js +0 -256
- package/dist/harness/claudeDesktopHooks.js.map +0 -1
- package/dist/harness/continueHooks.d.ts +0 -63
- package/dist/harness/continueHooks.d.ts.map +0 -1
- package/dist/harness/continueHooks.js +0 -250
- package/dist/harness/continueHooks.js.map +0 -1
- package/dist/harness/gateKind.d.ts +0 -164
- package/dist/harness/gateKind.d.ts.map +0 -1
- package/dist/harness/gateKind.js +0 -144
- package/dist/harness/gateKind.js.map +0 -1
- package/dist/harness/rooCodeHooks.d.ts +0 -31
- package/dist/harness/rooCodeHooks.d.ts.map +0 -1
- package/dist/harness/rooCodeHooks.js +0 -281
- package/dist/harness/rooCodeHooks.js.map +0 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* inventory.ts — this machine's AI inventory, for the org-wide view.
|
|
3
|
+
*
|
|
4
|
+
* Which AI coding harnesses the machine has, whether Intutic's gate is
|
|
5
|
+
* installed and live for each, the MCP servers their configs declare (wrapped
|
|
6
|
+
* by the MCP governance proxy or not), the skill bundles on disk, and the
|
|
7
|
+
* local proxy's guard-probe result. `intutic connect` runs it every few
|
|
8
|
+
* minutes and sends it as the `inventory` facet of
|
|
9
|
+
* `POST /api/v1/agents/report`, the path the agent facets already use, with
|
|
10
|
+
* the device fingerprint `intutic enforce` reports under.
|
|
11
|
+
*
|
|
12
|
+
* Harness detection is the CLI's (its adapters hold the detection rules), so
|
|
13
|
+
* the caller passes in what it detected; everything else is read here.
|
|
14
|
+
*
|
|
15
|
+
* What leaves the machine is names, home-relative paths, hashes and
|
|
16
|
+
* timestamps only (see `@intutic/shared-types`'s `devInventory.ts`): never a
|
|
17
|
+
* file's contents, an environment value, an MCP server's command line, or a
|
|
18
|
+
* URL's credentials and query string.
|
|
19
|
+
*
|
|
20
|
+
* @module
|
|
21
|
+
*/
|
|
22
|
+
import { join } from 'node:path';
|
|
23
|
+
import { homedir } from 'node:os';
|
|
24
|
+
import { DEVICE_INVENTORY_SCHEMA_VERSION, gateIdentitiesOf, gateKindForHarness, homeRelativePath, } from '@intutic/shared-types';
|
|
25
|
+
import { newIso } from '@intutic/id';
|
|
26
|
+
import { collectSkillsIn, fetchGuardProbes } from './agentReporter.js';
|
|
27
|
+
import { discoverMcpServers } from './harness/mcpAutoWrite.js';
|
|
28
|
+
import { findGateFile, findIdentityGateFile } from './harness/gateArtifacts.js';
|
|
29
|
+
import { mergeSightings, readGateSightings, sideLogSightings } from './harness/gateSightings.js';
|
|
30
|
+
import { antigravityGateIdentities } from './harness/antigravityProducts.js';
|
|
31
|
+
/**
|
|
32
|
+
* Collects this machine's inventory. Never throws for a missing or unreadable
|
|
33
|
+
* file: an absent config is an absent item, not an error.
|
|
34
|
+
*
|
|
35
|
+
* @param opts.detected - Harnesses the CLI's detection rules found.
|
|
36
|
+
* @param opts.configured - This machine's `intutic connect` harnesses; listed even when detection misses them.
|
|
37
|
+
* @param opts.home - The home directory; defaults to the current user's.
|
|
38
|
+
*/
|
|
39
|
+
export async function collectDeviceInventory(opts) {
|
|
40
|
+
const home = opts.home ?? homedir();
|
|
41
|
+
const versions = new Map(opts.detected.map((d) => [d.type, d.version]));
|
|
42
|
+
const configured = new Set(opts.configured);
|
|
43
|
+
const disconnected = new Set(opts.disconnected ?? []);
|
|
44
|
+
const types = [...new Set([...opts.configured, ...opts.detected.map((d) => d.type)])].sort();
|
|
45
|
+
const [sightings, sideSightings, mcp, skillSets, probes] = await Promise.all([
|
|
46
|
+
readGateSightings(opts.workspaceRoot),
|
|
47
|
+
sideLogSightings(home),
|
|
48
|
+
discoverMcpServers(opts.workspaceRoot),
|
|
49
|
+
Promise.all([
|
|
50
|
+
collectSkillsIn(join(opts.workspaceRoot, '.agents', 'skills'), '.agents/skills'),
|
|
51
|
+
collectSkillsIn(join(opts.workspaceRoot, '.claude', 'skills'), '.claude/skills'),
|
|
52
|
+
collectSkillsIn(join(home, '.claude', 'skills'), '~/.claude/skills'),
|
|
53
|
+
]),
|
|
54
|
+
fetchGuardProbes(),
|
|
55
|
+
]);
|
|
56
|
+
const harnesses = [];
|
|
57
|
+
for (const type of types) {
|
|
58
|
+
const gateKind = gateKindForHarness(type);
|
|
59
|
+
// The antigravity harness is listed once per product found, each under
|
|
60
|
+
// its own gate id with its own gate file and events (gateIdentity.ts in
|
|
61
|
+
// @intutic/shared-types); with neither found, once under its own id.
|
|
62
|
+
const gateIds = type === 'antigravity' ? await antigravityGateIdentities(opts.workspaceRoot, { home, path: opts.path }) : [];
|
|
63
|
+
const split = gateIds.length > 0;
|
|
64
|
+
for (const id of split ? gateIds : [type]) {
|
|
65
|
+
const gateFile = gateKind !== 'hook' ? null : split ? await findIdentityGateFile(id, opts.workspaceRoot, home) : await findGateFile(type, opts.workspaceRoot, home);
|
|
66
|
+
// Listed under the harness id, it carries the events of every gate the harness has.
|
|
67
|
+
const sighting = (split ? [id] : gateIdentitiesOf(type))
|
|
68
|
+
.map((g) => mergeSightings(sightings[g], sideSightings[g]))
|
|
69
|
+
.reduce((acc, g) => mergeSightings(acc, g), undefined);
|
|
70
|
+
const version = versions.get(type);
|
|
71
|
+
harnesses.push({
|
|
72
|
+
type: id,
|
|
73
|
+
...(version ? { version } : {}),
|
|
74
|
+
configured: configured.has(type),
|
|
75
|
+
...(disconnected.has(type) ? { disconnected: true } : {}),
|
|
76
|
+
gateKind,
|
|
77
|
+
gateInstalled: gateKind === 'hook' ? gateFile !== null : null,
|
|
78
|
+
...(gateFile ? { gateFile: homeRelativePath(gateFile, home) } : {}),
|
|
79
|
+
lastHookEventAt: sighting?.lastEventAt ?? null,
|
|
80
|
+
guardsDisabledAt: sighting?.guardsDisabledAt ?? null,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const skills = skillSets.flat().map((s) => ({
|
|
85
|
+
name: s.name,
|
|
86
|
+
source: s.source,
|
|
87
|
+
...(s.sha256 ? { sha256: s.sha256 } : {}),
|
|
88
|
+
scanned: s.scanned,
|
|
89
|
+
clean: s.clean,
|
|
90
|
+
findingsCount: s.findingsCount,
|
|
91
|
+
scriptCount: s.scripts?.total ?? 0,
|
|
92
|
+
}));
|
|
93
|
+
return {
|
|
94
|
+
schemaVersion: DEVICE_INVENTORY_SCHEMA_VERSION,
|
|
95
|
+
collectedAt: newIso(),
|
|
96
|
+
workspace: homeRelativePath(opts.workspaceRoot, home),
|
|
97
|
+
harnesses,
|
|
98
|
+
mcpServers: mcp.map((s) => ({
|
|
99
|
+
server: s.server,
|
|
100
|
+
harness: s.harness,
|
|
101
|
+
transport: s.transport,
|
|
102
|
+
wrapped: s.wrapped,
|
|
103
|
+
...(s.endpoint ? { endpoint: s.endpoint } : {}),
|
|
104
|
+
...(s.ungovernedReason ? { ungovernedReason: s.ungovernedReason } : {}),
|
|
105
|
+
})),
|
|
106
|
+
skills,
|
|
107
|
+
...(probes ? { guardProbes: { total: probes.total, failed: probes.failed, ranAt: probes.ranAt } } : {}),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Sends the inventory to `POST /api/v1/agents/report` as an inventory-only
|
|
112
|
+
* report: the device and an `inventory` facet, no agent. Returns whether the
|
|
113
|
+
* control plane accepted it. Never throws: a failed report is retried on the
|
|
114
|
+
* next inventory cycle.
|
|
115
|
+
*/
|
|
116
|
+
export async function reportDeviceInventory(controlPlaneUrl, apiKey, device, inventory) {
|
|
117
|
+
try {
|
|
118
|
+
const res = await fetch(`${controlPlaneUrl}/api/v1/agents/report`, {
|
|
119
|
+
method: 'POST',
|
|
120
|
+
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${apiKey}` },
|
|
121
|
+
body: JSON.stringify({ device, facets: { inventory }, reportedAt: newIso() }),
|
|
122
|
+
signal: AbortSignal.timeout(15_000),
|
|
123
|
+
});
|
|
124
|
+
if (!res.ok)
|
|
125
|
+
console.warn(`[sync-daemon] inventory report failed: ${res.status}`);
|
|
126
|
+
return res.ok;
|
|
127
|
+
}
|
|
128
|
+
catch (err) {
|
|
129
|
+
console.warn('[sync-daemon] inventory report error:', err instanceof Error ? err.message : err);
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=inventory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.js","sourceRoot":"","sources":["../src/inventory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EACL,+BAA+B,EAC/B,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GAMjB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAA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AK,UAAU,qBAAqB,CACzC,eAAuB,EACvB,MAAc,EACd,MAA+B,EAC/B,SAA0B;IAE1B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,eAAe,uBAAuB,EAAE;YACjE,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,UAAU,MAAM,EAAE,EAAE;YAClF,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC;YAC7E,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC;SACpC,CAAC,CAAA;QACF,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,CAAC,IAAI,CAAC,0CAA0C,GAAG,CAAC,MAAM,EAAE,CAAC,CAAA;QACjF,OAAO,GAAG,CAAC,EAAE,CAAA;IACf,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,uCAAuC,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QAC/F,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC"}
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
* If the connection fails (connection refused/timed out) or succeeds with an
|
|
12
12
|
* Intutic-signed certificate, containment is active and verified.
|
|
13
13
|
*
|
|
14
|
-
* LLD #14 — Phase 6 active compliance probes (6C-1)
|
|
15
14
|
* @module
|
|
16
15
|
*/
|
|
17
16
|
export interface ProbeResult {
|
|
@@ -25,6 +24,8 @@ export interface ProbeResult {
|
|
|
25
24
|
workspaceId: string;
|
|
26
25
|
timestamp: string;
|
|
27
26
|
incidentId: string;
|
|
27
|
+
/** This detection's id, made once: a resend of it is processed once. */
|
|
28
|
+
eventId: string;
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complianceProbes.d.ts","sourceRoot":"","sources":["../../src/lib/complianceProbes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"complianceProbes.d.ts","sourceRoot":"","sources":["../../src/lib/complianceProbes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,gBAAgB,CAAA;QACvB,QAAQ,EAAE,MAAM,CAAA;QAChB,MAAM,EAAE,MAAM,CAAA;QACd,WAAW,EAAE,MAAM,CAAA;QACnB,SAAS,EAAE,MAAM,CAAA;QACjB,UAAU,EAAE,MAAM,CAAA;QAClB,wEAAwE;QACxE,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,SAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAsF5G;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,SAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAiBjG"}
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
* If the connection fails (connection refused/timed out) or succeeds with an
|
|
12
12
|
* Intutic-signed certificate, containment is active and verified.
|
|
13
13
|
*
|
|
14
|
-
* LLD #14 — Phase 6 active compliance probes (6C-1)
|
|
15
14
|
* @module
|
|
16
15
|
*/
|
|
17
16
|
import * as https from 'node:https';
|
|
@@ -65,6 +64,7 @@ export function checkHostContainment(hostname, workspaceId, port = 443) {
|
|
|
65
64
|
workspaceId,
|
|
66
65
|
timestamp: ts,
|
|
67
66
|
incidentId,
|
|
67
|
+
eventId: crypto.randomBytes(16).toString('hex'),
|
|
68
68
|
},
|
|
69
69
|
});
|
|
70
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complianceProbes.js","sourceRoot":"","sources":["../../src/lib/complianceProbes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"complianceProbes.js","sourceRoot":"","sources":["../../src/lib/complianceProbes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,MAAM,GAAG,GAAG,YAAY,CAAC,mBAAmB,CAAC,CAAA;AAkB7C;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAgB,EAAE,WAAmB,EAAE,IAAI,GAAG,GAAG;IACpF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,IAAI,QAAQ,GAAG,KAAK,CAAA;QAEpB,MAAM,WAAW,GAAyB;YACxC,QAAQ;YACR,IAAI;YACJ,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,IAAI;SACd,CAAA;QACD,8FAA8F;QAC9F,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CACtD;QAAC,WAAuC,CAAC,WAAW,CAAC,GAAG,KAAK,CAAA;QAE9D,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,EAAE;YAC7C,IAAI,QAAQ;gBAAE,OAAM;YACpB,QAAQ,GAAG,IAAI,CAAA;YAEf,MAAM,MAAM,GAAG,GAAG,CAAC,MAAuB,CAAA;YAC1C,MAAM,IAAI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oCAAoC,CAAC,CAAA;IAE1D,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,oBAAoB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IAEnG,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IAClD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,GAAG,CAAC,IAAI,CACN,EAAE,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EACtC,2DAA2D,CAC5D,CAAA;IACH,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAA;IAC3E,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -29,13 +29,22 @@
|
|
|
29
29
|
* pattern (i): a DO-NOT-EDIT header + `atomicWrite`. Gitignored — runtime
|
|
30
30
|
* artifacts stay untracked, the same rule this repo's own CLAUDE.md doc
|
|
31
31
|
* comment states for daemon-generated governance files.
|
|
32
|
-
* 2.
|
|
33
|
-
*
|
|
34
|
-
* (`
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
32
|
+
* 2. The newest ~10 entries, delivered to every active harness that reads
|
|
33
|
+
* an instructions file, where `HARNESS_RULES_FILES` says it reads them
|
|
34
|
+
* (`decisionsTargetOf`) — this is what makes the digest something the
|
|
35
|
+
* agent actually reads without needing to know `.intutic/DECISIONS.md`
|
|
36
|
+
* exists. In a file the user also writes (`AGENTS.md`, `GEMINI.md`,
|
|
37
|
+
* ...) it is a marked section of its own (`INTUTIC:DECISIONS_LOG`),
|
|
38
|
+
* apart from the rules section; next to a rules file of Intutic's own it
|
|
39
|
+
* is a second file (`.claude/rules/intutic-decisions.md`, ...). Claude
|
|
40
|
+
* Code gets it from `.claude/rules/`, which it loads with or without a
|
|
41
|
+
* `CLAUDE.md`; `CLAUDE.md` itself is never written. When Claude Code
|
|
42
|
+
* also reads the workspace's `AGENTS.md` and that file carries the
|
|
43
|
+
* section for another harness, Claude Code's own file is left out, so it
|
|
44
|
+
* does not read the log twice (see `claudeAgentsMd.ts`).
|
|
45
|
+
*
|
|
46
|
+
* Earlier versions put the section in `CLAUDE.md`; {@link
|
|
47
|
+
* retireClaudeMdDigest} takes it out again on every sync.
|
|
39
48
|
*
|
|
40
49
|
* Deliberately does NOT reuse `configWriter.ts`'s own `fileHeader()` for the
|
|
41
50
|
* DECISIONS.md header — that helper stamps `newIso()` (wall-clock "Last
|
|
@@ -49,6 +58,8 @@
|
|
|
49
58
|
import { HarnessType } from '@intutic/shared-types';
|
|
50
59
|
/** Relative to the workspace root. */
|
|
51
60
|
export declare const DECISIONS_LOG_RELATIVE_PATH: string;
|
|
61
|
+
/** First line of the decisions log's own files, which `intutic disconnect` recognises. */
|
|
62
|
+
export declare const DECISIONS_FILE_HEADER = "# Intutic Governed Decisions Log (auto-generated)";
|
|
52
63
|
/** One digest entry, exactly as `GET /api/v1/workspace/decisions-digest` returns it — the summary line is already rendered server-side. */
|
|
53
64
|
export interface DecisionsDigestEntry {
|
|
54
65
|
id: string;
|
|
@@ -65,7 +76,7 @@ export interface DecisionsDigestOptions {
|
|
|
65
76
|
apiKey: string;
|
|
66
77
|
workspaceId: string;
|
|
67
78
|
workspaceRoot: string;
|
|
68
|
-
/** Active harnesses this cycle
|
|
79
|
+
/** Active harnesses this cycle: each that reads an instructions file gets the newest entries there. */
|
|
69
80
|
harnesses: HarnessType[];
|
|
70
81
|
}
|
|
71
82
|
/**
|
|
@@ -76,16 +87,23 @@ export interface DecisionsDigestOptions {
|
|
|
76
87
|
export declare function fetchDecisionsDigest(opts: Pick<DecisionsDigestOptions, 'controlPlaneUrl' | 'apiKey' | 'workspaceId'>): Promise<DecisionsDigestResponse | null>;
|
|
77
88
|
/** Renders the full bounded record written to `.intutic/DECISIONS.md`. */
|
|
78
89
|
export declare function renderDecisionsMarkdown(entries: DecisionsDigestEntry[]): string;
|
|
79
|
-
/**
|
|
80
|
-
export declare function
|
|
90
|
+
/** The newest `limit` entries, as the body of the section or file each harness reads. */
|
|
91
|
+
export declare function renderDecisionsSectionBody(entries: DecisionsDigestEntry[], limit?: number): string;
|
|
92
|
+
/**
|
|
93
|
+
* Writes `body` wherever each of `harnesses` reads its instructions, once per
|
|
94
|
+
* file. Claude Code's own file is left out (and removed) when Claude Code
|
|
95
|
+
* reads the workspace's `AGENTS.md` and that file gets the section for
|
|
96
|
+
* another harness.
|
|
97
|
+
*/
|
|
98
|
+
export declare function writeDecisionsTargets(workspaceRoot: string, harnesses: readonly HarnessType[], body: string): Promise<void>;
|
|
81
99
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
100
|
+
* Takes out the decisions-log section earlier versions wrote into the
|
|
101
|
+
* workspace's `CLAUDE.md`, leaving the user's text as it was. A `CLAUDE.md`
|
|
102
|
+
* Intutic created that holds nothing else goes, with its record; one an
|
|
103
|
+
* earlier version wrote whole is given back (`retireRulesFile`). Runs on
|
|
104
|
+
* every sync, whether or not the decisions log is on.
|
|
87
105
|
*/
|
|
88
|
-
export declare function
|
|
106
|
+
export declare function retireClaudeMdDigest(workspaceRoot: string): Promise<void>;
|
|
89
107
|
/**
|
|
90
108
|
* Fetch and write both files in one call, mirroring `refreshEgressPolicy`.
|
|
91
109
|
* Never throws — a failed poll must not take down the sync loop.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decisionsDigest.d.ts","sourceRoot":"","sources":["../../src/lib/decisionsDigest.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"decisionsDigest.d.ts","sourceRoot":"","sources":["../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,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BjI;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB/E;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CAe5C"}
|
|
@@ -29,13 +29,22 @@
|
|
|
29
29
|
* pattern (i): a DO-NOT-EDIT header + `atomicWrite`. Gitignored — runtime
|
|
30
30
|
* artifacts stay untracked, the same rule this repo's own CLAUDE.md doc
|
|
31
31
|
* comment states for daemon-generated governance files.
|
|
32
|
-
* 2.
|
|
33
|
-
*
|
|
34
|
-
* (`
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
32
|
+
* 2. The newest ~10 entries, delivered to every active harness that reads
|
|
33
|
+
* an instructions file, where `HARNESS_RULES_FILES` says it reads them
|
|
34
|
+
* (`decisionsTargetOf`) — this is what makes the digest something the
|
|
35
|
+
* agent actually reads without needing to know `.intutic/DECISIONS.md`
|
|
36
|
+
* exists. In a file the user also writes (`AGENTS.md`, `GEMINI.md`,
|
|
37
|
+
* ...) it is a marked section of its own (`INTUTIC:DECISIONS_LOG`),
|
|
38
|
+
* apart from the rules section; next to a rules file of Intutic's own it
|
|
39
|
+
* is a second file (`.claude/rules/intutic-decisions.md`, ...). Claude
|
|
40
|
+
* Code gets it from `.claude/rules/`, which it loads with or without a
|
|
41
|
+
* `CLAUDE.md`; `CLAUDE.md` itself is never written. When Claude Code
|
|
42
|
+
* also reads the workspace's `AGENTS.md` and that file carries the
|
|
43
|
+
* section for another harness, Claude Code's own file is left out, so it
|
|
44
|
+
* does not read the log twice (see `claudeAgentsMd.ts`).
|
|
45
|
+
*
|
|
46
|
+
* Earlier versions put the section in `CLAUDE.md`; {@link
|
|
47
|
+
* retireClaudeMdDigest} takes it out again on every sync.
|
|
39
48
|
*
|
|
40
49
|
* Deliberately does NOT reuse `configWriter.ts`'s own `fileHeader()` for the
|
|
41
50
|
* DECISIONS.md header — that helper stamps `newIso()` (wall-clock "Last
|
|
@@ -49,13 +58,18 @@
|
|
|
49
58
|
import * as fs from 'node:fs/promises';
|
|
50
59
|
import * as path from 'node:path';
|
|
51
60
|
import { createLogger } from '@intutic/logger';
|
|
52
|
-
import { HarnessType } from '@intutic/shared-types';
|
|
53
|
-
import {
|
|
61
|
+
import { HarnessType, decisionsTargetOf, rulesFileOf } from '@intutic/shared-types';
|
|
62
|
+
import { atomicWrite } from '../configWriter.js';
|
|
63
|
+
import { DECISIONS_MARKERS, removeRulesSection, retireRulesFile, writeRulesSection } from '../harness/rulesSection.js';
|
|
64
|
+
import { claudeCodeReadsAgentsMd } from '../harness/claudeAgentsMd.js';
|
|
65
|
+
import { openclawAgentWorkspace } from '../harness/openclawHooks.js';
|
|
66
|
+
import { ensureAiderReadEntry } from '../harness/aiderConfigMerger.js';
|
|
67
|
+
import { forgetOriginal, readOriginal, writeOwnedFile } from '../disconnect/originals.js';
|
|
54
68
|
const log = createLogger('sync-decisions-digest');
|
|
55
69
|
/** Relative to the workspace root. */
|
|
56
70
|
export const DECISIONS_LOG_RELATIVE_PATH = path.join('.intutic', 'DECISIONS.md');
|
|
57
|
-
|
|
58
|
-
const
|
|
71
|
+
/** First line of the decisions log's own files, which `intutic disconnect` recognises. */
|
|
72
|
+
export const DECISIONS_FILE_HEADER = '# Intutic Governed Decisions Log (auto-generated)';
|
|
59
73
|
/**
|
|
60
74
|
* Trims trailing `/` without a regex — see the identical helper in
|
|
61
75
|
* `egressPolicy.ts`/`approvedBypasses.ts`: `/\/+$/` is flagged by CodeQL as a
|
|
@@ -131,29 +145,93 @@ export function renderDecisionsMarkdown(entries) {
|
|
|
131
145
|
const lines = entries.map((e) => `- ${e.timestamp} — ${e.summary}`);
|
|
132
146
|
return header + lines.join('\n') + '\n';
|
|
133
147
|
}
|
|
134
|
-
/**
|
|
135
|
-
export function
|
|
148
|
+
/** The newest `limit` entries, as the body of the section or file each harness reads. */
|
|
149
|
+
export function renderDecisionsSectionBody(entries, limit = 10) {
|
|
136
150
|
const bounded = entries.slice(0, limit);
|
|
137
151
|
const lines = bounded.length > 0
|
|
138
152
|
? bounded.map((e) => `- ${e.timestamp} — ${e.summary}`)
|
|
139
153
|
: ['_No governance decisions recorded yet._'];
|
|
140
|
-
return [
|
|
154
|
+
return ['## Recent Governed Decisions', '', ...lines].join('\n');
|
|
155
|
+
}
|
|
156
|
+
/** A harness's decisions file: the product's front matter, the header, the entries. */
|
|
157
|
+
function renderDecisionsFile(body, frontMatter) {
|
|
158
|
+
const head = frontMatter ? `---\n${frontMatter}\n---\n\n` : '';
|
|
159
|
+
return `${head}${DECISIONS_FILE_HEADER}\n# DO NOT EDIT — managed by intutic sync daemon\n\n${body}\n`;
|
|
160
|
+
}
|
|
161
|
+
async function readText(file) {
|
|
162
|
+
try {
|
|
163
|
+
return await fs.readFile(file, 'utf-8');
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
141
168
|
}
|
|
142
169
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* absent, the section is appended once, with a separating blank line.
|
|
170
|
+
* Writes `body` wherever each of `harnesses` reads its instructions, once per
|
|
171
|
+
* file. Claude Code's own file is left out (and removed) when Claude Code
|
|
172
|
+
* reads the workspace's `AGENTS.md` and that file gets the section for
|
|
173
|
+
* another harness.
|
|
148
174
|
*/
|
|
149
|
-
export function
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
175
|
+
export async function writeDecisionsTargets(workspaceRoot, harnesses, body) {
|
|
176
|
+
const claudeFromAgentsMd = harnesses.includes(HarnessType.CLAUDE_CODE) &&
|
|
177
|
+
harnesses.some((h) => rulesFileOf(h) === 'AGENTS.md') &&
|
|
178
|
+
(await claudeCodeReadsAgentsMd(workspaceRoot));
|
|
179
|
+
const written = new Set();
|
|
180
|
+
for (const harness of harnesses) {
|
|
181
|
+
const target = decisionsTargetOf(harness);
|
|
182
|
+
if (!target)
|
|
183
|
+
continue;
|
|
184
|
+
const file = target.kind === 'section' && target.scope === 'user'
|
|
185
|
+
? path.join(await openclawAgentWorkspace(), 'AGENTS.md')
|
|
186
|
+
: path.join(workspaceRoot, target.path);
|
|
187
|
+
if (harness === HarnessType.CLAUDE_CODE && claudeFromAgentsMd) {
|
|
188
|
+
await retireRulesFile(file, workspaceRoot);
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
if (written.has(file))
|
|
192
|
+
continue;
|
|
193
|
+
written.add(file);
|
|
194
|
+
if (target.kind === 'section') {
|
|
195
|
+
await writeRulesSection(file, workspaceRoot, body, DECISIONS_MARKERS);
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
const content = renderDecisionsFile(body, target.frontMatter?.('Intutic governed decisions log') ?? '');
|
|
199
|
+
if ((await readText(file)) !== content)
|
|
200
|
+
await writeOwnedFile(file, workspaceRoot, content);
|
|
201
|
+
// Aider loads no file it is not told about.
|
|
202
|
+
if (harness === HarnessType.AIDER)
|
|
203
|
+
await ensureAiderReadEntry(path.join(workspaceRoot, '.aider.conf.yml'), file);
|
|
154
204
|
}
|
|
155
|
-
|
|
156
|
-
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Takes out the decisions-log section earlier versions wrote into the
|
|
208
|
+
* workspace's `CLAUDE.md`, leaving the user's text as it was. A `CLAUDE.md`
|
|
209
|
+
* Intutic created that holds nothing else goes, with its record; one an
|
|
210
|
+
* earlier version wrote whole is given back (`retireRulesFile`). Runs on
|
|
211
|
+
* every sync, whether or not the decisions log is on.
|
|
212
|
+
*/
|
|
213
|
+
export async function retireClaudeMdDigest(workspaceRoot) {
|
|
214
|
+
const file = path.join(workspaceRoot, 'CLAUDE.md');
|
|
215
|
+
const text = await readText(file);
|
|
216
|
+
if (text === null)
|
|
217
|
+
return;
|
|
218
|
+
const next = removeRulesSection(text, DECISIONS_MARKERS);
|
|
219
|
+
if (next !== null) {
|
|
220
|
+
const record = await readOriginal(file, workspaceRoot);
|
|
221
|
+
if (next.trim() === '' && record && !record.existed) {
|
|
222
|
+
await fs.rm(file, { force: true });
|
|
223
|
+
await forgetOriginal(file, workspaceRoot);
|
|
224
|
+
log.info({ action: 'decisions_claude_md_removed', path: file }, 'Removed the CLAUDE.md an earlier version created for the decisions log');
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
const mode = (await fs.stat(file)).mode & 0o7777;
|
|
228
|
+
const tmp = `${file}.intutic-tmp`;
|
|
229
|
+
await fs.writeFile(tmp, next, 'utf-8');
|
|
230
|
+
await fs.chmod(tmp, mode);
|
|
231
|
+
await fs.rename(tmp, file);
|
|
232
|
+
log.info({ action: 'decisions_claude_md_section_removed', path: file }, 'Took the decisions-log section out of CLAUDE.md');
|
|
233
|
+
}
|
|
234
|
+
await retireRulesFile(file, workspaceRoot);
|
|
157
235
|
}
|
|
158
236
|
/**
|
|
159
237
|
* Fetch and write both files in one call, mirroring `refreshEgressPolicy`.
|
|
@@ -169,26 +247,7 @@ export async function refreshDecisionsDigest(opts) {
|
|
|
169
247
|
try {
|
|
170
248
|
const fullPath = path.join(opts.workspaceRoot, DECISIONS_LOG_RELATIVE_PATH);
|
|
171
249
|
await atomicWrite(fullPath, renderDecisionsMarkdown(digest.entries));
|
|
172
|
-
|
|
173
|
-
const claudeMdPath = path.join(opts.workspaceRoot, HARNESS_FILES[HarnessType.CLAUDE_CODE]);
|
|
174
|
-
let existing = null;
|
|
175
|
-
try {
|
|
176
|
-
existing = await fs.readFile(claudeMdPath, 'utf-8');
|
|
177
|
-
}
|
|
178
|
-
catch {
|
|
179
|
-
existing = null;
|
|
180
|
-
}
|
|
181
|
-
if (existing !== null) {
|
|
182
|
-
const section = renderBoundedSection(digest.entries, 10);
|
|
183
|
-
const updated = injectBoundedSection(existing, section);
|
|
184
|
-
if (updated !== existing) {
|
|
185
|
-
await atomicWrite(claudeMdPath, updated);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
log.debug({ action: 'decisions_digest_skip_inject' }, 'claude-code config file not written yet this run — skipping bounded-section injection this cycle');
|
|
190
|
-
}
|
|
191
|
-
}
|
|
250
|
+
await writeDecisionsTargets(opts.workspaceRoot, opts.harnesses, renderDecisionsSectionBody(digest.entries, 10));
|
|
192
251
|
return { entriesWritten: digest.entries.length };
|
|
193
252
|
}
|
|
194
253
|
catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decisionsDigest.js","sourceRoot":"","sources":["../../src/lib/decisionsDigest.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"decisionsDigest.js","sourceRoot":"","sources":["../../src/lib/decisionsDigest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACtH,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO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AC3E,MAAM,WAAW,CAAC,QAAQ,EAAE,uBAAuB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;QAEpE,MAAM,qBAAqB,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA;QAE/G,OAAO,EAAE,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,CAAA;IAClD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,+BAA+B,EAAE,GAAG,EAAE,EAAE,qCAAqC,CAAC,CAAA;QACjG,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* egressPolicy.ts — ships the workspace's central egress policy *to* the
|
|
3
3
|
* machine, so an admin sets `enforce`/`monitor` + an allow list once in the
|
|
4
|
-
* control plane rather than in every developer's local proxy config
|
|
5
|
-
*
|
|
4
|
+
* control plane rather than in every developer's local proxy config.
|
|
5
|
+
* Mirrors `policySnapshot.ts` / `approvedBypasses.ts`: fetch from
|
|
6
6
|
* the control plane, write a local artifact under `.intutic/hooks` with
|
|
7
7
|
* integrity headers, and let the consumer (here the Rust proxy) read it.
|
|
8
8
|
*
|
package/dist/lib/egressPolicy.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* egressPolicy.ts — ships the workspace's central egress policy *to* the
|
|
3
3
|
* machine, so an admin sets `enforce`/`monitor` + an allow list once in the
|
|
4
|
-
* control plane rather than in every developer's local proxy config
|
|
5
|
-
*
|
|
4
|
+
* control plane rather than in every developer's local proxy config.
|
|
5
|
+
* Mirrors `policySnapshot.ts` / `approvedBypasses.ts`: fetch from
|
|
6
6
|
* the control plane, write a local artifact under `.intutic/hooks` with
|
|
7
7
|
* integrity headers, and let the consumer (here the Rust proxy) read it.
|
|
8
8
|
*
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MCP server registry and allowlist decisions in Python, for the bash
|
|
3
|
+
* gates (their extractor already requires python3).
|
|
4
|
+
*
|
|
5
|
+
* Byte-identical to `packages/intutic-clawde/intutic_clawde/gate/mcp_registry.py`,
|
|
6
|
+
* which a test compares; edit that file and copy it here. It is the
|
|
7
|
+
* transliteration of `@intutic/shared-types`'s mcpRegistryRecord.ts, and both
|
|
8
|
+
* run the shared vectors.
|
|
9
|
+
*/
|
|
10
|
+
export declare const MCP_REGISTRY_PY_SOURCE: string;
|
|
11
|
+
//# sourceMappingURL=mcpRegistryPy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpRegistryPy.d.ts","sourceRoot":"","sources":["../../src/lib/mcpRegistryPy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,QAkKlC,CAAA"}
|