@intutic/cli 1.10.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cli.js +868 -30
- package/dist/cli.js.map +1 -1
- package/dist/commands/attenuate.d.ts +39 -0
- package/dist/commands/attenuate.d.ts.map +1 -0
- package/dist/commands/attenuate.js +98 -0
- package/dist/commands/attenuate.js.map +1 -0
- package/dist/commands/budget.d.ts +80 -0
- package/dist/commands/budget.d.ts.map +1 -1
- package/dist/commands/budget.js +119 -3
- package/dist/commands/budget.js.map +1 -1
- package/dist/commands/connect.d.ts +10 -0
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +358 -48
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/credentials.d.ts +31 -0
- package/dist/commands/credentials.d.ts.map +1 -0
- package/dist/commands/credentials.js +134 -0
- package/dist/commands/credentials.js.map +1 -0
- package/dist/commands/decision.d.ts +37 -0
- package/dist/commands/decision.d.ts.map +1 -0
- package/dist/commands/decision.js +56 -0
- package/dist/commands/decision.js.map +1 -0
- package/dist/commands/doctor.d.ts +38 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +228 -18
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/enforce.d.ts +33 -0
- package/dist/commands/enforce.d.ts.map +1 -0
- package/dist/commands/enforce.js +150 -0
- package/dist/commands/enforce.js.map +1 -0
- package/dist/commands/enterprise.d.ts +29 -0
- package/dist/commands/enterprise.d.ts.map +1 -0
- package/dist/commands/enterprise.js +141 -0
- package/dist/commands/enterprise.js.map +1 -0
- package/dist/commands/env.d.ts +7 -0
- package/dist/commands/env.d.ts.map +1 -0
- package/dist/commands/env.js +55 -0
- package/dist/commands/env.js.map +1 -0
- package/dist/commands/exec.d.ts +38 -2
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/exec.js +247 -10
- package/dist/commands/exec.js.map +1 -1
- package/dist/commands/findings.d.ts +84 -0
- package/dist/commands/findings.d.ts.map +1 -0
- package/dist/commands/findings.js +329 -0
- package/dist/commands/findings.js.map +1 -0
- package/dist/commands/gateway.d.ts +62 -0
- package/dist/commands/gateway.d.ts.map +1 -0
- package/dist/commands/gateway.js +298 -0
- package/dist/commands/gateway.js.map +1 -0
- package/dist/commands/guardrails.d.ts +81 -0
- package/dist/commands/guardrails.d.ts.map +1 -0
- package/dist/commands/guardrails.js +735 -0
- package/dist/commands/guardrails.js.map +1 -0
- package/dist/commands/init.d.ts +8 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +14 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install-daemon.d.ts +70 -3
- package/dist/commands/install-daemon.d.ts.map +1 -1
- package/dist/commands/install-daemon.js +482 -47
- package/dist/commands/install-daemon.js.map +1 -1
- package/dist/commands/integrity.d.ts +205 -0
- package/dist/commands/integrity.d.ts.map +1 -0
- package/dist/commands/integrity.js +620 -0
- package/dist/commands/integrity.js.map +1 -0
- package/dist/commands/judge.d.ts +31 -0
- package/dist/commands/judge.d.ts.map +1 -0
- package/dist/commands/judge.js +118 -0
- package/dist/commands/judge.js.map +1 -0
- package/dist/commands/org.d.ts +31 -0
- package/dist/commands/org.d.ts.map +1 -0
- package/dist/commands/org.js +159 -0
- package/dist/commands/org.js.map +1 -0
- package/dist/commands/policy.d.ts +138 -4
- package/dist/commands/policy.d.ts.map +1 -1
- package/dist/commands/policy.js +538 -97
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/predict-cost.d.ts +45 -0
- package/dist/commands/predict-cost.d.ts.map +1 -0
- package/dist/commands/predict-cost.js +123 -0
- package/dist/commands/predict-cost.js.map +1 -0
- package/dist/commands/rollback.d.ts +5 -0
- package/dist/commands/rollback.d.ts.map +1 -0
- package/dist/commands/rollback.js +142 -0
- package/dist/commands/rollback.js.map +1 -0
- package/dist/commands/routing.d.ts +62 -0
- package/dist/commands/routing.d.ts.map +1 -0
- package/dist/commands/routing.js +121 -0
- package/dist/commands/routing.js.map +1 -0
- package/dist/commands/setup.d.ts +62 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +238 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/skill.d.ts +268 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +744 -39
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/sops.d.ts +95 -0
- package/dist/commands/sops.d.ts.map +1 -1
- package/dist/commands/sops.js +334 -34
- package/dist/commands/sops.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +1 -18
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +44 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/team.d.ts +38 -0
- package/dist/commands/team.d.ts.map +1 -0
- package/dist/commands/team.js +140 -0
- package/dist/commands/team.js.map +1 -0
- package/dist/commands/traces.d.ts +8 -1
- package/dist/commands/traces.d.ts.map +1 -1
- package/dist/commands/traces.js +114 -15
- package/dist/commands/traces.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +2 -1
- package/dist/commands/whoami.js.map +1 -1
- package/dist/config/keychain.d.ts +10 -2
- package/dist/config/keychain.d.ts.map +1 -1
- package/dist/config/keychain.js +83 -14
- package/dist/config/keychain.js.map +1 -1
- package/dist/config/paths.d.ts +27 -0
- package/dist/config/paths.d.ts.map +1 -1
- package/dist/config/paths.js +37 -6
- package/dist/config/paths.js.map +1 -1
- package/dist/config/store.d.ts.map +1 -1
- package/dist/config/store.js +19 -3
- package/dist/config/store.js.map +1 -1
- package/dist/harness/ag2.d.ts +22 -0
- package/dist/harness/ag2.d.ts.map +1 -0
- package/dist/harness/ag2.js +34 -0
- package/dist/harness/ag2.js.map +1 -0
- package/dist/harness/agentcore.d.ts +55 -0
- package/dist/harness/agentcore.d.ts.map +1 -0
- package/dist/harness/agentcore.js +119 -0
- package/dist/harness/agentcore.js.map +1 -0
- package/dist/harness/agenticOrchestrator.d.ts +52 -0
- package/dist/harness/agenticOrchestrator.d.ts.map +1 -0
- package/dist/harness/agenticOrchestrator.js +115 -0
- package/dist/harness/agenticOrchestrator.js.map +1 -0
- package/dist/harness/aiSdkHarness.d.ts +30 -0
- package/dist/harness/aiSdkHarness.d.ts.map +1 -0
- package/dist/harness/aiSdkHarness.js +51 -0
- package/dist/harness/aiSdkHarness.js.map +1 -0
- package/dist/harness/aiSdkWorkflow.d.ts +26 -0
- package/dist/harness/aiSdkWorkflow.d.ts.map +1 -0
- package/dist/harness/aiSdkWorkflow.js +39 -0
- package/dist/harness/aiSdkWorkflow.js.map +1 -0
- package/dist/harness/autogen.d.ts +24 -0
- package/dist/harness/autogen.d.ts.map +1 -0
- package/dist/harness/autogen.js +36 -0
- package/dist/harness/autogen.js.map +1 -0
- package/dist/harness/base.js.map +1 -1
- package/dist/harness/continue.d.ts.map +1 -1
- package/dist/harness/continue.js +2 -1
- package/dist/harness/continue.js.map +1 -1
- package/dist/harness/crewai.d.ts +15 -0
- package/dist/harness/crewai.d.ts.map +1 -0
- package/dist/harness/crewai.js +26 -0
- package/dist/harness/crewai.js.map +1 -0
- package/dist/harness/detector.d.ts +1 -1
- package/dist/harness/detector.d.ts.map +1 -1
- package/dist/harness/detector.js +47 -1
- package/dist/harness/detector.js.map +1 -1
- package/dist/harness/dsh.d.ts +19 -0
- package/dist/harness/dsh.d.ts.map +1 -0
- package/dist/harness/dsh.js +93 -0
- package/dist/harness/dsh.js.map +1 -0
- package/dist/harness/eve.d.ts +40 -0
- package/dist/harness/eve.d.ts.map +1 -0
- package/dist/harness/eve.js +67 -0
- package/dist/harness/eve.js.map +1 -0
- package/dist/harness/googleAdk.d.ts +18 -0
- package/dist/harness/googleAdk.d.ts.map +1 -0
- package/dist/harness/googleAdk.js +29 -0
- package/dist/harness/googleAdk.js.map +1 -0
- package/dist/harness/goose.d.ts.map +1 -1
- package/dist/harness/goose.js +5 -1
- package/dist/harness/goose.js.map +1 -1
- package/dist/harness/grok.d.ts +16 -0
- package/dist/harness/grok.d.ts.map +1 -0
- package/dist/harness/grok.js +78 -0
- package/dist/harness/grok.js.map +1 -0
- package/dist/harness/jsSdkGatedAdapter.d.ts +102 -0
- package/dist/harness/jsSdkGatedAdapter.d.ts.map +1 -0
- package/dist/harness/jsSdkGatedAdapter.js +139 -0
- package/dist/harness/jsSdkGatedAdapter.js.map +1 -0
- package/dist/harness/langchain.d.ts +22 -0
- package/dist/harness/langchain.d.ts.map +1 -0
- package/dist/harness/langchain.js +33 -0
- package/dist/harness/langchain.js.map +1 -0
- package/dist/harness/langgraph.d.ts +22 -0
- package/dist/harness/langgraph.d.ts.map +1 -0
- package/dist/harness/langgraph.js +80 -0
- package/dist/harness/langgraph.js.map +1 -0
- package/dist/harness/mastra.d.ts +21 -0
- package/dist/harness/mastra.d.ts.map +1 -0
- package/dist/harness/mastra.js +33 -0
- package/dist/harness/mastra.js.map +1 -0
- package/dist/harness/muse.d.ts +22 -0
- package/dist/harness/muse.d.ts.map +1 -0
- package/dist/harness/muse.js +92 -0
- package/dist/harness/muse.js.map +1 -0
- package/dist/harness/n8n.d.ts.map +1 -1
- package/dist/harness/n8n.js +36 -11
- package/dist/harness/n8n.js.map +1 -1
- package/dist/harness/openaiAgents.d.ts +40 -0
- package/dist/harness/openaiAgents.d.ts.map +1 -0
- package/dist/harness/openaiAgents.js +107 -0
- package/dist/harness/openaiAgents.js.map +1 -0
- package/dist/harness/opencode.d.ts +24 -0
- package/dist/harness/opencode.d.ts.map +1 -0
- package/dist/harness/opencode.js +97 -0
- package/dist/harness/opencode.js.map +1 -0
- package/dist/harness/pydanticAi.d.ts +19 -0
- package/dist/harness/pydanticAi.d.ts.map +1 -0
- package/dist/harness/pydanticAi.js +30 -0
- package/dist/harness/pydanticAi.js.map +1 -0
- package/dist/harness/sdkGatedAdapter.d.ts +55 -0
- package/dist/harness/sdkGatedAdapter.d.ts.map +1 -0
- package/dist/harness/sdkGatedAdapter.js +85 -0
- package/dist/harness/sdkGatedAdapter.js.map +1 -0
- package/dist/harness/smolagents.d.ts +22 -0
- package/dist/harness/smolagents.d.ts.map +1 -0
- package/dist/harness/smolagents.js +33 -0
- package/dist/harness/smolagents.js.map +1 -0
- package/dist/harness/strands.d.ts +22 -0
- package/dist/harness/strands.d.ts.map +1 -0
- package/dist/harness/strands.js +35 -0
- package/dist/harness/strands.js.map +1 -0
- package/dist/harness/trueforge.d.ts +25 -0
- package/dist/harness/trueforge.d.ts.map +1 -0
- package/dist/harness/trueforge.js +40 -0
- package/dist/harness/trueforge.js.map +1 -0
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/harness/types.js +70 -0
- package/dist/harness/types.js.map +1 -1
- package/dist/harness/vercelAiSdk.d.ts +31 -0
- package/dist/harness/vercelAiSdk.d.ts.map +1 -0
- package/dist/harness/vercelAiSdk.js +44 -0
- package/dist/harness/vercelAiSdk.js.map +1 -0
- package/dist/harness/xirp.d.ts +43 -0
- package/dist/harness/xirp.d.ts.map +1 -0
- package/dist/harness/xirp.js +95 -0
- package/dist/harness/xirp.js.map +1 -0
- package/dist/lib/api.d.ts +68 -0
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +108 -67
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/authMessages.d.ts +19 -0
- package/dist/lib/authMessages.d.ts.map +1 -0
- package/dist/lib/authMessages.js +20 -0
- package/dist/lib/authMessages.js.map +1 -0
- package/dist/lib/binaryChecksum.d.ts +12 -0
- package/dist/lib/binaryChecksum.d.ts.map +1 -0
- package/dist/lib/binaryChecksum.js +45 -0
- package/dist/lib/binaryChecksum.js.map +1 -0
- package/dist/lib/binaryOnPath.d.ts +24 -0
- package/dist/lib/binaryOnPath.d.ts.map +1 -0
- package/dist/lib/binaryOnPath.js +31 -0
- package/dist/lib/binaryOnPath.js.map +1 -0
- package/dist/lib/caTrust.d.ts +69 -0
- package/dist/lib/caTrust.d.ts.map +1 -0
- package/dist/lib/caTrust.js +169 -0
- package/dist/lib/caTrust.js.map +1 -0
- package/dist/lib/ciscoScanner.d.ts +178 -0
- package/dist/lib/ciscoScanner.d.ts.map +1 -0
- package/dist/lib/ciscoScanner.js +292 -0
- package/dist/lib/ciscoScanner.js.map +1 -0
- package/dist/lib/decisionsLogRefresh.d.ts +28 -0
- package/dist/lib/decisionsLogRefresh.d.ts.map +1 -0
- package/dist/lib/decisionsLogRefresh.js +54 -0
- package/dist/lib/decisionsLogRefresh.js.map +1 -0
- package/dist/lib/deviceReport.d.ts +26 -0
- package/dist/lib/deviceReport.d.ts.map +1 -0
- package/dist/lib/deviceReport.js +55 -0
- package/dist/lib/deviceReport.js.map +1 -0
- package/dist/lib/elevation.d.ts +58 -0
- package/dist/lib/elevation.d.ts.map +1 -0
- package/dist/lib/elevation.js +83 -0
- package/dist/lib/elevation.js.map +1 -0
- package/dist/lib/enforcementState.d.ts +69 -0
- package/dist/lib/enforcementState.d.ts.map +1 -0
- package/dist/lib/enforcementState.js +113 -0
- package/dist/lib/enforcementState.js.map +1 -0
- package/dist/lib/ensureValkey.d.ts.map +1 -1
- package/dist/lib/ensureValkey.js +2 -2
- package/dist/lib/ensureValkey.js.map +1 -1
- package/dist/lib/envInjector.d.ts.map +1 -1
- package/dist/lib/envInjector.js +22 -4
- package/dist/lib/envInjector.js.map +1 -1
- package/dist/lib/gitHooks.d.ts +7 -2
- package/dist/lib/gitHooks.d.ts.map +1 -1
- package/dist/lib/gitHooks.js +180 -13
- package/dist/lib/gitHooks.js.map +1 -1
- package/dist/lib/gracefulShutdown.d.ts +37 -0
- package/dist/lib/gracefulShutdown.d.ts.map +1 -0
- package/dist/lib/gracefulShutdown.js +57 -0
- package/dist/lib/gracefulShutdown.js.map +1 -0
- package/dist/lib/graphIdentity.d.ts +80 -0
- package/dist/lib/graphIdentity.d.ts.map +1 -0
- package/dist/lib/graphIdentity.js +120 -0
- package/dist/lib/graphIdentity.js.map +1 -0
- package/dist/lib/localTraces.d.ts +61 -0
- package/dist/lib/localTraces.d.ts.map +1 -0
- package/dist/lib/localTraces.js +173 -0
- package/dist/lib/localTraces.js.map +1 -0
- package/dist/lib/mdmManifest.d.ts +73 -0
- package/dist/lib/mdmManifest.d.ts.map +1 -0
- package/dist/lib/mdmManifest.js +190 -0
- package/dist/lib/mdmManifest.js.map +1 -0
- package/dist/lib/onboarding.d.ts.map +1 -1
- package/dist/lib/onboarding.js +60 -1
- package/dist/lib/onboarding.js.map +1 -1
- package/dist/lib/otelPropagation.d.ts +26 -0
- package/dist/lib/otelPropagation.d.ts.map +1 -0
- package/dist/lib/otelPropagation.js +40 -0
- package/dist/lib/otelPropagation.js.map +1 -0
- package/dist/lib/policySnapshot.d.ts +92 -0
- package/dist/lib/policySnapshot.d.ts.map +1 -0
- package/dist/lib/policySnapshot.js +173 -0
- package/dist/lib/policySnapshot.js.map +1 -0
- package/dist/lib/process.d.ts.map +1 -1
- package/dist/lib/process.js +60 -0
- package/dist/lib/process.js.map +1 -1
- package/dist/lib/providerProbe.d.ts +28 -0
- package/dist/lib/providerProbe.d.ts.map +1 -0
- package/dist/lib/providerProbe.js +57 -0
- package/dist/lib/providerProbe.js.map +1 -0
- package/dist/lib/proxyBinary.d.ts +19 -0
- package/dist/lib/proxyBinary.d.ts.map +1 -0
- package/dist/lib/proxyBinary.js +30 -0
- package/dist/lib/proxyBinary.js.map +1 -0
- package/dist/lib/sandbox/firecracker.d.ts +89 -0
- package/dist/lib/sandbox/firecracker.d.ts.map +1 -0
- package/dist/lib/sandbox/firecracker.js +135 -0
- package/dist/lib/sandbox/firecracker.js.map +1 -0
- package/dist/lib/sandbox/index.d.ts +34 -0
- package/dist/lib/sandbox/index.d.ts.map +1 -0
- package/dist/lib/sandbox/index.js +54 -0
- package/dist/lib/sandbox/index.js.map +1 -0
- package/dist/lib/sandbox/oci.d.ts +38 -0
- package/dist/lib/sandbox/oci.d.ts.map +1 -0
- package/dist/lib/sandbox/oci.js +108 -0
- package/dist/lib/sandbox/oci.js.map +1 -0
- package/dist/lib/sandbox/types.d.ts +48 -0
- package/dist/lib/sandbox/types.d.ts.map +1 -0
- package/dist/lib/sandbox/types.js +12 -0
- package/dist/lib/sandbox/types.js.map +1 -0
- package/dist/lib/sopFrontMatter.d.ts +50 -0
- package/dist/lib/sopFrontMatter.d.ts.map +1 -0
- package/dist/lib/sopFrontMatter.js +129 -0
- package/dist/lib/sopFrontMatter.js.map +1 -0
- package/package.json +11 -6
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* openaiAgents.ts — OpenAI Agents SDK adapter (env-file config, SDK-side
|
|
3
|
+
* gate) covering BOTH ecosystems the SDK ships in, following the LangChain
|
|
4
|
+
* dual-ecosystem precedent (see HarnessType.LANGCHAIN's doc comment in
|
|
5
|
+
* shared-types/enums.ts) — except that unlike LangChain, BOTH sides have a
|
|
6
|
+
* shipped gate here, so detection AND config cover both:
|
|
7
|
+
*
|
|
8
|
+
* * Python (`openai-agents` on PyPI): same shape as langgraph.ts (see
|
|
9
|
+
* sdkGatedAdapter.ts). Tools run as plain Python callables inside the
|
|
10
|
+
* agent's own process — no on-disk hook/config file exists to gate a
|
|
11
|
+
* call, so the blocking gate ships SDK-side via
|
|
12
|
+
* `intutic_clawde.gate.adapters.openai_agents.intutic_tool_guardrail`, a
|
|
13
|
+
* `@tool_input_guardrail` that runs before the tool executes and can
|
|
14
|
+
* reject the call via `ToolGuardrailFunctionOutput.reject_content()` —
|
|
15
|
+
* the SDK's own documented veto point (verified live against
|
|
16
|
+
* openai-agents==0.20.0).
|
|
17
|
+
* * TypeScript (`@openai/agents` on npm, plus its `-core`/`-openai`/
|
|
18
|
+
* `-realtime`/`-extensions` sub-packages — all matched by the
|
|
19
|
+
* `@openai/agents` prefix rule, same mechanism as vercelAiSdk.ts's
|
|
20
|
+
* `@ai-sdk/` prefix): the gate ships in `@intutic/gate/openai`
|
|
21
|
+
* (packages/gate-js), the same tool-input-guardrail veto point verified
|
|
22
|
+
* against @openai/agents@0.16.1 (guardrails exist since
|
|
23
|
+
* @openai/agents-core 0.3.8) — see that module's doc for the MCP
|
|
24
|
+
* materialization gotcha and the tracing-exporter DLP caveat its
|
|
25
|
+
* `installOpenAiGate()` closes.
|
|
26
|
+
*
|
|
27
|
+
* `writeConfig` writes the SAME proxy env vars either way (the `openai`
|
|
28
|
+
* clients of both ecosystems honour `OPENAI_BASE_URL`); only the SDK-gate
|
|
29
|
+
* pointer comment differs. A workspace detected as TypeScript-only gets the
|
|
30
|
+
* `@intutic/gate/openai` pointer; Python-only gets the Python pointer; a
|
|
31
|
+
* monorepo with both gets the Python file with the TypeScript pointer
|
|
32
|
+
* appended (TD-408 item 5 — until 2026-09-22 the TS half was only reachable
|
|
33
|
+
* through the docs page).
|
|
34
|
+
*
|
|
35
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
36
|
+
* @module
|
|
37
|
+
*/
|
|
38
|
+
import type { IHarnessAdapter } from './types.js';
|
|
39
|
+
export declare const openaiAgentsAdapter: IHarnessAdapter;
|
|
40
|
+
//# sourceMappingURL=openaiAgents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openaiAgents.d.ts","sourceRoot":"","sources":["../../src/harness/openaiAgents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAuCjD,eAAO,MAAM,mBAAmB,EAAE,eAwCjC,CAAA"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* openaiAgents.ts — OpenAI Agents SDK adapter (env-file config, SDK-side
|
|
3
|
+
* gate) covering BOTH ecosystems the SDK ships in, following the LangChain
|
|
4
|
+
* dual-ecosystem precedent (see HarnessType.LANGCHAIN's doc comment in
|
|
5
|
+
* shared-types/enums.ts) — except that unlike LangChain, BOTH sides have a
|
|
6
|
+
* shipped gate here, so detection AND config cover both:
|
|
7
|
+
*
|
|
8
|
+
* * Python (`openai-agents` on PyPI): same shape as langgraph.ts (see
|
|
9
|
+
* sdkGatedAdapter.ts). Tools run as plain Python callables inside the
|
|
10
|
+
* agent's own process — no on-disk hook/config file exists to gate a
|
|
11
|
+
* call, so the blocking gate ships SDK-side via
|
|
12
|
+
* `intutic_clawde.gate.adapters.openai_agents.intutic_tool_guardrail`, a
|
|
13
|
+
* `@tool_input_guardrail` that runs before the tool executes and can
|
|
14
|
+
* reject the call via `ToolGuardrailFunctionOutput.reject_content()` —
|
|
15
|
+
* the SDK's own documented veto point (verified live against
|
|
16
|
+
* openai-agents==0.20.0).
|
|
17
|
+
* * TypeScript (`@openai/agents` on npm, plus its `-core`/`-openai`/
|
|
18
|
+
* `-realtime`/`-extensions` sub-packages — all matched by the
|
|
19
|
+
* `@openai/agents` prefix rule, same mechanism as vercelAiSdk.ts's
|
|
20
|
+
* `@ai-sdk/` prefix): the gate ships in `@intutic/gate/openai`
|
|
21
|
+
* (packages/gate-js), the same tool-input-guardrail veto point verified
|
|
22
|
+
* against @openai/agents@0.16.1 (guardrails exist since
|
|
23
|
+
* @openai/agents-core 0.3.8) — see that module's doc for the MCP
|
|
24
|
+
* materialization gotcha and the tracing-exporter DLP caveat its
|
|
25
|
+
* `installOpenAiGate()` closes.
|
|
26
|
+
*
|
|
27
|
+
* `writeConfig` writes the SAME proxy env vars either way (the `openai`
|
|
28
|
+
* clients of both ecosystems honour `OPENAI_BASE_URL`); only the SDK-gate
|
|
29
|
+
* pointer comment differs. A workspace detected as TypeScript-only gets the
|
|
30
|
+
* `@intutic/gate/openai` pointer; Python-only gets the Python pointer; a
|
|
31
|
+
* monorepo with both gets the Python file with the TypeScript pointer
|
|
32
|
+
* appended (TD-408 item 5 — until 2026-09-22 the TS half was only reachable
|
|
33
|
+
* through the docs page).
|
|
34
|
+
*
|
|
35
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
36
|
+
* @module
|
|
37
|
+
*/
|
|
38
|
+
import { appendFile } from 'node:fs/promises';
|
|
39
|
+
import { HarnessType } from '@intutic/shared-types';
|
|
40
|
+
import { makeSdkGatedAdapter } from './sdkGatedAdapter.js';
|
|
41
|
+
import { makeJsSdkGatedAdapter } from './jsSdkGatedAdapter.js';
|
|
42
|
+
/** The Python side — unchanged from this adapter's original single-ecosystem
|
|
43
|
+
* shape, and still the default `writeConfig` text (see module doc). */
|
|
44
|
+
const pythonAdapter = makeSdkGatedAdapter({
|
|
45
|
+
type: HarnessType.OPENAI_AGENTS,
|
|
46
|
+
label: 'OpenAI Agents SDK',
|
|
47
|
+
keywords: ['openai-agents'],
|
|
48
|
+
pipInstall: 'intutic-clawde[openai-agents]',
|
|
49
|
+
importLine: 'from intutic_clawde.gate.adapters.openai_agents import intutic_tool_guardrail',
|
|
50
|
+
usageSummary: 'intutic_tool_guardrail, attached via function_tool(tool_input_guardrails=[...]), ' +
|
|
51
|
+
'refuses denied calls before the tool body runs.',
|
|
52
|
+
docsSlug: 'openai-agents',
|
|
53
|
+
});
|
|
54
|
+
/** The TypeScript side — package.json-dep detection (any `@openai/agents*`
|
|
55
|
+
* package; the meta-package alone is enough, and `-core`-only installs are
|
|
56
|
+
* matched too) plus the `@intutic/gate/openai` pointer comment. No
|
|
57
|
+
* `minMajor` floor: the guardrail veto point predates every version the
|
|
58
|
+
* meta-package `@openai/agents` ever shipped as latest in 2026, and the
|
|
59
|
+
* docs page states the >=0.3.8 core floor explicitly. */
|
|
60
|
+
const jsAdapter = makeJsSdkGatedAdapter({
|
|
61
|
+
type: HarnessType.OPENAI_AGENTS,
|
|
62
|
+
label: 'OpenAI Agents SDK (TypeScript)',
|
|
63
|
+
requires: [],
|
|
64
|
+
requiresPrefix: '@openai/agents',
|
|
65
|
+
npmInstall: '@intutic/gate',
|
|
66
|
+
importLine: "import { installOpenAiGate, wrapAgent } from '@intutic/gate/openai'",
|
|
67
|
+
usageSummary: 'installOpenAiGate() + wrapAgent(agent) — tool input guardrails refuse denied calls before ' +
|
|
68
|
+
'the tool body runs, mcpServers-derived tools included. installOpenAiGate() also disables ' +
|
|
69
|
+
'the SDK tracing exporter, which posts tool I/O to a hardcoded api.openai.com endpoint ' +
|
|
70
|
+
'that bypasses OPENAI_BASE_URL.',
|
|
71
|
+
docsSlug: 'openai-agents',
|
|
72
|
+
});
|
|
73
|
+
export const openaiAgentsAdapter = {
|
|
74
|
+
type: HarnessType.OPENAI_AGENTS,
|
|
75
|
+
configFileName: '.env.intutic',
|
|
76
|
+
async detect(workspaceRoot) {
|
|
77
|
+
return (await pythonAdapter.detect(workspaceRoot)) || (await jsAdapter.detect(workspaceRoot));
|
|
78
|
+
},
|
|
79
|
+
async writeConfig(workspaceRoot, sops, proxyUrl) {
|
|
80
|
+
const [python, js] = await Promise.all([
|
|
81
|
+
pythonAdapter.detect(workspaceRoot),
|
|
82
|
+
jsAdapter.detect(workspaceRoot),
|
|
83
|
+
]);
|
|
84
|
+
if (js && !python) {
|
|
85
|
+
return jsAdapter.writeConfig(workspaceRoot, sops, proxyUrl);
|
|
86
|
+
}
|
|
87
|
+
const filePath = await pythonAdapter.writeConfig(workspaceRoot, sops, proxyUrl);
|
|
88
|
+
if (filePath && js) {
|
|
89
|
+
// Both ecosystems in one workspace (TD-408 item 5): the file is the
|
|
90
|
+
// Python adapter's, so its pointer named only the Python gate and the
|
|
91
|
+
// TypeScript half of the monorepo was left to find `@intutic/gate`
|
|
92
|
+
// through the docs page. Say it here too.
|
|
93
|
+
await appendFile(filePath, [
|
|
94
|
+
'# This workspace also carries `@openai/agents` (TypeScript). Its tools run in',
|
|
95
|
+
'# your own Node process; the blocking gate for that half ships SDK-side too:',
|
|
96
|
+
'# npm install @intutic/gate',
|
|
97
|
+
"# import { installOpenAiGate, wrapAgent } from '@intutic/gate/openai'",
|
|
98
|
+
'# See https://docs.intutic.ai/integrations/openai-agents',
|
|
99
|
+
'',
|
|
100
|
+
].join('\n'), 'utf-8');
|
|
101
|
+
}
|
|
102
|
+
return filePath;
|
|
103
|
+
},
|
|
104
|
+
// Both sides write the identical file path; either delegate reads it.
|
|
105
|
+
readCurrentHash: (workspaceRoot) => pythonAdapter.readCurrentHash(workspaceRoot),
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=openaiAgents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openaiAgents.js","sourceRoot":"","sources":["../../src/harness/openaiAgents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAE9D;wEACwE;AACxE,MAAM,aAAa,GAAG,mBAAmB,CAAC;IACxC,IAAI,EAAE,WAAW,CAAC,aAAa;IAC/B,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,CAAC,eAAe,CAAC;IAC3B,UAAU,EAAE,+BAA+B;IAC3C,UAAU,EAAE,+EAA+E;IAC3F,YAAY,EACV,mFAAmF;QACnF,iDAAiD;IACnD,QAAQ,EAAE,eAAe;CAC1B,CAAC,CAAA;AAEF;;;;;0DAK0D;AAC1D,MAAM,SAAS,GAAG,qBAAqB,CAAC;IACtC,IAAI,EAAE,WAAW,CAAC,aAAa;IAC/B,KAAK,EAAE,gCAAgC;IACvC,QAAQ,EAAE,EAAE;IACZ,cAAc,EAAE,gBAAgB;IAChC,UAAU,EAAE,eAAe;IAC3B,UAAU,EAAE,qEAAqE;IACjF,YAAY,EACV,4FAA4F;QAC5F,2FAA2F;QAC3F,wFAAwF;QACxF,gCAAgC;IAClC,QAAQ,EAAE,eAAe;CAC1B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAoB;IAClD,IAAI,EAAE,WAAW,CAAC,aAAa;IAC/B,cAAc,EAAE,cAAc;IAE9B,KAAK,CAAC,MAAM,CAAC,aAAqB;QAChC,OAAO,CAAC,MAAM,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,MAAM,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAA;IAC/F,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,aAAa,EAAE,IAAI,EAAE,QAAQ;QAC7C,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACrC,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC;YACnC,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC;SAChC,CAAC,CAAA;QACF,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;YAClB,OAAO,SAAS,CAAC,WAAW,CAAC,aAAa,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;QAC7D,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,WAAW,CAAC,aAAa,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;QAC/E,IAAI,QAAQ,IAAI,EAAE,EAAE,CAAC;YACnB,oEAAoE;YACpE,sEAAsE;YACtE,mEAAmE;YACnE,0CAA0C;YAC1C,MAAM,UAAU,CACd,QAAQ,EACR;gBACE,+EAA+E;gBAC/E,8EAA8E;gBAC9E,+BAA+B;gBAC/B,yEAAyE;gBACzE,0DAA0D;gBAC1D,EAAE;aACH,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ,OAAO,CACR,CAAA;QACH,CAAC;QACD,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,sEAAsE;IACtE,eAAe,EAAE,CAAC,aAAa,EAAE,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,aAAa,CAAC;CACjF,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* opencode.ts — OpenCode adapter (npm `opencode-ai` 1.x / `@opencode/cli` 2.x,
|
|
3
|
+
* binary `opencode`).
|
|
4
|
+
*
|
|
5
|
+
* OpenCode is a terminal coding agent whose instructions file is `AGENTS.md`
|
|
6
|
+
* (project, with a `CLAUDE.md` fallback, and `~/.config/opencode/AGENTS.md`)
|
|
7
|
+
* — delivered here through the shared markdown builder every other
|
|
8
|
+
* `AGENTS.md`/`CLAUDE.md` harness uses, so it grows no rules format of its
|
|
9
|
+
* own.
|
|
10
|
+
*
|
|
11
|
+
* The governance-critical half is a **plugin**, not a hook file: OpenCode
|
|
12
|
+
* loads `.opencode/plugins/*.js` into its own process and runs the plugin's
|
|
13
|
+
* `tool.execute.before` hook (1.x) / `tool execute.before` hook (2.x) before
|
|
14
|
+
* every tool call; throwing refuses the call. That plugin is generated by
|
|
15
|
+
* `@intutic/sync-daemon`'s `openCodeHooks.ts`, the same split Muse and Grok
|
|
16
|
+
* use for their hook writers. `opencode.json` is not written — see the
|
|
17
|
+
* writer's module doc.
|
|
18
|
+
*
|
|
19
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
20
|
+
* @module
|
|
21
|
+
*/
|
|
22
|
+
import type { IHarnessAdapter } from './types.js';
|
|
23
|
+
export declare const opencodeAdapter: IHarnessAdapter;
|
|
24
|
+
//# sourceMappingURL=opencode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/harness/opencode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAajD,eAAO,MAAM,eAAe,EAAE,eA6D7B,CAAA"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* opencode.ts — OpenCode adapter (npm `opencode-ai` 1.x / `@opencode/cli` 2.x,
|
|
3
|
+
* binary `opencode`).
|
|
4
|
+
*
|
|
5
|
+
* OpenCode is a terminal coding agent whose instructions file is `AGENTS.md`
|
|
6
|
+
* (project, with a `CLAUDE.md` fallback, and `~/.config/opencode/AGENTS.md`)
|
|
7
|
+
* — delivered here through the shared markdown builder every other
|
|
8
|
+
* `AGENTS.md`/`CLAUDE.md` harness uses, so it grows no rules format of its
|
|
9
|
+
* own.
|
|
10
|
+
*
|
|
11
|
+
* The governance-critical half is a **plugin**, not a hook file: OpenCode
|
|
12
|
+
* loads `.opencode/plugins/*.js` into its own process and runs the plugin's
|
|
13
|
+
* `tool.execute.before` hook (1.x) / `tool execute.before` hook (2.x) before
|
|
14
|
+
* every tool call; throwing refuses the call. That plugin is generated by
|
|
15
|
+
* `@intutic/sync-daemon`'s `openCodeHooks.ts`, the same split Muse and Grok
|
|
16
|
+
* use for their hook writers. `opencode.json` is not written — see the
|
|
17
|
+
* writer's module doc.
|
|
18
|
+
*
|
|
19
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
20
|
+
* @module
|
|
21
|
+
*/
|
|
22
|
+
import { join, dirname } from 'node:path';
|
|
23
|
+
import { access, writeFile, rename, mkdir } from 'node:fs/promises';
|
|
24
|
+
import { homedir } from 'node:os';
|
|
25
|
+
import { HarnessType } from '@intutic/shared-types';
|
|
26
|
+
import { hashFile } from '../lib/hash.js';
|
|
27
|
+
import { buildMarkdownContent } from './base.js';
|
|
28
|
+
import { writeOpenCodeHooks } from '@intutic/sync-daemon/harness/openCodeHooks';
|
|
29
|
+
/** Workspace-relative rules file. OpenCode reads this, falling back to CLAUDE.md. */
|
|
30
|
+
const CONFIG_FILE = 'AGENTS.md';
|
|
31
|
+
/** `$OPENCODE_CONFIG_DIR` or `~/.config/opencode` — the user-level config dir. */
|
|
32
|
+
function openCodeConfigDir() {
|
|
33
|
+
return process.env.OPENCODE_CONFIG_DIR || join(homedir(), '.config', 'opencode');
|
|
34
|
+
}
|
|
35
|
+
export const opencodeAdapter = {
|
|
36
|
+
type: HarnessType.OPENCODE,
|
|
37
|
+
configFileName: CONFIG_FILE,
|
|
38
|
+
async detect(workspaceRoot) {
|
|
39
|
+
// 1. Project-local `.opencode/` directory or `opencode.json{,c}`. Not
|
|
40
|
+
// AGENTS.md alone — Muse and Grok read the same file.
|
|
41
|
+
for (const marker of ['.opencode', 'opencode.json', 'opencode.jsonc']) {
|
|
42
|
+
try {
|
|
43
|
+
await access(join(workspaceRoot, marker));
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
catch { /* not here */ }
|
|
47
|
+
}
|
|
48
|
+
// 2. User-level config dir — installed but never run in this workspace.
|
|
49
|
+
try {
|
|
50
|
+
await access(openCodeConfigDir());
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
catch { /* not here */ }
|
|
54
|
+
// 3. `opencode` (or the 2.x line's `opencode2`) binary on PATH.
|
|
55
|
+
const pathDirs = (process.env.PATH ?? '').split(process.platform === 'win32' ? ';' : ':');
|
|
56
|
+
try {
|
|
57
|
+
const { accessSync } = await import('node:fs');
|
|
58
|
+
for (const dir of pathDirs) {
|
|
59
|
+
for (const bin of ['opencode', 'opencode2']) {
|
|
60
|
+
try {
|
|
61
|
+
accessSync(join(dir, bin));
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
catch { /* not here */ }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch { /* ignore */ }
|
|
69
|
+
return false;
|
|
70
|
+
},
|
|
71
|
+
async writeConfig(workspaceRoot, sops, proxyUrl) {
|
|
72
|
+
const agentsPath = join(workspaceRoot, CONFIG_FILE);
|
|
73
|
+
// 1. AGENTS.md rules file — same "skip when there is nothing to write"
|
|
74
|
+
// convention every markdown adapter uses.
|
|
75
|
+
if (sops.length > 0) {
|
|
76
|
+
const content = buildMarkdownContent(sops, proxyUrl);
|
|
77
|
+
await mkdir(dirname(agentsPath), { recursive: true });
|
|
78
|
+
const tmp = agentsPath + '.intutic-tmp';
|
|
79
|
+
await writeFile(tmp, content, 'utf-8');
|
|
80
|
+
await rename(tmp, agentsPath);
|
|
81
|
+
}
|
|
82
|
+
// 2. The plugin gate. `intutic connect` has no workspace id in scope —
|
|
83
|
+
// same limitation `museAdapter` has — the sync daemon re-runs this
|
|
84
|
+
// with a real one on the next cycle.
|
|
85
|
+
await writeOpenCodeHooks(workspaceRoot, proxyUrl, '');
|
|
86
|
+
return agentsPath;
|
|
87
|
+
},
|
|
88
|
+
async readCurrentHash(workspaceRoot) {
|
|
89
|
+
try {
|
|
90
|
+
return await hashFile(join(workspaceRoot, CONFIG_FILE));
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=opencode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/harness/opencode.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pydanticAi.ts — Pydantic AI adapter (env-file config, SDK-side gate).
|
|
3
|
+
*
|
|
4
|
+
* Same shape as langgraph.ts (see sdkGatedAdapter.ts). Detected via
|
|
5
|
+
* `pydantic-ai` or `pydantic-ai-slim` (the substring "pydantic-ai" matches
|
|
6
|
+
* both).
|
|
7
|
+
*
|
|
8
|
+
* The blocking gate ships SDK-side via
|
|
9
|
+
* `intutic_clawde.gate.adapters.pydantic_ai.IntuticWrapperToolset`, a
|
|
10
|
+
* Pydantic AI `WrapperToolset.call_tool` override, plus a `guard_agent(agent)`
|
|
11
|
+
* convenience helper wrapping every toolset already on an `Agent` in one
|
|
12
|
+
* call — verified live against pydantic-ai-slim==2.31.1 by driving a real
|
|
13
|
+
* `Agent.run_sync()` through `pydantic_ai.models.function.FunctionModel`.
|
|
14
|
+
*
|
|
15
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
export declare const pydanticAiAdapter: import("./types.js").IHarnessAdapter;
|
|
19
|
+
//# sourceMappingURL=pydanticAi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pydanticAi.d.ts","sourceRoot":"","sources":["../../src/harness/pydanticAi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,eAAO,MAAM,iBAAiB,sCAU5B,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pydanticAi.ts — Pydantic AI adapter (env-file config, SDK-side gate).
|
|
3
|
+
*
|
|
4
|
+
* Same shape as langgraph.ts (see sdkGatedAdapter.ts). Detected via
|
|
5
|
+
* `pydantic-ai` or `pydantic-ai-slim` (the substring "pydantic-ai" matches
|
|
6
|
+
* both).
|
|
7
|
+
*
|
|
8
|
+
* The blocking gate ships SDK-side via
|
|
9
|
+
* `intutic_clawde.gate.adapters.pydantic_ai.IntuticWrapperToolset`, a
|
|
10
|
+
* Pydantic AI `WrapperToolset.call_tool` override, plus a `guard_agent(agent)`
|
|
11
|
+
* convenience helper wrapping every toolset already on an `Agent` in one
|
|
12
|
+
* call — verified live against pydantic-ai-slim==2.31.1 by driving a real
|
|
13
|
+
* `Agent.run_sync()` through `pydantic_ai.models.function.FunctionModel`.
|
|
14
|
+
*
|
|
15
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
import { HarnessType } from '@intutic/shared-types';
|
|
19
|
+
import { makeSdkGatedAdapter } from './sdkGatedAdapter.js';
|
|
20
|
+
export const pydanticAiAdapter = makeSdkGatedAdapter({
|
|
21
|
+
type: HarnessType.PYDANTIC_AI,
|
|
22
|
+
label: 'Pydantic AI',
|
|
23
|
+
keywords: ['pydantic-ai'], // matches "pydantic-ai" and "pydantic-ai-slim"
|
|
24
|
+
pipInstall: 'intutic-clawde[pydantic-ai]',
|
|
25
|
+
importLine: 'from intutic_clawde.gate.adapters.pydantic_ai import guard_agent',
|
|
26
|
+
usageSummary: 'guard_agent(agent) wraps every toolset on the Agent; a blocked call raises ModelRetry ' +
|
|
27
|
+
'before the tool body runs.',
|
|
28
|
+
docsSlug: 'pydantic-ai',
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=pydanticAi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pydanticAi.js","sourceRoot":"","sources":["../../src/harness/pydanticAi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;IACnD,IAAI,EAAE,WAAW,CAAC,WAAW;IAC7B,KAAK,EAAE,aAAa;IACpB,QAAQ,EAAE,CAAC,aAAa,CAAC,EAAE,+CAA+C;IAC1E,UAAU,EAAE,6BAA6B;IACzC,UAAU,EAAE,kEAAkE;IAC9E,YAAY,EACV,wFAAwF;QACxF,4BAA4B;IAC9B,QAAQ,EAAE,aAAa;CACxB,CAAC,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sdkGatedAdapter.ts — shared builder for harness adapters whose blocking
|
|
3
|
+
* gate ships SDK-side in intutic-clawde, with no on-disk hook/config file to
|
|
4
|
+
* write a tool-call gate into.
|
|
5
|
+
*
|
|
6
|
+
* LangGraph was the first of this family (see langgraph.ts) and is left as a
|
|
7
|
+
* hand-written adapter since it predates this file; every adapter added
|
|
8
|
+
* since is built from this shared factory instead of being hand-copied.
|
|
9
|
+
* Copy-pasting harness writers is a proven defect generator in this codebase
|
|
10
|
+
* — see gateBody.ts's module doc for the four production defects traced to
|
|
11
|
+
* divergent hand-copies of one piece of logic — so the detect/writeConfig
|
|
12
|
+
* shape below is defined once and each framework supplies only what
|
|
13
|
+
* distinguishes it: its manifest keywords and the comment text pointing
|
|
14
|
+
* developers at its intutic-clawde adapter module.
|
|
15
|
+
*
|
|
16
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
import type { HarnessType } from '@intutic/shared-types';
|
|
20
|
+
import type { IHarnessAdapter } from './types.js';
|
|
21
|
+
/**
|
|
22
|
+
* A manifest match test. A plain string is a case-insensitive substring test
|
|
23
|
+
* (fine for distinctive package names like "crewai" or "google-adk"); a
|
|
24
|
+
* RegExp is tested against the lower-cased manifest content directly, for
|
|
25
|
+
* names short enough to false-positive as a substring (e.g. "ag2" inside
|
|
26
|
+
* "flag2" or a version string) — see ag2.ts.
|
|
27
|
+
*/
|
|
28
|
+
export type ManifestMatcher = string | RegExp;
|
|
29
|
+
export interface SdkGatedFrameworkSpec {
|
|
30
|
+
/** HarnessType enum value this adapter detects/configures. */
|
|
31
|
+
type: HarnessType;
|
|
32
|
+
/** Display name used in the generated comment, e.g. "CrewAI". */
|
|
33
|
+
label: string;
|
|
34
|
+
/** A manifest matching ANY of these is a detection hit. */
|
|
35
|
+
keywords: readonly ManifestMatcher[];
|
|
36
|
+
/** Dependency manifests scanned for a match. Defaults to the langgraph.ts set. */
|
|
37
|
+
manifestFiles?: readonly string[];
|
|
38
|
+
/**
|
|
39
|
+
* `pip install <pipInstall>` shown in the generated comment — the extra
|
|
40
|
+
* name included, e.g. `"intutic-clawde[crewai]"`. Bare `"intutic-clawde"`
|
|
41
|
+
* for a framework with no dedicated adapter module yet (its tools are
|
|
42
|
+
* governed through the framework-agnostic `@guard`/`guard_tools` helpers
|
|
43
|
+
* in the meantime).
|
|
44
|
+
*/
|
|
45
|
+
pipInstall: string;
|
|
46
|
+
/** The intutic_clawde.gate(.adapters.<x>) import line shown in the comment. */
|
|
47
|
+
importLine: string;
|
|
48
|
+
/** One line (no leading "# ") summarising how the imported symbol vetoes a call. */
|
|
49
|
+
usageSummary: string;
|
|
50
|
+
/** apps/docs/integrations/<slug> */
|
|
51
|
+
docsSlug: string;
|
|
52
|
+
}
|
|
53
|
+
/** Builds an `IHarnessAdapter` for one SDK-gated framework from its spec. */
|
|
54
|
+
export declare function makeSdkGatedAdapter(spec: SdkGatedFrameworkSpec): IHarnessAdapter;
|
|
55
|
+
//# sourceMappingURL=sdkGatedAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AACtE,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"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sdkGatedAdapter.ts — shared builder for harness adapters whose blocking
|
|
3
|
+
* gate ships SDK-side in intutic-clawde, with no on-disk hook/config file to
|
|
4
|
+
* write a tool-call gate into.
|
|
5
|
+
*
|
|
6
|
+
* LangGraph was the first of this family (see langgraph.ts) and is left as a
|
|
7
|
+
* hand-written adapter since it predates this file; every adapter added
|
|
8
|
+
* since is built from this shared factory instead of being hand-copied.
|
|
9
|
+
* Copy-pasting harness writers is a proven defect generator in this codebase
|
|
10
|
+
* — see gateBody.ts's module doc for the four production defects traced to
|
|
11
|
+
* divergent hand-copies of one piece of logic — so the detect/writeConfig
|
|
12
|
+
* shape below is defined once and each framework supplies only what
|
|
13
|
+
* distinguishes it: its manifest keywords and the comment text pointing
|
|
14
|
+
* developers at its intutic-clawde adapter module.
|
|
15
|
+
*
|
|
16
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
import { join, dirname } from 'node:path';
|
|
20
|
+
import { readFile, writeFile, rename, mkdir } from 'node:fs/promises';
|
|
21
|
+
import { hashFile } from '../lib/hash.js';
|
|
22
|
+
import { newIso } from '@intutic/id';
|
|
23
|
+
const CONFIG_FILE = '.env.intutic';
|
|
24
|
+
/** Dependency manifests scanned by default — same three langgraph.ts uses. */
|
|
25
|
+
const DEFAULT_MANIFEST_FILES = ['pyproject.toml', 'requirements.txt', 'uv.lock'];
|
|
26
|
+
function matches(content, keywords) {
|
|
27
|
+
const lower = content.toLowerCase();
|
|
28
|
+
return keywords.some((k) => (typeof k === 'string' ? lower.includes(k) : k.test(lower)));
|
|
29
|
+
}
|
|
30
|
+
/** Builds an `IHarnessAdapter` for one SDK-gated framework from its spec. */
|
|
31
|
+
export function makeSdkGatedAdapter(spec) {
|
|
32
|
+
const manifestFiles = spec.manifestFiles ?? DEFAULT_MANIFEST_FILES;
|
|
33
|
+
return {
|
|
34
|
+
type: spec.type,
|
|
35
|
+
configFileName: CONFIG_FILE,
|
|
36
|
+
async detect(workspaceRoot) {
|
|
37
|
+
for (const manifest of manifestFiles) {
|
|
38
|
+
try {
|
|
39
|
+
const content = await readFile(join(workspaceRoot, manifest), 'utf-8');
|
|
40
|
+
if (matches(content, spec.keywords))
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
catch { /* manifest not present */ }
|
|
44
|
+
}
|
|
45
|
+
return false;
|
|
46
|
+
},
|
|
47
|
+
async writeConfig(workspaceRoot, sops, proxyUrl) {
|
|
48
|
+
const filePath = join(workspaceRoot, CONFIG_FILE);
|
|
49
|
+
const envContent = [
|
|
50
|
+
'# Intutic Governance Rules (auto-generated)',
|
|
51
|
+
'# DO NOT EDIT — managed by intutic sync daemon',
|
|
52
|
+
`# Last sync: ${newIso()}`,
|
|
53
|
+
'# Source this file: source .env.intutic',
|
|
54
|
+
'',
|
|
55
|
+
`export ANTHROPIC_BASE_URL="${proxyUrl}"`,
|
|
56
|
+
`export OPENAI_BASE_URL="${proxyUrl}"`,
|
|
57
|
+
`export INTUTIC_PROXY_URL="${proxyUrl}"`,
|
|
58
|
+
`export INTUTIC_SOP_COUNT=${sops.length}`,
|
|
59
|
+
'',
|
|
60
|
+
`# These env vars govern LLM egress only. ${spec.label} tools run in your own`,
|
|
61
|
+
'# Python process, where no config or hook file can gate them — the',
|
|
62
|
+
'# blocking tool gate ships SDK-side:',
|
|
63
|
+
`# pip install ${spec.pipInstall}`,
|
|
64
|
+
`# ${spec.importLine}`,
|
|
65
|
+
`# ${spec.usageSummary}`,
|
|
66
|
+
`# See https://docs.intutic.ai/integrations/${spec.docsSlug}`,
|
|
67
|
+
'',
|
|
68
|
+
].join('\n');
|
|
69
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
70
|
+
const tmpEnv = filePath + '.intutic-tmp';
|
|
71
|
+
await writeFile(tmpEnv, envContent, 'utf-8');
|
|
72
|
+
await rename(tmpEnv, filePath);
|
|
73
|
+
return filePath;
|
|
74
|
+
},
|
|
75
|
+
async readCurrentHash(workspaceRoot) {
|
|
76
|
+
try {
|
|
77
|
+
return await hashFile(join(workspaceRoot, CONFIG_FILE));
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=sdkGatedAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdkGatedAdapter.js","sourceRoot":"","sources":["../../src/harness/sdkGatedAdapter.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* smolagents.ts — smolagents adapter (env-file config, SDK-side gate).
|
|
3
|
+
*
|
|
4
|
+
* Same shape as langgraph.ts (see sdkGatedAdapter.ts). Detected via the
|
|
5
|
+
* `smolagents` package name.
|
|
6
|
+
*
|
|
7
|
+
* `ToolCallingAgent`'s tools are plain callables — `@guard`/`guard_tools`
|
|
8
|
+
* govern them directly (guard_tools was extended to duck-type `.forward`,
|
|
9
|
+
* since a smolagents `Tool` is otherwise `callable` on its own `__call__`
|
|
10
|
+
* and would have been silently replaced with a bare wrapper function,
|
|
11
|
+
* losing its schema — see framework.py's doc). `CodeAgent` has no discrete
|
|
12
|
+
* tool calls at all; its choke point is the generated Python CODE STRING,
|
|
13
|
+
* gated by `intutic_clawde.gate.adapters.smolagents.IntuticPythonExecutor`
|
|
14
|
+
* (wraps any `PythonExecutor`) — verified live against smolagents==1.26.0 by
|
|
15
|
+
* driving a real `CodeAgent.run()` end to end. See that module's doc (and
|
|
16
|
+
* TD-377) for what governing code TEXT does and does not cover.
|
|
17
|
+
*
|
|
18
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
export declare const smolagentsAdapter: import("./types.js").IHarnessAdapter;
|
|
22
|
+
//# sourceMappingURL=smolagents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smolagents.d.ts","sourceRoot":"","sources":["../../src/harness/smolagents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,eAAO,MAAM,iBAAiB,sCAU5B,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* smolagents.ts — smolagents adapter (env-file config, SDK-side gate).
|
|
3
|
+
*
|
|
4
|
+
* Same shape as langgraph.ts (see sdkGatedAdapter.ts). Detected via the
|
|
5
|
+
* `smolagents` package name.
|
|
6
|
+
*
|
|
7
|
+
* `ToolCallingAgent`'s tools are plain callables — `@guard`/`guard_tools`
|
|
8
|
+
* govern them directly (guard_tools was extended to duck-type `.forward`,
|
|
9
|
+
* since a smolagents `Tool` is otherwise `callable` on its own `__call__`
|
|
10
|
+
* and would have been silently replaced with a bare wrapper function,
|
|
11
|
+
* losing its schema — see framework.py's doc). `CodeAgent` has no discrete
|
|
12
|
+
* tool calls at all; its choke point is the generated Python CODE STRING,
|
|
13
|
+
* gated by `intutic_clawde.gate.adapters.smolagents.IntuticPythonExecutor`
|
|
14
|
+
* (wraps any `PythonExecutor`) — verified live against smolagents==1.26.0 by
|
|
15
|
+
* driving a real `CodeAgent.run()` end to end. See that module's doc (and
|
|
16
|
+
* TD-377) for what governing code TEXT does and does not cover.
|
|
17
|
+
*
|
|
18
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
import { HarnessType } from '@intutic/shared-types';
|
|
22
|
+
import { makeSdkGatedAdapter } from './sdkGatedAdapter.js';
|
|
23
|
+
export const smolagentsAdapter = makeSdkGatedAdapter({
|
|
24
|
+
type: HarnessType.SMOLAGENTS,
|
|
25
|
+
label: 'smolagents',
|
|
26
|
+
keywords: ['smolagents'],
|
|
27
|
+
pipInstall: 'intutic-clawde[smolagents]',
|
|
28
|
+
importLine: 'from intutic_clawde.gate.adapters.smolagents import IntuticPythonExecutor',
|
|
29
|
+
usageSummary: 'IntuticPythonExecutor gates CodeAgent\'s generated code text before running it; ' +
|
|
30
|
+
'ToolCallingAgent tools are covered by @guard/guard_tools instead (see TD-377).',
|
|
31
|
+
docsSlug: 'smolagents',
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=smolagents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smolagents.js","sourceRoot":"","sources":["../../src/harness/smolagents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;IACnD,IAAI,EAAE,WAAW,CAAC,UAAU;IAC5B,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,CAAC,YAAY,CAAC;IACxB,UAAU,EAAE,4BAA4B;IACxC,UAAU,EAAE,2EAA2E;IACvF,YAAY,EACV,kFAAkF;QAClF,gFAAgF;IAClF,QAAQ,EAAE,YAAY;CACvB,CAAC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* strands.ts — AWS Strands Agents adapter (env-file config, SDK-side gate).
|
|
3
|
+
*
|
|
4
|
+
* Same shape as langgraph.ts (see sdkGatedAdapter.ts). Strands tools are
|
|
5
|
+
* plain decorated callables (or MCP-materialised `MCPAgentTool`s) in the
|
|
6
|
+
* agent's own Python process — no on-disk hook/config file exists to gate a
|
|
7
|
+
* call, so the blocking gate ships SDK-side via
|
|
8
|
+
* `intutic_clawde.gate.adapters.strands.IntuticHookProvider`, built on
|
|
9
|
+
* Strands' own documented `BeforeToolCallEvent.cancel_tool` veto (verified
|
|
10
|
+
* live against strands-agents==1.52.0).
|
|
11
|
+
*
|
|
12
|
+
* Egress caveat, unique so far in this family: Strands' DEFAULT model
|
|
13
|
+
* provider is Bedrock, whose SigV4-signed boto3 traffic the Intutic proxy
|
|
14
|
+
* cannot terminate — the ANTHROPIC_BASE_URL/OPENAI_BASE_URL vars the shared
|
|
15
|
+
* `.env.intutic` writes only take effect if the user selects the Anthropic/
|
|
16
|
+
* OpenAI/LiteLLM providers instead. See apps/docs/integrations/strands.md.
|
|
17
|
+
*
|
|
18
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
export declare const strandsAdapter: import("./types.js").IHarnessAdapter;
|
|
22
|
+
//# sourceMappingURL=strands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strands.d.ts","sourceRoot":"","sources":["../../src/harness/strands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,eAAO,MAAM,cAAc,sCAYzB,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* strands.ts — AWS Strands Agents adapter (env-file config, SDK-side gate).
|
|
3
|
+
*
|
|
4
|
+
* Same shape as langgraph.ts (see sdkGatedAdapter.ts). Strands tools are
|
|
5
|
+
* plain decorated callables (or MCP-materialised `MCPAgentTool`s) in the
|
|
6
|
+
* agent's own Python process — no on-disk hook/config file exists to gate a
|
|
7
|
+
* call, so the blocking gate ships SDK-side via
|
|
8
|
+
* `intutic_clawde.gate.adapters.strands.IntuticHookProvider`, built on
|
|
9
|
+
* Strands' own documented `BeforeToolCallEvent.cancel_tool` veto (verified
|
|
10
|
+
* live against strands-agents==1.52.0).
|
|
11
|
+
*
|
|
12
|
+
* Egress caveat, unique so far in this family: Strands' DEFAULT model
|
|
13
|
+
* provider is Bedrock, whose SigV4-signed boto3 traffic the Intutic proxy
|
|
14
|
+
* cannot terminate — the ANTHROPIC_BASE_URL/OPENAI_BASE_URL vars the shared
|
|
15
|
+
* `.env.intutic` writes only take effect if the user selects the Anthropic/
|
|
16
|
+
* OpenAI/LiteLLM providers instead. See apps/docs/integrations/strands.md.
|
|
17
|
+
*
|
|
18
|
+
* HLD §3.14 — Harness Onboarding Matrix
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
import { HarnessType } from '@intutic/shared-types';
|
|
22
|
+
import { makeSdkGatedAdapter } from './sdkGatedAdapter.js';
|
|
23
|
+
export const strandsAdapter = makeSdkGatedAdapter({
|
|
24
|
+
type: HarnessType.STRANDS,
|
|
25
|
+
label: 'Strands Agents',
|
|
26
|
+
// Matches strands-agents, strands-agents-tools, and the bedrock-agentcore
|
|
27
|
+
// `strands-agents` extra — all of which imply the framework is in use.
|
|
28
|
+
keywords: ['strands-agents'],
|
|
29
|
+
pipInstall: 'intutic-clawde[strands]',
|
|
30
|
+
importLine: 'from intutic_clawde.gate.adapters.strands import IntuticHookProvider',
|
|
31
|
+
usageSummary: 'Agent(hooks=[IntuticHookProvider()]) cancels denied tool calls via Strands’ own ' +
|
|
32
|
+
'BeforeToolCallEvent.cancel_tool before the tool body runs (MCP tools included).',
|
|
33
|
+
docsSlug: 'strands',
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=strands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strands.js","sourceRoot":"","sources":["../../src/harness/strands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC;IAChD,IAAI,EAAE,WAAW,CAAC,OAAO;IACzB,KAAK,EAAE,gBAAgB;IACvB,0EAA0E;IAC1E,uEAAuE;IACvE,QAAQ,EAAE,CAAC,gBAAgB,CAAC;IAC5B,UAAU,EAAE,yBAAyB;IACrC,UAAU,EAAE,sEAAsE;IAClF,YAAY,EACV,kFAAkF;QAClF,iFAAiF;IACnF,QAAQ,EAAE,SAAS;CACpB,CAAC,CAAA"}
|