@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/syncLoop.d.ts
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* syncLoop.ts — Core bidirectional sync loop.
|
|
3
|
-
*
|
|
4
|
-
* The sync loop is the heartbeat of the daemon. Each iteration:
|
|
5
|
-
* 1. Fetches config from the control plane (POST /api/v1/sync/config)
|
|
6
|
-
* 2. If configVersion > local → writes SOP content to harness files
|
|
7
|
-
* 3. Computes SHA-256 hashes of local config files
|
|
8
|
-
* 4. Reports hashes + status back to the control plane
|
|
9
|
-
* 5. Calls the onSync callback with the result
|
|
10
|
-
* 6. Sleeps for pollIntervalMs (AbortSignal-aware)
|
|
11
|
-
* 7. Repeats until signal.aborted
|
|
12
|
-
*
|
|
13
|
-
* Design: never crash on a single iteration failure. Errors are
|
|
14
|
-
* caught per-iteration, logged, and the loop continues.
|
|
15
|
-
*
|
|
16
|
-
* HLD §3.14 — Real-Time State Mirroring
|
|
17
|
-
* LLD #8 — Sync Daemon / CLI
|
|
18
|
-
*
|
|
19
|
-
* @module
|
|
20
|
-
*/
|
|
21
|
-
import type { HarnessType, SyncConfigPayload, WorkspaceSettings, SyncSopEntry } from '@intutic/shared-types';
|
|
22
|
-
import { type GovernanceCoverageInputs } from './configReader.js';
|
|
23
|
-
import { type AgentReport } from './agentReporter.js';
|
|
24
|
-
/**
|
|
25
|
-
* Turns a non-clean `scanSkillContent` result — already computed as part of
|
|
26
|
-
* `collectAgentReport`'s `facets.skills` — into a `skill_flagged` hook event
|
|
27
|
-
* (TD-358).
|
|
28
|
-
*
|
|
29
|
-
* Deliberately reuses the report the daemon already built for this cycle
|
|
30
|
-
* rather than re-scanning: `agentReporter.ts`'s `collectSkills` runs
|
|
31
|
-
* `scanSkillContent` on every `.agents/skills/**\/SKILL.md` as part of
|
|
32
|
-
* building `facets.skills` already, so this only turns a result the daemon
|
|
33
|
-
* already has into a visible signal — it does not add a second scan pass.
|
|
34
|
-
*
|
|
35
|
-
* Appends directly to `.intutic/events/hook-events.jsonl`, the SAME file
|
|
36
|
-
* every emitted PreToolUse gate's `log_event`/`logEvent` writes to and the
|
|
37
|
-
* SAME mechanism `onDriftDetected` below already uses for `config_tamper` —
|
|
38
|
-
* not a new event pipeline. `drainHookEvents` (`claudeCodeHooks.ts`) picks
|
|
39
|
-
* this line up on its next pass exactly like a gate-written one, because it
|
|
40
|
-
* only ever reads the file; it does not care who appended a given line.
|
|
41
|
-
*
|
|
42
|
-
* Report-only, per `scanSkillContent`'s own doc comment on the unmeasured
|
|
43
|
-
* false-positive rate against real, benign skill markdown: this NEVER
|
|
44
|
-
* blocks, mutates, or removes a skill. `hookEvents.ts`'s
|
|
45
|
-
* `HookEventSchema.event` enum (control plane) counts `skill_flagged`
|
|
46
|
-
* exactly like `tool_flagged` — advisory telemetry, not an incident.
|
|
47
|
-
*
|
|
48
|
-
* A failure to append is caught and warned, never thrown: a governance
|
|
49
|
-
* telemetry write must not be able to abort the sync cycle it rides in on.
|
|
50
|
-
*/
|
|
51
|
-
export declare function emitSkillFlaggedEvents(opts: {
|
|
52
|
-
workspaceRoot: string;
|
|
53
|
-
workspaceId: string;
|
|
54
|
-
harnessType: HarnessType;
|
|
55
|
-
skills: AgentReport['facets']['skills'];
|
|
56
|
-
/** Skills already emitted in this cycle, keyed `source:name`, mutated in
|
|
57
|
-
* place. A skill is not harness-specific, and the caller invokes this
|
|
58
|
-
* once per harness in the workspace — without a shared set, a workspace
|
|
59
|
-
* with two active harnesses would double-emit every flagged skill. */
|
|
60
|
-
alreadyEmitted: Set<string>;
|
|
61
|
-
}): void;
|
|
62
|
-
/** Configuration for the sync loop. */
|
|
63
|
-
export interface SyncLoopOptions {
|
|
64
|
-
/** Control plane base URL (e.g., `https://api.intutic.ai`). */
|
|
65
|
-
controlPlaneUrl: string;
|
|
66
|
-
/** API key for authentication (vk_* or JWT). */
|
|
67
|
-
apiKey: string;
|
|
68
|
-
/** Workspace identifier. */
|
|
69
|
-
workspaceId: string;
|
|
70
|
-
/** Absolute path to the workspace root directory. */
|
|
71
|
-
workspaceRoot: string;
|
|
72
|
-
/** Poll interval in milliseconds (default: 30000). */
|
|
73
|
-
pollIntervalMs?: number;
|
|
74
|
-
/** Enable dev mode (relaxed checks, verbose logging). */
|
|
75
|
-
devMode?: boolean;
|
|
76
|
-
/** Callback invoked after each successful sync iteration. */
|
|
77
|
-
onSync?: (result: SyncResult) => void;
|
|
78
|
-
/** AbortSignal to gracefully stop the loop. */
|
|
79
|
-
signal?: AbortSignal;
|
|
80
|
-
}
|
|
81
|
-
/** Result of a single sync iteration. */
|
|
82
|
-
export interface SyncResult {
|
|
83
|
-
/** Config version from the control plane. */
|
|
84
|
-
configVersion: number;
|
|
85
|
-
/** Number of harness config files written. */
|
|
86
|
-
sopsWritten: number;
|
|
87
|
-
/** Number of files with hash drift. */
|
|
88
|
-
driftCount: number;
|
|
89
|
-
/** ISO timestamp of this sync. */
|
|
90
|
-
timestamp: string;
|
|
91
|
-
/** Resolved workspace settings from the control plane. WS-5. */
|
|
92
|
-
settings?: WorkspaceSettings;
|
|
93
|
-
/** All active SOP rules. */
|
|
94
|
-
sops?: SyncConfigPayload['sops'];
|
|
95
|
-
/** Proxy URL. */
|
|
96
|
-
proxyUrl?: string;
|
|
97
|
-
/** Active harnesses. */
|
|
98
|
-
harnesses?: HarnessType[];
|
|
99
|
-
/**
|
|
100
|
-
* This cycle's per-harness governance-coverage enforcement signals, derived
|
|
101
|
-
* from the same `collectAgentReport` facets step 5b already computes for
|
|
102
|
-
* `POST /api/v1/agents/report` — see that step's inline derivation for the
|
|
103
|
-
* mapping. Consumed by the outer loop's config-capture step to fire
|
|
104
|
-
* `POST /api/v1/governance-coverage/snapshot` once per harness whose rules
|
|
105
|
-
* file content actually changed this cycle.
|
|
106
|
-
*/
|
|
107
|
-
harnessGovernanceInputs?: Partial<Record<HarnessType, GovernanceCoverageInputs>>;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Start the sync loop. This function runs indefinitely until the
|
|
111
|
-
* AbortSignal is triggered or the process exits.
|
|
112
|
-
*
|
|
113
|
-
* @param options - Sync loop configuration.
|
|
114
|
-
*/
|
|
115
|
-
/** The credentials every gate-side refresh takes. */
|
|
116
|
-
export interface GateCacheRefreshOptions {
|
|
117
|
-
controlPlaneUrl: string;
|
|
118
|
-
apiKey: string;
|
|
119
|
-
workspaceId: string;
|
|
120
|
-
/** See {@link PolicySnapshotOptions.localHoldTokens}. */
|
|
121
|
-
localHoldTokens?: readonly string[];
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* The `review_before:` tokens the snapshot compiles into hold rules: from the
|
|
125
|
-
* synced SOPs' front matter and JSON blocks, the workspace settings, and the
|
|
126
|
-
* local `.intutic/sops`. The same parse the Claude Code writer runs for its
|
|
127
|
-
* pattern blacklist, so the two cannot disagree about what is held.
|
|
128
|
-
*/
|
|
129
|
-
export declare function localHoldTokensFor(workspaceRoot: string, sops: SyncSopEntry[], settings: Record<string, unknown> | undefined, harnesses?: HarnessType[]): Promise<string[]>;
|
|
130
|
-
/**
|
|
131
|
-
* Refresh the three gate-side caches every hook reads: the policy snapshot
|
|
132
|
-
* (`~/.intutic/hooks/policy-snapshot.rules`), the approved review-hold
|
|
133
|
-
* bypasses and the central egress policy. Called on EVERY sync cycle by both
|
|
134
|
-
* loops — this one and `intutic connect`'s — never only when the config
|
|
135
|
-
* version moved: policy changes without the version changing, and before
|
|
136
|
-
* this helper existed `connect` refreshed once at startup and never again, so
|
|
137
|
-
* a guardrail promoted mid-session reached a connected machine only on
|
|
138
|
-
* restart (TD-488). None of the three throw; the return says which of them
|
|
139
|
-
* landed.
|
|
140
|
-
*/
|
|
141
|
-
export declare function refreshGateCaches(opts: GateCacheRefreshOptions): Promise<{
|
|
142
|
-
snapshot: boolean;
|
|
143
|
-
bypasses: boolean;
|
|
144
|
-
egress: boolean;
|
|
145
|
-
}>;
|
|
146
|
-
export declare function startSyncLoop(options: SyncLoopOptions): Promise<void>;
|
|
147
|
-
export interface IterationContext {
|
|
148
|
-
controlPlaneUrl: string;
|
|
149
|
-
apiKey: string;
|
|
150
|
-
workspaceId: string;
|
|
151
|
-
workspaceRoot: string;
|
|
152
|
-
onSync?: (result: SyncResult) => void;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Execute a single sync iteration:
|
|
156
|
-
* 1. Fetch config from control plane
|
|
157
|
-
* 2. Write config files if version is newer
|
|
158
|
-
* 3. Compute file hashes
|
|
159
|
-
* 4. Report status back to control plane
|
|
160
|
-
* 5. Update local integrity store
|
|
161
|
-
* 6. Call onSync callback
|
|
162
|
-
*
|
|
163
|
-
* Exported (in addition to being used internally by `startSyncLoop`'s
|
|
164
|
-
* polling loop) as a test seam — it is the unit that exercises exactly one
|
|
165
|
-
* cycle's worth of work, including the injectMcpServer call (step 3c),
|
|
166
|
-
* without the surrounding while-loop's extra one-time/Nth-iteration network
|
|
167
|
-
* calls (policy snapshot, approved bypasses, egress policy, compliance
|
|
168
|
-
* probes, drift watcher, decisions digest, config capture).
|
|
169
|
-
*/
|
|
170
|
-
export declare function runSyncIteration(ctx: IterationContext): Promise<SyncResult>;
|
|
171
|
-
export declare function syncOfflineTraces(controlPlaneUrl: string, apiKey: string): Promise<void>;
|
|
172
|
-
//# sourceMappingURL=syncLoop.d.ts.map
|
package/dist/syncLoop.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncLoop.d.ts","sourceRoot":"","sources":["../src/syncLoop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EAEjB,iBAAiB,EACjB,YAAY,EACb,M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