@intutic/shared-types 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/.dist/anomaly.d.ts +227 -0
  2. package/.dist/anomaly.d.ts.map +1 -0
  3. package/.dist/anomaly.js +35 -0
  4. package/.dist/anomaly.js.map +1 -0
  5. package/.dist/api-contracts.d.ts +176 -0
  6. package/.dist/api-contracts.d.ts.map +1 -0
  7. package/.dist/api-contracts.js +110 -0
  8. package/.dist/api-contracts.js.map +1 -0
  9. package/.dist/auth.d.ts +222 -0
  10. package/.dist/auth.d.ts.map +1 -0
  11. package/.dist/auth.js +59 -0
  12. package/.dist/auth.js.map +1 -0
  13. package/.dist/enums.d.ts +156 -0
  14. package/.dist/enums.d.ts.map +1 -0
  15. package/.dist/enums.js +161 -0
  16. package/.dist/enums.js.map +1 -0
  17. package/.dist/errors.d.ts +106 -0
  18. package/.dist/errors.d.ts.map +1 -0
  19. package/.dist/errors.js +110 -0
  20. package/.dist/errors.js.map +1 -0
  21. package/.dist/finops.d.ts +117 -0
  22. package/.dist/finops.d.ts.map +1 -0
  23. package/.dist/finops.js +14 -0
  24. package/.dist/finops.js.map +1 -0
  25. package/.dist/identity.d.ts +176 -0
  26. package/.dist/identity.d.ts.map +1 -0
  27. package/.dist/identity.js +32 -0
  28. package/.dist/identity.js.map +1 -0
  29. package/.dist/index.d.ts +27 -0
  30. package/.dist/index.d.ts.map +1 -0
  31. package/.dist/index.js +75 -0
  32. package/.dist/index.js.map +1 -0
  33. package/.dist/policy.d.ts +104 -0
  34. package/.dist/policy.d.ts.map +1 -0
  35. package/.dist/policy.js +14 -0
  36. package/.dist/policy.js.map +1 -0
  37. package/.dist/session.d.ts +62 -0
  38. package/.dist/session.d.ts.map +1 -0
  39. package/.dist/session.js +14 -0
  40. package/.dist/session.js.map +1 -0
  41. package/.dist/sop.d.ts +329 -0
  42. package/.dist/sop.d.ts.map +1 -0
  43. package/.dist/sop.js +44 -0
  44. package/.dist/sop.js.map +1 -0
  45. package/.dist/sync.d.ts +204 -0
  46. package/.dist/sync.d.ts.map +1 -0
  47. package/.dist/sync.js +45 -0
  48. package/.dist/sync.js.map +1 -0
  49. package/package.json +19 -0
package/.dist/index.js ADDED
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ /**
3
+ * @intutic/shared-types — Shared TypeScript types, interfaces, and enums
4
+ *
5
+ * This package is the single source of truth for all types used by 2+ packages
6
+ * in the Intutic monorepo. Never duplicate type definitions across services.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.CreateSsoProviderSchema = exports.DaemonStatusSchema = exports.SopHashReportSchema = exports.CreateApiKeyInputSchema = exports.UpdateRoleInputSchema = exports.InviteMemberInputSchema = exports.ChangePasswordInputSchema = exports.RefreshInputSchema = exports.RegisterInputSchema = exports.LoginInputSchema = exports.PolicyVerdictSchema = exports.CreateTraceSchema = exports.CreateSessionSchema = exports.E_FEATURE_NOT_AVAILABLE = exports.E_OFFBOARDING_IN_PROGRESS = exports.E_SCIM_DUPLICATE = exports.E_SCIM_AUTH_FAILED = exports.E_PROVIDER_IN_USE = exports.E_PROVIDER_DISABLED = exports.E_OIDC_CLAIMS_MISSING = exports.E_OIDC_TOKEN_EXCHANGE_FAILED = exports.E_OIDC_INVALID_STATE = exports.E_SSO_NO_MEMBERSHIP = exports.E_SSO_DISABLED = exports.E_VALIDATION_FAILED = exports.E_APPROVAL_RATIONALE_REQUIRED = exports.E_APPEND_ONLY_VIOLATION = exports.E_RATE_LIMITED = exports.E_BUDGET_EXCEEDED = exports.E_FORBIDDEN = exports.E_UNAUTHORIZED = exports.E_NOT_FOUND = exports.IntuticError = exports.ENFORCEMENT_BY_STATE = exports.VALID_SOP_TRANSITIONS = exports.ANOMALY_SEVERITY_MAP = exports.WorkspaceRole = exports.RoutingTier = exports.SopLifecycleState = exports.PlanLifecycleState = exports.IncidentStatus = exports.ExecutionMode = exports.HarnessType = exports.AnomalyType = exports.ChangeClassification = exports.ComplexityTier = exports.BudgetTier = exports.TokenUtility = exports.EnforcementAction = exports.RiskLevel = void 0;
12
+ exports.CreateScimTokenSchema = exports.UpdateUserProfileSchema = void 0;
13
+ var enums_js_1 = require("./enums.js");
14
+ Object.defineProperty(exports, "RiskLevel", { enumerable: true, get: function () { return enums_js_1.RiskLevel; } });
15
+ Object.defineProperty(exports, "EnforcementAction", { enumerable: true, get: function () { return enums_js_1.EnforcementAction; } });
16
+ Object.defineProperty(exports, "TokenUtility", { enumerable: true, get: function () { return enums_js_1.TokenUtility; } });
17
+ Object.defineProperty(exports, "BudgetTier", { enumerable: true, get: function () { return enums_js_1.BudgetTier; } });
18
+ Object.defineProperty(exports, "ComplexityTier", { enumerable: true, get: function () { return enums_js_1.ComplexityTier; } });
19
+ Object.defineProperty(exports, "ChangeClassification", { enumerable: true, get: function () { return enums_js_1.ChangeClassification; } });
20
+ Object.defineProperty(exports, "AnomalyType", { enumerable: true, get: function () { return enums_js_1.AnomalyType; } });
21
+ Object.defineProperty(exports, "HarnessType", { enumerable: true, get: function () { return enums_js_1.HarnessType; } });
22
+ Object.defineProperty(exports, "ExecutionMode", { enumerable: true, get: function () { return enums_js_1.ExecutionMode; } });
23
+ Object.defineProperty(exports, "IncidentStatus", { enumerable: true, get: function () { return enums_js_1.IncidentStatus; } });
24
+ Object.defineProperty(exports, "PlanLifecycleState", { enumerable: true, get: function () { return enums_js_1.PlanLifecycleState; } });
25
+ Object.defineProperty(exports, "SopLifecycleState", { enumerable: true, get: function () { return enums_js_1.SopLifecycleState; } });
26
+ Object.defineProperty(exports, "RoutingTier", { enumerable: true, get: function () { return enums_js_1.RoutingTier; } });
27
+ Object.defineProperty(exports, "WorkspaceRole", { enumerable: true, get: function () { return enums_js_1.WorkspaceRole; } });
28
+ var anomaly_js_1 = require("./anomaly.js");
29
+ Object.defineProperty(exports, "ANOMALY_SEVERITY_MAP", { enumerable: true, get: function () { return anomaly_js_1.ANOMALY_SEVERITY_MAP; } });
30
+ var sop_js_1 = require("./sop.js");
31
+ Object.defineProperty(exports, "VALID_SOP_TRANSITIONS", { enumerable: true, get: function () { return sop_js_1.VALID_SOP_TRANSITIONS; } });
32
+ Object.defineProperty(exports, "ENFORCEMENT_BY_STATE", { enumerable: true, get: function () { return sop_js_1.ENFORCEMENT_BY_STATE; } });
33
+ var errors_js_1 = require("./errors.js");
34
+ Object.defineProperty(exports, "IntuticError", { enumerable: true, get: function () { return errors_js_1.IntuticError; } });
35
+ Object.defineProperty(exports, "E_NOT_FOUND", { enumerable: true, get: function () { return errors_js_1.E_NOT_FOUND; } });
36
+ Object.defineProperty(exports, "E_UNAUTHORIZED", { enumerable: true, get: function () { return errors_js_1.E_UNAUTHORIZED; } });
37
+ Object.defineProperty(exports, "E_FORBIDDEN", { enumerable: true, get: function () { return errors_js_1.E_FORBIDDEN; } });
38
+ Object.defineProperty(exports, "E_BUDGET_EXCEEDED", { enumerable: true, get: function () { return errors_js_1.E_BUDGET_EXCEEDED; } });
39
+ Object.defineProperty(exports, "E_RATE_LIMITED", { enumerable: true, get: function () { return errors_js_1.E_RATE_LIMITED; } });
40
+ Object.defineProperty(exports, "E_APPEND_ONLY_VIOLATION", { enumerable: true, get: function () { return errors_js_1.E_APPEND_ONLY_VIOLATION; } });
41
+ Object.defineProperty(exports, "E_APPROVAL_RATIONALE_REQUIRED", { enumerable: true, get: function () { return errors_js_1.E_APPROVAL_RATIONALE_REQUIRED; } });
42
+ Object.defineProperty(exports, "E_VALIDATION_FAILED", { enumerable: true, get: function () { return errors_js_1.E_VALIDATION_FAILED; } });
43
+ // Identity Federation (LLD #11)
44
+ Object.defineProperty(exports, "E_SSO_DISABLED", { enumerable: true, get: function () { return errors_js_1.E_SSO_DISABLED; } });
45
+ Object.defineProperty(exports, "E_SSO_NO_MEMBERSHIP", { enumerable: true, get: function () { return errors_js_1.E_SSO_NO_MEMBERSHIP; } });
46
+ Object.defineProperty(exports, "E_OIDC_INVALID_STATE", { enumerable: true, get: function () { return errors_js_1.E_OIDC_INVALID_STATE; } });
47
+ Object.defineProperty(exports, "E_OIDC_TOKEN_EXCHANGE_FAILED", { enumerable: true, get: function () { return errors_js_1.E_OIDC_TOKEN_EXCHANGE_FAILED; } });
48
+ Object.defineProperty(exports, "E_OIDC_CLAIMS_MISSING", { enumerable: true, get: function () { return errors_js_1.E_OIDC_CLAIMS_MISSING; } });
49
+ Object.defineProperty(exports, "E_PROVIDER_DISABLED", { enumerable: true, get: function () { return errors_js_1.E_PROVIDER_DISABLED; } });
50
+ Object.defineProperty(exports, "E_PROVIDER_IN_USE", { enumerable: true, get: function () { return errors_js_1.E_PROVIDER_IN_USE; } });
51
+ Object.defineProperty(exports, "E_SCIM_AUTH_FAILED", { enumerable: true, get: function () { return errors_js_1.E_SCIM_AUTH_FAILED; } });
52
+ Object.defineProperty(exports, "E_SCIM_DUPLICATE", { enumerable: true, get: function () { return errors_js_1.E_SCIM_DUPLICATE; } });
53
+ Object.defineProperty(exports, "E_OFFBOARDING_IN_PROGRESS", { enumerable: true, get: function () { return errors_js_1.E_OFFBOARDING_IN_PROGRESS; } });
54
+ Object.defineProperty(exports, "E_FEATURE_NOT_AVAILABLE", { enumerable: true, get: function () { return errors_js_1.E_FEATURE_NOT_AVAILABLE; } });
55
+ var api_contracts_js_1 = require("./api-contracts.js");
56
+ Object.defineProperty(exports, "CreateSessionSchema", { enumerable: true, get: function () { return api_contracts_js_1.CreateSessionSchema; } });
57
+ Object.defineProperty(exports, "CreateTraceSchema", { enumerable: true, get: function () { return api_contracts_js_1.CreateTraceSchema; } });
58
+ Object.defineProperty(exports, "PolicyVerdictSchema", { enumerable: true, get: function () { return api_contracts_js_1.PolicyVerdictSchema; } });
59
+ var auth_js_1 = require("./auth.js");
60
+ Object.defineProperty(exports, "LoginInputSchema", { enumerable: true, get: function () { return auth_js_1.LoginInputSchema; } });
61
+ Object.defineProperty(exports, "RegisterInputSchema", { enumerable: true, get: function () { return auth_js_1.RegisterInputSchema; } });
62
+ Object.defineProperty(exports, "RefreshInputSchema", { enumerable: true, get: function () { return auth_js_1.RefreshInputSchema; } });
63
+ Object.defineProperty(exports, "ChangePasswordInputSchema", { enumerable: true, get: function () { return auth_js_1.ChangePasswordInputSchema; } });
64
+ Object.defineProperty(exports, "InviteMemberInputSchema", { enumerable: true, get: function () { return auth_js_1.InviteMemberInputSchema; } });
65
+ Object.defineProperty(exports, "UpdateRoleInputSchema", { enumerable: true, get: function () { return auth_js_1.UpdateRoleInputSchema; } });
66
+ Object.defineProperty(exports, "CreateApiKeyInputSchema", { enumerable: true, get: function () { return auth_js_1.CreateApiKeyInputSchema; } });
67
+ var sync_js_1 = require("./sync.js");
68
+ Object.defineProperty(exports, "SopHashReportSchema", { enumerable: true, get: function () { return sync_js_1.SopHashReportSchema; } });
69
+ Object.defineProperty(exports, "DaemonStatusSchema", { enumerable: true, get: function () { return sync_js_1.DaemonStatusSchema; } });
70
+ // Identity Federation (LLD #11)
71
+ var identity_js_1 = require("./identity.js");
72
+ Object.defineProperty(exports, "CreateSsoProviderSchema", { enumerable: true, get: function () { return identity_js_1.CreateSsoProviderSchema; } });
73
+ Object.defineProperty(exports, "UpdateUserProfileSchema", { enumerable: true, get: function () { return identity_js_1.UpdateUserProfileSchema; } });
74
+ Object.defineProperty(exports, "CreateScimTokenSchema", { enumerable: true, get: function () { return identity_js_1.CreateScimTokenSchema; } });
75
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;AAEH,uCAemB;AAdjB,qGAAA,SAAS,OAAA;AACT,6GAAA,iBAAiB,OAAA;AACjB,wGAAA,YAAY,OAAA;AACZ,sGAAA,UAAU,OAAA;AACV,0GAAA,cAAc,OAAA;AACd,gHAAA,oBAAoB,OAAA;AACpB,uGAAA,WAAW,OAAA;AACX,uGAAA,WAAW,OAAA;AACX,yGAA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AIsB;AAHpB,sHAAA,uBAAuB,OAAA;AACvB,sHAAA,uBAAuB,OAAA;AACvB,oHAAA,qBAAqB,OAAA"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * PCAS (Policy-Controlled Agent Sandbox) and enforcement types.
3
+ *
4
+ * These types define the permission resolution, policy verdict, and
5
+ * Delegation Capability Token (DCT) structures used by the Circuit
6
+ * Breaker and PCAS subsystems.
7
+ *
8
+ * HLD §3.3 (PCAS), LLD 01-data-architecture §3.2 (FalkorDB org graph)
9
+ *
10
+ * @module
11
+ */
12
+ import type { BudgetTier, EnforcementAction } from './enums.js';
13
+ /**
14
+ * Resolved permission set for a user/agent within a workspace.
15
+ *
16
+ * Produced by PCAS permission resolution (Valkey cache or FalkorDB query).
17
+ * The allowed/denied tool lists are evaluated against the current SOP.
18
+ *
19
+ * HLD §3.3 — PCAS permission resolution
20
+ */
21
+ export interface PermissionSet {
22
+ /** Tool names explicitly permitted for this session. */
23
+ allowedTools: string[];
24
+ /** Tool names explicitly denied for this session. */
25
+ deniedTools: string[];
26
+ /** Remaining budget in USD for this session or workspace. */
27
+ budgetRemaining: number;
28
+ /** Budget authority tier of the user/agent. */
29
+ tier: BudgetTier;
30
+ }
31
+ /**
32
+ * Result of a policy evaluation against a pending tool call.
33
+ *
34
+ * Produced by the Circuit Breaker's PCAS evaluation cascade.
35
+ * Routes enforce the verdict before forwarding the call to the provider.
36
+ *
37
+ * HLD §3.3 — Enforcement actions
38
+ */
39
+ export interface PolicyVerdict {
40
+ /** Enforcement action to apply. */
41
+ action: EnforcementAction;
42
+ /** Confidence score of the verdict (0.0–1.0). */
43
+ confidence: number;
44
+ /** Human-readable reason for the verdict. */
45
+ reason: string;
46
+ /** ID of the policy rule that produced this verdict, if applicable. */
47
+ policyId?: string;
48
+ }
49
+ /**
50
+ * Delegation Capability Token (DCT) for agent-to-agent permission attenuation.
51
+ *
52
+ * When an agent spawns a sub-agent, it issues a DCT that contains the
53
+ * parent's chain of authority and any attenuations (permission restrictions).
54
+ * The chain is append-only — sub-agents can only narrow permissions, never widen.
55
+ *
56
+ * HLD §3.3 — DCT lineage, LLD §3.2 — SPAWNED_BY edge
57
+ */
58
+ export interface DctToken {
59
+ /** Ordered chain of session IDs from root agent to current agent. */
60
+ chain: string[];
61
+ /** Permission attenuations applied at each delegation step. */
62
+ attenuation: Record<string, unknown>;
63
+ /** Session ID of the parent agent that issued this token. */
64
+ parentSessionId: string;
65
+ }
66
+ /**
67
+ * Tool-call risk classification for PCAS policy evaluation.
68
+ *
69
+ * HLD §3.2 — Circuit Breaker risk categories
70
+ */
71
+ export type RiskCategory = 'NONE' | 'DESTRUCTIVE' | 'CREDENTIAL_ACCESS';
72
+ /**
73
+ * Display mode controlling how enforcement decisions are surfaced to the user.
74
+ *
75
+ * HLD §3.3 — PCAS intervention modes
76
+ */
77
+ export type InterventionMode = 'TRANSPARENT' | 'OPAQUE' | 'SILENT_LOG';
78
+ /**
79
+ * Individual verdict from a single evaluation plugin in the cascade.
80
+ *
81
+ * HLD §3.2 — Evaluation cascade plugin output
82
+ */
83
+ export interface PluginVerdict {
84
+ /** Name of the plugin that produced this verdict. */
85
+ pluginName: string;
86
+ /** The policy verdict returned by this plugin. */
87
+ verdict: PolicyVerdict;
88
+ /** Time taken by this plugin to evaluate, in milliseconds. */
89
+ latencyMs: number;
90
+ }
91
+ /**
92
+ * Aggregated result from the full evaluation cascade across all plugins.
93
+ *
94
+ * HLD §3.2 — Cascade merge logic
95
+ */
96
+ export interface EvaluationCascadeResult {
97
+ /** Ordered list of per-plugin verdicts. */
98
+ pluginVerdicts: PluginVerdict[];
99
+ /** Final merged verdict after cascade resolution. */
100
+ mergedVerdict: PolicyVerdict;
101
+ /** Total wall-clock latency of the full cascade, in milliseconds. */
102
+ totalLatencyMs: number;
103
+ }
104
+ //# sourceMappingURL=policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA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;IAE/B,qDAAqD;IACrD,aAAa,EAAE,aAAa,CAAA;IAE5B,qEAAqE;IACrE,cAAc,EAAE,MAAM,CAAA;CACvB"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * PCAS (Policy-Controlled Agent Sandbox) and enforcement types.
4
+ *
5
+ * These types define the permission resolution, policy verdict, and
6
+ * Delegation Capability Token (DCT) structures used by the Circuit
7
+ * Breaker and PCAS subsystems.
8
+ *
9
+ * HLD §3.3 (PCAS), LLD 01-data-architecture §3.2 (FalkorDB org graph)
10
+ *
11
+ * @module
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ //# sourceMappingURL=policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.js","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Session management types.
3
+ *
4
+ * These types correspond to the `agent_sessions` table and the
5
+ * Valkey session checkpoint keys defined in
6
+ * LLD 01-data-architecture §3.1 and §3.3.
7
+ *
8
+ * HLD §4.5 (Session Tracking)
9
+ *
10
+ * @module
11
+ */
12
+ import type { BudgetTier, ExecutionMode, HarnessType } from './enums.js';
13
+ /**
14
+ * An active or completed agent session.
15
+ *
16
+ * Maps to the `agent_sessions` table. Sessions track which user,
17
+ * project, SOP, and harness are active, plus the budget tier
18
+ * and execution mode.
19
+ *
20
+ * LLD §3.1 — agent_sessions table
21
+ */
22
+ export interface Session {
23
+ /** Unique session identifier — `newId('ss')`. */
24
+ sessionId: string;
25
+ /** Project this session belongs to — FK to `projects`. */
26
+ projectId: string | null;
27
+ /** Workspace this session belongs to — FK to `workspaces`. */
28
+ workspaceId: string;
29
+ /** User who initiated this session. */
30
+ userId: string;
31
+ /** Active SOP governing this session — FK to `sop_registry`. */
32
+ activeSopId: string | null;
33
+ /** Agent harness/IDE type. */
34
+ harnessType: HarnessType;
35
+ /** Budget authority tier. */
36
+ budgetTier: BudgetTier;
37
+ /** Execution mode controlling autonomy level. */
38
+ executionMode: ExecutionMode;
39
+ /** ISO 8601 timestamp when the session was created — `newIso()`. */
40
+ createdAt: string;
41
+ /** ISO 8601 timestamp when the session ended, or null if still active. */
42
+ endedAt: string | null;
43
+ }
44
+ /**
45
+ * A session checkpoint stored in Valkey for DAG state recovery.
46
+ *
47
+ * Checkpoints allow resuming an agent session from the last known
48
+ * good state after a crash or disconnect.
49
+ *
50
+ * LLD §3.3 — Valkey key `v2:session:{session_id}:state` (TTL 24h)
51
+ */
52
+ export interface SessionCheckpoint {
53
+ /** Session this checkpoint belongs to. */
54
+ sessionId: string;
55
+ /** Hash of the DAG execution state at this checkpoint. */
56
+ dagStateHash: string;
57
+ /** Step index in the execution plan (0-based). */
58
+ stepIndex: number;
59
+ /** ISO 8601 timestamp of this checkpoint. */
60
+ timestamp: string;
61
+ }
62
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,WAAW,EACZ,MAAM,YAAY,CAAA;AAInB;;;;;;;;GAQG;AACH,MAAM,WAAW,OAAO;IACtB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAA;IAEjB,0DAA0D;IAC1D,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IAExB,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAA;IAEnB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAA;IAEd,gEAAgE;IAChE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAE1B,8BAA8B;IAC9B,WAAW,EAAE,WAAW,CAAA;IAExB,6BAA6B;IAC7B,UAAU,EAAE,UAAU,CAAA;IAEtB,iDAAiD;IACjD,aAAa,EAAE,aAAa,CAAA;IAE5B,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAA;IAEjB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB;AAID;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAA;IAEjB,0DAA0D;IAC1D,YAAY,EAAE,MAAM,CAAA;IAEpB,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAA;IAEjB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAA;CAClB"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * Session management types.
4
+ *
5
+ * These types correspond to the `agent_sessions` table and the
6
+ * Valkey session checkpoint keys defined in
7
+ * LLD 01-data-architecture §3.1 and §3.3.
8
+ *
9
+ * HLD §4.5 (Session Tracking)
10
+ *
11
+ * @module
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG"}
package/.dist/sop.d.ts ADDED
@@ -0,0 +1,329 @@
1
+ /**
2
+ * SOP (Standard Operating Procedure) registry types.
3
+ *
4
+ * These types correspond to the `sop_registry` table and the
5
+ * SOP proof tree structures used by the SSL (Self-Supervised Learning)
6
+ * synthesis pipeline.
7
+ *
8
+ * HLD §3.4 (SOP Registry), LLD 01-data-architecture §3.1, LLD #6
9
+ *
10
+ * @module
11
+ */
12
+ import type { ChangeClassification, ComplexityTier, RiskLevel, SopLifecycleState } from './enums.js';
13
+ /**
14
+ * A Standard Operating Procedure in the registry.
15
+ *
16
+ * SOPs are the governance documents that define expected agent behavior.
17
+ * They are versioned, classified by risk/complexity, and follow a
18
+ * lifecycle from hypothesis through validation to deprecation.
19
+ *
20
+ * LLD §3.1 — sop_registry table
21
+ */
22
+ export interface Sop {
23
+ /** Unique SOP identifier — `newId('sp')`. */
24
+ sopId: string;
25
+ /** Workspace this SOP belongs to — FK to `workspaces`. */
26
+ workspaceId: string;
27
+ /** Human-readable title of the SOP. */
28
+ title: string;
29
+ /** Semantic version string (e.g., '1.0.0'). */
30
+ version: string;
31
+ /** Full markdown content of the SOP document. CONFIDENTIAL. */
32
+ markdownContent: string;
33
+ /** Risk severity tier assigned to this SOP. */
34
+ riskTier: RiskLevel;
35
+ /** Task complexity tier for routing. */
36
+ complexityTier: ComplexityTier;
37
+ /** Whether this SOP version is currently active. */
38
+ isActive: boolean;
39
+ /** Current lifecycle state. */
40
+ lifecycleState: SopLifecycleState;
41
+ }
42
+ /**
43
+ * A proof tree produced by the SSL bottom-up synthesis pipeline.
44
+ *
45
+ * Proof trees capture the formal verification structure of an SOP,
46
+ * including the synthesis score (Family B metric) that measures
47
+ * how well the SOP has been validated against real-world execution traces.
48
+ *
49
+ * HLD §3.4 — SSL Skill Graph, Family B synthesis metrics
50
+ */
51
+ export interface SopProofTree {
52
+ /** Unique tree identifier — `newId('pt')`. */
53
+ treeId: string;
54
+ /** SOP this proof tree belongs to — FK to `sop_registry`. */
55
+ sopId: string;
56
+ /** Monotonically increasing version number. */
57
+ version: number;
58
+ /** The proof tree structure (JSON). */
59
+ treeJson: Record<string, unknown>;
60
+ /** Bottom-up synthesis score (0.0–1.0). */
61
+ synthesisScore: number;
62
+ }
63
+ /**
64
+ * Audit record for a SOP lifecycle state transition.
65
+ *
66
+ * Every transition through the 7-state FSM is logged in the
67
+ * `sop_lifecycle_transitions` table for governance auditability.
68
+ *
69
+ * @see HLD §3.4 — SOP Lifecycle FSM
70
+ */
71
+ export interface SopLifecycleTransition {
72
+ /** Unique transition identifier — `newId('lt')`. */
73
+ transitionId: string;
74
+ /** SOP that transitioned — FK to `sop_registry`. */
75
+ sopId: string;
76
+ /** Workspace scope — FK to `workspaces`. */
77
+ workspaceId: string;
78
+ /** State before the transition. */
79
+ fromState: SopLifecycleState;
80
+ /** State after the transition. */
81
+ toState: SopLifecycleState;
82
+ /** How the change affects the prior version (anti-gaming gate). */
83
+ changeClassification?: ChangeClassification;
84
+ /** User or system actor who triggered the transition. */
85
+ actorId: string;
86
+ /** Explanation for the transition (required for WEAKEN). */
87
+ rationale?: string;
88
+ /** Anti-gaming gate evaluation result. */
89
+ antiGamingResult?: {
90
+ gatePassed: boolean;
91
+ classificationConfidence: number;
92
+ reviewRequired: boolean;
93
+ };
94
+ /** When the transition occurred. */
95
+ createdAt: string;
96
+ }
97
+ /**
98
+ * Aggregated health metrics snapshot for a SOP.
99
+ *
100
+ * Computed by `sopHealthService.computeHealthMetrics()` and cached
101
+ * in Valkey at `v2:sop:health:{sop_id}` with a 5-minute TTL.
102
+ *
103
+ * @see HLD §3.4 — SOP Health Dashboard
104
+ */
105
+ export interface SopHealthMetrics {
106
+ /** SOP identifier. */
107
+ sopId: string;
108
+ /** Workspace identifier. */
109
+ workspaceId: string;
110
+ /** Last time this SOP was matched by an execution trace. */
111
+ lastMatchAt: string | null;
112
+ /** Last time this SOP was edited. */
113
+ lastEditAt: string | null;
114
+ /** Number of matches in the last 30 days. */
115
+ matchCount30d: number;
116
+ /** Average compliance score across recent traces (0.0–1.0). */
117
+ avgCompliance: number;
118
+ /** Number of behavioral drift events detected. */
119
+ driftEventCount: number;
120
+ /** Total accumulated cost in USD attributed to this SOP. */
121
+ totalCostUsd: number;
122
+ /** Whether this SOP is stale (no matches in SOP_STALENESS_DAYS). */
123
+ isStale: boolean;
124
+ }
125
+ /**
126
+ * A queued item in the Dream Cycle processing pipeline.
127
+ *
128
+ * Items originate from capability misses (LLD #5), decision mining
129
+ * entries, or drift signals. Phase 1: queue management only.
130
+ * Phase 3: LLM synthesis consumes the queue.
131
+ *
132
+ * @see HLD §3.4.6 — Dream Cycle
133
+ */
134
+ export interface DreamCycleQueueItem {
135
+ /** Unique queue item identifier — `newId('dq')`. */
136
+ queueItemId: string;
137
+ /** Workspace scope — FK to `workspaces`. */
138
+ workspaceId: string;
139
+ /** Origin of the queue item. */
140
+ sourceType: 'CAPABILITY_MISS' | 'DECISION_MINING' | 'DRIFT_SIGNAL';
141
+ /** Source entity ID (FK to originating table). */
142
+ sourceId: string;
143
+ /** Priority (lower = higher priority). Default: 100. */
144
+ priority: number;
145
+ /** Queue item status. */
146
+ status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
147
+ /** Resulting SOP ID (populated on COMPLETED). */
148
+ resultSopId?: string;
149
+ /** Error message (populated on FAILED). */
150
+ errorMessage?: string;
151
+ /** When the item was enqueued. */
152
+ enqueuedAt: string;
153
+ /** When processing started. */
154
+ startedAt?: string;
155
+ /** When processing completed or failed. */
156
+ completedAt?: string;
157
+ }
158
+ /**
159
+ * Input for enqueuing a Dream Cycle item.
160
+ *
161
+ * @see HLD §3.4.6 — Dream Cycle
162
+ */
163
+ export interface DreamCycleEnqueueInput {
164
+ /** Workspace to enqueue in. */
165
+ workspaceId: string;
166
+ /** Origin of the queue item. */
167
+ sourceType: 'CAPABILITY_MISS' | 'DECISION_MINING' | 'DRIFT_SIGNAL';
168
+ /** Source entity ID. */
169
+ sourceId: string;
170
+ /** Priority override. Default: 100. */
171
+ priority?: number;
172
+ }
173
+ /**
174
+ * Result of a Gödel completeness probe evaluation.
175
+ *
176
+ * Evaluates a SOP against the 13-category quality rubric (HLD §3.7).
177
+ * Distinct from the 12-category runtime anomaly taxonomy (LLD #5).
178
+ *
179
+ * @see HLD §3.7 — Gödel Completeness Probe
180
+ */
181
+ export interface GodelProbeResult {
182
+ /** Unique result identifier — `newId('gp')`. */
183
+ resultId: string;
184
+ /** SOP that was evaluated. */
185
+ sopId: string;
186
+ /** Workspace scope. */
187
+ workspaceId: string;
188
+ /** Weighted aggregate score (0.0–1.0). */
189
+ aggregateScore: number;
190
+ /** Per-category scores (13 categories). */
191
+ categoryScores: Record<string, number>;
192
+ /** Probe version used for evaluation. */
193
+ probeVersion: string;
194
+ /** When the evaluation was performed. */
195
+ evaluatedAt: string;
196
+ }
197
+ /**
198
+ * Partial content update for forking a new SOP version.
199
+ *
200
+ * @see HLD §3.4.8 — Version chain
201
+ */
202
+ export interface SopContentUpdate {
203
+ /** Updated title. */
204
+ title?: string;
205
+ /** Updated markdown content. */
206
+ markdownContent?: string;
207
+ /** Updated risk tier. */
208
+ riskTier?: RiskLevel;
209
+ /** Updated complexity tier. */
210
+ complexityTier?: ComplexityTier;
211
+ }
212
+ /**
213
+ * Result of a lifecycle state transition attempt.
214
+ */
215
+ export interface SopLifecycleTransitionResult {
216
+ /** Whether the transition succeeded. */
217
+ success: boolean;
218
+ /** SOP that was (or was not) transitioned. */
219
+ sopId: string;
220
+ /** State before the transition. */
221
+ fromState: SopLifecycleState;
222
+ /** Requested target state. */
223
+ toState: SopLifecycleState;
224
+ /** Reason for failure (undefined on success). */
225
+ reason?: string;
226
+ }
227
+ /**
228
+ * The 10 valid lifecycle transitions in the 7-state FSM.
229
+ *
230
+ * @see HLD §3.4 — SOP Lifecycle
231
+ */
232
+ export declare const VALID_SOP_TRANSITIONS: ReadonlyArray<{
233
+ from: SopLifecycleState;
234
+ to: SopLifecycleState;
235
+ description: string;
236
+ }>;
237
+ /**
238
+ * Maps lifecycle state to enforcement mode.
239
+ */
240
+ export declare const ENFORCEMENT_BY_STATE: Record<SopLifecycleState, 'NONE' | 'SHADOW' | 'ACTIVE'>;
241
+ /** Edge types in the SOP dependency graph. */
242
+ export type SopEdgeType = 'DEPENDS_ON' | 'DERIVES_FROM' | 'VALIDATES';
243
+ /** An edge in the SOP dependency graph. */
244
+ export interface SopGraphEdge {
245
+ fromId: string;
246
+ toId: string;
247
+ edgeType: SopEdgeType;
248
+ metadata?: Record<string, unknown>;
249
+ }
250
+ /** Preview of cascade invalidation impact (read-only). */
251
+ export interface CascadeImpactResult {
252
+ rootSopId: string;
253
+ affectedSopIds: string[];
254
+ affectedCount: number;
255
+ depth: number;
256
+ }
257
+ /** Result of an executed cascade invalidation. */
258
+ export interface CascadeInvalidationResult {
259
+ rootSopId: string;
260
+ invalidatedSopIds: string[];
261
+ invalidatedCount: number;
262
+ depth: number;
263
+ }
264
+ /** Result of anti-gaming analysis on a SOP change. */
265
+ export interface AntiGamingResult {
266
+ changeClassification: ChangeClassification;
267
+ requiresElevatedApproval: boolean;
268
+ impactSummary: string;
269
+ }
270
+ /** Deviation types during plan execution. */
271
+ export type DeviationType = 'TOOL_SUBSTITUTION' | 'STEP_SKIP' | 'STEP_REORDER' | 'EXTRA_STEP' | 'PARAMETER_DRIFT';
272
+ /** A single deviation from a stored plan. */
273
+ export interface PlanDeviation {
274
+ stepIndex: number;
275
+ deviationType: DeviationType;
276
+ expectedTool?: string;
277
+ actualTool?: string;
278
+ details?: string;
279
+ }
280
+ /** Adherence score for a stored plan. */
281
+ export interface PlanAdherenceScore {
282
+ planId: string;
283
+ totalSteps: number;
284
+ completedSteps: number;
285
+ deviationCount: number;
286
+ adherencePercent: number;
287
+ }
288
+ /** A stored plan artifact. */
289
+ export interface StoredPlan {
290
+ planId: string;
291
+ workspaceId: string;
292
+ sopId: string | null;
293
+ createdBy: string;
294
+ approvedBy: string | null;
295
+ approvalTimestamp: string | null;
296
+ harnessType: string;
297
+ lifecycleState: string;
298
+ steps: Record<string, unknown>[];
299
+ executionOutcome: string | null;
300
+ deviationLog: PlanDeviation[];
301
+ approvalRationale: string | null;
302
+ }
303
+ /** Recommendation types from decision mining analysis. */
304
+ export type DecisionRecommendation = 'THRESHOLD_RELAXATION' | 'AUTO_KILL_UPGRADE' | 'SOP_REFINEMENT' | 'NO_ACTION';
305
+ /** Aggregated decision mining analysis. */
306
+ export interface DecisionMiningAnalysis {
307
+ sopId: string | null;
308
+ totalDecisions: number;
309
+ approvedRate: number;
310
+ rejectedRate: number;
311
+ recommendation: DecisionRecommendation;
312
+ }
313
+ /** Gate result from Gödel scoring. */
314
+ export type GodelGateResult = 'BLOCKED' | 'PENDING_REVIEW' | 'GENERATED';
315
+ /** Score result from the 13-category Gödel rubric. */
316
+ export interface GodelScore {
317
+ totalScore: number;
318
+ categories: Record<string, number>;
319
+ gateResult: GodelGateResult;
320
+ }
321
+ /** Diff between two proof tree versions. */
322
+ export interface ProofTreeDiff {
323
+ fromVersion: number;
324
+ toVersion: number;
325
+ addedNodes: string[];
326
+ removedNodes: string[];
327
+ modifiedNodes: string[];
328
+ }
329
+ //# sourceMappingURL=sop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sop.d.ts","sourceRoot":"","sources":["../src/sop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,SAAS,EACT,iBAAiB,EAClB,MAAM,YAAY,CAAA;AAInB;;;;;;;;GAQG;AACH,MAAM,WAAW,GAAG;IAClB,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;IAEb,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAA;IAEnB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IAEb,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAA;IAEf,+DAA+D;IAC/D,eAAe,EAAE,MAAM,CAAA;IAEvB,+CAA+C;IAC/C,QAAQ,EAAE,SAAS,CAAA;IAEnB,wCAAwC;IACxC,cAAc,EAAE,cAAc,CAAA;IAE9B,oDAAoD;IACpD,QAAQ,EAAE,OAAO,CAAA;IAEjB,+BAA+B;IAC/B,cAAc,EAAE,iBAAiB,CAAA;CAClC;AAID;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAA;IAEd,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAA;IAEb,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAA;IAEf,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEjC,2CAA2C;IAC3C,cAAc,EAAE,MAAM,CAAA;CACvB;AAID;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,oDAAoD;IACpD,YAAY,EAAE,M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