@intutic/sync-daemon 1.10.0 → 2.0.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 +2 -2
- package/dist/agentReporter.d.ts +205 -0
- package/dist/agentReporter.d.ts.map +1 -0
- package/dist/agentReporter.js +394 -0
- package/dist/agentReporter.js.map +1 -0
- package/dist/configReader.d.ts +39 -2
- package/dist/configReader.d.ts.map +1 -1
- package/dist/configReader.js +56 -2
- package/dist/configReader.js.map +1 -1
- package/dist/configWriter.d.ts +51 -1
- package/dist/configWriter.d.ts.map +1 -1
- package/dist/configWriter.js +490 -63
- package/dist/configWriter.js.map +1 -1
- package/dist/harness/antigravityHooks.d.ts.map +1 -1
- package/dist/harness/antigravityHooks.js +33 -55
- package/dist/harness/antigravityHooks.js.map +1 -1
- package/dist/harness/claudeCodeHooks.d.ts +47 -13
- package/dist/harness/claudeCodeHooks.d.ts.map +1 -1
- package/dist/harness/claudeCodeHooks.js +316 -54
- package/dist/harness/claudeCodeHooks.js.map +1 -1
- package/dist/harness/claudeDesktopHooks.d.ts.map +1 -1
- package/dist/harness/claudeDesktopHooks.js +35 -48
- package/dist/harness/claudeDesktopHooks.js.map +1 -1
- package/dist/harness/clineHooks.d.ts.map +1 -1
- package/dist/harness/clineHooks.js +42 -34
- package/dist/harness/clineHooks.js.map +1 -1
- package/dist/harness/codexHooks.d.ts +36 -0
- package/dist/harness/codexHooks.d.ts.map +1 -0
- package/dist/harness/codexHooks.js +227 -0
- package/dist/harness/codexHooks.js.map +1 -0
- package/dist/harness/continueHooks.d.ts +45 -5
- package/dist/harness/continueHooks.d.ts.map +1 -1
- package/dist/harness/continueHooks.js +225 -5
- package/dist/harness/continueHooks.js.map +1 -1
- package/dist/harness/cursorHooks.d.ts +31 -0
- package/dist/harness/cursorHooks.d.ts.map +1 -1
- package/dist/harness/cursorHooks.js +78 -49
- package/dist/harness/cursorHooks.js.map +1 -1
- package/dist/harness/dshHooks.d.ts +198 -0
- package/dist/harness/dshHooks.d.ts.map +1 -0
- package/dist/harness/dshHooks.js +569 -0
- package/dist/harness/dshHooks.js.map +1 -0
- package/dist/harness/gateBody.d.ts +422 -0
- package/dist/harness/gateBody.d.ts.map +1 -0
- package/dist/harness/gateBody.js +1816 -0
- package/dist/harness/gateBody.js.map +1 -0
- package/dist/harness/gateKind.d.ts +164 -0
- package/dist/harness/gateKind.d.ts.map +1 -0
- package/dist/harness/gateKind.js +143 -0
- package/dist/harness/gateKind.js.map +1 -0
- package/dist/harness/githubCopilotHooks.d.ts +54 -0
- package/dist/harness/githubCopilotHooks.d.ts.map +1 -0
- package/dist/harness/githubCopilotHooks.js +218 -0
- package/dist/harness/githubCopilotHooks.js.map +1 -0
- package/dist/harness/gooseHooks.d.ts.map +1 -1
- package/dist/harness/gooseHooks.js +67 -37
- package/dist/harness/gooseHooks.js.map +1 -1
- package/dist/harness/grokHooks.d.ts +77 -0
- package/dist/harness/grokHooks.d.ts.map +1 -0
- package/dist/harness/grokHooks.js +350 -0
- package/dist/harness/grokHooks.js.map +1 -0
- package/dist/harness/hermesHooks.d.ts.map +1 -1
- package/dist/harness/hermesHooks.js +26 -55
- package/dist/harness/hermesHooks.js.map +1 -1
- package/dist/harness/holdRedaction.d.ts +69 -0
- package/dist/harness/holdRedaction.d.ts.map +1 -0
- package/dist/harness/holdRedaction.js +211 -0
- package/dist/harness/holdRedaction.js.map +1 -0
- package/dist/harness/jetbrainsXmlConfig.d.ts +51 -0
- package/dist/harness/jetbrainsXmlConfig.d.ts.map +1 -0
- package/dist/harness/jetbrainsXmlConfig.js +151 -0
- package/dist/harness/jetbrainsXmlConfig.js.map +1 -0
- package/dist/harness/mcpAutoWrite.d.ts +100 -3
- package/dist/harness/mcpAutoWrite.d.ts.map +1 -1
- package/dist/harness/mcpAutoWrite.js +712 -90
- package/dist/harness/mcpAutoWrite.js.map +1 -1
- package/dist/harness/museHooks.d.ts +53 -0
- package/dist/harness/museHooks.d.ts.map +1 -0
- package/dist/harness/museHooks.js +273 -0
- package/dist/harness/museHooks.js.map +1 -0
- package/dist/harness/n8nHooks.d.ts +25 -9
- package/dist/harness/n8nHooks.d.ts.map +1 -1
- package/dist/harness/n8nHooks.js +174 -9
- package/dist/harness/n8nHooks.js.map +1 -1
- package/dist/harness/openCodeHooks.d.ts +93 -0
- package/dist/harness/openCodeHooks.d.ts.map +1 -0
- package/dist/harness/openCodeHooks.js +248 -0
- package/dist/harness/openCodeHooks.js.map +1 -0
- package/dist/harness/openWebuiHooks.d.ts.map +1 -1
- package/dist/harness/openWebuiHooks.js +56 -11
- package/dist/harness/openWebuiHooks.js.map +1 -1
- package/dist/harness/openclawHooks.d.ts.map +1 -1
- package/dist/harness/openclawHooks.js +30 -54
- package/dist/harness/openclawHooks.js.map +1 -1
- package/dist/harness/openhandsHooks.d.ts.map +1 -1
- package/dist/harness/openhandsHooks.js +35 -41
- package/dist/harness/openhandsHooks.js.map +1 -1
- package/dist/harness/piHooks.d.ts.map +1 -1
- package/dist/harness/piHooks.js +31 -58
- package/dist/harness/piHooks.js.map +1 -1
- package/dist/harness/protectedPaths.d.ts +353 -0
- package/dist/harness/protectedPaths.d.ts.map +1 -0
- package/dist/harness/protectedPaths.js +805 -0
- package/dist/harness/protectedPaths.js.map +1 -0
- package/dist/harness/rooCodeHooks.d.ts.map +1 -1
- package/dist/harness/rooCodeHooks.js +34 -48
- package/dist/harness/rooCodeHooks.js.map +1 -1
- package/dist/harness/windsurfHooks.d.ts +72 -0
- package/dist/harness/windsurfHooks.d.ts.map +1 -1
- package/dist/harness/windsurfHooks.js +172 -58
- package/dist/harness/windsurfHooks.js.map +1 -1
- package/dist/harness/windsurfJetBrainsProxy.d.ts +78 -0
- package/dist/harness/windsurfJetBrainsProxy.d.ts.map +1 -0
- package/dist/harness/windsurfJetBrainsProxy.js +159 -0
- package/dist/harness/windsurfJetBrainsProxy.js.map +1 -0
- package/dist/hashReporter.js +1 -1
- package/dist/hashReporter.js.map +1 -1
- package/dist/index.d.ts +12 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/dist/integrityStore.d.ts +0 -8
- package/dist/integrityStore.d.ts.map +1 -1
- package/dist/integrityStore.js +6 -29
- package/dist/integrityStore.js.map +1 -1
- package/dist/lib/approvedBypasses.d.ts +76 -0
- package/dist/lib/approvedBypasses.d.ts.map +1 -0
- package/dist/lib/approvedBypasses.js +140 -0
- package/dist/lib/approvedBypasses.js.map +1 -0
- package/dist/lib/complianceProbes.d.ts.map +1 -1
- package/dist/lib/complianceProbes.js +5 -0
- package/dist/lib/complianceProbes.js.map +1 -1
- package/dist/lib/decisionsDigest.d.ts +99 -0
- package/dist/lib/decisionsDigest.d.ts.map +1 -0
- package/dist/lib/decisionsDigest.js +199 -0
- package/dist/lib/decisionsDigest.js.map +1 -0
- package/dist/lib/egressPolicy.d.ts +69 -0
- package/dist/lib/egressPolicy.d.ts.map +1 -0
- package/dist/lib/egressPolicy.js +126 -0
- package/dist/lib/egressPolicy.js.map +1 -0
- package/dist/lib/gitWorktrees.d.ts +140 -0
- package/dist/lib/gitWorktrees.d.ts.map +1 -0
- package/dist/lib/gitWorktrees.js +191 -0
- package/dist/lib/gitWorktrees.js.map +1 -0
- package/dist/lib/policySnapshot.d.ts +224 -0
- package/dist/lib/policySnapshot.d.ts.map +1 -0
- package/dist/lib/policySnapshot.js +637 -0
- package/dist/lib/policySnapshot.js.map +1 -0
- package/dist/lib/processPoller.d.ts +44 -0
- package/dist/lib/processPoller.d.ts.map +1 -1
- package/dist/lib/processPoller.js +176 -1
- package/dist/lib/processPoller.js.map +1 -1
- package/dist/lib/runtimeEnv.d.ts +8 -0
- package/dist/lib/runtimeEnv.d.ts.map +1 -1
- package/dist/lib/runtimeEnv.js +3 -0
- package/dist/lib/runtimeEnv.js.map +1 -1
- package/dist/localTrajectoryHeuristics.d.ts +51 -0
- package/dist/localTrajectoryHeuristics.d.ts.map +1 -0
- package/dist/localTrajectoryHeuristics.js +90 -0
- package/dist/localTrajectoryHeuristics.js.map +1 -0
- package/dist/sessionReporter.d.ts +70 -0
- package/dist/sessionReporter.d.ts.map +1 -0
- package/dist/sessionReporter.js +140 -0
- package/dist/sessionReporter.js.map +1 -0
- package/dist/skillWriter.d.ts +1 -1
- package/dist/skillWriter.d.ts.map +1 -1
- package/dist/skillWriter.js +5 -2
- package/dist/skillWriter.js.map +1 -1
- package/dist/syncLoop.d.ts +105 -3
- package/dist/syncLoop.d.ts.map +1 -1
- package/dist/syncLoop.js +397 -65
- package/dist/syncLoop.js.map +1 -1
- package/dist/trajectoryMonitor.d.ts +2 -0
- package/dist/trajectoryMonitor.d.ts.map +1 -1
- package/dist/trajectoryMonitor.js +57 -0
- package/dist/trajectoryMonitor.js.map +1 -1
- package/dist/watcher/driftWatcher.d.ts.map +1 -1
- package/dist/watcher/driftWatcher.js +12 -3
- package/dist/watcher/driftWatcher.js.map +1 -1
- package/dist/watcher/settingsGuard.d.ts +23 -0
- package/dist/watcher/settingsGuard.d.ts.map +1 -1
- package/dist/watcher/settingsGuard.js +202 -17
- package/dist/watcher/settingsGuard.js.map +1 -1
- package/package.json +37 -6
- package/dist/brainIndexer.d.ts +0 -51
- package/dist/brainIndexer.d.ts.map +0 -1
- package/dist/brainIndexer.js +0 -148
- package/dist/brainIndexer.js.map +0 -1
- package/dist/harness/cursorHooksJson.d.ts +0 -29
- package/dist/harness/cursorHooksJson.d.ts.map +0 -1
- package/dist/harness/cursorHooksJson.js +0 -130
- package/dist/harness/cursorHooksJson.js.map +0 -1
- package/dist/harness/gooseHooksWriter.d.ts +0 -27
- package/dist/harness/gooseHooksWriter.d.ts.map +0 -1
- package/dist/harness/gooseHooksWriter.js +0 -147
- package/dist/harness/gooseHooksWriter.js.map +0 -1
- package/dist/harness/openhandsHooksWriter.d.ts +0 -23
- package/dist/harness/openhandsHooksWriter.d.ts.map +0 -1
- package/dist/harness/openhandsHooksWriter.js +0 -146
- package/dist/harness/openhandsHooksWriter.js.map +0 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dshHooks.ts — DeepSeek "dsh" (developer preview, `@deepseek-ai/dsh`) Cordis
|
|
3
|
+
* plugin registration + LLM egress routing.
|
|
4
|
+
*
|
|
5
|
+
* dsh has no `hooks.json`/shell-script gate surface at all — it is
|
|
6
|
+
* plugin-first ("Cordis", DeepSeek's own extensibility framework), and the
|
|
7
|
+
* blocking gate for this harness ships as a real TypeScript module,
|
|
8
|
+
* `@intutic/gate/dsh` (`packages/gate-js/src/dsh.ts`), not a generated
|
|
9
|
+
* string of shell/JS this writer assembles the way `grokHooks.ts`/
|
|
10
|
+
* `museHooks.ts` do. This writer's job is narrower than theirs: merge-write
|
|
11
|
+
* the ROW that tells dsh's own Cordis loader to load that module, into every
|
|
12
|
+
* dsh profile this machine has, plus the LLM egress override.
|
|
13
|
+
*
|
|
14
|
+
* # What this phase confirmed against a REAL install — not the plan's guess
|
|
15
|
+
*
|
|
16
|
+
* `@deepseek-ai/dsh` and its Cordis framework packages (`@deepseek-ai/cordis`,
|
|
17
|
+
* `@deepseek-ai/dsh-app-boot`, `@deepseek-ai/dsh-tools`, `@deepseek-ai/dsh-base`,
|
|
18
|
+
* `@deepseek-ai/dsh-llm-pi-ai`, `@deepseek-ai/dsh-home-paths`, ...) are public
|
|
19
|
+
* on the npm registry (first published 2026-08-13, ~161 KB unpacked for the
|
|
20
|
+
* `dsh` package itself) — reachable and installable from this sandbox, unlike
|
|
21
|
+
* Muse Code/Grok Build in Wave 1. This writer was authored against a real
|
|
22
|
+
* `npm pack` + read of those packages' shipped `.d.ts`/README files, not
|
|
23
|
+
* solely the phase brief's prior research (see the TD entry this phase filed
|
|
24
|
+
* for exactly what was checked and what is still genuinely unconfirmed —
|
|
25
|
+
* dsh-permission, dsh-settings-local, and dsh-fs-policy 404'd as
|
|
26
|
+
* `publishConfig.access: restricted`, so the exact settings.yaml schema
|
|
27
|
+
* dsh-settings-local enforces was not directly inspected, only inferred from
|
|
28
|
+
* `dsh-base`'s own `cordis.patch.yml` comments and `dsh-llm-pi-ai`'s README).
|
|
29
|
+
*
|
|
30
|
+
* Confirmed facts this writer relies on:
|
|
31
|
+
*
|
|
32
|
+
* - `$DSH_HOME` resolution (`dsh-home-paths`): an explicit configured path,
|
|
33
|
+
* then `$DSH_HOME`, then `~/.dsh` — {@link resolveDshHome} below mirrors
|
|
34
|
+
* the env-var half (this writer has no "explicit configured path" input).
|
|
35
|
+
* - A **profile** is `$DSH_HOME/profiles/<name>/` holding a `package.json`
|
|
36
|
+
* (the profile manifest) and a `cordis.patch.yml` (`PROFILE_PATCH_FILENAME`
|
|
37
|
+
* — "the user patch layer inside a profile directory, hot-reloaded") —
|
|
38
|
+
* confirmed from `@deepseek-ai/dsh-app-boot`'s shipped `profile.d.ts`.
|
|
39
|
+
* - The patch-list format (`@deepseek-ai/cordis-plugin-include`'s
|
|
40
|
+
* `applyEntryPatches`, read from its shipped `lib/index.js`): a top-level
|
|
41
|
+
* YAML array of patch operations. `{ insert: [...] }` with no `id`
|
|
42
|
+
* appends the listed rows to the array; `{ id, insert: [...] }` inserts
|
|
43
|
+
* into an existing GROUP row's own `config` array; `{ id, name?,
|
|
44
|
+
* config?, ... }` (no `insert`) looks up the row by `id` and overwrites
|
|
45
|
+
* the named fields in place. This writer only ever emits the first shape
|
|
46
|
+
* (a fresh, self-contained `insert:` block naming this row by `id`), so
|
|
47
|
+
* its own writes are always recognizable on a later sync regardless of
|
|
48
|
+
* which shape a human or an older version of this writer left.
|
|
49
|
+
* - Plugin resolution (`@deepseek-ai/cordis-plugin-loader`'s shipped
|
|
50
|
+
* `lib/index.js`): a patch row's `name` is resolved via a plain dynamic
|
|
51
|
+
* `import(name)` when it is not a relative path — a bare specifier like
|
|
52
|
+
* `@intutic/gate/dsh` resolves exactly the way any other bundle package
|
|
53
|
+
* name in `dsh-base`'s own `cordis.patch.yml` does, subpath exports
|
|
54
|
+
* included. Node resolves it from the profile directory's own
|
|
55
|
+
* `node_modules` (the "two-anchor" resolution `profile.d.ts` documents
|
|
56
|
+
* for out-of-tree plugins) — which means `@intutic/gate` must actually be
|
|
57
|
+
* installed there; see {@link mergeProfileDependency} and the TD entry
|
|
58
|
+
* for why this writer cannot run `pnpm install` on the user's behalf.
|
|
59
|
+
* - `settings.yaml`'s `llm-pi-ai.providers.<id>.baseURL` path — CONFIRMED,
|
|
60
|
+
* not merely the plan's assumption: `dsh-llm-pi-ai`'s shipped README shows
|
|
61
|
+
* exactly this shape overriding an EXISTING catalog route's endpoint
|
|
62
|
+
* (`providers.openai.baseURL: https://proxy.example.com:8443`), the same
|
|
63
|
+
* "override base_url on what already resolves, don't invent a model
|
|
64
|
+
* picker entry" shape `grokHooks.ts`'s `[model.*]` merge uses. `llm-pi-ai`
|
|
65
|
+
* is NOT dsh's default LLM route (`llm-deepseek`, the native DeepSeek
|
|
66
|
+
* adapter, is — see `dsh-base`'s own `agent-default-model` row) and
|
|
67
|
+
* mounts **dormant** until a `llm-pi-ai:` settings section exists at all,
|
|
68
|
+
* so this override alone never redirected a fresh profile's DEFAULT
|
|
69
|
+
* egress — it only added a selectable route.
|
|
70
|
+
* - **TD-370 follow-up, closed this phase:** `@deepseek-ai/dsh-llm-deepseek`
|
|
71
|
+
* (registry-public, `npm pack`ed and read directly — 0.1.0-rc.8, the
|
|
72
|
+
* current prerelease at the time) IS the adapter `dsh-base`'s
|
|
73
|
+
* `agent-default-model` routes through by default, and its own shipped
|
|
74
|
+
* README CONFIRMS the same live-reload settings seam `llm-pi-ai` has:
|
|
75
|
+
* "the plugin registers the `llm-deepseek` namespace with this same
|
|
76
|
+
* `Config` schema ... so a `llm-deepseek:` section in the user settings
|
|
77
|
+
* document overrides any field without a restart." {@link mergeSettingsYaml}
|
|
78
|
+
* now also merges `llm-deepseek.baseURL`, touching only that one field
|
|
79
|
+
* (same "override base_url on what already resolves" discipline as the
|
|
80
|
+
* `llm-pi-ai` merge and `grokHooks.ts`'s `[model.*]` merge) — this is the
|
|
81
|
+
* one that actually redirects DEFAULT egress. The `llm-pi-ai` merge is
|
|
82
|
+
* kept alongside it (a selectable route remains useful), not replaced.
|
|
83
|
+
* - The `@intutic/gate/dsh` veto contract itself (`tools/pre-execute`,
|
|
84
|
+
* `PreToolDecision`'s real `'deny'`/`'allow'`/`'ask'` shape, Cordis's
|
|
85
|
+
* `waterfall` `next()` semantics) is confirmed from `dsh-tools`'s shipped
|
|
86
|
+
* `.d.ts` — see `packages/gate-js/src/dsh.ts`'s own module doc for the
|
|
87
|
+
* full record, including where the phase brief's prior guess
|
|
88
|
+
* (`agent/pre-step`, `{kind:'reject'}`) was wrong.
|
|
89
|
+
*
|
|
90
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
91
|
+
* @module
|
|
92
|
+
*/
|
|
93
|
+
/** `$DSH_HOME` resolution: an explicit env override, else `~/.dsh` — mirrors
|
|
94
|
+
* `dsh-home-paths`' `resolveDshHome()` (this writer has no "explicit
|
|
95
|
+
* configured path" input the way a booted dsh process might). An
|
|
96
|
+
* empty/whitespace-only `$DSH_HOME` is treated as unset, matching that
|
|
97
|
+
* package's own documented behaviour. */
|
|
98
|
+
export declare function resolveDshHome(): string;
|
|
99
|
+
/**
|
|
100
|
+
* Every EXISTING dsh profile directory on this machine — one containing its
|
|
101
|
+
* own `package.json` (the profile manifest `dsh-app-boot` requires; a bare
|
|
102
|
+
* directory, such as the flat `profiles/node_modules` fallback dsh itself
|
|
103
|
+
* maintains, is not a profile).
|
|
104
|
+
*
|
|
105
|
+
* Deliberately does not invent a profile: dsh's own CLI requires `--profile
|
|
106
|
+
* <name>` on every invocation (confirmed from `dsh`'s shipped `bin.js` — there
|
|
107
|
+
* is no bare "default" profile dsh falls back to), so this writer has no name
|
|
108
|
+
* to seed one under that a user did not already choose. A machine with no
|
|
109
|
+
* profile initialized yet gets governed on the next sync after the user's
|
|
110
|
+
* first `dsh --profile <name>` run creates one — see the TD entry.
|
|
111
|
+
*/
|
|
112
|
+
export declare function listDshProfileDirs(dshHome: string): Promise<string[]>;
|
|
113
|
+
export interface DshCoverageGap {
|
|
114
|
+
/** dsh appears to be installed/used on this machine (a `$DSH_HOME` marker
|
|
115
|
+
* exists, or `dsh` is on `$PATH`) — independent of whether it is governed. */
|
|
116
|
+
dshDetected: boolean;
|
|
117
|
+
/** Number of EXISTING dsh profiles — see {@link listDshProfileDirs}. */
|
|
118
|
+
profileCount: number;
|
|
119
|
+
/** `dshDetected && profileCount === 0`: dsh is present but nothing is
|
|
120
|
+
* governed yet — TD-370's "silent no-profile window". */
|
|
121
|
+
gap: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Detects TD-370's "silent no-profile window": the stretch between `intutic
|
|
125
|
+
* connect` and the user's first `dsh --profile <name>` run, during which dsh
|
|
126
|
+
* is entirely ungoverned — {@link writeDshHooks} is a documented no-op with
|
|
127
|
+
* nothing to register into yet — and, before this function existed, nothing
|
|
128
|
+
* made that visible.
|
|
129
|
+
*
|
|
130
|
+
* A pure detector, deliberately: no logging, no side effect, so it stays
|
|
131
|
+
* trivially unit-testable. `watcher/settingsGuard.ts`'s `warnIfDshCoverageGap`
|
|
132
|
+
* is the side-effecting caller that actually logs the gap.
|
|
133
|
+
*/
|
|
134
|
+
export declare function detectDshCoverageGap(dshHome?: string): Promise<DshCoverageGap>;
|
|
135
|
+
/**
|
|
136
|
+
* Structurally merges the Intutic governance plugin row into one profile's
|
|
137
|
+
* `cordis.patch.yml`, via the `yaml` package's `parseDocument`/`setIn` — the
|
|
138
|
+
* same "parse structurally, write-if-changed, preserve unrelated content,
|
|
139
|
+
* fall back to append-only on unparseable input" discipline `injectGoose`
|
|
140
|
+
* (`mcpAutoWrite.ts`) established for YAML in this codebase, reusing the same
|
|
141
|
+
* dependency rather than inventing a second approach.
|
|
142
|
+
*/
|
|
143
|
+
export declare function mergeProfilePatch(profileDir: string, workspaceRoot: string, workspaceId: string): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Ensures `@intutic/gate` is declared in the profile's own `package.json`
|
|
146
|
+
* `dependencies` — the "out-of-tree plugin" mechanism `dsh-app-boot`'s
|
|
147
|
+
* `profile.d.ts` documents (a profile's `node_modules` is pnpm-managed).
|
|
148
|
+
*
|
|
149
|
+
* This writer declares the dependency but does NOT run `pnpm install` in the
|
|
150
|
+
* profile directory — the daemon has no general "run an arbitrary package
|
|
151
|
+
* manager in a directory it does not own" capability, and every other
|
|
152
|
+
* writer in this codebase only ever writes config, never invokes a package
|
|
153
|
+
* manager on the user's behalf. Until the user (or their own tooling) runs
|
|
154
|
+
* one, the `cordis.patch.yml` row this module also writes resolves to a
|
|
155
|
+
* MISSING module and dsh's own loader reports that row's activation failed
|
|
156
|
+
* (`assertEntriesActivated`, confirmed from `dsh-app-boot`'s exports) rather
|
|
157
|
+
* than silently no-op — a fail-LOUD gap, not a fail-open one, but a real
|
|
158
|
+
* manual step nonetheless. See the TD entry and `apps/docs/integrations/dsh.md`.
|
|
159
|
+
*/
|
|
160
|
+
export declare function mergeProfileDependency(profileDir: string): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Structurally merges the Intutic proxy into TWO `settings.yaml` sections:
|
|
163
|
+
*
|
|
164
|
+
* - `llm-deepseek.baseURL` — dsh's ACTUAL DEFAULT LLM route (CONFIRMED
|
|
165
|
+
* against `@deepseek-ai/dsh-llm-deepseek`'s own shipped README this
|
|
166
|
+
* phase — see module doc). Only `baseURL` is touched; `apiKeyEnv`,
|
|
167
|
+
* `thinking`, `models`, etc. round-trip untouched, the same
|
|
168
|
+
* "override base_url on what already resolves, never invent the rest of
|
|
169
|
+
* the section" discipline `grokHooks.ts`'s `[model.*]` merge uses. This
|
|
170
|
+
* is the merge that actually redirects DEFAULT egress — see the TD entry
|
|
171
|
+
* for why the `llm-pi-ai` merge alone (below) never did.
|
|
172
|
+
* - `llm-pi-ai.providers.intutic` — a SELECTABLE route (mounts dormant
|
|
173
|
+
* until this section exists at all — see module doc). Kept alongside the
|
|
174
|
+
* new default-route merge: a user, or a future sync, can still point a
|
|
175
|
+
* model at it explicitly.
|
|
176
|
+
*
|
|
177
|
+
* Both overrides preserve every other provider and every other top-level
|
|
178
|
+
* section untouched.
|
|
179
|
+
*/
|
|
180
|
+
export declare function mergeSettingsYaml(dshHome: string, proxyUrl: string): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Register the Intutic governance plugin against every existing dsh profile
|
|
183
|
+
* on this machine, and merge the Intutic proxy into `settings.yaml`'s
|
|
184
|
+
* `llm-deepseek` (default) and `llm-pi-ai` (selectable) routes.
|
|
185
|
+
*
|
|
186
|
+
* A no-op (logged, not an error) when `$DSH_HOME/profiles` does not exist
|
|
187
|
+
* yet — dsh has not been run with any `--profile <name>` on this machine, so
|
|
188
|
+
* there is nothing to register into; the next sync cycle picks it up once
|
|
189
|
+
* the user's first `dsh` run creates one. Safe to call every cycle: every
|
|
190
|
+
* merge below is write-if-changed.
|
|
191
|
+
*
|
|
192
|
+
* @param workspaceRoot - Absolute workspace root (stored in the plugin row's
|
|
193
|
+
* `config.repoRoot`).
|
|
194
|
+
* @param proxyUrl - Intutic proxy URL, merged into settings.yaml.
|
|
195
|
+
* @param workspaceId - Workspace ID, stored in the plugin row's config.
|
|
196
|
+
*/
|
|
197
|
+
export declare function writeDshHooks(workspaceRoot: string, proxyUrl: string, workspaceId?: string): Promise<void>;
|
|
198
|
+
//# sourceMappingURL=dshHooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dshHooks.d.ts","sourceRoot":"","sources":["../../src/harness/dshHooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AAiCH;;;;0CAI0C;AAC1C,wBAAgB,cAAc,IAAI,MAAM,CAIvC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAgB3E;AAoBD,MAAM,WAAW,cAAc;IAC7B;mFAC+E;IAC/E,WAAW,EAAE,OAAO,CAAA;IACpB,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAA;IACpB;8DAC0D;IAC1D,GAAG,EAAE,OAAO,CAAA;CACb;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,SAAmB,GAAG,OAAO,CAAC,cAAc,CAAC,CAQ9F;AAkED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4DrH;AAID;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB9E;AAkDD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4ExF;AAyED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,SAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB5G"}
|