@intutic/cli 2.0.0 → 2.1.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/dist/cli.js +120 -128
- package/dist/cli.js.map +1 -1
- package/dist/commands/attenuate.d.ts.map +1 -1
- package/dist/commands/attenuate.js +4 -2
- package/dist/commands/attenuate.js.map +1 -1
- package/dist/commands/budget.d.ts.map +1 -1
- package/dist/commands/budget.js +2 -2
- package/dist/commands/budget.js.map +1 -1
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +20 -9
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/doctor.d.ts +19 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +33 -41
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/enforce.d.ts +10 -0
- package/dist/commands/enforce.d.ts.map +1 -1
- package/dist/commands/enforce.js +36 -0
- package/dist/commands/enforce.js.map +1 -1
- package/dist/commands/exec.d.ts +7 -8
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/exec.js +59 -60
- package/dist/commands/exec.js.map +1 -1
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +3 -1
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/guardrails.d.ts.map +1 -1
- package/dist/commands/guardrails.js +18 -1
- package/dist/commands/guardrails.js.map +1 -1
- package/dist/commands/init.d.ts +5 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +36 -22
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install-daemon.d.ts +1 -1
- package/dist/commands/install-daemon.d.ts.map +1 -1
- package/dist/commands/install-daemon.js +5 -3
- package/dist/commands/install-daemon.js.map +1 -1
- package/dist/commands/integrity.d.ts +31 -2
- package/dist/commands/integrity.d.ts.map +1 -1
- package/dist/commands/integrity.js +109 -3
- package/dist/commands/integrity.js.map +1 -1
- package/dist/commands/judge.d.ts +8 -4
- package/dist/commands/judge.d.ts.map +1 -1
- package/dist/commands/judge.js +41 -21
- package/dist/commands/judge.js.map +1 -1
- package/dist/commands/login.d.ts +1 -0
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +16 -1
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/setup.d.ts +1 -2
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +11 -68
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skill.d.ts +1 -0
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +17 -3
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +5 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/syncContext.d.ts.map +1 -1
- package/dist/commands/syncContext.js +15 -5
- package/dist/commands/syncContext.js.map +1 -1
- package/dist/config/paths.d.ts +25 -3
- package/dist/config/paths.d.ts.map +1 -1
- package/dist/config/paths.js +47 -7
- package/dist/config/paths.js.map +1 -1
- package/dist/harness/agentFramework.d.ts +25 -0
- package/dist/harness/agentFramework.d.ts.map +1 -0
- package/dist/harness/agentFramework.js +37 -0
- package/dist/harness/agentFramework.js.map +1 -0
- package/dist/harness/agentcore.d.ts +6 -3
- package/dist/harness/agentcore.d.ts.map +1 -1
- package/dist/harness/agentcore.js +7 -4
- package/dist/harness/agentcore.js.map +1 -1
- package/dist/harness/aiSdkHarness.d.ts +1 -1
- package/dist/harness/aiSdkHarness.js +1 -1
- package/dist/harness/aiSdkWorkflow.d.ts +1 -1
- package/dist/harness/aiSdkWorkflow.d.ts.map +1 -1
- package/dist/harness/aiSdkWorkflow.js +5 -3
- package/dist/harness/aiSdkWorkflow.js.map +1 -1
- package/dist/harness/aider.d.ts +4 -3
- package/dist/harness/aider.d.ts.map +1 -1
- package/dist/harness/aider.js +7 -6
- package/dist/harness/aider.js.map +1 -1
- package/dist/harness/antigravity.d.ts +4 -2
- package/dist/harness/antigravity.d.ts.map +1 -1
- package/dist/harness/antigravity.js +14 -12
- package/dist/harness/antigravity.js.map +1 -1
- package/dist/harness/cline.d.ts +10 -4
- package/dist/harness/cline.d.ts.map +1 -1
- package/dist/harness/cline.js +39 -32
- package/dist/harness/cline.js.map +1 -1
- package/dist/harness/codex.d.ts +10 -4
- package/dist/harness/codex.d.ts.map +1 -1
- package/dist/harness/codex.js +28 -26
- package/dist/harness/codex.js.map +1 -1
- package/dist/harness/continue.d.ts +8 -5
- package/dist/harness/continue.d.ts.map +1 -1
- package/dist/harness/continue.js +27 -63
- package/dist/harness/continue.js.map +1 -1
- package/dist/harness/detector.d.ts +1 -1
- package/dist/harness/detector.d.ts.map +1 -1
- package/dist/harness/detector.js +3 -1
- package/dist/harness/detector.js.map +1 -1
- package/dist/harness/dsh.d.ts +2 -2
- package/dist/harness/dsh.js +3 -3
- package/dist/harness/dsh.js.map +1 -1
- package/dist/harness/eve.d.ts +1 -1
- package/dist/harness/eve.js +1 -1
- package/dist/harness/githubCopilot.d.ts +4 -2
- package/dist/harness/githubCopilot.d.ts.map +1 -1
- package/dist/harness/githubCopilot.js +10 -2
- package/dist/harness/githubCopilot.js.map +1 -1
- package/dist/harness/jsSdkGatedAdapter.d.ts.map +1 -1
- package/dist/harness/jsSdkGatedAdapter.js +4 -3
- package/dist/harness/jsSdkGatedAdapter.js.map +1 -1
- package/dist/harness/langgraph.js +4 -4
- package/dist/harness/langgraph.js.map +1 -1
- package/dist/harness/n8n.d.ts +5 -2
- package/dist/harness/n8n.d.ts.map +1 -1
- package/dist/harness/n8n.js +12 -3
- package/dist/harness/n8n.js.map +1 -1
- package/dist/harness/openWebUI.d.ts +7 -2
- package/dist/harness/openWebUI.d.ts.map +1 -1
- package/dist/harness/openWebUI.js +15 -4
- package/dist/harness/openWebUI.js.map +1 -1
- package/dist/harness/opencode.d.ts +3 -2
- package/dist/harness/opencode.d.ts.map +1 -1
- package/dist/harness/opencode.js +3 -2
- package/dist/harness/opencode.js.map +1 -1
- package/dist/harness/openhands.d.ts +3 -2
- package/dist/harness/openhands.d.ts.map +1 -1
- package/dist/harness/openhands.js +27 -26
- package/dist/harness/openhands.js.map +1 -1
- package/dist/harness/rooCode.d.ts +6 -5
- package/dist/harness/rooCode.d.ts.map +1 -1
- package/dist/harness/rooCode.js +9 -12
- package/dist/harness/rooCode.js.map +1 -1
- package/dist/harness/sdkGatedAdapter.d.ts.map +1 -1
- package/dist/harness/sdkGatedAdapter.js +4 -3
- package/dist/harness/sdkGatedAdapter.js.map +1 -1
- package/dist/harness/trueforge.js +2 -2
- package/dist/harness/trueforge.js.map +1 -1
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/harness/types.js +3 -0
- package/dist/harness/types.js.map +1 -1
- package/dist/harness/windsurf.d.ts +4 -2
- package/dist/harness/windsurf.d.ts.map +1 -1
- package/dist/harness/windsurf.js +12 -5
- package/dist/harness/windsurf.js.map +1 -1
- package/dist/lib/localProxy.d.ts +19 -0
- package/dist/lib/localProxy.d.ts.map +1 -0
- package/dist/lib/localProxy.js +33 -0
- package/dist/lib/localProxy.js.map +1 -0
- package/dist/lib/onboarding.d.ts +1 -1
- package/dist/lib/onboarding.d.ts.map +1 -1
- package/dist/lib/onboarding.js +21 -27
- package/dist/lib/onboarding.js.map +1 -1
- package/dist/lib/sandbox/image.d.ts +27 -0
- package/dist/lib/sandbox/image.d.ts.map +1 -0
- package/dist/lib/sandbox/image.js +54 -0
- package/dist/lib/sandbox/image.js.map +1 -0
- package/dist/lib/sandbox/oci.d.ts +1 -0
- package/dist/lib/sandbox/oci.d.ts.map +1 -1
- package/dist/lib/sandbox/oci.js +4 -0
- package/dist/lib/sandbox/oci.js.map +1 -1
- package/dist/lib/sandbox/types.d.ts +5 -0
- package/dist/lib/sandbox/types.d.ts.map +1 -1
- package/package.json +6 -5
- package/resources/sandbox/Dockerfile +30 -0
- package/resources/sandbox/entrypoint.sh +108 -0
- package/resources/sandbox/firecracker-launch.sh +120 -0
- package/dist/harness/vscodeSettingsWriter.d.ts +0 -40
- package/dist/harness/vscodeSettingsWriter.d.ts.map +0 -1
- package/dist/harness/vscodeSettingsWriter.js +0 -116
- package/dist/harness/vscodeSettingsWriter.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/harness/opencode.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/harness/opencode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAE/E,qFAAqF;AACrF,MAAM,WAAW,GAAG,WAAW,CAAA;AAE/B,kFAAkF;AAClF,SAAS,iBAAiB;IACxB,OAAO,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;AAClF,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,cAAc,EAAE,WAAW;IAE3B,KAAK,CAAC,MAAM,CAAC,aAAqB;QAChC,sEAAsE;QACtE,yDAAyD;QACzD,KAAK,MAAM,MAAM,IAAI,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,EAAE,CAAC;YACtE,IAAI,CAAC;gBACH,MAAM,MAA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M,OAAO,GAAG,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;YACpD,MAAM,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;YACrD,MAAM,GAAG,GAAG,UAAU,GAAG,cAAc,CAAA;YACvC,MAAM,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;YACtC,MAAM,MAAM,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;QAC/B,CAAC;QAED,uEAAuE;QACvE,sEAAsE;QACtE,wCAAwC;QACxC,MAAM,kBAAkB,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAA;QAErD,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,aAAqB;QACzC,IAAI,CAAC;YACH,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAA;QACzD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;CACF,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* openhands.ts — OpenHands adapter (full implementation with hooks + llm.base_url).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Merges SOP content ([intutic]) and llm.base_url ([llm]) into config.toml,
|
|
5
|
+
* keeping the rest of the file, and injects PreToolUse hooks via
|
|
6
|
+
* .openhands/hooks.json.
|
|
6
7
|
*
|
|
7
8
|
* HLD §3.14 — Harness Onboarding Matrix
|
|
8
9
|
* @module
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openhands.d.ts","sourceRoot":"","sources":["../../src/harness/openhands.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"openhands.d.ts","sourceRoot":"","sources":["../../src/harness/openhands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAOjD,eAAO,MAAM,gBAAgB,EAAE,eAkD9B,CAAA"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* openhands.ts — OpenHands adapter (full implementation with hooks + llm.base_url).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Merges SOP content ([intutic]) and llm.base_url ([llm]) into config.toml,
|
|
5
|
+
* keeping the rest of the file, and injects PreToolUse hooks via
|
|
6
|
+
* .openhands/hooks.json.
|
|
6
7
|
*
|
|
7
8
|
* HLD §3.14 — Harness Onboarding Matrix
|
|
8
9
|
* @module
|
|
9
10
|
*/
|
|
10
11
|
import { join, dirname } from 'node:path';
|
|
11
|
-
import { access, writeFile, rename, mkdir } from 'node:fs/promises';
|
|
12
|
+
import { access, readFile, writeFile, rename, mkdir } from 'node:fs/promises';
|
|
12
13
|
import { HarnessType } from '@intutic/shared-types';
|
|
13
14
|
import { hashFile } from '../lib/hash.js';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
15
|
+
import { writeOpenHandsHooks, mergeOpenHandsToml } from '@intutic/sync-daemon/harness/openhandsHooks';
|
|
16
|
+
import { log } from '../lib/logger.js';
|
|
16
17
|
const CONFIG_FILE = 'config.toml';
|
|
17
18
|
export const openhandsAdapter = {
|
|
18
19
|
type: HarnessType.OPENHANDS,
|
|
@@ -28,32 +29,32 @@ export const openhandsAdapter = {
|
|
|
28
29
|
},
|
|
29
30
|
async writeConfig(workspaceRoot, sops, proxyUrl) {
|
|
30
31
|
const filePath = join(workspaceRoot, CONFIG_FILE);
|
|
31
|
-
const tmpPath = filePath + '.intutic-tmp';
|
|
32
32
|
const instructions = sops.length > 0
|
|
33
33
|
? sops.map((sop) => `## ${sop.title}\n\n${sop.content}`).join('\n\n---\n\n')
|
|
34
34
|
: '# Intutic governance active — no SOP rules configured yet.';
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
''
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
''
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
35
|
+
// Merged into the user's config.toml: [llm] base_url and an [intutic]
|
|
36
|
+
// table for the SOP text; everything else is kept. A file that does not
|
|
37
|
+
// parse is left alone.
|
|
38
|
+
let raw = '';
|
|
39
|
+
try {
|
|
40
|
+
raw = await readFile(filePath, 'utf-8');
|
|
41
|
+
}
|
|
42
|
+
catch { /* no config.toml yet */ }
|
|
43
|
+
const merged = mergeOpenHandsToml(raw, proxyUrl, instructions);
|
|
44
|
+
let written = null;
|
|
45
|
+
if (merged === null) {
|
|
46
|
+
log.warn(`${filePath} is not valid TOML — left untouched`);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const tmpPath = filePath + '.intutic-tmp';
|
|
50
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
51
|
+
await writeFile(tmpPath, merged, 'utf-8');
|
|
52
|
+
await rename(tmpPath, filePath);
|
|
53
|
+
written = filePath;
|
|
54
|
+
}
|
|
54
55
|
// Inject .openhands/hooks.json PreToolUse hook
|
|
55
56
|
await writeOpenHandsHooks(workspaceRoot, proxyUrl);
|
|
56
|
-
return
|
|
57
|
+
return written;
|
|
57
58
|
},
|
|
58
59
|
async readCurrentHash(workspaceRoot) {
|
|
59
60
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openhands.js","sourceRoot":"","sources":["../../src/harness/openhands.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"openhands.js","sourceRoot":"","sources":["../../src/harness/openhands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAA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AE,OAAO,CAAC,CAAA;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,wBAAwB,CAAC,CAAC;QAClF,MAAM,MAAM,GAAG,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAA;QAC9D,IAAI,OAAO,GAAkB,IAAI,CAAA;QACjC,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YACpB,GAAG,CAAC,IAAI,CAAC,GAAG,QAAQ,qCAAqC,CAAC,CAAA;QAC5D,CAAC;aAAM,CAAC;YACN,MAAM,OAAO,GAAG,QAAQ,GAAG,cAAc,CAAA;YACzC,MAAM,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;YACnD,MAAM,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;YACzC,MAAM,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;YAC/B,OAAO,GAAG,QAAQ,CAAA;QACpB,CAAC;QAED,+CAA+C;QAC/C,MAAM,mBAAmB,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;QAElD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,aAAqB;QACzC,IAAI,CAAC;YACH,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAA;QACzD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;CACF,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rooCode.ts — Roo Code adapter
|
|
2
|
+
* rooCode.ts — Roo Code adapter.
|
|
3
3
|
*
|
|
4
|
-
* Detects the Roo Code VS Code extension
|
|
5
|
-
* as .roorules
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Detects the Roo Code VS Code extension and writes Intutic governance rules
|
|
5
|
+
* as .roorules. Roo Code has no hook system to install a tool-call gate into,
|
|
6
|
+
* and keeps its API provider and base URL in its own settings panel rather
|
|
7
|
+
* than in any file this adapter can write, so routing it through the proxy is
|
|
8
|
+
* a manual step (see the Roo Code integration page).
|
|
8
9
|
*
|
|
9
10
|
* HLD §3.14 — Harness Onboarding Matrix
|
|
10
11
|
* @module
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooCode.d.ts","sourceRoot":"","sources":["../../src/harness/rooCode.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rooCode.d.ts","sourceRoot":"","sources":["../../src/harness/rooCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAMjD,eAAO,MAAM,cAAc,EAAE,eAyD5B,CAAA"}
|
package/dist/harness/rooCode.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rooCode.ts — Roo Code adapter
|
|
2
|
+
* rooCode.ts — Roo Code adapter.
|
|
3
3
|
*
|
|
4
|
-
* Detects the Roo Code VS Code extension
|
|
5
|
-
* as .roorules
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Detects the Roo Code VS Code extension and writes Intutic governance rules
|
|
5
|
+
* as .roorules. Roo Code has no hook system to install a tool-call gate into,
|
|
6
|
+
* and keeps its API provider and base URL in its own settings panel rather
|
|
7
|
+
* than in any file this adapter can write, so routing it through the proxy is
|
|
8
|
+
* a manual step (see the Roo Code integration page).
|
|
8
9
|
*
|
|
9
10
|
* HLD §3.14 — Harness Onboarding Matrix
|
|
10
11
|
* @module
|
|
@@ -15,7 +16,6 @@ import { homedir } from 'node:os';
|
|
|
15
16
|
import { HarnessType } from '@intutic/shared-types';
|
|
16
17
|
import { hashFile } from '../lib/hash.js';
|
|
17
18
|
import { newIso } from '@intutic/id';
|
|
18
|
-
import { injectRooCodeProxySettings } from './vscodeSettingsWriter.js';
|
|
19
19
|
const CONFIG_FILE = '.roorules';
|
|
20
20
|
export const rooCodeAdapter = {
|
|
21
21
|
type: HarnessType.ROO_CODE,
|
|
@@ -41,8 +41,7 @@ export const rooCodeAdapter = {
|
|
|
41
41
|
return false;
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
-
async writeConfig(workspaceRoot, sops,
|
|
45
|
-
// 1. Write .roorules governance text
|
|
44
|
+
async writeConfig(workspaceRoot, sops, _proxyUrl) {
|
|
46
45
|
const filePath = join(workspaceRoot, CONFIG_FILE);
|
|
47
46
|
const instructions = sops.length > 0
|
|
48
47
|
? sops.map((sop) => `## ${sop.title}\n\n${sop.content}`).join('\n\n---\n\n')
|
|
@@ -51,8 +50,8 @@ export const rooCodeAdapter = {
|
|
|
51
50
|
'# Intutic Governance Rules (auto-generated)',
|
|
52
51
|
'# DO NOT EDIT — managed by intutic sync daemon',
|
|
53
52
|
`# Last sync: ${newIso()}`,
|
|
54
|
-
'# NOTE: Roo Code
|
|
55
|
-
'# Governance is enforced via proxy
|
|
53
|
+
'# NOTE: Roo Code has no hook system, so these rules are advisory.',
|
|
54
|
+
'# Governance is enforced via the proxy and the drift guard.',
|
|
56
55
|
'',
|
|
57
56
|
instructions,
|
|
58
57
|
'',
|
|
@@ -61,8 +60,6 @@ export const rooCodeAdapter = {
|
|
|
61
60
|
const tmp = filePath + '.intutic-tmp';
|
|
62
61
|
await writeFile(tmp, content, 'utf-8');
|
|
63
62
|
await rename(tmp, filePath);
|
|
64
|
-
// 2. Inject proxy URL into VS Code settings + .env.intutic sidecar
|
|
65
|
-
await injectRooCodeProxySettings(workspaceRoot, proxyUrl);
|
|
66
63
|
return filePath;
|
|
67
64
|
},
|
|
68
65
|
async readCurrentHash(workspaceRoot) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooCode.js","sourceRoot":"","sources":["../../src/harness/rooCode.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,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ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"sdkGatedAdapter.d.ts","sourceRoot":"","sources":["../../src/harness/sdkGatedAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,uBAAuB,CAAA;AAEtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AASjD;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,CAAA;AAE7C,MAAM,WAAW,qBAAqB;IACpC,8DAA8D;IAC9D,IAAI,EAAE,WAAW,CAAA;IACjB,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,2DAA2D;IAC3D,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAA;IACpC,kFAAkF;IAClF,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB,+EAA+E;IAC/E,UAAU,EAAE,MAAM,CAAA;IAClB,oFAAoF;IACpF,YAAY,EAAE,MAAM,CAAA;IACpB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAA;CACjB;AAOD,6EAA6E;AAC7E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,qBAAqB,GAAG,eAAe,CAwDhF"}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import { join, dirname } from 'node:path';
|
|
20
20
|
import { readFile, writeFile, rename, mkdir } from 'node:fs/promises';
|
|
21
|
+
import { anthropicBaseUrl, openaiBaseUrl, proxyHost } from '@intutic/shared-types';
|
|
21
22
|
import { hashFile } from '../lib/hash.js';
|
|
22
23
|
import { newIso } from '@intutic/id';
|
|
23
24
|
const CONFIG_FILE = '.env.intutic';
|
|
@@ -52,9 +53,9 @@ export function makeSdkGatedAdapter(spec) {
|
|
|
52
53
|
`# Last sync: ${newIso()}`,
|
|
53
54
|
'# Source this file: source .env.intutic',
|
|
54
55
|
'',
|
|
55
|
-
`export ANTHROPIC_BASE_URL="${proxyUrl}"`,
|
|
56
|
-
`export OPENAI_BASE_URL="${proxyUrl}"`,
|
|
57
|
-
`export INTUTIC_PROXY_URL="${proxyUrl}"`,
|
|
56
|
+
`export ANTHROPIC_BASE_URL="${anthropicBaseUrl(proxyUrl)}"`,
|
|
57
|
+
`export OPENAI_BASE_URL="${openaiBaseUrl(proxyUrl)}"`,
|
|
58
|
+
`export INTUTIC_PROXY_URL="${proxyHost(proxyUrl)}"`,
|
|
58
59
|
`export INTUTIC_SOP_COUNT=${sops.length}`,
|
|
59
60
|
'',
|
|
60
61
|
`# These env vars govern LLM egress only. ${spec.label} tools run in your own`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkGatedAdapter.js","sourceRoot":"","sources":["../../src/harness/sdkGatedAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"sdkGatedAdapter.js","sourceRoot":"","sources":["../../src/harness/sdkGatedAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAErE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAElF,OAAO,EAAE,QAAQ,EAAE,M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
|
|
33
33
|
'Gate.guard() verdict, producing user.tool_approval items for your next ' +
|
|
34
34
|
"session.createTurn() call. NOTE: TrueForge has no synchronous approval callback to " +
|
|
35
35
|
'hang a function off — this is a batch responder, not a beforeToolCall/toolApproval ' +
|
|
36
|
-
'option. Covers embedded-library mode only;
|
|
37
|
-
'
|
|
36
|
+
'option. Covers embedded-library mode only; TrueForge run as its own server is ' +
|
|
37
|
+
'governed by the TrueForge bridge service instead (see the server-mode docs).',
|
|
38
38
|
docsSlug: 'trueforge',
|
|
39
39
|
});
|
|
40
40
|
//# sourceMappingURL=trueforge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trueforge.js","sourceRoot":"","sources":["../../src/harness/trueforge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;IACpD,IAAI,EAAE,WAAW,CAAC,SAAS;IAC3B,KAAK,EAAE,sBAAsB;IAC7B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC;IACnD,UAAU,EAAE,eAAe;IAC3B,UAAU,EAAE,oEAAoE;IAChF,YAAY,EACV,+EAA+E;QAC/E,yEAAyE;QACzE,qFAAqF;QACrF,qFAAqF;QACrF,
|
|
1
|
+
{"version":3,"file":"trueforge.js","sourceRoot":"","sources":["../../src/harness/trueforge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;IACpD,IAAI,EAAE,WAAW,CAAC,SAAS;IAC3B,KAAK,EAAE,sBAAsB;IAC7B,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC;IACnD,UAAU,EAAE,eAAe;IAC3B,UAAU,EAAE,oEAAoE;IAChF,YAAY,EACV,+EAA+E;QAC/E,yEAAyE;QACzE,qFAAqF;QACrF,qFAAqF;QACrF,gFAAgF;QAChF,8EAA8E;IAChF,QAAQ,EAAE,WAAW;CACtB,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/harness/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEtE,oDAAoD;AACpD,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,+DAA+D;IAC/D,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAC/C;;;OAGG;IACH,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAClG,4FAA4F;IAC5F,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;CAC/D;AAED,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/harness/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEtE,oDAAoD;AACpD,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,+DAA+D;IAC/D,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAC/C;;;OAGG;IACH,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAClG,4FAA4F;IAC5F,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;CAC/D;AAED,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CA4F5D,CAAA"}
|
package/dist/harness/types.js
CHANGED
|
@@ -68,6 +68,9 @@ export const HARNESS_CONFIG_FILES = {
|
|
|
68
68
|
// A4: AWS Strands Agents — same Python SDK-gated rationale as the Wave 1
|
|
69
69
|
// family above (gate ships in intutic_clawde.gate.adapters.strands).
|
|
70
70
|
'strands': '.env.intutic',
|
|
71
|
+
// TD-375: Microsoft Agent Framework — same Python SDK-gated rationale
|
|
72
|
+
// (gate ships in intutic_clawde.gate.adapters.agent_framework).
|
|
73
|
+
'agent-framework': '.env.intutic',
|
|
71
74
|
// T2: JS/TS SDK-gated frameworks — same rationale as the Wave 1 Python
|
|
72
75
|
// family above, but the blocking gate ships in @intutic/gate
|
|
73
76
|
// (packages/gate-js) rather than intutic-clawde.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/harness/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqBH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,oBAAoB,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0E;IAC1E,qEAAqE;IACrE,0DAA0D;IAC1D,kBAAkB,EAAE,EAAE;CACvB,CAAA"}
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Writes .windsurfrules governance text and injects Cascade hook scripts
|
|
5
5
|
* at user-level (~/.codeium/windsurf/hooks.json) and workspace-level
|
|
6
|
-
* (.windsurf/hooks.json)
|
|
7
|
-
*
|
|
6
|
+
* (.windsurf/hooks.json), merged with any hooks already there. Also merges
|
|
7
|
+
* HTTP proxy settings into ~/.codeium/windsurf/settings.json, and switches
|
|
8
|
+
* the IDE HTTP proxy of every JetBrains IDE where the Windsurf plugin is set
|
|
9
|
+
* up, so Windsurf's AI traffic goes through the Intutic TLS MITM proxy.
|
|
8
10
|
*
|
|
9
11
|
* HLD §3.14 — Harness Onboarding Matrix
|
|
10
12
|
* @module
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"windsurf.d.ts","sourceRoot":"","sources":["../../src/harness/windsurf.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"windsurf.d.ts","sourceRoot":"","sources":["../../src/harness/windsurf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAWjD,eAAO,MAAM,eAAe,EAAE,eAkC7B,CAAA"}
|
package/dist/harness/windsurf.js
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Writes .windsurfrules governance text and injects Cascade hook scripts
|
|
5
5
|
* at user-level (~/.codeium/windsurf/hooks.json) and workspace-level
|
|
6
|
-
* (.windsurf/hooks.json)
|
|
7
|
-
*
|
|
6
|
+
* (.windsurf/hooks.json), merged with any hooks already there. Also merges
|
|
7
|
+
* HTTP proxy settings into ~/.codeium/windsurf/settings.json, and switches
|
|
8
|
+
* the IDE HTTP proxy of every JetBrains IDE where the Windsurf plugin is set
|
|
9
|
+
* up, so Windsurf's AI traffic goes through the Intutic TLS MITM proxy.
|
|
8
10
|
*
|
|
9
11
|
* HLD §3.14 — Harness Onboarding Matrix
|
|
10
12
|
* @module
|
|
@@ -15,6 +17,7 @@ import { homedir } from 'node:os';
|
|
|
15
17
|
import { HarnessType } from '@intutic/shared-types';
|
|
16
18
|
import { hashFile } from '../lib/hash.js';
|
|
17
19
|
import { buildMarkdownContent } from './base.js';
|
|
20
|
+
import { loadCredentials } from '../config/store.js';
|
|
18
21
|
import { writeWindsurfHooks } from '@intutic/sync-daemon/harness/windsurfHooks';
|
|
19
22
|
import { writeFile, rename, mkdir } from 'node:fs/promises';
|
|
20
23
|
import { dirname } from 'node:path';
|
|
@@ -47,9 +50,13 @@ export const windsurfAdapter = {
|
|
|
47
50
|
const tmp = filePath + '.intutic-tmp';
|
|
48
51
|
await writeFile(tmp, content, 'utf-8');
|
|
49
52
|
await rename(tmp, filePath);
|
|
50
|
-
// 2. Write Cascade hooks.json at user + workspace level, configure TLS MITM
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
// 2. Write Cascade hooks.json at user + workspace level, configure TLS MITM
|
|
54
|
+
// proxy. The proxy serves HTTP CONNECT on the same listener as its API,
|
|
55
|
+
// so the port is the one `intutic connect` runs it on (PORT, 4000 by
|
|
56
|
+
// default).
|
|
57
|
+
const proxyPort = parseInt(process.env.PORT || '4000', 10);
|
|
58
|
+
const creds = await loadCredentials();
|
|
59
|
+
await writeWindsurfHooks(workspaceRoot, proxyUrl, proxyPort, creds?.workspaceId || 'local');
|
|
53
60
|
return filePath;
|
|
54
61
|
},
|
|
55
62
|
async readCurrentHash(workspaceRoot) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"windsurf.js","sourceRoot":"","sources":["../../src/harness/windsurf.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"windsurf.js","sourceRoot":"","sources":["../../src/harness/windsurf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH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WAAW,CAAC,aAAqB,EAAE,IAAoB,EAAE,QAAgB;QAC7E,mDAAmD;QACnD,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAA;QACjD,MAAM,OAAO,GAAG,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACpD,MAAM,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;QACnD,MAAM,GAAG,GAAG,QAAQ,GAAG,cAAc,CAAA;QACrC,MAAM,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;QACtC,MAAM,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QAE3B,4EAA4E;QAC5E,2EAA2E;QAC3E,wEAAwE;QACxE,eAAe;QACf,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,EAAE,EAAE,CAAC,CAAA;QAC1D,MAAM,KAAK,GAAG,MAAM,eAAe,EAAE,CAAA;QACrC,MAAM,kBAAkB,CAAC,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,IAAI,OAAO,CAAC,CAAA;QAE3F,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,aAAqB;QACzC,IAAI,CAAC;YAAC,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAA;QAAC,CAAC;QAAC,MAAM,CAAC;YAAC,OAAO,IAAI,CAAA;QAAC,CAAC;IACvF,CAAC;CACF,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the local proxy listens, for every command that talks to it.
|
|
3
|
+
*
|
|
4
|
+
* One source: `INTUTIC_PROXY_URL` (default `http://localhost:4000`), the
|
|
5
|
+
* variable `intutic exec` already points agents at. `connect` used to take its
|
|
6
|
+
* port from `PORT` while `budget` and `doctor` hardcoded 4000, so moving the
|
|
7
|
+
* proxy left them probing a port nothing listened on. `PORT` is not read: in a
|
|
8
|
+
* developer's shell it usually belongs to some other server.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
/** The local proxy's port, from `INTUTIC_PROXY_URL` (an empty value means unset). */
|
|
13
|
+
export declare function localProxyPort(): number;
|
|
14
|
+
/**
|
|
15
|
+
* `http://127.0.0.1:<port>`: the loopback address, not `localhost`, so a probe
|
|
16
|
+
* cannot resolve to `::1` while the proxy listens on IPv4 only.
|
|
17
|
+
*/
|
|
18
|
+
export declare function localProxyProbeBase(): string;
|
|
19
|
+
//# sourceMappingURL=localProxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localProxy.d.ts","sourceRoot":"","sources":["../../src/lib/localProxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,qFAAqF;AACrF,wBAAgB,cAAc,IAAI,MAAM,CASvC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the local proxy listens, for every command that talks to it.
|
|
3
|
+
*
|
|
4
|
+
* One source: `INTUTIC_PROXY_URL` (default `http://localhost:4000`), the
|
|
5
|
+
* variable `intutic exec` already points agents at. `connect` used to take its
|
|
6
|
+
* port from `PORT` while `budget` and `doctor` hardcoded 4000, so moving the
|
|
7
|
+
* proxy left them probing a port nothing listened on. `PORT` is not read: in a
|
|
8
|
+
* developer's shell it usually belongs to some other server.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
const DEFAULT_PROXY_PORT = 4000;
|
|
13
|
+
/** The local proxy's port, from `INTUTIC_PROXY_URL` (an empty value means unset). */
|
|
14
|
+
export function localProxyPort() {
|
|
15
|
+
const raw = process.env.INTUTIC_PROXY_URL;
|
|
16
|
+
if (!raw)
|
|
17
|
+
return DEFAULT_PROXY_PORT;
|
|
18
|
+
try {
|
|
19
|
+
const port = Number(new URL(raw).port);
|
|
20
|
+
return port > 0 ? port : DEFAULT_PROXY_PORT;
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return DEFAULT_PROXY_PORT;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* `http://127.0.0.1:<port>`: the loopback address, not `localhost`, so a probe
|
|
28
|
+
* cannot resolve to `::1` while the proxy listens on IPv4 only.
|
|
29
|
+
*/
|
|
30
|
+
export function localProxyProbeBase() {
|
|
31
|
+
return `http://127.0.0.1:${localProxyPort()}`;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=localProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localProxy.js","sourceRoot":"","sources":["../../src/lib/localProxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,kBAAkB,GAAG,IAAI,CAAA;AAE/B,qFAAqF;AACrF,MAAM,UAAU,cAAc;IAC5B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAA;IACzC,IAAI,CAAC,GAAG;QAAE,OAAO,kBAAkB,CAAA;IACnC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;QACtC,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAA;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,kBAAkB,CAAA;IAC3B,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,oBAAoB,cAAc,EAAE,EAAE,CAAA;AAC/C,CAAC"}
|
package/dist/lib/onboarding.d.ts
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* LLD #8 — Sync Daemon / CLI
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
|
-
export declare function printOnboardingGuide(harnesses: string[], userAuthToken?: string
|
|
9
|
+
export declare function printOnboardingGuide(harnesses: string[], userAuthToken?: string): void;
|
|
10
10
|
//# sourceMappingURL=onboarding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../src/lib/onboarding.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../src/lib/onboarding.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA6BH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAgOtF"}
|
package/dist/lib/onboarding.js
CHANGED
|
@@ -8,30 +8,18 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import pc from 'picocolors';
|
|
10
10
|
import { log } from './logger.js';
|
|
11
|
+
import { anthropicBaseUrl, openaiBaseUrl } from '@intutic/shared-types';
|
|
11
12
|
/**
|
|
12
13
|
* Print tailored setup instructions for a list of harnesses.
|
|
13
14
|
*
|
|
14
15
|
* @param harnesses - List of harness types (e.g. ['cursor', 'aider'])
|
|
15
16
|
* @param apiKey - Optional API key to display in the instructions
|
|
16
|
-
* @param devMode - retained for call-site compatibility; the proxy is always local
|
|
17
17
|
*/
|
|
18
18
|
function maskUserToken(tokenVal) {
|
|
19
19
|
if (!tokenVal)
|
|
20
|
-
return '<
|
|
20
|
+
return '<YOUR_PROVIDER_API_KEY>';
|
|
21
21
|
return `${tokenVal.substring(0, 4)}...${tokenVal.substring(tokenVal.length - 4)}`;
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Trims trailing `/` characters without a regex — see the identical helper
|
|
25
|
-
* in `commands/exec.ts` for why: `/\/+$/` is flagged by static analysis as a
|
|
26
|
-
* polynomial-time pattern on external input, and a loop sidesteps the whole
|
|
27
|
-
* category rather than needing an exemption.
|
|
28
|
-
*/
|
|
29
|
-
function trimTrailingSlashes(s) {
|
|
30
|
-
let end = s.length;
|
|
31
|
-
while (end > 0 && s.charCodeAt(end - 1) === 47 /* '/' */)
|
|
32
|
-
end--;
|
|
33
|
-
return s.slice(0, end);
|
|
34
|
-
}
|
|
35
23
|
function writeCliOutput(line) {
|
|
36
24
|
process.stdout.write(line + '\n');
|
|
37
25
|
}
|
|
@@ -41,15 +29,14 @@ function printEnvVar(envName, envVal) {
|
|
|
41
29
|
function printYamlKey(keyName, keyVal, spaces = 5) {
|
|
42
30
|
writeCliOutput(`${' '.repeat(spaces)}${keyName}: ${keyVal}`);
|
|
43
31
|
}
|
|
44
|
-
export function printOnboardingGuide(harnesses, userAuthToken
|
|
32
|
+
export function printOnboardingGuide(harnesses, userAuthToken) {
|
|
45
33
|
const safeDisplayValue = maskUserToken(userAuthToken);
|
|
46
34
|
// Always the local proxy. This used to branch to a remote host when devMode
|
|
47
35
|
// was false, which meant the onboarding instructions we print told people to
|
|
48
36
|
// send their agent traffic somewhere other than the proxy they had just
|
|
49
37
|
// started. Set INTUTIC_PROXY_URL to override.
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
const proxyUrl = `${proxyHost}/v1`;
|
|
38
|
+
const proxyHost = anthropicBaseUrl(process.env.INTUTIC_PROXY_URL);
|
|
39
|
+
const proxyUrl = openaiBaseUrl(process.env.INTUTIC_PROXY_URL);
|
|
53
40
|
writeCliOutput('');
|
|
54
41
|
log.header('Intutic — Setup & Integration Instructions');
|
|
55
42
|
writeCliOutput(`To route your agent traffic through the Intutic proxy, follow the setup below.`);
|
|
@@ -57,10 +44,15 @@ export function printOnboardingGuide(harnesses, userAuthToken, devMode = false)
|
|
|
57
44
|
if (userAuthToken) {
|
|
58
45
|
writeCliOutput(`Your Intutic API Key is: ${pc.green(safeDisplayValue)}`);
|
|
59
46
|
}
|
|
47
|
+
else {
|
|
48
|
+
// Standalone, the proxy forwards the agent's own provider key upstream;
|
|
49
|
+
// there is no Intutic key to hand out.
|
|
50
|
+
writeCliOutput('Not logged in: wherever a key is asked for below, use your own provider API key.');
|
|
51
|
+
}
|
|
60
52
|
if (harnesses.length === 0) {
|
|
61
53
|
writeCliOutput('');
|
|
62
54
|
log.info('No harnesses were automatically detected in this workspace.');
|
|
63
|
-
writeCliOutput(`
|
|
55
|
+
writeCliOutput(`See the integration guides at: ${pc.bold('https://docs.intutic.ai/integrations/')}`);
|
|
64
56
|
writeCliOutput('Or use the general subprocess wrapper to launch any CLI agent:');
|
|
65
57
|
writeCliOutput(` ${pc.bold(`intutic exec -- <your-agent-command>`)}`);
|
|
66
58
|
return;
|
|
@@ -71,7 +63,7 @@ export function printOnboardingGuide(harnesses, userAuthToken, devMode = false)
|
|
|
71
63
|
case 'cursor':
|
|
72
64
|
writeCliOutput(` 1. Open Cursor Settings (Cmd+, or Ctrl+,).`);
|
|
73
65
|
writeCliOutput(` 2. Navigate to the ${pc.bold('Models')} tab.`);
|
|
74
|
-
writeCliOutput(` 3. Under ${pc.bold('OpenAI API Key')}, enter your
|
|
66
|
+
writeCliOutput(` 3. Under ${pc.bold('OpenAI API Key')}, enter your API key:`);
|
|
75
67
|
writeCliOutput(` ${pc.green(safeDisplayValue)}`);
|
|
76
68
|
writeCliOutput(` 4. Enable the ${pc.bold('"Override OpenAI Base URL"')} toggle.`);
|
|
77
69
|
writeCliOutput(` 5. Set the override URL to:`);
|
|
@@ -113,7 +105,7 @@ export function printOnboardingGuide(harnesses, userAuthToken, devMode = false)
|
|
|
113
105
|
writeCliOutput(` 2. Click the settings gear icon (⚙️).`);
|
|
114
106
|
writeCliOutput(` 3. Set ${pc.bold('API Provider')} to: OpenAI Compatible`);
|
|
115
107
|
writeCliOutput(` 4. Set ${pc.bold('Base URL')} to: ${pc.cyan(proxyUrl)}`);
|
|
116
|
-
writeCliOutput(` 5. Set ${pc.bold('API Key')} to your
|
|
108
|
+
writeCliOutput(` 5. Set ${pc.bold('API Key')} to your API key:`);
|
|
117
109
|
writeCliOutput(` ${pc.green(safeDisplayValue)}`);
|
|
118
110
|
writeCliOutput(` 6. Enter the target Model ID (e.g. gpt-4o) and save.`);
|
|
119
111
|
break;
|
|
@@ -176,19 +168,21 @@ export function printOnboardingGuide(harnesses, userAuthToken, devMode = false)
|
|
|
176
168
|
writeCliOutput(` In your OpenAI Chat Model node inside n8n:`);
|
|
177
169
|
writeCliOutput(` 1. Expand "Parameters" and set ${pc.bold('Base URL')} to:`);
|
|
178
170
|
writeCliOutput(` ${pc.cyan(proxyUrl)}`);
|
|
179
|
-
writeCliOutput(` 2. Select/Create a custom credential set and use your
|
|
171
|
+
writeCliOutput(` 2. Select/Create a custom credential set and use your API key.`);
|
|
180
172
|
break;
|
|
181
173
|
case 'windsurf':
|
|
182
|
-
writeCliOutput(`
|
|
174
|
+
writeCliOutput(` Windsurf has no base-URL setting. intutic connect routes Cascade through the`);
|
|
175
|
+
writeCliOutput(` proxy's TLS interception (http.proxy in ~/.codeium/windsurf/settings.json).`);
|
|
183
176
|
break;
|
|
184
177
|
case 'dsh':
|
|
185
178
|
writeCliOutput(` Every sync registers the Intutic gate into each EXISTING dsh profile`);
|
|
186
179
|
writeCliOutput(` (${pc.bold('cordis.patch.yml')} + the ${pc.bold('@intutic/gate')} package.json dependency) and`);
|
|
187
|
-
writeCliOutput(`
|
|
188
|
-
writeCliOutput(`
|
|
180
|
+
writeCliOutput(` points dsh's default LLM route (the ${pc.bold('llm-deepseek')} entry, in that same`);
|
|
181
|
+
writeCliOutput(` ${pc.bold('cordis.patch.yml')}) at the Intutic proxy — no manual config edit.`);
|
|
189
182
|
writeCliOutput(` `);
|
|
190
|
-
writeCliOutput(` One manual step remains, PER PROFILE
|
|
191
|
-
writeCliOutput(`
|
|
183
|
+
writeCliOutput(` One manual step remains, PER PROFILE — until it runs, dsh only warns and`);
|
|
184
|
+
writeCliOutput(` runs UNGOVERNED. This daemon cannot run a package manager in a directory`);
|
|
185
|
+
writeCliOutput(` it does not own, so finish activation with:`);
|
|
192
186
|
writeCliOutput(` ${pc.bold('dsh plugin --profile <name> add @intutic/gate')}`);
|
|
193
187
|
writeCliOutput(` See ${pc.cyan('$DSH_HOME/INSTALL.md')} (auto-generated, lists your current profiles).`);
|
|
194
188
|
writeCliOutput(` `);
|