@intutic/sync-daemon 2.1.0 → 2.3.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 +24 -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 +45 -25
- package/dist/configReader.d.ts.map +1 -1
- package/dist/configReader.js +70 -46
- package/dist/configReader.js.map +1 -1
- package/dist/configWriter.d.ts +32 -45
- package/dist/configWriter.d.ts.map +1 -1
- package/dist/configWriter.js +52 -686
- package/dist/configWriter.js.map +1 -1
- package/dist/disconnect/harnesses.d.ts +29 -0
- package/dist/disconnect/harnesses.d.ts.map +1 -0
- package/dist/disconnect/harnesses.js +805 -0
- package/dist/disconnect/harnesses.js.map +1 -0
- package/dist/disconnect/index.d.ts +25 -0
- package/dist/disconnect/index.d.ts.map +1 -0
- package/dist/disconnect/index.js +92 -0
- package/dist/disconnect/index.js.map +1 -0
- package/dist/disconnect/mcp.d.ts +81 -0
- package/dist/disconnect/mcp.d.ts.map +1 -0
- package/dist/disconnect/mcp.js +354 -0
- package/dist/disconnect/mcp.js.map +1 -0
- package/dist/disconnect/originals.d.ts +88 -0
- package/dist/disconnect/originals.d.ts.map +1 -0
- package/dist/disconnect/originals.js +257 -0
- package/dist/disconnect/originals.js.map +1 -0
- package/dist/disconnect/plan.d.ts +175 -0
- package/dist/disconnect/plan.d.ts.map +1 -0
- package/dist/disconnect/plan.js +580 -0
- package/dist/disconnect/plan.js.map +1 -0
- package/dist/disconnect/recognise.d.ts +43 -0
- package/dist/disconnect/recognise.d.ts.map +1 -0
- package/dist/disconnect/recognise.js +108 -0
- package/dist/disconnect/recognise.js.map +1 -0
- package/dist/disconnect/tomlLines.d.ts +39 -0
- package/dist/disconnect/tomlLines.d.ts.map +1 -0
- package/dist/disconnect/tomlLines.js +105 -0
- package/dist/disconnect/tomlLines.js.map +1 -0
- package/dist/harness/aiderConfigMerger.d.ts +29 -8
- package/dist/harness/aiderConfigMerger.d.ts.map +1 -1
- package/dist/harness/aiderConfigMerger.js +63 -12
- 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 +38 -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 -6
- package/dist/harness/claudeCodeHooks.d.ts.map +1 -1
- package/dist/harness/claudeCodeHooks.js +115 -28
- package/dist/harness/claudeCodeHooks.js.map +1 -1
- package/dist/harness/claudeProjectApproval.d.ts +53 -0
- package/dist/harness/claudeProjectApproval.d.ts.map +1 -0
- package/dist/harness/claudeProjectApproval.js +159 -0
- package/dist/harness/claudeProjectApproval.js.map +1 -0
- package/dist/harness/clineHooks.d.ts +0 -1
- package/dist/harness/clineHooks.d.ts.map +1 -1
- package/dist/harness/clineHooks.js +13 -4
- package/dist/harness/clineHooks.js.map +1 -1
- package/dist/harness/codexConfigMerger.d.ts.map +1 -1
- package/dist/harness/codexConfigMerger.js +4 -0
- package/dist/harness/codexConfigMerger.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 +15 -4
- package/dist/harness/codexHooks.js.map +1 -1
- package/dist/harness/continueConfigMerger.d.ts.map +1 -1
- package/dist/harness/continueConfigMerger.js +4 -0
- package/dist/harness/continueConfigMerger.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 +12 -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 +12 -5
- package/dist/harness/dshHooks.js.map +1 -1
- 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 +195 -69
- package/dist/harness/gateBody.d.ts.map +1 -1
- package/dist/harness/gateBody.js +847 -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 +11 -10
- 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 +29 -1
- package/dist/harness/gooseHooks.d.ts.map +1 -1
- package/dist/harness/gooseHooks.js +107 -69
- 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 +20 -18
- 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 +55 -19
- package/dist/harness/hermesHooks.js.map +1 -1
- package/dist/harness/holdRedaction.d.ts +4 -1
- package/dist/harness/holdRedaction.d.ts.map +1 -1
- package/dist/harness/holdRedaction.js +32 -8
- package/dist/harness/holdRedaction.js.map +1 -1
- package/dist/harness/jetbrainsXmlConfig.d.ts +20 -0
- package/dist/harness/jetbrainsXmlConfig.d.ts.map +1 -1
- package/dist/harness/jetbrainsXmlConfig.js +39 -18
- package/dist/harness/jetbrainsXmlConfig.js.map +1 -1
- package/dist/harness/mcpAutoWrite.d.ts +62 -25
- package/dist/harness/mcpAutoWrite.d.ts.map +1 -1
- package/dist/harness/mcpAutoWrite.js +406 -95
- 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 +15 -7
- 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 +9 -8
- 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 +11 -3
- package/dist/harness/openWebuiHooks.js.map +1 -1
- package/dist/harness/openclawHooks.d.ts +75 -18
- package/dist/harness/openclawHooks.d.ts.map +1 -1
- package/dist/harness/openclawHooks.js +214 -160
- package/dist/harness/openclawHooks.js.map +1 -1
- package/dist/harness/openhandsHooks.d.ts +37 -11
- package/dist/harness/openhandsHooks.d.ts.map +1 -1
- package/dist/harness/openhandsHooks.js +148 -97
- 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 -163
- 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 +18 -3
- package/dist/harness/windsurfHooks.d.ts.map +1 -1
- package/dist/harness/windsurfHooks.js +41 -8
- package/dist/harness/windsurfHooks.js.map +1 -1
- package/dist/harness/windsurfJetBrainsProxy.d.ts +1 -1
- package/dist/harness/windsurfJetBrainsProxy.d.ts.map +1 -1
- package/dist/harness/windsurfJetBrainsProxy.js +5 -1
- package/dist/harness/windsurfJetBrainsProxy.js.map +1 -1
- package/dist/index.d.ts +21 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -19
- 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 +35 -17
- package/dist/lib/decisionsDigest.d.ts.map +1 -1
- package/dist/lib/decisionsDigest.js +106 -47
- 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 +63 -9
- package/dist/lib/policySnapshot.d.ts.map +1 -1
- package/dist/lib/policySnapshot.js +269 -45
- 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 +18 -12
- package/dist/sessionReporter.d.ts.map +1 -1
- package/dist/sessionReporter.js +37 -24
- 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 +142 -0
- package/dist/syncCycle.d.ts.map +1 -0
- package/dist/syncCycle.js +327 -0
- package/dist/syncCycle.js.map +1 -0
- package/dist/trajectoryMonitor.d.ts +2 -4
- package/dist/trajectoryMonitor.d.ts.map +1 -1
- package/dist/trajectoryMonitor.js +2 -5
- 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 +36 -7
- package/dist/watcher/settingsGuard.d.ts.map +1 -1
- package/dist/watcher/settingsGuard.js +397 -60
- 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 -30
- package/dist/harness/claudeDesktopHooks.d.ts.map +0 -1
- package/dist/harness/claudeDesktopHooks.js +0 -254
- 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 -247
- 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 -286
- package/dist/harness/rooCodeHooks.js.map +0 -1
- package/dist/hashReporter.d.ts +0 -33
- package/dist/hashReporter.d.ts.map +0 -1
- package/dist/hashReporter.js +0 -69
- package/dist/hashReporter.js.map +0 -1
- package/dist/integrityStore.d.ts +0 -35
- package/dist/integrityStore.d.ts.map +0 -1
- package/dist/integrityStore.js +0 -71
- package/dist/integrityStore.js.map +0 -1
- package/dist/lib/gitWorktrees.d.ts +0 -140
- package/dist/lib/gitWorktrees.d.ts.map +0 -1
- package/dist/lib/gitWorktrees.js +0 -191
- package/dist/lib/gitWorktrees.js.map +0 -1
- package/dist/syncLoop.d.ts +0 -172
- package/dist/syncLoop.d.ts.map +0 -1
- package/dist/syncLoop.js +0 -878
- package/dist/syncLoop.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @intutic/sync-daemon — Barrel export.
|
|
3
3
|
*
|
|
4
|
-
* Re-exports the public API of the sync daemon package
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* - `computeFileHashes` / `hashFile` — integrity hashing (hashReporter.ts)
|
|
8
|
-
* - `loadIntegrity` / `saveIntegrity` — local integrity store (integrityStore.ts)
|
|
4
|
+
* Re-exports the public API of the sync daemon package. `intutic connect`
|
|
5
|
+
* (tools/cli) runs the sync loop and calls the per-cycle helpers in
|
|
6
|
+
* syncCycle.ts; the harness writers live under harness/.
|
|
9
7
|
*
|
|
10
8
|
* HLD §3.14 — Real-Time State Mirroring
|
|
11
|
-
* LLD #8 — Sync Daemon / CLI
|
|
12
9
|
*
|
|
13
10
|
* @module
|
|
14
11
|
*/
|
|
15
|
-
export {
|
|
12
|
+
export { syncOfflineTraces, refreshGateCaches, localHoldTokensFor, applySkillOptEdits, reportHarnessAgents, emitSkillFlaggedEvents, APPLIED_SUGGESTIONS_RELATIVE_PATH, } from './syncCycle.js';
|
|
16
13
|
export { collectAgentReport, reportAgent, fetchLocalProxyInstanceId } from './agentReporter.js';
|
|
14
|
+
export { collectDeviceInventory, reportDeviceInventory } from './inventory.js';
|
|
15
|
+
export type { DetectedHarness } from './inventory.js';
|
|
17
16
|
export { startHarnessSession, endAllOpenSessions, readGitInfo } from './sessionReporter.js';
|
|
18
|
-
export
|
|
19
|
-
export {
|
|
20
|
-
export
|
|
21
|
-
export { computeFileHashes, hashFile } from './hashReporter.js';
|
|
22
|
-
export { loadIntegrity, saveIntegrity } from './integrityStore.js';
|
|
23
|
-
export { HARNESS_FILES } from './configWriter.js';
|
|
17
|
+
export { loadLocalSopEntries, HARNESS_FILES, clearImmutable, setImmutable } from './configWriter.js';
|
|
18
|
+
export { captureAndUpload, shouldCaptureThisIteration, redactConfigText } from './configReader.js';
|
|
19
|
+
export { writeBundledSkills } from './skillWriter.js';
|
|
24
20
|
export { SyncWsClient } from './wsClient.js';
|
|
25
21
|
export type { WsClientOptions } from './wsClient.js';
|
|
26
22
|
export { startWatcher } from './watcher/driftWatcher.js';
|
|
27
23
|
export { updatePreToolUseHooks, parseSopConstraints, drainHookEvents, drainReviewRequests, REVIEW_REQUESTS_LOG, REVIEW_REQUESTS_BASENAME, REVIEW_REQUEST_VERSION, } from './harness/claudeCodeHooks.js';
|
|
28
24
|
export type { SopHookConstraints } from './harness/claudeCodeHooks.js';
|
|
29
25
|
export { injectMcpServer } from './harness/mcpAutoWrite.js';
|
|
30
|
-
export {
|
|
26
|
+
export { planDisconnect, DisconnectPlan, HARNESS_REVERSERS, keepOriginal, noteWritten, noteProxyUrl, writeOwnedFile } from './disconnect/index.js';
|
|
27
|
+
export type { DisconnectOptions, PlannedChange, PlanNote } from './disconnect/index.js';
|
|
28
|
+
export { guardPolicySnapshot, guardSettingsFile, isGuardedPath, warnIfDshCoverageGap } from './watcher/settingsGuard.js';
|
|
31
29
|
export { readJsonObjectForMerge } from './harness/jsonMergeTarget.js';
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
30
|
+
export { writeRulesSection, retireRulesFile, rulesSectionOf, RULES_SECTION_START, RULES_SECTION_END, RULES_MARKERS, DECISIONS_MARKERS } from './harness/rulesSection.js';
|
|
31
|
+
export type { SectionMarkers } from './harness/rulesSection.js';
|
|
32
|
+
export { gateKindForHarness } from '@intutic/shared-types';
|
|
33
|
+
export { writeAntigravityHooks, buildGeminiBeforeToolEntry } from './harness/antigravityHooks.js';
|
|
34
|
+
export { writeAntigravityCliHooks, buildAntigravityHookEntry, ANTIGRAVITY_HOOK_NAME } from './harness/antigravityCliHooks.js';
|
|
35
|
+
export { antigravityGateIdentities } from './harness/antigravityProducts.js';
|
|
36
36
|
export { mergeContinueConfig } from './harness/continueConfigMerger.js';
|
|
37
37
|
export { writeOpenWebuiHooks } from './harness/openWebuiHooks.js';
|
|
38
38
|
export { writeN8nHooks } from './harness/n8nHooks.js';
|
|
39
39
|
export { writeHermesHooks } from './harness/hermesHooks.js';
|
|
40
|
-
export { writeOpenclawHooks } from './harness/openclawHooks.js';
|
|
40
|
+
export { writeOpenclawHooks, openclawAgentWorkspace } from './harness/openclawHooks.js';
|
|
41
41
|
export { writePiHooks } from './harness/piHooks.js';
|
|
42
42
|
export { writeCodexHooks } from './harness/codexHooks.js';
|
|
43
43
|
export { mergeCodexConfig } from './harness/codexConfigMerger.js';
|
|
@@ -47,6 +47,7 @@ export { refreshPolicySnapshot, writePolicySnapshot, fetchResolvedPolicy, buildS
|
|
|
47
47
|
export { runComplianceProbes } from './lib/complianceProbes.js';
|
|
48
48
|
export { getActiveAgentProcesses } from './lib/processPoller.js';
|
|
49
49
|
export { TrajectoryMonitor } from './trajectoryMonitor.js';
|
|
50
|
-
export { refreshDecisionsDigest, fetchDecisionsDigest, renderDecisionsMarkdown,
|
|
50
|
+
export { refreshDecisionsDigest, fetchDecisionsDigest, renderDecisionsMarkdown, renderDecisionsSectionBody, retireClaudeMdDigest, writeDecisionsTargets, DECISIONS_LOG_RELATIVE_PATH, DECISIONS_FILE_HEADER, } from './lib/decisionsDigest.js';
|
|
51
|
+
export { claudeCodeReadsAgentsMd } from './harness/claudeAgentsMd.js';
|
|
51
52
|
export type { DecisionsDigestEntry, DecisionsDigestResponse, DecisionsDigestOptions, } from './lib/decisionsDigest.js';
|
|
52
53
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts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MAAM,qBAAqB,CAAA;AACrD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG1D,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,YAAY,EACV,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,0BAA0B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,42 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @intutic/sync-daemon — Barrel export.
|
|
3
3
|
*
|
|
4
|
-
* Re-exports the public API of the sync daemon package
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* - `computeFileHashes` / `hashFile` — integrity hashing (hashReporter.ts)
|
|
8
|
-
* - `loadIntegrity` / `saveIntegrity` — local integrity store (integrityStore.ts)
|
|
4
|
+
* Re-exports the public API of the sync daemon package. `intutic connect`
|
|
5
|
+
* (tools/cli) runs the sync loop and calls the per-cycle helpers in
|
|
6
|
+
* syncCycle.ts; the harness writers live under harness/.
|
|
9
7
|
*
|
|
10
8
|
* HLD §3.14 — Real-Time State Mirroring
|
|
11
|
-
* LLD #8 — Sync Daemon / CLI
|
|
12
9
|
*
|
|
13
10
|
* @module
|
|
14
11
|
*/
|
|
15
|
-
export {
|
|
12
|
+
export { syncOfflineTraces, refreshGateCaches, localHoldTokensFor, applySkillOptEdits, reportHarnessAgents, emitSkillFlaggedEvents, APPLIED_SUGGESTIONS_RELATIVE_PATH, } from './syncCycle.js';
|
|
16
13
|
export { collectAgentReport, reportAgent, fetchLocalProxyInstanceId } from './agentReporter.js';
|
|
14
|
+
export { collectDeviceInventory, reportDeviceInventory } from './inventory.js';
|
|
17
15
|
export { startHarnessSession, endAllOpenSessions, readGitInfo } from './sessionReporter.js';
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export { HARNESS_FILES } from './configWriter.js';
|
|
16
|
+
export { loadLocalSopEntries, HARNESS_FILES, clearImmutable, setImmutable } from './configWriter.js';
|
|
17
|
+
export { captureAndUpload, shouldCaptureThisIteration, redactConfigText } from './configReader.js';
|
|
18
|
+
export { writeBundledSkills } from './skillWriter.js';
|
|
22
19
|
export { SyncWsClient } from './wsClient.js';
|
|
23
20
|
export { startWatcher } from './watcher/driftWatcher.js';
|
|
24
21
|
export { updatePreToolUseHooks, parseSopConstraints, drainHookEvents, drainReviewRequests, REVIEW_REQUESTS_LOG, REVIEW_REQUESTS_BASENAME, REVIEW_REQUEST_VERSION, } from './harness/claudeCodeHooks.js';
|
|
25
22
|
export { injectMcpServer } from './harness/mcpAutoWrite.js';
|
|
26
|
-
export {
|
|
23
|
+
export { planDisconnect, DisconnectPlan, HARNESS_REVERSERS, keepOriginal, noteWritten, noteProxyUrl, writeOwnedFile } from './disconnect/index.js';
|
|
24
|
+
export { guardPolicySnapshot, guardSettingsFile, isGuardedPath, warnIfDshCoverageGap } from './watcher/settingsGuard.js';
|
|
27
25
|
export { readJsonObjectForMerge } from './harness/jsonMergeTarget.js';
|
|
26
|
+
export { writeRulesSection, retireRulesFile, rulesSectionOf, RULES_SECTION_START, RULES_SECTION_END, RULES_MARKERS, DECISIONS_MARKERS } from './harness/rulesSection.js';
|
|
27
|
+
export { gateKindForHarness } from '@intutic/shared-types';
|
|
28
28
|
// Gap 3 fix — Antigravity (Gemini CLI) hook coverage
|
|
29
|
-
export { writeAntigravityHooks } from './harness/antigravityHooks.js';
|
|
30
|
-
|
|
31
|
-
export {
|
|
32
|
-
|
|
33
|
-
export { writeContinueHooks } from './harness/continueHooks.js';
|
|
29
|
+
export { writeAntigravityHooks, buildGeminiBeforeToolEntry } from './harness/antigravityHooks.js';
|
|
30
|
+
export { writeAntigravityCliHooks, buildAntigravityHookEntry, ANTIGRAVITY_HOOK_NAME } from './harness/antigravityCliHooks.js';
|
|
31
|
+
export { antigravityGateIdentities } from './harness/antigravityProducts.js';
|
|
32
|
+
// WS-B — new harness hook coverage (continue, open-webui, n8n)
|
|
34
33
|
export { mergeContinueConfig } from './harness/continueConfigMerger.js';
|
|
35
34
|
export { writeOpenWebuiHooks } from './harness/openWebuiHooks.js';
|
|
36
35
|
export { writeN8nHooks } from './harness/n8nHooks.js';
|
|
37
36
|
// WS-C — Proprietary harness hook coverage (Hermes, Openclaw, Pi)
|
|
38
37
|
export { writeHermesHooks } from './harness/hermesHooks.js';
|
|
39
|
-
export { writeOpenclawHooks } from './harness/openclawHooks.js';
|
|
38
|
+
export { writeOpenclawHooks, openclawAgentWorkspace } from './harness/openclawHooks.js';
|
|
40
39
|
export { writePiHooks } from './harness/piHooks.js';
|
|
41
40
|
// Formerly ungated harnesses with verified native mechanisms
|
|
42
41
|
// (codex: ~/.codex/hooks.json; github-copilot: VS Code agent hooks, Preview)
|
|
@@ -50,5 +49,6 @@ export { runComplianceProbes } from './lib/complianceProbes.js';
|
|
|
50
49
|
export { getActiveAgentProcesses } from './lib/processPoller.js';
|
|
51
50
|
export { TrajectoryMonitor } from './trajectoryMonitor.js';
|
|
52
51
|
// Phase 6 — governed decisions log
|
|
53
|
-
export { refreshDecisionsDigest, fetchDecisionsDigest, renderDecisionsMarkdown,
|
|
52
|
+
export { refreshDecisionsDigest, fetchDecisionsDigest, renderDecisionsMarkdown, renderDecisionsSectionBody, retireClaudeMdDigest, writeDecisionsTargets, DECISIONS_LOG_RELATIVE_PATH, DECISIONS_FILE_HEADER, } from './lib/decisionsDigest.js';
|
|
53
|
+
export { claudeCodeReadsAgentsMd } from './harness/claudeAgentsMd.js';
|
|
54
54
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAC/F,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAE9E,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAE3F,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEpG,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAElG,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAG5C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,8BAA8B,CAAA;AAGrC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,cAAc,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AAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,mCAAmC;AACnC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { type DeviceInventory, type InventoryDeviceIdentity } from '@intutic/shared-types';
|
|
23
|
+
/** One harness the CLI's detection rules found on this machine. */
|
|
24
|
+
export interface DetectedHarness {
|
|
25
|
+
type: string;
|
|
26
|
+
version?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Collects this machine's inventory. Never throws for a missing or unreadable
|
|
30
|
+
* file: an absent config is an absent item, not an error.
|
|
31
|
+
*
|
|
32
|
+
* @param opts.detected - Harnesses the CLI's detection rules found.
|
|
33
|
+
* @param opts.configured - This machine's `intutic connect` harnesses; listed even when detection misses them.
|
|
34
|
+
* @param opts.home - The home directory; defaults to the current user's.
|
|
35
|
+
*/
|
|
36
|
+
export declare function collectDeviceInventory(opts: {
|
|
37
|
+
workspaceRoot: string;
|
|
38
|
+
detected: readonly DetectedHarness[];
|
|
39
|
+
configured: readonly string[];
|
|
40
|
+
/** Harnesses `intutic disconnect --harness` removed Intutic from on this machine. */
|
|
41
|
+
disconnected?: readonly string[];
|
|
42
|
+
home?: string;
|
|
43
|
+
/** The PATH the product probes search (antigravityProducts.ts); defaults to this process's. */
|
|
44
|
+
path?: string;
|
|
45
|
+
}): Promise<DeviceInventory>;
|
|
46
|
+
/**
|
|
47
|
+
* Sends the inventory to `POST /api/v1/agents/report` as an inventory-only
|
|
48
|
+
* report: the device and an `inventory` facet, no agent. Returns whether the
|
|
49
|
+
* control plane accepted it. Never throws: a failed report is retried on the
|
|
50
|
+
* next inventory cycle.
|
|
51
|
+
*/
|
|
52
|
+
export declare function reportDeviceInventory(controlPlaneUrl: string, apiKey: string, device: InventoryDeviceIdentity, inventory: DeviceInventory): Promise<boolean>;
|
|
53
|
+
//# sourceMappingURL=inventory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../src/inventory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,EAKL,KAAK,eAAe,EAEpB,KAAK,uBAAuB,EAG7B,MAAM,uBAAuB,CAAA;AAQ9B,mEAAmE;AACnE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAA;IACpC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,qFAAqF;IACrF,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+FAA+F;IAC/F,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,OAAO,CAAC,eAAe,CAAC,CA2E3B;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,uBAAuB,EAC/B,SAAS,EAAE,eAAe,GACzB,OAAO,CAAC,OAAO,CAAC,CAclB"}
|
|
@@ -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,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC/E,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAChG,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAA;AAQ5E;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,IAS5C;IACC,MAAM,IAAI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,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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E,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"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Opt-in via `WorkspaceSettings.decisionsLogEnabled` (default off). The
|
|
18
18
|
* CALLER is responsible for that gate — `refreshDecisionsDigest` always
|
|
19
|
-
* fetches and writes when invoked, so `
|
|
19
|
+
* fetches and writes when invoked, so `intutic connect` only calls it when the
|
|
20
20
|
* workspace has opted in. When disabled, the caller simply stops calling
|
|
21
21
|
* this module; existing files are left as they were last written rather than
|
|
22
22
|
* being force-deleted (a developer's editor may have that file open) or
|
|
@@ -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":[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