@intutic/shared-types 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/anomaly.d.ts +6 -10
- package/dist/anomaly.d.ts.map +1 -1
- package/dist/anomaly.js +0 -2
- package/dist/anomaly.js.map +1 -1
- package/dist/api-contracts.d.ts +1 -1
- package/dist/api-contracts.js +1 -1
- package/dist/attenuation.d.ts +1 -1
- package/dist/attenuation.js +1 -1
- package/dist/auth.d.ts +10 -9
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +3 -4
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +1 -1
- package/dist/billing.js +1 -1
- package/dist/destructiveSql.d.ts +48 -0
- package/dist/destructiveSql.d.ts.map +1 -0
- package/dist/destructiveSql.js +43 -0
- package/dist/destructiveSql.js.map +1 -0
- package/dist/devInventory.d.ts +120 -0
- package/dist/devInventory.d.ts.map +1 -0
- package/dist/devInventory.js +80 -0
- package/dist/devInventory.js.map +1 -0
- package/dist/enums.d.ts +18 -21
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +24 -28
- package/dist/enums.js.map +1 -1
- package/dist/errors.js +3 -3
- package/dist/errors.js.map +1 -1
- package/dist/finops.d.ts +14 -2
- package/dist/finops.d.ts.map +1 -1
- package/dist/finops.js +15 -1
- package/dist/finops.js.map +1 -1
- package/dist/gateDecisions.d.ts +18 -0
- package/dist/gateDecisions.d.ts.map +1 -0
- package/dist/gateDecisions.js +20 -0
- package/dist/gateDecisions.js.map +1 -0
- package/dist/gateIdentity.d.ts +23 -0
- package/dist/gateIdentity.d.ts.map +1 -0
- package/dist/gateIdentity.js +32 -0
- package/dist/gateIdentity.js.map +1 -0
- package/dist/gateKind.d.ts +172 -0
- package/dist/gateKind.d.ts.map +1 -0
- package/dist/gateKind.js +160 -0
- package/dist/gateKind.js.map +1 -0
- package/dist/gateLimits.d.ts +170 -0
- package/dist/gateLimits.d.ts.map +1 -0
- package/dist/gateLimits.js +96 -0
- package/dist/gateLimits.js.map +1 -0
- package/dist/gitRemote.d.ts +17 -0
- package/dist/gitRemote.d.ts.map +1 -0
- package/dist/gitRemote.js +71 -0
- package/dist/gitRemote.js.map +1 -0
- package/dist/governanceCoverage.d.ts +3 -3
- package/dist/governanceCoverage.js +3 -3
- package/dist/guardrailIr.d.ts +3 -3
- package/dist/guardrailIr.d.ts.map +1 -1
- package/dist/guardrailIr.js +3 -3
- package/dist/guardrailIr.js.map +1 -1
- package/dist/guardrailRender.d.ts +1 -1
- package/dist/guardrailRender.js +1 -1
- package/dist/harnessRules.d.ts +74 -0
- package/dist/harnessRules.d.ts.map +1 -0
- package/dist/harnessRules.js +142 -0
- package/dist/harnessRules.js.map +1 -0
- package/dist/holdMessages.d.ts +25 -0
- package/dist/holdMessages.d.ts.map +1 -0
- package/dist/holdMessages.js +34 -0
- package/dist/holdMessages.js.map +1 -0
- package/dist/identity.d.ts +1 -1
- package/dist/identity.js +2 -2
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +36 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +141 -10
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +1 -2
- package/dist/intelligence.d.ts.map +1 -1
- package/dist/intelligence.js.map +1 -1
- package/dist/mcpBudgets.d.ts +191 -0
- package/dist/mcpBudgets.d.ts.map +1 -0
- package/dist/mcpBudgets.js +144 -0
- package/dist/mcpBudgets.js.map +1 -0
- package/dist/mcpRegistryRecord.d.ts +143 -0
- package/dist/mcpRegistryRecord.d.ts.map +1 -0
- package/dist/mcpRegistryRecord.js +229 -0
- package/dist/mcpRegistryRecord.js.map +1 -0
- package/dist/mcpToolRisk.d.ts +82 -0
- package/dist/mcpToolRisk.d.ts.map +1 -0
- package/dist/mcpToolRisk.js +334 -0
- package/dist/mcpToolRisk.js.map +1 -0
- package/dist/modelCatalog.d.ts +2 -2
- package/dist/modelCatalog.generated.js +1 -1
- package/dist/modelCatalog.generated.js.map +1 -1
- package/dist/modelCatalog.js +2 -2
- package/dist/notifications.d.ts +20 -130
- package/dist/notifications.d.ts.map +1 -1
- package/dist/notifications.js +241 -1
- package/dist/notifications.js.map +1 -1
- package/dist/phrases.d.ts +87 -0
- package/dist/phrases.d.ts.map +1 -0
- package/dist/phrases.js +241 -0
- package/dist/phrases.js.map +1 -0
- package/dist/piiDetectors.d.ts +97 -0
- package/dist/piiDetectors.d.ts.map +1 -0
- package/dist/piiDetectors.js +96 -0
- package/dist/piiDetectors.js.map +1 -0
- package/dist/piiDetectors.json +71 -0
- package/dist/policy.d.ts +1 -1
- package/dist/policy.js +1 -1
- package/dist/policyGuardrails.d.ts +127 -10
- package/dist/policyGuardrails.d.ts.map +1 -1
- package/dist/policyGuardrails.js +59 -6
- package/dist/policyGuardrails.js.map +1 -1
- package/dist/posturePresets.js +1 -1
- package/dist/posturePresets.js.map +1 -1
- package/dist/providerVerification.d.ts +2 -2
- package/dist/providerVerification.js +2 -2
- package/dist/providers.d.ts +4 -4
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +11 -6
- package/dist/providers.js.map +1 -1
- package/dist/regoBuiltins.d.ts +42 -0
- package/dist/regoBuiltins.d.ts.map +1 -0
- package/dist/regoBuiltins.js +732 -0
- package/dist/regoBuiltins.js.map +1 -0
- package/dist/regoRules.d.ts +105 -0
- package/dist/regoRules.d.ts.map +1 -0
- package/dist/regoRules.js +407 -0
- package/dist/regoRules.js.map +1 -0
- package/dist/ruleLoadFailures.d.ts +15 -0
- package/dist/ruleLoadFailures.d.ts.map +1 -0
- package/dist/ruleLoadFailures.js +26 -0
- package/dist/ruleLoadFailures.js.map +1 -0
- package/dist/scriptScan.d.ts +5 -5
- package/dist/scriptScan.js +3 -3
- package/dist/sequence.d.ts +52 -0
- package/dist/sequence.d.ts.map +1 -0
- package/dist/sequence.js +127 -0
- package/dist/sequence.js.map +1 -0
- package/dist/session.d.ts +1 -1
- package/dist/session.js +1 -1
- package/dist/skillScan.d.ts +3 -3
- package/dist/skillScan.d.ts.map +1 -1
- package/dist/skillScan.js +26 -4
- package/dist/skillScan.js.map +1 -1
- package/dist/sop.d.ts +24 -11
- package/dist/sop.d.ts.map +1 -1
- package/dist/sop.js +10 -9
- package/dist/sop.js.map +1 -1
- package/dist/sourceProviders.d.ts +1 -8
- package/dist/sourceProviders.d.ts.map +1 -1
- package/dist/sourceProviders.js +2 -9
- package/dist/sourceProviders.js.map +1 -1
- package/dist/ssoGroupClearance.d.ts +119 -0
- package/dist/ssoGroupClearance.d.ts.map +1 -0
- package/dist/ssoGroupClearance.js +196 -0
- package/dist/ssoGroupClearance.js.map +1 -0
- package/dist/sync.d.ts +42 -14
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +3 -3
- package/dist/sync.js.map +1 -1
- package/dist/taskManagement.d.ts +0 -2
- package/dist/taskManagement.d.ts.map +1 -1
- package/dist/taskManagement.js +0 -2
- package/dist/taskManagement.js.map +1 -1
- package/dist/toolPoison.d.ts +33 -0
- package/dist/toolPoison.d.ts.map +1 -0
- package/dist/toolPoison.js +85 -0
- package/dist/toolPoison.js.map +1 -0
- package/dist/usage.d.ts +186 -0
- package/dist/usage.d.ts.map +1 -1
- package/dist/wasmBinary.d.ts +25 -0
- package/dist/wasmBinary.d.ts.map +1 -0
- package/dist/wasmBinary.js +111 -0
- package/dist/wasmBinary.js.map +1 -0
- package/dist/wasmFuel.d.ts +52 -0
- package/dist/wasmFuel.d.ts.map +1 -0
- package/dist/wasmFuel.js +320 -0
- package/dist/wasmFuel.js.map +1 -0
- package/dist/wasmMemoryCap.d.ts +21 -0
- package/dist/wasmMemoryCap.d.ts.map +1 -0
- package/dist/wasmMemoryCap.js +58 -0
- package/dist/wasmMemoryCap.js.map +1 -0
- package/dist/workspaceSettings.d.ts +126 -17
- package/dist/workspaceSettings.d.ts.map +1 -1
- package/dist/workspaceSettings.js +21 -2
- package/dist/workspaceSettings.js.map +1 -1
- package/package.json +2 -2
package/dist/anomaly.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* corrective prompt card system, trust scoring, and ARE probe battery.
|
|
6
6
|
*
|
|
7
7
|
* HLD §3.5 (Anomaly Detection), HLD §7.7 (Drift Detector)
|
|
8
|
-
* LLD #5 — Anomaly Detection + ARE
|
|
9
8
|
*
|
|
10
9
|
* @module
|
|
11
10
|
*/
|
|
@@ -30,7 +29,7 @@ export interface AnomalyEvent {
|
|
|
30
29
|
* Full classification result from the anomaly detector.
|
|
31
30
|
* Includes severity mapping and whether an incident was created.
|
|
32
31
|
*
|
|
33
|
-
*
|
|
32
|
+
* classifyAnomaly() return type
|
|
34
33
|
*/
|
|
35
34
|
export interface AnomalyClassification {
|
|
36
35
|
/** Whether an anomaly was detected. */
|
|
@@ -59,7 +58,6 @@ export type { AnomalySeverity };
|
|
|
59
58
|
* Static mapping from anomaly type to default severity.
|
|
60
59
|
*
|
|
61
60
|
* HLD §3.5 — 12-category table, Alert Route column
|
|
62
|
-
* LLD #5 Appendix B
|
|
63
61
|
*/
|
|
64
62
|
/**
|
|
65
63
|
* Severity per anomaly category.
|
|
@@ -107,7 +105,7 @@ export type ProbeType = 'PATTERN' | 'SCHEMA' | 'LLM';
|
|
|
107
105
|
/**
|
|
108
106
|
* Result from an individual ARE probe execution.
|
|
109
107
|
*
|
|
110
|
-
*
|
|
108
|
+
* runProbes() return type
|
|
111
109
|
*/
|
|
112
110
|
export interface ProbeResult {
|
|
113
111
|
/** Probe tier. */
|
|
@@ -130,7 +128,7 @@ export interface ProbeResult {
|
|
|
130
128
|
/**
|
|
131
129
|
* Trust score for a user/agent within a workspace.
|
|
132
130
|
*
|
|
133
|
-
*
|
|
131
|
+
* Trust Score Algorithm
|
|
134
132
|
* Decay: score * 0.85 per anomaly
|
|
135
133
|
* Boost: score * 1.02 per clean session
|
|
136
134
|
* Clamped to [0, 100]. Initial: 80.
|
|
@@ -156,7 +154,7 @@ export interface TrustScoreResult {
|
|
|
156
154
|
/**
|
|
157
155
|
* Result of a trust score update operation.
|
|
158
156
|
*
|
|
159
|
-
*
|
|
157
|
+
* updateTrustScore() return type
|
|
160
158
|
*/
|
|
161
159
|
export interface TrustScoreUpdate {
|
|
162
160
|
/** Previous score before update. */
|
|
@@ -170,8 +168,6 @@ export interface TrustScoreUpdate {
|
|
|
170
168
|
}
|
|
171
169
|
/**
|
|
172
170
|
* Events that can modify a trust score.
|
|
173
|
-
*
|
|
174
|
-
* LLD #5 §4.4
|
|
175
171
|
*/
|
|
176
172
|
export interface TrustEvent {
|
|
177
173
|
type: 'ANOMALY_DETECTED' | 'CLEAN_SESSION';
|
|
@@ -212,7 +208,7 @@ export interface CapabilityMissEvent {
|
|
|
212
208
|
/**
|
|
213
209
|
* Input for recording a capability miss.
|
|
214
210
|
*
|
|
215
|
-
*
|
|
211
|
+
* recordCapabilityMiss() parameter
|
|
216
212
|
*/
|
|
217
213
|
export interface CapabilityMissInput {
|
|
218
214
|
workspaceId: string;
|
|
@@ -232,7 +228,7 @@ export type DriftDirection = 'POSITIVE_DRIFT' | 'NEGATIVE_DRIFT' | 'NEUTRAL_DRIF
|
|
|
232
228
|
/**
|
|
233
229
|
* Drift detection event payload.
|
|
234
230
|
*
|
|
235
|
-
*
|
|
231
|
+
* anomaly.drift.detected event
|
|
236
232
|
*/
|
|
237
233
|
export interface DriftEvent {
|
|
238
234
|
workspaceId: string;
|
package/dist/anomaly.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anomaly.d.ts","sourceRoot":"","sources":["../src/anomaly.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"anomaly.d.ts","sourceRoot":"","sources":["../src/anomaly.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAI7C;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,4DAA4D;IAC5D,IAAI,EAAE,WAAW,CAAA;IAEjB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|
|
|
6
6
|
* corrective prompt card system, trust scoring, and ARE probe battery.
|
|
7
7
|
*
|
|
8
8
|
* HLD §3.5 (Anomaly Detection), HLD §7.7 (Drift Detector)
|
|
9
|
-
* LLD #5 — Anomaly Detection + ARE
|
|
10
9
|
*
|
|
11
10
|
* @module
|
|
12
11
|
*/
|
|
@@ -16,7 +15,6 @@ exports.ANOMALY_SEVERITY_MAP = void 0;
|
|
|
16
15
|
* Static mapping from anomaly type to default severity.
|
|
17
16
|
*
|
|
18
17
|
* HLD §3.5 — 12-category table, Alert Route column
|
|
19
|
-
* LLD #5 Appendix B
|
|
20
18
|
*/
|
|
21
19
|
/**
|
|
22
20
|
* Severity per anomaly category.
|
package/dist/anomaly.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anomaly.js","sourceRoot":"","sources":["../src/anomaly.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"anomaly.js","sourceRoot":"","sources":["../src/anomaly.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAoEH;;;;GAIG;AACH;;;;;GAKG;AACH,8DAAgE;AAAvD,wHAAA,oBAAoB,OAAA"}
|
package/dist/api-contracts.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare const CreateSessionSchema: z.ZodObject<{
|
|
|
31
31
|
/** Execution mode — defaults to STANDARD on the server. */
|
|
32
32
|
executionMode: z.ZodOptional<z.ZodEnum<["STANDARD" | "PLAN_ONLY" | "SHADOW" | "AUTONOMOUS", ...("STANDARD" | "PLAN_ONLY" | "SHADOW" | "AUTONOMOUS")[]]>>;
|
|
33
33
|
/**
|
|
34
|
-
* The local proxy process this session's traces are filed under
|
|
34
|
+
* The local proxy process this session's traces are filed under.
|
|
35
35
|
* When set, the server records the git/task context on the row it derives
|
|
36
36
|
* for that process's traces — a PROXY row named by the server, never a new
|
|
37
37
|
* `ses_` id — and ignores `executionMode` / `userId`. Mutually exclusive with
|
package/dist/api-contracts.js
CHANGED
|
@@ -41,7 +41,7 @@ exports.CreateSessionSchema = zod_1.z.object({
|
|
|
41
41
|
/** Execution mode — defaults to STANDARD on the server. */
|
|
42
42
|
executionMode: zod_1.z.enum(constValues(enums_js_1.ExecutionMode)).optional(),
|
|
43
43
|
/**
|
|
44
|
-
* The local proxy process this session's traces are filed under
|
|
44
|
+
* The local proxy process this session's traces are filed under.
|
|
45
45
|
* When set, the server records the git/task context on the row it derives
|
|
46
46
|
* for that process's traces — a PROXY row named by the server, never a new
|
|
47
47
|
* `ses_` id — and ignores `executionMode` / `userId`. Mutually exclusive with
|
package/dist/attenuation.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Attenuation & GDPR types
|
|
2
|
+
* Attenuation & GDPR types (Enterprise Identity & Compliance)
|
|
3
3
|
*
|
|
4
4
|
* DCT Token Attenuation (Patent Family A), OBO Ephemeral Tokens,
|
|
5
5
|
* PointerMemory GDPR erasure, and SSO Group Privilege Scoping.
|
package/dist/attenuation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Attenuation & GDPR types
|
|
3
|
+
* Attenuation & GDPR types (Enterprise Identity & Compliance)
|
|
4
4
|
*
|
|
5
5
|
* DCT Token Attenuation (Patent Family A), OBO Ephemeral Tokens,
|
|
6
6
|
* PointerMemory GDPR erasure, and SSO Group Privilege Scoping.
|
package/dist/auth.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auth + RBAC Types — Shared across control plane services.
|
|
3
3
|
*
|
|
4
|
-
* LLD #7 — Auth, RBAC, Dashboard API
|
|
5
4
|
* HLD §5.1 — Zero-Trust Perimeter
|
|
6
5
|
*
|
|
7
6
|
* @module
|
|
@@ -21,11 +20,11 @@ export interface AuthContext {
|
|
|
21
20
|
email: string;
|
|
22
21
|
/** RBAC role within the workspace. */
|
|
23
22
|
role: WorkspaceRole;
|
|
24
|
-
/** Cross-workspace user ID
|
|
23
|
+
/** Cross-workspace user ID. Optional for pre-migration members. */
|
|
25
24
|
userId?: string;
|
|
26
25
|
/**
|
|
27
|
-
* The org the workspace belongs to (denormalized `workspaces.orgId
|
|
28
|
-
*
|
|
26
|
+
* The org the workspace belongs to (denormalized `workspaces.orgId`).
|
|
27
|
+
* Optional: cached auth entries written before this field
|
|
29
28
|
* existed lack it, and readers must treat absence as "unknown", never as
|
|
30
29
|
* "no org" — the proxy's cell org-pinning revalidates via the control
|
|
31
30
|
* plane in that case rather than guessing.
|
|
@@ -245,7 +244,7 @@ export declare const OrgSignupInputSchema: z.ZodObject<{
|
|
|
245
244
|
orgName: z.ZodString;
|
|
246
245
|
/**
|
|
247
246
|
* The company's own domain (e.g. "acme.com") — informational, stored in
|
|
248
|
-
* `orgs.settings.domain
|
|
247
|
+
* `orgs.settings.domain`. Deliberately NOT the cell hostname:
|
|
249
248
|
* the org's slug is the subdomain under gateway.intutic.ai, so no domain
|
|
250
249
|
* verification is needed here.
|
|
251
250
|
*/
|
|
@@ -346,7 +345,7 @@ export declare const CreateApiKeyInputSchema: z.ZodObject<{
|
|
|
346
345
|
/**
|
|
347
346
|
* Automation key: exempt from the `ssoKeyMaxIdleDays` recency gate, because its
|
|
348
347
|
* owner may never log in interactively. Still bound to the member's active flag
|
|
349
|
-
* and still revocable, so offboarding applies
|
|
348
|
+
* and still revocable, so offboarding applies.
|
|
350
349
|
*/
|
|
351
350
|
isServiceAccount: z.ZodDefault<z.ZodBoolean>;
|
|
352
351
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -389,10 +388,12 @@ export interface ApiKeyInfo {
|
|
|
389
388
|
lastUsedAt: string | null;
|
|
390
389
|
revokedAt: string | null;
|
|
391
390
|
createdAt: string;
|
|
391
|
+
/** An automation key, exempt from the SSO-recency window (see `CreateApiKeyInputSchema`). */
|
|
392
|
+
isServiceAccount: boolean;
|
|
392
393
|
}
|
|
393
394
|
/**
|
|
394
395
|
* Workspace dashboard summary — aggregated metrics for EM Dashboard.
|
|
395
|
-
* Phase 1 provides JSON API; the EM Dashboard UI is Phase 2
|
|
396
|
+
* Phase 1 provides JSON API; the EM Dashboard UI is Phase 2.
|
|
396
397
|
* HLD §8b.1
|
|
397
398
|
*/
|
|
398
399
|
export interface DashboardSummary {
|
|
@@ -400,7 +401,7 @@ export interface DashboardSummary {
|
|
|
400
401
|
activeSessions: number;
|
|
401
402
|
/**
|
|
402
403
|
* Sessions opened with `executionMode: 'SANDBOX'` in the last 30 days —
|
|
403
|
-
* `intutic exec --sandbox` runs
|
|
404
|
+
* `intutic exec --sandbox` runs. A 30-day window rather than
|
|
404
405
|
* "active" because a sandbox run is typically short-lived.
|
|
405
406
|
*/
|
|
406
407
|
sandboxSessions30d: number;
|
|
@@ -484,7 +485,7 @@ export interface DashboardSummary {
|
|
|
484
485
|
savedUsd: number;
|
|
485
486
|
savingsPercent: number;
|
|
486
487
|
/**
|
|
487
|
-
* Provider prompt-cache reads
|
|
488
|
+
* Provider prompt-cache reads over the same window — a
|
|
488
489
|
* SEPARATE population from `savedUsd`. A request can show heavy
|
|
489
490
|
* cache-read activity while `savedUsd` is flat or negative (the router
|
|
490
491
|
* moved off a model that was warm), so this must never be folded into
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAI/C;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAA;IAChB,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAA;I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AAQ,GAAG,KAAK,CAAA;KACjD,CAAC,CAAA;IACF,YAAY,CAAC,EAAE,KAAK,CAAC;QACnB,IAAI,EAAE,MAAM,CAAA;QACZ,aAAa,EAAE,MAAM,CAAA;QACrB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAC,CAAA;IACF,oBAAoB,CAAC,EAAE,KAAK,CAAC;QAC3B,QAAQ,EAAE,MAAM,CAAA;QAChB,MAAM,EAAE,MAAM,CAAA;QACd,cAAc,EAAE,MAAM,CAAA;KACvB,CAAC,CAAA;IACF;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,WAAW,CAAC,EAAE;QACZ,UAAU,EAAE,MAAM,CAAA;QAClB,aAAa,EAAE,MAAM,CAAA;QACrB;;;;;;;;WAQG;QACH,QAAQ,EAAE,MAAM,CAAA;QAChB,cAAc,EAAE,MAAM,CAAA;QACtB;;;;;;WAMG;QACH,oBAAoB,EAAE,MAAM,CAAA;KAC7B,CAAA;IACD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B"}
|
package/dist/auth.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Auth + RBAC Types — Shared across control plane services.
|
|
4
4
|
*
|
|
5
|
-
* LLD #7 — Auth, RBAC, Dashboard API
|
|
6
5
|
* HLD §5.1 — Zero-Trust Perimeter
|
|
7
6
|
*
|
|
8
7
|
* @module
|
|
@@ -51,7 +50,7 @@ exports.InviteMemberInputSchema = zod_1.z.object({
|
|
|
51
50
|
exports.UpdateRoleInputSchema = zod_1.z.object({
|
|
52
51
|
role: zod_1.z.enum(['OWNER', 'ADMIN', 'EM', 'DEVELOPER', 'VIEWER']),
|
|
53
52
|
});
|
|
54
|
-
// ─── PLG Self-Serve Signup
|
|
53
|
+
// ─── PLG Self-Serve Signup ───────────────────────────────────
|
|
55
54
|
/** PLG signup input schema. */
|
|
56
55
|
exports.SignupInputSchema = zod_1.z.object({
|
|
57
56
|
email: zod_1.z.string().email(),
|
|
@@ -75,7 +74,7 @@ exports.OrgSignupInputSchema = zod_1.z.object({
|
|
|
75
74
|
orgName: zod_1.z.string().min(1).max(128),
|
|
76
75
|
/**
|
|
77
76
|
* The company's own domain (e.g. "acme.com") — informational, stored in
|
|
78
|
-
* `orgs.settings.domain
|
|
77
|
+
* `orgs.settings.domain`. Deliberately NOT the cell hostname:
|
|
79
78
|
* the org's slug is the subdomain under gateway.intutic.ai, so no domain
|
|
80
79
|
* verification is needed here.
|
|
81
80
|
*/
|
|
@@ -118,7 +117,7 @@ exports.CreateApiKeyInputSchema = zod_1.z.object({
|
|
|
118
117
|
/**
|
|
119
118
|
* Automation key: exempt from the `ssoKeyMaxIdleDays` recency gate, because its
|
|
120
119
|
* owner may never log in interactively. Still bound to the member's active flag
|
|
121
|
-
* and still revocable, so offboarding applies
|
|
120
|
+
* and still revocable, so offboarding applies.
|
|
122
121
|
*/
|
|
123
122
|
isServiceAccount: zod_1.z.boolean().default(false),
|
|
124
123
|
});
|
package/dist/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,6BAAuB;AA6DvB,wEAAwE;AAExE,4CAA4C;AAC/B,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;IAClC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CACrC,CAAC,CAAA;AAaF,wEAAwE;AAExE,mDAAmD;AACtC,QAAA,mBAAmB,GAAG,OAAC,CAA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statements every blocking text scanner
|
|
3
|
+
* refuses in tool arguments.
|
|
4
|
+
*
|
|
5
|
+
* The control plane's DLP (`POST /api/v1/hook-gate`, which both gate SDKs'
|
|
6
|
+
* server tier, the AgentCore interceptor and the QM security screen run) and
|
|
7
|
+
* the MCP governance proxy's DLP read both from here. The harness hook gates
|
|
8
|
+
* carry the same phrases as the `destructive.sql_drop` rule
|
|
9
|
+
* (`protectedPaths.ts`). Each statement is matched as words by the phrase
|
|
10
|
+
* matcher (phrases.ts), bounded at both ends: any separator the shell or the
|
|
11
|
+
* database reads as a word break may split the keywords (a comment, an escaped
|
|
12
|
+
* newline, a line continuation, `--` options), but `DROP TABLES` and
|
|
13
|
+
* `truncate --size 0 table.log` are not the statement. No regex runs on the
|
|
14
|
+
* text, so crafted input cannot make the scan backtrack.
|
|
15
|
+
* `fixtures/destructive-sql-vectors.json` holds every implementation to the
|
|
16
|
+
* same answers.
|
|
17
|
+
*
|
|
18
|
+
* A text rule, not a SQL parser: a quoted mention (`SELECT 'drop table'`) is
|
|
19
|
+
* refused too, because quoting is how a shell command carries the real
|
|
20
|
+
* statement (`psql -c 'DROP TABLE x'`). The proxy's `sql_guard`, which parses
|
|
21
|
+
* the SQL a client will run, is the one that tells them apart.
|
|
22
|
+
*/
|
|
23
|
+
import { type PhraseText } from './phrases.js';
|
|
24
|
+
/** The statements a text scanner refuses, and the phrase that finds each. */
|
|
25
|
+
export declare const DESTRUCTIVE_SQL_STATEMENTS: readonly [{
|
|
26
|
+
readonly statement: "DROP TABLE";
|
|
27
|
+
readonly phrase: "drop table";
|
|
28
|
+
readonly description: "SQL DROP TABLE statement";
|
|
29
|
+
}, {
|
|
30
|
+
readonly statement: "DROP DATABASE";
|
|
31
|
+
readonly phrase: "drop database";
|
|
32
|
+
readonly description: "SQL DROP DATABASE statement";
|
|
33
|
+
}, {
|
|
34
|
+
readonly statement: "DROP SCHEMA";
|
|
35
|
+
readonly phrase: "drop schema";
|
|
36
|
+
readonly description: "SQL DROP SCHEMA statement";
|
|
37
|
+
}, {
|
|
38
|
+
readonly statement: "TRUNCATE TABLE";
|
|
39
|
+
readonly phrase: "truncate table";
|
|
40
|
+
readonly description: "SQL TRUNCATE TABLE statement";
|
|
41
|
+
}];
|
|
42
|
+
export type DestructiveSqlStatement = (typeof DESTRUCTIVE_SQL_STATEMENTS)[number]['statement'];
|
|
43
|
+
/**
|
|
44
|
+
* The destructive statements `text` contains, in {@link DESTRUCTIVE_SQL_STATEMENTS}
|
|
45
|
+
* order. Pass a {@link PhraseText} already cut from the text to reuse it.
|
|
46
|
+
*/
|
|
47
|
+
export declare function findDestructiveSql(text: string | PhraseText): Array<(typeof DESTRUCTIVE_SQL_STATEMENTS)[number]>;
|
|
48
|
+
//# sourceMappingURL=destructiveSql.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destructiveSql.d.ts","sourceRoot":"","sources":["../src/destructiveSql.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAyB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAA;AAErE,6EAA6E;AAC7E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;EAK7B,CAAA;AAEV,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAA;AAE9F;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,KAAK,CAAC,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC,CAGhH"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DESTRUCTIVE_SQL_STATEMENTS = void 0;
|
|
4
|
+
exports.findDestructiveSql = findDestructiveSql;
|
|
5
|
+
/**
|
|
6
|
+
* Destructive SQL as a text rule: the statements every blocking text scanner
|
|
7
|
+
* refuses in tool arguments.
|
|
8
|
+
*
|
|
9
|
+
* The control plane's DLP (`POST /api/v1/hook-gate`, which both gate SDKs'
|
|
10
|
+
* server tier, the AgentCore interceptor and the QM security screen run) and
|
|
11
|
+
* the MCP governance proxy's DLP read both from here. The harness hook gates
|
|
12
|
+
* carry the same phrases as the `destructive.sql_drop` rule
|
|
13
|
+
* (`protectedPaths.ts`). Each statement is matched as words by the phrase
|
|
14
|
+
* matcher (phrases.ts), bounded at both ends: any separator the shell or the
|
|
15
|
+
* database reads as a word break may split the keywords (a comment, an escaped
|
|
16
|
+
* newline, a line continuation, `--` options), but `DROP TABLES` and
|
|
17
|
+
* `truncate --size 0 table.log` are not the statement. No regex runs on the
|
|
18
|
+
* text, so crafted input cannot make the scan backtrack.
|
|
19
|
+
* `fixtures/destructive-sql-vectors.json` holds every implementation to the
|
|
20
|
+
* same answers.
|
|
21
|
+
*
|
|
22
|
+
* A text rule, not a SQL parser: a quoted mention (`SELECT 'drop table'`) is
|
|
23
|
+
* refused too, because quoting is how a shell command carries the real
|
|
24
|
+
* statement (`psql -c 'DROP TABLE x'`). The proxy's `sql_guard`, which parses
|
|
25
|
+
* the SQL a client will run, is the one that tells them apart.
|
|
26
|
+
*/
|
|
27
|
+
const phrases_js_1 = require("./phrases.js");
|
|
28
|
+
/** The statements a text scanner refuses, and the phrase that finds each. */
|
|
29
|
+
exports.DESTRUCTIVE_SQL_STATEMENTS = [
|
|
30
|
+
{ statement: 'DROP TABLE', phrase: 'drop table', description: 'SQL DROP TABLE statement' },
|
|
31
|
+
{ statement: 'DROP DATABASE', phrase: 'drop database', description: 'SQL DROP DATABASE statement' },
|
|
32
|
+
{ statement: 'DROP SCHEMA', phrase: 'drop schema', description: 'SQL DROP SCHEMA statement' },
|
|
33
|
+
{ statement: 'TRUNCATE TABLE', phrase: 'truncate table', description: 'SQL TRUNCATE TABLE statement' },
|
|
34
|
+
];
|
|
35
|
+
/**
|
|
36
|
+
* The destructive statements `text` contains, in {@link DESTRUCTIVE_SQL_STATEMENTS}
|
|
37
|
+
* order. Pass a {@link PhraseText} already cut from the text to reuse it.
|
|
38
|
+
*/
|
|
39
|
+
function findDestructiveSql(text) {
|
|
40
|
+
const words = typeof text === 'string' ? (0, phrases_js_1.phraseText)(text) : text;
|
|
41
|
+
return exports.DESTRUCTIVE_SQL_STATEMENTS.filter((s) => (0, phrases_js_1.hasPhrase)(words, s.phrase, true));
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=destructiveSql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destructiveSql.js","sourceRoot":"","sources":["../src/destructiveSql.ts"],"names":[],"mappings":";;;AAsCA,gDAGC;AAzCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,6CAAqE;AAErE,6EAA6E;AAChE,QAAA,0BAA0B,GAAG;IACxC,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,0BAA0B,EAAE;IAC1F,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,6BAA6B,EAAE;IACnG,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,2BAA2B,EAAE;IAC7F,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,8BAA8B,EAAE;CAC9F,CAAA;AAIV;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,IAAyB;IAC1D,MAAM,KAAK,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,uBAAU,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IAChE,OAAO,kCAA0B,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,sBAAS,EAAC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAA;AACnF,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* devInventory.ts — the AI inventory a connected developer machine reports.
|
|
3
|
+
*
|
|
4
|
+
* `intutic connect` collects it (the sync daemon's `inventory.ts`): the AI
|
|
5
|
+
* coding harnesses the machine has, whether Intutic's gate runs for each, the
|
|
6
|
+
* MCP servers their configs declare, and the skill bundles on disk. It travels
|
|
7
|
+
* as the `inventory` facet of `POST /api/v1/agents/report`, and the control
|
|
8
|
+
* plane keeps the latest copy per device with first-seen and last-seen times
|
|
9
|
+
* per item.
|
|
10
|
+
*
|
|
11
|
+
* What it may carry is deliberately narrow: names, paths relative to the home
|
|
12
|
+
* directory, content hashes and timestamps. Never file contents, environment
|
|
13
|
+
* values, command lines or URL query strings. {@link homeRelativePath} and
|
|
14
|
+
* {@link sanitizeMcpEndpoint} are where that rule is applied on the machine;
|
|
15
|
+
* the control plane applies {@link sanitizeMcpEndpoint} again on ingest, so a
|
|
16
|
+
* daemon that skipped it still cannot store a credential.
|
|
17
|
+
*
|
|
18
|
+
* @module
|
|
19
|
+
*/
|
|
20
|
+
import type { GateKind } from './gateKind.js';
|
|
21
|
+
/** Bumped when a field's meaning changes; the control plane refuses versions it does not know. */
|
|
22
|
+
export declare const DEVICE_INVENTORY_SCHEMA_VERSION = 1;
|
|
23
|
+
/** How a harness's tool calls are gated (`gateKind.ts`). */
|
|
24
|
+
export type InventoryGateKind = GateKind;
|
|
25
|
+
/** One harness found on the machine, by detection or because `intutic connect` is configured for it. */
|
|
26
|
+
export interface InventoryHarness {
|
|
27
|
+
/**
|
|
28
|
+
* A `HarnessType` value, or for the harness with two gates the gate id of
|
|
29
|
+
* the product found (`antigravity`, `gemini-cli`; see `gateIdentity.ts`).
|
|
30
|
+
*/
|
|
31
|
+
type: string;
|
|
32
|
+
/** Only where the install records it cheaply, such as a VS Code extension directory name. */
|
|
33
|
+
version?: string;
|
|
34
|
+
/** True when it is one of this machine's `intutic connect` harnesses, the ones connect installs a gate for. */
|
|
35
|
+
configured: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* True when `intutic disconnect --harness` removed Intutic from it on this
|
|
38
|
+
* machine: ungoverned by the user's choice, so its first appearance as
|
|
39
|
+
* ungoverned is not announced.
|
|
40
|
+
*/
|
|
41
|
+
disconnected?: boolean;
|
|
42
|
+
gateKind: InventoryGateKind;
|
|
43
|
+
/** For a `hook` gate, whether its gate file is on disk; null when the gate is not a file the daemon writes. */
|
|
44
|
+
gateInstalled: boolean | null;
|
|
45
|
+
/** Where the gate file was found, relative to the home directory. */
|
|
46
|
+
gateFile?: string;
|
|
47
|
+
/** Newest event this machine's gate for the harness wrote, as the daemon drained it. */
|
|
48
|
+
lastHookEventAt: string | null;
|
|
49
|
+
/** Newest `guards_disabled` event: the gate ran with `INTUTIC_GUARD_DISABLE=1`. */
|
|
50
|
+
guardsDisabledAt: string | null;
|
|
51
|
+
}
|
|
52
|
+
/** One MCP server a harness config on the machine declares. */
|
|
53
|
+
export interface InventoryMcpServer {
|
|
54
|
+
server: string;
|
|
55
|
+
harness: string;
|
|
56
|
+
transport: 'stdio' | 'http' | 'sse' | 'unknown';
|
|
57
|
+
/** True when the MCP governance proxy fronts it. */
|
|
58
|
+
wrapped: boolean;
|
|
59
|
+
/** A remote server's URL after {@link sanitizeMcpEndpoint}; absent for a local (stdio) server. */
|
|
60
|
+
endpoint?: string;
|
|
61
|
+
/** Why the harness runs it without the proxy, when the daemon can say. */
|
|
62
|
+
ungovernedReason?: string;
|
|
63
|
+
}
|
|
64
|
+
/** One skill bundle (a directory holding `SKILL.md`). */
|
|
65
|
+
export interface InventorySkill {
|
|
66
|
+
name: string;
|
|
67
|
+
/** The directory it was found in, relative to the workspace (`.agents/skills`) or the home directory (`~/.claude/skills`). */
|
|
68
|
+
source: string;
|
|
69
|
+
/** sha256 of `SKILL.md`; absent when it could not be read. */
|
|
70
|
+
sha256?: string;
|
|
71
|
+
scanned: boolean;
|
|
72
|
+
clean: boolean;
|
|
73
|
+
findingsCount: number;
|
|
74
|
+
/** Files bundled next to `SKILL.md`. */
|
|
75
|
+
scriptCount: number;
|
|
76
|
+
}
|
|
77
|
+
/** The local proxy's last scheduled guard-liveness probe run. */
|
|
78
|
+
export interface InventoryGuardProbes {
|
|
79
|
+
total: number;
|
|
80
|
+
failed: number;
|
|
81
|
+
/** Unix seconds. */
|
|
82
|
+
ranAt: number;
|
|
83
|
+
}
|
|
84
|
+
/** The whole snapshot one machine sends. */
|
|
85
|
+
export interface DeviceInventory {
|
|
86
|
+
schemaVersion: typeof DEVICE_INVENTORY_SCHEMA_VERSION;
|
|
87
|
+
collectedAt: string;
|
|
88
|
+
/** The `intutic connect` workspace root, relative to the home directory. */
|
|
89
|
+
workspace: string;
|
|
90
|
+
harnesses: InventoryHarness[];
|
|
91
|
+
mcpServers: InventoryMcpServer[];
|
|
92
|
+
skills: InventorySkill[];
|
|
93
|
+
/** Present only when the local proxy answered. */
|
|
94
|
+
guardProbes?: InventoryGuardProbes;
|
|
95
|
+
}
|
|
96
|
+
/** The machine a report comes from: the same fingerprint `intutic enforce` reports to `/api/v1/devices`. */
|
|
97
|
+
export interface InventoryDeviceIdentity {
|
|
98
|
+
fingerprint: string;
|
|
99
|
+
hostname: string;
|
|
100
|
+
platform: string;
|
|
101
|
+
cliVersion?: string;
|
|
102
|
+
}
|
|
103
|
+
/** What a path outside the home directory is reported as. */
|
|
104
|
+
export declare const REDACTED_PATH = "[redacted]";
|
|
105
|
+
/**
|
|
106
|
+
* `~/...` for a path inside `home`, `~` for `home` itself, and
|
|
107
|
+
* {@link REDACTED_PATH} for anything else: a path outside the home directory
|
|
108
|
+
* names nothing the inventory needs, and may name another user's files.
|
|
109
|
+
*/
|
|
110
|
+
export declare function homeRelativePath(absolutePath: string, home: string): string;
|
|
111
|
+
/** Replaces a URL path segment that looks like a token. */
|
|
112
|
+
export declare const REDACTED_SEGMENT = "[redacted]";
|
|
113
|
+
/**
|
|
114
|
+
* A remote MCP server's URL with what could be a credential removed: the
|
|
115
|
+
* user name and password, the query string, the fragment, and any path
|
|
116
|
+
* segment that looks like a token. `undefined` for anything that is not an
|
|
117
|
+
* http(s) or ws(s) URL, including one still holding `${VAR}` in its host.
|
|
118
|
+
*/
|
|
119
|
+
export declare function sanitizeMcpEndpoint(raw: string): string | undefined;
|
|
120
|
+
//# sourceMappingURL=devInventory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devInventory.d.ts","sourceRoot":"","sources":["../src/devInventory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,kGAAkG;AAClG,eAAO,MAAM,+BAA+B,IAAI,CAAA;AAEhD,4DAA4D;AAC5D,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAA;AAExC,wGAAwG;AACxG,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,6FAA6F;IAC7F,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,+GAA+G;IAC/G,UAAU,EAAE,OAAO,CAAA;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,+GAA+G;IAC/G,aAAa,EAAE,OAAO,GAAG,IAAI,CAAA;IAC7B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wFAAwF;IACxF,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,mFAAmF;IACnF,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;CAChC;AAED,+DAA+D;AAC/D,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;IAC/C,o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E,MAAM,GAAG,MAAM,CAO3E;AAED,2DAA2D;AAC3D,eAAO,MAAM,gBAAgB,eAAe,CAAA;AAW5C;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAenE"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* devInventory.ts — the AI inventory a connected developer machine reports.
|
|
4
|
+
*
|
|
5
|
+
* `intutic connect` collects it (the sync daemon's `inventory.ts`): the AI
|
|
6
|
+
* coding harnesses the machine has, whether Intutic's gate runs for each, the
|
|
7
|
+
* MCP servers their configs declare, and the skill bundles on disk. It travels
|
|
8
|
+
* as the `inventory` facet of `POST /api/v1/agents/report`, and the control
|
|
9
|
+
* plane keeps the latest copy per device with first-seen and last-seen times
|
|
10
|
+
* per item.
|
|
11
|
+
*
|
|
12
|
+
* What it may carry is deliberately narrow: names, paths relative to the home
|
|
13
|
+
* directory, content hashes and timestamps. Never file contents, environment
|
|
14
|
+
* values, command lines or URL query strings. {@link homeRelativePath} and
|
|
15
|
+
* {@link sanitizeMcpEndpoint} are where that rule is applied on the machine;
|
|
16
|
+
* the control plane applies {@link sanitizeMcpEndpoint} again on ingest, so a
|
|
17
|
+
* daemon that skipped it still cannot store a credential.
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.REDACTED_SEGMENT = exports.REDACTED_PATH = exports.DEVICE_INVENTORY_SCHEMA_VERSION = void 0;
|
|
23
|
+
exports.homeRelativePath = homeRelativePath;
|
|
24
|
+
exports.sanitizeMcpEndpoint = sanitizeMcpEndpoint;
|
|
25
|
+
/** Bumped when a field's meaning changes; the control plane refuses versions it does not know. */
|
|
26
|
+
exports.DEVICE_INVENTORY_SCHEMA_VERSION = 1;
|
|
27
|
+
/** What a path outside the home directory is reported as. */
|
|
28
|
+
exports.REDACTED_PATH = '[redacted]';
|
|
29
|
+
/**
|
|
30
|
+
* `~/...` for a path inside `home`, `~` for `home` itself, and
|
|
31
|
+
* {@link REDACTED_PATH} for anything else: a path outside the home directory
|
|
32
|
+
* names nothing the inventory needs, and may name another user's files.
|
|
33
|
+
*/
|
|
34
|
+
function homeRelativePath(absolutePath, home) {
|
|
35
|
+
const sep = home.includes('\\') && !home.includes('/') ? '\\' : '/';
|
|
36
|
+
const base = home.endsWith(sep) ? home.slice(0, -1) : home;
|
|
37
|
+
if (base === '')
|
|
38
|
+
return exports.REDACTED_PATH;
|
|
39
|
+
if (absolutePath === base)
|
|
40
|
+
return '~';
|
|
41
|
+
if (absolutePath.startsWith(base + sep))
|
|
42
|
+
return `~/${absolutePath.slice(base.length + 1).split(sep).join('/')}`;
|
|
43
|
+
return exports.REDACTED_PATH;
|
|
44
|
+
}
|
|
45
|
+
/** Replaces a URL path segment that looks like a token. */
|
|
46
|
+
exports.REDACTED_SEGMENT = '[redacted]';
|
|
47
|
+
/**
|
|
48
|
+
* A path segment of 16 or more URL-safe characters mixing letters and digits.
|
|
49
|
+
* Some MCP services put the API key in the path (`/mcp/<key>/sse`); a
|
|
50
|
+
* readable route segment (`sse`, `v1`, `mcp-server`) does not look like this.
|
|
51
|
+
*/
|
|
52
|
+
function looksLikeToken(segment) {
|
|
53
|
+
return segment.length >= 16 && /^[A-Za-z0-9._~%-]+$/.test(segment) && /[A-Za-z]/.test(segment) && /[0-9]/.test(segment);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A remote MCP server's URL with what could be a credential removed: the
|
|
57
|
+
* user name and password, the query string, the fragment, and any path
|
|
58
|
+
* segment that looks like a token. `undefined` for anything that is not an
|
|
59
|
+
* http(s) or ws(s) URL, including one still holding `${VAR}` in its host.
|
|
60
|
+
*/
|
|
61
|
+
function sanitizeMcpEndpoint(raw) {
|
|
62
|
+
let url;
|
|
63
|
+
try {
|
|
64
|
+
url = new URL(raw);
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
if (!['http:', 'https:', 'ws:', 'wss:'].includes(url.protocol))
|
|
70
|
+
return undefined;
|
|
71
|
+
// A host still templated (`${MCP_HOST}`) names no server yet.
|
|
72
|
+
if (/[${}]/.test(url.hostname))
|
|
73
|
+
return undefined;
|
|
74
|
+
const path = url.pathname
|
|
75
|
+
.split('/')
|
|
76
|
+
.map((segment) => (looksLikeToken(segment) ? exports.REDACTED_SEGMENT : segment))
|
|
77
|
+
.join('/');
|
|
78
|
+
return `${url.protocol}//${url.host}${path === '/' ? '' : path}`;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=devInventory.js.map
|