@intutic/shared-types 2.2.0 → 2.4.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/anomaly.d.ts +6 -10
- package/dist/anomaly.d.ts.map +1 -1
- package/dist/anomaly.js +0 -2
- package/dist/anomaly.js.map +1 -1
- package/dist/api-contracts.d.ts +1 -1
- package/dist/api-contracts.js +1 -1
- package/dist/attenuation.d.ts +1 -1
- package/dist/attenuation.js +1 -1
- package/dist/auth.d.ts +116 -9
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +20 -5
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +1 -1
- package/dist/billing.js +1 -1
- package/dist/cloudProbe.d.ts +54 -0
- package/dist/cloudProbe.d.ts.map +1 -0
- package/dist/cloudProbe.js +254 -0
- package/dist/cloudProbe.js.map +1 -0
- package/dist/destructiveSql.d.ts +48 -0
- package/dist/destructiveSql.d.ts.map +1 -0
- package/dist/destructiveSql.js +43 -0
- package/dist/destructiveSql.js.map +1 -0
- package/dist/devInventory.d.ts +120 -0
- package/dist/devInventory.d.ts.map +1 -0
- package/dist/devInventory.js +80 -0
- package/dist/devInventory.js.map +1 -0
- package/dist/enums.d.ts +66 -21
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +55 -31
- package/dist/enums.js.map +1 -1
- package/dist/errors.js +3 -3
- package/dist/errors.js.map +1 -1
- package/dist/finops.d.ts +52 -2
- package/dist/finops.d.ts.map +1 -1
- package/dist/finops.js +15 -1
- package/dist/finops.js.map +1 -1
- package/dist/gateDecisions.d.ts +18 -0
- package/dist/gateDecisions.d.ts.map +1 -0
- package/dist/gateDecisions.js +20 -0
- package/dist/gateDecisions.js.map +1 -0
- package/dist/gateIdentity.d.ts +23 -0
- package/dist/gateIdentity.d.ts.map +1 -0
- package/dist/gateIdentity.js +32 -0
- package/dist/gateIdentity.js.map +1 -0
- package/dist/gateKind.d.ts +172 -0
- package/dist/gateKind.d.ts.map +1 -0
- package/dist/gateKind.js +160 -0
- package/dist/gateKind.js.map +1 -0
- package/dist/gateLimits.d.ts +170 -0
- package/dist/gateLimits.d.ts.map +1 -0
- package/dist/gateLimits.js +96 -0
- package/dist/gateLimits.js.map +1 -0
- package/dist/gitRemote.d.ts +17 -0
- package/dist/gitRemote.d.ts.map +1 -0
- package/dist/gitRemote.js +71 -0
- package/dist/gitRemote.js.map +1 -0
- package/dist/governanceCoverage.d.ts +1 -1
- package/dist/governanceCoverage.js +1 -1
- package/dist/guardrailIr.d.ts +9 -9
- package/dist/guardrailIr.d.ts.map +1 -1
- package/dist/guardrailIr.js +3 -3
- package/dist/guardrailIr.js.map +1 -1
- package/dist/guardrailRender.d.ts +1 -1
- package/dist/guardrailRender.js +1 -1
- package/dist/harnessRules.d.ts +74 -0
- package/dist/harnessRules.d.ts.map +1 -0
- package/dist/harnessRules.js +142 -0
- package/dist/harnessRules.js.map +1 -0
- package/dist/holdMessages.d.ts +25 -0
- package/dist/holdMessages.d.ts.map +1 -0
- package/dist/holdMessages.js +34 -0
- package/dist/holdMessages.js.map +1 -0
- package/dist/identity.d.ts +1 -1
- package/dist/identity.js +2 -2
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +42 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +161 -10
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +1 -1
- package/dist/mcpBudgets.d.ts +191 -0
- package/dist/mcpBudgets.d.ts.map +1 -0
- package/dist/mcpBudgets.js +144 -0
- package/dist/mcpBudgets.js.map +1 -0
- package/dist/mcpRegistryRecord.d.ts +143 -0
- package/dist/mcpRegistryRecord.d.ts.map +1 -0
- package/dist/mcpRegistryRecord.js +229 -0
- package/dist/mcpRegistryRecord.js.map +1 -0
- package/dist/mcpToolRisk.d.ts +82 -0
- package/dist/mcpToolRisk.d.ts.map +1 -0
- package/dist/mcpToolRisk.js +334 -0
- package/dist/mcpToolRisk.js.map +1 -0
- package/dist/modelCatalog.d.ts +2 -2
- package/dist/modelCatalog.generated.js +1 -1
- package/dist/modelCatalog.generated.js.map +1 -1
- package/dist/modelCatalog.js +2 -2
- package/dist/notifications.d.ts +24 -151
- package/dist/notifications.d.ts.map +1 -1
- package/dist/notifications.js +266 -1
- package/dist/notifications.js.map +1 -1
- package/dist/phrases.d.ts +87 -0
- package/dist/phrases.d.ts.map +1 -0
- package/dist/phrases.js +241 -0
- package/dist/phrases.js.map +1 -0
- package/dist/piiDetectors.d.ts +97 -0
- package/dist/piiDetectors.d.ts.map +1 -0
- package/dist/piiDetectors.js +96 -0
- package/dist/piiDetectors.js.map +1 -0
- package/dist/piiDetectors.json +71 -0
- package/dist/policy.d.ts +1 -1
- package/dist/policy.js +1 -1
- package/dist/policyGuardrails.d.ts +127 -10
- package/dist/policyGuardrails.d.ts.map +1 -1
- package/dist/policyGuardrails.js +59 -6
- package/dist/policyGuardrails.js.map +1 -1
- package/dist/posturePresets.js +1 -1
- package/dist/posturePresets.js.map +1 -1
- package/dist/providerVerification.d.ts +36 -10
- package/dist/providerVerification.d.ts.map +1 -1
- package/dist/providerVerification.js +80 -20
- package/dist/providerVerification.js.map +1 -1
- package/dist/providers.d.ts +54 -17
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +135 -26
- package/dist/providers.js.map +1 -1
- package/dist/regoBuiltins.d.ts +42 -0
- package/dist/regoBuiltins.d.ts.map +1 -0
- package/dist/regoBuiltins.js +732 -0
- package/dist/regoBuiltins.js.map +1 -0
- package/dist/regoRules.d.ts +105 -0
- package/dist/regoRules.d.ts.map +1 -0
- package/dist/regoRules.js +407 -0
- package/dist/regoRules.js.map +1 -0
- package/dist/ruleLoadFailures.d.ts +15 -0
- package/dist/ruleLoadFailures.d.ts.map +1 -0
- package/dist/ruleLoadFailures.js +26 -0
- package/dist/ruleLoadFailures.js.map +1 -0
- package/dist/scriptScan.d.ts +5 -5
- package/dist/scriptScan.js +3 -3
- package/dist/sequence.d.ts +52 -0
- package/dist/sequence.d.ts.map +1 -0
- package/dist/sequence.js +127 -0
- package/dist/sequence.js.map +1 -0
- package/dist/session.d.ts +1 -1
- package/dist/session.js +1 -1
- package/dist/skillScan.d.ts +3 -3
- package/dist/skillScan.d.ts.map +1 -1
- package/dist/skillScan.js +26 -4
- package/dist/skillScan.js.map +1 -1
- package/dist/sop.d.ts +5 -5
- package/dist/sop.js +2 -2
- package/dist/sourceProviders.d.ts +1 -8
- package/dist/sourceProviders.d.ts.map +1 -1
- package/dist/sourceProviders.js +2 -9
- package/dist/sourceProviders.js.map +1 -1
- package/dist/spendBudgets.d.ts +122 -0
- package/dist/spendBudgets.d.ts.map +1 -0
- package/dist/spendBudgets.js +92 -0
- package/dist/spendBudgets.js.map +1 -0
- package/dist/ssoGroupClearance.d.ts +18 -2
- package/dist/ssoGroupClearance.d.ts.map +1 -1
- package/dist/ssoGroupClearance.js +43 -4
- package/dist/ssoGroupClearance.js.map +1 -1
- package/dist/sync.d.ts +0 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +0 -1
- package/dist/sync.js.map +1 -1
- package/dist/taskManagement.d.ts +0 -2
- package/dist/taskManagement.d.ts.map +1 -1
- package/dist/taskManagement.js +0 -2
- package/dist/taskManagement.js.map +1 -1
- package/dist/toolPoison.d.ts +33 -0
- package/dist/toolPoison.d.ts.map +1 -0
- package/dist/toolPoison.js +85 -0
- package/dist/toolPoison.js.map +1 -0
- package/dist/upstreamRetry.d.ts +121 -0
- package/dist/upstreamRetry.d.ts.map +1 -0
- package/dist/upstreamRetry.js +90 -0
- package/dist/upstreamRetry.js.map +1 -0
- package/dist/usage.d.ts +186 -0
- package/dist/usage.d.ts.map +1 -1
- package/dist/wasmBinary.d.ts +25 -0
- package/dist/wasmBinary.d.ts.map +1 -0
- package/dist/wasmBinary.js +111 -0
- package/dist/wasmBinary.js.map +1 -0
- package/dist/wasmFuel.d.ts +52 -0
- package/dist/wasmFuel.d.ts.map +1 -0
- package/dist/wasmFuel.js +320 -0
- package/dist/wasmFuel.js.map +1 -0
- package/dist/wasmMemoryCap.d.ts +21 -0
- package/dist/wasmMemoryCap.d.ts.map +1 -0
- package/dist/wasmMemoryCap.js +58 -0
- package/dist/wasmMemoryCap.js.map +1 -0
- package/dist/wasmRuleDescriptor.d.ts +43 -0
- package/dist/wasmRuleDescriptor.d.ts.map +1 -0
- package/dist/wasmRuleDescriptor.js +65 -0
- package/dist/wasmRuleDescriptor.js.map +1 -0
- package/dist/workspaceSettings.d.ts +95 -17
- package/dist/workspaceSettings.d.ts.map +1 -1
- package/dist/workspaceSettings.js +2 -1
- package/dist/workspaceSettings.js.map +1 -1
- package/package.json +2 -2
package/dist/enums.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* compile-time narrowing without Drizzle or Postgres dependencies.
|
|
8
8
|
*
|
|
9
9
|
* These mirror the Postgres enum types defined in
|
|
10
|
-
*
|
|
10
|
+
* the data-architecture schema.
|
|
11
11
|
*
|
|
12
12
|
* @module
|
|
13
13
|
*/
|
|
@@ -166,8 +166,8 @@ export declare const HarnessType: {
|
|
|
166
166
|
* (`GateKind: 'delegated'`, same as Xirp).
|
|
167
167
|
*
|
|
168
168
|
* All three wrapped backends are themselves supported harnesses: Claude
|
|
169
|
-
* Code and Codex through their hook files, and OpenCode (since
|
|
170
|
-
*
|
|
169
|
+
* Code and Codex through their hook files, and OpenCode (since its gate
|
|
170
|
+
* landed, 2026-09-23) through the plugin `openCodeHooks.ts` generates —
|
|
171
171
|
* the worktree propagation re-runs every backend's writer per worktree,
|
|
172
172
|
* so a feature run against any `--providers` value is governed.
|
|
173
173
|
*/
|
|
@@ -208,7 +208,7 @@ export declare const HarnessType: {
|
|
|
208
208
|
readonly STRANDS: "strands";
|
|
209
209
|
/** Microsoft Agent Framework (`agent-framework` / `agent-framework-core` on
|
|
210
210
|
* PyPI, imported as `agent_framework` — the AutoGen + Semantic Kernel
|
|
211
|
-
* successor; a separate framework from AUTOGEN
|
|
211
|
+
* successor; a separate framework from AUTOGEN). Detected via
|
|
212
212
|
* `agent-framework`/`agent_framework` in Python dependency manifests. Gate:
|
|
213
213
|
* `intutic_clawde.gate.adapters.agent_framework`'s
|
|
214
214
|
* `IntuticFunctionMiddleware`, a `FunctionMiddleware` that short-circuits
|
|
@@ -231,7 +231,7 @@ export declare const HarnessType: {
|
|
|
231
231
|
* check — either alone is too generic; see tools/cli/src/harness/eve.ts).
|
|
232
232
|
* Gate: `@intutic/gate/eve`'s `intuticApproval()` on eve's per-tool /
|
|
233
233
|
* per-connection `approval` policy surface — see gateRegistry.ts's `eve`
|
|
234
|
-
* row
|
|
234
|
+
* row for the preview-churn shield. */
|
|
235
235
|
readonly EVE: "eve";
|
|
236
236
|
/**
|
|
237
237
|
* TrueFoundry's "TrueForge" (github.com/truefoundry/trueforge, MIT,
|
|
@@ -271,7 +271,7 @@ export declare const HarnessType: {
|
|
|
271
271
|
* `toolApproval` setting is a STATIC record without callback support, so
|
|
272
272
|
* per-call gating routes through the tool-approval flow; built-in sandbox
|
|
273
273
|
* tools are governed only by `permissionMode`, which DEFAULTS to
|
|
274
|
-
* 'allow-all'. See gateRegistry.ts's NO_GATE row
|
|
274
|
+
* 'allow-all'. See gateRegistry.ts's NO_GATE row. */
|
|
275
275
|
readonly AI_SDK_HARNESS: "ai-sdk-harness";
|
|
276
276
|
/** Vercel `@ai-sdk/workflow` (WorkflowAgent — durable workflow agents on
|
|
277
277
|
* the Workflow DevKit). Detected via `@ai-sdk/workflow` in `package.json`
|
|
@@ -280,8 +280,7 @@ export declare const HarnessType: {
|
|
|
280
280
|
* too generic). Gate: `@intutic/gate/workflow`'s `intuticNeedsApproval()`
|
|
281
281
|
* on each tool — WorkflowAgent itself has zero approval fields; refusals
|
|
282
282
|
* are FatalError-compatible so the durable runtime aborts rather than
|
|
283
|
-
* retry-looping a governance denial. See gateRegistry.ts's NO_GATE row
|
|
284
|
-
* and TD-418..419. */
|
|
283
|
+
* retry-looping a governance denial. See gateRegistry.ts's NO_GATE row. */
|
|
285
284
|
readonly AI_SDK_WORKFLOW: "ai-sdk-workflow";
|
|
286
285
|
/**
|
|
287
286
|
* AWS Bedrock AgentCore **Runtime** (GA 2025-10) — a managed hosting
|
|
@@ -308,24 +307,24 @@ export declare const HarnessType: {
|
|
|
308
307
|
* framework-SDK code as the deployment target, so if that code uses no
|
|
309
308
|
* framework this registry supports (raw boto3, a hand-rolled tool loop),
|
|
310
309
|
* coverage is genuinely zero — the same honest gap AGENTIC_ORCHESTRATOR's
|
|
311
|
-
* OpenCode backend has
|
|
310
|
+
* OpenCode backend has. Deployment-target constraints that are
|
|
312
311
|
* NOT a gate concern (environment-variable caps, VPC/NAT egress topology,
|
|
313
312
|
* SigV4 traffic not being proxyable) are documented in
|
|
314
313
|
* apps/docs/integrations/agentcore.md rather than encoded here.
|
|
315
314
|
*
|
|
316
315
|
* AgentCore **Gateway** (the MCP-tool-call interceptor path) deliberately
|
|
317
|
-
* has NO enum entry here — same precedent QM set
|
|
316
|
+
* has NO enum entry here — same precedent QM set: it is a
|
|
318
317
|
* deployed AWS resource (a Lambda attached to a Gateway), never something
|
|
319
318
|
* `intutic init`/`intutic connect` finds on a developer's laptop. Its
|
|
320
319
|
* coverage is the `tools/agentcore-interceptor` Lambda calling
|
|
321
|
-
* `POST /api/v1/integrations/agentcore/gateway-check
|
|
320
|
+
* `POST /api/v1/integrations/agentcore/gateway-check`.
|
|
322
321
|
*
|
|
323
322
|
* AgentCore **Policy** (Cedar/"Dogwood") has NO third-party HTTP policy
|
|
324
323
|
* backend at all (confirmed against `GatewayPolicyEngineConfiguration`'s
|
|
325
324
|
* real API reference: `arn` only ever names an AWS-native
|
|
326
325
|
* `policy-engine/...` resource) — not integrable by design, not a gap.
|
|
327
326
|
*
|
|
328
|
-
* See apps/docs/integrations/agentcore.md
|
|
327
|
+
* See apps/docs/integrations/agentcore.md.
|
|
329
328
|
*/
|
|
330
329
|
readonly AGENTCORE_RUNTIME: "agentcore-runtime";
|
|
331
330
|
/**
|
|
@@ -394,19 +393,19 @@ export declare const HARNESS_COUNT: number;
|
|
|
394
393
|
* `HARNESS_COUNT` minus the harnesses with a confirmed, currently-open
|
|
395
394
|
* support gap — the number safe to use in headline/marketing copy
|
|
396
395
|
* ("works with N coding agents") without overclaiming. Each exclusion must
|
|
397
|
-
* be a harness with its own
|
|
396
|
+
* be a harness with its own recorded gap describing a REAL,
|
|
398
397
|
* currently-unactionable gap (not a caveat, not a "documented, not a
|
|
399
398
|
* defect" note). The list is EMPTY since 2026-09-23 and the mechanism is
|
|
400
399
|
* kept so the next real gap goes here and nowhere else:
|
|
401
400
|
*
|
|
402
|
-
* - `agentic-orchestrator` was excluded
|
|
401
|
+
* - `agentic-orchestrator` was excluded while its OpenCode
|
|
403
402
|
* backend had no gate; OpenCode is a harness of its own now.
|
|
404
|
-
* - `autogen` was excluded
|
|
403
|
+
* - `autogen` was excluded while `InterventionHandler.on_send`
|
|
405
404
|
* was blind to `AssistantAgent`'s own tool calls; `IntuticWorkbench`
|
|
406
405
|
* (2026-09-22) governs them.
|
|
407
406
|
*
|
|
408
|
-
* Deliberately does NOT exclude `mastra` —
|
|
409
|
-
* "
|
|
407
|
+
* Deliberately does NOT exclude `mastra` — its gap is explicitly recorded
|
|
408
|
+
* as "documented, not a defect", a caveat about a call-site
|
|
410
409
|
* hook override, not a coverage gap, so excluding it here would be the
|
|
411
410
|
* exact overclaim-avoidance discipline applied backwards. Also does NOT
|
|
412
411
|
* exclude `continue` over its headless-mode limitation (`cn -p` skips
|
|
@@ -433,6 +432,54 @@ export declare const IncidentStatus: {
|
|
|
433
432
|
};
|
|
434
433
|
/** Union of all incident status values. */
|
|
435
434
|
export type IncidentStatus = typeof IncidentStatus[keyof typeof IncidentStatus];
|
|
435
|
+
/**
|
|
436
|
+
* Incidents that are not an agent misbehaving, so they are not anomaly
|
|
437
|
+
* categories: nothing on the hot path detects them, no corrective card
|
|
438
|
+
* answers them, and enforcement cannot be promoted on them. They share the
|
|
439
|
+
* `anomaly_type` column (Postgres enum, migrations 218 and 219) with the
|
|
440
|
+
* taxonomy.
|
|
441
|
+
*/
|
|
442
|
+
export declare const SystemIncidentType: {
|
|
443
|
+
/** A proxy refused to load a custom WASM or Rego rule version (`ruleLoadFailures.ts`). */
|
|
444
|
+
readonly WASM_RULE_REFUSED: "WASM_RULE_REFUSED";
|
|
445
|
+
/**
|
|
446
|
+
* Anything else a proxy reports on `intutic:system_anomalies`: a
|
|
447
|
+
* dependency it could not reach, such as the LLM provider or the semantic
|
|
448
|
+
* cache's embedding service or vector store.
|
|
449
|
+
*/
|
|
450
|
+
readonly SYSTEM_ANOMALY: "SYSTEM_ANOMALY";
|
|
451
|
+
};
|
|
452
|
+
/** Union of the system incident types. */
|
|
453
|
+
export type SystemIncidentType = typeof SystemIncidentType[keyof typeof SystemIncidentType];
|
|
454
|
+
/** What a governance incident is filed under: an anomaly category or a system incident type. */
|
|
455
|
+
export declare const IncidentType: {
|
|
456
|
+
/** A proxy refused to load a custom WASM or Rego rule version (`ruleLoadFailures.ts`). */
|
|
457
|
+
readonly WASM_RULE_REFUSED: "WASM_RULE_REFUSED";
|
|
458
|
+
/**
|
|
459
|
+
* Anything else a proxy reports on `intutic:system_anomalies`: a
|
|
460
|
+
* dependency it could not reach, such as the LLM provider or the semantic
|
|
461
|
+
* cache's embedding service or vector store.
|
|
462
|
+
*/
|
|
463
|
+
readonly SYSTEM_ANOMALY: "SYSTEM_ANOMALY";
|
|
464
|
+
readonly TOOL_ABUSE: "TOOL_ABUSE";
|
|
465
|
+
readonly TOKEN_WASTE: "TOKEN_WASTE";
|
|
466
|
+
readonly LOOP_DETECTED: "LOOP_DETECTED";
|
|
467
|
+
readonly UNAUTHORIZED_TOOL: "UNAUTHORIZED_TOOL";
|
|
468
|
+
readonly DATA_EXFILTRATION: "DATA_EXFILTRATION";
|
|
469
|
+
readonly PROMPT_INJECTION: "PROMPT_INJECTION";
|
|
470
|
+
readonly HALLUCINATION: "HALLUCINATION";
|
|
471
|
+
readonly SCOPE_VIOLATION: "SCOPE_VIOLATION";
|
|
472
|
+
readonly BUDGET_BREACH: "BUDGET_BREACH";
|
|
473
|
+
readonly SPAWN_BUDGET_BREACH: "SPAWN_BUDGET_BREACH";
|
|
474
|
+
readonly WORKFLOW_BUDGET_BREACH: "WORKFLOW_BUDGET_BREACH";
|
|
475
|
+
readonly WORKFLOW_GOAL_DRIFT: "WORKFLOW_GOAL_DRIFT";
|
|
476
|
+
};
|
|
477
|
+
/** Union of every incident type, as `governance_incidents.anomaly_type` holds it. */
|
|
478
|
+
export type IncidentType = typeof IncidentType[keyof typeof IncidentType];
|
|
479
|
+
/** Every incident type, for validating a filter or listing the choices. */
|
|
480
|
+
export declare const INCIDENT_TYPES: [IncidentType, ...IncidentType[]];
|
|
481
|
+
/** Whether an arbitrary string is an incident type. */
|
|
482
|
+
export declare function isIncidentType(value: unknown): value is IncidentType;
|
|
436
483
|
/** Lifecycle state for stored execution plans. */
|
|
437
484
|
export declare const PlanLifecycleState: {
|
|
438
485
|
readonly PENDING_APPROVAL: "PENDING_APPROVAL";
|
|
@@ -512,7 +559,7 @@ export type WorkspaceRole = typeof WorkspaceRole[keyof typeof WorkspaceRole];
|
|
|
512
559
|
* Note: `closed` only affects harnesses with MCP proxy injection (9/20 —
|
|
513
560
|
* 10 config paths across 9 harnesses, see sync-daemon mcpAutoWrite.ts).
|
|
514
561
|
* For harnesses without MCP proxy injection (e.g. n8n, pi, codex,
|
|
515
|
-
* open-webui),
|
|
562
|
+
* open-webui) there is no MCP proxy to fail, so this has no effect.
|
|
516
563
|
*/
|
|
517
564
|
export declare const McpProxyFailBehavior: {
|
|
518
565
|
readonly OPEN: "open";
|
|
@@ -524,7 +571,7 @@ export type McpProxyFailBehavior = typeof McpProxyFailBehavior[keyof typeof McpP
|
|
|
524
571
|
* - `per-session` (default, Phase 4): new proxy process per MCP connection
|
|
525
572
|
* - `daemon` (Phase 5): long-lived daemon, per-session shims delegate via Unix socket
|
|
526
573
|
*
|
|
527
|
-
*
|
|
574
|
+
* Daemon mode requires macOS notarization. Both modes are active: the
|
|
528
575
|
* mcp-proxy honours `daemon` by answering policy lookups over the daemon socket.
|
|
529
576
|
*/
|
|
530
577
|
export declare const McpProxyMode: {
|
|
@@ -538,8 +585,6 @@ export type McpProxyMode = typeof McpProxyMode[keyof typeof McpProxyMode];
|
|
|
538
585
|
* - `rewrite` (default): drift watcher detects edits → immediate config rewrite (~1s)
|
|
539
586
|
* - `immutable` (opt-in): after each write, sets macOS `chflags uchg` (user-immutable flag)
|
|
540
587
|
* - `alert-only`: no rewrite; drift creates a governance incident only (audit mode)
|
|
541
|
-
*
|
|
542
|
-
* See TD-154 for immutable-flag UX risk notes.
|
|
543
588
|
*/
|
|
544
589
|
export declare const BypassEnforcementTier: {
|
|
545
590
|
readonly REWRITE: "rewrite";
|
package/dist/enums.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,uEAAuE;AACvE,eAAO,MAAM,SAAS;;;;;CAKZ,CAAA;AAEV,sCAAsC;AACtC,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,MAAM,OAAO,SAAS,CAAC,CAAA;AAKhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,iBAAiB;;;;;;;CAOpB,CAAA;AAEV,8CAA8C;AAC9C,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAA;AAKxF,0EAA0E;AAC1E,eAAO,MAAM,YAAY;;;CAGf,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CA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;;CAGf,CAAA;AACV,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAA;AAEzE;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAA;AACV,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAA;AAKpG,8DAA8D;AAC9D,eAAO,MAAM,mBAAmB;;;;CAItB,CAAA;AACV,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAA;AAE9F,oFAAoF;AACpF,eAAO,MAAM,kBAAkB;;;CAGrB,CAAA;AACV,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAA;AAE3F;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;CAIlB,CAAA;AACV,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAA"}
|
package/dist/enums.js
CHANGED
|
@@ -8,12 +8,14 @@
|
|
|
8
8
|
* compile-time narrowing without Drizzle or Postgres dependencies.
|
|
9
9
|
*
|
|
10
10
|
* These mirror the Postgres enum types defined in
|
|
11
|
-
*
|
|
11
|
+
* the data-architecture schema.
|
|
12
12
|
*
|
|
13
13
|
* @module
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.AmendmentSource = exports.DriftDetectionMode = exports.DriftClassification = exports.BypassEnforcementTier = exports.McpProxyMode = exports.McpProxyFailBehavior = exports.WorkspaceRole = exports.RoutingTier = exports.HookPhase = exports.SopType = exports.SopLifecycleState = exports.PlanExecutionOutcome = exports.PlanLifecycleState = exports.IncidentStatus = exports.ExecutionMode = exports.HARNESS_HEADLINE_COUNT = exports.HARNESS_COUNT = exports.HarnessType = exports.AnomalyType = exports.ChangeClassification = exports.ComplexityTier = exports.BudgetTier = exports.TokenUtility = exports.EnforcementAction = exports.RiskLevel = void 0;
|
|
16
|
+
exports.AmendmentSource = exports.DriftDetectionMode = exports.DriftClassification = exports.BypassEnforcementTier = exports.McpProxyMode = exports.McpProxyFailBehavior = exports.WorkspaceRole = exports.RoutingTier = exports.HookPhase = exports.SopType = exports.SopLifecycleState = exports.PlanExecutionOutcome = exports.PlanLifecycleState = exports.INCIDENT_TYPES = exports.IncidentType = exports.SystemIncidentType = exports.IncidentStatus = exports.ExecutionMode = exports.HARNESS_HEADLINE_COUNT = exports.HARNESS_COUNT = exports.HarnessType = exports.AnomalyType = exports.ChangeClassification = exports.ComplexityTier = exports.BudgetTier = exports.TokenUtility = exports.EnforcementAction = exports.RiskLevel = void 0;
|
|
17
|
+
exports.isIncidentType = isIncidentType;
|
|
18
|
+
const anomaly_taxonomy_1 = require("@intutic/anomaly-taxonomy");
|
|
17
19
|
// ─── Risk Level ──────────────────────────────────────────────────────
|
|
18
20
|
// HLD §3.5, LLD §3.1 — risk_level enum
|
|
19
21
|
/** Risk severity classification for SOPs, anomalies, and incidents. */
|
|
@@ -109,8 +111,8 @@ exports.ChangeClassification = {
|
|
|
109
111
|
*
|
|
110
112
|
* Re-exported rather than redeclared so this file cannot become a third copy.
|
|
111
113
|
*/
|
|
112
|
-
var
|
|
113
|
-
Object.defineProperty(exports, "AnomalyType", { enumerable: true, get: function () { return
|
|
114
|
+
var anomaly_taxonomy_2 = require("@intutic/anomaly-taxonomy");
|
|
115
|
+
Object.defineProperty(exports, "AnomalyType", { enumerable: true, get: function () { return anomaly_taxonomy_2.AnomalyType; } });
|
|
114
116
|
// ─── Harness Type ────────────────────────────────────────────────────
|
|
115
117
|
// HLD §3.14, §4.5 — Supported AI agent harness integrations
|
|
116
118
|
// Full matrix: HLD §3.14 Harness Onboarding Matrix (31 harnesses — 21
|
|
@@ -180,8 +182,8 @@ exports.HarnessType = {
|
|
|
180
182
|
* (`GateKind: 'delegated'`, same as Xirp).
|
|
181
183
|
*
|
|
182
184
|
* All three wrapped backends are themselves supported harnesses: Claude
|
|
183
|
-
* Code and Codex through their hook files, and OpenCode (since
|
|
184
|
-
*
|
|
185
|
+
* Code and Codex through their hook files, and OpenCode (since its gate
|
|
186
|
+
* landed, 2026-09-23) through the plugin `openCodeHooks.ts` generates —
|
|
185
187
|
* the worktree propagation re-runs every backend's writer per worktree,
|
|
186
188
|
* so a feature run against any `--providers` value is governed.
|
|
187
189
|
*/
|
|
@@ -190,7 +192,7 @@ exports.HarnessType = {
|
|
|
190
192
|
// Same family as LANGGRAPH: the blocking gate ships in intutic-clawde
|
|
191
193
|
// (intutic_clawde.gate, python-raise contract), evaluated in-process before
|
|
192
194
|
// the tool body runs. This adapter writes .env.intutic (proxy base-URL vars
|
|
193
|
-
// only) — see gateRegistry.ts NO_GATE rows and
|
|
195
|
+
// only) — see gateRegistry.ts NO_GATE rows and shared-types/src/gateKind.ts.
|
|
194
196
|
/** LangChain — covers BOTH the Python (`langchain`/`langchain-core`) and
|
|
195
197
|
* JS/TS (`langchain` npm package) ecosystems for detection purposes, since
|
|
196
198
|
* the framework itself ships in both. This env-adapter (`langchain.ts`) is
|
|
@@ -227,7 +229,7 @@ exports.HarnessType = {
|
|
|
227
229
|
STRANDS: 'strands',
|
|
228
230
|
/** Microsoft Agent Framework (`agent-framework` / `agent-framework-core` on
|
|
229
231
|
* PyPI, imported as `agent_framework` — the AutoGen + Semantic Kernel
|
|
230
|
-
* successor; a separate framework from AUTOGEN
|
|
232
|
+
* successor; a separate framework from AUTOGEN). Detected via
|
|
231
233
|
* `agent-framework`/`agent_framework` in Python dependency manifests. Gate:
|
|
232
234
|
* `intutic_clawde.gate.adapters.agent_framework`'s
|
|
233
235
|
* `IntuticFunctionMiddleware`, a `FunctionMiddleware` that short-circuits
|
|
@@ -256,7 +258,7 @@ exports.HarnessType = {
|
|
|
256
258
|
* check — either alone is too generic; see tools/cli/src/harness/eve.ts).
|
|
257
259
|
* Gate: `@intutic/gate/eve`'s `intuticApproval()` on eve's per-tool /
|
|
258
260
|
* per-connection `approval` policy surface — see gateRegistry.ts's `eve`
|
|
259
|
-
* row
|
|
261
|
+
* row for the preview-churn shield. */
|
|
260
262
|
EVE: 'eve',
|
|
261
263
|
/**
|
|
262
264
|
* TrueFoundry's "TrueForge" (github.com/truefoundry/trueforge, MIT,
|
|
@@ -302,7 +304,7 @@ exports.HarnessType = {
|
|
|
302
304
|
* `toolApproval` setting is a STATIC record without callback support, so
|
|
303
305
|
* per-call gating routes through the tool-approval flow; built-in sandbox
|
|
304
306
|
* tools are governed only by `permissionMode`, which DEFAULTS to
|
|
305
|
-
* 'allow-all'. See gateRegistry.ts's NO_GATE row
|
|
307
|
+
* 'allow-all'. See gateRegistry.ts's NO_GATE row. */
|
|
306
308
|
AI_SDK_HARNESS: 'ai-sdk-harness',
|
|
307
309
|
/** Vercel `@ai-sdk/workflow` (WorkflowAgent — durable workflow agents on
|
|
308
310
|
* the Workflow DevKit). Detected via `@ai-sdk/workflow` in `package.json`
|
|
@@ -311,8 +313,7 @@ exports.HarnessType = {
|
|
|
311
313
|
* too generic). Gate: `@intutic/gate/workflow`'s `intuticNeedsApproval()`
|
|
312
314
|
* on each tool — WorkflowAgent itself has zero approval fields; refusals
|
|
313
315
|
* are FatalError-compatible so the durable runtime aborts rather than
|
|
314
|
-
* retry-looping a governance denial. See gateRegistry.ts's NO_GATE row
|
|
315
|
-
* and TD-418..419. */
|
|
316
|
+
* retry-looping a governance denial. See gateRegistry.ts's NO_GATE row. */
|
|
316
317
|
AI_SDK_WORKFLOW: 'ai-sdk-workflow',
|
|
317
318
|
// ─── B2: AWS Bedrock AgentCore ───────────────────────────────────────────
|
|
318
319
|
/**
|
|
@@ -340,24 +341,24 @@ exports.HarnessType = {
|
|
|
340
341
|
* framework-SDK code as the deployment target, so if that code uses no
|
|
341
342
|
* framework this registry supports (raw boto3, a hand-rolled tool loop),
|
|
342
343
|
* coverage is genuinely zero — the same honest gap AGENTIC_ORCHESTRATOR's
|
|
343
|
-
* OpenCode backend has
|
|
344
|
+
* OpenCode backend has. Deployment-target constraints that are
|
|
344
345
|
* NOT a gate concern (environment-variable caps, VPC/NAT egress topology,
|
|
345
346
|
* SigV4 traffic not being proxyable) are documented in
|
|
346
347
|
* apps/docs/integrations/agentcore.md rather than encoded here.
|
|
347
348
|
*
|
|
348
349
|
* AgentCore **Gateway** (the MCP-tool-call interceptor path) deliberately
|
|
349
|
-
* has NO enum entry here — same precedent QM set
|
|
350
|
+
* has NO enum entry here — same precedent QM set: it is a
|
|
350
351
|
* deployed AWS resource (a Lambda attached to a Gateway), never something
|
|
351
352
|
* `intutic init`/`intutic connect` finds on a developer's laptop. Its
|
|
352
353
|
* coverage is the `tools/agentcore-interceptor` Lambda calling
|
|
353
|
-
* `POST /api/v1/integrations/agentcore/gateway-check
|
|
354
|
+
* `POST /api/v1/integrations/agentcore/gateway-check`.
|
|
354
355
|
*
|
|
355
356
|
* AgentCore **Policy** (Cedar/"Dogwood") has NO third-party HTTP policy
|
|
356
357
|
* backend at all (confirmed against `GatewayPolicyEngineConfiguration`'s
|
|
357
358
|
* real API reference: `arn` only ever names an AWS-native
|
|
358
359
|
* `policy-engine/...` resource) — not integrable by design, not a gap.
|
|
359
360
|
*
|
|
360
|
-
* See apps/docs/integrations/agentcore.md
|
|
361
|
+
* See apps/docs/integrations/agentcore.md.
|
|
361
362
|
*/
|
|
362
363
|
AGENTCORE_RUNTIME: 'agentcore-runtime',
|
|
363
364
|
// ─── B3: TrueForge, standalone/hosted server (bridge-gated) ─────────────
|
|
@@ -425,19 +426,19 @@ exports.HARNESS_COUNT = Object.keys(exports.HarnessType).length;
|
|
|
425
426
|
* `HARNESS_COUNT` minus the harnesses with a confirmed, currently-open
|
|
426
427
|
* support gap — the number safe to use in headline/marketing copy
|
|
427
428
|
* ("works with N coding agents") without overclaiming. Each exclusion must
|
|
428
|
-
* be a harness with its own
|
|
429
|
+
* be a harness with its own recorded gap describing a REAL,
|
|
429
430
|
* currently-unactionable gap (not a caveat, not a "documented, not a
|
|
430
431
|
* defect" note). The list is EMPTY since 2026-09-23 and the mechanism is
|
|
431
432
|
* kept so the next real gap goes here and nowhere else:
|
|
432
433
|
*
|
|
433
|
-
* - `agentic-orchestrator` was excluded
|
|
434
|
+
* - `agentic-orchestrator` was excluded while its OpenCode
|
|
434
435
|
* backend had no gate; OpenCode is a harness of its own now.
|
|
435
|
-
* - `autogen` was excluded
|
|
436
|
+
* - `autogen` was excluded while `InterventionHandler.on_send`
|
|
436
437
|
* was blind to `AssistantAgent`'s own tool calls; `IntuticWorkbench`
|
|
437
438
|
* (2026-09-22) governs them.
|
|
438
439
|
*
|
|
439
|
-
* Deliberately does NOT exclude `mastra` —
|
|
440
|
-
* "
|
|
440
|
+
* Deliberately does NOT exclude `mastra` — its gap is explicitly recorded
|
|
441
|
+
* as "documented, not a defect", a caveat about a call-site
|
|
441
442
|
* hook override, not a coverage gap, so excluding it here would be the
|
|
442
443
|
* exact overclaim-avoidance discipline applied backwards. Also does NOT
|
|
443
444
|
* exclude `continue` over its headless-mode limitation (`cn -p` skips
|
|
@@ -464,6 +465,32 @@ exports.IncidentStatus = {
|
|
|
464
465
|
RESOLVED: 'RESOLVED',
|
|
465
466
|
FALSE_POSITIVE: 'FALSE_POSITIVE',
|
|
466
467
|
};
|
|
468
|
+
// ─── Incident Type ───────────────────────────────────────────────────
|
|
469
|
+
/**
|
|
470
|
+
* Incidents that are not an agent misbehaving, so they are not anomaly
|
|
471
|
+
* categories: nothing on the hot path detects them, no corrective card
|
|
472
|
+
* answers them, and enforcement cannot be promoted on them. They share the
|
|
473
|
+
* `anomaly_type` column (Postgres enum, migrations 218 and 219) with the
|
|
474
|
+
* taxonomy.
|
|
475
|
+
*/
|
|
476
|
+
exports.SystemIncidentType = {
|
|
477
|
+
/** A proxy refused to load a custom WASM or Rego rule version (`ruleLoadFailures.ts`). */
|
|
478
|
+
WASM_RULE_REFUSED: 'WASM_RULE_REFUSED',
|
|
479
|
+
/**
|
|
480
|
+
* Anything else a proxy reports on `intutic:system_anomalies`: a
|
|
481
|
+
* dependency it could not reach, such as the LLM provider or the semantic
|
|
482
|
+
* cache's embedding service or vector store.
|
|
483
|
+
*/
|
|
484
|
+
SYSTEM_ANOMALY: 'SYSTEM_ANOMALY',
|
|
485
|
+
};
|
|
486
|
+
/** What a governance incident is filed under: an anomaly category or a system incident type. */
|
|
487
|
+
exports.IncidentType = { ...anomaly_taxonomy_1.AnomalyType, ...exports.SystemIncidentType };
|
|
488
|
+
/** Every incident type, for validating a filter or listing the choices. */
|
|
489
|
+
exports.INCIDENT_TYPES = Object.values(exports.IncidentType);
|
|
490
|
+
/** Whether an arbitrary string is an incident type. */
|
|
491
|
+
function isIncidentType(value) {
|
|
492
|
+
return exports.INCIDENT_TYPES.includes(value);
|
|
493
|
+
}
|
|
467
494
|
// ─── Plan Lifecycle State ────────────────────────────────────────────
|
|
468
495
|
// HLD §3.4.1 — Stored plan compliance trail lifecycle
|
|
469
496
|
/** Lifecycle state for stored execution plans. */
|
|
@@ -486,7 +513,7 @@ exports.PlanExecutionOutcome = {
|
|
|
486
513
|
ABORTED: 'ABORTED',
|
|
487
514
|
};
|
|
488
515
|
// ─── SOP Lifecycle State ─────────────────────────────────────────────
|
|
489
|
-
// HLD §3.4
|
|
516
|
+
// HLD §3.4 — 7-state FSM: DRAFT → PENDING_REVIEW → GENERATED
|
|
490
517
|
// → HYPOTHESIZED → REFINED → VALIDATED → INVALIDATED
|
|
491
518
|
/** Lifecycle state for SOPs in the registry. */
|
|
492
519
|
exports.SopLifecycleState = {
|
|
@@ -499,7 +526,7 @@ exports.SopLifecycleState = {
|
|
|
499
526
|
INVALIDATED: 'INVALIDATED',
|
|
500
527
|
};
|
|
501
528
|
// ─── SOP Type ────────────────────────────────────────────────────────
|
|
502
|
-
//
|
|
529
|
+
// SOP classification for hook pipeline
|
|
503
530
|
/** SOP type: standard markdown or executable V8 hook. */
|
|
504
531
|
exports.SopType = {
|
|
505
532
|
/** Standard SOP — markdown content enforced via SSL. */
|
|
@@ -508,7 +535,7 @@ exports.SopType = {
|
|
|
508
535
|
HOOK: 'hook',
|
|
509
536
|
};
|
|
510
537
|
// ─── Hook Phase ──────────────────────────────────────────────────────
|
|
511
|
-
//
|
|
538
|
+
// Pipeline phase for hook-type SOPs
|
|
512
539
|
/** Pipeline phase where a hook-type SOP fires. */
|
|
513
540
|
exports.HookPhase = {
|
|
514
541
|
/** Before tool call evaluation. */
|
|
@@ -529,7 +556,7 @@ exports.RoutingTier = {
|
|
|
529
556
|
LOCAL: 'local',
|
|
530
557
|
};
|
|
531
558
|
// ─── Workspace Role ──────────────────────────────────────────────────
|
|
532
|
-
// HLD §5.1
|
|
559
|
+
// HLD §5.1 — RBAC role hierarchy
|
|
533
560
|
/** Workspace member role for RBAC. OWNER > ADMIN > EM > DEVELOPER > VIEWER. */
|
|
534
561
|
exports.WorkspaceRole = {
|
|
535
562
|
OWNER: 'OWNER',
|
|
@@ -540,7 +567,6 @@ exports.WorkspaceRole = {
|
|
|
540
567
|
};
|
|
541
568
|
// ─── MCP Proxy Settings ──────────────────────────────────────────────
|
|
542
569
|
// WS-5 — Q1 fail behavior, Q2 deployment model, Q3 bypass enforcement
|
|
543
|
-
// TD-151, TD-152, TD-153, TD-154, TD-155
|
|
544
570
|
/**
|
|
545
571
|
* MCP proxy fail behavior when the Intutic control plane is unreachable.
|
|
546
572
|
* - `open` (default): pass through the tool call + emit a warning event
|
|
@@ -549,7 +575,7 @@ exports.WorkspaceRole = {
|
|
|
549
575
|
* Note: `closed` only affects harnesses with MCP proxy injection (9/20 —
|
|
550
576
|
* 10 config paths across 9 harnesses, see sync-daemon mcpAutoWrite.ts).
|
|
551
577
|
* For harnesses without MCP proxy injection (e.g. n8n, pi, codex,
|
|
552
|
-
* open-webui),
|
|
578
|
+
* open-webui) there is no MCP proxy to fail, so this has no effect.
|
|
553
579
|
*/
|
|
554
580
|
exports.McpProxyFailBehavior = {
|
|
555
581
|
OPEN: 'open',
|
|
@@ -560,7 +586,7 @@ exports.McpProxyFailBehavior = {
|
|
|
560
586
|
* - `per-session` (default, Phase 4): new proxy process per MCP connection
|
|
561
587
|
* - `daemon` (Phase 5): long-lived daemon, per-session shims delegate via Unix socket
|
|
562
588
|
*
|
|
563
|
-
*
|
|
589
|
+
* Daemon mode requires macOS notarization. Both modes are active: the
|
|
564
590
|
* mcp-proxy honours `daemon` by answering policy lookups over the daemon socket.
|
|
565
591
|
*/
|
|
566
592
|
exports.McpProxyMode = {
|
|
@@ -573,8 +599,6 @@ exports.McpProxyMode = {
|
|
|
573
599
|
* - `rewrite` (default): drift watcher detects edits → immediate config rewrite (~1s)
|
|
574
600
|
* - `immutable` (opt-in): after each write, sets macOS `chflags uchg` (user-immutable flag)
|
|
575
601
|
* - `alert-only`: no rewrite; drift creates a governance incident only (audit mode)
|
|
576
|
-
*
|
|
577
|
-
* See TD-154 for immutable-flag UX risk notes.
|
|
578
602
|
*/
|
|
579
603
|
exports.BypassEnforcementTier = {
|
|
580
604
|
REWRITE: 'rewrite',
|
|
@@ -582,7 +606,7 @@ exports.BypassEnforcementTier = {
|
|
|
582
606
|
ALERT_ONLY: 'alert-only',
|
|
583
607
|
};
|
|
584
608
|
// ─── Phase 5 Enums ───────────────────────────────────────────────────
|
|
585
|
-
//
|
|
609
|
+
// Production Hardening & SOC 2
|
|
586
610
|
/** TurboVec behavioral drift classification. @see HLD §7.7 */
|
|
587
611
|
exports.DriftClassification = {
|
|
588
612
|
POSITIVE_DRIFT: 'POSITIVE_DRIFT',
|
package/dist/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAyhBH,wCAEC;AAzhBD,gEAA4E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B;IAChC,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAG,eAAe;CACvB,CAAA;AAGV,oFAAoF;AACvE,QAAA,kBAAkB,GAAG;IAChC,QAAQ,EAAmB,UAAU;IACrC,yBAAyB,EAAE,2BAA2B;CAC9C,CAAA;AAGV;;;;;;;;;GASG;AACU,QAAA,eAAe,GAAG;IAC7B,eAAe,EAAE,iBAAiB;IAClC,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;CAClB,CAAA"}
|
package/dist/errors.js
CHANGED
|
@@ -82,7 +82,7 @@ exports.E_ALREADY_VERIFIED = 'ALREADY_VERIFIED';
|
|
|
82
82
|
exports.E_DOMAIN_NOT_VERIFIED = 'DOMAIN_NOT_VERIFIED';
|
|
83
83
|
/** Generic validation failure (legacy alias). */
|
|
84
84
|
exports.E_VALIDATION = 'E_VALIDATION';
|
|
85
|
-
// ─── Identity Federation Error Codes
|
|
85
|
+
// ─── Identity Federation Error Codes ─────────────────────
|
|
86
86
|
/** SSO is not configured or disabled for this workspace. */
|
|
87
87
|
exports.E_SSO_DISABLED = 'SSO_DISABLED';
|
|
88
88
|
/** SSO user has no workspace membership. */
|
|
@@ -109,13 +109,13 @@ exports.E_FEATURE_NOT_AVAILABLE = 'FEATURE_NOT_AVAILABLE';
|
|
|
109
109
|
* which made the unenforced sessions rank best in a workspace's audit history.
|
|
110
110
|
*/
|
|
111
111
|
exports.E_SSL_NOT_ENFORCED = 'SSL_NOT_ENFORCED';
|
|
112
|
-
// ─── WS4 — Enterprise Identity & Compliance
|
|
112
|
+
// ─── WS4 — Enterprise Identity & Compliance ───────────────
|
|
113
113
|
/**
|
|
114
114
|
* Requested child capabilities are not a subset of the parent key's capabilities.
|
|
115
115
|
* HLD §5.6 — DCT Token Attenuation (Patent Family A).
|
|
116
116
|
*/
|
|
117
117
|
exports.E_ATTENUATION_CAP_VIOLATION = 'ATTENUATION_CAP_VIOLATION';
|
|
118
|
-
// ─── WS5 — Monetization & Financial Ledger
|
|
118
|
+
// ─── WS5 — Monetization & Financial Ledger ────────────────
|
|
119
119
|
/**
|
|
120
120
|
* Daily spend cap exceeded with hard enforcement mode active.
|
|
121
121
|
* Proxy returns this when budget:hard_block:{wid} Valkey key is set.
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AA6PH,wCAQC;AAnQD,wEAAwE;AAExE,0BAA0B;AACb,QAAA,WAAW,GAAG,aAAsB,CAAA;AAEjD,wDAAwD;AAC3C,QAAA,mBAAmB,GAAG,qBAA8B,CAAA;AAGjE,qDAAqD;AACxC,QAAA,cAAc,GAAG,gBAAyB,CAAA;AACvD,8DAA8D;AACjD,QAAA,kBAAkB,GAAG,kBAA2B,CAAA;AAC7D,uEAAuE;AAC1D,QAAA,gBAAgB,GAAG,gBAAyB,CAAA;AAEzD,kDAAkD;AACrC,QAAA,WAAW,GAAG,aAAsB,CAAA;AAEjD,yDAAyD;AAC5C,QAAA,iBAAiB,GAAG,mBAA4B,CAAA;AAE7D,mCAAmC;AACtB,QAAA,cAAc,GAAG,gBAAyB,CAAA;AAEvD,gFAAgF;AACnE,QAAA,uBAAuB,GAAG,yBAAkC,CAAA;AAEzE,sFAAsF;AACzE,QAAA,6BAA6B,GAAG,+BAAwC,CAAA;AAErF,oDAAoD;AACvC,QAAA,mBAAmB,GAAG,qBAA8B,CAAA;AAEjE,uDAAuD;AAC1C,QAAA,mBAAmB,GAAG,mBAA4B,CAAA;AAE/D;;;;GAIG;AACU,QAAA,sBAAsB,GAAG,sBAA+B,CAAA;AACrE;;;;;;;GAOG;AACU,QAAA,iBAAiB,GAAG,iBAA0B,CAAA;AAE3D,+CAA+C;AAClC,QAAA,iBAAiB,GAAG,iBAA0B,CAAA;AAE3D,wBAAwB;AACX,QAAA,cAAc,GAAG,cAAuB,CAAA;AAErD,wGAAwG;AAC3F,QAAA,y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AAG,CAAC,CAAC,CAC1C,CAAC;AACJ,CAAC"}
|
package/dist/finops.d.ts
CHANGED
|
@@ -3,13 +3,25 @@
|
|
|
3
3
|
*
|
|
4
4
|
* These types correspond to the `execution_traces` table and the
|
|
5
5
|
* `finops_attribution_4d` materialized view defined in
|
|
6
|
-
*
|
|
6
|
+
* the data-architecture schema.
|
|
7
7
|
*
|
|
8
8
|
* HLD §3.6 (FinOps Ledger), §3.19 (4D Attribution)
|
|
9
9
|
*
|
|
10
10
|
* @module
|
|
11
11
|
*/
|
|
12
12
|
import type { AnomalyType, EnforcementAction, RoutingTier, TokenUtility } from './enums.js';
|
|
13
|
+
/**
|
|
14
|
+
* The daily spend cap, in USD, of a workspace that has never saved one. A
|
|
15
|
+
* hard cap: the proxy refuses a request that would take the day's spend over
|
|
16
|
+
* it (`429 BUDGET_EXCEEDED`). An owner or admin changes it on Settings ›
|
|
17
|
+
* Billing › Budget Limits or with `PUT /api/v1/budget`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const DEFAULT_DAILY_BUDGET_USD = 100;
|
|
20
|
+
/**
|
|
21
|
+
* The monthly cap, in USD, of a workspace that has never saved one. Alerts
|
|
22
|
+
* only: reaching it raises budget alerts and refuses nothing.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_MONTHLY_BUDGET_USD = 500;
|
|
13
25
|
/**
|
|
14
26
|
* A single row in the `execution_traces` table — the append-only FinOps ledger.
|
|
15
27
|
*
|
|
@@ -180,6 +192,37 @@ export interface TraceStep {
|
|
|
180
192
|
latencyMs: number | null;
|
|
181
193
|
timestamp: string;
|
|
182
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* One upstream call the LLM proxy made for a request: a retry of the routed
|
|
197
|
+
* model or a fallback target. `outcome` is `ok`, `http_<status>`, `timeout`,
|
|
198
|
+
* `connect_error`, `transport_error`, or `skipped` for a fallback target that
|
|
199
|
+
* was not called; `stopped` says why no further call was made (`max_attempts`,
|
|
200
|
+
* `time_budget`, `retry_after_exceeds_budget`, `provider_declined`,
|
|
201
|
+
* `quota_exhausted`) or, for a skipped target, why it was skipped
|
|
202
|
+
* (`same_target`, `wire_mismatch`, `model_not_allowed`, `budget` — priced
|
|
203
|
+
* for its model, the request would not fit a spend budget — `no_credential`,
|
|
204
|
+
* `unknown_provider`, `time_budget`).
|
|
205
|
+
*/
|
|
206
|
+
export interface UpstreamAttempt {
|
|
207
|
+
model: string;
|
|
208
|
+
provider: string;
|
|
209
|
+
outcome: string;
|
|
210
|
+
status?: number;
|
|
211
|
+
latencyMs: number;
|
|
212
|
+
/** The wait before the next call. */
|
|
213
|
+
backoffMs?: number;
|
|
214
|
+
/** True when that wait was the provider's own `retry-after`. */
|
|
215
|
+
serverDelay?: boolean;
|
|
216
|
+
stopped?: string;
|
|
217
|
+
}
|
|
218
|
+
/** The fallback target that served a request after the routed model's retries ran out. */
|
|
219
|
+
export interface UpstreamFallback {
|
|
220
|
+
fromModel: string;
|
|
221
|
+
toModel: string;
|
|
222
|
+
toProvider: string;
|
|
223
|
+
/** True when the routed model's prompt cache was warm and the fallback is another model family. */
|
|
224
|
+
cacheAffinityBroken?: boolean;
|
|
225
|
+
}
|
|
183
226
|
/** Full detail of a single trace. */
|
|
184
227
|
export interface TraceDetail {
|
|
185
228
|
traceId: string;
|
|
@@ -211,7 +254,7 @@ export interface TraceDetail {
|
|
|
211
254
|
correctivePromptCard: unknown | null;
|
|
212
255
|
reasoningTokens?: number | null;
|
|
213
256
|
/**
|
|
214
|
-
* Provider-reported prompt-cache token counts (
|
|
257
|
+
* Provider-reported prompt-cache token counts (migration 165) —
|
|
215
258
|
* Anthropic's `usage.cache_read_input_tokens` / `cache_creation_input_tokens`
|
|
216
259
|
* today. Null when the provider/proxy build doesn't report them; distinct
|
|
217
260
|
* from `cacheHit`/`cacheSavingsUsd` (the proxy's own semantic response
|
|
@@ -240,6 +283,13 @@ export interface TraceDetail {
|
|
|
240
283
|
* it back is what the shadow-routing savings report aggregates.
|
|
241
284
|
*/
|
|
242
285
|
routingShadowModel?: string | null;
|
|
286
|
+
/**
|
|
287
|
+
* Every upstream call the proxy made when it retried or ran fallbacks, in
|
|
288
|
+
* order (migration 216). Null for the ordinary request that took one call.
|
|
289
|
+
*/
|
|
290
|
+
upstreamAttempts?: UpstreamAttempt[] | null;
|
|
291
|
+
/** The fallback target that served the request, or null when none did (migration 216). */
|
|
292
|
+
upstreamFallback?: UpstreamFallback | null;
|
|
243
293
|
/** True when the request was served under a valid break-glass token, global or scoped (migration 170). */
|
|
244
294
|
breakGlass?: boolean;
|
|
245
295
|
/** The approval this trace ran under; what it skipped is that approval's `policyId`. */
|