@intutic/cli 2.0.0 → 2.2.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 +131 -130
- 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 +138 -49
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/disconnect.d.ts +25 -0
- package/dist/commands/disconnect.d.ts.map +1 -0
- package/dist/commands/disconnect.js +252 -0
- package/dist/commands/disconnect.js.map +1 -0
- 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/env.d.ts +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +2 -7
- package/dist/commands/env.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 +2 -0
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +16 -3
- 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 +38 -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 +116 -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/predict-cost.d.ts +1 -2
- package/dist/commands/predict-cost.d.ts.map +1 -1
- package/dist/commands/predict-cost.js +1 -4
- package/dist/commands/predict-cost.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/agenticOrchestrator.d.ts +3 -5
- package/dist/harness/agenticOrchestrator.d.ts.map +1 -1
- package/dist/harness/agenticOrchestrator.js +3 -5
- package/dist/harness/agenticOrchestrator.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 +15 -12
- package/dist/harness/antigravity.js.map +1 -1
- package/dist/harness/base.d.ts +5 -1
- package/dist/harness/base.d.ts.map +1 -1
- package/dist/harness/base.js +9 -8
- package/dist/harness/base.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 +40 -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 +30 -32
- 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/cursor.d.ts.map +1 -1
- package/dist/harness/cursor.js +2 -6
- package/dist/harness/cursor.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 +13 -8
- package/dist/harness/githubCopilot.js.map +1 -1
- package/dist/harness/grok.d.ts.map +1 -1
- package/dist/harness/grok.js +4 -6
- package/dist/harness/grok.js.map +1 -1
- package/dist/harness/jsSdkGatedAdapter.d.ts.map +1 -1
- package/dist/harness/jsSdkGatedAdapter.js +8 -9
- package/dist/harness/jsSdkGatedAdapter.js.map +1 -1
- package/dist/harness/langgraph.d.ts.map +1 -1
- package/dist/harness/langgraph.js +8 -10
- package/dist/harness/langgraph.js.map +1 -1
- package/dist/harness/muse.d.ts.map +1 -1
- package/dist/harness/muse.js +4 -6
- package/dist/harness/muse.js.map +1 -1
- package/dist/harness/n8n.d.ts +12 -2
- package/dist/harness/n8n.d.ts.map +1 -1
- package/dist/harness/n8n.js +66 -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/openaiAgents.d.ts.map +1 -1
- package/dist/harness/openaiAgents.js +4 -1
- package/dist/harness/openaiAgents.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 +7 -8
- 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 +40 -27
- 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 +13 -18
- package/dist/harness/rooCode.js.map +1 -1
- package/dist/harness/sdkGatedAdapter.d.ts.map +1 -1
- package/dist/harness/sdkGatedAdapter.js +8 -9
- 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 +4 -1
- 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 +14 -11
- package/dist/harness/windsurf.js.map +1 -1
- package/dist/harness/xirp.d.ts +5 -7
- package/dist/harness/xirp.d.ts.map +1 -1
- package/dist/harness/xirp.js +5 -7
- package/dist/harness/xirp.js.map +1 -1
- package/dist/lib/envInjector.d.ts +16 -6
- package/dist/lib/envInjector.d.ts.map +1 -1
- package/dist/lib/envInjector.js +99 -88
- package/dist/lib/envInjector.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/otelPropagation.d.ts +1 -1
- package/dist/lib/otelPropagation.js +1 -1
- package/dist/lib/policySnapshot.d.ts +2 -1
- package/dist/lib/policySnapshot.d.ts.map +1 -1
- package/dist/lib/policySnapshot.js +11 -4
- package/dist/lib/policySnapshot.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
package/dist/config/paths.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* LLD #8 — Sync Daemon / CLI
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
|
+
import { readFileSync } from 'node:fs';
|
|
10
11
|
import { join } from 'node:path';
|
|
11
12
|
import { homedir } from 'node:os';
|
|
12
13
|
/**
|
|
@@ -71,14 +72,53 @@ export function getTracesLogDir() {
|
|
|
71
72
|
export function getIntegrityPath(workspaceRoot) {
|
|
72
73
|
return join(workspaceRoot, '.intutic', 'integrity.json');
|
|
73
74
|
}
|
|
75
|
+
const LOCAL_CONTROL_PLANE_URL = 'http://localhost:3001';
|
|
76
|
+
const HOSTED_CONTROL_PLANE_URL = 'https://api.intutic.ai';
|
|
74
77
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
78
|
+
* The control plane `intutic login` saved with the credentials, or undefined.
|
|
79
|
+
*
|
|
80
|
+
* Read straight from the credentials file rather than through
|
|
81
|
+
* `loadCredentials()`: only the URL is needed, it is never a secret, and this
|
|
82
|
+
* keeps resolution synchronous and free of keychain access.
|
|
83
|
+
*/
|
|
84
|
+
export function storedControlPlaneUrl() {
|
|
85
|
+
try {
|
|
86
|
+
const creds = JSON.parse(readFileSync(getCredentialsPath(), 'utf-8'));
|
|
87
|
+
return typeof creds.controlPlaneUrl === 'string' && creds.controlPlaneUrl ? creds.controlPlaneUrl : undefined;
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/** Trims trailing `/` without a regex (see `commands/exec.ts` for why). */
|
|
94
|
+
function trimTrailingSlashes(s) {
|
|
95
|
+
let end = s.length;
|
|
96
|
+
while (end > 0 && s.charCodeAt(end - 1) === 47 /* '/' */)
|
|
97
|
+
end--;
|
|
98
|
+
return s.slice(0, end);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Resolve the control plane URL, first match wins:
|
|
102
|
+
*
|
|
103
|
+
* 1. a flag: `--control-plane-url` (`flagUrl`), or `--dev` (`devMode`, which
|
|
104
|
+
* some callers also set from a workspace initialised with `--dev`)
|
|
105
|
+
* 2. the environment: `INTUTIC_CONTROL_PLANE_URL`, or `INTUTIC_DEV=1`
|
|
106
|
+
* 3. the URL `intutic login` saved with the credentials (`useStored: false`
|
|
107
|
+
* skips it, for credentials supplied on the command line instead)
|
|
108
|
+
* 4. the hosted control plane
|
|
109
|
+
*
|
|
110
|
+
* Every command resolves through here, so a self-hosted control plane named
|
|
111
|
+
* once — at login, or in the environment — is the one every later command
|
|
112
|
+
* talks to. Before, only localhost or the hosted URL were reachable, and the
|
|
113
|
+
* saved URL was ignored.
|
|
77
114
|
*/
|
|
78
|
-
export function resolveControlPlaneUrl(devMode) {
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
115
|
+
export function resolveControlPlaneUrl(devMode, opts = {}) {
|
|
116
|
+
const url = opts.flagUrl ||
|
|
117
|
+
(devMode ? LOCAL_CONTROL_PLANE_URL : undefined) ||
|
|
118
|
+
process.env.INTUTIC_CONTROL_PLANE_URL ||
|
|
119
|
+
(process.env.INTUTIC_DEV === '1' ? LOCAL_CONTROL_PLANE_URL : undefined) ||
|
|
120
|
+
(opts.useStored === false ? undefined : storedControlPlaneUrl()) ||
|
|
121
|
+
HOSTED_CONTROL_PLANE_URL;
|
|
122
|
+
return trimTrailingSlashes(url);
|
|
83
123
|
}
|
|
84
124
|
//# sourceMappingURL=paths.js.map
|
package/dist/config/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{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AChE,wBAAwB,CAAA;IAC1B,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAA;AACjC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agentFramework.ts — Microsoft Agent Framework adapter (env-file config,
|
|
3
|
+
* SDK-side gate).
|
|
4
|
+
*
|
|
5
|
+
* Same shape as langgraph.ts (see sdkGatedAdapter.ts). Agent Framework (the
|
|
6
|
+
* AutoGen + Semantic Kernel successor, `agent-framework` /
|
|
7
|
+
* `agent-framework-core` on PyPI, imported as `agent_framework`) is a separate
|
|
8
|
+
* framework from AutoGen (autogen.ts), so it has its own adapter (TD-375).
|
|
9
|
+
* Its tools run in the agent's own Python process, so the blocking gate ships
|
|
10
|
+
* SDK-side via
|
|
11
|
+
* `intutic_clawde.gate.adapters.agent_framework.IntuticFunctionMiddleware`, a
|
|
12
|
+
* `FunctionMiddleware` that skips `call_next()` on a deny (verified live
|
|
13
|
+
* against agent-framework-core==1.20.0).
|
|
14
|
+
*
|
|
15
|
+
* "agent-framework" is a generic phrase, so detection anchors the start of the
|
|
16
|
+
* name: it must not follow a letter, digit, `-`, `_` or `.`. That matches
|
|
17
|
+
* `agent-framework`, `agent-framework-core`, `agent-framework-openai` and the
|
|
18
|
+
* `agent_framework` spelling, but not some other project's
|
|
19
|
+
* `my-agent-framework`.
|
|
20
|
+
*
|
|
21
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
22
|
+
* @module
|
|
23
|
+
*/
|
|
24
|
+
export declare const agentFrameworkAdapter: import("./types.js").IHarnessAdapter;
|
|
25
|
+
//# sourceMappingURL=agentFramework.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentFramework.d.ts","sourceRoot":"","sources":["../../src/harness/agentFramework.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,eAAO,MAAM,qBAAqB,sCAUhC,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agentFramework.ts — Microsoft Agent Framework adapter (env-file config,
|
|
3
|
+
* SDK-side gate).
|
|
4
|
+
*
|
|
5
|
+
* Same shape as langgraph.ts (see sdkGatedAdapter.ts). Agent Framework (the
|
|
6
|
+
* AutoGen + Semantic Kernel successor, `agent-framework` /
|
|
7
|
+
* `agent-framework-core` on PyPI, imported as `agent_framework`) is a separate
|
|
8
|
+
* framework from AutoGen (autogen.ts), so it has its own adapter (TD-375).
|
|
9
|
+
* Its tools run in the agent's own Python process, so the blocking gate ships
|
|
10
|
+
* SDK-side via
|
|
11
|
+
* `intutic_clawde.gate.adapters.agent_framework.IntuticFunctionMiddleware`, a
|
|
12
|
+
* `FunctionMiddleware` that skips `call_next()` on a deny (verified live
|
|
13
|
+
* against agent-framework-core==1.20.0).
|
|
14
|
+
*
|
|
15
|
+
* "agent-framework" is a generic phrase, so detection anchors the start of the
|
|
16
|
+
* name: it must not follow a letter, digit, `-`, `_` or `.`. That matches
|
|
17
|
+
* `agent-framework`, `agent-framework-core`, `agent-framework-openai` and the
|
|
18
|
+
* `agent_framework` spelling, but not some other project's
|
|
19
|
+
* `my-agent-framework`.
|
|
20
|
+
*
|
|
21
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
22
|
+
* @module
|
|
23
|
+
*/
|
|
24
|
+
import { HarnessType } from '@intutic/shared-types';
|
|
25
|
+
import { makeSdkGatedAdapter } from './sdkGatedAdapter.js';
|
|
26
|
+
const AGENT_FRAMEWORK_TOKEN = /(?:^|[^a-z0-9_.-])agent[-_]framework(?![a-z0-9])/m;
|
|
27
|
+
export const agentFrameworkAdapter = makeSdkGatedAdapter({
|
|
28
|
+
type: HarnessType.AGENT_FRAMEWORK,
|
|
29
|
+
label: 'Microsoft Agent Framework',
|
|
30
|
+
keywords: [AGENT_FRAMEWORK_TOKEN],
|
|
31
|
+
pipInstall: 'intutic-clawde[agent-framework]',
|
|
32
|
+
importLine: 'from intutic_clawde.gate.adapters.agent_framework import IntuticFunctionMiddleware',
|
|
33
|
+
usageSummary: 'Agent(middleware=[IntuticFunctionMiddleware()]) skips call_next() on a denied tool call, ' +
|
|
34
|
+
'so the tool never runs and the model receives the refusal as the tool result.',
|
|
35
|
+
docsSlug: 'microsoft-agent-framework',
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=agentFramework.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentFramework.js","sourceRoot":"","sources":["../../src/harness/agentFramework.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,qBAAqB,GAAG,mDAAmD,CAAA;AAEjF,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;IACvD,IAAI,EAAE,WAAW,CAAC,eAAe;IACjC,KAAK,EAAE,2BAA2B;IAClC,QAAQ,EAAE,CAAC,qBAAqB,CAAC;IACjC,UAAU,EAAE,iCAAiC;IAC7C,UAAU,EAAE,oFAAoF;IAChG,YAAY,EACV,2FAA2F;QAC3F,+EAA+E;IACjF,QAAQ,EAAE,2BAA2B;CACtC,CAAC,CAAA"}
|
|
@@ -40,9 +40,12 @@
|
|
|
40
40
|
* commands write (confirmed via `bedrock_agentcore_starter_toolkit/cli/
|
|
41
41
|
* runtime/_configure_impl.py` and every other CLI subcommand module that
|
|
42
42
|
* reads it).
|
|
43
|
-
* 5. `agentcore/agentcore.json` or `aws-targets.json`
|
|
44
|
-
*
|
|
45
|
-
*
|
|
43
|
+
* 5. `agentcore/agentcore.json` or `agentcore/aws-targets.json` — the config
|
|
44
|
+
* files the npm `@aws/agentcore` CLI writes. Both live in the project's
|
|
45
|
+
* `agentcore/` directory, not at the root: confirmed by running
|
|
46
|
+
* `agentcore create` (0.31.1) offline with no AWS credentials, whose real
|
|
47
|
+
* output is vendored in `__fixtures__/agentcore-cli-0.31.1/`, and by the
|
|
48
|
+
* `${root}/agentcore/aws-targets.json` paths in the 0.27.0 bundle.
|
|
46
49
|
*
|
|
47
50
|
* No ReDoS surface: every check below is a plain substring/property test
|
|
48
51
|
* over locally-read files, never a regex over untrusted network input.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentcore.d.ts","sourceRoot":"","sources":["../../src/harness/agentcore.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agentcore.d.ts","sourceRoot":"","sources":["../../src/harness/agentcore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAiDjD,eAAO,MAAM,gBAAgB,EAAE,eAuB9B,CAAA"}
|
|
@@ -40,9 +40,12 @@
|
|
|
40
40
|
* commands write (confirmed via `bedrock_agentcore_starter_toolkit/cli/
|
|
41
41
|
* runtime/_configure_impl.py` and every other CLI subcommand module that
|
|
42
42
|
* reads it).
|
|
43
|
-
* 5. `agentcore/agentcore.json` or `aws-targets.json`
|
|
44
|
-
*
|
|
45
|
-
*
|
|
43
|
+
* 5. `agentcore/agentcore.json` or `agentcore/aws-targets.json` — the config
|
|
44
|
+
* files the npm `@aws/agentcore` CLI writes. Both live in the project's
|
|
45
|
+
* `agentcore/` directory, not at the root: confirmed by running
|
|
46
|
+
* `agentcore create` (0.31.1) offline with no AWS credentials, whose real
|
|
47
|
+
* output is vendored in `__fixtures__/agentcore-cli-0.31.1/`, and by the
|
|
48
|
+
* `${root}/agentcore/aws-targets.json` paths in the 0.27.0 bundle.
|
|
46
49
|
*
|
|
47
50
|
* No ReDoS surface: every check below is a plain substring/property test
|
|
48
51
|
* over locally-read files, never a regex over untrusted network input.
|
|
@@ -56,7 +59,7 @@ import { HarnessType } from '@intutic/shared-types';
|
|
|
56
59
|
/** Python manifests scanned for the SDK/toolkit package names. */
|
|
57
60
|
const PYTHON_MANIFESTS = ['pyproject.toml', 'requirements.txt', 'uv.lock'];
|
|
58
61
|
/** Config files the `agentcore` CLIs (npm + Python starter toolkit) write. */
|
|
59
|
-
const CONFIG_FILE_SIGNALS = ['.bedrock_agentcore.yaml', 'agentcore/agentcore.json', 'aws-targets.json'];
|
|
62
|
+
const CONFIG_FILE_SIGNALS = ['.bedrock_agentcore.yaml', 'agentcore/agentcore.json', 'agentcore/aws-targets.json'];
|
|
60
63
|
async function hasAnyConfigFile(workspaceRoot) {
|
|
61
64
|
for (const rel of CONFIG_FILE_SIGNALS) {
|
|
62
65
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentcore.js","sourceRoot":"","sources":["../../src/harness/agentcore.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agentcore.js","sourceRoot":"","sources":["../../src/harness/agentcore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAInD,kEAAkE;AAClE,MAAM,gBAAgB,GAAG,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,SAAS,CAAU,CAAA;AAEnF,8EAA8E;AAC9E,MAAM,mBAAmB,GAAG,CAAC,yBAAyB,EAAE,0BAA0B,EAAE,4BAA4B,CAAU,CAAA;AAE1H,KAAK,UAAU,gBAAgB,CAAC,aAAqB;IACnD,KAAK,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;QACtC,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC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IACnE,cAAc,EAAE,EAAE;IAElB,KAAK,CAAC,MAAM,CAAC,aAAqB;QAChC,IAAI,MAAM,gBAAgB,CAAC,aAAa,CAAC;YAAE,OAAO,IAAI,CAAA;QACtD,IAAI,MAAM,uBAAuB,CAAC,aAAa,CAAC;YAAE,OAAO,IAAI,CAAA;QAC7D,OAAO,qBAAqB,CAAC,aAAa,CAAC,CAAA;IAC7C,CAAC;IAED,yEAAyE;IACzE,2EAA2E;IAC3E,2DAA2D;IAC3D,KAAK,CAAC,WAAW,CAAC,cAAsB,EAAE,KAAqB,EAAE,SAAiB;QAChF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,cAAsB;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA"}
|
|
@@ -10,11 +10,9 @@
|
|
|
10
10
|
* flag: "Available: claude, codex, opencode"). Each feature runs in its own
|
|
11
11
|
* `git worktree` under `~/.agentic-orchestrator/worktrees/` (confirmed via
|
|
12
12
|
* the project's own README), the same "one workflow, one worktree" shape
|
|
13
|
-
* Xirp uses
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* enumerates every worktree of a watched repo regardless of where under the
|
|
17
|
-
* filesystem it lives.
|
|
13
|
+
* Xirp uses, and covered the same way: by each backend's user-level hook
|
|
14
|
+
* registration, which applies in every worktree. `intutic connect` writes
|
|
15
|
+
* project-level files only into the checkout it runs in.
|
|
18
16
|
*
|
|
19
17
|
* Unlike Xirp, this project's facts were LIVE-VERIFIED against the real
|
|
20
18
|
* released artifact, not just its README: the actual `agentico` binary
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agenticOrchestrator.d.ts","sourceRoot":"","sources":["../../src/harness/agenticOrchestrator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agenticOrchestrator.d.ts","sourceRoot":"","sources":["../../src/harness/agenticOrchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAQH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAQjD,eAAO,MAAM,0BAA0B,EAAE,eAyDxC,CAAA"}
|
|
@@ -10,11 +10,9 @@
|
|
|
10
10
|
* flag: "Available: claude, codex, opencode"). Each feature runs in its own
|
|
11
11
|
* `git worktree` under `~/.agentic-orchestrator/worktrees/` (confirmed via
|
|
12
12
|
* the project's own README), the same "one workflow, one worktree" shape
|
|
13
|
-
* Xirp uses
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* enumerates every worktree of a watched repo regardless of where under the
|
|
17
|
-
* filesystem it lives.
|
|
13
|
+
* Xirp uses, and covered the same way: by each backend's user-level hook
|
|
14
|
+
* registration, which applies in every worktree. `intutic connect` writes
|
|
15
|
+
* project-level files only into the checkout it runs in.
|
|
18
16
|
*
|
|
19
17
|
* Unlike Xirp, this project's facts were LIVE-VERIFIED against the real
|
|
20
18
|
* released artifact, not just its README: the actual `agentico` binary
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agenticOrchestrator.js","sourceRoot":"","sources":["../../src/harness/agenticOrchestrator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agenticOrchestrator.js","sourceRoot":"","sources":["../../src/harness/agenticOrchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAInD,sEAAsE;AACtE,MAAM,kCAAkC,GAAG,uBAAuB,CAAA;AAClE;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,CAAC;QAED,OAAO,KAAK,CAAA;IACd,CAAC;IAED,oEAAoE;IACpE,mEAAmE;IACnE,0EAA0E;IAC1E,oEAAoE;IACpE,oDAAoD;IACpD,KAAK,CAAC,WAAW,CAAC,cAAsB,EAAE,KAAqB,EAAE,SAAiB;QAChF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,cAAsB;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* framework, hence `requiresAnyPrefix` rather than a single required package.
|
|
11
11
|
*
|
|
12
12
|
* TWO DOCUMENTED LIMITATIONS carried into the generated `.env.intutic`
|
|
13
|
-
* (both confirmed against `@ai-sdk/harness@1.0.75`'s shipped types — see
|
|
13
|
+
* (both confirmed against `@ai-sdk/harness@1.0.75`'s shipped types, re-read on 1.0.138 — see
|
|
14
14
|
* `@intutic/gate/harness`'s module doc for the full record):
|
|
15
15
|
*
|
|
16
16
|
* 1. Tool execution is SERVER-SIDE, in Vercel Sandbox microVMs — the
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* framework, hence `requiresAnyPrefix` rather than a single required package.
|
|
11
11
|
*
|
|
12
12
|
* TWO DOCUMENTED LIMITATIONS carried into the generated `.env.intutic`
|
|
13
|
-
* (both confirmed against `@ai-sdk/harness@1.0.75`'s shipped types — see
|
|
13
|
+
* (both confirmed against `@ai-sdk/harness@1.0.75`'s shipped types, re-read on 1.0.138 — see
|
|
14
14
|
* `@intutic/gate/harness`'s module doc for the full record):
|
|
15
15
|
*
|
|
16
16
|
* 1. Tool execution is SERVER-SIDE, in Vercel Sandbox microVMs — the
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* with both declares `@ai-sdk/workflow` anyway, which is the trigger.
|
|
14
14
|
*
|
|
15
15
|
* DOCUMENTED SEMANTICS carried into the generated `.env.intutic` (confirmed
|
|
16
|
-
* against `@ai-sdk/workflow@1.0.69` + `workflow@4.8.3
|
|
16
|
+
* against `@ai-sdk/workflow@1.0.69` + `workflow@4.8.3`, re-verified on 2.0.58 + 5.0.1 — see
|
|
17
17
|
* `@intutic/gate/workflow`'s module doc for the full record): WorkflowAgent
|
|
18
18
|
* has no agent-level approval option; the veto surface is per-tool
|
|
19
19
|
* `needsApproval`, and a refusal thrown from it must be FatalError-compatible
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiSdkWorkflow.d.ts","sourceRoot":"","sources":["../../src/harness/aiSdkWorkflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"aiSdkWorkflow.d.ts","sourceRoot":"","sources":["../../src/harness/aiSdkWorkflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,eAAO,MAAM,oBAAoB,sCAc/B,CAAA"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* with both declares `@ai-sdk/workflow` anyway, which is the trigger.
|
|
14
14
|
*
|
|
15
15
|
* DOCUMENTED SEMANTICS carried into the generated `.env.intutic` (confirmed
|
|
16
|
-
* against `@ai-sdk/workflow@1.0.69` + `workflow@4.8.3
|
|
16
|
+
* against `@ai-sdk/workflow@1.0.69` + `workflow@4.8.3`, re-verified on 2.0.58 + 5.0.1 — see
|
|
17
17
|
* `@intutic/gate/workflow`'s module doc for the full record): WorkflowAgent
|
|
18
18
|
* has no agent-level approval option; the veto surface is per-tool
|
|
19
19
|
* `needsApproval`, and a refusal thrown from it must be FatalError-compatible
|
|
@@ -29,8 +29,10 @@ export const aiSdkWorkflowAdapter = makeJsSdkGatedAdapter({
|
|
|
29
29
|
label: 'AI SDK Workflow',
|
|
30
30
|
requires: [{ name: '@ai-sdk/workflow' }],
|
|
31
31
|
npmInstall: '@intutic/gate',
|
|
32
|
-
importLine: "import {
|
|
33
|
-
usageSummary: 'new WorkflowAgent({ ..., tools: withIntuticApproval(tools
|
|
32
|
+
importLine: "import { intuticApprovalStep, withIntuticApproval } from '@intutic/gate/workflow'",
|
|
33
|
+
usageSummary: 'new WorkflowAgent({ ..., tools: withIntuticApproval(tools, { step: intuticGate }) }), where ' +
|
|
34
|
+
"intuticGate is your own \"use step\" function returning intuticApprovalStep(toolName, input, { gate }) " +
|
|
35
|
+
'(needsApproval runs in the workflow sandbox, which has no Node.js). Attaches an async needsApproval ' +
|
|
34
36
|
'per tool (WorkflowAgent itself has no approval option). BLOCK throws a FatalError-compatible ' +
|
|
35
37
|
'refusal so the durable runtime aborts instead of retry-looping the denial; ALLOW resolves ' +
|
|
36
38
|
"false (or true with { onAllow: 'human' } to keep the durable human-approval pause).",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiSdkWorkflow.js","sourceRoot":"","sources":["../../src/harness/aiSdkWorkflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;IACxD,IAAI,EAAE,WAAW,CAAC,eAAe;IACjC,KAAK,EAAE,iBAAiB;IACxB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;IACxC,UAAU,EAAE,eAAe;IAC3B,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"aiSdkWorkflow.js","sourceRoot":"","sources":["../../src/harness/aiSdkWorkflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;IACxD,IAAI,EAAE,WAAW,CAAC,eAAe;IACjC,KAAK,EAAE,iBAAiB;IACxB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;IACxC,UAAU,EAAE,eAAe;IAC3B,UAAU,EAAE,mFAAmF;IAC/F,YAAY,EACV,8FAA8F;QAC9F,yGAAyG;QACzG,sGAAsG;QACtG,+FAA+F;QAC/F,4FAA4F;QAC5F,qFAAqF;IACvF,QAAQ,EAAE,iBAAiB;CAC5B,CAAC,CAAA"}
|
package/dist/harness/aider.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* aider.ts — Aider adapter (full implementation with safe YAML merge).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* which
|
|
6
|
-
* (test-cmd, lint-cmd) that Aider auto-executes on startup
|
|
4
|
+
* Merges proxy routing into .aider.conf.yml using the aiderConfigMerger,
|
|
5
|
+
* which keeps the user's own keys, strips dangerous auto-exec keys
|
|
6
|
+
* (test-cmd, lint-cmd) that Aider auto-executes on startup, and lists the
|
|
7
|
+
* SOP text as a read-only context file (.intutic/aider-sops.md).
|
|
7
8
|
*
|
|
8
9
|
* HLD §3.14 — Harness Onboarding Matrix
|
|
9
10
|
* @module
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aider.d.ts","sourceRoot":"","sources":["../../src/harness/aider.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"aider.d.ts","sourceRoot":"","sources":["../../src/harness/aider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAMjD,eAAO,MAAM,YAAY,EAAE,eAiC1B,CAAA"}
|
package/dist/harness/aider.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* aider.ts — Aider adapter (full implementation with safe YAML merge).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* which
|
|
6
|
-
* (test-cmd, lint-cmd) that Aider auto-executes on startup
|
|
4
|
+
* Merges proxy routing into .aider.conf.yml using the aiderConfigMerger,
|
|
5
|
+
* which keeps the user's own keys, strips dangerous auto-exec keys
|
|
6
|
+
* (test-cmd, lint-cmd) that Aider auto-executes on startup, and lists the
|
|
7
|
+
* SOP text as a read-only context file (.intutic/aider-sops.md).
|
|
7
8
|
*
|
|
8
9
|
* HLD §3.14 — Harness Onboarding Matrix
|
|
9
10
|
* @module
|
|
@@ -32,9 +33,9 @@ export const aiderAdapter = {
|
|
|
32
33
|
? sops.map((sop) => `## ${sop.title}\n\n${sop.content}`).join('\n\n---\n\n')
|
|
33
34
|
: undefined;
|
|
34
35
|
// Safe merge: strips test-cmd/lint-cmd, preserves all other user keys,
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
return filePath;
|
|
36
|
+
// routes OpenAI (openai-api-base) and Anthropic (set-env) models through
|
|
37
|
+
// the proxy and lists the SOPs as a read-only context file.
|
|
38
|
+
return (await mergeAiderConfig(filePath, proxyUrl, sopsText)) ? filePath : null;
|
|
38
39
|
},
|
|
39
40
|
async readCurrentHash(workspaceRoot) {
|
|
40
41
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aider.js","sourceRoot":"","sources":["../../src/harness/aider.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"aider.js","sourceRoot":"","sources":["../../src/harness/aider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAA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gemini/settings.json
|
|
3
3
|
*
|
|
4
|
-
* Merges SOP content into the customInstructions field of the
|
|
5
|
-
* Gemini settings JSON file
|
|
4
|
+
* Merges SOP content into the customInstructions field of the workspace's
|
|
5
|
+
* Gemini settings JSON file, and installs the Gemini CLI `BeforeTool` gate in
|
|
6
|
+
* `~/.gemini/settings.json` (see antigravityHooks.ts). A settings file that is
|
|
7
|
+
* not a plain JSON object is left alone and reported.
|
|
6
8
|
*
|
|
7
9
|
* HLD §3.14 — Harness Onboarding Matrix
|
|
8
10
|
* @module
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../src/harness/antigravity.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../src/harness/antigravity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAQjD,eAAO,MAAM,kBAAkB,EAAE,eAsDhC,CAAA"}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Antigravity adapter — .gemini/settings.json
|
|
3
3
|
*
|
|
4
|
-
* Merges SOP content into the customInstructions field of the
|
|
5
|
-
* Gemini settings JSON file
|
|
4
|
+
* Merges SOP content into the customInstructions field of the workspace's
|
|
5
|
+
* Gemini settings JSON file, and installs the Gemini CLI `BeforeTool` gate in
|
|
6
|
+
* `~/.gemini/settings.json` (see antigravityHooks.ts). A settings file that is
|
|
7
|
+
* not a plain JSON object is left alone and reported.
|
|
6
8
|
*
|
|
7
9
|
* HLD §3.14 — Harness Onboarding Matrix
|
|
8
10
|
* @module
|
|
9
11
|
*/
|
|
10
12
|
import { join } from 'node:path';
|
|
11
|
-
import { access,
|
|
13
|
+
import { access, writeFile, rename, mkdir } from 'node:fs/promises';
|
|
12
14
|
import { dirname } from 'node:path';
|
|
13
15
|
import { HarnessType } from '@intutic/shared-types';
|
|
14
16
|
import { hashFile } from '../lib/hash.js';
|
|
15
17
|
import { newIso } from '@intutic/id';
|
|
18
|
+
import { loadCredentials } from '../config/store.js';
|
|
19
|
+
import { keepOriginal, readJsonObjectForMerge, writeAntigravityHooks } from '@intutic/sync-daemon';
|
|
16
20
|
const CONFIG_FILE = '.gemini/settings.json';
|
|
17
21
|
export const antigravityAdapter = {
|
|
18
22
|
type: HarnessType.ANTIGRAVITY,
|
|
@@ -27,19 +31,18 @@ export const antigravityAdapter = {
|
|
|
27
31
|
}
|
|
28
32
|
},
|
|
29
33
|
async writeConfig(workspaceRoot, sops, proxyUrl) {
|
|
34
|
+
// The gate is installed even with zero SOPs: it is what refuses tool
|
|
35
|
+
// calls, and the built-in protections apply without any SOP.
|
|
36
|
+
const creds = await loadCredentials();
|
|
37
|
+
await writeAntigravityHooks(workspaceRoot, proxyUrl, creds?.workspaceId || 'local');
|
|
30
38
|
if (sops.length === 0)
|
|
31
39
|
return null;
|
|
32
40
|
const filePath = join(workspaceRoot, CONFIG_FILE);
|
|
33
41
|
const tmpPath = filePath + '.intutic-tmp';
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
settings = JSON.parse(existing);
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
// No existing file — start fresh
|
|
42
|
-
}
|
|
42
|
+
await keepOriginal(filePath, workspaceRoot);
|
|
43
|
+
const settings = await readJsonObjectForMerge(filePath);
|
|
44
|
+
if (settings === null)
|
|
45
|
+
return null;
|
|
43
46
|
// Merge governance instructions
|
|
44
47
|
const instructions = sops
|
|
45
48
|
.map((sop) => `## ${sop.title}\n\n${sop.content}`)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/harness/antigravity.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/harness/antigravity.ts"],"names":[],"mappings":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{ HarnessType, SyncSopEntry } from '@intutic/shared-types';
|
|
11
11
|
import type { IHarnessAdapter } from './types.js';
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Build markdown content from SOPs (Cursor, Claude Code, Windsurf). Each SOP
|
|
14
|
+
* the control plane synced ends with its `sop://` pointer comment, which maps
|
|
15
|
+
* the rules in the file back to the SOP that produced them.
|
|
16
|
+
*/
|
|
13
17
|
export declare function buildMarkdownContent(sops: SyncSopEntry[], proxyUrl: string): string;
|
|
14
18
|
/**
|
|
15
19
|
* Create a file-based harness adapter for markdown-style config files.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/harness/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/harness/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAgBjD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOnF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,EACjB,cAAc,EAAE,MAAM,GACrB,eAAe,CA8BjB"}
|
package/dist/harness/base.js
CHANGED
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
10
|
import { join } from 'node:path';
|
|
11
|
-
import { access
|
|
12
|
-
import { dirname } from 'node:path';
|
|
11
|
+
import { access } from 'node:fs/promises';
|
|
13
12
|
import { hashFile } from '../lib/hash.js';
|
|
14
13
|
import { newIso } from '@intutic/id';
|
|
14
|
+
import { writeOwnedFile } from '@intutic/sync-daemon';
|
|
15
15
|
/** Header prepended to all governance config files. */
|
|
16
16
|
function buildHeader() {
|
|
17
17
|
return [
|
|
@@ -22,12 +22,16 @@ function buildHeader() {
|
|
|
22
22
|
'',
|
|
23
23
|
].join('\n');
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Build markdown content from SOPs (Cursor, Claude Code, Windsurf). Each SOP
|
|
27
|
+
* the control plane synced ends with its `sop://` pointer comment, which maps
|
|
28
|
+
* the rules in the file back to the SOP that produced them.
|
|
29
|
+
*/
|
|
26
30
|
export function buildMarkdownContent(sops, proxyUrl) {
|
|
27
31
|
const header = buildHeader();
|
|
28
32
|
const proxySection = `> **Proxy URL:** \`${proxyUrl}\`\n\n`;
|
|
29
33
|
const sopSections = sops
|
|
30
|
-
.map((sop) => `## ${sop.title}\n\n${sop.content}`)
|
|
34
|
+
.map((sop) => `## ${sop.title}\n\n${sop.content}${sop.sopRef ? `\n${sop.sopRef}` : ''}`)
|
|
31
35
|
.join('\n\n---\n\n');
|
|
32
36
|
return header + proxySection + sopSections + '\n';
|
|
33
37
|
}
|
|
@@ -53,11 +57,8 @@ export function createMarkdownAdapter(type, configFileName) {
|
|
|
53
57
|
if (sops.length === 0)
|
|
54
58
|
return null;
|
|
55
59
|
const filePath = join(workspaceRoot, configFileName);
|
|
56
|
-
const tmpPath = filePath + '.intutic-tmp';
|
|
57
60
|
const content = buildMarkdownContent(sops, proxyUrl);
|
|
58
|
-
await
|
|
59
|
-
await writeFile(tmpPath, content, 'utf-8');
|
|
60
|
-
await rename(tmpPath, filePath);
|
|
61
|
+
await writeOwnedFile(filePath, workspaceRoot, content);
|
|
61
62
|
return filePath;
|
|
62
63
|
},
|
|
63
64
|
async readCurrentHash(workspaceRoot) {
|
package/dist/harness/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/harness/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EA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AqB;YAChC,IAAI,CAAC;gBACH,MAAM,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;gBACjD,OAAO,IAAI,CAAA;YACb,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,KAAK,CAAA;YACd,CAAC;QACH,CAAC;QAED,KAAK,CAAC,WAAW,CAAC,aAAqB,EAAE,IAAoB,EAAE,QAAgB;YAC7E,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAA;YAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;YACpD,MAAM,OAAO,GAAG,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;YACpD,MAAM,cAAc,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,CAAA;YACtD,OAAO,QAAQ,CAAA;QACjB,CAAC;QAED,KAAK,CAAC,eAAe,CAAC,aAAqB;YACzC,IAAI,CAAC;gBACH,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;YAC5D,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,IAAI,CAAA;YACb,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/harness/cline.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* cline.ts — Cline adapter
|
|
2
|
+
* cline.ts — Cline adapter.
|
|
3
3
|
*
|
|
4
|
-
* Detects the Cline VS Code extension, writes Intutic governance rules
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Detects the Cline VS Code extension, writes Intutic governance rules to
|
|
5
|
+
* `.clinerules/intutic-governance.md` and installs the PreToolUse gate at
|
|
6
|
+
* `.clinerules/hooks/PreToolUse` (see clineHooks.ts — `.clinerules` is a
|
|
7
|
+
* directory so both fit; a flat `.clinerules` an earlier version wrote is
|
|
8
|
+
* converted, one the user wrote is left alone).
|
|
9
|
+
*
|
|
10
|
+
* Cline keeps its API provider and base URL in its own settings panel, not in
|
|
11
|
+
* any file this adapter can write, so routing Cline through the proxy is a
|
|
12
|
+
* manual step (see the Cline integration page).
|
|
7
13
|
*
|
|
8
14
|
* HLD §3.14 — Harness Onboarding Matrix
|
|
9
15
|
* @module
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cline.d.ts","sourceRoot":"","sources":["../../src/harness/cline.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cline.d.ts","sourceRoot":"","sources":["../../src/harness/cline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AASjD,eAAO,MAAM,YAAY,EAAE,eA4D1B,CAAA"}
|