@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
package/dist/sync.d.ts ADDED
@@ -0,0 +1,374 @@
1
+ /**
2
+ * Sync Daemon & CLI Types — Shared across control plane + CLI + daemon.
3
+ *
4
+ * LLD #8 — Sync Daemon / CLI
5
+ * HLD §3.14 — Real-Time State Mirroring
6
+ *
7
+ * @module
8
+ */
9
+ import { z } from 'zod';
10
+ import { HarnessType } from './enums.js';
11
+ import type { WorkspaceSettings } from './workspaceSettings.js';
12
+ export type { HarnessType } from './enums.js';
13
+ /** A single SOP entry within a sync config push. */
14
+ export interface SyncSopEntry {
15
+ /** SOP registry ID. */
16
+ sopId: string;
17
+ /** Human-readable SOP title. */
18
+ title: string;
19
+ /** Full SOP content (markdown). Written to harness config files. */
20
+ content: string;
21
+ /** SHA-256 canonical hash from SOP registry. */
22
+ contentHash: string;
23
+ /** Which harness config files should receive this SOP. */
24
+ harnessTargets: HarnessType[];
25
+ /** SOP pointer comment for traceability (e.g., `<!-- sop://intutic/sop_abc | Title -->`). */
26
+ sopRef?: string;
27
+ }
28
+ /** Config push payload from control plane to sync daemon. */
29
+ export interface SyncConfigPayload {
30
+ /** Workspace this config belongs to. */
31
+ workspaceId: string;
32
+ /** Monotonic config version counter. Daemon skips if local >= remote. */
33
+ configVersion: number;
34
+ /** Active SOPs to write to harness config files. */
35
+ sops: SyncSopEntry[];
36
+ /** Proxy URL for LLM API redirect (e.g., `https://proxy.intutic.ai`). */
37
+ proxyUrl: string;
38
+ /**
39
+ * Resolved workspace governance settings.
40
+ * Always a complete WorkspaceSettings object (missing keys filled with defaults
41
+ * by the control plane before sending).
42
+ * WS-5 — Q1 fail behavior, Q2 proxy mode, Q3 bypass enforcement.
43
+ */
44
+ settings: WorkspaceSettings;
45
+ /** Applied SkillOpt config edits to write locally. */
46
+ appliedEdits?: any[];
47
+ }
48
+ /** Hash of a single local SOP config file. */
49
+ export interface SopFileHash {
50
+ /** File path relative to workspace root (e.g., `.cursorrules`). */
51
+ filePath: string;
52
+ /** SHA-256 hash of actual local file content. */
53
+ localHash: string;
54
+ /** Expected hash from last sync (canonical). */
55
+ canonicalHash: string;
56
+ /** Whether local diverges from canonical. */
57
+ drifted: boolean;
58
+ }
59
+ /** SOP hash integrity report sent by daemon to control plane. */
60
+ export interface SopHashReport {
61
+ /** Workspace ID. */
62
+ workspaceId: string;
63
+ /** Harness type that was scanned. */
64
+ harnessType: HarnessType;
65
+ /** File hashes for all synced config files. */
66
+ files: SopFileHash[];
67
+ /** ISO timestamp of report generation. */
68
+ reportedAt: string;
69
+ }
70
+ /** Detection status of a single harness in the workspace. */
71
+ export interface DetectedHarness {
72
+ /** Harness type. */
73
+ type: HarnessType;
74
+ /** Absolute path to the harness config file. */
75
+ configPath: string;
76
+ /** Whether the harness was auto-detected. */
77
+ detected: boolean;
78
+ /** ISO timestamp of last config file write (null if never written). */
79
+ lastWriteAt: string | null;
80
+ }
81
+ /** Daemon heartbeat status payload. */
82
+ export interface DaemonStatus {
83
+ /** Workspace ID. */
84
+ workspaceId: string;
85
+ /** Current local config version. */
86
+ configVersion: number;
87
+ /** ISO timestamp when daemon connected. */
88
+ connectedSince: string;
89
+ /** ISO timestamp of last successful sync. */
90
+ lastSyncAt: string;
91
+ /** Detected harnesses in the workspace. */
92
+ harnesses: DetectedHarness[];
93
+ /** List of running agent processes polled on the local system. */
94
+ activeProcesses?: string[];
95
+ /** Local managed components health status. */
96
+ components?: {
97
+ proxy: 'healthy' | 'unhealthy' | 'stopped';
98
+ valkey: 'healthy' | 'unhealthy' | 'stopped';
99
+ sslTrust: 'trusted' | 'untrusted';
100
+ };
101
+ }
102
+ /** Credentials stored at ~/.intutic/credentials.json. */
103
+ export interface IntuticCredentials {
104
+ /** API key (vk_*) or JWT access token. */
105
+ apiKey: string;
106
+ /** Workspace ID. */
107
+ workspaceId: string;
108
+ /** Control plane URL. */
109
+ controlPlaneUrl: string;
110
+ /** Member email (for display). */
111
+ email: string;
112
+ /** ISO timestamp when credentials were stored. */
113
+ storedAt: string;
114
+ }
115
+ /** Workspace config stored at ~/.intutic/config.json. */
116
+ export interface IntuticConfig {
117
+ /** Workspace root directory (absolute path). */
118
+ workspaceRoot: string;
119
+ /** Detected harnesses. */
120
+ harnesses: HarnessType[];
121
+ /** Current config version from last sync. */
122
+ configVersion: number;
123
+ /** Whether dev mode is active (local control plane). */
124
+ devMode: boolean;
125
+ /** Local daily spending cap limit in USD. */
126
+ maxDailyBudgetUsd?: number;
127
+ /** Local daily spending cap limit in USD (alias). */
128
+ max_daily_budget_usd?: number;
129
+ }
130
+ /** Local integrity store at .intutic/integrity.json (per-workspace). */
131
+ export interface IntegrityStore {
132
+ /** Last sync timestamp. */
133
+ lastSyncAt: string;
134
+ /** Config version at last sync. */
135
+ configVersion: number;
136
+ /** Canonical hashes of synced files. */
137
+ files: Record<string, string>;
138
+ }
139
+ /** A single harness config file captured by the daemon. */
140
+ export interface CapturedConfigFile {
141
+ /** Relative file path (e.g., `.cursorrules`, `CLAUDE.md`). */
142
+ path: string;
143
+ /** Full file content. */
144
+ content: string;
145
+ /** SHA-256 hash of content. */
146
+ contentHash: string;
147
+ }
148
+ /** Payload sent by daemon to capture harness config snapshots (multi-file). */
149
+ export interface BatchConfigCapturePayload {
150
+ /** Workspace ID. */
151
+ workspaceId: string;
152
+ /** Harness type the config belongs to. */
153
+ harnessType: HarnessType;
154
+ /** Captured config files. */
155
+ files: CapturedConfigFile[];
156
+ }
157
+ /** Structured diff between two config snapshots. */
158
+ export interface ConfigDiff {
159
+ /** Lines added. */
160
+ addedLines: number;
161
+ /** Lines removed. */
162
+ removedLines: number;
163
+ /** Summary of changes. */
164
+ summary: string;
165
+ /** Previous content (null if first snapshot). */
166
+ previousContent: string | null;
167
+ /** Current content. */
168
+ currentContent: string;
169
+ }
170
+ /** Zod schema for SOP hash report (daemon → control plane). */
171
+ export declare const SopHashReportSchema: z.ZodObject<{
172
+ workspaceId: z.ZodString;
173
+ harnessType: z.ZodNativeEnum<{
174
+ readonly CURSOR: "cursor";
175
+ readonly CLAUDE_CODE: "claude-code";
176
+ readonly ANTIGRAVITY: "antigravity";
177
+ readonly N8N: "n8n";
178
+ readonly CODEX: "codex";
179
+ readonly WINDSURF: "windsurf";
180
+ readonly AIDER: "aider";
181
+ readonly OPENHANDS: "openhands";
182
+ readonly OPENCLAW: "openclaw";
183
+ readonly HERMES: "hermes";
184
+ readonly PI: "pi";
185
+ readonly CLINE: "cline";
186
+ readonly ROO_CODE: "roo-code";
187
+ readonly CONTINUE: "continue";
188
+ readonly CLAUDE_DESKTOP: "claude-desktop";
189
+ readonly GOOSE: "goose";
190
+ readonly OPEN_WEBUI: "open-webui";
191
+ readonly GITHUB_COPILOT: "github-copilot";
192
+ }>;
193
+ files: z.ZodArray<z.ZodObject<{
194
+ filePath: z.ZodString;
195
+ localHash: z.ZodString;
196
+ canonicalHash: z.ZodString;
197
+ drifted: z.ZodBoolean;
198
+ }, "strip", z.ZodTypeAny, {
199
+ filePath: string;
200
+ localHash: string;
201
+ canonicalHash: string;
202
+ drifted: boolean;
203
+ }, {
204
+ filePath: string;
205
+ localHash: string;
206
+ canonicalHash: string;
207
+ drifted: boolean;
208
+ }>, "many">;
209
+ reportedAt: z.ZodString;
210
+ }, "strip", z.ZodTypeAny, {
211
+ workspaceId: string;
212
+ harnessType: "cursor" | "claude-code" | "antigravity" | "n8n" | "codex" | "windsurf" | "aider" | "openhands" | "openclaw" | "hermes" | "pi" | "cline" | "roo-code" | "continue" | "claude-desktop" | "goose" | "open-webui" | "github-copilot";
213
+ files: {
214
+ filePath: string;
215
+ localHash: string;
216
+ canonicalHash: string;
217
+ drifted: boolean;
218
+ }[];
219
+ reportedAt: string;
220
+ }, {
221
+ workspaceId: string;
222
+ harnessType: "cursor" | "claude-code" | "antigravity" | "n8n" | "codex" | "windsurf" | "aider" | "openhands" | "openclaw" | "hermes" | "pi" | "cline" | "roo-code" | "continue" | "claude-desktop" | "goose" | "open-webui" | "github-copilot";
223
+ files: {
224
+ filePath: string;
225
+ localHash: string;
226
+ canonicalHash: string;
227
+ drifted: boolean;
228
+ }[];
229
+ reportedAt: string;
230
+ }>;
231
+ /** Zod schema for daemon status (heartbeat). */
232
+ export declare const DaemonStatusSchema: z.ZodObject<{
233
+ workspaceId: z.ZodString;
234
+ configVersion: z.ZodNumber;
235
+ connectedSince: z.ZodString;
236
+ lastSyncAt: z.ZodString;
237
+ harnesses: z.ZodArray<z.ZodObject<{
238
+ type: z.ZodNativeEnum<{
239
+ readonly CURSOR: "cursor";
240
+ readonly CLAUDE_CODE: "claude-code";
241
+ readonly ANTIGRAVITY: "antigravity";
242
+ readonly N8N: "n8n";
243
+ readonly CODEX: "codex";
244
+ readonly WINDSURF: "windsurf";
245
+ readonly AIDER: "aider";
246
+ readonly OPENHANDS: "openhands";
247
+ readonly OPENCLAW: "openclaw";
248
+ readonly HERMES: "hermes";
249
+ readonly PI: "pi";
250
+ readonly CLINE: "cline";
251
+ readonly ROO_CODE: "roo-code";
252
+ readonly CONTINUE: "continue";
253
+ readonly CLAUDE_DESKTOP: "claude-desktop";
254
+ readonly GOOSE: "goose";
255
+ readonly OPEN_WEBUI: "open-webui";
256
+ readonly GITHUB_COPILOT: "github-copilot";
257
+ }>;
258
+ configPath: z.ZodString;
259
+ detected: z.ZodBoolean;
260
+ lastWriteAt: z.ZodNullable<z.ZodString>;
261
+ }, "strip", z.ZodTypeAny, {
262
+ type: "cursor" | "claude-code" | "antigravity" | "n8n" | "codex" | "windsurf" | "aider" | "openhands" | "openclaw" | "hermes" | "pi" | "cline" | "roo-code" | "continue" | "claude-desktop" | "goose" | "open-webui" | "github-copilot";
263
+ configPath: string;
264
+ detected: boolean;
265
+ lastWriteAt: string | null;
266
+ }, {
267
+ type: "cursor" | "claude-code" | "antigravity" | "n8n" | "codex" | "windsurf" | "aider" | "openhands" | "openclaw" | "hermes" | "pi" | "cline" | "roo-code" | "continue" | "claude-desktop" | "goose" | "open-webui" | "github-copilot";
268
+ configPath: string;
269
+ detected: boolean;
270
+ lastWriteAt: string | null;
271
+ }>, "many">;
272
+ activeProcesses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
273
+ components: z.ZodOptional<z.ZodObject<{
274
+ proxy: z.ZodEnum<["healthy", "unhealthy", "stopped"]>;
275
+ valkey: z.ZodEnum<["healthy", "unhealthy", "stopped"]>;
276
+ sslTrust: z.ZodEnum<["trusted", "untrusted"]>;
277
+ }, "strip", z.ZodTypeAny, {
278
+ proxy: "healthy" | "unhealthy" | "stopped";
279
+ valkey: "healthy" | "unhealthy" | "stopped";
280
+ sslTrust: "trusted" | "untrusted";
281
+ }, {
282
+ proxy: "healthy" | "unhealthy" | "stopped";
283
+ valkey: "healthy" | "unhealthy" | "stopped";
284
+ sslTrust: "trusted" | "untrusted";
285
+ }>>;
286
+ }, "strip", z.ZodTypeAny, {
287
+ workspaceId: string;
288
+ configVersion: number;
289
+ connectedSince: string;
290
+ lastSyncAt: string;
291
+ harnesses: {
292
+ type: "cursor" | "claude-code" | "antigravity" | "n8n" | "codex" | "windsurf" | "aider" | "openhands" | "openclaw" | "hermes" | "pi" | "cline" | "roo-code" | "continue" | "claude-desktop" | "goose" | "open-webui" | "github-copilot";
293
+ configPath: string;
294
+ detected: boolean;
295
+ lastWriteAt: string | null;
296
+ }[];
297
+ activeProcesses?: string[] | undefined;
298
+ components?: {
299
+ proxy: "healthy" | "unhealthy" | "stopped";
300
+ valkey: "healthy" | "unhealthy" | "stopped";
301
+ sslTrust: "trusted" | "untrusted";
302
+ } | undefined;
303
+ }, {
304
+ workspaceId: string;
305
+ configVersion: number;
306
+ connectedSince: string;
307
+ lastSyncAt: string;
308
+ harnesses: {
309
+ type: "cursor" | "claude-code" | "antigravity" | "n8n" | "codex" | "windsurf" | "aider" | "openhands" | "openclaw" | "hermes" | "pi" | "cline" | "roo-code" | "continue" | "claude-desktop" | "goose" | "open-webui" | "github-copilot";
310
+ configPath: string;
311
+ detected: boolean;
312
+ lastWriteAt: string | null;
313
+ }[];
314
+ activeProcesses?: string[] | undefined;
315
+ components?: {
316
+ proxy: "healthy" | "unhealthy" | "stopped";
317
+ valkey: "healthy" | "unhealthy" | "stopped";
318
+ sslTrust: "trusted" | "untrusted";
319
+ } | undefined;
320
+ }>;
321
+ /** Zod schema for batch config capture payload (daemon → control plane). */
322
+ export declare const BatchConfigCapturePayloadSchema: z.ZodObject<{
323
+ workspaceId: z.ZodString;
324
+ harnessType: z.ZodNativeEnum<{
325
+ readonly CURSOR: "cursor";
326
+ readonly CLAUDE_CODE: "claude-code";
327
+ readonly ANTIGRAVITY: "antigravity";
328
+ readonly N8N: "n8n";
329
+ readonly CODEX: "codex";
330
+ readonly WINDSURF: "windsurf";
331
+ readonly AIDER: "aider";
332
+ readonly OPENHANDS: "openhands";
333
+ readonly OPENCLAW: "openclaw";
334
+ readonly HERMES: "hermes";
335
+ readonly PI: "pi";
336
+ readonly CLINE: "cline";
337
+ readonly ROO_CODE: "roo-code";
338
+ readonly CONTINUE: "continue";
339
+ readonly CLAUDE_DESKTOP: "claude-desktop";
340
+ readonly GOOSE: "goose";
341
+ readonly OPEN_WEBUI: "open-webui";
342
+ readonly GITHUB_COPILOT: "github-copilot";
343
+ }>;
344
+ files: z.ZodArray<z.ZodObject<{
345
+ path: z.ZodString;
346
+ content: z.ZodString;
347
+ contentHash: z.ZodString;
348
+ }, "strip", z.ZodTypeAny, {
349
+ path: string;
350
+ content: string;
351
+ contentHash: string;
352
+ }, {
353
+ path: string;
354
+ content: string;
355
+ contentHash: string;
356
+ }>, "many">;
357
+ }, "strip", z.ZodTypeAny, {
358
+ workspaceId: string;
359
+ harnessType: "cursor" | "claude-code" | "antigravity" | "n8n" | "codex" | "windsurf" | "aider" | "openhands" | "openclaw" | "hermes" | "pi" | "cline" | "roo-code" | "continue" | "claude-desktop" | "goose" | "open-webui" | "github-copilot";
360
+ files: {
361
+ path: string;
362
+ content: string;
363
+ contentHash: string;
364
+ }[];
365
+ }, {
366
+ workspaceId: string;
367
+ harnessType: "cursor" | "claude-code" | "antigravity" | "n8n" | "codex" | "windsurf" | "aider" | "openhands" | "openclaw" | "hermes" | "pi" | "cline" | "roo-code" | "continue" | "claude-desktop" | "goose" | "open-webui" | "github-copilot";
368
+ files: {
369
+ path: string;
370
+ content: string;
371
+ contentHash: string;
372
+ }[];
373
+ }>;
374
+ //# sourceMappingURL=sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU9B,CAAA;AAEF,gDAAgD;AAChD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB7B,CAAA;AAEF,4EAA4E;AAC5E,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ1C,CAAA"}
package/dist/sync.js ADDED
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /**
3
+ * Sync Daemon & CLI Types — Shared across control plane + CLI + daemon.
4
+ *
5
+ * LLD #8 — Sync Daemon / CLI
6
+ * HLD §3.14 — Real-Time State Mirroring
7
+ *
8
+ * @module
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.BatchConfigCapturePayloadSchema = exports.DaemonStatusSchema = exports.SopHashReportSchema = void 0;
12
+ const zod_1 = require("zod");
13
+ const enums_js_1 = require("./enums.js");
14
+ // ─── Zod Schemas ─────────────────────────────────────────────────────
15
+ /** Zod schema for SOP hash report (daemon → control plane). */
16
+ exports.SopHashReportSchema = zod_1.z.object({
17
+ workspaceId: zod_1.z.string().min(1),
18
+ harnessType: zod_1.z.nativeEnum(enums_js_1.HarnessType),
19
+ files: zod_1.z.array(zod_1.z.object({
20
+ filePath: zod_1.z.string().min(1),
21
+ localHash: zod_1.z.string().length(64), // SHA-256 hex
22
+ canonicalHash: zod_1.z.string().length(64),
23
+ drifted: zod_1.z.boolean(),
24
+ })),
25
+ reportedAt: zod_1.z.string().datetime(),
26
+ });
27
+ /** Zod schema for daemon status (heartbeat). */
28
+ exports.DaemonStatusSchema = zod_1.z.object({
29
+ workspaceId: zod_1.z.string().min(1),
30
+ configVersion: zod_1.z.number().int().min(0),
31
+ connectedSince: zod_1.z.string().datetime(),
32
+ lastSyncAt: zod_1.z.string().datetime(),
33
+ harnesses: zod_1.z.array(zod_1.z.object({
34
+ type: zod_1.z.nativeEnum(enums_js_1.HarnessType),
35
+ configPath: zod_1.z.string(),
36
+ detected: zod_1.z.boolean(),
37
+ lastWriteAt: zod_1.z.string().datetime().nullable(),
38
+ })),
39
+ activeProcesses: zod_1.z.array(zod_1.z.string()).optional(),
40
+ components: zod_1.z.object({
41
+ proxy: zod_1.z.enum(['healthy', 'unhealthy', 'stopped']),
42
+ valkey: zod_1.z.enum(['healthy', 'unhealthy', 'stopped']),
43
+ sslTrust: zod_1.z.enum(['trusted', 'untrusted']),
44
+ }).optional(),
45
+ });
46
+ /** Zod schema for batch config capture payload (daemon → control plane). */
47
+ exports.BatchConfigCapturePayloadSchema = zod_1.z.object({
48
+ workspaceId: zod_1.z.string().min(1),
49
+ harnessType: zod_1.z.nativeEnum(enums_js_1.HarnessType),
50
+ files: zod_1.z.array(zod_1.z.object({
51
+ path: zod_1.z.string().min(1),
52
+ content: zod_1.z.string(),
53
+ contentHash: zod_1.z.string().length(64),
54
+ })),
55
+ });
56
+ //# sourceMappingURL=sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.js","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,6BAAuB;AACvB,yCAAwC;AA+LxC,wEAAwE;AAExE,+DAA+D;AAClD,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,WAAW,EAAE,OAAC,CAAC,UAAU,CAAC,sBAAW,CAAC;IACtC,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC;QACtB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,M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,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;KAC3C,CAAC,CAAC,QAAQ,EAAE;CACd,CAAC,CAAA;AAEF,4EAA4E;AAC/D,QAAA,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IACtD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,WAAW,EAAE,OAAC,CAAC,UAAU,CAAC,sBAAW,CAAC;IACtC,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC;QACtB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;QACnB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;KACnC,CAAC,CAAC;CACJ,CAAC,CAAA"}
@@ -0,0 +1,141 @@
1
+ /**
2
+ * Task Management Adapter — Generic interface for external task/issue trackers.
3
+ *
4
+ * TD-022 item 3.9: TaskManagementAdapter interface
5
+ *
6
+ * Provides a unified abstraction over external task management tools
7
+ * (Jira, Linear, GitHub Issues, etc.) so the control plane can
8
+ * create/update tasks based on governance events.
9
+ *
10
+ * @module
11
+ */
12
+ /** Supported task management providers. */
13
+ export type TaskProvider = 'jira' | 'linear' | 'github' | 'asana' | 'pagerduty';
14
+ /** Priority levels mapped across providers. */
15
+ export type TaskPriority = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW';
16
+ /** Task status (normalized across providers). */
17
+ export type TaskStatus = 'OPEN' | 'IN_PROGRESS' | 'RESOLVED' | 'CLOSED';
18
+ /** Credentials for connecting to a task management provider. */
19
+ export interface TaskProviderCredentials {
20
+ provider: TaskProvider;
21
+ /** Base URL of the provider instance (e.g., https://company.atlassian.net). */
22
+ baseUrl: string;
23
+ /** Authentication token or API key. */
24
+ authToken: string;
25
+ /** Project or board identifier within the provider. */
26
+ projectKey: string;
27
+ /** Additional provider-specific config. */
28
+ metadata?: Record<string, unknown>;
29
+ }
30
+ /** Payload for creating a new task. */
31
+ export interface CreateTaskPayload {
32
+ /** Human-readable task title. */
33
+ title: string;
34
+ /** Markdown description of the task. */
35
+ description: string;
36
+ /** Normalized priority. */
37
+ priority: TaskPriority;
38
+ /** Intutic-specific labels for categorization. */
39
+ labels?: string[];
40
+ /** Assignee identifier (provider-specific). */
41
+ assigneeId?: string;
42
+ /** Link back to the Intutic governance event. */
43
+ intuticLink?: {
44
+ /** Type of governance event that created this task. */
45
+ eventType: 'INCIDENT' | 'ANOMALY' | 'SOP_REVIEW' | 'COMPLIANCE';
46
+ /** ID of the governance event. */
47
+ eventId: string;
48
+ /** Workspace this event belongs to. */
49
+ workspaceId: string;
50
+ };
51
+ }
52
+ /** Result of creating a task in the external system. */
53
+ export interface CreateTaskResult {
54
+ /** Whether the task was successfully created. */
55
+ success: boolean;
56
+ /** External task ID (e.g., Jira issue key like "PROJ-123"). */
57
+ externalTaskId?: string;
58
+ /** URL to the task in the external system. */
59
+ externalUrl?: string;
60
+ /** Error message if creation failed. */
61
+ error?: string;
62
+ }
63
+ /** Payload for updating an existing task. */
64
+ export interface UpdateTaskPayload {
65
+ /** External task ID to update. */
66
+ externalTaskId: string;
67
+ /** New status (optional). */
68
+ status?: TaskStatus;
69
+ /** Comment to add (optional). */
70
+ comment?: string;
71
+ /** Updated priority (optional). */
72
+ priority?: TaskPriority;
73
+ /** Additional fields (provider-specific). */
74
+ fields?: Record<string, unknown>;
75
+ }
76
+ /** Result of updating a task. */
77
+ export interface UpdateTaskResult {
78
+ success: boolean;
79
+ error?: string;
80
+ }
81
+ /** A task as retrieved from the external system. */
82
+ export interface ExternalTask {
83
+ externalTaskId: string;
84
+ title: string;
85
+ status: TaskStatus;
86
+ priority: TaskPriority;
87
+ assignee?: string;
88
+ externalUrl: string;
89
+ createdAt: string;
90
+ updatedAt: string;
91
+ storyPoints?: number;
92
+ sprint?: string;
93
+ epic?: string;
94
+ }
95
+ /**
96
+ * Generic task management adapter interface.
97
+ *
98
+ * Implementations of this interface connect Intutic's governance engine
99
+ * to external task management tools. The control plane calls these methods
100
+ * when governance events (incidents, anomalies, SOP reviews) require
101
+ * external task creation or updates.
102
+ */
103
+ export interface TaskManagementAdapter {
104
+ /** Provider name for this adapter. */
105
+ readonly provider: TaskProvider;
106
+ /**
107
+ * Test the connection to the external system.
108
+ * @returns true if the connection is healthy
109
+ */
110
+ testConnection(): Promise<boolean>;
111
+ /**
112
+ * Create a new task in the external system.
113
+ * @param payload - Task creation payload
114
+ * @returns Result with external task ID and URL
115
+ */
116
+ createTask(payload: CreateTaskPayload): Promise<CreateTaskResult>;
117
+ /**
118
+ * Update an existing task in the external system.
119
+ * @param payload - Task update payload
120
+ * @returns Result indicating success/failure
121
+ */
122
+ updateTask(payload: UpdateTaskPayload): Promise<UpdateTaskResult>;
123
+ /**
124
+ * Retrieve a task by its external ID.
125
+ * @param externalTaskId - The external system's task identifier
126
+ * @returns The task details, or null if not found
127
+ */
128
+ getTask(externalTaskId: string): Promise<ExternalTask | null>;
129
+ /**
130
+ * Search for tasks matching Intutic criteria.
131
+ * @param workspaceId - Intutic workspace ID to filter by
132
+ * @param filters - Optional filters (status, priority, labels)
133
+ * @returns List of matching external tasks
134
+ */
135
+ searchTasks(workspaceId: string, filters?: {
136
+ status?: TaskStatus;
137
+ priority?: TaskPriority;
138
+ labels?: string[];
139
+ }): Promise<ExternalTask[]>;
140
+ }
141
+ //# sourceMappingURL=taskManagement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taskManagement.d.ts","sourceRoot":"","sources":["../src/taskManagement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,2CAA2C;AAC3C,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAA;AAE/E,+CAA+C;AAC/C,MA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CAAC,YAAY,GAAG,IAAI,CAAC,CAAA;IAE7D;;;;;OAKG;IACH,WAAW,CACT,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAC;QAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GAC5E,OAAO,CAAC,YAAY,EAAE,CAAC,CAAA;CAC3B"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * Task Management Adapter — Generic interface for external task/issue trackers.
4
+ *
5
+ * TD-022 item 3.9: TaskManagementAdapter interface
6
+ *
7
+ * Provides a unified abstraction over external task management tools
8
+ * (Jira, Linear, GitHub Issues, etc.) so the control plane can
9
+ * create/update tasks based on governance events.
10
+ *
11
+ * @module
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ //# sourceMappingURL=taskManagement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taskManagement.js","sourceRoot":"","sources":["../src/taskManagement.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Trial and Plan Types — Subscription, limits, and pricing plan models.
3
+ */
4
+ export interface TrialStatus {
5
+ tier: string;
6
+ trialExpiresAt: string | null;
7
+ daysRemaining: number;
8
+ isTrialActive: boolean;
9
+ features: Record<string, boolean>;
10
+ limits: {
11
+ maxTokensPerDay: number;
12
+ maxSessionsPerDay: number;
13
+ maxSopsActive: number;
14
+ };
15
+ }
16
+ export interface PlanTier {
17
+ id: string;
18
+ name: string;
19
+ price: number;
20
+ interval: 'month' | 'year';
21
+ features: string[];
22
+ limits: {
23
+ maxTokensPerDay: number;
24
+ maxSessionsPerDay: number;
25
+ maxSopsActive: number;
26
+ };
27
+ highlighted?: boolean;
28
+ }
29
+ /**
30
+ * All valid plan tier slugs used in `workspaces.plan_tier`.
31
+ * Tiers in ascending capability order. `enterprise` is a legacy alias for `ent_sub`.
32
+ */
33
+ export type PlanTierSlug = 'free' | 'free_trial' | 'sandbox' | 'pro' | 'team' | 'biz_scale' | 'biz_org' | 'ent_sub' | 'ent_adv' | 'ent_lic' | 'enterprise';
34
+ //# sourceMappingURL=trial.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trial.d.ts","sourceRoot":"","sources":["../src/trial.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,OAAO,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,MAAM,EAAE;QACN,eAAe,EAAE,MAAM,CAAA;QACvB,iBAAiB,EAAE,MAAM,CAAA;QACzB,aAAa,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,EAAE;QACN,eAAe,EAAE,MAAM,CAAA;QACvB,iBAAiB,EAAE,MAAM,CAAA;QACzB,aAAa,EAAE,MAAM,CAAA;KACtB,CAAA;IACD,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,YAAY,GACZ,SAAS,GACT,KAAK,GACL,MAAM,GACN,WAAW,GACX,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,YAAY,CAAA"}
package/dist/trial.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Trial and Plan Types — Subscription, limits, and pricing plan models.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=trial.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trial.js","sourceRoot":"","sources":["../src/trial.ts"],"names":[],"mappings":";AAAA;;GAEG"}