@criticalbridge/brain-client 1.0.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 (126) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +23 -0
  3. package/dist/auth.d.ts +2 -0
  4. package/dist/auth.js +21 -0
  5. package/dist/auth.js.map +1 -0
  6. package/dist/client.d.ts +604 -0
  7. package/dist/client.js +1197 -0
  8. package/dist/client.js.map +1 -0
  9. package/dist/errors.d.ts +17 -0
  10. package/dist/errors.js +44 -0
  11. package/dist/errors.js.map +1 -0
  12. package/dist/index.d.ts +52 -0
  13. package/dist/index.js +95 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/types/a2a.types.d.ts +42 -0
  16. package/dist/types/a2a.types.js +3 -0
  17. package/dist/types/a2a.types.js.map +1 -0
  18. package/dist/types/agent-skill-lifecycle.types.d.ts +46 -0
  19. package/dist/types/agent-skill-lifecycle.types.js +22 -0
  20. package/dist/types/agent-skill-lifecycle.types.js.map +1 -0
  21. package/dist/types/agent.types.d.ts +117 -0
  22. package/dist/types/agent.types.js +3 -0
  23. package/dist/types/agent.types.js.map +1 -0
  24. package/dist/types/ai-knowledge.types.d.ts +180 -0
  25. package/dist/types/ai-knowledge.types.js +3 -0
  26. package/dist/types/ai-knowledge.types.js.map +1 -0
  27. package/dist/types/api.types.d.ts +550 -0
  28. package/dist/types/api.types.js +3 -0
  29. package/dist/types/api.types.js.map +1 -0
  30. package/dist/types/approval-events.types.d.ts +43 -0
  31. package/dist/types/approval-events.types.js +7 -0
  32. package/dist/types/approval-events.types.js.map +1 -0
  33. package/dist/types/best-practices-kg.types.d.ts +112 -0
  34. package/dist/types/best-practices-kg.types.js +3 -0
  35. package/dist/types/best-practices-kg.types.js.map +1 -0
  36. package/dist/types/bias-threshold-policy.types.d.ts +37 -0
  37. package/dist/types/bias-threshold-policy.types.js +3 -0
  38. package/dist/types/bias-threshold-policy.types.js.map +1 -0
  39. package/dist/types/change-approval-gate.types.d.ts +110 -0
  40. package/dist/types/change-approval-gate.types.js +53 -0
  41. package/dist/types/change-approval-gate.types.js.map +1 -0
  42. package/dist/types/connection.types.d.ts +100 -0
  43. package/dist/types/connection.types.js +3 -0
  44. package/dist/types/connection.types.js.map +1 -0
  45. package/dist/types/connector-manifest.types.d.ts +889 -0
  46. package/dist/types/connector-manifest.types.js +118 -0
  47. package/dist/types/connector-manifest.types.js.map +1 -0
  48. package/dist/types/control-profile.types.d.ts +69 -0
  49. package/dist/types/control-profile.types.js +10 -0
  50. package/dist/types/control-profile.types.js.map +1 -0
  51. package/dist/types/corpus.types.d.ts +2584 -0
  52. package/dist/types/corpus.types.js +120 -0
  53. package/dist/types/corpus.types.js.map +1 -0
  54. package/dist/types/credentials.types.d.ts +18 -0
  55. package/dist/types/credentials.types.js +3 -0
  56. package/dist/types/credentials.types.js.map +1 -0
  57. package/dist/types/dashboard.types.d.ts +205 -0
  58. package/dist/types/dashboard.types.js +3 -0
  59. package/dist/types/dashboard.types.js.map +1 -0
  60. package/dist/types/document-ingestion.types.d.ts +30 -0
  61. package/dist/types/document-ingestion.types.js +3 -0
  62. package/dist/types/document-ingestion.types.js.map +1 -0
  63. package/dist/types/domain-event.types.d.ts +21 -0
  64. package/dist/types/domain-event.types.js +3 -0
  65. package/dist/types/domain-event.types.js.map +1 -0
  66. package/dist/types/drift-dashboard.types.d.ts +17 -0
  67. package/dist/types/drift-dashboard.types.js +3 -0
  68. package/dist/types/drift-dashboard.types.js.map +1 -0
  69. package/dist/types/effective-control-profile.types.d.ts +39 -0
  70. package/dist/types/effective-control-profile.types.js +39 -0
  71. package/dist/types/effective-control-profile.types.js.map +1 -0
  72. package/dist/types/entity-kg.types.d.ts +140 -0
  73. package/dist/types/entity-kg.types.js +3 -0
  74. package/dist/types/entity-kg.types.js.map +1 -0
  75. package/dist/types/entity-model-graph.types.d.ts +63 -0
  76. package/dist/types/entity-model-graph.types.js +3 -0
  77. package/dist/types/entity-model-graph.types.js.map +1 -0
  78. package/dist/types/entity-model-sources.types.d.ts +117 -0
  79. package/dist/types/entity-model-sources.types.js +3 -0
  80. package/dist/types/entity-model-sources.types.js.map +1 -0
  81. package/dist/types/entity.types.d.ts +6 -0
  82. package/dist/types/entity.types.js +3 -0
  83. package/dist/types/entity.types.js.map +1 -0
  84. package/dist/types/failure.types.d.ts +22 -0
  85. package/dist/types/failure.types.js +3 -0
  86. package/dist/types/failure.types.js.map +1 -0
  87. package/dist/types/harvest.types.d.ts +662 -0
  88. package/dist/types/harvest.types.js +52 -0
  89. package/dist/types/harvest.types.js.map +1 -0
  90. package/dist/types/incident.types.d.ts +105 -0
  91. package/dist/types/incident.types.js +3 -0
  92. package/dist/types/incident.types.js.map +1 -0
  93. package/dist/types/introspection.types.d.ts +46 -0
  94. package/dist/types/introspection.types.js +3 -0
  95. package/dist/types/introspection.types.js.map +1 -0
  96. package/dist/types/kb-kg.types.d.ts +38 -0
  97. package/dist/types/kb-kg.types.js +3 -0
  98. package/dist/types/kb-kg.types.js.map +1 -0
  99. package/dist/types/managed-agent.types.d.ts +59 -0
  100. package/dist/types/managed-agent.types.js +11 -0
  101. package/dist/types/managed-agent.types.js.map +1 -0
  102. package/dist/types/object-store.types.d.ts +25 -0
  103. package/dist/types/object-store.types.js +8 -0
  104. package/dist/types/object-store.types.js.map +1 -0
  105. package/dist/types/pipeline.types.d.ts +39 -0
  106. package/dist/types/pipeline.types.js +3 -0
  107. package/dist/types/pipeline.types.js.map +1 -0
  108. package/dist/types/policy.types.d.ts +32 -0
  109. package/dist/types/policy.types.js +3 -0
  110. package/dist/types/policy.types.js.map +1 -0
  111. package/dist/types/risk-classification.types.d.ts +71 -0
  112. package/dist/types/risk-classification.types.js +3 -0
  113. package/dist/types/risk-classification.types.js.map +1 -0
  114. package/dist/types/skill-draft.types.d.ts +271 -0
  115. package/dist/types/skill-draft.types.js +48 -0
  116. package/dist/types/skill-draft.types.js.map +1 -0
  117. package/dist/types/source-mapping.types.d.ts +69 -0
  118. package/dist/types/source-mapping.types.js +3 -0
  119. package/dist/types/source-mapping.types.js.map +1 -0
  120. package/dist/types/synthesize.types.d.ts +90 -0
  121. package/dist/types/synthesize.types.js +41 -0
  122. package/dist/types/synthesize.types.js.map +1 -0
  123. package/dist/types/wizard-assistant.types.d.ts +25 -0
  124. package/dist/types/wizard-assistant.types.js +3 -0
  125. package/dist/types/wizard-assistant.types.js.map +1 -0
  126. package/package.json +55 -0
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CorpusBrowserFiltersSchema = exports.DocumentChunksResponseSchema = exports.SourceDocumentsResponseSchema = exports.CorpusSnapshotDetailResponseSchema = exports.CorpusSnapshotListResponseSchema = exports.CorpusSnapshotSchema = exports.CorpusSourceSchema = exports.SourceTypeSchema = exports.CorpusDocumentSchema = exports.CorpusChunkSchema = exports.CorpusEntitySchema = exports.PiiRedactionSchema = exports.PiiRedactionStatusSchema = exports.ChunkStatusSchema = void 0;
4
+ exports.isCorpusSnapshot = isCorpusSnapshot;
5
+ exports.isCorpusSource = isCorpusSource;
6
+ exports.isCorpusDocument = isCorpusDocument;
7
+ exports.isCorpusChunk = isCorpusChunk;
8
+ const zod_1 = require("zod");
9
+ const harvest_types_1 = require("./harvest.types");
10
+ exports.ChunkStatusSchema = zod_1.z.enum(['pending', 'processed', 'failed', 'skipped']);
11
+ exports.PiiRedactionStatusSchema = zod_1.z.enum([
12
+ 'none',
13
+ 'redacted',
14
+ 'flagged',
15
+ 'skipped',
16
+ ]);
17
+ exports.PiiRedactionSchema = zod_1.z.object({
18
+ status: exports.PiiRedactionStatusSchema,
19
+ piiTypesFound: zod_1.z.array(zod_1.z.string()).optional(),
20
+ redactedCount: zod_1.z.number().int().nonnegative().optional(),
21
+ });
22
+ exports.CorpusEntitySchema = zod_1.z.object({
23
+ id: zod_1.z.string().min(1),
24
+ type: zod_1.z.string().min(1),
25
+ value: zod_1.z.string(),
26
+ confidence: zod_1.z.number().min(0).max(1),
27
+ sourceChunkId: zod_1.z.string().min(1),
28
+ metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
29
+ });
30
+ exports.CorpusChunkSchema = zod_1.z.object({
31
+ id: zod_1.z.string().min(1),
32
+ hash: zod_1.z.string().min(1),
33
+ content: zod_1.z.string(),
34
+ tokens: zod_1.z.number().int().nonnegative(),
35
+ status: exports.ChunkStatusSchema,
36
+ piiRedaction: exports.PiiRedactionSchema.optional(),
37
+ entities: zod_1.z.array(exports.CorpusEntitySchema).optional(),
38
+ metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
39
+ });
40
+ exports.CorpusDocumentSchema = zod_1.z.object({
41
+ id: zod_1.z.string().min(1),
42
+ title: zod_1.z.string(),
43
+ sourceUri: zod_1.z.string(),
44
+ extractedAt: zod_1.z.coerce.date(),
45
+ chunkCount: zod_1.z.number().int().nonnegative(),
46
+ entityCount: zod_1.z.number().int().nonnegative().optional(),
47
+ piiStatus: exports.PiiRedactionStatusSchema.optional(),
48
+ chunks: zod_1.z.array(exports.CorpusChunkSchema).optional(),
49
+ metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
50
+ });
51
+ exports.SourceTypeSchema = zod_1.z.enum([
52
+ 'confluence',
53
+ 'slack',
54
+ 'email',
55
+ 'shared_drive',
56
+ 'jira',
57
+ 'servicenow',
58
+ 'db_replica',
59
+ ]);
60
+ exports.CorpusSourceSchema = zod_1.z.object({
61
+ id: zod_1.z.string().min(1),
62
+ type: exports.SourceTypeSchema,
63
+ name: zod_1.z.string(),
64
+ documentCount: zod_1.z.number().int().nonnegative(),
65
+ chunkCount: zod_1.z.number().int().nonnegative().optional(),
66
+ entityCount: zod_1.z.number().int().nonnegative().optional(),
67
+ documents: zod_1.z.array(exports.CorpusDocumentSchema).optional(),
68
+ });
69
+ exports.CorpusSnapshotSchema = zod_1.z.object({
70
+ id: zod_1.z.string().min(1),
71
+ harvestJobId: zod_1.z.string().min(1),
72
+ entityId: zod_1.z.string().min(1),
73
+ scope: harvest_types_1.HarvestScopeSchema,
74
+ createdAt: zod_1.z.coerce.date(),
75
+ sourceCount: zod_1.z.number().int().nonnegative(),
76
+ documentCount: zod_1.z.number().int().nonnegative(),
77
+ chunkCount: zod_1.z.number().int().nonnegative(),
78
+ entityCount: zod_1.z.number().int().nonnegative(),
79
+ piiRedactedCount: zod_1.z.number().int().nonnegative().optional(),
80
+ sources: zod_1.z.array(exports.CorpusSourceSchema).optional(),
81
+ });
82
+ exports.CorpusSnapshotListResponseSchema = zod_1.z.object({
83
+ snapshots: zod_1.z.array(exports.CorpusSnapshotSchema),
84
+ count: zod_1.z.number().int().nonnegative(),
85
+ jobId: zod_1.z.string().min(1),
86
+ });
87
+ exports.CorpusSnapshotDetailResponseSchema = zod_1.z.object({
88
+ snapshot: exports.CorpusSnapshotSchema,
89
+ sources: zod_1.z.array(exports.CorpusSourceSchema),
90
+ });
91
+ exports.SourceDocumentsResponseSchema = zod_1.z.object({
92
+ sourceId: zod_1.z.string().min(1),
93
+ documents: zod_1.z.array(exports.CorpusDocumentSchema),
94
+ count: zod_1.z.number().int().nonnegative(),
95
+ });
96
+ exports.DocumentChunksResponseSchema = zod_1.z.object({
97
+ documentId: zod_1.z.string().min(1),
98
+ chunks: zod_1.z.array(exports.CorpusChunkSchema),
99
+ count: zod_1.z.number().int().nonnegative(),
100
+ });
101
+ exports.CorpusBrowserFiltersSchema = zod_1.z.object({
102
+ entityType: zod_1.z.string().optional(),
103
+ sourceType: exports.SourceTypeSchema.optional(),
104
+ chunkStatus: exports.ChunkStatusSchema.optional(),
105
+ piiStatus: exports.PiiRedactionStatusSchema.optional(),
106
+ searchQuery: zod_1.z.string().optional(),
107
+ });
108
+ function isCorpusSnapshot(value) {
109
+ return exports.CorpusSnapshotSchema.safeParse(value).success;
110
+ }
111
+ function isCorpusSource(value) {
112
+ return exports.CorpusSourceSchema.safeParse(value).success;
113
+ }
114
+ function isCorpusDocument(value) {
115
+ return exports.CorpusDocumentSchema.safeParse(value).success;
116
+ }
117
+ function isCorpusChunk(value) {
118
+ return exports.CorpusChunkSchema.safeParse(value).success;
119
+ }
120
+ //# sourceMappingURL=corpus.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corpus.types.js","sourceRoot":"","sources":["../../src/types/corpus.types.ts"],"names":[],"mappings":";;;AAuOA,4CAEC;AAED,wCAEC;AAED,4CAEC;AAED,sCAEC;AAtOD,6BAAwB;AAExB,mDAAqD;AASxC,QAAA,iBAAiB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AAU1E,QAAA,wBAAwB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC7C,MAAM;IACN,UAAU;IACV,SAAS;IACT,SAAS;CACV,CAAC,CAAC;AAMU,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,gCAAwB;IAChC,aAAa,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7C,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC;AAWU,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,QAAQ,EAAE,OAAC,C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AC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,yBAAiB,CAAC;IAClC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CACtC,CAAC,CAAC;AAUU,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,wBAAgB,CAAC,QAAQ,EAAE;IACvC,WAAW,EAAE,yBAAiB,CAAC,QAAQ,EAAE;IACzC,SAAS,EAAE,gCAAwB,CAAC,QAAQ,EAAE;IAC9C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAOH,SAAgB,gBAAgB,CAAC,KAAc;IAC7C,OAAO,4BAAoB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACvD,CAAC;AAED,SAAgB,cAAc,CAAC,KAAc;IAC3C,OAAO,0BAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACrD,CAAC;AAED,SAAgB,gBAAgB,CAAC,KAAc;IAC7C,OAAO,4BAAoB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACvD,CAAC;AAED,SAAgB,aAAa,CAAC,KAAc;IAC1C,OAAO,yBAAiB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACpD,CAAC"}
@@ -0,0 +1,18 @@
1
+ export interface CredentialSummary {
2
+ connectionId: string;
3
+ name: string;
4
+ type?: string;
5
+ provider?: string;
6
+ authentication?: string;
7
+ status: string;
8
+ vaultKeyId?: string;
9
+ ownership?: string;
10
+ lastUpdated?: string;
11
+ createdAt?: string;
12
+ lastTested?: string;
13
+ lastError?: string;
14
+ allowedMinters?: {
15
+ userIds?: string[];
16
+ roles?: string[];
17
+ };
18
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=credentials.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.types.js","sourceRoot":"","sources":["../../src/types/credentials.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,205 @@
1
+ export interface DashboardMetrics {
2
+ activeAgents: number;
3
+ totalAgents: number;
4
+ licenseUsed: number;
5
+ licenseTotal: number;
6
+ runningProcesses: number;
7
+ pendingApprovals: number;
8
+ slaCompliance: number | null;
9
+ avgLatencyMs: number | null;
10
+ totalRuns7d?: number | null;
11
+ p95LatencyMs?: number | null;
12
+ deltas?: DashboardMetricsDeltas;
13
+ totalSpend7d?: number | null;
14
+ health: SystemHealth;
15
+ activeIncidents?: number;
16
+ }
17
+ export interface DashboardMetricsDeltas {
18
+ activeAgents: number | null;
19
+ slaCompliance: number | null;
20
+ totalRuns7d: number | null;
21
+ totalSpend7d: number | null;
22
+ p95LatencyMs: number | null;
23
+ successRate: number | null;
24
+ }
25
+ export type SystemHealth = 'healthy' | 'degraded' | 'unhealthy';
26
+ export interface ActivityItem {
27
+ id: string;
28
+ entityId: string;
29
+ type: ActivityType;
30
+ message: string;
31
+ timestamp: string;
32
+ agentId?: string;
33
+ agentName?: string;
34
+ processId?: string;
35
+ processName?: string;
36
+ metadata?: Record<string, unknown>;
37
+ actor?: ActivityActor | null;
38
+ tone?: ActivityTone | null;
39
+ icon?: string | null;
40
+ detail?: string | null;
41
+ ref?: Record<string, unknown> | null;
42
+ }
43
+ export type ActivityType = 'agent_started' | 'agent_stopped' | 'process_completed' | 'decision_made' | 'alert' | 'approval_required' | 'deployment' | 'policy_change' | 'connection_change' | 'audit' | 'action';
44
+ export interface ActivityActor {
45
+ userId: string;
46
+ userName?: string;
47
+ userEmail?: string;
48
+ }
49
+ export type ActivityTone = 'success' | 'info' | 'warning' | 'danger' | 'paused';
50
+ export interface Process {
51
+ id: string;
52
+ entityId: string;
53
+ templateName: string;
54
+ name: string;
55
+ status: ProcessStatus;
56
+ progress: number;
57
+ currentStep: string;
58
+ startedAt: string;
59
+ estimatedCompletion?: string;
60
+ agentCount: number;
61
+ steps: ProcessStep[];
62
+ }
63
+ export type ProcessStatus = 'running' | 'waiting_approval' | 'paused' | 'completed' | 'failed';
64
+ export interface ProcessStep {
65
+ id: string;
66
+ name: string;
67
+ status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'skipped';
68
+ startedAt?: string;
69
+ completedAt?: string;
70
+ agentId?: string;
71
+ agentName?: string;
72
+ }
73
+ export type ProcessStageState = 'pending' | 'running' | 'blocked' | 'approved' | 'rejected';
74
+ export interface ProcessStage {
75
+ id: string;
76
+ ownerAgent: string | null;
77
+ state: ProcessStageState;
78
+ ageMs: number;
79
+ startedAt: string | null;
80
+ blockedOn: string | null;
81
+ }
82
+ export interface DashboardMetricsResponse {
83
+ metrics: DashboardMetrics;
84
+ entityId: string;
85
+ timestamp: string;
86
+ }
87
+ export interface ActivityResponse {
88
+ activities: ActivityItem[];
89
+ entityId: string;
90
+ count: number;
91
+ hasMore: boolean;
92
+ }
93
+ export interface ProcessListResponse {
94
+ processes: Process[];
95
+ entityId: string;
96
+ count: number;
97
+ page?: number;
98
+ pageSize?: number;
99
+ }
100
+ export interface GetProcessStagesResponse {
101
+ stages: ProcessStage[];
102
+ count: number;
103
+ entityId: string;
104
+ processId: string;
105
+ }
106
+ export type ProcessStageDecision = 'approve' | 'reject';
107
+ export interface AdvanceStageRequest {
108
+ decision: ProcessStageDecision;
109
+ approver: string;
110
+ comment?: string;
111
+ }
112
+ export interface AdvanceStageResponse {
113
+ stage: ProcessStage;
114
+ entityId: string;
115
+ processId: string;
116
+ }
117
+ export interface LicensePool {
118
+ totalLicenses: number;
119
+ activeLicenses: number;
120
+ availableLicenses: number;
121
+ seatCount: number;
122
+ }
123
+ export interface SeatLicense {
124
+ id: string;
125
+ entityId: string;
126
+ userId: string;
127
+ userEmail: string;
128
+ userName: string;
129
+ maxConcurrent: number;
130
+ currentActive: number;
131
+ agentNames: string[];
132
+ }
133
+ export interface UsageHistoryPoint {
134
+ time: string;
135
+ pool: number;
136
+ seats: number;
137
+ deniedCount?: number;
138
+ }
139
+ export interface LicensePoolResponse {
140
+ pool: LicensePool;
141
+ entityId: string;
142
+ }
143
+ export interface SeatLicensesResponse {
144
+ seats: SeatLicense[];
145
+ entityId: string;
146
+ count: number;
147
+ }
148
+ export interface QueueDepthEntry {
149
+ agentId: string;
150
+ agentName: string;
151
+ depth: number;
152
+ }
153
+ export interface QueueDepthsResponse {
154
+ entries: QueueDepthEntry[];
155
+ entityId: string;
156
+ count: number;
157
+ }
158
+ export interface UsageHistoryResponse {
159
+ history: UsageHistoryPoint[];
160
+ entityId: string;
161
+ period: string;
162
+ truncatedAt?: string;
163
+ }
164
+ export type TimeSeriesWindow = '1h' | '24h' | '7d' | '30d' | '60m';
165
+ export type TimeSeriesBucket = '1m' | '5m' | '15m' | '1h' | '1d';
166
+ export interface RunVolumePoint {
167
+ t: number;
168
+ total: number;
169
+ succeeded: number;
170
+ failed: number;
171
+ }
172
+ export interface RunVolumeResponse {
173
+ series: RunVolumePoint[];
174
+ entityId: string;
175
+ window: string;
176
+ bucket: string;
177
+ }
178
+ export interface LatencyPoint {
179
+ t: number;
180
+ p50: number | null;
181
+ p95: number | null;
182
+ p99: number | null;
183
+ sampleSize: number;
184
+ }
185
+ export interface LatencyResponse {
186
+ series: LatencyPoint[];
187
+ entityId: string;
188
+ window: string;
189
+ bucket: string;
190
+ }
191
+ export type TopCapabilitiesWindow = '24h' | '7d' | '30d';
192
+ export interface CapabilityInvocation {
193
+ capabilityId: string;
194
+ capabilityName: string;
195
+ invocations: number;
196
+ agents: number;
197
+ failures: number;
198
+ }
199
+ export interface TopCapabilitiesResponse {
200
+ capabilities: CapabilityInvocation[];
201
+ entityId: string;
202
+ window: string;
203
+ limit: number;
204
+ totalCount: number;
205
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=dashboard.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.types.js","sourceRoot":"","sources":["../../src/types/dashboard.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ export type IngestionMimeType = 'application/pdf' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'text/plain';
2
+ export interface IngestionDocumentInput {
3
+ name: string;
4
+ contentBase64: string;
5
+ mimeType: IngestionMimeType;
6
+ }
7
+ export interface IngestionConfigInput {
8
+ extractEntities?: boolean;
9
+ extractRelationships?: boolean;
10
+ entityTypes?: string[];
11
+ confidenceThreshold?: number;
12
+ }
13
+ export interface TriggerDocumentIngestionInput {
14
+ documents: IngestionDocumentInput[];
15
+ config: IngestionConfigInput;
16
+ }
17
+ export type IngestionJobStatus = 'queued' | 'running' | 'complete' | 'failed';
18
+ export interface TriggerDocumentIngestionResponse {
19
+ jobId: string;
20
+ status: IngestionJobStatus;
21
+ }
22
+ export interface DocumentIngestionStatusResponse {
23
+ jobId: string;
24
+ status: IngestionJobStatus;
25
+ resultSummary?: {
26
+ entitiesExtracted: number;
27
+ relationshipsExtracted: number;
28
+ };
29
+ error?: string;
30
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=document-ingestion.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-ingestion.types.js","sourceRoot":"","sources":["../../src/types/document-ingestion.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ export interface BrainDomainEvent {
2
+ eventId: string;
3
+ entityId: string;
4
+ domainPackId: string;
5
+ eventType: string;
6
+ timestamp: string;
7
+ source: string;
8
+ correlationId?: string;
9
+ causationId?: string;
10
+ version: number;
11
+ payload: Record<string, unknown>;
12
+ metadata?: Record<string, string>;
13
+ }
14
+ export interface AppendDomainEventResponse {
15
+ eventId: string;
16
+ status: string;
17
+ }
18
+ export interface AppendDomainEventBatchResponse {
19
+ count: number;
20
+ status: string;
21
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=domain-event.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-event.types.js","sourceRoot":"","sources":["../../src/types/domain-event.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ export type DriftSeverityWire = 'none' | 'low' | 'moderate' | 'significant' | 'critical';
2
+ export interface DriftDashboardWire {
3
+ totalMonitoredMetrics: number;
4
+ systemsWithDrift: number;
5
+ averageDriftScore: number;
6
+ metricsBySeverity: Record<DriftSeverityWire, number>;
7
+ activeAlerts: readonly unknown[];
8
+ recentResults: readonly unknown[];
9
+ trendData: readonly unknown[];
10
+ degraded?: boolean;
11
+ degradedReason?: string;
12
+ }
13
+ export interface DriftDashboardSnapshotResponse {
14
+ entityId: string;
15
+ generatedAt: string;
16
+ dashboard: DriftDashboardWire;
17
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=drift-dashboard.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drift-dashboard.types.js","sourceRoot":"","sources":["../../src/types/drift-dashboard.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,39 @@
1
+ import type { ControlProfile, ControlProfileRiskTier } from './control-profile.types';
2
+ export type JurisdictionCode = string;
3
+ export type ControlParameterStringency = 'min' | 'max' | 'enum-rank';
4
+ export interface ParameterProvenanceWire<T> {
5
+ value: T;
6
+ source: 'baseline' | JurisdictionCode;
7
+ monotonicityApplied: ControlParameterStringency;
8
+ contributingOverlays: JurisdictionCode[];
9
+ }
10
+ export interface EffectiveControlProfileProvenanceWire {
11
+ auditLevel: ParameterProvenanceWire<unknown>;
12
+ operatingMode: ParameterProvenanceWire<unknown>;
13
+ hitlStance: ParameterProvenanceWire<unknown>;
14
+ requiredApprovalScopes: ParameterProvenanceWire<unknown>;
15
+ approvalTimeoutMinutes: ParameterProvenanceWire<number>;
16
+ requiresJustificationOnUpgrade: ParameterProvenanceWire<boolean>;
17
+ resourceCeilings: ParameterProvenanceWire<unknown>;
18
+ }
19
+ export interface EffectiveControlProfileWire {
20
+ tier: ControlProfileRiskTier;
21
+ jurisdictions: JurisdictionCode[];
22
+ profile: ControlProfile;
23
+ provenance?: EffectiveControlProfileProvenanceWire;
24
+ }
25
+ export interface ManualConflictDetailWire {
26
+ parameter: string;
27
+ message: string;
28
+ jurisdictions: JurisdictionCode[];
29
+ }
30
+ export interface GetEffectiveControlProfileResponse {
31
+ status: 'resolved' | 'halt';
32
+ effective?: EffectiveControlProfileWire;
33
+ haltReason?: 'no-jurisdictions-configured' | 'manual-conflict';
34
+ conflicts?: ManualConflictDetailWire[];
35
+ jurisdictions?: string[];
36
+ }
37
+ export declare const CONTROL_PROFILE_PARAMETER_LABEL: Record<keyof EffectiveControlProfileProvenanceWire, string>;
38
+ export declare const CONTROL_PROFILE_PARAMETER_ORDER: ReadonlyArray<keyof EffectiveControlProfileProvenanceWire>;
39
+ export declare function formatControlProfileValue(value: unknown): string;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONTROL_PROFILE_PARAMETER_ORDER = exports.CONTROL_PROFILE_PARAMETER_LABEL = void 0;
4
+ exports.formatControlProfileValue = formatControlProfileValue;
5
+ exports.CONTROL_PROFILE_PARAMETER_LABEL = {
6
+ auditLevel: 'Audit level',
7
+ operatingMode: 'Operating mode',
8
+ hitlStance: 'HITL stance',
9
+ requiredApprovalScopes: 'Required approval scopes',
10
+ approvalTimeoutMinutes: 'Approval timeout (minutes)',
11
+ requiresJustificationOnUpgrade: 'Justification required on upgrade',
12
+ resourceCeilings: 'Resource ceilings',
13
+ };
14
+ exports.CONTROL_PROFILE_PARAMETER_ORDER = [
15
+ 'auditLevel',
16
+ 'operatingMode',
17
+ 'hitlStance',
18
+ 'requiredApprovalScopes',
19
+ 'approvalTimeoutMinutes',
20
+ 'requiresJustificationOnUpgrade',
21
+ 'resourceCeilings',
22
+ ];
23
+ function formatControlProfileValue(value) {
24
+ if (value === null || value === undefined)
25
+ return '—';
26
+ if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
27
+ return String(value);
28
+ }
29
+ try {
30
+ return JSON.stringify(value);
31
+ }
32
+ catch (err) {
33
+ console.warn('[formatControlProfileValue] JSON.stringify threw — falling back to String()', {
34
+ error: err instanceof Error ? err.message : String(err),
35
+ });
36
+ return String(value);
37
+ }
38
+ }
39
+ //# sourceMappingURL=effective-control-profile.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effective-control-profile.types.js","sourceRoot":"","sources":["../../src/types/effective-control-profile.types.ts"],"names":[],"mappings":";;;AAiLA,8DAiBC;AA7DY,QAAA,+BAA+B,GAGxC;IACF,UAAU,EAAE,aAAa;IACzB,aAAa,EAAE,gBAAgB;IAC/B,UAAU,EAAE,aAAa;IACzB,sBAAsB,EAAE,0BAA0B;IAClD,sBAAsB,EAAE,4BAA4B;IACpD,8BAA8B,EAAE,mCAAmC;IACnE,gBAAgB,EAAE,mBAAmB;CACtC,CAAC;AASW,QAAA,+BAA+B,GAExC;IACF,YAAY;IACZ,eAAe;IACf,YAAY;IACZ,wBAAwB;IACxB,wBAAwB;IACxB,gCAAgC;IAChC,kBAAkB;CACnB,CAAC;AAcF,SAAgB,yBAAyB,CAAC,KAAc;IACtD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,GAAG,CAAC;IACtD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QACzF,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QAKb,OAAO,CAAC,IAAI,CAAC,6EAA6E,EAAE;YAC1F,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;SACxD,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}