@intutic/shared-types 1.0.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.
Files changed (131) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +56 -0
  3. package/dist/agentPool.d.ts +40 -0
  4. package/dist/agentPool.d.ts.map +1 -0
  5. package/dist/agentPool.js +3 -0
  6. package/dist/agentPool.js.map +1 -0
  7. package/dist/annotation.d.ts +150 -0
  8. package/dist/annotation.d.ts.map +1 -0
  9. package/dist/annotation.js +6 -0
  10. package/dist/annotation.js.map +1 -0
  11. package/dist/anomaly.d.ts +227 -0
  12. package/dist/anomaly.d.ts.map +1 -0
  13. package/dist/anomaly.js +35 -0
  14. package/dist/anomaly.js.map +1 -0
  15. package/dist/api-contracts.d.ts +176 -0
  16. package/dist/api-contracts.d.ts.map +1 -0
  17. package/dist/api-contracts.js +110 -0
  18. package/dist/api-contracts.js.map +1 -0
  19. package/dist/attenuation.d.ts +115 -0
  20. package/dist/attenuation.d.ts.map +1 -0
  21. package/dist/attenuation.js +26 -0
  22. package/dist/attenuation.js.map +1 -0
  23. package/dist/auth.d.ts +340 -0
  24. package/dist/auth.d.ts.map +1 -0
  25. package/dist/auth.js +87 -0
  26. package/dist/auth.js.map +1 -0
  27. package/dist/benchmark.d.ts +76 -0
  28. package/dist/benchmark.d.ts.map +1 -0
  29. package/dist/benchmark.js +8 -0
  30. package/dist/benchmark.js.map +1 -0
  31. package/dist/billing.d.ts +173 -0
  32. package/dist/billing.d.ts.map +1 -0
  33. package/dist/billing.js +28 -0
  34. package/dist/billing.js.map +1 -0
  35. package/dist/cdc.d.ts +73 -0
  36. package/dist/cdc.d.ts.map +1 -0
  37. package/dist/cdc.js +13 -0
  38. package/dist/cdc.js.map +1 -0
  39. package/dist/cfo.d.ts +66 -0
  40. package/dist/cfo.d.ts.map +1 -0
  41. package/dist/cfo.js +3 -0
  42. package/dist/cfo.js.map +1 -0
  43. package/dist/connectors.d.ts +23 -0
  44. package/dist/connectors.d.ts.map +1 -0
  45. package/dist/connectors.js +6 -0
  46. package/dist/connectors.js.map +1 -0
  47. package/dist/enums.d.ts +238 -0
  48. package/dist/enums.d.ts.map +1 -0
  49. package/dist/enums.js +243 -0
  50. package/dist/enums.js.map +1 -0
  51. package/dist/errors.d.ts +122 -0
  52. package/dist/errors.d.ts.map +1 -0
  53. package/dist/errors.js +135 -0
  54. package/dist/errors.js.map +1 -0
  55. package/dist/evaluator.d.ts +70 -0
  56. package/dist/evaluator.d.ts.map +1 -0
  57. package/dist/evaluator.js +8 -0
  58. package/dist/evaluator.js.map +1 -0
  59. package/dist/finops.d.ts +185 -0
  60. package/dist/finops.d.ts.map +1 -0
  61. package/dist/finops.js +14 -0
  62. package/dist/finops.js.map +1 -0
  63. package/dist/hindsight.d.ts +49 -0
  64. package/dist/hindsight.d.ts.map +1 -0
  65. package/dist/hindsight.js +3 -0
  66. package/dist/hindsight.js.map +1 -0
  67. package/dist/identity.d.ts +101 -0
  68. package/dist/identity.d.ts.map +1 -0
  69. package/dist/identity.js +29 -0
  70. package/dist/identity.js.map +1 -0
  71. package/dist/index.d.ts +40 -0
  72. package/dist/index.d.ts.map +1 -0
  73. package/dist/index.js +120 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/intelligence.d.ts +325 -0
  76. package/dist/intelligence.d.ts.map +1 -0
  77. package/dist/intelligence.js +28 -0
  78. package/dist/intelligence.js.map +1 -0
  79. package/dist/marketplace.d.ts +76 -0
  80. package/dist/marketplace.d.ts.map +1 -0
  81. package/dist/marketplace.js +16 -0
  82. package/dist/marketplace.js.map +1 -0
  83. package/dist/notifications.d.ts +206 -0
  84. package/dist/notifications.d.ts.map +1 -0
  85. package/dist/notifications.js +6 -0
  86. package/dist/notifications.js.map +1 -0
  87. package/dist/observability.d.ts +45 -0
  88. package/dist/observability.d.ts.map +1 -0
  89. package/dist/observability.js +10 -0
  90. package/dist/observability.js.map +1 -0
  91. package/dist/policy.d.ts +104 -0
  92. package/dist/policy.d.ts.map +1 -0
  93. package/dist/policy.js +14 -0
  94. package/dist/policy.js.map +1 -0
  95. package/dist/prompt.d.ts +99 -0
  96. package/dist/prompt.d.ts.map +1 -0
  97. package/dist/prompt.js +3 -0
  98. package/dist/prompt.js.map +1 -0
  99. package/dist/session.d.ts +62 -0
  100. package/dist/session.d.ts.map +1 -0
  101. package/dist/session.js +14 -0
  102. package/dist/session.js.map +1 -0
  103. package/dist/sop.d.ts +387 -0
  104. package/dist/sop.d.ts.map +1 -0
  105. package/dist/sop.js +44 -0
  106. package/dist/sop.js.map +1 -0
  107. package/dist/sync.d.ts +374 -0
  108. package/dist/sync.d.ts.map +1 -0
  109. package/dist/sync.js +56 -0
  110. package/dist/sync.js.map +1 -0
  111. package/dist/taskManagement.d.ts +141 -0
  112. package/dist/taskManagement.d.ts.map +1 -0
  113. package/dist/taskManagement.js +14 -0
  114. package/dist/taskManagement.js.map +1 -0
  115. package/dist/trial.d.ts +34 -0
  116. package/dist/trial.d.ts.map +1 -0
  117. package/dist/trial.js +6 -0
  118. package/dist/trial.js.map +1 -0
  119. package/dist/usage.d.ts +34 -0
  120. package/dist/usage.d.ts.map +1 -0
  121. package/dist/usage.js +6 -0
  122. package/dist/usage.js.map +1 -0
  123. package/dist/warehouse.d.ts +49 -0
  124. package/dist/warehouse.d.ts.map +1 -0
  125. package/dist/warehouse.js +8 -0
  126. package/dist/warehouse.js.map +1 -0
  127. package/dist/workspaceSettings.d.ts +116 -0
  128. package/dist/workspaceSettings.d.ts.map +1 -0
  129. package/dist/workspaceSettings.js +50 -0
  130. package/dist/workspaceSettings.js.map +1 -0
  131. package/package.json +24 -0
@@ -0,0 +1,173 @@
1
+ /**
2
+ * Monetization & Financial Ledger types — LLD #20
3
+ *
4
+ * Stripe Metered Billing, FinOps Chargeback GL Export,
5
+ * and usage-based overage enforcement.
6
+ *
7
+ * HLD §3.19 (4D Attribution, Showback/Chargeback), §3.23 (PLG/Billing)
8
+ *
9
+ * @module
10
+ */
11
+ import { z } from 'zod';
12
+ /**
13
+ * Status of a Stripe metered usage event report.
14
+ * - PENDING: inserted, Stripe call not yet made
15
+ * - REPORTED: Stripe accepted the event (stripe_meter_id populated)
16
+ * - FAILED: Stripe call failed (retried by reconciliation cron)
17
+ */
18
+ export type MeteredEventStatus = 'PENDING' | 'REPORTED' | 'FAILED';
19
+ /**
20
+ * A metered usage event row in the billing retry buffer.
21
+ * One row per proxied LLM API call for metered workspaces.
22
+ */
23
+ export interface MeteredUsageEvent {
24
+ /** Unique event ID — `newId('mue')` */
25
+ eventId: string;
26
+ /** Workspace scope */
27
+ workspaceId: string;
28
+ /** FK to execution_traces (nullable — set null on trace deletion) */
29
+ traceId: string | null;
30
+ /** Stripe meterEvent.id on successful report */
31
+ stripeMeterId: string | null;
32
+ /** Total tokens consumed in this call */
33
+ tokensUsed: number;
34
+ /** Calculated cost for this call (USD) */
35
+ costUsd: number;
36
+ /** When the event was inserted */
37
+ reportedAt: string;
38
+ /** Current processing status */
39
+ status: MeteredEventStatus;
40
+ /** Retry attempt count (max 5) */
41
+ retryCount: number;
42
+ /** Last error message (only set on FAILED) */
43
+ lastError: string | null;
44
+ }
45
+ /**
46
+ * Result from reconcileFailedEvents cron.
47
+ */
48
+ export interface ReconcileResult {
49
+ /** Total FAILED rows attempted */
50
+ retried: number;
51
+ /** Rows successfully reported to Stripe this run */
52
+ succeeded: number;
53
+ /** Rows still FAILED after this run */
54
+ stillFailed: number;
55
+ }
56
+ /**
57
+ * Department → GL cost center code mapping.
58
+ * Enterprise tier — maps FinOps attribution dimensions to ERP/SAP GL codes.
59
+ * HLD §3.19 — Chargeback mode.
60
+ */
61
+ export interface ChargebackGlMapping {
62
+ /** Unique mapping ID — `newId('cgl')` */
63
+ mappingId: string;
64
+ /** Workspace scope */
65
+ workspaceId: string;
66
+ /** FK to departments.department_id */
67
+ departmentId: string;
68
+ /** GL cost center code (e.g., 'CC-4200', 'ENG-PLATFORM') */
69
+ glCode: string;
70
+ /** Human-readable cost center label */
71
+ costCenter: string | null;
72
+ createdAt: string;
73
+ updatedAt: string;
74
+ }
75
+ /**
76
+ * Chargeback GL mapping with joined department name (for API responses).
77
+ */
78
+ export interface ChargebackGlMappingRow extends ChargebackGlMapping {
79
+ /** Department name (joined from departments table) */
80
+ departmentName: string;
81
+ }
82
+ /**
83
+ * A single row in a chargeback export report.
84
+ * Matched = has a GL code mapping; unmatched = no mapping defined.
85
+ */
86
+ export interface ChargebackExportRow {
87
+ departmentId: string;
88
+ departmentName: string;
89
+ /** Null if unmatched (no GL mapping defined for this department) */
90
+ glCode: string | null;
91
+ costCenter: string | null;
92
+ /** Total AI spend for this department in the period (USD) */
93
+ totalCostUsd: number;
94
+ /** Per-model cost breakdown: { 'claude-4': 12.40, 'gpt-4o': 3.20 } */
95
+ modelBreakdown: Record<string, number>;
96
+ /** Ratio of wasted tokens (0.0–1.0) */
97
+ wasteRatio: number;
98
+ /** true = GL code found; false = flagged for Finance review */
99
+ matched: boolean;
100
+ }
101
+ /**
102
+ * Full chargeback report (JSON format response).
103
+ * HLD §3.19 — GL Code Mapping Data Model.
104
+ */
105
+ export interface ChargebackReport {
106
+ period: {
107
+ from: string;
108
+ to: string;
109
+ };
110
+ generatedAt: string;
111
+ rows: ChargebackExportRow[];
112
+ summary: {
113
+ totalCostUsd: number;
114
+ matchedCostUsd: number;
115
+ unmatchedCostUsd: number;
116
+ departments: number;
117
+ };
118
+ }
119
+ /** Zod schema for GL mapping upsert input. */
120
+ export declare const UpsertGlMappingInputSchema: z.ZodObject<{
121
+ departmentId: z.ZodString;
122
+ glCode: z.ZodString;
123
+ costCenter: z.ZodOptional<z.ZodString>;
124
+ }, "strip", z.ZodTypeAny, {
125
+ departmentId: string;
126
+ glCode: string;
127
+ costCenter?: string | undefined;
128
+ }, {
129
+ departmentId: string;
130
+ glCode: string;
131
+ costCenter?: string | undefined;
132
+ }>;
133
+ export type UpsertGlMappingInput = z.infer<typeof UpsertGlMappingInputSchema>;
134
+ /**
135
+ * Current period metered usage summary for a workspace.
136
+ * Returned by GET /api/v1/billing/usage/current.
137
+ */
138
+ export interface BillingUsageSummary {
139
+ workspaceId: string;
140
+ /** Period start (ISO-8601) */
141
+ periodStart: string;
142
+ /** Period end (ISO-8601) */
143
+ periodEnd: string;
144
+ /** Total tokens consumed in the period */
145
+ tokensUsed: number;
146
+ /** Plan-included token volume */
147
+ tokensIncluded: number;
148
+ /** Tokens exceeding the included volume (max(0, used - included)) */
149
+ overageTokens: number;
150
+ /** Estimated overage charge (USD) */
151
+ estimatedOverageUsd: number;
152
+ /** True when budget:hard_block:{wid} Valkey key is set */
153
+ hardCapActive: boolean;
154
+ }
155
+ /** Chargeback export query params schema. */
156
+ export declare const ChargebackExportQuerySchema: z.ZodObject<{
157
+ period: z.ZodDefault<z.ZodEnum<["month", "quarter", "custom"]>>;
158
+ from: z.ZodOptional<z.ZodString>;
159
+ to: z.ZodOptional<z.ZodString>;
160
+ format: z.ZodDefault<z.ZodEnum<["csv", "json"]>>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ period: "custom" | "month" | "quarter";
163
+ format: "csv" | "json";
164
+ from?: string | undefined;
165
+ to?: string | undefined;
166
+ }, {
167
+ period?: "custom" | "month" | "quarter" | undefined;
168
+ from?: string | undefined;
169
+ to?: string | undefined;
170
+ format?: "csv" | "json" | undefined;
171
+ }>;
172
+ export type ChargebackExportQuery = z.infer<typeof ChargebackExportQuerySchema>;
173
+ //# sourceMappingURL=billing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../src/billing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAA;AAElE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAA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M,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * Monetization & Financial Ledger types — LLD #20
4
+ *
5
+ * Stripe Metered Billing, FinOps Chargeback GL Export,
6
+ * and usage-based overage enforcement.
7
+ *
8
+ * HLD §3.19 (4D Attribution, Showback/Chargeback), §3.23 (PLG/Billing)
9
+ *
10
+ * @module
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.ChargebackExportQuerySchema = exports.UpsertGlMappingInputSchema = void 0;
14
+ const zod_1 = require("zod");
15
+ /** Zod schema for GL mapping upsert input. */
16
+ exports.UpsertGlMappingInputSchema = zod_1.z.object({
17
+ departmentId: zod_1.z.string().min(1),
18
+ glCode: zod_1.z.string().min(1).max(64),
19
+ costCenter: zod_1.z.string().max(128).optional(),
20
+ });
21
+ /** Chargeback export query params schema. */
22
+ exports.ChargebackExportQuerySchema = zod_1.z.object({
23
+ period: zod_1.z.enum(['month', 'quarter', 'custom']).default('month'),
24
+ from: zod_1.z.string().datetime({ offset: true }).optional(),
25
+ to: zod_1.z.string().datetime({ offset: true }).optional(),
26
+ format: zod_1.z.enum(['csv', 'json']).default('csv'),
27
+ });
28
+ //# sourceMappingURL=billing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing.js","sourceRoot":"","sources":["../src/billing.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,6BAAuB;AAqHvB,8CAA8C;AACjC,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACjC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAA;AA2BF,6CAA6C;AAChC,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAC/D,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtD,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpD,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;CAC/C,CAAC,CAAA"}
package/dist/cdc.d.ts ADDED
@@ -0,0 +1,73 @@
1
+ /**
2
+ * CDC (Change Data Capture) Shared Types
3
+ *
4
+ * Types shared between the control plane CDC streamer, warehouse export,
5
+ * and SIEM webhook consumers.
6
+ *
7
+ * LLD #23 + LLD #53 (UPDATE/DELETE extension)
8
+ *
9
+ * @module
10
+ */
11
+ /** Supported database mutation types. */
12
+ export type CdcMutationType = 'INSERT' | 'UPDATE' | 'DELETE';
13
+ /** Tables monitored by the CDC pipeline. */
14
+ export type CdcSourceTable = 'execution_traces' | 'governance_incidents';
15
+ /**
16
+ * Normalized CDC event structure.
17
+ *
18
+ * Consumers should switch on `mutationType` rather than `operation`,
19
+ * which is retained only for backward compatibility with INSERT-only consumers.
20
+ */
21
+ export interface CdcEventPayload {
22
+ eventId: string;
23
+ sourceTable: CdcSourceTable;
24
+ workspaceId: string;
25
+ /** @deprecated Always 'INSERT' — use mutationType instead. */
26
+ operation: 'INSERT';
27
+ /** Discriminator for the type of database mutation. */
28
+ mutationType: CdcMutationType;
29
+ /** Current row values (INSERT/UPDATE: new values; DELETE: empty). */
30
+ payload: Record<string, unknown>;
31
+ /** Previous column values (UPDATE events only). */
32
+ oldValues?: Record<string, unknown>;
33
+ /** Snapshot of deleted row (DELETE events only). */
34
+ deletedValues?: Record<string, unknown>;
35
+ /** Column names that changed (UPDATE events only). */
36
+ changedColumns?: string[];
37
+ /** WAL timestamp of the original database transaction. */
38
+ walTimestamp: string;
39
+ /** Timestamp when the event was processed by the CDC streamer. */
40
+ streamedAt: string;
41
+ }
42
+ /**
43
+ * Debezium envelope structure from pgoutput logical replication.
44
+ *
45
+ * Debezium operation codes:
46
+ * - `c` = CREATE (INSERT)
47
+ * - `u` = UPDATE
48
+ * - `d` = DELETE
49
+ * - `r` = READ (snapshot) — skipped by the CDC pipeline
50
+ */
51
+ export interface DebeziumEnvelope {
52
+ before: Record<string, unknown> | null;
53
+ after: Record<string, unknown> | null;
54
+ source: {
55
+ table: string;
56
+ ts_ms: number;
57
+ schema?: string;
58
+ connector?: string;
59
+ };
60
+ op: 'c' | 'u' | 'd' | 'r';
61
+ ts_ms: number;
62
+ }
63
+ /**
64
+ * SIEM webhook payload structure.
65
+ * Sent as the JSON body to configured SIEM webhook destinations.
66
+ */
67
+ export interface CdcWebhookPayload {
68
+ events: CdcEventPayload[];
69
+ batchId: string;
70
+ batchSize: number;
71
+ streamedAt: string;
72
+ }
73
+ //# sourceMappingURL=cdc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdc.d.ts","sourceRoot":"","sources":["../src/cdc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,yCAAyC;AACzC,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE5D,4CAA4C;AAC5C,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,sBAAsB,CAAA;AAIxE;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MA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 * CDC (Change Data Capture) Shared Types
4
+ *
5
+ * Types shared between the control plane CDC streamer, warehouse export,
6
+ * and SIEM webhook consumers.
7
+ *
8
+ * LLD #23 + LLD #53 (UPDATE/DELETE extension)
9
+ *
10
+ * @module
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ //# sourceMappingURL=cdc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdc.js","sourceRoot":"","sources":["../src/cdc.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG"}
package/dist/cfo.d.ts ADDED
@@ -0,0 +1,66 @@
1
+ export interface AdoptionMetrics {
2
+ activeUsers: number;
3
+ provisionedUsers: number;
4
+ activeRate: number;
5
+ wowTrend: number;
6
+ idleUsers: {
7
+ memberId: string;
8
+ name: string;
9
+ email: string;
10
+ idleDays: number;
11
+ }[];
12
+ }
13
+ export interface RoiWorkflowCost {
14
+ workflowName: string;
15
+ costUsd: number;
16
+ executions: number;
17
+ }
18
+ export interface RoiProviderCost {
19
+ provider: string;
20
+ costUsd: number;
21
+ tokens: number;
22
+ }
23
+ export interface RoiSignals {
24
+ costPerWorkflow: RoiWorkflowCost[];
25
+ providerComparison: RoiProviderCost[];
26
+ wastePercentage: number;
27
+ savingsUsd: number;
28
+ }
29
+ export interface ForecastAlert {
30
+ alertId: string;
31
+ limitUsd: number;
32
+ spendUsd: number;
33
+ severity: string;
34
+ message: string;
35
+ triggeredAt: string;
36
+ }
37
+ export interface BudgetForecast {
38
+ forecasted30dSpend: number;
39
+ overBudgetAlerts: ForecastAlert[];
40
+ headroomSavingsUsd: number;
41
+ routeLlmSavingsUsd: number;
42
+ }
43
+ export interface ChargebackReconciliation {
44
+ reconciliationId: string;
45
+ workspaceId: string;
46
+ billingPeriod: string;
47
+ totalTrackedCost: string;
48
+ totalAllocatedCost: string;
49
+ reconciliationStatus: string;
50
+ reconciledBy?: string | null;
51
+ reconciledAt?: string | null;
52
+ notes?: string | null;
53
+ createdAt: string;
54
+ updatedAt: string;
55
+ }
56
+ export interface GlMapping {
57
+ mappingId: string;
58
+ workspaceId: string;
59
+ departmentId: string;
60
+ glCode: string;
61
+ costCenter?: string | null;
62
+ reconciliationStatus: string;
63
+ createdAt: string;
64
+ updatedAt: string;
65
+ }
66
+ //# sourceMappingURL=cfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cfo.d.ts","sourceRoot":"","sources":["../src/cfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,MAAM,CAAA;KACjB,EAAE,CAAA;CACJ;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,UAAU;IACzB,eAAe,EAAE,eAAe,EAAE,CAAA;IAClC,kBAAkB,EAAE,eAAe,EAAE,CAAA;IACrC,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,gBAAgB,EAAE,aAAa,EAAE,CAAA;IACjC,kBAAkB,EAAE,MAAM,CAAA;IAC1B,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,EAAE,MAAM,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;IACxB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB"}
package/dist/cfo.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=cfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cfo.js","sourceRoot":"","sources":["../src/cfo.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Source Connectors Types — Notion, Confluence, and GitHub pull sync models.
3
+ */
4
+ export interface SourceConnector {
5
+ connector_id: string;
6
+ provider: 'notion' | 'confluence' | 'github';
7
+ name: string;
8
+ config: Record<string, any>;
9
+ last_synced_at: string | null;
10
+ created_at: string;
11
+ }
12
+ export interface CreateConnectorInput {
13
+ provider: 'notion' | 'confluence' | 'github';
14
+ name: string;
15
+ config: Record<string, any>;
16
+ token: string;
17
+ }
18
+ export interface SyncConnectorResult {
19
+ success: boolean;
20
+ processed_docs: number;
21
+ updated_sops: string[];
22
+ }
23
+ //# sourceMappingURL=connectors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectors.d.ts","sourceRoot":"","sources":["../src/connectors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAA;IAC5C,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAA;IAC5C,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Source Connectors Types — Notion, Confluence, and GitHub pull sync models.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=connectors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectors.js","sourceRoot":"","sources":["../src/connectors.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -0,0 +1,238 @@
1
+ /**
2
+ * Domain enums for the Intutic governance platform.
3
+ *
4
+ * Each enum is defined as a frozen `as const` object with a corresponding
5
+ * TypeScript union type extracted via `typeof Obj[keyof typeof Obj]`.
6
+ * This pattern gives us runtime values (for comparisons, iteration) and
7
+ * compile-time narrowing without Drizzle or Postgres dependencies.
8
+ *
9
+ * These mirror the Postgres enum types defined in
10
+ * LLD 01-data-architecture §3.1.
11
+ *
12
+ * @module
13
+ */
14
+ /** Risk severity classification for SOPs, anomalies, and incidents. */
15
+ export declare const RiskLevel: {
16
+ readonly LOW: "LOW";
17
+ readonly MEDIUM: "MEDIUM";
18
+ readonly HIGH: "HIGH";
19
+ readonly CRITICAL: "CRITICAL";
20
+ };
21
+ /** Union of all risk level values. */
22
+ export type RiskLevel = typeof RiskLevel[keyof typeof RiskLevel];
23
+ /** PCAS enforcement action applied to a tool call. */
24
+ export declare const EnforcementAction: {
25
+ readonly BYPASS: "BYPASS";
26
+ readonly ENHANCE: "ENHANCE";
27
+ readonly HIJACK: "HIJACK";
28
+ readonly KILL: "KILL";
29
+ };
30
+ /** Union of all enforcement action values. */
31
+ export type EnforcementAction = typeof EnforcementAction[keyof typeof EnforcementAction];
32
+ /** Classification of whether a token expenditure was useful or wasted. */
33
+ export declare const TokenUtility: {
34
+ readonly USEFUL: "USEFUL";
35
+ readonly WASTED: "WASTED";
36
+ };
37
+ /** Union of all token utility values. */
38
+ export type TokenUtility = typeof TokenUtility[keyof typeof TokenUtility];
39
+ /** Budget authority level assigned to a user or agent session. */
40
+ export declare const BudgetTier: {
41
+ readonly JUNIOR: "JUNIOR";
42
+ readonly SENIOR: "SENIOR";
43
+ readonly STAFF: "STAFF";
44
+ readonly PRINCIPAL: "PRINCIPAL";
45
+ };
46
+ /** Union of all budget tier values. */
47
+ export type BudgetTier = typeof BudgetTier[keyof typeof BudgetTier];
48
+ /** Task complexity classification for model routing. */
49
+ export declare const ComplexityTier: {
50
+ readonly TIER_0: "TIER_0";
51
+ readonly TIER_1: "TIER_1";
52
+ readonly TIER_2: "TIER_2";
53
+ };
54
+ /** Union of all complexity tier values. */
55
+ export type ComplexityTier = typeof ComplexityTier[keyof typeof ComplexityTier];
56
+ /** Classification of how an SOP change affects the prior version. */
57
+ export declare const ChangeClassification: {
58
+ readonly STRENGTHEN: "STRENGTHEN";
59
+ readonly CLARIFY: "CLARIFY";
60
+ readonly NARROW: "NARROW";
61
+ readonly WEAKEN: "WEAKEN";
62
+ };
63
+ /** Union of all change classification values. */
64
+ export type ChangeClassification = typeof ChangeClassification[keyof typeof ChangeClassification];
65
+ /** Runtime anomaly classification taxonomy. */
66
+ export declare const AnomalyType: {
67
+ readonly TOOL_ABUSE: "TOOL_ABUSE";
68
+ readonly TOKEN_WASTE: "TOKEN_WASTE";
69
+ readonly LOOP_DETECTED: "LOOP_DETECTED";
70
+ readonly UNAUTHORIZED_TOOL: "UNAUTHORIZED_TOOL";
71
+ readonly DATA_EXFILTRATION: "DATA_EXFILTRATION";
72
+ readonly PROMPT_INJECTION: "PROMPT_INJECTION";
73
+ readonly HALLUCINATION: "HALLUCINATION";
74
+ readonly SCOPE_VIOLATION: "SCOPE_VIOLATION";
75
+ readonly BUDGET_BREACH: "BUDGET_BREACH";
76
+ readonly SPAWN_BUDGET_BREACH: "SPAWN_BUDGET_BREACH";
77
+ readonly WORKFLOW_BUDGET_BREACH: "WORKFLOW_BUDGET_BREACH";
78
+ readonly WORKFLOW_GOAL_DRIFT: "WORKFLOW_GOAL_DRIFT";
79
+ };
80
+ /** Union of all anomaly type values. */
81
+ export type AnomalyType = typeof AnomalyType[keyof typeof AnomalyType];
82
+ /** Supported AI agent harness/IDE integrations. */
83
+ export declare const HarnessType: {
84
+ readonly CURSOR: "cursor";
85
+ readonly CLAUDE_CODE: "claude-code";
86
+ readonly ANTIGRAVITY: "antigravity";
87
+ readonly N8N: "n8n";
88
+ readonly CODEX: "codex";
89
+ readonly WINDSURF: "windsurf";
90
+ readonly AIDER: "aider";
91
+ readonly OPENHANDS: "openhands";
92
+ readonly OPENCLAW: "openclaw";
93
+ readonly HERMES: "hermes";
94
+ readonly PI: "pi";
95
+ readonly CLINE: "cline";
96
+ readonly ROO_CODE: "roo-code";
97
+ readonly CONTINUE: "continue";
98
+ readonly CLAUDE_DESKTOP: "claude-desktop";
99
+ readonly GOOSE: "goose";
100
+ readonly OPEN_WEBUI: "open-webui";
101
+ readonly GITHUB_COPILOT: "github-copilot";
102
+ };
103
+ /** Union of all harness type values. */
104
+ export type HarnessType = typeof HarnessType[keyof typeof HarnessType];
105
+ /** Agent execution mode controlling autonomy level. */
106
+ export declare const ExecutionMode: {
107
+ readonly STANDARD: "STANDARD";
108
+ readonly PLAN_ONLY: "PLAN_ONLY";
109
+ readonly SHADOW: "SHADOW";
110
+ readonly AUTONOMOUS: "AUTONOMOUS";
111
+ };
112
+ /** Union of all execution mode values. */
113
+ export type ExecutionMode = typeof ExecutionMode[keyof typeof ExecutionMode];
114
+ /** Lifecycle state of a governance incident. */
115
+ export declare const IncidentStatus: {
116
+ readonly OPEN: "OPEN";
117
+ readonly ACKNOWLEDGED: "ACKNOWLEDGED";
118
+ readonly RESOLVED: "RESOLVED";
119
+ readonly FALSE_POSITIVE: "FALSE_POSITIVE";
120
+ };
121
+ /** Union of all incident status values. */
122
+ export type IncidentStatus = typeof IncidentStatus[keyof typeof IncidentStatus];
123
+ /** Lifecycle state for stored execution plans. */
124
+ export declare const PlanLifecycleState: {
125
+ readonly PENDING_APPROVAL: "PENDING_APPROVAL";
126
+ readonly APPROVED: "APPROVED";
127
+ readonly REJECTED: "REJECTED";
128
+ readonly EXECUTING: "EXECUTING";
129
+ readonly COMPLETED: "COMPLETED";
130
+ };
131
+ /** Union of all plan lifecycle state values. */
132
+ export type PlanLifecycleState = typeof PlanLifecycleState[keyof typeof PlanLifecycleState];
133
+ /** Lifecycle state for SOPs in the registry. */
134
+ export declare const SopLifecycleState: {
135
+ readonly DRAFT: "DRAFT";
136
+ readonly PENDING_REVIEW: "PENDING_REVIEW";
137
+ readonly GENERATED: "GENERATED";
138
+ readonly HYPOTHESIZED: "HYPOTHESIZED";
139
+ readonly REFINED: "REFINED";
140
+ readonly VALIDATED: "VALIDATED";
141
+ readonly INVALIDATED: "INVALIDATED";
142
+ };
143
+ /** Union of all SOP lifecycle state values. */
144
+ export type SopLifecycleState = typeof SopLifecycleState[keyof typeof SopLifecycleState];
145
+ /** SOP type: standard markdown or executable V8 hook. */
146
+ export declare const SopType: {
147
+ /** Standard SOP — markdown content enforced via SSL. */
148
+ readonly STANDARD: "standard";
149
+ /** Hook SOP — V8-executable script that fires at a pipeline phase. */
150
+ readonly HOOK: "hook";
151
+ };
152
+ /** Union of all SOP type values. */
153
+ export type SopType = typeof SopType[keyof typeof SopType];
154
+ /** Pipeline phase where a hook-type SOP fires. */
155
+ export declare const HookPhase: {
156
+ /** Before tool call evaluation. */
157
+ readonly PRE_TOOL: "PRE_TOOL";
158
+ /** After tool call evaluation. */
159
+ readonly POST_TOOL: "POST_TOOL";
160
+ /** Before forwarding to LLM provider. */
161
+ readonly PRE_RESPONSE: "PRE_RESPONSE";
162
+ /** After LLM response received. */
163
+ readonly POST_RESPONSE: "POST_RESPONSE";
164
+ };
165
+ /** Union of all hook phase values. */
166
+ export type HookPhase = typeof HookPhase[keyof typeof HookPhase];
167
+ /** Model routing tier for cost optimization. */
168
+ export declare const RoutingTier: {
169
+ readonly FRONTIER: "frontier";
170
+ readonly ECONOMY: "economy";
171
+ readonly LOCAL: "local";
172
+ };
173
+ /** Union of all routing tier values. */
174
+ export type RoutingTier = typeof RoutingTier[keyof typeof RoutingTier];
175
+ /** Workspace member role for RBAC. OWNER > ADMIN > EM > DEVELOPER > VIEWER. */
176
+ export declare const WorkspaceRole: {
177
+ readonly OWNER: "OWNER";
178
+ readonly ADMIN: "ADMIN";
179
+ readonly EM: "EM";
180
+ readonly DEVELOPER: "DEVELOPER";
181
+ readonly VIEWER: "VIEWER";
182
+ };
183
+ /** Union of all workspace role values. */
184
+ export type WorkspaceRole = typeof WorkspaceRole[keyof typeof WorkspaceRole];
185
+ /**
186
+ * MCP proxy fail behavior when the Intutic control plane is unreachable.
187
+ * - `open` (default): pass through the tool call + emit a warning event
188
+ * - `closed`: block the tool call with a user-visible error message
189
+ *
190
+ * Note: `closed` only affects harnesses with MCP proxy injection (13/17).
191
+ * For harnesses without proxy (n8n, pi, codex, open-webui), see TD-151.
192
+ */
193
+ export declare const McpProxyFailBehavior: {
194
+ readonly OPEN: "open";
195
+ readonly CLOSED: "closed";
196
+ };
197
+ export type McpProxyFailBehavior = typeof McpProxyFailBehavior[keyof typeof McpProxyFailBehavior];
198
+ /**
199
+ * MCP proxy deployment model.
200
+ * - `per-session` (default, Phase 4): new proxy process per MCP connection
201
+ * - `daemon` (Phase 5): long-lived daemon, per-session shims delegate via Unix socket
202
+ *
203
+ * See TD-153 — daemon requires macOS notarization. Per-session is the only active mode in Phase 4.
204
+ */
205
+ export declare const McpProxyMode: {
206
+ readonly PER_SESSION: "per-session";
207
+ readonly DAEMON: "daemon";
208
+ };
209
+ export type McpProxyMode = typeof McpProxyMode[keyof typeof McpProxyMode];
210
+ /**
211
+ * Bypass enforcement tier — how aggressively the sync-daemon defends harness configs
212
+ * against manual edits.
213
+ * - `rewrite` (default): drift watcher detects edits → immediate config rewrite (~1s)
214
+ * - `immutable` (opt-in): after each write, sets macOS `chflags uchg` (user-immutable flag)
215
+ * - `alert-only`: no rewrite; drift creates a governance incident only (audit mode)
216
+ *
217
+ * See TD-154 for immutable-flag UX risk notes.
218
+ */
219
+ export declare const BypassEnforcementTier: {
220
+ readonly REWRITE: "rewrite";
221
+ readonly IMMUTABLE: "immutable";
222
+ readonly ALERT_ONLY: "alert-only";
223
+ };
224
+ export type BypassEnforcementTier = typeof BypassEnforcementTier[keyof typeof BypassEnforcementTier];
225
+ /** TurboVec behavioral drift classification. @see HLD §7.7 */
226
+ export declare const DriftClassification: {
227
+ readonly POSITIVE_DRIFT: "POSITIVE_DRIFT";
228
+ readonly NEGATIVE_DRIFT: "NEGATIVE_DRIFT";
229
+ readonly NEUTRAL_DRIFT: "NEUTRAL_DRIFT";
230
+ };
231
+ export type DriftClassification = typeof DriftClassification[keyof typeof DriftClassification];
232
+ /** Drift detection mode — TurboVec cosine-distance or compliance-score fallback. */
233
+ export declare const DriftDetectionMode: {
234
+ readonly TURBOVEC: "turbovec";
235
+ readonly COMPLIANCE_SCORE_FALLBACK: "compliance_score_fallback";
236
+ };
237
+ export type DriftDetectionMode = typeof DriftDetectionMode[keyof typeof DriftDetectionMode];
238
+ //# sourceMappingURL=enums.d.ts.map