@rosthq/cli 0.7.161 → 0.7.163
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/index.js +931 -635
- package/dist/index.js.map +4 -4
- package/dist/runner-serve.d.ts +19 -1
- package/dist/runner-serve.d.ts.map +1 -1
- package/dist/runner-setup-orchestrator.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29434,6 +29434,19 @@ var runnerPairingStartOutputSchema = external_exports.object({
|
|
|
29434
29434
|
expires_at: isoDateTime2,
|
|
29435
29435
|
expires_in: external_exports.number().int().nonnegative()
|
|
29436
29436
|
}).strict();
|
|
29437
|
+
var runnerPairingClaimInputSchema = external_exports.object({
|
|
29438
|
+
user_code: external_exports.string().min(8).max(12),
|
|
29439
|
+
service_key_public: external_exports.string().trim().min(1).max(1024).optional()
|
|
29440
|
+
}).strict();
|
|
29441
|
+
var runnerPairingClaimOutputSchema = external_exports.object({
|
|
29442
|
+
runner_id: uuid5,
|
|
29443
|
+
tenant_id: uuid5,
|
|
29444
|
+
runner_secret: external_exports.string().min(1),
|
|
29445
|
+
name: external_exports.string(),
|
|
29446
|
+
platform: external_exports.string(),
|
|
29447
|
+
service_key_generation: external_exports.number().int().nonnegative().optional(),
|
|
29448
|
+
service_key_bound: external_exports.boolean().optional()
|
|
29449
|
+
}).strict();
|
|
29437
29450
|
var runnerRevokeInputSchema = external_exports.object({
|
|
29438
29451
|
runner_id: uuid5
|
|
29439
29452
|
}).strict();
|
|
@@ -30506,6 +30519,43 @@ function scanSecretShapedValue(value, budget) {
|
|
|
30506
30519
|
function hasSecretShapedValue(value) {
|
|
30507
30520
|
return scanSecretShapedValue(value, { visitedNodes: 0 });
|
|
30508
30521
|
}
|
|
30522
|
+
function hasSecretShapedValueAtAnchors(value) {
|
|
30523
|
+
if (typeof value === "string" || !value || typeof value !== "object") {
|
|
30524
|
+
return hasSecretShapedValue(value);
|
|
30525
|
+
}
|
|
30526
|
+
const budget = { visitedNodes: 0 };
|
|
30527
|
+
try {
|
|
30528
|
+
if (Array.isArray(value)) {
|
|
30529
|
+
let entryCount = 0;
|
|
30530
|
+
for (const entry of value) {
|
|
30531
|
+
entryCount += 1;
|
|
30532
|
+
if (entryCount > MAX_SECRET_SHAPED_VALUE_NODES) {
|
|
30533
|
+
return true;
|
|
30534
|
+
}
|
|
30535
|
+
if (scanSecretShapedValue(entry, budget)) {
|
|
30536
|
+
return true;
|
|
30537
|
+
}
|
|
30538
|
+
}
|
|
30539
|
+
return false;
|
|
30540
|
+
}
|
|
30541
|
+
const keys = Object.keys(value);
|
|
30542
|
+
for (let index = 0; index < keys.length; index += 1) {
|
|
30543
|
+
if (index >= MAX_SECRET_SHAPED_VALUE_NODES) {
|
|
30544
|
+
return true;
|
|
30545
|
+
}
|
|
30546
|
+
const key = keys[index];
|
|
30547
|
+
if (key === void 0) {
|
|
30548
|
+
return true;
|
|
30549
|
+
}
|
|
30550
|
+
if (scanSecretShapedValue(value[key], budget)) {
|
|
30551
|
+
return true;
|
|
30552
|
+
}
|
|
30553
|
+
}
|
|
30554
|
+
return false;
|
|
30555
|
+
} catch {
|
|
30556
|
+
return true;
|
|
30557
|
+
}
|
|
30558
|
+
}
|
|
30509
30559
|
var REDACTION_SENTINEL = "[REDACTED]";
|
|
30510
30560
|
|
|
30511
30561
|
// ../../packages/protocol/src/agent-setup.ts
|
|
@@ -32927,9 +32977,43 @@ var DECISION_EVIDENCE_TARGET_KINDS = [
|
|
|
32927
32977
|
];
|
|
32928
32978
|
var decisionEvidenceTargetKindSchema = external_exports.enum(DECISION_EVIDENCE_TARGET_KINDS);
|
|
32929
32979
|
var decisionEvidenceDigestSchema = external_exports.string().regex(/^sha256:[0-9a-f]{64}$/);
|
|
32980
|
+
function isSecretShapedCommandValue(value) {
|
|
32981
|
+
return carriesSecretShapedMaterial(value);
|
|
32982
|
+
}
|
|
32983
|
+
var commandIdSchema = external_exports.string().regex(/^[a-z][a-z0-9_.-]{0,119}$/).refine((value) => !isSecretShapedCommandValue(value), {
|
|
32984
|
+
message: "command_id must not contain secret-shaped content"
|
|
32985
|
+
});
|
|
32986
|
+
var commandDecisionSummarySchema = external_exports.string().min(1).max(1e3).refine((value) => value === value.trim(), {
|
|
32987
|
+
message: "summary must use canonical edge whitespace"
|
|
32988
|
+
}).refine((value) => !isSecretShapedCommandValue(value), {
|
|
32989
|
+
message: "summary must not contain secret-shaped content"
|
|
32990
|
+
});
|
|
32991
|
+
var safeJsonValueSchema = external_exports.lazy(() => external_exports.union([
|
|
32992
|
+
external_exports.string(),
|
|
32993
|
+
external_exports.number().finite(),
|
|
32994
|
+
external_exports.boolean(),
|
|
32995
|
+
external_exports.null(),
|
|
32996
|
+
external_exports.array(safeJsonValueSchema),
|
|
32997
|
+
external_exports.record(external_exports.string(), safeJsonValueSchema)
|
|
32998
|
+
]));
|
|
32999
|
+
var safeRedactedJsonObjectSchema = external_exports.record(external_exports.string(), safeJsonValueSchema).superRefine((value, ctx) => {
|
|
33000
|
+
if (hasSecretShapedValueAtAnchors(value) || hasSecretShapedContent(value)) {
|
|
33001
|
+
ctx.addIssue({
|
|
33002
|
+
code: external_exports.ZodIssueCode.custom,
|
|
33003
|
+
message: "redacted JSON must not contain bearer tokens, claims, cookies, or secret-shaped values"
|
|
33004
|
+
});
|
|
33005
|
+
}
|
|
33006
|
+
});
|
|
33007
|
+
var commandDecisionBindingSchema = external_exports.strictObject({
|
|
33008
|
+
effectVariant: effectVariantSchema,
|
|
33009
|
+
inputDigest: decisionEvidenceDigestSchema,
|
|
33010
|
+
resourceVersionDigest: decisionEvidenceDigestSchema,
|
|
33011
|
+
summary: commandDecisionSummarySchema,
|
|
33012
|
+
safeProjection: safeRedactedJsonObjectSchema
|
|
33013
|
+
});
|
|
32930
33014
|
var uuidSchema8 = external_exports.string().uuid();
|
|
32931
33015
|
var commandDecisionEvidenceSchema = external_exports.strictObject({
|
|
32932
|
-
command_id:
|
|
33016
|
+
command_id: commandIdSchema,
|
|
32933
33017
|
evidence_mode: decisionEvidenceModeSchema,
|
|
32934
33018
|
principal_kind: decisionEvidencePrincipalKindSchema,
|
|
32935
33019
|
effect_variant: effectVariantSchema,
|
|
@@ -33008,12 +33092,21 @@ var PENDING_CONFIRMATION_V2_AUTHORITY_FIELDS = [
|
|
|
33008
33092
|
"effect_variant",
|
|
33009
33093
|
"evidence_refs"
|
|
33010
33094
|
];
|
|
33011
|
-
var
|
|
33012
|
-
external_exports.
|
|
33013
|
-
|
|
33014
|
-
|
|
33015
|
-
|
|
33016
|
-
)
|
|
33095
|
+
var evidenceRefSchema = external_exports.object({
|
|
33096
|
+
kind: external_exports.string().min(1),
|
|
33097
|
+
id: uuidSchema8
|
|
33098
|
+
}).catchall(safeJsonValueSchema).superRefine((value, ctx) => {
|
|
33099
|
+
const extras = Object.fromEntries(
|
|
33100
|
+
Object.entries(value).filter(([key]) => key !== "kind" && key !== "id")
|
|
33101
|
+
);
|
|
33102
|
+
if (hasSecretShapedValueAtAnchors(extras) || hasSecretShapedContent(extras)) {
|
|
33103
|
+
ctx.addIssue({
|
|
33104
|
+
code: external_exports.ZodIssueCode.custom,
|
|
33105
|
+
message: "evidence reference extras must not contain secret-shaped values"
|
|
33106
|
+
});
|
|
33107
|
+
}
|
|
33108
|
+
});
|
|
33109
|
+
var evidenceRefsSchema = external_exports.array(evidenceRefSchema);
|
|
33017
33110
|
var pendingConfirmationAuthoritySchema = external_exports.strictObject({
|
|
33018
33111
|
// The structural discriminator: null = V1 legacy, 2 = V2. Not an arbitrary
|
|
33019
33112
|
// smallint — the only legal non-null value is the literal 2.
|
|
@@ -33047,11 +33140,148 @@ var pendingConfirmationAuthoritySchema = external_exports.strictObject({
|
|
|
33047
33140
|
}
|
|
33048
33141
|
});
|
|
33049
33142
|
|
|
33050
|
-
// ../../packages/protocol/src/
|
|
33143
|
+
// ../../packages/protocol/src/inline-human-confirmation.ts
|
|
33051
33144
|
var uuidSchema9 = external_exports.string().uuid();
|
|
33145
|
+
var publicTokenHashSchema = external_exports.string().regex(/^[0-9a-f]{64}$/);
|
|
33146
|
+
var durableTimestampSchema2 = external_exports.union([external_exports.date(), external_exports.string().datetime({ offset: true })]);
|
|
33147
|
+
var redactedReplayArgsSchema = safeRedactedJsonObjectSchema;
|
|
33148
|
+
var safeProjectionSchema = safeRedactedJsonObjectSchema;
|
|
33149
|
+
var INLINE_HUMAN_CONFIRMATION_STATUSES = [
|
|
33150
|
+
"pending",
|
|
33151
|
+
"consumed",
|
|
33152
|
+
"expired",
|
|
33153
|
+
"superseded"
|
|
33154
|
+
];
|
|
33155
|
+
var inlineHumanConfirmationStatusSchema = external_exports.enum(INLINE_HUMAN_CONFIRMATION_STATUSES);
|
|
33156
|
+
var inlineHumanConfirmationBindingSchema = external_exports.strictObject({
|
|
33157
|
+
command_id: commandIdSchema,
|
|
33158
|
+
effect_variant: effectVariantSchema,
|
|
33159
|
+
[EFFECT_POLICY_VERSION_ALIAS_FIELD]: persistedEffectPolicyVersionSchema,
|
|
33160
|
+
binding_version: external_exports.number().int().positive().max(32767),
|
|
33161
|
+
input_digest: decisionEvidenceDigestSchema,
|
|
33162
|
+
resource_version_digest: decisionEvidenceDigestSchema,
|
|
33163
|
+
summary: commandDecisionSummarySchema,
|
|
33164
|
+
redacted_replay_args: redactedReplayArgsSchema,
|
|
33165
|
+
safe_projection: safeProjectionSchema
|
|
33166
|
+
});
|
|
33167
|
+
var inlineHumanConfirmationCreateInputSchema = external_exports.strictObject({
|
|
33168
|
+
tenant_id: uuidSchema9,
|
|
33169
|
+
public_token_hash: publicTokenHashSchema,
|
|
33170
|
+
session_owner_user_id: uuidSchema9,
|
|
33171
|
+
session_fingerprint: decisionEvidenceDigestSchema,
|
|
33172
|
+
...inlineHumanConfirmationBindingSchema.shape,
|
|
33173
|
+
expires_at: durableTimestampSchema2
|
|
33174
|
+
});
|
|
33175
|
+
var inlineHumanConfirmationConsumeInputSchema = external_exports.strictObject({
|
|
33176
|
+
tenant_id: uuidSchema9,
|
|
33177
|
+
id: uuidSchema9,
|
|
33178
|
+
session_owner_user_id: uuidSchema9,
|
|
33179
|
+
session_fingerprint: decisionEvidenceDigestSchema,
|
|
33180
|
+
consume_key: decisionEvidenceDigestSchema,
|
|
33181
|
+
binding: inlineHumanConfirmationBindingSchema
|
|
33182
|
+
});
|
|
33183
|
+
var inlineHumanConfirmationProbeInputSchema = external_exports.strictObject({
|
|
33184
|
+
tenant_id: uuidSchema9,
|
|
33185
|
+
id: uuidSchema9,
|
|
33186
|
+
session_owner_user_id: uuidSchema9,
|
|
33187
|
+
session_fingerprint: decisionEvidenceDigestSchema,
|
|
33188
|
+
binding: inlineHumanConfirmationBindingSchema
|
|
33189
|
+
});
|
|
33190
|
+
var inlineHumanConfirmationSupersedeInputSchema = external_exports.strictObject({
|
|
33191
|
+
tenant_id: uuidSchema9,
|
|
33192
|
+
id: uuidSchema9,
|
|
33193
|
+
session_owner_user_id: uuidSchema9,
|
|
33194
|
+
session_fingerprint: decisionEvidenceDigestSchema,
|
|
33195
|
+
...inlineHumanConfirmationBindingSchema.shape,
|
|
33196
|
+
expires_at: durableTimestampSchema2,
|
|
33197
|
+
public_token_hash: publicTokenHashSchema
|
|
33198
|
+
});
|
|
33199
|
+
var inlineHumanConfirmationSchema = external_exports.strictObject({
|
|
33200
|
+
id: uuidSchema9,
|
|
33201
|
+
tenant_id: uuidSchema9,
|
|
33202
|
+
public_token_hash: publicTokenHashSchema,
|
|
33203
|
+
session_owner_user_id: uuidSchema9,
|
|
33204
|
+
session_fingerprint: decisionEvidenceDigestSchema,
|
|
33205
|
+
...inlineHumanConfirmationBindingSchema.shape,
|
|
33206
|
+
consume_key: decisionEvidenceDigestSchema.nullable(),
|
|
33207
|
+
status: inlineHumanConfirmationStatusSchema,
|
|
33208
|
+
expires_at: durableTimestampSchema2,
|
|
33209
|
+
consumed_at: durableTimestampSchema2.nullable(),
|
|
33210
|
+
expired_at: durableTimestampSchema2.nullable(),
|
|
33211
|
+
superseded_at: durableTimestampSchema2.nullable(),
|
|
33212
|
+
superseded_by: uuidSchema9.nullable(),
|
|
33213
|
+
created_at: durableTimestampSchema2,
|
|
33214
|
+
updated_at: durableTimestampSchema2
|
|
33215
|
+
});
|
|
33216
|
+
|
|
33217
|
+
// ../../packages/protocol/src/browser-control-delegation.ts
|
|
33218
|
+
var uuidSchema10 = external_exports.string().uuid();
|
|
33219
|
+
var durableTimestampSchema3 = external_exports.union([external_exports.date(), external_exports.string().datetime({ offset: true })]);
|
|
33220
|
+
var BROWSER_CONTROL_SURFACES = ["routine_navigation", "direct_effect"];
|
|
33221
|
+
var browserControlSurfaceSchema = external_exports.enum(BROWSER_CONTROL_SURFACES);
|
|
33222
|
+
var BROWSER_CONTROL_DELEGATION_STATUSES = [
|
|
33223
|
+
"active",
|
|
33224
|
+
"revoked",
|
|
33225
|
+
"expired",
|
|
33226
|
+
"superseded"
|
|
33227
|
+
];
|
|
33228
|
+
var browserControlDelegationStatusSchema = external_exports.enum(BROWSER_CONTROL_DELEGATION_STATUSES);
|
|
33229
|
+
var browserControlDelegationBindingSchema = external_exports.strictObject({
|
|
33230
|
+
owner_decision_id: uuidSchema10,
|
|
33231
|
+
implementation_run_id: uuidSchema10,
|
|
33232
|
+
session_owner_user_id: uuidSchema10,
|
|
33233
|
+
session_fingerprint: decisionEvidenceDigestSchema,
|
|
33234
|
+
allowed_surface: browserControlSurfaceSchema
|
|
33235
|
+
});
|
|
33236
|
+
var browserControlDelegationCreateInputSchema = external_exports.strictObject({
|
|
33237
|
+
tenant_id: uuidSchema10,
|
|
33238
|
+
...browserControlDelegationBindingSchema.shape,
|
|
33239
|
+
expires_at: durableTimestampSchema3
|
|
33240
|
+
});
|
|
33241
|
+
var browserControlDelegationRenewInputSchema = external_exports.strictObject({
|
|
33242
|
+
tenant_id: uuidSchema10,
|
|
33243
|
+
id: uuidSchema10,
|
|
33244
|
+
expires_at: durableTimestampSchema3
|
|
33245
|
+
});
|
|
33246
|
+
var browserControlDelegationProbeInputSchema = external_exports.strictObject({
|
|
33247
|
+
tenant_id: uuidSchema10,
|
|
33248
|
+
implementation_run_id: uuidSchema10,
|
|
33249
|
+
session_owner_user_id: uuidSchema10,
|
|
33250
|
+
session_fingerprint: decisionEvidenceDigestSchema,
|
|
33251
|
+
allowed_surface: browserControlSurfaceSchema
|
|
33252
|
+
});
|
|
33253
|
+
var browserControlDelegationRevokeInputSchema = external_exports.strictObject({
|
|
33254
|
+
tenant_id: uuidSchema10,
|
|
33255
|
+
id: uuidSchema10
|
|
33256
|
+
});
|
|
33257
|
+
var browserControlDelegationSchema = external_exports.strictObject({
|
|
33258
|
+
id: uuidSchema10,
|
|
33259
|
+
tenant_id: uuidSchema10,
|
|
33260
|
+
...browserControlDelegationBindingSchema.shape,
|
|
33261
|
+
status: browserControlDelegationStatusSchema,
|
|
33262
|
+
expires_at: durableTimestampSchema3,
|
|
33263
|
+
revoked_at: durableTimestampSchema3.nullable(),
|
|
33264
|
+
expired_at: durableTimestampSchema3.nullable(),
|
|
33265
|
+
superseded_at: durableTimestampSchema3.nullable(),
|
|
33266
|
+
superseded_by: uuidSchema10.nullable(),
|
|
33267
|
+
created_at: durableTimestampSchema3,
|
|
33268
|
+
updated_at: durableTimestampSchema3
|
|
33269
|
+
});
|
|
33270
|
+
var browserDecisionPrincipalSchema = external_exports.strictObject({
|
|
33271
|
+
sessionOwnerUserId: uuidSchema10,
|
|
33272
|
+
sessionFingerprint: decisionEvidenceDigestSchema,
|
|
33273
|
+
delegation: external_exports.nullable(external_exports.strictObject({
|
|
33274
|
+
delegationId: uuidSchema10,
|
|
33275
|
+
implementationRunId: uuidSchema10,
|
|
33276
|
+
allowedSurface: browserControlSurfaceSchema
|
|
33277
|
+
}))
|
|
33278
|
+
});
|
|
33279
|
+
|
|
33280
|
+
// ../../packages/protocol/src/compass.ts
|
|
33281
|
+
var uuidSchema11 = external_exports.string().uuid();
|
|
33052
33282
|
var sourceCitationSchema = external_exports.object({
|
|
33053
33283
|
source_id: external_exports.string().min(1),
|
|
33054
|
-
document_id:
|
|
33284
|
+
document_id: uuidSchema11.optional(),
|
|
33055
33285
|
label: external_exports.string().min(1),
|
|
33056
33286
|
locator: external_exports.string().min(1),
|
|
33057
33287
|
quote: external_exports.string().min(1).optional(),
|
|
@@ -33080,14 +33310,14 @@ var contextGapSchema = external_exports.object({
|
|
|
33080
33310
|
var gapInterviewAnswerSchema = external_exports.object({
|
|
33081
33311
|
gap_id: external_exports.string().min(1),
|
|
33082
33312
|
answer: external_exports.string().min(1),
|
|
33083
|
-
answered_by:
|
|
33313
|
+
answered_by: uuidSchema11
|
|
33084
33314
|
}).strict();
|
|
33085
33315
|
var contextPackSchema = external_exports.object({
|
|
33086
33316
|
schema_version: external_exports.literal(1),
|
|
33087
|
-
tenant_id:
|
|
33317
|
+
tenant_id: uuidSchema11.optional(),
|
|
33088
33318
|
sources: external_exports.array(external_exports.object({
|
|
33089
33319
|
id: external_exports.string().min(1),
|
|
33090
|
-
document_id:
|
|
33320
|
+
document_id: uuidSchema11.optional(),
|
|
33091
33321
|
name: external_exports.string().min(1),
|
|
33092
33322
|
kind: external_exports.enum(["document", "financial_upload", "interview", "integration_stub"]),
|
|
33093
33323
|
mime_type: external_exports.string().min(1).optional()
|
|
@@ -33137,7 +33367,7 @@ var compassDraftSchema = external_exports.discriminatedUnion("schema_version", [
|
|
|
33137
33367
|
compassDraftSchemaV2
|
|
33138
33368
|
]);
|
|
33139
33369
|
var guardrailInputSchema = external_exports.object({
|
|
33140
|
-
source_compass_version_id:
|
|
33370
|
+
source_compass_version_id: uuidSchema11.optional(),
|
|
33141
33371
|
principles: external_exports.array(external_exports.object({
|
|
33142
33372
|
index: external_exports.number().int().positive(),
|
|
33143
33373
|
statement: external_exports.string().min(1),
|
|
@@ -33647,7 +33877,7 @@ function displayLabelRejection(candidate, trust) {
|
|
|
33647
33877
|
|
|
33648
33878
|
// ../../packages/protocol/src/artifacts.ts
|
|
33649
33879
|
var isoDateTime4 = external_exports.string().datetime({ offset: true });
|
|
33650
|
-
var
|
|
33880
|
+
var uuidSchema12 = external_exports.string().uuid();
|
|
33651
33881
|
var dataClassificationSchema = external_exports.enum([
|
|
33652
33882
|
"customer_content",
|
|
33653
33883
|
"operational",
|
|
@@ -33768,35 +33998,35 @@ var SECRET_URL_PARAM_NAME_ASSIGNMENT = new RegExp(
|
|
|
33768
33998
|
"iu"
|
|
33769
33999
|
);
|
|
33770
34000
|
var binaryArtifactCreateInputSchema = external_exports.object({
|
|
33771
|
-
seat_id:
|
|
33772
|
-
run_id:
|
|
34001
|
+
seat_id: uuidSchema12,
|
|
34002
|
+
run_id: uuidSchema12.nullable().optional(),
|
|
33773
34003
|
title: external_exports.string().trim().min(1).max(ARTIFACT_MAX_TITLE_CHARS).nullable().optional(),
|
|
33774
34004
|
storage_bucket: external_exports.string().min(1).max(ARTIFACT_MAX_STORAGE_BUCKET_CHARS),
|
|
33775
34005
|
storage_path: artifactStoragePathSchema,
|
|
33776
34006
|
mime_type: external_exports.string().min(1).max(ARTIFACT_MAX_MIME_CHARS).refine(isValidMimeType, "mime_type must be a valid media type (type/subtype), not a URL"),
|
|
33777
34007
|
size_bytes: external_exports.number().int().nonnegative(),
|
|
33778
34008
|
checksum_sha256: artifactChecksumSchema,
|
|
33779
|
-
supersedes_id:
|
|
34009
|
+
supersedes_id: uuidSchema12.nullable().optional(),
|
|
33780
34010
|
data_classification: dataClassificationSchema.default("customer_content"),
|
|
33781
34011
|
retention_class: retentionClassSchema.default("standard_90d")
|
|
33782
34012
|
}).strict();
|
|
33783
34013
|
var pointerArtifactCreateInputSchema = external_exports.object({
|
|
33784
|
-
seat_id:
|
|
33785
|
-
run_id:
|
|
34014
|
+
seat_id: uuidSchema12,
|
|
34015
|
+
run_id: uuidSchema12.nullable().optional(),
|
|
33786
34016
|
title: external_exports.string().trim().min(1).max(ARTIFACT_MAX_TITLE_CHARS).nullable().optional(),
|
|
33787
34017
|
pointer_system: artifactPointerSystemSchema,
|
|
33788
34018
|
external_ref: external_exports.string().trim().min(1).max(ARTIFACT_MAX_EXTERNAL_REF_CHARS).refine((value) => !isTokenizedUrl(value), "external_ref must be a stable reference, not a tokenized/credentialed URL"),
|
|
33789
34019
|
display_label: external_exports.string().trim().min(1).max(ARTIFACT_MAX_DISPLAY_LABEL_CHARS).nullable().optional(),
|
|
33790
34020
|
snapshot: artifactSnapshotSchema.default({}),
|
|
33791
|
-
supersedes_id:
|
|
34021
|
+
supersedes_id: uuidSchema12.nullable().optional(),
|
|
33792
34022
|
data_classification: dataClassificationSchema.default("operational"),
|
|
33793
34023
|
retention_class: retentionClassSchema.default("standard_90d")
|
|
33794
34024
|
}).strict();
|
|
33795
34025
|
var artifactSummarySchema = external_exports.object({
|
|
33796
34026
|
artifact_ref: external_exports.string().min(1),
|
|
33797
|
-
artifact_id:
|
|
33798
|
-
seat_id:
|
|
33799
|
-
run_id:
|
|
34027
|
+
artifact_id: uuidSchema12,
|
|
34028
|
+
seat_id: uuidSchema12,
|
|
34029
|
+
run_id: uuidSchema12.nullable(),
|
|
33800
34030
|
kind: artifactKindSchema,
|
|
33801
34031
|
title: external_exports.string().nullable(),
|
|
33802
34032
|
mime_type: external_exports.string().nullable(),
|
|
@@ -33805,7 +34035,7 @@ var artifactSummarySchema = external_exports.object({
|
|
|
33805
34035
|
pointer_system: artifactPointerSystemSchema.nullable(),
|
|
33806
34036
|
external_ref: external_exports.string().nullable(),
|
|
33807
34037
|
display_label: external_exports.string().nullable(),
|
|
33808
|
-
supersedes_id:
|
|
34038
|
+
supersedes_id: uuidSchema12.nullable(),
|
|
33809
34039
|
data_classification: dataClassificationSchema,
|
|
33810
34040
|
retention_class: retentionClassSchema,
|
|
33811
34041
|
created_at: isoDateTime4,
|
|
@@ -33822,9 +34052,9 @@ var artifactListOutputSchema = external_exports.object({
|
|
|
33822
34052
|
var sessionTranscriptLaneSchema = external_exports.enum(["cloud", "runner"]);
|
|
33823
34053
|
var sessionTranscriptFormatSchema = external_exports.enum(["jsonl", "text"]);
|
|
33824
34054
|
var sessionTranscriptSummarySchema = external_exports.object({
|
|
33825
|
-
transcript_id:
|
|
33826
|
-
seat_id:
|
|
33827
|
-
run_id:
|
|
34055
|
+
transcript_id: uuidSchema12,
|
|
34056
|
+
seat_id: uuidSchema12,
|
|
34057
|
+
run_id: uuidSchema12.nullable(),
|
|
33828
34058
|
lane: sessionTranscriptLaneSchema,
|
|
33829
34059
|
format: sessionTranscriptFormatSchema,
|
|
33830
34060
|
message_count: external_exports.number().int().nonnegative().nullable(),
|
|
@@ -33944,15 +34174,15 @@ var mcpToolRefusalReasonSchema = external_exports.enum([
|
|
|
33944
34174
|
]);
|
|
33945
34175
|
|
|
33946
34176
|
// ../../packages/protocol/src/cli-bootstrap.ts
|
|
33947
|
-
var
|
|
34177
|
+
var uuidSchema13 = external_exports.string().uuid();
|
|
33948
34178
|
var userWhoamiInputSchema = external_exports.object({}).strict();
|
|
33949
34179
|
var userWhoamiOutputSchema = external_exports.object({
|
|
33950
|
-
user_id:
|
|
34180
|
+
user_id: uuidSchema13,
|
|
33951
34181
|
email: external_exports.string().email().nullable(),
|
|
33952
34182
|
full_name: external_exports.string().nullable(),
|
|
33953
|
-
current_tenant_id:
|
|
34183
|
+
current_tenant_id: uuidSchema13.nullable(),
|
|
33954
34184
|
roles: external_exports.array(external_exports.object({
|
|
33955
|
-
tenant_id:
|
|
34185
|
+
tenant_id: uuidSchema13,
|
|
33956
34186
|
role: external_exports.enum(["owner", "admin", "steward", "member"]),
|
|
33957
34187
|
status: external_exports.enum(["active", "invited", "suspended"])
|
|
33958
34188
|
}).strict())
|
|
@@ -33960,7 +34190,7 @@ var userWhoamiOutputSchema = external_exports.object({
|
|
|
33960
34190
|
var userTenantsInputSchema = external_exports.object({}).strict();
|
|
33961
34191
|
var userTenantsOutputSchema = external_exports.object({
|
|
33962
34192
|
tenants: external_exports.array(external_exports.object({
|
|
33963
|
-
id:
|
|
34193
|
+
id: uuidSchema13,
|
|
33964
34194
|
slug: external_exports.string().min(1),
|
|
33965
34195
|
name: external_exports.string().min(1),
|
|
33966
34196
|
role: external_exports.enum(["owner", "admin", "steward", "member"]),
|
|
@@ -33972,7 +34202,7 @@ var userUseTenantInputSchema = external_exports.object({
|
|
|
33972
34202
|
tenant: external_exports.string().min(1)
|
|
33973
34203
|
}).strict();
|
|
33974
34204
|
var userUseTenantOutputSchema = external_exports.object({
|
|
33975
|
-
tenant_id:
|
|
34205
|
+
tenant_id: uuidSchema13,
|
|
33976
34206
|
slug: external_exports.string().min(1),
|
|
33977
34207
|
name: external_exports.string().min(1),
|
|
33978
34208
|
role: external_exports.enum(["owner", "admin", "steward", "member"]),
|
|
@@ -33982,7 +34212,7 @@ var signupProvisionTenantInputSchema = external_exports.object({
|
|
|
33982
34212
|
company_name: external_exports.string().trim().min(2).max(120)
|
|
33983
34213
|
}).strict();
|
|
33984
34214
|
var signupProvisionTenantOutputSchema = external_exports.object({
|
|
33985
|
-
tenant_id:
|
|
34215
|
+
tenant_id: uuidSchema13,
|
|
33986
34216
|
slug: external_exports.string().min(1),
|
|
33987
34217
|
name: external_exports.string().min(1),
|
|
33988
34218
|
// false when the caller already had an active tenant — conservative-by-default
|
|
@@ -33993,13 +34223,13 @@ var tenantCreateInputSchema = external_exports.object({
|
|
|
33993
34223
|
company_name: external_exports.string().trim().min(2).max(120)
|
|
33994
34224
|
}).strict();
|
|
33995
34225
|
var tenantCreateOutputSchema = external_exports.object({
|
|
33996
|
-
tenant_id:
|
|
34226
|
+
tenant_id: uuidSchema13,
|
|
33997
34227
|
slug: external_exports.string().min(1),
|
|
33998
34228
|
name: external_exports.string().min(1),
|
|
33999
34229
|
created: external_exports.literal(true),
|
|
34000
|
-
source_tenant_id:
|
|
34001
|
-
entitlement_id:
|
|
34002
|
-
accounting_event_id:
|
|
34230
|
+
source_tenant_id: uuidSchema13,
|
|
34231
|
+
entitlement_id: uuidSchema13,
|
|
34232
|
+
accounting_event_id: uuidSchema13,
|
|
34003
34233
|
active: external_exports.boolean(),
|
|
34004
34234
|
next_action: external_exports.string().min(1)
|
|
34005
34235
|
}).strict();
|
|
@@ -34026,14 +34256,14 @@ var FORGE_TURN_PHASE_OVERHEAD_SECONDS = 20 * 60;
|
|
|
34026
34256
|
var SEAT_MCP_CLAIM_TOKEN_TTL_SECONDS = (FORGE_TURN_HARD_CEILING_SECONDS + FORGE_TURN_PHASE_OVERHEAD_SECONDS) * 2;
|
|
34027
34257
|
|
|
34028
34258
|
// ../../packages/protocol/src/cli-operations.ts
|
|
34029
|
-
var
|
|
34259
|
+
var uuidSchema14 = external_exports.string().uuid();
|
|
34030
34260
|
var dateOnlySchema = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD");
|
|
34031
34261
|
var signalListInputSchema = external_exports.object({
|
|
34032
|
-
seat_id:
|
|
34262
|
+
seat_id: uuidSchema14.optional()
|
|
34033
34263
|
}).strict();
|
|
34034
34264
|
var signalSummarySchema = external_exports.object({
|
|
34035
|
-
measurable_id:
|
|
34036
|
-
seat_id:
|
|
34265
|
+
measurable_id: uuidSchema14,
|
|
34266
|
+
seat_id: uuidSchema14,
|
|
34037
34267
|
seat_name: external_exports.string(),
|
|
34038
34268
|
name: external_exports.string(),
|
|
34039
34269
|
unit: external_exports.string(),
|
|
@@ -34043,7 +34273,7 @@ var signalSummarySchema = external_exports.object({
|
|
|
34043
34273
|
source: external_exports.enum(["agent", "human", "integration"]),
|
|
34044
34274
|
// DER-2066: read-time truth of how the measurable is currently fed (DER-1904 effectiveSource) — an active binding reads "auto" even while declared source stays "human". Additive; does not replace source.
|
|
34045
34275
|
effective_source: external_exports.enum(["auto", "agent", "human"]),
|
|
34046
|
-
latest_reading_id:
|
|
34276
|
+
latest_reading_id: uuidSchema14.nullable(),
|
|
34047
34277
|
latest_value: external_exports.number().nullable(),
|
|
34048
34278
|
latest_period_start: external_exports.string().nullable(),
|
|
34049
34279
|
latest_confirmed: external_exports.boolean().nullable(),
|
|
@@ -34053,20 +34283,20 @@ var signalListOutputSchema = external_exports.object({
|
|
|
34053
34283
|
signals: external_exports.array(signalSummarySchema)
|
|
34054
34284
|
}).strict();
|
|
34055
34285
|
var signalGetInputSchema = external_exports.object({
|
|
34056
|
-
measurable_id:
|
|
34286
|
+
measurable_id: uuidSchema14
|
|
34057
34287
|
}).strict();
|
|
34058
34288
|
var signalReadingSchema = external_exports.object({
|
|
34059
|
-
reading_id:
|
|
34289
|
+
reading_id: uuidSchema14,
|
|
34060
34290
|
period_start: dateOnlySchema,
|
|
34061
34291
|
value: external_exports.number(),
|
|
34062
34292
|
source: external_exports.enum(["agent", "human", "integration"]),
|
|
34063
34293
|
confirmed: external_exports.boolean(),
|
|
34064
34294
|
confirmed_at: external_exports.string().nullable(),
|
|
34065
|
-
confirmed_by:
|
|
34295
|
+
confirmed_by: uuidSchema14.nullable()
|
|
34066
34296
|
}).strict();
|
|
34067
34297
|
var signalGetOutputSchema = external_exports.object({
|
|
34068
|
-
measurable_id:
|
|
34069
|
-
seat_id:
|
|
34298
|
+
measurable_id: uuidSchema14,
|
|
34299
|
+
seat_id: uuidSchema14,
|
|
34070
34300
|
name: external_exports.string(),
|
|
34071
34301
|
unit: external_exports.string(),
|
|
34072
34302
|
direction: external_exports.enum(["up_good", "down_good"]),
|
|
@@ -34077,26 +34307,26 @@ var signalGetOutputSchema = external_exports.object({
|
|
|
34077
34307
|
readings: external_exports.array(signalReadingSchema)
|
|
34078
34308
|
}).strict();
|
|
34079
34309
|
var signalConfirmReadingInputSchema = external_exports.object({
|
|
34080
|
-
reading_id:
|
|
34310
|
+
reading_id: uuidSchema14
|
|
34081
34311
|
}).strict();
|
|
34082
34312
|
var signalConfirmReadingOutputSchema = external_exports.object({
|
|
34083
|
-
reading_id:
|
|
34313
|
+
reading_id: uuidSchema14,
|
|
34084
34314
|
confirmed: external_exports.literal(true)
|
|
34085
34315
|
}).strict();
|
|
34086
34316
|
var signalCorrectReadingInputSchema = external_exports.object({
|
|
34087
|
-
measurable_id:
|
|
34317
|
+
measurable_id: uuidSchema14,
|
|
34088
34318
|
period_start: dateOnlySchema,
|
|
34089
34319
|
value: external_exports.number().finite()
|
|
34090
34320
|
}).strict();
|
|
34091
34321
|
var signalCorrectReadingOutputSchema = external_exports.object({
|
|
34092
|
-
reading_id:
|
|
34093
|
-
measurable_id:
|
|
34322
|
+
reading_id: uuidSchema14,
|
|
34323
|
+
measurable_id: uuidSchema14,
|
|
34094
34324
|
period_start: dateOnlySchema,
|
|
34095
34325
|
value: external_exports.number(),
|
|
34096
34326
|
confirmed: external_exports.literal(true)
|
|
34097
34327
|
}).strict();
|
|
34098
34328
|
var measurableCreateInputSchema = external_exports.object({
|
|
34099
|
-
seat_id:
|
|
34329
|
+
seat_id: uuidSchema14,
|
|
34100
34330
|
name: external_exports.string().trim().min(1).max(120),
|
|
34101
34331
|
unit: external_exports.string().trim().min(1).max(40),
|
|
34102
34332
|
direction: external_exports.enum(["up_good", "down_good"]),
|
|
@@ -34104,8 +34334,8 @@ var measurableCreateInputSchema = external_exports.object({
|
|
|
34104
34334
|
cadence: external_exports.enum(["daily", "weekly", "monthly", "quarterly", "annual"])
|
|
34105
34335
|
}).strict();
|
|
34106
34336
|
var measurableCreateOutputSchema = external_exports.object({
|
|
34107
|
-
measurable_id:
|
|
34108
|
-
seat_id:
|
|
34337
|
+
measurable_id: uuidSchema14,
|
|
34338
|
+
seat_id: uuidSchema14,
|
|
34109
34339
|
name: external_exports.string(),
|
|
34110
34340
|
unit: external_exports.string(),
|
|
34111
34341
|
direction: external_exports.enum(["up_good", "down_good"]),
|
|
@@ -34136,8 +34366,8 @@ var signalImportSkipSchema = external_exports.object({
|
|
|
34136
34366
|
reason: external_exports.string()
|
|
34137
34367
|
}).strict();
|
|
34138
34368
|
var signalImportMeasurableResultSchema = external_exports.object({
|
|
34139
|
-
measurable_id:
|
|
34140
|
-
seat_id:
|
|
34369
|
+
measurable_id: uuidSchema14,
|
|
34370
|
+
seat_id: uuidSchema14,
|
|
34141
34371
|
name: external_exports.string(),
|
|
34142
34372
|
cadence: external_exports.enum(["daily", "weekly", "monthly", "quarterly", "annual"]),
|
|
34143
34373
|
readings_written: external_exports.number().int().nonnegative()
|
|
@@ -34181,13 +34411,13 @@ var measurableTemplateListOutputSchema = external_exports.object({
|
|
|
34181
34411
|
}).strict();
|
|
34182
34412
|
var measurableTemplateAdoptInputSchema = external_exports.object({
|
|
34183
34413
|
template_id: external_exports.string().trim().min(1).max(80),
|
|
34184
|
-
seat_id:
|
|
34414
|
+
seat_id: uuidSchema14,
|
|
34185
34415
|
target: external_exports.number().finite().optional()
|
|
34186
34416
|
}).strict();
|
|
34187
34417
|
var measurableTemplateAdoptOutputSchema = external_exports.object({
|
|
34188
|
-
measurable_id:
|
|
34418
|
+
measurable_id: uuidSchema14,
|
|
34189
34419
|
template_id: external_exports.string(),
|
|
34190
|
-
seat_id:
|
|
34420
|
+
seat_id: uuidSchema14,
|
|
34191
34421
|
name: external_exports.string(),
|
|
34192
34422
|
unit: external_exports.string(),
|
|
34193
34423
|
direction: measureDirectionSchema,
|
|
@@ -34198,7 +34428,7 @@ var scorecardGridInputSchema = external_exports.object({
|
|
|
34198
34428
|
cadence: measureCadenceSchema.optional(),
|
|
34199
34429
|
// Trailing period count; defaults per cadence (weekly 13, monthly 6, …).
|
|
34200
34430
|
trailing: external_exports.number().int().min(1).max(53).optional(),
|
|
34201
|
-
seat_id:
|
|
34431
|
+
seat_id: uuidSchema14.optional(),
|
|
34202
34432
|
// Anchor date (YYYY-MM-DD) for the trailing window; defaults to today. Present
|
|
34203
34433
|
// so callers/tests get a deterministic column set.
|
|
34204
34434
|
as_of: dateOnlySchema.optional()
|
|
@@ -34215,8 +34445,8 @@ var scorecardGridCellSchema = external_exports.object({
|
|
|
34215
34445
|
confirmed: external_exports.boolean().nullable()
|
|
34216
34446
|
}).strict();
|
|
34217
34447
|
var scorecardGridRowSchema = external_exports.object({
|
|
34218
|
-
measurable_id:
|
|
34219
|
-
seat_id:
|
|
34448
|
+
measurable_id: uuidSchema14,
|
|
34449
|
+
seat_id: uuidSchema14,
|
|
34220
34450
|
seat_name: external_exports.string(),
|
|
34221
34451
|
name: external_exports.string(),
|
|
34222
34452
|
unit: external_exports.string(),
|
|
@@ -34265,7 +34495,7 @@ var frictionImportOutputSchema = external_exports.object({
|
|
|
34265
34495
|
issues_created: external_exports.number().int().nonnegative(),
|
|
34266
34496
|
issues_matched: external_exports.number().int().nonnegative(),
|
|
34267
34497
|
issues_skipped: external_exports.number().int().nonnegative(),
|
|
34268
|
-
batch_id:
|
|
34498
|
+
batch_id: uuidSchema14.nullable(),
|
|
34269
34499
|
skipped: external_exports.array(importSkipSchema).max(200)
|
|
34270
34500
|
}).strict();
|
|
34271
34501
|
var taskImportTodoSchema = external_exports.object({
|
|
@@ -34283,7 +34513,7 @@ var taskImportOutputSchema = external_exports.object({
|
|
|
34283
34513
|
tasks_created: external_exports.number().int().nonnegative(),
|
|
34284
34514
|
tasks_matched: external_exports.number().int().nonnegative(),
|
|
34285
34515
|
tasks_skipped: external_exports.number().int().nonnegative(),
|
|
34286
|
-
batch_id:
|
|
34516
|
+
batch_id: uuidSchema14.nullable(),
|
|
34287
34517
|
skipped: external_exports.array(importSkipSchema).max(200)
|
|
34288
34518
|
}).strict();
|
|
34289
34519
|
var cascadeImportRockSchema = external_exports.object({
|
|
@@ -34293,7 +34523,7 @@ var cascadeImportRockSchema = external_exports.object({
|
|
|
34293
34523
|
}).strict();
|
|
34294
34524
|
var cascadeImportInputSchema = external_exports.object({
|
|
34295
34525
|
dry_run: external_exports.boolean().optional().default(false),
|
|
34296
|
-
parent_objective_id:
|
|
34526
|
+
parent_objective_id: uuidSchema14.optional(),
|
|
34297
34527
|
rocks: external_exports.array(cascadeImportRockSchema).min(1).max(1e3)
|
|
34298
34528
|
}).strict();
|
|
34299
34529
|
var cascadeImportOutputSchema = external_exports.object({
|
|
@@ -34301,8 +34531,8 @@ var cascadeImportOutputSchema = external_exports.object({
|
|
|
34301
34531
|
rocks_created: external_exports.number().int().nonnegative(),
|
|
34302
34532
|
rocks_matched: external_exports.number().int().nonnegative(),
|
|
34303
34533
|
rocks_skipped: external_exports.number().int().nonnegative(),
|
|
34304
|
-
objective_id:
|
|
34305
|
-
batch_id:
|
|
34534
|
+
objective_id: uuidSchema14.nullable(),
|
|
34535
|
+
batch_id: uuidSchema14.nullable(),
|
|
34306
34536
|
skipped: external_exports.array(importSkipSchema).max(200)
|
|
34307
34537
|
}).strict();
|
|
34308
34538
|
var okrImportKrShared = {
|
|
@@ -34325,7 +34555,7 @@ var okrImportObjectiveSchema = external_exports.object({
|
|
|
34325
34555
|
}).strict();
|
|
34326
34556
|
var okrImportInputSchema = external_exports.object({
|
|
34327
34557
|
dry_run: external_exports.boolean().optional().default(false),
|
|
34328
|
-
parent_objective_id:
|
|
34558
|
+
parent_objective_id: uuidSchema14.optional(),
|
|
34329
34559
|
objectives: external_exports.array(okrImportObjectiveSchema).min(1).max(200)
|
|
34330
34560
|
}).strict().refine(
|
|
34331
34561
|
(value) => value.objectives.reduce((total, objective) => total + 1 + objective.key_results.length, 0) <= OKR_MAX_RECORDS,
|
|
@@ -34360,8 +34590,8 @@ var okrImportOutputSchema = external_exports.object({
|
|
|
34360
34590
|
milestones_created: external_exports.number().int().nonnegative(),
|
|
34361
34591
|
milestones_matched: external_exports.number().int().nonnegative(),
|
|
34362
34592
|
skipped_count: external_exports.number().int().nonnegative(),
|
|
34363
|
-
company_objective_id:
|
|
34364
|
-
batch_id:
|
|
34593
|
+
company_objective_id: uuidSchema14.nullable(),
|
|
34594
|
+
batch_id: uuidSchema14.nullable(),
|
|
34365
34595
|
skipped: external_exports.array(importSkipSchema).max(200)
|
|
34366
34596
|
}).strict();
|
|
34367
34597
|
var MAX_VTO_TEXT_CHARS = 4e4;
|
|
@@ -34377,9 +34607,9 @@ var compassImportOutputSchema = external_exports.object({
|
|
|
34377
34607
|
drafted: external_exports.boolean(),
|
|
34378
34608
|
advisory_available: external_exports.boolean(),
|
|
34379
34609
|
already_imported: external_exports.boolean(),
|
|
34380
|
-
draft_id:
|
|
34610
|
+
draft_id: uuidSchema14.nullable(),
|
|
34381
34611
|
compass_version: external_exports.number().int().nonnegative().nullable(),
|
|
34382
|
-
batch_id:
|
|
34612
|
+
batch_id: uuidSchema14.nullable(),
|
|
34383
34613
|
principles: external_exports.number().int().nonnegative(),
|
|
34384
34614
|
horizons: external_exports.number().int().nonnegative(),
|
|
34385
34615
|
cycle_objectives: external_exports.number().int().nonnegative(),
|
|
@@ -34388,18 +34618,18 @@ var compassImportOutputSchema = external_exports.object({
|
|
|
34388
34618
|
var goalStatusSchema = external_exports.enum(["on", "off", "done", "dropped"]);
|
|
34389
34619
|
var goalStatusSourceSchema = external_exports.enum(["human", "agent", "rollup", "signal"]);
|
|
34390
34620
|
var goalListInputSchema = external_exports.object({
|
|
34391
|
-
cycle_id:
|
|
34392
|
-
seat_id:
|
|
34621
|
+
cycle_id: uuidSchema14.optional(),
|
|
34622
|
+
seat_id: uuidSchema14.optional()
|
|
34393
34623
|
}).strict();
|
|
34394
34624
|
var goalSummarySchema = external_exports.object({
|
|
34395
|
-
goal_id:
|
|
34625
|
+
goal_id: uuidSchema14,
|
|
34396
34626
|
// DER-1039: 4-kind taxonomy (company_objective | seat_goal | milestone). Legacy
|
|
34397
34627
|
// 'objective'/'cycle_goal' stay in the read enum for any tenant not yet re-seeded
|
|
34398
34628
|
// during the add-only expand window (goal.list surfaces whatever the DB holds).
|
|
34399
34629
|
kind: external_exports.enum(["objective", "cycle_goal", "company_objective", "seat_goal", "milestone"]),
|
|
34400
|
-
cycle_id:
|
|
34401
|
-
seat_id:
|
|
34402
|
-
parent_goal_id:
|
|
34630
|
+
cycle_id: uuidSchema14,
|
|
34631
|
+
seat_id: uuidSchema14.nullable(),
|
|
34632
|
+
parent_goal_id: uuidSchema14.nullable(),
|
|
34403
34633
|
title: external_exports.string(),
|
|
34404
34634
|
status: goalStatusSchema,
|
|
34405
34635
|
status_source: goalStatusSourceSchema
|
|
@@ -34409,10 +34639,10 @@ var goalListOutputSchema = external_exports.object({
|
|
|
34409
34639
|
}).strict();
|
|
34410
34640
|
var goalCreateKindSchema = external_exports.enum(["company_objective", "seat_goal"]);
|
|
34411
34641
|
var goalCreateInputSchema = external_exports.object({
|
|
34412
|
-
cycle_id:
|
|
34642
|
+
cycle_id: uuidSchema14,
|
|
34413
34643
|
kind: goalCreateKindSchema.optional(),
|
|
34414
|
-
seat_id:
|
|
34415
|
-
parent_goal_id:
|
|
34644
|
+
seat_id: uuidSchema14.optional(),
|
|
34645
|
+
parent_goal_id: uuidSchema14.optional(),
|
|
34416
34646
|
title: external_exports.string().trim().min(1),
|
|
34417
34647
|
definition_of_done: external_exports.string().trim().min(1),
|
|
34418
34648
|
status: external_exports.enum(["on", "off"]).optional(),
|
|
@@ -34453,10 +34683,10 @@ var goalCreateInputSchema = external_exports.object({
|
|
|
34453
34683
|
}
|
|
34454
34684
|
});
|
|
34455
34685
|
var goalMutationOutputSchema = external_exports.object({
|
|
34456
|
-
goal_id:
|
|
34457
|
-
cycle_id:
|
|
34458
|
-
seat_id:
|
|
34459
|
-
parent_goal_id:
|
|
34686
|
+
goal_id: uuidSchema14,
|
|
34687
|
+
cycle_id: uuidSchema14,
|
|
34688
|
+
seat_id: uuidSchema14.nullable(),
|
|
34689
|
+
parent_goal_id: uuidSchema14.nullable(),
|
|
34460
34690
|
title: external_exports.string(),
|
|
34461
34691
|
status: goalStatusSchema,
|
|
34462
34692
|
status_source: goalStatusSourceSchema,
|
|
@@ -34467,7 +34697,7 @@ var goalMutationOutputSchema = external_exports.object({
|
|
|
34467
34697
|
warnings: external_exports.array(external_exports.string()).optional()
|
|
34468
34698
|
}).strict();
|
|
34469
34699
|
var goalUpdateInputSchema = external_exports.object({
|
|
34470
|
-
goal_id:
|
|
34700
|
+
goal_id: uuidSchema14,
|
|
34471
34701
|
title: external_exports.string().trim().min(1).optional(),
|
|
34472
34702
|
definition_of_done: external_exports.string().trim().min(1).optional(),
|
|
34473
34703
|
// DER-2140: nullable so an explicit `null` clears a previously-set target date,
|
|
@@ -34478,34 +34708,34 @@ var goalUpdateInputSchema = external_exports.object({
|
|
|
34478
34708
|
{ message: "goal.update requires at least one of title, definition_of_done, or target_date" }
|
|
34479
34709
|
);
|
|
34480
34710
|
var goalSetStatusInputSchema = external_exports.object({
|
|
34481
|
-
goal_id:
|
|
34711
|
+
goal_id: uuidSchema14,
|
|
34482
34712
|
status: external_exports.enum(["on", "off", "done"])
|
|
34483
34713
|
}).strict();
|
|
34484
34714
|
var goalReparentInputSchema = external_exports.object({
|
|
34485
|
-
goal_id:
|
|
34486
|
-
parent_goal_id:
|
|
34715
|
+
goal_id: uuidSchema14,
|
|
34716
|
+
parent_goal_id: uuidSchema14
|
|
34487
34717
|
}).strict();
|
|
34488
34718
|
var goalReassignOwnerInputSchema = external_exports.object({
|
|
34489
|
-
goal_id:
|
|
34490
|
-
seat_id:
|
|
34719
|
+
goal_id: uuidSchema14,
|
|
34720
|
+
seat_id: uuidSchema14
|
|
34491
34721
|
}).strict();
|
|
34492
34722
|
var goalReassignOwnerOutputSchema = external_exports.object({
|
|
34493
|
-
goal_id:
|
|
34494
|
-
cycle_id:
|
|
34495
|
-
previous_seat_id:
|
|
34496
|
-
seat_id:
|
|
34723
|
+
goal_id: uuidSchema14,
|
|
34724
|
+
cycle_id: uuidSchema14,
|
|
34725
|
+
previous_seat_id: uuidSchema14.nullable(),
|
|
34726
|
+
seat_id: uuidSchema14,
|
|
34497
34727
|
title: external_exports.string(),
|
|
34498
34728
|
status: goalStatusSchema
|
|
34499
34729
|
}).strict();
|
|
34500
34730
|
var goalDropInputSchema = external_exports.object({
|
|
34501
|
-
goal_id:
|
|
34731
|
+
goal_id: uuidSchema14
|
|
34502
34732
|
}).strict();
|
|
34503
34733
|
var goalSetProgressInputSchema = external_exports.object({
|
|
34504
|
-
goal_id:
|
|
34734
|
+
goal_id: uuidSchema14,
|
|
34505
34735
|
progress_pct: external_exports.number().int().min(0).max(100)
|
|
34506
34736
|
}).strict();
|
|
34507
34737
|
var goalSetProgressOutputSchema = external_exports.object({
|
|
34508
|
-
goal_id:
|
|
34738
|
+
goal_id: uuidSchema14,
|
|
34509
34739
|
progress_pct: external_exports.number().int().min(0).max(100),
|
|
34510
34740
|
status: goalStatusSchema
|
|
34511
34741
|
}).strict();
|
|
@@ -34516,10 +34746,10 @@ var goalPaceClassificationSchema = external_exports.enum([
|
|
|
34516
34746
|
"untracked"
|
|
34517
34747
|
]);
|
|
34518
34748
|
var goalAtRiskSchema = external_exports.object({
|
|
34519
|
-
goal_id:
|
|
34749
|
+
goal_id: uuidSchema14,
|
|
34520
34750
|
title: external_exports.string(),
|
|
34521
|
-
seat_id:
|
|
34522
|
-
cycle_id:
|
|
34751
|
+
seat_id: uuidSchema14.nullable(),
|
|
34752
|
+
cycle_id: uuidSchema14,
|
|
34523
34753
|
progress_pct: external_exports.number().int().min(0).max(100),
|
|
34524
34754
|
classification: goalPaceClassificationSchema,
|
|
34525
34755
|
expected_pct: external_exports.number().nullable(),
|
|
@@ -34539,8 +34769,8 @@ var goalDriverAnchorSchema = external_exports.object({
|
|
|
34539
34769
|
expected_value: external_exports.number()
|
|
34540
34770
|
}).strict();
|
|
34541
34771
|
var goalBindMeasurableInputSchema = external_exports.object({
|
|
34542
|
-
goal_id:
|
|
34543
|
-
measurable_id:
|
|
34772
|
+
goal_id: uuidSchema14,
|
|
34773
|
+
measurable_id: uuidSchema14,
|
|
34544
34774
|
// DER-1643: new operator bindings default to the conservative 'informs' role.
|
|
34545
34775
|
// 'drives_status' is the deliberate leaf-only status driver (childless goal only,
|
|
34546
34776
|
// one per goal) and stays human-confirmed.
|
|
@@ -34558,8 +34788,8 @@ var goalBindMeasurableInputSchema = external_exports.object({
|
|
|
34558
34788
|
second_anchor: goalDriverAnchorSchema.optional()
|
|
34559
34789
|
}).strict();
|
|
34560
34790
|
var goalBindMeasurableOutputSchema = external_exports.object({
|
|
34561
|
-
goal_id:
|
|
34562
|
-
measurable_id:
|
|
34791
|
+
goal_id: uuidSchema14,
|
|
34792
|
+
measurable_id: uuidSchema14,
|
|
34563
34793
|
role: goalMeasurableRoleSchema,
|
|
34564
34794
|
// Per-binding steward opt-in; a fresh binding is always created OFF.
|
|
34565
34795
|
auto_status_enabled: external_exports.boolean(),
|
|
@@ -34580,24 +34810,24 @@ var goalBindMeasurableOutputSchema = external_exports.object({
|
|
|
34580
34810
|
driver_anchor: goalDriverAnchorSchema.nullable()
|
|
34581
34811
|
}).strict();
|
|
34582
34812
|
var goalUnbindMeasurableInputSchema = external_exports.object({
|
|
34583
|
-
goal_id:
|
|
34584
|
-
measurable_id:
|
|
34813
|
+
goal_id: uuidSchema14,
|
|
34814
|
+
measurable_id: uuidSchema14,
|
|
34585
34815
|
// Which binding to remove; defaults to the status driver (the historical unbind).
|
|
34586
34816
|
role: goalMeasurableRoleSchema.default("drives_status")
|
|
34587
34817
|
}).strict();
|
|
34588
34818
|
var goalUnbindMeasurableOutputSchema = external_exports.object({
|
|
34589
|
-
goal_id:
|
|
34590
|
-
measurable_id:
|
|
34819
|
+
goal_id: uuidSchema14,
|
|
34820
|
+
measurable_id: uuidSchema14,
|
|
34591
34821
|
removed: external_exports.boolean()
|
|
34592
34822
|
}).strict();
|
|
34593
34823
|
var goalSetAutoStatusInputSchema = external_exports.object({
|
|
34594
|
-
goal_id:
|
|
34595
|
-
measurable_id:
|
|
34824
|
+
goal_id: uuidSchema14,
|
|
34825
|
+
measurable_id: uuidSchema14,
|
|
34596
34826
|
enabled: external_exports.boolean()
|
|
34597
34827
|
}).strict();
|
|
34598
34828
|
var goalSetAutoStatusOutputSchema = external_exports.object({
|
|
34599
|
-
goal_id:
|
|
34600
|
-
measurable_id:
|
|
34829
|
+
goal_id: uuidSchema14,
|
|
34830
|
+
measurable_id: uuidSchema14,
|
|
34601
34831
|
auto_status_enabled: external_exports.boolean(),
|
|
34602
34832
|
// The goal's status after applying: enabling opts in and, when a confirmed
|
|
34603
34833
|
// reading is available on a childless leaf that is not human-pinned, drives the
|
|
@@ -34607,7 +34837,7 @@ var goalSetAutoStatusOutputSchema = external_exports.object({
|
|
|
34607
34837
|
applied_from_signal: external_exports.boolean()
|
|
34608
34838
|
}).strict();
|
|
34609
34839
|
var goalMeasurableBindingSchema = external_exports.object({
|
|
34610
|
-
measurable_id:
|
|
34840
|
+
measurable_id: uuidSchema14,
|
|
34611
34841
|
name: external_exports.string(),
|
|
34612
34842
|
unit: external_exports.string(),
|
|
34613
34843
|
role: external_exports.literal("drives_status"),
|
|
@@ -34625,27 +34855,27 @@ var goalMeasurableBindingSchema = external_exports.object({
|
|
|
34625
34855
|
driver_anchor: goalDriverAnchorSchema.nullable()
|
|
34626
34856
|
}).strict();
|
|
34627
34857
|
var goalListMeasurablesInputSchema = external_exports.object({
|
|
34628
|
-
goal_id:
|
|
34858
|
+
goal_id: uuidSchema14
|
|
34629
34859
|
}).strict();
|
|
34630
34860
|
var goalListMeasurablesOutputSchema = external_exports.object({
|
|
34631
|
-
goal_id:
|
|
34861
|
+
goal_id: uuidSchema14,
|
|
34632
34862
|
bindings: external_exports.array(goalMeasurableBindingSchema)
|
|
34633
34863
|
}).strict();
|
|
34634
34864
|
var goalCoreSchema = external_exports.object({
|
|
34635
|
-
id:
|
|
34865
|
+
id: uuidSchema14,
|
|
34636
34866
|
title: external_exports.string(),
|
|
34637
34867
|
kind: external_exports.enum(["objective", "cycle_goal", "company_objective", "seat_goal", "milestone"]),
|
|
34638
34868
|
status: goalStatusSchema,
|
|
34639
34869
|
status_source: goalStatusSourceSchema,
|
|
34640
34870
|
progress_pct: external_exports.number().int().min(0).max(100).nullable(),
|
|
34641
|
-
seat_id:
|
|
34642
|
-
parent_goal_id:
|
|
34871
|
+
seat_id: uuidSchema14.nullable(),
|
|
34872
|
+
parent_goal_id: uuidSchema14.nullable(),
|
|
34643
34873
|
definition_of_done: external_exports.string(),
|
|
34644
34874
|
// DER-2140: optional per-goal 4DX "by when".
|
|
34645
34875
|
target_date: external_exports.string().date().nullable()
|
|
34646
34876
|
}).strict();
|
|
34647
34877
|
var goalGetInputSchema = external_exports.object({
|
|
34648
|
-
goal_id:
|
|
34878
|
+
goal_id: uuidSchema14
|
|
34649
34879
|
}).strict();
|
|
34650
34880
|
var goalGetOutputSchema = external_exports.object({
|
|
34651
34881
|
goal: goalCoreSchema
|
|
@@ -34655,8 +34885,8 @@ var frictionListInputSchema = external_exports.object({
|
|
|
34655
34885
|
status: external_exports.enum(["open", "diagnosing", "resolved", "dropped", "active", "all"]).optional()
|
|
34656
34886
|
}).strict();
|
|
34657
34887
|
var frictionIssueSummarySchema = external_exports.object({
|
|
34658
|
-
issue_id:
|
|
34659
|
-
raised_by_seat_id:
|
|
34888
|
+
issue_id: uuidSchema14,
|
|
34889
|
+
raised_by_seat_id: uuidSchema14,
|
|
34660
34890
|
raised_by_seat_name: external_exports.string(),
|
|
34661
34891
|
summary: external_exports.string(),
|
|
34662
34892
|
// DER-1978 (S2): OPTIONAL short headline written at creation; null/absent when unset
|
|
@@ -34666,9 +34896,9 @@ var frictionIssueSummarySchema = external_exports.object({
|
|
|
34666
34896
|
severity: external_exports.enum(["low", "med", "high", "critical"]),
|
|
34667
34897
|
impact_score: external_exports.number(),
|
|
34668
34898
|
status: issueStatusSchema,
|
|
34669
|
-
blocking_goal_id:
|
|
34670
|
-
broken_measurable_id:
|
|
34671
|
-
action_task_id:
|
|
34899
|
+
blocking_goal_id: uuidSchema14.nullable(),
|
|
34900
|
+
broken_measurable_id: uuidSchema14.nullable(),
|
|
34901
|
+
action_task_id: uuidSchema14.nullable(),
|
|
34672
34902
|
root_cause: external_exports.string().nullable(),
|
|
34673
34903
|
resolved_at: external_exports.string().nullable(),
|
|
34674
34904
|
created_at: external_exports.string()
|
|
@@ -34683,42 +34913,42 @@ var frictionIssueDetailSchema = frictionIssueSummarySchema.extend({
|
|
|
34683
34913
|
// (packages/db/src/issues.ts), which reads `events.actor_kind` — the shared PG
|
|
34684
34914
|
// enum widened by migration 0138 — via the origin event join.
|
|
34685
34915
|
origin_actor_kind: external_exports.enum(["user", "agent", "system", "operator"]).nullable(),
|
|
34686
|
-
origin_actor_id:
|
|
34916
|
+
origin_actor_id: uuidSchema14.nullable(),
|
|
34687
34917
|
evidence: external_exports.unknown(),
|
|
34688
34918
|
action_task_title: external_exports.string().nullable(),
|
|
34689
|
-
action_task_owner_seat_id:
|
|
34919
|
+
action_task_owner_seat_id: uuidSchema14.nullable(),
|
|
34690
34920
|
action_task_owner_seat_name: external_exports.string().nullable(),
|
|
34691
34921
|
action_task_due_on: external_exports.string().nullable(),
|
|
34692
|
-
decision_id:
|
|
34922
|
+
decision_id: uuidSchema14.nullable(),
|
|
34693
34923
|
decision_title: external_exports.string().nullable(),
|
|
34694
34924
|
decision_summary: external_exports.string().nullable(),
|
|
34695
34925
|
decided_by_name: external_exports.string().nullable(),
|
|
34696
34926
|
updated_at: external_exports.string()
|
|
34697
34927
|
}).strict();
|
|
34698
34928
|
var frictionGetInputSchema = external_exports.object({
|
|
34699
|
-
issue_id:
|
|
34929
|
+
issue_id: uuidSchema14
|
|
34700
34930
|
}).strict();
|
|
34701
34931
|
var frictionGetOutputSchema = external_exports.object({
|
|
34702
34932
|
issue: frictionIssueDetailSchema
|
|
34703
34933
|
}).strict();
|
|
34704
34934
|
var frictionUpdateStatusInputSchema = external_exports.object({
|
|
34705
|
-
issue_id:
|
|
34935
|
+
issue_id: uuidSchema14,
|
|
34706
34936
|
status: external_exports.enum(["open", "diagnosing"])
|
|
34707
34937
|
}).strict();
|
|
34708
34938
|
var frictionUpdateStatusOutputSchema = external_exports.object({
|
|
34709
|
-
issue_id:
|
|
34939
|
+
issue_id: uuidSchema14,
|
|
34710
34940
|
status: external_exports.enum(["open", "diagnosing"]),
|
|
34711
|
-
event_id:
|
|
34941
|
+
event_id: uuidSchema14
|
|
34712
34942
|
}).strict();
|
|
34713
34943
|
var frictionResolveInputSchema = external_exports.object({
|
|
34714
|
-
issue_id:
|
|
34944
|
+
issue_id: uuidSchema14,
|
|
34715
34945
|
resolution_mode: external_exports.enum(["ids", "already_fixed"]).default("ids"),
|
|
34716
34946
|
root_cause: external_exports.string().trim().min(1),
|
|
34717
|
-
owner_seat_id:
|
|
34947
|
+
owner_seat_id: uuidSchema14.optional(),
|
|
34718
34948
|
task_title: external_exports.string().trim().min(1).optional(),
|
|
34719
34949
|
task_description: external_exports.string().trim().min(1).optional(),
|
|
34720
34950
|
done_by: dateOnlySchema.optional(),
|
|
34721
|
-
resolving_seat_id:
|
|
34951
|
+
resolving_seat_id: uuidSchema14.optional()
|
|
34722
34952
|
}).strict().superRefine((value, ctx) => {
|
|
34723
34953
|
if (value.resolution_mode !== "ids") {
|
|
34724
34954
|
return;
|
|
@@ -34737,25 +34967,25 @@ var frictionResolveInputSchema = external_exports.object({
|
|
|
34737
34967
|
}
|
|
34738
34968
|
});
|
|
34739
34969
|
var frictionResolveOutputSchema = external_exports.object({
|
|
34740
|
-
issue_id:
|
|
34970
|
+
issue_id: uuidSchema14,
|
|
34741
34971
|
status: external_exports.literal("resolved"),
|
|
34742
|
-
action_task_id:
|
|
34743
|
-
decision_id:
|
|
34972
|
+
action_task_id: uuidSchema14.nullable(),
|
|
34973
|
+
decision_id: uuidSchema14
|
|
34744
34974
|
}).strict();
|
|
34745
34975
|
var frictionLinkTaskInputSchema = external_exports.object({
|
|
34746
|
-
issue_id:
|
|
34747
|
-
task_id:
|
|
34976
|
+
issue_id: uuidSchema14,
|
|
34977
|
+
task_id: uuidSchema14
|
|
34748
34978
|
}).strict();
|
|
34749
34979
|
var frictionLinkTaskOutputSchema = external_exports.object({
|
|
34750
|
-
issue_id:
|
|
34751
|
-
action_task_id:
|
|
34980
|
+
issue_id: uuidSchema14,
|
|
34981
|
+
action_task_id: uuidSchema14
|
|
34752
34982
|
}).strict();
|
|
34753
34983
|
var taskCreateInputSchema = external_exports.object({
|
|
34754
|
-
owner_seat_id:
|
|
34755
|
-
from_seat_id:
|
|
34984
|
+
owner_seat_id: uuidSchema14,
|
|
34985
|
+
from_seat_id: uuidSchema14.optional(),
|
|
34756
34986
|
title: external_exports.string().trim().min(1),
|
|
34757
34987
|
description: external_exports.string().trim().min(1),
|
|
34758
|
-
goal_id:
|
|
34988
|
+
goal_id: uuidSchema14.optional(),
|
|
34759
34989
|
acceptance_criteria: external_exports.array(external_exports.string().min(1)).optional(),
|
|
34760
34990
|
due_on: dateOnlySchema.optional(),
|
|
34761
34991
|
// DER-1379: deterministic idempotency key; agent/scheduled producers only
|
|
@@ -34763,9 +34993,9 @@ var taskCreateInputSchema = external_exports.object({
|
|
|
34763
34993
|
source_key: external_exports.string().trim().min(1).max(200).optional()
|
|
34764
34994
|
}).strict();
|
|
34765
34995
|
var taskCreateOutputSchema = external_exports.object({
|
|
34766
|
-
task_id:
|
|
34767
|
-
owner_seat_id:
|
|
34768
|
-
from_seat_id:
|
|
34996
|
+
task_id: uuidSchema14,
|
|
34997
|
+
owner_seat_id: uuidSchema14,
|
|
34998
|
+
from_seat_id: uuidSchema14.nullable(),
|
|
34769
34999
|
status: external_exports.string(),
|
|
34770
35000
|
due_on: external_exports.string().nullable(),
|
|
34771
35001
|
// DER-1379: true when this was an idempotent no-op returning an existing
|
|
@@ -34773,8 +35003,8 @@ var taskCreateOutputSchema = external_exports.object({
|
|
|
34773
35003
|
already_filed: external_exports.boolean().default(false)
|
|
34774
35004
|
}).strict();
|
|
34775
35005
|
var taskUpdateInputSchema = external_exports.object({
|
|
34776
|
-
task_id:
|
|
34777
|
-
owner_seat_id:
|
|
35006
|
+
task_id: uuidSchema14,
|
|
35007
|
+
owner_seat_id: uuidSchema14.optional(),
|
|
34778
35008
|
due_on: dateOnlySchema.optional(),
|
|
34779
35009
|
title: external_exports.string().trim().min(1).optional(),
|
|
34780
35010
|
description: external_exports.string().trim().min(1).optional(),
|
|
@@ -34784,17 +35014,17 @@ var taskUpdateInputSchema = external_exports.object({
|
|
|
34784
35014
|
{ message: "Provide at least one field to update." }
|
|
34785
35015
|
);
|
|
34786
35016
|
var taskUpdateOutputSchema = external_exports.object({
|
|
34787
|
-
task_id:
|
|
34788
|
-
owner_seat_id:
|
|
34789
|
-
from_seat_id:
|
|
35017
|
+
task_id: uuidSchema14,
|
|
35018
|
+
owner_seat_id: uuidSchema14,
|
|
35019
|
+
from_seat_id: uuidSchema14.nullable(),
|
|
34790
35020
|
status: external_exports.string(),
|
|
34791
35021
|
due_on: external_exports.string().nullable()
|
|
34792
35022
|
}).strict();
|
|
34793
35023
|
var syncBriefCompileInputSchema = external_exports.object({
|
|
34794
|
-
cluster_id:
|
|
35024
|
+
cluster_id: uuidSchema14.optional()
|
|
34795
35025
|
}).strict();
|
|
34796
35026
|
var syncBriefRefSchema = external_exports.object({
|
|
34797
|
-
sync_brief_id:
|
|
35027
|
+
sync_brief_id: uuidSchema14,
|
|
34798
35028
|
period_start: dateOnlySchema,
|
|
34799
35029
|
period_end: dateOnlySchema,
|
|
34800
35030
|
compiled_at: external_exports.string(),
|
|
@@ -34803,10 +35033,10 @@ var syncBriefRefSchema = external_exports.object({
|
|
|
34803
35033
|
created: external_exports.boolean()
|
|
34804
35034
|
}).strict();
|
|
34805
35035
|
var syncBriefGetInputSchema = external_exports.object({
|
|
34806
|
-
sync_brief_id:
|
|
35036
|
+
sync_brief_id: uuidSchema14.optional()
|
|
34807
35037
|
}).strict();
|
|
34808
35038
|
var syncBriefGetOutputSchema = external_exports.object({
|
|
34809
|
-
sync_brief_id:
|
|
35039
|
+
sync_brief_id: uuidSchema14,
|
|
34810
35040
|
period_start: dateOnlySchema,
|
|
34811
35041
|
period_end: dateOnlySchema,
|
|
34812
35042
|
compiled_at: external_exports.string(),
|
|
@@ -34815,10 +35045,10 @@ var syncBriefGetOutputSchema = external_exports.object({
|
|
|
34815
35045
|
doc: external_exports.unknown()
|
|
34816
35046
|
}).strict();
|
|
34817
35047
|
var syncRunStartInputSchema = external_exports.object({
|
|
34818
|
-
cluster_id:
|
|
35048
|
+
cluster_id: uuidSchema14.optional()
|
|
34819
35049
|
}).strict();
|
|
34820
35050
|
var syncRunStartOutputSchema = external_exports.object({
|
|
34821
|
-
sync_brief_id:
|
|
35051
|
+
sync_brief_id: uuidSchema14,
|
|
34822
35052
|
period_start: dateOnlySchema,
|
|
34823
35053
|
period_end: dateOnlySchema,
|
|
34824
35054
|
compiled_at: external_exports.string(),
|
|
@@ -34826,25 +35056,25 @@ var syncRunStartOutputSchema = external_exports.object({
|
|
|
34826
35056
|
degraded: external_exports.boolean()
|
|
34827
35057
|
}).strict();
|
|
34828
35058
|
var syncRunCompleteInputSchema = external_exports.object({
|
|
34829
|
-
sync_brief_id:
|
|
35059
|
+
sync_brief_id: uuidSchema14
|
|
34830
35060
|
}).strict();
|
|
34831
35061
|
var syncRunCompleteOutputSchema = external_exports.object({
|
|
34832
|
-
sync_brief_id:
|
|
34833
|
-
event_id:
|
|
34834
|
-
decision_ids: external_exports.array(
|
|
34835
|
-
task_ids: external_exports.array(
|
|
35062
|
+
sync_brief_id: uuidSchema14,
|
|
35063
|
+
event_id: uuidSchema14,
|
|
35064
|
+
decision_ids: external_exports.array(uuidSchema14),
|
|
35065
|
+
task_ids: external_exports.array(uuidSchema14)
|
|
34836
35066
|
}).strict();
|
|
34837
35067
|
var syncItemAssignInputSchema = external_exports.object({
|
|
34838
|
-
sync_brief_id:
|
|
34839
|
-
owner_seat_id:
|
|
35068
|
+
sync_brief_id: uuidSchema14,
|
|
35069
|
+
owner_seat_id: uuidSchema14,
|
|
34840
35070
|
title: external_exports.string().trim().min(1),
|
|
34841
35071
|
description: external_exports.string().trim().min(1),
|
|
34842
35072
|
due_on: dateOnlySchema.optional()
|
|
34843
35073
|
}).strict();
|
|
34844
35074
|
var syncItemAssignOutputSchema = external_exports.object({
|
|
34845
|
-
sync_brief_id:
|
|
34846
|
-
task_id:
|
|
34847
|
-
owner_seat_id:
|
|
35075
|
+
sync_brief_id: uuidSchema14,
|
|
35076
|
+
task_id: uuidSchema14,
|
|
35077
|
+
owner_seat_id: uuidSchema14,
|
|
34848
35078
|
status: external_exports.string(),
|
|
34849
35079
|
due_on: external_exports.string().nullable()
|
|
34850
35080
|
}).strict();
|
|
@@ -35059,7 +35289,7 @@ var measurableTemplateSchema = external_exports.object({
|
|
|
35059
35289
|
}).strict();
|
|
35060
35290
|
|
|
35061
35291
|
// ../../packages/protocol/src/migration-run.ts
|
|
35062
|
-
var
|
|
35292
|
+
var uuidSchema15 = external_exports.string().uuid();
|
|
35063
35293
|
var isoDateTime5 = external_exports.string().datetime({ offset: true });
|
|
35064
35294
|
var jsonObjectSchema2 = external_exports.record(external_exports.string(), external_exports.unknown());
|
|
35065
35295
|
var contentHashSchema = external_exports.string().regex(/^[0-9a-f]{64}$/, "content_hash must be a 64-character lowercase sha-256 hex digest");
|
|
@@ -35168,8 +35398,8 @@ var migrationTargetKindSchema = external_exports.enum([
|
|
|
35168
35398
|
"other"
|
|
35169
35399
|
]);
|
|
35170
35400
|
var migrationRunSummarySchema = external_exports.object({
|
|
35171
|
-
id:
|
|
35172
|
-
tenant_id:
|
|
35401
|
+
id: uuidSchema15,
|
|
35402
|
+
tenant_id: uuidSchema15,
|
|
35173
35403
|
status: migrationRunStatusSchema,
|
|
35174
35404
|
source_platform: migrationSourcePlatformSchema,
|
|
35175
35405
|
authorization_mode: migrationAuthorizationModeSchema,
|
|
@@ -35177,16 +35407,16 @@ var migrationRunSummarySchema = external_exports.object({
|
|
|
35177
35407
|
skill_version: external_exports.string().nullable(),
|
|
35178
35408
|
cli_version: external_exports.string().nullable(),
|
|
35179
35409
|
source_client: external_exports.string().nullable(),
|
|
35180
|
-
initiated_by:
|
|
35410
|
+
initiated_by: uuidSchema15.nullable(),
|
|
35181
35411
|
started_at: isoDateTime5,
|
|
35182
35412
|
completed_at: isoDateTime5.nullable(),
|
|
35183
35413
|
created_at: isoDateTime5,
|
|
35184
35414
|
updated_at: isoDateTime5
|
|
35185
35415
|
}).strict();
|
|
35186
35416
|
var migrationRunArtifactSummarySchema = external_exports.object({
|
|
35187
|
-
id:
|
|
35188
|
-
tenant_id:
|
|
35189
|
-
run_id:
|
|
35417
|
+
id: uuidSchema15,
|
|
35418
|
+
tenant_id: uuidSchema15,
|
|
35419
|
+
run_id: uuidSchema15,
|
|
35190
35420
|
artifact_kind: migrationArtifactKindSchema,
|
|
35191
35421
|
source_identity_key: external_exports.string(),
|
|
35192
35422
|
source_filename: external_exports.string().nullable(),
|
|
@@ -35200,32 +35430,32 @@ var migrationRunArtifactSummarySchema = external_exports.object({
|
|
|
35200
35430
|
// Postgres bigint: carried as a decimal STRING (the DB mapper's convention) to avoid
|
|
35201
35431
|
// JS-number precision loss beyond 2^53. Nullable; non-negative (mirrors the >= 0 CHECK).
|
|
35202
35432
|
byte_size: nonNegativeBigintStringSchema.nullable(),
|
|
35203
|
-
import_batch_id:
|
|
35433
|
+
import_batch_id: uuidSchema15.nullable(),
|
|
35204
35434
|
imported_at: isoDateTime5.nullable(),
|
|
35205
35435
|
created_at: isoDateTime5,
|
|
35206
35436
|
updated_at: isoDateTime5
|
|
35207
35437
|
}).strict();
|
|
35208
35438
|
var migrationRunCheckpointSummarySchema = external_exports.object({
|
|
35209
|
-
id:
|
|
35210
|
-
tenant_id:
|
|
35211
|
-
run_id:
|
|
35439
|
+
id: uuidSchema15,
|
|
35440
|
+
tenant_id: uuidSchema15,
|
|
35441
|
+
run_id: uuidSchema15,
|
|
35212
35442
|
stage: migrationRunStageSchema,
|
|
35213
35443
|
checkpoint_status: migrationCheckpointStatusSchema,
|
|
35214
35444
|
retry_class: migrationRetryClassSchema.nullable(),
|
|
35215
35445
|
// Constrained to the reachable resume stages (mirrors the DB CHECK) so a boundary
|
|
35216
35446
|
// payload can never carry an unreachable/terminal resume target.
|
|
35217
35447
|
legal_resume_stage: migrationResumableStageSchema.nullable(),
|
|
35218
|
-
last_completed_checkpoint_id:
|
|
35448
|
+
last_completed_checkpoint_id: uuidSchema15.nullable(),
|
|
35219
35449
|
detail: jsonObjectSchema2,
|
|
35220
35450
|
created_at: isoDateTime5
|
|
35221
35451
|
}).strict();
|
|
35222
35452
|
var migrationConsentWaitSummarySchema = external_exports.object({
|
|
35223
|
-
id:
|
|
35224
|
-
tenant_id:
|
|
35225
|
-
run_id:
|
|
35453
|
+
id: uuidSchema15,
|
|
35454
|
+
tenant_id: uuidSchema15,
|
|
35455
|
+
run_id: uuidSchema15,
|
|
35226
35456
|
// NOT NULL at the DB layer: a stopped clock segment must have a run-scoped continuation
|
|
35227
35457
|
// checkpoint and a non-empty verified-evidence pointer, so the boundary schema mirrors it.
|
|
35228
|
-
checkpoint_id:
|
|
35458
|
+
checkpoint_id: uuidSchema15,
|
|
35229
35459
|
wait_kind: migrationConsentWaitKindSchema,
|
|
35230
35460
|
responsible_party: migrationConsentResponsiblePartySchema,
|
|
35231
35461
|
status: migrationConsentWaitStatusSchema,
|
|
@@ -35240,9 +35470,9 @@ var migrationConsentWaitSummarySchema = external_exports.object({
|
|
|
35240
35470
|
updated_at: isoDateTime5
|
|
35241
35471
|
}).strict();
|
|
35242
35472
|
var clockSegmentSharedShape = {
|
|
35243
|
-
id:
|
|
35244
|
-
tenant_id:
|
|
35245
|
-
run_id:
|
|
35473
|
+
id: uuidSchema15,
|
|
35474
|
+
tenant_id: uuidSchema15,
|
|
35475
|
+
run_id: uuidSchema15,
|
|
35246
35476
|
started_at: isoDateTime5,
|
|
35247
35477
|
ended_at: isoDateTime5.nullable(),
|
|
35248
35478
|
created_at: isoDateTime5,
|
|
@@ -35256,17 +35486,17 @@ var activeClockSegmentSchema = external_exports.object({
|
|
|
35256
35486
|
var stoppedClockSegmentSchema = external_exports.object({
|
|
35257
35487
|
...clockSegmentSharedShape,
|
|
35258
35488
|
segment_kind: external_exports.literal("stopped"),
|
|
35259
|
-
consent_wait_id:
|
|
35489
|
+
consent_wait_id: uuidSchema15
|
|
35260
35490
|
}).strict();
|
|
35261
35491
|
var migrationClockSegmentSummarySchema = external_exports.discriminatedUnion("segment_kind", [activeClockSegmentSchema, stoppedClockSegmentSchema]).refine(
|
|
35262
35492
|
(segment) => segment.ended_at === null || new Date(segment.ended_at).getTime() >= new Date(segment.started_at).getTime(),
|
|
35263
35493
|
{ message: "ended_at must be at or after started_at", path: ["ended_at"] }
|
|
35264
35494
|
);
|
|
35265
35495
|
var migrationItemDispositionSummarySchema = external_exports.object({
|
|
35266
|
-
id:
|
|
35267
|
-
tenant_id:
|
|
35268
|
-
run_id:
|
|
35269
|
-
artifact_id:
|
|
35496
|
+
id: uuidSchema15,
|
|
35497
|
+
tenant_id: uuidSchema15,
|
|
35498
|
+
run_id: uuidSchema15,
|
|
35499
|
+
artifact_id: uuidSchema15.nullable(),
|
|
35270
35500
|
item_kind: migrationItemKindSchema,
|
|
35271
35501
|
source_ref: external_exports.string(),
|
|
35272
35502
|
disposition: migrationItemDispositionSchema,
|
|
@@ -35276,14 +35506,14 @@ var migrationItemDispositionSummarySchema = external_exports.object({
|
|
|
35276
35506
|
updated_at: isoDateTime5
|
|
35277
35507
|
}).strict();
|
|
35278
35508
|
var migrationSourceMappingSummarySchema = external_exports.object({
|
|
35279
|
-
id:
|
|
35280
|
-
tenant_id:
|
|
35281
|
-
run_id:
|
|
35282
|
-
artifact_id:
|
|
35283
|
-
disposition_id:
|
|
35509
|
+
id: uuidSchema15,
|
|
35510
|
+
tenant_id: uuidSchema15,
|
|
35511
|
+
run_id: uuidSchema15,
|
|
35512
|
+
artifact_id: uuidSchema15.nullable(),
|
|
35513
|
+
disposition_id: uuidSchema15.nullable(),
|
|
35284
35514
|
source_ref: external_exports.string(),
|
|
35285
35515
|
target_kind: migrationTargetKindSchema,
|
|
35286
|
-
target_id:
|
|
35516
|
+
target_id: uuidSchema15,
|
|
35287
35517
|
is_ai_transformed: external_exports.boolean(),
|
|
35288
35518
|
citation: jsonObjectSchema2.nullable(),
|
|
35289
35519
|
created_at: isoDateTime5,
|
|
@@ -36644,18 +36874,18 @@ function parseNinetyRocksCsv(text) {
|
|
|
36644
36874
|
}
|
|
36645
36875
|
|
|
36646
36876
|
// ../../packages/protocol/src/markdown-readout.ts
|
|
36647
|
-
var
|
|
36877
|
+
var uuidSchema16 = external_exports.string().uuid();
|
|
36648
36878
|
var markdownOutputSchema = external_exports.object({
|
|
36649
36879
|
markdown: external_exports.string().min(1)
|
|
36650
36880
|
}).strict();
|
|
36651
36881
|
var compassShowMarkdownInputSchema = external_exports.object({}).strict();
|
|
36652
36882
|
var charterShowMarkdownInputSchema = external_exports.object({
|
|
36653
|
-
seat_id:
|
|
36883
|
+
seat_id: uuidSchema16
|
|
36654
36884
|
}).strict();
|
|
36655
36885
|
var charterShowMarkdownOutputSchema = external_exports.object({
|
|
36656
36886
|
markdown: external_exports.string().min(1),
|
|
36657
|
-
charter_version_id:
|
|
36658
|
-
seat_id:
|
|
36887
|
+
charter_version_id: uuidSchema16.nullable(),
|
|
36888
|
+
seat_id: uuidSchema16,
|
|
36659
36889
|
version: external_exports.number().int().nonnegative().nullable(),
|
|
36660
36890
|
status: external_exports.string().nullable(),
|
|
36661
36891
|
doc: external_exports.unknown().nullable(),
|
|
@@ -36665,11 +36895,11 @@ var charterShowMarkdownOutputSchema = external_exports.object({
|
|
|
36665
36895
|
}).strict().nullable()
|
|
36666
36896
|
}).strict();
|
|
36667
36897
|
var agentShowMarkdownInputSchema = external_exports.object({
|
|
36668
|
-
seat_id:
|
|
36898
|
+
seat_id: uuidSchema16
|
|
36669
36899
|
}).strict();
|
|
36670
36900
|
|
|
36671
36901
|
// ../../packages/protocol/src/implementation-bootstrap.ts
|
|
36672
|
-
var
|
|
36902
|
+
var uuidSchema17 = external_exports.string().uuid();
|
|
36673
36903
|
var isoDateTime6 = external_exports.string().datetime({ offset: true });
|
|
36674
36904
|
var IMPLEMENTATION_BOOTSTRAP_SCOPE = "implementation_bootstrap";
|
|
36675
36905
|
var implementationBootstrapScopeSchema = external_exports.literal(IMPLEMENTATION_BOOTSTRAP_SCOPE);
|
|
@@ -36686,14 +36916,14 @@ var implementationDeviceHandoffSchema = external_exports.object({
|
|
|
36686
36916
|
var implementationBootstrapCredentialSchema = implementationDeviceHandoffSchema.omit({ type: true });
|
|
36687
36917
|
var implementationDeviceCorrelationDescriptorSchema = external_exports.object({
|
|
36688
36918
|
type: external_exports.literal("implementation_bootstrap"),
|
|
36689
|
-
tenant_id:
|
|
36690
|
-
implementation_run_id:
|
|
36919
|
+
tenant_id: uuidSchema17,
|
|
36920
|
+
implementation_run_id: uuidSchema17
|
|
36691
36921
|
}).strict();
|
|
36692
36922
|
var implementationRunStatusSchema = external_exports.enum(["active", "completed", "abandoned", "expired"]);
|
|
36693
36923
|
var onboardingPathChoiceSchema = external_exports.enum(["guided", "agent_led"]);
|
|
36694
36924
|
var implementationRunSummarySchema = external_exports.object({
|
|
36695
|
-
run_id:
|
|
36696
|
-
tenant_id:
|
|
36925
|
+
run_id: uuidSchema17,
|
|
36926
|
+
tenant_id: uuidSchema17,
|
|
36697
36927
|
status: implementationRunStatusSchema,
|
|
36698
36928
|
// Bound to 80 to match the DB CHECK on device_authorizations.source_client
|
|
36699
36929
|
// (migration 0135, char_length between 1 and 80) — every implementation
|
|
@@ -36705,14 +36935,14 @@ var implementationRunSummarySchema = external_exports.object({
|
|
|
36705
36935
|
created_at: isoDateTime6
|
|
36706
36936
|
}).strict();
|
|
36707
36937
|
var implementationBootstrapContextSchema = external_exports.object({
|
|
36708
|
-
token_id:
|
|
36709
|
-
tenant_id:
|
|
36710
|
-
run_id:
|
|
36938
|
+
token_id: uuidSchema17,
|
|
36939
|
+
tenant_id: uuidSchema17,
|
|
36940
|
+
run_id: uuidSchema17,
|
|
36711
36941
|
scope: implementationBootstrapScopeSchema
|
|
36712
36942
|
}).strict();
|
|
36713
36943
|
|
|
36714
36944
|
// ../../packages/protocol/src/complete-seat-setup.ts
|
|
36715
|
-
var
|
|
36945
|
+
var uuidSchema18 = external_exports.string().uuid();
|
|
36716
36946
|
var digestSchema = external_exports.string().regex(/^[a-f0-9]{64}$/);
|
|
36717
36947
|
var proposalKeySchema = external_exports.string().trim().regex(/^[a-z][a-z0-9-]{1,79}$/);
|
|
36718
36948
|
var sourceKeySchema = external_exports.string().regex(/^[a-z][a-z0-9-]{1,79}$/);
|
|
@@ -36807,7 +37037,7 @@ var safeSourceLabel = (max) => safeHumanLabel(max).refine(
|
|
|
36807
37037
|
"Source labels cannot contain path separators."
|
|
36808
37038
|
);
|
|
36809
37039
|
var completeSeatRefSchema = external_exports.discriminatedUnion("kind", [
|
|
36810
|
-
external_exports.object({ kind: external_exports.literal("existing"), seat_id:
|
|
37040
|
+
external_exports.object({ kind: external_exports.literal("existing"), seat_id: uuidSchema18 }).strict(),
|
|
36811
37041
|
external_exports.object({ kind: external_exports.literal("logical"), seat_key: proposalKeySchema }).strict()
|
|
36812
37042
|
]);
|
|
36813
37043
|
var setupSourceUseSchema = external_exports.object({
|
|
@@ -36815,7 +37045,7 @@ var setupSourceUseSchema = external_exports.object({
|
|
|
36815
37045
|
}).strict();
|
|
36816
37046
|
var setupSourceRefSchema = external_exports.object({
|
|
36817
37047
|
source_key: sourceKeySchema,
|
|
36818
|
-
source_upload_id:
|
|
37048
|
+
source_upload_id: uuidSchema18,
|
|
36819
37049
|
title: safeSourceLabel(200),
|
|
36820
37050
|
kind: external_exports.enum(["org_chart", "signal_export", "goal_export", "friction_export", "meeting_export", "other"]),
|
|
36821
37051
|
sha256: digestSchema,
|
|
@@ -36823,7 +37053,7 @@ var setupSourceRefSchema = external_exports.object({
|
|
|
36823
37053
|
}).strict();
|
|
36824
37054
|
var completeSeatSkillRefSchema = external_exports.object({
|
|
36825
37055
|
slug: skillSlugSchema,
|
|
36826
|
-
skill_version_id:
|
|
37056
|
+
skill_version_id: uuidSchema18,
|
|
36827
37057
|
content_sha256: digestSchema
|
|
36828
37058
|
}).strict();
|
|
36829
37059
|
var timezoneSchema = external_exports.string().trim().min(1).max(100).superRefine((value, ctx) => {
|
|
@@ -36962,14 +37192,14 @@ var createCompleteSeatRequestSchema = external_exports.object({
|
|
|
36962
37192
|
}
|
|
36963
37193
|
});
|
|
36964
37194
|
var createCompleteSeatOutputSchema = external_exports.object({
|
|
36965
|
-
application_id:
|
|
37195
|
+
application_id: uuidSchema18,
|
|
36966
37196
|
receipt: external_exports.object({
|
|
36967
37197
|
receipt_revision: external_exports.literal(1),
|
|
36968
37198
|
receipt_digest: external_exports.string().regex(/^sha256:[a-f0-9]{64}$/),
|
|
36969
|
-
seat_id:
|
|
36970
|
-
charter_version_id:
|
|
36971
|
-
agent_id:
|
|
36972
|
-
decision_id:
|
|
37199
|
+
seat_id: uuidSchema18,
|
|
37200
|
+
charter_version_id: uuidSchema18,
|
|
37201
|
+
agent_id: uuidSchema18.nullable(),
|
|
37202
|
+
decision_id: uuidSchema18
|
|
36973
37203
|
}).strict()
|
|
36974
37204
|
}).strict();
|
|
36975
37205
|
var completeSeatApprovalStaffingSchema = external_exports.discriminatedUnion("kind", [
|
|
@@ -36995,7 +37225,7 @@ var completeSeatApprovalProjectionSchema = external_exports.object({
|
|
|
36995
37225
|
model_config: agentModelConfigSchema,
|
|
36996
37226
|
skills: external_exports.array(external_exports.object({
|
|
36997
37227
|
slug: skillSlugSchema,
|
|
36998
|
-
skill_version_id:
|
|
37228
|
+
skill_version_id: uuidSchema18,
|
|
36999
37229
|
content_sha256: digestSchema,
|
|
37000
37230
|
dependency_state: external_exports.enum(["ready", "warning", "blocked"])
|
|
37001
37231
|
}).strict()),
|
|
@@ -37184,7 +37414,7 @@ var signalBindConfirmOutputSchema = external_exports.object({
|
|
|
37184
37414
|
}).strict();
|
|
37185
37415
|
|
|
37186
37416
|
// ../../packages/protocol/src/setup-application.ts
|
|
37187
|
-
var
|
|
37417
|
+
var uuidSchema19 = external_exports.string().uuid();
|
|
37188
37418
|
var digestSchema2 = external_exports.string().regex(/^sha256:[0-9a-f]{64}$/);
|
|
37189
37419
|
var bareDigestSchema = external_exports.string().regex(/^[0-9a-f]{64}$/);
|
|
37190
37420
|
var receiptKeySchema = external_exports.string().regex(/^[a-z][a-z0-9_]{0,63}$/);
|
|
@@ -37226,7 +37456,7 @@ var onboardingSourceIngestInputSchema = external_exports.object({
|
|
|
37226
37456
|
content_base64: external_exports.string().min(1).max(Math.ceil(ONBOARDING_SOURCE_MAX_BYTES * 4 / 3) + 4)
|
|
37227
37457
|
}).strict();
|
|
37228
37458
|
var onboardingSourceIngestOutputSchema = external_exports.object({
|
|
37229
|
-
source_upload_id:
|
|
37459
|
+
source_upload_id: uuidSchema19,
|
|
37230
37460
|
descriptor: external_exports.object({
|
|
37231
37461
|
kind: onboardingSourceKindSchema,
|
|
37232
37462
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -37732,7 +37962,7 @@ var setupApplicationSummarySchema = external_exports.object({
|
|
|
37732
37962
|
}).strict();
|
|
37733
37963
|
var createdIdsSchema = external_exports.partialRecord(
|
|
37734
37964
|
setupReceiptFamilySchema,
|
|
37735
|
-
external_exports.array(
|
|
37965
|
+
external_exports.array(uuidSchema19).max(5e3)
|
|
37736
37966
|
);
|
|
37737
37967
|
var skippedSummarySchema = external_exports.object({
|
|
37738
37968
|
family: setupReceiptFamilySchema,
|
|
@@ -37744,8 +37974,8 @@ var warningSchema = external_exports.object({
|
|
|
37744
37974
|
count: external_exports.number().int().positive()
|
|
37745
37975
|
}).strict();
|
|
37746
37976
|
var setupAgentBindingSchema = external_exports.object({
|
|
37747
|
-
agent_id:
|
|
37748
|
-
seat_id:
|
|
37977
|
+
agent_id: uuidSchema19,
|
|
37978
|
+
seat_id: uuidSchema19,
|
|
37749
37979
|
configuration_digest: digestSchema2
|
|
37750
37980
|
}).strict();
|
|
37751
37981
|
var setupAgentBindingsSchema = external_exports.array(setupAgentBindingSchema).max(100).superRefine((bindings, ctx) => {
|
|
@@ -37781,8 +38011,8 @@ var setupApplicationResultReceiptSchema = setupApplicationReceiptBodySchema.exte
|
|
|
37781
38011
|
receipt_digest: digestSchema2
|
|
37782
38012
|
}).strict();
|
|
37783
38013
|
var setupActivationReceiptPayloadSchema = external_exports.object({
|
|
37784
|
-
activation_confirmation_id:
|
|
37785
|
-
activation_receipt_id:
|
|
38014
|
+
activation_confirmation_id: uuidSchema19,
|
|
38015
|
+
activation_receipt_id: uuidSchema19,
|
|
37786
38016
|
activation_idempotency_key: boundedText(120),
|
|
37787
38017
|
activation_input_digest: digestSchema2
|
|
37788
38018
|
}).strict();
|
|
@@ -37800,7 +38030,7 @@ function digestCanonicalJson(value) {
|
|
|
37800
38030
|
return `sha256:${createHash("sha256").update(canonicalJson(value)).digest("hex")}`;
|
|
37801
38031
|
}
|
|
37802
38032
|
var onboardingSetupOutputSchema = external_exports.object({
|
|
37803
|
-
application_id:
|
|
38033
|
+
application_id: uuidSchema19,
|
|
37804
38034
|
root_foundation_bound: external_exports.literal(true),
|
|
37805
38035
|
receipt: setupApplicationResultReceiptSchema
|
|
37806
38036
|
}).strict();
|
|
@@ -37813,8 +38043,8 @@ var charterInputReachabilityWarningSchema = external_exports.object({
|
|
|
37813
38043
|
var onboardingAgentLaneSchema = external_exports.enum(["cloud", "mcp_session", "runner"]);
|
|
37814
38044
|
var onboardingRunnerCompatibilityBindingSchema = external_exports.object({
|
|
37815
38045
|
seat_key: boundedText(120),
|
|
37816
|
-
tenant_id:
|
|
37817
|
-
seat_id:
|
|
38046
|
+
tenant_id: uuidSchema19,
|
|
38047
|
+
seat_id: uuidSchema19.nullable(),
|
|
37818
38048
|
charter_digest: digestSchema2,
|
|
37819
38049
|
manifest_digest: digestSchema2,
|
|
37820
38050
|
runtime: runnerSetupRuntimeSchema,
|
|
@@ -37836,7 +38066,7 @@ var onboardingRunnerCompatibilityBindingSchema = external_exports.object({
|
|
|
37836
38066
|
effective_lane: onboardingAgentLaneSchema
|
|
37837
38067
|
}).strict();
|
|
37838
38068
|
var onboardingRunnerSetupFactsSchema = external_exports.object({
|
|
37839
|
-
setup_id:
|
|
38069
|
+
setup_id: uuidSchema19,
|
|
37840
38070
|
selected_runtimes: runnerSetupSelectedRuntimesSchema,
|
|
37841
38071
|
stage: runnerSetupStageSchema,
|
|
37842
38072
|
status: runnerSetupStatusSchema,
|
|
@@ -37883,12 +38113,12 @@ var onboardingSetupApprovalProjectionSchema = external_exports.object({
|
|
|
37883
38113
|
kind: external_exports.literal("onboarding_setup"),
|
|
37884
38114
|
submitted_plan_digest: digestSchema2,
|
|
37885
38115
|
plan_digest: digestSchema2,
|
|
37886
|
-
owner_target_user_id:
|
|
37887
|
-
implementation_run_id:
|
|
38116
|
+
owner_target_user_id: uuidSchema19,
|
|
38117
|
+
implementation_run_id: uuidSchema19.nullable(),
|
|
37888
38118
|
staging_state: external_exports.object({
|
|
37889
|
-
root_seat_id:
|
|
37890
|
-
compass_version_id:
|
|
37891
|
-
cycle_id:
|
|
38119
|
+
root_seat_id: uuidSchema19,
|
|
38120
|
+
compass_version_id: uuidSchema19.nullable(),
|
|
38121
|
+
cycle_id: uuidSchema19.nullable(),
|
|
37892
38122
|
cycle_fingerprint: external_exports.string().max(500).nullable(),
|
|
37893
38123
|
live_proof_digest: digestSchema2
|
|
37894
38124
|
}).strict(),
|
|
@@ -38081,7 +38311,7 @@ var onboardingSetupPlanPreflightSchema = external_exports.object({
|
|
|
38081
38311
|
});
|
|
38082
38312
|
|
|
38083
38313
|
// ../../packages/protocol/src/onboarding-rehearsal.ts
|
|
38084
|
-
var
|
|
38314
|
+
var uuidSchema20 = external_exports.string().uuid();
|
|
38085
38315
|
var digestSchema3 = external_exports.string().regex(/^sha256:[0-9a-f]{64}$/);
|
|
38086
38316
|
var timestampSchema = external_exports.string().datetime({ offset: true });
|
|
38087
38317
|
var boundedText2 = (max) => external_exports.string().trim().min(1).max(max);
|
|
@@ -38118,13 +38348,13 @@ var onboardingRehearseTypedErrorSchema = external_exports.object({
|
|
|
38118
38348
|
}).strict();
|
|
38119
38349
|
var onboardingRehearseInputSchema = external_exports.object({
|
|
38120
38350
|
idempotency_key: boundedText2(120),
|
|
38121
|
-
setup_application_id:
|
|
38351
|
+
setup_application_id: uuidSchema20,
|
|
38122
38352
|
expected_input_digest: digestSchema3,
|
|
38123
38353
|
expected_receipt_revision: external_exports.number().int().positive()
|
|
38124
38354
|
}).strict();
|
|
38125
38355
|
var rehearsalAgentConfigurationSchema = external_exports.object({
|
|
38126
|
-
agent_id:
|
|
38127
|
-
seat_id:
|
|
38356
|
+
agent_id: uuidSchema20,
|
|
38357
|
+
seat_id: uuidSchema20,
|
|
38128
38358
|
configuration_digest: digestSchema3
|
|
38129
38359
|
}).strict();
|
|
38130
38360
|
function strictlySortedUniqueAgents(values, ctx) {
|
|
@@ -38152,13 +38382,13 @@ function strictlySortedUniqueAgents(values, ctx) {
|
|
|
38152
38382
|
}
|
|
38153
38383
|
var rehearsalAgentConfigurationsSchema = external_exports.array(rehearsalAgentConfigurationSchema).min(1).max(REHEARSAL_MAX_AGENTS).superRefine(strictlySortedUniqueAgents);
|
|
38154
38384
|
var onboardingRehearsalCanonicalInputSchema = onboardingRehearseInputSchema.extend({
|
|
38155
|
-
implementation_run_id:
|
|
38385
|
+
implementation_run_id: uuidSchema20.nullable(),
|
|
38156
38386
|
agents: rehearsalAgentConfigurationsSchema
|
|
38157
38387
|
}).strict();
|
|
38158
38388
|
var rehearsalBatchHeaderSchema = external_exports.object({
|
|
38159
|
-
batch_id:
|
|
38160
|
-
setup_application_id:
|
|
38161
|
-
implementation_run_id:
|
|
38389
|
+
batch_id: uuidSchema20,
|
|
38390
|
+
setup_application_id: uuidSchema20,
|
|
38391
|
+
implementation_run_id: uuidSchema20.nullable(),
|
|
38162
38392
|
idempotency_key: boundedText2(120),
|
|
38163
38393
|
rehearsal_input_digest: digestSchema3,
|
|
38164
38394
|
expected_input_digest: digestSchema3,
|
|
@@ -38204,10 +38434,10 @@ var rehearsalEvidenceSchema = external_exports.object({
|
|
|
38204
38434
|
}
|
|
38205
38435
|
});
|
|
38206
38436
|
var checkpointBaseSchema = external_exports.object({
|
|
38207
|
-
checkpoint_id:
|
|
38208
|
-
batch_id:
|
|
38209
|
-
agent_id:
|
|
38210
|
-
seat_id:
|
|
38437
|
+
checkpoint_id: uuidSchema20,
|
|
38438
|
+
batch_id: uuidSchema20,
|
|
38439
|
+
agent_id: uuidSchema20,
|
|
38440
|
+
seat_id: uuidSchema20,
|
|
38211
38441
|
runtime_run_key: boundedText2(240),
|
|
38212
38442
|
configuration_digest: digestSchema3
|
|
38213
38443
|
});
|
|
@@ -38222,7 +38452,7 @@ var rehearsalCheckpointSchema = external_exports.discriminatedUnion("status", [
|
|
|
38222
38452
|
}).strict(),
|
|
38223
38453
|
checkpointBaseSchema.extend({
|
|
38224
38454
|
status: external_exports.literal("running"),
|
|
38225
|
-
rehearsal_run_id:
|
|
38455
|
+
rehearsal_run_id: uuidSchema20.nullable(),
|
|
38226
38456
|
claimed_at: timestampSchema,
|
|
38227
38457
|
lease_expires_at: timestampSchema,
|
|
38228
38458
|
started_at: timestampSchema,
|
|
@@ -38230,7 +38460,7 @@ var rehearsalCheckpointSchema = external_exports.discriminatedUnion("status", [
|
|
|
38230
38460
|
}).strict(),
|
|
38231
38461
|
checkpointBaseSchema.extend({
|
|
38232
38462
|
status: rehearsalTerminalStatusSchema,
|
|
38233
|
-
rehearsal_run_id:
|
|
38463
|
+
rehearsal_run_id: uuidSchema20,
|
|
38234
38464
|
claimed_at: timestampSchema,
|
|
38235
38465
|
lease_expires_at: timestampSchema,
|
|
38236
38466
|
started_at: timestampSchema,
|
|
@@ -38238,13 +38468,13 @@ var rehearsalCheckpointSchema = external_exports.discriminatedUnion("status", [
|
|
|
38238
38468
|
}).strict()
|
|
38239
38469
|
]);
|
|
38240
38470
|
var rehearsalAgentReceiptSchema = external_exports.object({
|
|
38241
|
-
receipt_id:
|
|
38242
|
-
batch_id:
|
|
38243
|
-
setup_application_id:
|
|
38244
|
-
implementation_run_id:
|
|
38245
|
-
agent_id:
|
|
38246
|
-
seat_id:
|
|
38247
|
-
rehearsal_run_id:
|
|
38471
|
+
receipt_id: uuidSchema20,
|
|
38472
|
+
batch_id: uuidSchema20,
|
|
38473
|
+
setup_application_id: uuidSchema20,
|
|
38474
|
+
implementation_run_id: uuidSchema20.nullable(),
|
|
38475
|
+
agent_id: uuidSchema20,
|
|
38476
|
+
seat_id: uuidSchema20,
|
|
38477
|
+
rehearsal_run_id: uuidSchema20,
|
|
38248
38478
|
caller_idempotency_key: boundedText2(120),
|
|
38249
38479
|
rehearsal_input_digest: digestSchema3,
|
|
38250
38480
|
expected_input_digest: digestSchema3,
|
|
@@ -38257,10 +38487,10 @@ var rehearsalAgentReceiptSchema = external_exports.object({
|
|
|
38257
38487
|
}).strict();
|
|
38258
38488
|
var rehearsalAgentReceiptsSchema = external_exports.array(rehearsalAgentReceiptSchema).min(1).max(REHEARSAL_MAX_AGENTS).superRefine(strictlySortedUniqueAgents);
|
|
38259
38489
|
var rehearsalTerminalBatchReceiptSchema = external_exports.object({
|
|
38260
|
-
receipt_id:
|
|
38261
|
-
batch_id:
|
|
38262
|
-
setup_application_id:
|
|
38263
|
-
implementation_run_id:
|
|
38490
|
+
receipt_id: uuidSchema20,
|
|
38491
|
+
batch_id: uuidSchema20,
|
|
38492
|
+
setup_application_id: uuidSchema20,
|
|
38493
|
+
implementation_run_id: uuidSchema20.nullable(),
|
|
38264
38494
|
expected_input_digest: digestSchema3,
|
|
38265
38495
|
expected_receipt_revision: external_exports.number().int().positive(),
|
|
38266
38496
|
rehearsal_input_digest: digestSchema3,
|
|
@@ -38338,15 +38568,15 @@ var onboardingRehearseOutputSchema = external_exports.union([
|
|
|
38338
38568
|
]);
|
|
38339
38569
|
|
|
38340
38570
|
// ../../packages/protocol/src/onboarding-activation.ts
|
|
38341
|
-
var
|
|
38571
|
+
var uuidSchema21 = external_exports.string().uuid();
|
|
38342
38572
|
var digestSchema4 = external_exports.string().regex(/^sha256:[0-9a-f]{64}$/);
|
|
38343
38573
|
var boundedText3 = (max) => external_exports.string().trim().min(1).max(max);
|
|
38344
38574
|
var rehearsalRunEntrySchema = external_exports.object({
|
|
38345
|
-
agent_id:
|
|
38346
|
-
rehearsal_run_id:
|
|
38575
|
+
agent_id: uuidSchema21,
|
|
38576
|
+
rehearsal_run_id: uuidSchema21
|
|
38347
38577
|
}).strict();
|
|
38348
38578
|
var configurationDigestEntrySchema = external_exports.object({
|
|
38349
|
-
agent_id:
|
|
38579
|
+
agent_id: uuidSchema21,
|
|
38350
38580
|
configuration_digest: digestSchema4
|
|
38351
38581
|
}).strict();
|
|
38352
38582
|
function uniqueAgentEntries(values, ctx) {
|
|
@@ -38366,26 +38596,26 @@ var onboardingActivationRehearsalRunsSchema = external_exports.array(rehearsalRu
|
|
|
38366
38596
|
var onboardingActivationConfigurationDigestsSchema = external_exports.array(configurationDigestEntrySchema).min(1).max(100).superRefine(uniqueAgentEntries);
|
|
38367
38597
|
var onboardingActivateInputSchema = external_exports.object({
|
|
38368
38598
|
idempotency_key: boundedText3(120),
|
|
38369
|
-
setup_application_id:
|
|
38599
|
+
setup_application_id: uuidSchema21,
|
|
38370
38600
|
expected_input_digest: digestSchema4,
|
|
38371
38601
|
expected_receipt_revision: external_exports.number().int().positive(),
|
|
38372
|
-
terminal_rehearsal_batch_receipt_id:
|
|
38602
|
+
terminal_rehearsal_batch_receipt_id: uuidSchema21,
|
|
38373
38603
|
rehearsal_runs: onboardingActivationRehearsalRunsSchema,
|
|
38374
38604
|
configuration_digests: onboardingActivationConfigurationDigestsSchema
|
|
38375
38605
|
}).strict();
|
|
38376
38606
|
var onboardingActivationCredentialGrantSchema = external_exports.object({
|
|
38377
38607
|
capabilityId: boundedText3(200),
|
|
38378
|
-
integrationId:
|
|
38608
|
+
integrationId: uuidSchema21.nullable(),
|
|
38379
38609
|
requestedAccessLevel: capabilityGrantAccessLevelSchema,
|
|
38380
|
-
actingSeatId:
|
|
38381
|
-
effectiveCharterVersionId:
|
|
38610
|
+
actingSeatId: uuidSchema21.optional(),
|
|
38611
|
+
effectiveCharterVersionId: uuidSchema21.optional()
|
|
38382
38612
|
}).strict();
|
|
38383
38613
|
var onboardingActivationCredentialGrantExemptionSchema = external_exports.object({
|
|
38384
38614
|
capabilityId: capabilityIdSchema,
|
|
38385
|
-
integrationId:
|
|
38615
|
+
integrationId: uuidSchema21.nullable(),
|
|
38386
38616
|
requestedAccessLevel: capabilityGrantAccessLevelSchema,
|
|
38387
|
-
actingSeatId:
|
|
38388
|
-
effectiveCharterVersionId:
|
|
38617
|
+
actingSeatId: uuidSchema21.optional(),
|
|
38618
|
+
effectiveCharterVersionId: uuidSchema21.optional()
|
|
38389
38619
|
}).strict();
|
|
38390
38620
|
var effectivePermissionManifestRuleSchema = external_exports.object({
|
|
38391
38621
|
name: boundedText3(200),
|
|
@@ -38398,16 +38628,16 @@ var effectivePermissionManifestRuleSchema = external_exports.object({
|
|
|
38398
38628
|
credentialGrant: onboardingActivationCredentialGrantSchema.optional()
|
|
38399
38629
|
}).strict();
|
|
38400
38630
|
var onboardingActivationAgentProposalSchema = external_exports.object({
|
|
38401
|
-
agent_id:
|
|
38402
|
-
seat_id:
|
|
38403
|
-
charter_version_id:
|
|
38631
|
+
agent_id: uuidSchema21,
|
|
38632
|
+
seat_id: uuidSchema21,
|
|
38633
|
+
charter_version_id: uuidSchema21,
|
|
38404
38634
|
manifest: external_exports.object({
|
|
38405
38635
|
digest: digestSchema4,
|
|
38406
|
-
evidence_receipt_id:
|
|
38636
|
+
evidence_receipt_id: uuidSchema21,
|
|
38407
38637
|
evidence_revision: external_exports.number().int().positive()
|
|
38408
38638
|
}).strict(),
|
|
38409
38639
|
configuration_digest: digestSchema4,
|
|
38410
|
-
rehearsal_run_id:
|
|
38640
|
+
rehearsal_run_id: uuidSchema21,
|
|
38411
38641
|
effective_lane: external_exports.enum(["cloud", "mcp_session", "runner"]),
|
|
38412
38642
|
effective_model: external_exports.string().trim().min(1).max(200).nullable(),
|
|
38413
38643
|
decision_authority: charterDecisionAuthoritySchema,
|
|
@@ -38428,11 +38658,11 @@ var onboardingActivationAgentProposalSchema = external_exports.object({
|
|
|
38428
38658
|
}).strict();
|
|
38429
38659
|
var onboardingActivationApprovalProjectionSchema = external_exports.object({
|
|
38430
38660
|
kind: external_exports.literal("onboarding_activation"),
|
|
38431
|
-
setup_application_id:
|
|
38432
|
-
implementation_run_id:
|
|
38661
|
+
setup_application_id: uuidSchema21,
|
|
38662
|
+
implementation_run_id: uuidSchema21.nullable(),
|
|
38433
38663
|
expected_input_digest: digestSchema4,
|
|
38434
38664
|
expected_receipt_revision: external_exports.number().int().positive(),
|
|
38435
|
-
terminal_rehearsal_batch_receipt_id:
|
|
38665
|
+
terminal_rehearsal_batch_receipt_id: uuidSchema21,
|
|
38436
38666
|
activation_input_digest: digestSchema4,
|
|
38437
38667
|
agents: external_exports.array(onboardingActivationAgentProposalSchema).min(1).max(100),
|
|
38438
38668
|
checked_count: external_exports.number().int().positive(),
|
|
@@ -38440,8 +38670,8 @@ var onboardingActivationApprovalProjectionSchema = external_exports.object({
|
|
|
38440
38670
|
onboarding_completion_effect: external_exports.literal(true)
|
|
38441
38671
|
}).strict();
|
|
38442
38672
|
var onboardingActivationCommittedAgentSchema = external_exports.object({
|
|
38443
|
-
agent_id:
|
|
38444
|
-
seat_id:
|
|
38673
|
+
agent_id: uuidSchema21,
|
|
38674
|
+
seat_id: uuidSchema21,
|
|
38445
38675
|
status: external_exports.literal("live"),
|
|
38446
38676
|
schedule_armed: external_exports.boolean()
|
|
38447
38677
|
}).strict();
|
|
@@ -38490,7 +38720,7 @@ var onboardingActivationAicosProjectionSchema = external_exports.object({
|
|
|
38490
38720
|
}
|
|
38491
38721
|
});
|
|
38492
38722
|
var onboardingActivationCommitSnapshotSchema = external_exports.object({
|
|
38493
|
-
terminal_rehearsal_batch_receipt_id:
|
|
38723
|
+
terminal_rehearsal_batch_receipt_id: uuidSchema21,
|
|
38494
38724
|
agents: onboardingActivationCommittedAgentsSchema,
|
|
38495
38725
|
onboarding_completed_at: external_exports.string().datetime({ offset: true }),
|
|
38496
38726
|
// Optional: the table is live and pre-DER-3359 rows carry no `aicos` key.
|
|
@@ -38510,26 +38740,26 @@ var setupActivationConsumptionRejectionSchema = external_exports.enum([
|
|
|
38510
38740
|
"brain_mismatch"
|
|
38511
38741
|
]);
|
|
38512
38742
|
var onboardingActivationPersistenceInputSchema = external_exports.object({
|
|
38513
|
-
activation_confirmation_id:
|
|
38743
|
+
activation_confirmation_id: uuidSchema21,
|
|
38514
38744
|
activation_idempotency_key: boundedText3(120),
|
|
38515
38745
|
activation_input_digest: digestSchema4,
|
|
38516
38746
|
receipt_revision: external_exports.number().int().positive(),
|
|
38517
38747
|
activation_snapshot: onboardingActivationCommitSnapshotSchema
|
|
38518
38748
|
}).strict();
|
|
38519
38749
|
var onboardingActivationReceiptSchema = external_exports.object({
|
|
38520
|
-
activation_receipt_id:
|
|
38521
|
-
activation_confirmation_id:
|
|
38522
|
-
setup_application_id:
|
|
38523
|
-
implementation_run_id:
|
|
38750
|
+
activation_receipt_id: uuidSchema21,
|
|
38751
|
+
activation_confirmation_id: uuidSchema21,
|
|
38752
|
+
setup_application_id: uuidSchema21,
|
|
38753
|
+
implementation_run_id: uuidSchema21.nullable(),
|
|
38524
38754
|
activation_input_digest: digestSchema4,
|
|
38525
38755
|
setup_receipt_revision: external_exports.number().int().positive(),
|
|
38526
|
-
terminal_rehearsal_batch_receipt_id:
|
|
38756
|
+
terminal_rehearsal_batch_receipt_id: uuidSchema21,
|
|
38527
38757
|
agents: external_exports.array(onboardingActivationCommittedAgentSchema).min(1).max(100),
|
|
38528
38758
|
onboarding_completed_at: external_exports.string().datetime({ offset: true }),
|
|
38529
38759
|
activated_at: external_exports.string().datetime({ offset: true })
|
|
38530
38760
|
}).strict();
|
|
38531
38761
|
var onboardingActivateOutputSchema = external_exports.object({
|
|
38532
|
-
application_id:
|
|
38762
|
+
application_id: uuidSchema21,
|
|
38533
38763
|
status: external_exports.literal("activated"),
|
|
38534
38764
|
receipt: onboardingActivationReceiptSchema
|
|
38535
38765
|
}).strict();
|
|
@@ -38632,7 +38862,7 @@ var invitePurposeSchema = external_exports.enum(["ordinary", "cohort"]);
|
|
|
38632
38862
|
|
|
38633
38863
|
// ../../packages/protocol/src/mcp-onboarding.ts
|
|
38634
38864
|
var MCP_TOKEN_ABSOLUTE_MAX_EXPIRY_MS = (MCP_TOKEN_NO_EXPIRY_SENTINEL_DAYS + 1) * 24 * 60 * 60 * 1e3;
|
|
38635
|
-
var
|
|
38865
|
+
var uuidSchema22 = external_exports.string().uuid();
|
|
38636
38866
|
var isoDateTime7 = external_exports.string().datetime({ offset: true });
|
|
38637
38867
|
var onboardingStatusInputSchema = external_exports.object({}).strict();
|
|
38638
38868
|
var onboardingStatusOutputSchema = external_exports.object({
|
|
@@ -38676,7 +38906,7 @@ var onboardingAttachReferenceInputSchema = external_exports.object({
|
|
|
38676
38906
|
source: external_exports.string().trim().min(1).max(500).optional()
|
|
38677
38907
|
}).strict();
|
|
38678
38908
|
var onboardingAttachReferenceOutputSchema = external_exports.object({
|
|
38679
|
-
document_id:
|
|
38909
|
+
document_id: uuidSchema22,
|
|
38680
38910
|
storage_ref: external_exports.string().min(1),
|
|
38681
38911
|
kind: external_exports.enum(["org_chart", "role_doc", "plan", "financial", "other"]),
|
|
38682
38912
|
title: external_exports.string().min(1).nullable()
|
|
@@ -38706,7 +38936,7 @@ var onboardingCreateInviteInputSchema = external_exports.object({
|
|
|
38706
38936
|
flags: ordinaryInviteFlagsSchema.default({})
|
|
38707
38937
|
}).strict();
|
|
38708
38938
|
var onboardingCreateInviteOutputSchema = external_exports.object({
|
|
38709
|
-
invite_id:
|
|
38939
|
+
invite_id: uuidSchema22,
|
|
38710
38940
|
email: external_exports.string().email(),
|
|
38711
38941
|
role: external_exports.enum(["owner", "admin", "steward", "member"]),
|
|
38712
38942
|
token: external_exports.string().min(1)
|
|
@@ -38719,19 +38949,19 @@ var tenantAnthropicKeySaveOutputSchema = external_exports.object({
|
|
|
38719
38949
|
}).strict();
|
|
38720
38950
|
var tenantAnthropicKeyDisableInputSchema = external_exports.object({}).strict();
|
|
38721
38951
|
var tenantAnthropicKeyDisableOutputSchema = external_exports.object({
|
|
38722
|
-
tenant_id:
|
|
38723
|
-
credential_id:
|
|
38952
|
+
tenant_id: uuidSchema22,
|
|
38953
|
+
credential_id: uuidSchema22.nullable(),
|
|
38724
38954
|
disabled: external_exports.boolean(),
|
|
38725
38955
|
already_disabled: external_exports.boolean(),
|
|
38726
38956
|
managed_fallback_ready: external_exports.boolean()
|
|
38727
38957
|
}).strict();
|
|
38728
38958
|
var seatCreateInputSchema = external_exports.object({
|
|
38729
38959
|
name: external_exports.string().trim().min(1).max(120),
|
|
38730
|
-
parent_seat_id:
|
|
38960
|
+
parent_seat_id: uuidSchema22.nullable().optional(),
|
|
38731
38961
|
seat_type: external_exports.enum(["human", "agent", "hybrid"]).default("human")
|
|
38732
38962
|
}).strict();
|
|
38733
38963
|
var seatCreateOutputSchema = withCommandEffect({
|
|
38734
|
-
seat_id:
|
|
38964
|
+
seat_id: uuidSchema22,
|
|
38735
38965
|
// Mirrors the literal `createSeat` writes at insert time. Not sourced from a
|
|
38736
38966
|
// read-back: `createSeat` returns only the new id, and widening its
|
|
38737
38967
|
// signature to return the row is out of scope for this issue (schema +
|
|
@@ -38742,29 +38972,29 @@ var seatCreateOutputSchema = withCommandEffect({
|
|
|
38742
38972
|
status: external_exports.enum(["draft", "active", "vacant", "decommissioned"])
|
|
38743
38973
|
});
|
|
38744
38974
|
var seatRenameInputSchema = external_exports.object({
|
|
38745
|
-
seat_id:
|
|
38975
|
+
seat_id: uuidSchema22,
|
|
38746
38976
|
name: external_exports.string().trim().min(1).max(120)
|
|
38747
38977
|
}).strict();
|
|
38748
38978
|
var seatReparentInputSchema = external_exports.object({
|
|
38749
|
-
seat_id:
|
|
38750
|
-
new_parent_seat_id:
|
|
38979
|
+
seat_id: uuidSchema22,
|
|
38980
|
+
new_parent_seat_id: uuidSchema22.nullable()
|
|
38751
38981
|
}).strict();
|
|
38752
38982
|
var seatSetTypeInputSchema = external_exports.object({
|
|
38753
|
-
seat_id:
|
|
38983
|
+
seat_id: uuidSchema22,
|
|
38754
38984
|
seat_type: external_exports.enum(["human", "agent", "hybrid"])
|
|
38755
38985
|
}).strict();
|
|
38756
38986
|
var seatDecommissionInputSchema = external_exports.object({
|
|
38757
|
-
seat_id:
|
|
38987
|
+
seat_id: uuidSchema22
|
|
38758
38988
|
}).strict();
|
|
38759
38989
|
var seatMutationOutputSchema = external_exports.object({
|
|
38760
|
-
seat_id:
|
|
38990
|
+
seat_id: uuidSchema22
|
|
38761
38991
|
}).strict();
|
|
38762
38992
|
var seatDecommissionPreviewOutputSchema = external_exports.object({
|
|
38763
|
-
seat_id:
|
|
38993
|
+
seat_id: uuidSchema22,
|
|
38764
38994
|
seat_name: external_exports.string(),
|
|
38765
38995
|
previous_status: external_exports.enum(["draft", "active", "vacant", "decommissioned"]),
|
|
38766
38996
|
active_occupancy_count: external_exports.number().int().nonnegative(),
|
|
38767
|
-
active_agent_ids: external_exports.array(
|
|
38997
|
+
active_agent_ids: external_exports.array(uuidSchema22),
|
|
38768
38998
|
active_charter_count: external_exports.number().int().nonnegative(),
|
|
38769
38999
|
active_mcp_token_count: external_exports.number().int().nonnegative(),
|
|
38770
39000
|
active_credential_count: external_exports.number().int().nonnegative(),
|
|
@@ -38774,16 +39004,16 @@ var seatDecommissionPreviewOutputSchema = external_exports.object({
|
|
|
38774
39004
|
effects: external_exports.array(external_exports.string())
|
|
38775
39005
|
}).strict();
|
|
38776
39006
|
var charterDraftInputSchema = external_exports.object({
|
|
38777
|
-
seat_id:
|
|
39007
|
+
seat_id: uuidSchema22
|
|
38778
39008
|
}).strict();
|
|
38779
39009
|
var charterDraftOutputSchema = external_exports.object({
|
|
38780
|
-
charter_version_id:
|
|
38781
|
-
seat_id:
|
|
39010
|
+
charter_version_id: uuidSchema22,
|
|
39011
|
+
seat_id: uuidSchema22,
|
|
38782
39012
|
edit_revision: external_exports.number().int().min(1).optional(),
|
|
38783
39013
|
doc: external_exports.unknown()
|
|
38784
39014
|
}).strict();
|
|
38785
39015
|
var charterUpdateDraftInputSchema = external_exports.object({
|
|
38786
|
-
charter_version_id:
|
|
39016
|
+
charter_version_id: uuidSchema22,
|
|
38787
39017
|
expected_edit_revision: external_exports.number().int().min(1).optional(),
|
|
38788
39018
|
// DER-785 (Part G): the full Charter document contract (was `z.unknown()`).
|
|
38789
39019
|
// The DB layer already validated this with `charterSchema.parse`; advertising
|
|
@@ -38792,18 +39022,18 @@ var charterUpdateDraftInputSchema = external_exports.object({
|
|
|
38792
39022
|
doc: charterDocSchema
|
|
38793
39023
|
}).strict();
|
|
38794
39024
|
var charterSetInputSchema = external_exports.object({
|
|
38795
|
-
seat_id:
|
|
39025
|
+
seat_id: uuidSchema22,
|
|
38796
39026
|
doc: charterDocSchema,
|
|
38797
39027
|
approve: external_exports.boolean().default(false)
|
|
38798
39028
|
}).strict();
|
|
38799
39029
|
var charterMutationOutputSchema = external_exports.object({
|
|
38800
|
-
charter_version_id:
|
|
38801
|
-
seat_id:
|
|
39030
|
+
charter_version_id: uuidSchema22,
|
|
39031
|
+
seat_id: uuidSchema22,
|
|
38802
39032
|
edit_revision: external_exports.number().int().min(1).optional()
|
|
38803
39033
|
}).strict();
|
|
38804
39034
|
var charterApproveInputSchema = external_exports.object({
|
|
38805
|
-
seat_id:
|
|
38806
|
-
charter_version_id:
|
|
39035
|
+
seat_id: uuidSchema22.optional(),
|
|
39036
|
+
charter_version_id: uuidSchema22.optional(),
|
|
38807
39037
|
// DER-785 (Part G): a partial of the Charter doc shape (was an untyped record).
|
|
38808
39038
|
// These fields are shallow-merged onto the existing draft, then the merged doc
|
|
38809
39039
|
// is re-validated against the full schema at persist time.
|
|
@@ -38819,12 +39049,12 @@ var charterSignalResolutionSchema = external_exports.discriminatedUnion("action"
|
|
|
38819
39049
|
external_exports.object({
|
|
38820
39050
|
declaration_name: charterSignalDeclarationNameSchema,
|
|
38821
39051
|
action: external_exports.literal("adopt_existing"),
|
|
38822
|
-
measurable_id:
|
|
39052
|
+
measurable_id: uuidSchema22
|
|
38823
39053
|
}).strict(),
|
|
38824
39054
|
external_exports.object({
|
|
38825
39055
|
declaration_name: charterSignalDeclarationNameSchema,
|
|
38826
39056
|
action: external_exports.literal("move_existing"),
|
|
38827
|
-
measurable_id:
|
|
39057
|
+
measurable_id: uuidSchema22
|
|
38828
39058
|
}).strict(),
|
|
38829
39059
|
external_exports.object({
|
|
38830
39060
|
declaration_name: charterSignalDeclarationNameSchema,
|
|
@@ -38832,7 +39062,7 @@ var charterSignalResolutionSchema = external_exports.discriminatedUnion("action"
|
|
|
38832
39062
|
}).strict()
|
|
38833
39063
|
]);
|
|
38834
39064
|
var charterReconcileSignalsInputSchema = external_exports.object({
|
|
38835
|
-
charter_version_id:
|
|
39065
|
+
charter_version_id: uuidSchema22,
|
|
38836
39066
|
// The stale-draft guard: `charter_versions.edit_revision` starts at 1, so 0 is
|
|
38837
39067
|
// never a real revision.
|
|
38838
39068
|
expected_edit_revision: external_exports.number().int().min(1),
|
|
@@ -38840,16 +39070,16 @@ var charterReconcileSignalsInputSchema = external_exports.object({
|
|
|
38840
39070
|
apply_seat_type: external_exports.boolean().default(false)
|
|
38841
39071
|
}).strict();
|
|
38842
39072
|
var charterSignalGoalBindingSchema = external_exports.object({
|
|
38843
|
-
goal_id:
|
|
39073
|
+
goal_id: uuidSchema22,
|
|
38844
39074
|
goal_title: external_exports.string(),
|
|
38845
39075
|
// Null for a company objective, which owns no Seat. A `drives_status` binding on a
|
|
38846
39076
|
// seatless goal can never match a destination Seat, so movement fails closed.
|
|
38847
|
-
goal_seat_id:
|
|
39077
|
+
goal_seat_id: uuidSchema22.nullable(),
|
|
38848
39078
|
role: external_exports.enum(["drives_status", "informs"])
|
|
38849
39079
|
}).strict();
|
|
38850
39080
|
var charterSignalCandidateSchema = external_exports.object({
|
|
38851
|
-
measurable_id:
|
|
38852
|
-
owner_seat_id:
|
|
39081
|
+
measurable_id: uuidSchema22,
|
|
39082
|
+
owner_seat_id: uuidSchema22,
|
|
38853
39083
|
owner_seat_name: external_exports.string(),
|
|
38854
39084
|
stored_source: external_exports.enum(["human", "agent", "integration"]),
|
|
38855
39085
|
reading_count: external_exports.number().int().min(0),
|
|
@@ -38869,7 +39099,7 @@ var charterSignalCandidateSchema = external_exports.object({
|
|
|
38869
39099
|
var charterSignalReconciliationItemSchema = external_exports.object({
|
|
38870
39100
|
declaration_name: external_exports.string(),
|
|
38871
39101
|
status: external_exports.enum(["linked", "candidate", "ambiguous", "missing"]),
|
|
38872
|
-
linked_measurable_id:
|
|
39102
|
+
linked_measurable_id: uuidSchema22.nullable(),
|
|
38873
39103
|
candidates: external_exports.array(charterSignalCandidateSchema),
|
|
38874
39104
|
// A DERIVED suggestion, never an applied one: `null` whenever a human must choose
|
|
38875
39105
|
// (ambiguous), whenever nothing matches (missing), or when the declaration is already
|
|
@@ -38880,11 +39110,11 @@ var charterSignalReconciliationItemSchema = external_exports.object({
|
|
|
38880
39110
|
warnings: external_exports.array(external_exports.string())
|
|
38881
39111
|
}).strict();
|
|
38882
39112
|
var charterPreviewSignalReconciliationInputSchema = external_exports.object({
|
|
38883
|
-
charter_version_id:
|
|
39113
|
+
charter_version_id: uuidSchema22
|
|
38884
39114
|
}).strict();
|
|
38885
39115
|
var charterPreviewSignalReconciliationOutputSchema = external_exports.object({
|
|
38886
|
-
charter_version_id:
|
|
38887
|
-
seat_id:
|
|
39116
|
+
charter_version_id: uuidSchema22,
|
|
39117
|
+
seat_id: uuidSchema22,
|
|
38888
39118
|
// Pass this back as `expected_edit_revision` when reconciling, so a draft edited after
|
|
38889
39119
|
// the preview cannot be reconciled against a stale reading of it.
|
|
38890
39120
|
edit_revision: external_exports.number().int().min(1),
|
|
@@ -38895,20 +39125,20 @@ var charterDraftSkipReasonSchema = external_exports.enum(["seat_not_active", "ch
|
|
|
38895
39125
|
var charterDraftAllOutputSchema = withCommandEffect({
|
|
38896
39126
|
drafted: external_exports.number().int().nonnegative(),
|
|
38897
39127
|
skipped: external_exports.number().int().nonnegative(),
|
|
38898
|
-
draft_ids: external_exports.array(
|
|
39128
|
+
draft_ids: external_exports.array(uuidSchema22),
|
|
38899
39129
|
skipped_seats: external_exports.array(external_exports.object({
|
|
38900
|
-
seat_id:
|
|
39130
|
+
seat_id: uuidSchema22,
|
|
38901
39131
|
reason: charterDraftSkipReasonSchema
|
|
38902
39132
|
}).strict())
|
|
38903
39133
|
});
|
|
38904
39134
|
var charterSkipInputSchema = external_exports.object({
|
|
38905
|
-
charter_version_id:
|
|
39135
|
+
charter_version_id: uuidSchema22
|
|
38906
39136
|
}).strict();
|
|
38907
39137
|
var charterApplySeatTypeRecommendationInputSchema = external_exports.object({
|
|
38908
|
-
charter_version_id:
|
|
39138
|
+
charter_version_id: uuidSchema22
|
|
38909
39139
|
}).strict();
|
|
38910
39140
|
var charterSignManifestInputSchema = external_exports.object({
|
|
38911
|
-
charter_version_id:
|
|
39141
|
+
charter_version_id: uuidSchema22
|
|
38912
39142
|
}).strict();
|
|
38913
39143
|
var pendingConfirmationSchema = external_exports.object({
|
|
38914
39144
|
confirmationId: external_exports.string().min(1),
|
|
@@ -38962,7 +39192,7 @@ var confirmationListInputSchema = external_exports.object({
|
|
|
38962
39192
|
limit: external_exports.number().int().min(1).max(200).optional()
|
|
38963
39193
|
}).strict();
|
|
38964
39194
|
var confirmationSummarySchema = external_exports.object({
|
|
38965
|
-
id:
|
|
39195
|
+
id: uuidSchema22,
|
|
38966
39196
|
command_id: external_exports.string(),
|
|
38967
39197
|
redacted_args: external_exports.unknown(),
|
|
38968
39198
|
// DER-2161 kickback round 1, finding (6): tracks `PendingConfirmationListRow`'s
|
|
@@ -38972,7 +39202,7 @@ var confirmationSummarySchema = external_exports.object({
|
|
|
38972
39202
|
actor_kind: external_exports.enum(["user", "agent", "system", "operator"]),
|
|
38973
39203
|
source: external_exports.string(),
|
|
38974
39204
|
scope_kind: external_exports.enum(["tenant_admin", "tenant", "seat"]),
|
|
38975
|
-
seat_id:
|
|
39205
|
+
seat_id: uuidSchema22.nullable(),
|
|
38976
39206
|
seat_name: external_exports.string().nullable(),
|
|
38977
39207
|
seat_type: external_exports.enum(["human", "agent", "hybrid"]).nullable(),
|
|
38978
39208
|
risk_level: external_exports.enum(["normal", "sensitive", "dangerous"]),
|
|
@@ -39004,37 +39234,37 @@ var confirmationListOutputSchema = external_exports.object({
|
|
|
39004
39234
|
confirmations: external_exports.array(confirmationSummarySchema)
|
|
39005
39235
|
}).strict();
|
|
39006
39236
|
var confirmationDismissInputSchema = external_exports.object({
|
|
39007
|
-
confirmation_id:
|
|
39237
|
+
confirmation_id: uuidSchema22
|
|
39008
39238
|
}).strict();
|
|
39009
39239
|
var confirmationDismissOutputSchema = external_exports.object({
|
|
39010
39240
|
dismissed: external_exports.object({
|
|
39011
|
-
id:
|
|
39241
|
+
id: uuidSchema22,
|
|
39012
39242
|
status: external_exports.literal("dismissed")
|
|
39013
39243
|
}).strict()
|
|
39014
39244
|
}).strict();
|
|
39015
39245
|
var confirmationDismissStaleInputSchema = external_exports.object({}).strict();
|
|
39016
39246
|
var confirmationDismissStaleOutputSchema = external_exports.object({
|
|
39017
39247
|
dismissed_count: external_exports.number().int().min(0),
|
|
39018
|
-
dismissed_ids: external_exports.array(
|
|
39248
|
+
dismissed_ids: external_exports.array(uuidSchema22)
|
|
39019
39249
|
}).strict();
|
|
39020
39250
|
var credentialIngressInputSchema = external_exports.object({
|
|
39021
|
-
seat_id:
|
|
39251
|
+
seat_id: uuidSchema22.optional(),
|
|
39022
39252
|
provider: external_exports.string().trim().min(1),
|
|
39023
39253
|
scope_description: external_exports.string().trim().min(1),
|
|
39024
39254
|
secret_name: external_exports.string().trim().min(1),
|
|
39025
39255
|
secret: external_exports.string().trim().min(1)
|
|
39026
39256
|
}).strict();
|
|
39027
39257
|
var credentialIngressOutputSchema = external_exports.object({
|
|
39028
|
-
credential_id:
|
|
39258
|
+
credential_id: uuidSchema22,
|
|
39029
39259
|
provider: external_exports.string().min(1),
|
|
39030
|
-
seat_id:
|
|
39260
|
+
seat_id: uuidSchema22.nullable()
|
|
39031
39261
|
}).strict();
|
|
39032
39262
|
var credentialListInputSchema = external_exports.object({}).strict();
|
|
39033
39263
|
var credentialSummarySchema = external_exports.object({
|
|
39034
|
-
credential_id:
|
|
39264
|
+
credential_id: uuidSchema22,
|
|
39035
39265
|
provider: external_exports.string(),
|
|
39036
39266
|
scope_description: external_exports.string(),
|
|
39037
|
-
seat_id:
|
|
39267
|
+
seat_id: uuidSchema22.nullable(),
|
|
39038
39268
|
status: external_exports.string(),
|
|
39039
39269
|
created_at: external_exports.string(),
|
|
39040
39270
|
rotated_at: external_exports.string(),
|
|
@@ -39044,16 +39274,16 @@ var credentialListOutputSchema = external_exports.object({
|
|
|
39044
39274
|
credentials: external_exports.array(credentialSummarySchema)
|
|
39045
39275
|
}).strict();
|
|
39046
39276
|
var agentGoLiveInputSchema = external_exports.object({
|
|
39047
|
-
seat_id:
|
|
39048
|
-
charter_version_id:
|
|
39277
|
+
seat_id: uuidSchema22,
|
|
39278
|
+
charter_version_id: uuidSchema22
|
|
39049
39279
|
}).strict();
|
|
39050
39280
|
var agentGoLiveOutputSchema = external_exports.object({
|
|
39051
|
-
seat_id:
|
|
39052
|
-
charter_version_id:
|
|
39281
|
+
seat_id: uuidSchema22,
|
|
39282
|
+
charter_version_id: uuidSchema22,
|
|
39053
39283
|
status: external_exports.literal("live")
|
|
39054
39284
|
}).strict();
|
|
39055
39285
|
var compassSetInputSchema = external_exports.object({
|
|
39056
|
-
draft_id:
|
|
39286
|
+
draft_id: uuidSchema22.optional(),
|
|
39057
39287
|
doc: compassDraftSchema.optional(),
|
|
39058
39288
|
approve: external_exports.boolean().default(false)
|
|
39059
39289
|
}).strict().refine((input) => Boolean(input.draft_id) !== Boolean(input.doc), {
|
|
@@ -39061,7 +39291,7 @@ var compassSetInputSchema = external_exports.object({
|
|
|
39061
39291
|
path: ["draft_id"]
|
|
39062
39292
|
});
|
|
39063
39293
|
var compassMutationOutputSchema = external_exports.object({
|
|
39064
|
-
compass_version_id:
|
|
39294
|
+
compass_version_id: uuidSchema22,
|
|
39065
39295
|
status: external_exports.enum(["draft", "active", "superseded"]),
|
|
39066
39296
|
version: external_exports.number().int().nonnegative()
|
|
39067
39297
|
}).strict();
|
|
@@ -39070,42 +39300,42 @@ var compassDraftInputSchema = external_exports.object({
|
|
|
39070
39300
|
doc: compassDraftSchema
|
|
39071
39301
|
}).strict();
|
|
39072
39302
|
var compassUpdateDraftInputSchema = external_exports.object({
|
|
39073
|
-
draft_id:
|
|
39303
|
+
draft_id: uuidSchema22,
|
|
39074
39304
|
doc: compassDraftSchema
|
|
39075
39305
|
}).strict();
|
|
39076
39306
|
var compassApproveVersionInputSchema = external_exports.object({
|
|
39077
|
-
draft_id:
|
|
39307
|
+
draft_id: uuidSchema22
|
|
39078
39308
|
}).strict();
|
|
39079
39309
|
var compassRejectDraftInputSchema = external_exports.object({
|
|
39080
|
-
draft_id:
|
|
39310
|
+
draft_id: uuidSchema22
|
|
39081
39311
|
}).strict();
|
|
39082
39312
|
var compassAnswerGapInputSchema = external_exports.object({
|
|
39083
39313
|
gap_id: external_exports.string().min(1),
|
|
39084
39314
|
answer: external_exports.string().trim().min(1)
|
|
39085
39315
|
}).strict();
|
|
39086
39316
|
var seatStaffInputSchema = external_exports.object({
|
|
39087
|
-
seat_id:
|
|
39317
|
+
seat_id: uuidSchema22,
|
|
39088
39318
|
occupant: external_exports.discriminatedUnion("type", [
|
|
39089
39319
|
external_exports.object({ type: external_exports.literal("vacant") }).strict(),
|
|
39090
|
-
external_exports.object({ type: external_exports.literal("user"), user_id:
|
|
39091
|
-
external_exports.object({ type: external_exports.literal("agent"), agent_id:
|
|
39320
|
+
external_exports.object({ type: external_exports.literal("user"), user_id: uuidSchema22 }).strict(),
|
|
39321
|
+
external_exports.object({ type: external_exports.literal("agent"), agent_id: uuidSchema22 }).strict()
|
|
39092
39322
|
])
|
|
39093
39323
|
}).strict();
|
|
39094
39324
|
var staffingMutationOutputSchema = external_exports.object({
|
|
39095
|
-
seat_id:
|
|
39325
|
+
seat_id: uuidSchema22,
|
|
39096
39326
|
staffed: external_exports.enum(["vacant", "user", "agent"])
|
|
39097
39327
|
}).strict();
|
|
39098
39328
|
var staffingAssignUserInputSchema = external_exports.object({
|
|
39099
|
-
seat_id:
|
|
39100
|
-
user_id:
|
|
39329
|
+
seat_id: uuidSchema22,
|
|
39330
|
+
user_id: uuidSchema22
|
|
39101
39331
|
}).strict();
|
|
39102
39332
|
var staffingAssignAgentDryRunInputSchema = external_exports.object({
|
|
39103
|
-
seat_id:
|
|
39104
|
-
agent_id:
|
|
39333
|
+
seat_id: uuidSchema22,
|
|
39334
|
+
agent_id: uuidSchema22
|
|
39105
39335
|
}).strict();
|
|
39106
39336
|
var mcpTokenCreateInputSchema = external_exports.object({
|
|
39107
39337
|
scope: external_exports.enum(["tenant_admin", "seat"]),
|
|
39108
|
-
seat_id:
|
|
39338
|
+
seat_id: uuidSchema22.optional(),
|
|
39109
39339
|
// DER-830: explicit absolute expiry (kept for back-compat / direct callers).
|
|
39110
39340
|
// When omitted OR null, the DB default (now() + 90 days) applies — `null` is an
|
|
39111
39341
|
// accepted "no explicit expiry" signal (existing UI/MCP callers pass it), so it
|
|
@@ -39149,17 +39379,17 @@ var mcpTokenCreateInputSchema = external_exports.object({
|
|
|
39149
39379
|
}
|
|
39150
39380
|
});
|
|
39151
39381
|
var mcpTokenCreateOutputSchema = external_exports.object({
|
|
39152
|
-
token_id:
|
|
39382
|
+
token_id: uuidSchema22,
|
|
39153
39383
|
token: external_exports.string().min(1),
|
|
39154
39384
|
scope: external_exports.enum(["tenant_admin", "seat"]),
|
|
39155
|
-
seat_id:
|
|
39385
|
+
seat_id: uuidSchema22.nullable()
|
|
39156
39386
|
}).strict();
|
|
39157
39387
|
var mcpTokenRevokeInputSchema = external_exports.object({
|
|
39158
|
-
token_id:
|
|
39159
|
-
seat_id:
|
|
39388
|
+
token_id: uuidSchema22,
|
|
39389
|
+
seat_id: uuidSchema22.optional()
|
|
39160
39390
|
}).strict();
|
|
39161
39391
|
var mcpTokenRevokeOutputSchema = external_exports.object({
|
|
39162
|
-
token_id:
|
|
39392
|
+
token_id: uuidSchema22,
|
|
39163
39393
|
revoked: external_exports.boolean()
|
|
39164
39394
|
}).strict();
|
|
39165
39395
|
|
|
@@ -39172,7 +39402,7 @@ var markNotificationsReadRequestSchema = external_exports.object({
|
|
|
39172
39402
|
});
|
|
39173
39403
|
|
|
39174
39404
|
// ../../packages/protocol/src/product-analytics.ts
|
|
39175
|
-
var
|
|
39405
|
+
var uuidSchema23 = external_exports.string().uuid();
|
|
39176
39406
|
var opaqueRequestIdSchema = external_exports.string().trim().min(1).max(240);
|
|
39177
39407
|
var safeNameSchema = external_exports.string().trim().min(1).max(120).regex(/^[a-z][a-z0-9._:-]*$/);
|
|
39178
39408
|
var safeSurfaceSchema = external_exports.string().trim().min(1).max(80).regex(/^[a-z][a-z0-9_-]*$/);
|
|
@@ -39266,8 +39496,8 @@ var recommendationOutcomeStatusSchema = external_exports.enum([
|
|
|
39266
39496
|
]);
|
|
39267
39497
|
var durationMsSchema = external_exports.number().int().nonnegative().max(24 * 60 * 60 * 1e3).optional();
|
|
39268
39498
|
var productEventInputSchema = external_exports.object({
|
|
39269
|
-
tenant_id:
|
|
39270
|
-
user_id:
|
|
39499
|
+
tenant_id: uuidSchema23,
|
|
39500
|
+
user_id: uuidSchema23.optional(),
|
|
39271
39501
|
source: analyticsSourceSchema,
|
|
39272
39502
|
event_name: safeNameSchema,
|
|
39273
39503
|
route_template: routeTemplateSchema.optional(),
|
|
@@ -39276,8 +39506,8 @@ var productEventInputSchema = external_exports.object({
|
|
|
39276
39506
|
occurred_at: external_exports.string().datetime({ offset: true }).optional()
|
|
39277
39507
|
}).strict();
|
|
39278
39508
|
var pageViewInputSchema = external_exports.object({
|
|
39279
|
-
tenant_id:
|
|
39280
|
-
user_id:
|
|
39509
|
+
tenant_id: uuidSchema23,
|
|
39510
|
+
user_id: uuidSchema23.optional(),
|
|
39281
39511
|
route_template: routeTemplateSchema,
|
|
39282
39512
|
referrer_route_template: routeTemplateSchema.optional(),
|
|
39283
39513
|
surface: safeSurfaceSchema.default("web"),
|
|
@@ -39286,12 +39516,12 @@ var pageViewInputSchema = external_exports.object({
|
|
|
39286
39516
|
occurred_at: external_exports.string().datetime({ offset: true }).optional()
|
|
39287
39517
|
}).strict();
|
|
39288
39518
|
var commandInvocationInputSchema = external_exports.object({
|
|
39289
|
-
tenant_id:
|
|
39290
|
-
user_id:
|
|
39291
|
-
seat_id:
|
|
39292
|
-
run_id:
|
|
39293
|
-
agent_turn_execution_id:
|
|
39294
|
-
session_id:
|
|
39519
|
+
tenant_id: uuidSchema23,
|
|
39520
|
+
user_id: uuidSchema23.optional(),
|
|
39521
|
+
seat_id: uuidSchema23.optional(),
|
|
39522
|
+
run_id: uuidSchema23.optional(),
|
|
39523
|
+
agent_turn_execution_id: uuidSchema23.optional(),
|
|
39524
|
+
session_id: uuidSchema23.optional(),
|
|
39295
39525
|
command_id: safeNameSchema,
|
|
39296
39526
|
source: analyticsSourceSchema,
|
|
39297
39527
|
// DER-2161 kickback round 1, finding (6): tracks `command_invocations.actor_kind`
|
|
@@ -39305,7 +39535,7 @@ var commandInvocationInputSchema = external_exports.object({
|
|
|
39305
39535
|
// `packages/commands/src/context.ts`'s operator context builder now sets
|
|
39306
39536
|
// `initiatorKind: "operator"` instead of coercing to "agent".
|
|
39307
39537
|
initiator_kind: external_exports.enum(["user", "agent", "system", "operator"]).optional(),
|
|
39308
|
-
initiator_user_id:
|
|
39538
|
+
initiator_user_id: uuidSchema23.nullable().optional(),
|
|
39309
39539
|
scope_kind: external_exports.enum(["tenant_admin", "tenant", "seat"]),
|
|
39310
39540
|
status: commandInvocationStatusSchema,
|
|
39311
39541
|
guard_result: external_exports.enum(["allowed", "denied_manifest", "denied_budget", "escalated", "denied_tenant_policy"]).optional(),
|
|
@@ -39324,8 +39554,8 @@ var commandInvocationInputSchema = external_exports.object({
|
|
|
39324
39554
|
}
|
|
39325
39555
|
});
|
|
39326
39556
|
var onboardingMilestoneInputSchema = external_exports.object({
|
|
39327
|
-
tenant_id:
|
|
39328
|
-
user_id:
|
|
39557
|
+
tenant_id: uuidSchema23,
|
|
39558
|
+
user_id: uuidSchema23.optional(),
|
|
39329
39559
|
milestone: safeNameSchema,
|
|
39330
39560
|
status: analyticsOutcomeStatusSchema,
|
|
39331
39561
|
step_index: external_exports.number().int().nonnegative().max(100).optional(),
|
|
@@ -39334,19 +39564,19 @@ var onboardingMilestoneInputSchema = external_exports.object({
|
|
|
39334
39564
|
occurred_at: external_exports.string().datetime({ offset: true }).optional()
|
|
39335
39565
|
}).strict();
|
|
39336
39566
|
var recommendationEventInputSchema = external_exports.object({
|
|
39337
|
-
tenant_id:
|
|
39338
|
-
user_id:
|
|
39567
|
+
tenant_id: uuidSchema23,
|
|
39568
|
+
user_id: uuidSchema23.optional(),
|
|
39339
39569
|
recommendation_type: safeNameSchema,
|
|
39340
39570
|
source_surface: safeSurfaceSchema,
|
|
39341
39571
|
status: recommendationOutcomeStatusSchema,
|
|
39342
39572
|
target_kind: safeSurfaceSchema.optional(),
|
|
39343
|
-
target_id:
|
|
39573
|
+
target_id: uuidSchema23.optional(),
|
|
39344
39574
|
properties: recommendationAnalyticsPropertiesSchema.optional(),
|
|
39345
39575
|
occurred_at: external_exports.string().datetime({ offset: true }).optional()
|
|
39346
39576
|
}).strict();
|
|
39347
39577
|
|
|
39348
39578
|
// ../../packages/protocol/src/reads.ts
|
|
39349
|
-
var
|
|
39579
|
+
var uuidSchema24 = external_exports.string().uuid();
|
|
39350
39580
|
var isoDateTime8 = external_exports.string().datetime({ offset: true });
|
|
39351
39581
|
var seatTypeSchema = external_exports.enum(["human", "agent", "hybrid"]);
|
|
39352
39582
|
var seatStatusSchema = external_exports.enum(["draft", "active", "vacant", "decommissioned"]);
|
|
@@ -39361,13 +39591,13 @@ var credentialStatusSchema = external_exports.enum(["active", "revoked"]);
|
|
|
39361
39591
|
var runStatusSchema = external_exports.enum(["running", "succeeded", "failed", "timeout", "cancelled"]);
|
|
39362
39592
|
var graphGetInputSchema = external_exports.object({}).strict();
|
|
39363
39593
|
var graphNodeSchema = external_exports.object({
|
|
39364
|
-
seat_id:
|
|
39594
|
+
seat_id: uuidSchema24,
|
|
39365
39595
|
name: external_exports.string(),
|
|
39366
39596
|
seat_type: seatTypeSchema,
|
|
39367
39597
|
status: seatStatusSchema,
|
|
39368
|
-
parent_seat_id:
|
|
39598
|
+
parent_seat_id: uuidSchema24.nullable(),
|
|
39369
39599
|
is_root: external_exports.boolean(),
|
|
39370
|
-
steward_seat_id:
|
|
39600
|
+
steward_seat_id: uuidSchema24.nullable(),
|
|
39371
39601
|
occupant: external_exports.object({
|
|
39372
39602
|
kind: external_exports.enum(["user", "agent"]),
|
|
39373
39603
|
label: external_exports.string(),
|
|
@@ -39381,11 +39611,11 @@ var graphNodeSchema = external_exports.object({
|
|
|
39381
39611
|
planned_occupants: external_exports.array(external_exports.object({ display_name: external_exports.string() }).strict())
|
|
39382
39612
|
}).strict();
|
|
39383
39613
|
var graphEdgeSchema = external_exports.object({
|
|
39384
|
-
parent_seat_id:
|
|
39385
|
-
child_seat_id:
|
|
39614
|
+
parent_seat_id: uuidSchema24,
|
|
39615
|
+
child_seat_id: uuidSchema24
|
|
39386
39616
|
}).strict();
|
|
39387
39617
|
var graphGetOutputSchema = external_exports.object({
|
|
39388
|
-
root_seat_id:
|
|
39618
|
+
root_seat_id: uuidSchema24.nullable(),
|
|
39389
39619
|
nodes: external_exports.array(graphNodeSchema),
|
|
39390
39620
|
edges: external_exports.array(graphEdgeSchema),
|
|
39391
39621
|
status_rollups: external_exports.object({
|
|
@@ -39397,32 +39627,32 @@ var graphGetOutputSchema = external_exports.object({
|
|
|
39397
39627
|
}).strict()
|
|
39398
39628
|
}).strict();
|
|
39399
39629
|
var seatGetInputSchema = external_exports.object({
|
|
39400
|
-
seat_id:
|
|
39630
|
+
seat_id: uuidSchema24
|
|
39401
39631
|
}).strict();
|
|
39402
39632
|
var seatGetOutputSchema = external_exports.object({
|
|
39403
|
-
seat_id:
|
|
39633
|
+
seat_id: uuidSchema24,
|
|
39404
39634
|
name: external_exports.string(),
|
|
39405
39635
|
seat_type: seatTypeSchema,
|
|
39406
39636
|
status: seatStatusSchema,
|
|
39407
39637
|
purpose: external_exports.string().nullable(),
|
|
39408
|
-
parent_seat_id:
|
|
39638
|
+
parent_seat_id: uuidSchema24.nullable(),
|
|
39409
39639
|
steward_chain: external_exports.array(external_exports.object({
|
|
39410
|
-
seat_id:
|
|
39640
|
+
seat_id: uuidSchema24,
|
|
39411
39641
|
name: external_exports.string()
|
|
39412
39642
|
}).strict()),
|
|
39413
39643
|
occupancies: external_exports.array(external_exports.object({
|
|
39414
|
-
occupancy_id:
|
|
39644
|
+
occupancy_id: uuidSchema24,
|
|
39415
39645
|
occupant_type: external_exports.enum(["user", "agent"]),
|
|
39416
39646
|
label: external_exports.string(),
|
|
39417
39647
|
started_at: isoDateTime8,
|
|
39418
39648
|
ended_at: isoDateTime8.nullable()
|
|
39419
39649
|
}).strict()),
|
|
39420
|
-
active_charter_version_id:
|
|
39421
|
-
draft_charter_version_id:
|
|
39650
|
+
active_charter_version_id: uuidSchema24.nullable(),
|
|
39651
|
+
draft_charter_version_id: uuidSchema24.nullable(),
|
|
39422
39652
|
agent_status: agentStatusEnum2.nullable(),
|
|
39423
39653
|
agent_lane: agentLaneSchema3.nullable(),
|
|
39424
39654
|
mcp_tokens: external_exports.array(external_exports.object({
|
|
39425
|
-
token_id:
|
|
39655
|
+
token_id: uuidSchema24,
|
|
39426
39656
|
scope: mcpScopeSchema,
|
|
39427
39657
|
created_at: isoDateTime8,
|
|
39428
39658
|
last_seen_at: isoDateTime8.nullable(),
|
|
@@ -39432,7 +39662,7 @@ var seatGetOutputSchema = external_exports.object({
|
|
|
39432
39662
|
revoked_at: isoDateTime8.nullable()
|
|
39433
39663
|
}).strict()),
|
|
39434
39664
|
credentials: external_exports.array(external_exports.object({
|
|
39435
|
-
credential_id:
|
|
39665
|
+
credential_id: uuidSchema24,
|
|
39436
39666
|
provider: external_exports.string(),
|
|
39437
39667
|
status: credentialStatusSchema
|
|
39438
39668
|
}).strict()),
|
|
@@ -39445,12 +39675,12 @@ var seatGetOutputSchema = external_exports.object({
|
|
|
39445
39675
|
planned_occupants: external_exports.array(external_exports.object({ display_name: external_exports.string() }).strict())
|
|
39446
39676
|
}).strict();
|
|
39447
39677
|
var charterListInputSchema = external_exports.object({
|
|
39448
|
-
seat_id:
|
|
39678
|
+
seat_id: uuidSchema24.optional(),
|
|
39449
39679
|
status: charterStatusSchema.optional()
|
|
39450
39680
|
}).strict();
|
|
39451
39681
|
var charterSummarySchema = external_exports.object({
|
|
39452
|
-
charter_version_id:
|
|
39453
|
-
seat_id:
|
|
39682
|
+
charter_version_id: uuidSchema24,
|
|
39683
|
+
seat_id: uuidSchema24,
|
|
39454
39684
|
version: external_exports.number().int().nonnegative(),
|
|
39455
39685
|
status: charterStatusSchema,
|
|
39456
39686
|
created_at: isoDateTime8,
|
|
@@ -39460,11 +39690,11 @@ var charterListOutputSchema = external_exports.object({
|
|
|
39460
39690
|
charters: external_exports.array(charterSummarySchema)
|
|
39461
39691
|
}).strict();
|
|
39462
39692
|
var charterGetInputSchema = external_exports.object({
|
|
39463
|
-
charter_version_id:
|
|
39693
|
+
charter_version_id: uuidSchema24
|
|
39464
39694
|
}).strict();
|
|
39465
39695
|
var charterGetOutputSchema = external_exports.object({
|
|
39466
|
-
charter_version_id:
|
|
39467
|
-
seat_id:
|
|
39696
|
+
charter_version_id: uuidSchema24,
|
|
39697
|
+
seat_id: uuidSchema24,
|
|
39468
39698
|
version: external_exports.number().int().nonnegative(),
|
|
39469
39699
|
status: charterStatusSchema,
|
|
39470
39700
|
created_at: isoDateTime8,
|
|
@@ -39478,7 +39708,7 @@ var charterGetOutputSchema = external_exports.object({
|
|
|
39478
39708
|
}).strict();
|
|
39479
39709
|
var compassGetCurrentInputSchema = external_exports.object({}).strict();
|
|
39480
39710
|
var compassVersionRefSchema = external_exports.object({
|
|
39481
|
-
compass_version_id:
|
|
39711
|
+
compass_version_id: uuidSchema24,
|
|
39482
39712
|
version: external_exports.number().int().nonnegative(),
|
|
39483
39713
|
status: compassStatusSchema,
|
|
39484
39714
|
doc: external_exports.unknown()
|
|
@@ -39489,7 +39719,7 @@ var compassGetCurrentOutputSchema = external_exports.object({
|
|
|
39489
39719
|
// Sources expose document id and kind only. The underlying storage_ref can
|
|
39490
39720
|
// be a local file path, so it is never surfaced (redaction rule).
|
|
39491
39721
|
sources: external_exports.array(external_exports.object({
|
|
39492
|
-
document_id:
|
|
39722
|
+
document_id: uuidSchema24,
|
|
39493
39723
|
kind: external_exports.string()
|
|
39494
39724
|
}).strict())
|
|
39495
39725
|
}).strict();
|
|
@@ -39504,22 +39734,22 @@ var compassGapSchema = external_exports.object({
|
|
|
39504
39734
|
answer: external_exports.string().nullable()
|
|
39505
39735
|
}).strict();
|
|
39506
39736
|
var compassListGapsOutputSchema = external_exports.object({
|
|
39507
|
-
compass_version_id:
|
|
39737
|
+
compass_version_id: uuidSchema24.nullable(),
|
|
39508
39738
|
unanswered: external_exports.array(compassGapSchema),
|
|
39509
39739
|
answered: external_exports.array(compassGapSchema)
|
|
39510
39740
|
}).strict();
|
|
39511
39741
|
var agentStatusInputSchema = external_exports.object({
|
|
39512
|
-
seat_id:
|
|
39742
|
+
seat_id: uuidSchema24
|
|
39513
39743
|
}).strict();
|
|
39514
39744
|
var agentStatusOutputSchema = external_exports.object({
|
|
39515
|
-
seat_id:
|
|
39745
|
+
seat_id: uuidSchema24,
|
|
39516
39746
|
// DER-786 (C7): `has_agent` is true whenever a setup agent exists for the seat
|
|
39517
39747
|
// — including a draft setup that has no occupancy yet — so it agrees with
|
|
39518
39748
|
// agent_setup.get. `lifecycle` is the shared cross-surface term derived from
|
|
39519
39749
|
// `status` (none | draft_setup | dry_run | live | …).
|
|
39520
39750
|
has_agent: external_exports.boolean(),
|
|
39521
39751
|
lifecycle: agentLifecycleSchema,
|
|
39522
|
-
agent_id:
|
|
39752
|
+
agent_id: uuidSchema24.nullable(),
|
|
39523
39753
|
kind: agentKindSchema2.nullable(),
|
|
39524
39754
|
display_name: external_exports.string().nullable(),
|
|
39525
39755
|
lane: agentLaneSchema3.nullable(),
|
|
@@ -39527,9 +39757,9 @@ var agentStatusOutputSchema = external_exports.object({
|
|
|
39527
39757
|
schedule_cron: external_exports.string().nullable(),
|
|
39528
39758
|
schedule_timezone: external_exports.string().min(1).max(100).nullable(),
|
|
39529
39759
|
live: external_exports.boolean(),
|
|
39530
|
-
charter_version_id:
|
|
39760
|
+
charter_version_id: uuidSchema24.nullable(),
|
|
39531
39761
|
steward_chain: external_exports.array(external_exports.object({
|
|
39532
|
-
seat_id:
|
|
39762
|
+
seat_id: uuidSchema24,
|
|
39533
39763
|
name: external_exports.string()
|
|
39534
39764
|
}).strict()),
|
|
39535
39765
|
steward_chain_resolves_to_human: external_exports.boolean(),
|
|
@@ -39570,7 +39800,7 @@ var fleetWorkEvidenceSchema = external_exports.object({
|
|
|
39570
39800
|
label: external_exports.string(),
|
|
39571
39801
|
detail: external_exports.string(),
|
|
39572
39802
|
href: external_exports.string().nullable(),
|
|
39573
|
-
run_id:
|
|
39803
|
+
run_id: uuidSchema24.nullable(),
|
|
39574
39804
|
linkable_run: external_exports.boolean(),
|
|
39575
39805
|
can_run_now: external_exports.boolean()
|
|
39576
39806
|
}).strict();
|
|
@@ -39584,7 +39814,7 @@ var fleetWorkProgressSchema = external_exports.object({
|
|
|
39584
39814
|
last_durable_activity_at: isoDateTime8.nullable()
|
|
39585
39815
|
}).strict();
|
|
39586
39816
|
var fleetOverviewRowSchema = external_exports.object({
|
|
39587
|
-
seat_id:
|
|
39817
|
+
seat_id: uuidSchema24,
|
|
39588
39818
|
seat_name: external_exports.string(),
|
|
39589
39819
|
seat_path: external_exports.string(),
|
|
39590
39820
|
// DER-2068 (N-2): the seat's immediate parent seat name (null for the root
|
|
@@ -39621,7 +39851,7 @@ var agentListFleetOutputSchema = external_exports.object({
|
|
|
39621
39851
|
agents: external_exports.array(fleetOverviewRowSchema)
|
|
39622
39852
|
}).strict();
|
|
39623
39853
|
var runErrorLogSchema = external_exports.object({
|
|
39624
|
-
error_log_id:
|
|
39854
|
+
error_log_id: uuidSchema24,
|
|
39625
39855
|
source: external_exports.enum(["run", "llm", "tool", "mcp", "runner", "integration", "job", "web"]),
|
|
39626
39856
|
severity: external_exports.enum(["warning", "error", "critical"]),
|
|
39627
39857
|
code: external_exports.string().nullable(),
|
|
@@ -39634,9 +39864,9 @@ var agentFleetDigestInputSchema = external_exports.object({
|
|
|
39634
39864
|
error_limit: external_exports.number().int().min(1).max(100).default(50)
|
|
39635
39865
|
}).strict();
|
|
39636
39866
|
var fleetDigestRunSchema = external_exports.object({
|
|
39637
|
-
run_id:
|
|
39638
|
-
seat_id:
|
|
39639
|
-
agent_id:
|
|
39867
|
+
run_id: uuidSchema24,
|
|
39868
|
+
seat_id: uuidSchema24,
|
|
39869
|
+
agent_id: uuidSchema24,
|
|
39640
39870
|
status: runStatusSchema,
|
|
39641
39871
|
lane: agentLaneSchema3,
|
|
39642
39872
|
model: external_exports.string(),
|
|
@@ -39646,22 +39876,22 @@ var fleetDigestRunSchema = external_exports.object({
|
|
|
39646
39876
|
error_logs: external_exports.array(runErrorLogSchema)
|
|
39647
39877
|
}).strict();
|
|
39648
39878
|
var fleetDigestErrorSchema = runErrorLogSchema.extend({
|
|
39649
|
-
seat_id:
|
|
39650
|
-
agent_id:
|
|
39651
|
-
run_id:
|
|
39879
|
+
seat_id: uuidSchema24.nullable(),
|
|
39880
|
+
agent_id: uuidSchema24.nullable(),
|
|
39881
|
+
run_id: uuidSchema24.nullable(),
|
|
39652
39882
|
disposition: external_exports.enum(["active", "acknowledged", "resolved", "superseded"])
|
|
39653
39883
|
}).strict();
|
|
39654
39884
|
var fleetDigestNotificationErrorSchema = external_exports.object({
|
|
39655
|
-
notification_id:
|
|
39885
|
+
notification_id: uuidSchema24,
|
|
39656
39886
|
kind: external_exports.string(),
|
|
39657
39887
|
channel: external_exports.string(),
|
|
39658
39888
|
status: external_exports.string(),
|
|
39659
39889
|
provider: external_exports.string(),
|
|
39660
39890
|
error_message: external_exports.string().nullable(),
|
|
39661
|
-
error_log_id:
|
|
39891
|
+
error_log_id: uuidSchema24.nullable(),
|
|
39662
39892
|
source: external_exports.enum(["run", "llm", "tool", "mcp", "runner", "integration", "job", "web"]).nullable(),
|
|
39663
|
-
seat_id:
|
|
39664
|
-
run_id:
|
|
39893
|
+
seat_id: uuidSchema24.nullable(),
|
|
39894
|
+
run_id: uuidSchema24.nullable(),
|
|
39665
39895
|
created_at: isoDateTime8
|
|
39666
39896
|
}).strict();
|
|
39667
39897
|
var fleetDigestAgentSchema = fleetOverviewRowSchema.extend({
|
|
@@ -39710,21 +39940,21 @@ var seatTrustSummarySchema = external_exports.object({
|
|
|
39710
39940
|
last_activity_at: isoDateTime8.nullable()
|
|
39711
39941
|
}).strict();
|
|
39712
39942
|
var agentListRunsInputSchema = external_exports.object({
|
|
39713
|
-
seat_id:
|
|
39943
|
+
seat_id: uuidSchema24,
|
|
39714
39944
|
// Conservative, bounded page size; the timeline is a recent-history view.
|
|
39715
39945
|
limit: external_exports.number().int().min(1).max(200).default(50)
|
|
39716
39946
|
}).strict();
|
|
39717
39947
|
var agentGetRunInputSchema = external_exports.object({
|
|
39718
|
-
seat_id:
|
|
39719
|
-
run_id:
|
|
39948
|
+
seat_id: uuidSchema24,
|
|
39949
|
+
run_id: uuidSchema24,
|
|
39720
39950
|
// DER-1661: opt in to the persisted session transcript (`--transcript`). Off by
|
|
39721
39951
|
// default so the diagnostic read stays lean; the (potentially large) transcript body
|
|
39722
39952
|
// loads only when asked.
|
|
39723
39953
|
transcript: external_exports.boolean().default(false)
|
|
39724
39954
|
}).strict();
|
|
39725
39955
|
var seatRunSchema = external_exports.object({
|
|
39726
|
-
run_id:
|
|
39727
|
-
agent_id:
|
|
39956
|
+
run_id: uuidSchema24,
|
|
39957
|
+
agent_id: uuidSchema24,
|
|
39728
39958
|
agent_display_name: external_exports.string().nullable(),
|
|
39729
39959
|
status: runStatusSchema,
|
|
39730
39960
|
lane: agentLaneSchema3,
|
|
@@ -39741,8 +39971,8 @@ var seatRunErrorLogSchema = runErrorLogSchema.extend({
|
|
|
39741
39971
|
error_class: external_exports.string().nullable()
|
|
39742
39972
|
}).strict();
|
|
39743
39973
|
var seatRunDetailSchema = seatRunSchema.extend({
|
|
39744
|
-
task_id:
|
|
39745
|
-
work_order_id:
|
|
39974
|
+
task_id: uuidSchema24.nullable(),
|
|
39975
|
+
work_order_id: uuidSchema24.nullable(),
|
|
39746
39976
|
transcript_ref: external_exports.string(),
|
|
39747
39977
|
// DER-1913: null = usage UNKNOWN — a Codex / read-status / timeout / spawn-error
|
|
39748
39978
|
// runner turn reports no model-usage envelope, so the run records no token count.
|
|
@@ -39752,8 +39982,8 @@ var seatRunDetailSchema = seatRunSchema.extend({
|
|
|
39752
39982
|
outcome: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
39753
39983
|
error_logs: external_exports.array(seatRunErrorLogSchema),
|
|
39754
39984
|
skill_activations: external_exports.array(external_exports.object({
|
|
39755
|
-
skill_activation_id:
|
|
39756
|
-
skill_version_id:
|
|
39985
|
+
skill_activation_id: uuidSchema24,
|
|
39986
|
+
skill_version_id: uuidSchema24,
|
|
39757
39987
|
slug: external_exports.string().min(1),
|
|
39758
39988
|
name: external_exports.string().min(1),
|
|
39759
39989
|
version: external_exports.number().int().positive(),
|
|
@@ -39770,23 +40000,23 @@ var seatRunDetailSchema = seatRunSchema.extend({
|
|
|
39770
40000
|
transcript: sessionTranscriptReadResultSchema.nullable().optional()
|
|
39771
40001
|
}).strict();
|
|
39772
40002
|
var agentListRunsOutputSchema = external_exports.object({
|
|
39773
|
-
seat_id:
|
|
40003
|
+
seat_id: uuidSchema24,
|
|
39774
40004
|
summary: seatTrustSummarySchema,
|
|
39775
40005
|
runs: external_exports.array(seatRunSchema)
|
|
39776
40006
|
}).strict();
|
|
39777
40007
|
var agentGetRunOutputSchema = external_exports.object({
|
|
39778
|
-
seat_id:
|
|
40008
|
+
seat_id: uuidSchema24,
|
|
39779
40009
|
run: seatRunDetailSchema
|
|
39780
40010
|
}).strict();
|
|
39781
40011
|
var agentListToolCallsInputSchema = external_exports.object({
|
|
39782
|
-
seat_id:
|
|
40012
|
+
seat_id: uuidSchema24,
|
|
39783
40013
|
limit: external_exports.number().int().min(1).max(200).default(50),
|
|
39784
40014
|
// When true, return only HELD (non-allowed) tool calls — the governance view.
|
|
39785
40015
|
held_only: external_exports.boolean().default(false)
|
|
39786
40016
|
}).strict();
|
|
39787
40017
|
var seatToolCallSchema = external_exports.object({
|
|
39788
|
-
tool_call_id:
|
|
39789
|
-
run_id:
|
|
40018
|
+
tool_call_id: uuidSchema24,
|
|
40019
|
+
run_id: uuidSchema24.nullable(),
|
|
39790
40020
|
tool_name: external_exports.string(),
|
|
39791
40021
|
guard_result: guardResultSchema,
|
|
39792
40022
|
manifest_clause: external_exports.string().nullable(),
|
|
@@ -39795,13 +40025,13 @@ var seatToolCallSchema = external_exports.object({
|
|
|
39795
40025
|
finished_at: isoDateTime8.nullable()
|
|
39796
40026
|
}).strict();
|
|
39797
40027
|
var agentListToolCallsOutputSchema = external_exports.object({
|
|
39798
|
-
seat_id:
|
|
40028
|
+
seat_id: uuidSchema24,
|
|
39799
40029
|
summary: seatTrustSummarySchema,
|
|
39800
40030
|
tool_calls: external_exports.array(seatToolCallSchema)
|
|
39801
40031
|
}).strict();
|
|
39802
40032
|
var agentWatchRunInputSchema = external_exports.object({
|
|
39803
|
-
seat_id:
|
|
39804
|
-
run_id:
|
|
40033
|
+
seat_id: uuidSchema24,
|
|
40034
|
+
run_id: uuidSchema24
|
|
39805
40035
|
}).strict();
|
|
39806
40036
|
var runWatchCurrentStateSchema = external_exports.object({
|
|
39807
40037
|
state: workProgressStateSchema,
|
|
@@ -39822,7 +40052,7 @@ var runWatchHeartbeatSchema = external_exports.object({
|
|
|
39822
40052
|
reasons: external_exports.array(external_exports.string())
|
|
39823
40053
|
}).strict();
|
|
39824
40054
|
var agentWatchRunOutputSchema = external_exports.object({
|
|
39825
|
-
seat_id:
|
|
40055
|
+
seat_id: uuidSchema24,
|
|
39826
40056
|
run: seatRunSchema,
|
|
39827
40057
|
// the lean run row (status/lane/model/counts/timestamps)
|
|
39828
40058
|
is_live: external_exports.boolean(),
|
|
@@ -39846,16 +40076,16 @@ var deliverableLinkSchema = external_exports.object({
|
|
|
39846
40076
|
kind: external_exports.enum(["internal", "linear", "github", "external"])
|
|
39847
40077
|
}).strict();
|
|
39848
40078
|
var deliverableIdSchema = external_exports.union([
|
|
39849
|
-
|
|
40079
|
+
uuidSchema24,
|
|
39850
40080
|
external_exports.string().regex(/^run:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)
|
|
39851
40081
|
]);
|
|
39852
40082
|
var deliverableRowSchema = external_exports.object({
|
|
39853
40083
|
id: deliverableIdSchema,
|
|
39854
|
-
seat_id:
|
|
39855
|
-
agent_id:
|
|
39856
|
-
run_id:
|
|
39857
|
-
task_id:
|
|
39858
|
-
work_order_id:
|
|
40084
|
+
seat_id: uuidSchema24,
|
|
40085
|
+
agent_id: uuidSchema24.nullable(),
|
|
40086
|
+
run_id: uuidSchema24.nullable(),
|
|
40087
|
+
task_id: uuidSchema24.nullable(),
|
|
40088
|
+
work_order_id: uuidSchema24.nullable(),
|
|
39859
40089
|
kind: deliverableKindSchema,
|
|
39860
40090
|
title: external_exports.string(),
|
|
39861
40091
|
summary: external_exports.string().nullable(),
|
|
@@ -39875,13 +40105,13 @@ var deliverableRowSchema = external_exports.object({
|
|
|
39875
40105
|
receipt_presence: receiptPresenceSchema
|
|
39876
40106
|
}).strict();
|
|
39877
40107
|
var deliverableListInputSchema = external_exports.object({
|
|
39878
|
-
seat_id:
|
|
40108
|
+
seat_id: uuidSchema24
|
|
39879
40109
|
}).strict();
|
|
39880
40110
|
var deliverableListOutputSchema = external_exports.object({
|
|
39881
40111
|
deliverables: external_exports.array(deliverableRowSchema)
|
|
39882
40112
|
}).strict();
|
|
39883
40113
|
var deliverableGetInputSchema = external_exports.object({
|
|
39884
|
-
seat_id:
|
|
40114
|
+
seat_id: uuidSchema24,
|
|
39885
40115
|
deliverable_id: deliverableIdSchema
|
|
39886
40116
|
}).strict();
|
|
39887
40117
|
var deliverableGetOutputSchema = external_exports.object({
|
|
@@ -39889,12 +40119,12 @@ var deliverableGetOutputSchema = external_exports.object({
|
|
|
39889
40119
|
}).strict();
|
|
39890
40120
|
var mcpTokenListInputSchema = external_exports.object({
|
|
39891
40121
|
include_revoked: external_exports.boolean().default(false),
|
|
39892
|
-
seat_id:
|
|
40122
|
+
seat_id: uuidSchema24.optional()
|
|
39893
40123
|
}).strict();
|
|
39894
40124
|
var mcpTokenMetadataSchema = external_exports.object({
|
|
39895
|
-
token_id:
|
|
40125
|
+
token_id: uuidSchema24,
|
|
39896
40126
|
scope: mcpScopeSchema,
|
|
39897
|
-
seat_id:
|
|
40127
|
+
seat_id: uuidSchema24.nullable(),
|
|
39898
40128
|
created_at: isoDateTime8,
|
|
39899
40129
|
last_seen_at: isoDateTime8.nullable(),
|
|
39900
40130
|
// DER-830: expires_at is now always present (the column is NOT NULL).
|
|
@@ -39909,7 +40139,7 @@ var mcpTokenListOutputSchema = external_exports.object({
|
|
|
39909
40139
|
}).strict();
|
|
39910
40140
|
var devicePairingListInputSchema = external_exports.object({}).strict();
|
|
39911
40141
|
var devicePairingIntentSummarySchema = external_exports.object({
|
|
39912
|
-
intent_id:
|
|
40142
|
+
intent_id: uuidSchema24,
|
|
39913
40143
|
// The purpose the owner paired FOR. MVP mints only `user_session`; the enum
|
|
39914
40144
|
// carries the reserved second member so the contract is forward-complete.
|
|
39915
40145
|
purpose: external_exports.enum(["user_session", "implementation_bootstrap"]),
|
|
@@ -39917,14 +40147,14 @@ var devicePairingIntentSummarySchema = external_exports.object({
|
|
|
39917
40147
|
// `consumed` (a CLI redeemed it and a device row is anchored). Expired/revoked
|
|
39918
40148
|
// intents are omitted by the reader, so they never appear on this contract.
|
|
39919
40149
|
status: external_exports.enum(["pending", "consumed"]),
|
|
39920
|
-
created_by:
|
|
40150
|
+
created_by: uuidSchema24,
|
|
39921
40151
|
created_at: isoDateTime8,
|
|
39922
40152
|
expires_at: isoDateTime8,
|
|
39923
40153
|
// Whole seconds until the intent's own TTL lapses. Never negative: the reader
|
|
39924
40154
|
// only returns still-live intents, and the command floors it at 0.
|
|
39925
40155
|
expires_in_seconds: external_exports.number().int().nonnegative(),
|
|
39926
40156
|
// The anchored device row, present once a CLI has redeemed the code.
|
|
39927
|
-
device_authorization_id:
|
|
40157
|
+
device_authorization_id: uuidSchema24.nullable(),
|
|
39928
40158
|
device_status: external_exports.enum(["pending", "approved", "denied", "expired", "consumed"]).nullable(),
|
|
39929
40159
|
// TRUE only for an anchored device row that is still pending + unexpired — the
|
|
39930
40160
|
// exact rows the owner surface may one-click approve without a typed user_code.
|
|
@@ -39934,29 +40164,29 @@ var devicePairingListOutputSchema = external_exports.object({
|
|
|
39934
40164
|
intents: external_exports.array(devicePairingIntentSummarySchema)
|
|
39935
40165
|
}).strict();
|
|
39936
40166
|
var errorLogListInputSchema = external_exports.object({
|
|
39937
|
-
seat_id:
|
|
40167
|
+
seat_id: uuidSchema24.optional(),
|
|
39938
40168
|
source: external_exports.enum(["run", "llm", "tool", "mcp", "runner", "integration", "job", "web"]).optional(),
|
|
39939
40169
|
severity: external_exports.enum(["warning", "error", "critical"]).optional(),
|
|
39940
40170
|
resolved: external_exports.enum(["active", "acknowledged", "resolved", "all"]).default("active"),
|
|
39941
40171
|
limit: external_exports.number().int().min(1).max(200).default(50)
|
|
39942
40172
|
}).strict();
|
|
39943
40173
|
var errorLogListItemSchema = external_exports.object({
|
|
39944
|
-
error_log_id:
|
|
40174
|
+
error_log_id: uuidSchema24,
|
|
39945
40175
|
source: external_exports.enum(["run", "llm", "tool", "mcp", "runner", "integration", "job", "web"]),
|
|
39946
40176
|
severity: external_exports.enum(["warning", "error", "critical"]),
|
|
39947
40177
|
code: external_exports.string().nullable(),
|
|
39948
40178
|
message: external_exports.string(),
|
|
39949
|
-
seat_id:
|
|
39950
|
-
agent_id:
|
|
39951
|
-
run_id:
|
|
40179
|
+
seat_id: uuidSchema24.nullable(),
|
|
40180
|
+
agent_id: uuidSchema24.nullable(),
|
|
40181
|
+
run_id: uuidSchema24.nullable(),
|
|
39952
40182
|
disposition: external_exports.enum(["active", "acknowledged", "resolved", "superseded"]),
|
|
39953
40183
|
resolved_at: isoDateTime8.nullable(),
|
|
39954
|
-
resolved_by:
|
|
40184
|
+
resolved_by: uuidSchema24.nullable(),
|
|
39955
40185
|
resolution_reason: external_exports.string().nullable(),
|
|
39956
|
-
linked_task_id:
|
|
39957
|
-
linked_issue_id:
|
|
40186
|
+
linked_task_id: uuidSchema24.nullable(),
|
|
40187
|
+
linked_issue_id: uuidSchema24.nullable(),
|
|
39958
40188
|
linked_pr_ref: external_exports.string().nullable(),
|
|
39959
|
-
superseded_by_id:
|
|
40189
|
+
superseded_by_id: uuidSchema24.nullable(),
|
|
39960
40190
|
created_at: isoDateTime8
|
|
39961
40191
|
}).strict();
|
|
39962
40192
|
var errorLogListOutputSchema = external_exports.object({
|
|
@@ -39964,29 +40194,29 @@ var errorLogListOutputSchema = external_exports.object({
|
|
|
39964
40194
|
total: external_exports.number().int().nonnegative()
|
|
39965
40195
|
}).strict();
|
|
39966
40196
|
var errorLogResolveInputSchema = external_exports.object({
|
|
39967
|
-
error_log_id:
|
|
40197
|
+
error_log_id: uuidSchema24,
|
|
39968
40198
|
reason: external_exports.string().trim().min(1),
|
|
39969
40199
|
disposition: external_exports.enum(["acknowledged", "resolved"]).default("acknowledged"),
|
|
39970
|
-
linked_task_id:
|
|
39971
|
-
linked_issue_id:
|
|
40200
|
+
linked_task_id: uuidSchema24.optional(),
|
|
40201
|
+
linked_issue_id: uuidSchema24.optional(),
|
|
39972
40202
|
linked_pr_ref: external_exports.string().trim().min(1).optional()
|
|
39973
40203
|
}).strict();
|
|
39974
40204
|
var errorLogResolveOutputSchema = external_exports.object({
|
|
39975
|
-
error_log_id:
|
|
40205
|
+
error_log_id: uuidSchema24,
|
|
39976
40206
|
disposition: external_exports.enum(["acknowledged", "resolved"]),
|
|
39977
40207
|
resolved_at: isoDateTime8
|
|
39978
40208
|
}).strict();
|
|
39979
40209
|
var errorLogSupersedeInputSchema = external_exports.object({
|
|
39980
|
-
error_log_id:
|
|
39981
|
-
new_error_log_id:
|
|
40210
|
+
error_log_id: uuidSchema24,
|
|
40211
|
+
new_error_log_id: uuidSchema24,
|
|
39982
40212
|
reason: external_exports.string().trim().min(1),
|
|
39983
|
-
linked_task_id:
|
|
39984
|
-
linked_issue_id:
|
|
40213
|
+
linked_task_id: uuidSchema24.optional(),
|
|
40214
|
+
linked_issue_id: uuidSchema24.optional(),
|
|
39985
40215
|
linked_pr_ref: external_exports.string().trim().min(1).optional()
|
|
39986
40216
|
}).strict();
|
|
39987
40217
|
var errorLogSupersedeOutputSchema = external_exports.object({
|
|
39988
|
-
error_log_id:
|
|
39989
|
-
superseded_by_id:
|
|
40218
|
+
error_log_id: uuidSchema24,
|
|
40219
|
+
superseded_by_id: uuidSchema24,
|
|
39990
40220
|
disposition: external_exports.literal("superseded"),
|
|
39991
40221
|
resolved_at: isoDateTime8
|
|
39992
40222
|
}).strict();
|
|
@@ -39997,17 +40227,17 @@ var staleCandidatesInputSchema = external_exports.object({
|
|
|
39997
40227
|
limit: external_exports.number().int().min(1).max(200).default(50)
|
|
39998
40228
|
}).strict();
|
|
39999
40229
|
var errorLogStaleCandidateSchema = external_exports.object({
|
|
40000
|
-
error_log_id:
|
|
40230
|
+
error_log_id: uuidSchema24,
|
|
40001
40231
|
source: external_exports.enum(["run", "llm", "tool", "mcp", "runner", "integration", "job", "web"]),
|
|
40002
40232
|
severity: external_exports.enum(["warning", "error", "critical"]),
|
|
40003
40233
|
code: external_exports.string().nullable(),
|
|
40004
40234
|
message: external_exports.string(),
|
|
40005
|
-
seat_id:
|
|
40235
|
+
seat_id: uuidSchema24.nullable(),
|
|
40006
40236
|
occurrence_count: external_exports.number().int(),
|
|
40007
40237
|
last_seen_at: isoDateTime8,
|
|
40008
40238
|
created_at: isoDateTime8,
|
|
40009
40239
|
days_stale: external_exports.number().int(),
|
|
40010
|
-
linked_issue_id:
|
|
40240
|
+
linked_issue_id: uuidSchema24.nullable(),
|
|
40011
40241
|
linked_issue_resolved: external_exports.boolean(),
|
|
40012
40242
|
confidence: staleCandidateConfidenceSchema,
|
|
40013
40243
|
evidence: staleCandidateEvidenceSchema
|
|
@@ -40017,8 +40247,8 @@ var errorLogStaleCandidatesOutputSchema = external_exports.object({
|
|
|
40017
40247
|
total: external_exports.number().int().nonnegative()
|
|
40018
40248
|
}).strict();
|
|
40019
40249
|
var escalationStaleCandidateSchema = external_exports.object({
|
|
40020
|
-
escalation_id:
|
|
40021
|
-
seat_id:
|
|
40250
|
+
escalation_id: uuidSchema24,
|
|
40251
|
+
seat_id: uuidSchema24,
|
|
40022
40252
|
seat_name: external_exports.string(),
|
|
40023
40253
|
reason: external_exports.string(),
|
|
40024
40254
|
status: external_exports.literal("open"),
|
|
@@ -40034,14 +40264,14 @@ var escalationStaleCandidatesOutputSchema = external_exports.object({
|
|
|
40034
40264
|
total: external_exports.number().int().nonnegative()
|
|
40035
40265
|
}).strict();
|
|
40036
40266
|
var frictionStaleCandidateSchema = external_exports.object({
|
|
40037
|
-
issue_id:
|
|
40267
|
+
issue_id: uuidSchema24,
|
|
40038
40268
|
summary: external_exports.string(),
|
|
40039
40269
|
severity: external_exports.enum(["low", "med", "high", "critical"]),
|
|
40040
40270
|
status: external_exports.enum(["open", "diagnosing"]),
|
|
40041
40271
|
created_at: isoDateTime8,
|
|
40042
40272
|
updated_at: isoDateTime8,
|
|
40043
40273
|
days_stale: external_exports.number().int(),
|
|
40044
|
-
action_task_id:
|
|
40274
|
+
action_task_id: uuidSchema24.nullable(),
|
|
40045
40275
|
action_task_status: external_exports.string().nullable(),
|
|
40046
40276
|
action_task_done: external_exports.boolean(),
|
|
40047
40277
|
confidence: staleCandidateConfidenceSchema,
|
|
@@ -40052,20 +40282,20 @@ var frictionStaleCandidatesOutputSchema = external_exports.object({
|
|
|
40052
40282
|
total: external_exports.number().int().nonnegative()
|
|
40053
40283
|
}).strict();
|
|
40054
40284
|
var errorLogBulkResolveInputSchema = external_exports.object({
|
|
40055
|
-
error_log_ids: external_exports.array(
|
|
40285
|
+
error_log_ids: external_exports.array(uuidSchema24).min(1).max(200),
|
|
40056
40286
|
reason: external_exports.string().trim().min(1),
|
|
40057
40287
|
disposition: external_exports.enum(["acknowledged", "resolved"]).default("resolved")
|
|
40058
40288
|
}).strict();
|
|
40059
40289
|
var errorLogBulkResolveSkippedSchema = external_exports.object({
|
|
40060
|
-
error_log_id:
|
|
40290
|
+
error_log_id: uuidSchema24,
|
|
40061
40291
|
reason: external_exports.string()
|
|
40062
40292
|
}).strict();
|
|
40063
40293
|
var errorLogBulkResolveFailedSchema = external_exports.object({
|
|
40064
|
-
error_log_id:
|
|
40294
|
+
error_log_id: uuidSchema24,
|
|
40065
40295
|
reason: external_exports.string()
|
|
40066
40296
|
}).strict();
|
|
40067
40297
|
var errorLogBulkResolveOutputSchema = external_exports.object({
|
|
40068
|
-
resolved: external_exports.array(
|
|
40298
|
+
resolved: external_exports.array(uuidSchema24),
|
|
40069
40299
|
skipped: external_exports.array(errorLogBulkResolveSkippedSchema),
|
|
40070
40300
|
failed: external_exports.array(errorLogBulkResolveFailedSchema),
|
|
40071
40301
|
resolved_count: external_exports.number().int().nonnegative(),
|
|
@@ -40074,19 +40304,19 @@ var errorLogBulkResolveOutputSchema = external_exports.object({
|
|
|
40074
40304
|
total: external_exports.number().int().nonnegative()
|
|
40075
40305
|
}).strict();
|
|
40076
40306
|
var escalationBulkResolveInputSchema = external_exports.object({
|
|
40077
|
-
escalation_ids: external_exports.array(
|
|
40307
|
+
escalation_ids: external_exports.array(uuidSchema24).min(1).max(200),
|
|
40078
40308
|
reason: external_exports.string().trim().min(1)
|
|
40079
40309
|
}).strict();
|
|
40080
40310
|
var escalationBulkResolveSkippedSchema = external_exports.object({
|
|
40081
|
-
escalation_id:
|
|
40311
|
+
escalation_id: uuidSchema24,
|
|
40082
40312
|
reason: external_exports.string()
|
|
40083
40313
|
}).strict();
|
|
40084
40314
|
var escalationBulkResolveFailedSchema = external_exports.object({
|
|
40085
|
-
escalation_id:
|
|
40315
|
+
escalation_id: uuidSchema24,
|
|
40086
40316
|
reason: external_exports.string()
|
|
40087
40317
|
}).strict();
|
|
40088
40318
|
var escalationBulkResolveOutputSchema = external_exports.object({
|
|
40089
|
-
resolved: external_exports.array(
|
|
40319
|
+
resolved: external_exports.array(uuidSchema24),
|
|
40090
40320
|
skipped: external_exports.array(escalationBulkResolveSkippedSchema),
|
|
40091
40321
|
failed: external_exports.array(escalationBulkResolveFailedSchema),
|
|
40092
40322
|
resolved_count: external_exports.number().int().nonnegative(),
|
|
@@ -40095,19 +40325,19 @@ var escalationBulkResolveOutputSchema = external_exports.object({
|
|
|
40095
40325
|
total: external_exports.number().int().nonnegative()
|
|
40096
40326
|
}).strict();
|
|
40097
40327
|
var frictionBulkResolveInputSchema = external_exports.object({
|
|
40098
|
-
issue_ids: external_exports.array(
|
|
40328
|
+
issue_ids: external_exports.array(uuidSchema24).min(1).max(200),
|
|
40099
40329
|
root_cause: external_exports.string().trim().min(1)
|
|
40100
40330
|
}).strict();
|
|
40101
40331
|
var frictionBulkResolveSkippedSchema = external_exports.object({
|
|
40102
|
-
issue_id:
|
|
40332
|
+
issue_id: uuidSchema24,
|
|
40103
40333
|
reason: external_exports.string()
|
|
40104
40334
|
}).strict();
|
|
40105
40335
|
var frictionBulkResolveFailedSchema = external_exports.object({
|
|
40106
|
-
issue_id:
|
|
40336
|
+
issue_id: uuidSchema24,
|
|
40107
40337
|
reason: external_exports.string()
|
|
40108
40338
|
}).strict();
|
|
40109
40339
|
var frictionBulkResolveOutputSchema = external_exports.object({
|
|
40110
|
-
resolved: external_exports.array(
|
|
40340
|
+
resolved: external_exports.array(uuidSchema24),
|
|
40111
40341
|
skipped: external_exports.array(frictionBulkResolveSkippedSchema),
|
|
40112
40342
|
failed: external_exports.array(frictionBulkResolveFailedSchema),
|
|
40113
40343
|
resolved_count: external_exports.number().int().nonnegative(),
|
|
@@ -40117,10 +40347,10 @@ var frictionBulkResolveOutputSchema = external_exports.object({
|
|
|
40117
40347
|
}).strict();
|
|
40118
40348
|
var runHeartbeatStateSchema = external_exports.enum(["working", "quiet_healthy", "recovered", "stalled", "unavailable"]);
|
|
40119
40349
|
var agentRunHeartbeatsInputSchema = external_exports.object({
|
|
40120
|
-
seat_ids: external_exports.array(
|
|
40350
|
+
seat_ids: external_exports.array(uuidSchema24).min(1).max(200).optional()
|
|
40121
40351
|
}).strict();
|
|
40122
40352
|
var runHeartbeatSeatRollupSchema = external_exports.object({
|
|
40123
|
-
seat_id:
|
|
40353
|
+
seat_id: uuidSchema24,
|
|
40124
40354
|
state: runHeartbeatStateSchema,
|
|
40125
40355
|
stalled: external_exports.boolean(),
|
|
40126
40356
|
run_count: external_exports.number().int().nonnegative(),
|
|
@@ -40240,13 +40470,13 @@ var runSummaryOutputSchema = external_exports.object({
|
|
|
40240
40470
|
});
|
|
40241
40471
|
|
|
40242
40472
|
// ../../packages/protocol/src/system-health.ts
|
|
40243
|
-
var
|
|
40473
|
+
var uuidSchema25 = external_exports.string().uuid();
|
|
40244
40474
|
var isoDateTime10 = external_exports.string().datetime({ offset: true });
|
|
40245
40475
|
var systemHealthCallerKindSchema = external_exports.enum(["tenant_admin", "member", "seat_token"]);
|
|
40246
40476
|
var systemHealthCallerSchema = external_exports.object({
|
|
40247
40477
|
kind: systemHealthCallerKindSchema,
|
|
40248
|
-
seat_id:
|
|
40249
|
-
seat_ids: external_exports.array(
|
|
40478
|
+
seat_id: uuidSchema25.optional(),
|
|
40479
|
+
seat_ids: external_exports.array(uuidSchema25).min(1).optional()
|
|
40250
40480
|
}).strict();
|
|
40251
40481
|
var systemHealthVerdictSchema = external_exports.enum(["healthy", "degraded", "blocked"]);
|
|
40252
40482
|
var systemHealthSeveritySchema = external_exports.enum(["info", "warning", "critical"]);
|
|
@@ -40284,18 +40514,18 @@ var systemHealthFindingSchema = external_exports.object({
|
|
|
40284
40514
|
summary: external_exports.string().min(1),
|
|
40285
40515
|
detail: external_exports.string().min(1),
|
|
40286
40516
|
remediation: systemHealthActionSchema,
|
|
40287
|
-
seat_id:
|
|
40288
|
-
goal_id:
|
|
40289
|
-
run_id:
|
|
40290
|
-
issue_id:
|
|
40291
|
-
task_id:
|
|
40292
|
-
error_log_id:
|
|
40517
|
+
seat_id: uuidSchema25.nullable(),
|
|
40518
|
+
goal_id: uuidSchema25.nullable(),
|
|
40519
|
+
run_id: uuidSchema25.nullable(),
|
|
40520
|
+
issue_id: uuidSchema25.nullable(),
|
|
40521
|
+
task_id: uuidSchema25.nullable(),
|
|
40522
|
+
error_log_id: uuidSchema25.nullable()
|
|
40293
40523
|
}).strict();
|
|
40294
40524
|
var systemHealthScopeSchema = external_exports.object({
|
|
40295
40525
|
mode: systemHealthScopeModeSchema,
|
|
40296
|
-
root_seat_ids: external_exports.array(
|
|
40297
|
-
included_seat_ids: external_exports.array(
|
|
40298
|
-
requested_seat_id:
|
|
40526
|
+
root_seat_ids: external_exports.array(uuidSchema25),
|
|
40527
|
+
included_seat_ids: external_exports.array(uuidSchema25),
|
|
40528
|
+
requested_seat_id: uuidSchema25.nullable(),
|
|
40299
40529
|
total_seat_count: external_exports.number().int().nonnegative()
|
|
40300
40530
|
}).strict();
|
|
40301
40531
|
var systemHealthFleetSectionSchema = external_exports.object({
|
|
@@ -40352,7 +40582,7 @@ var systemHealthSectionsSchema = external_exports.object({
|
|
|
40352
40582
|
sync: systemHealthSyncSectionSchema
|
|
40353
40583
|
}).strict();
|
|
40354
40584
|
var systemHealthInputSchema = external_exports.object({
|
|
40355
|
-
seat_id:
|
|
40585
|
+
seat_id: uuidSchema25.optional()
|
|
40356
40586
|
}).strict();
|
|
40357
40587
|
var systemHealthCheckInputSchema = systemHealthInputSchema.extend({
|
|
40358
40588
|
caller: systemHealthCallerSchema
|
|
@@ -40379,10 +40609,10 @@ var baserowFilteredCountInputSchema = external_exports.object({
|
|
|
40379
40609
|
}).strict();
|
|
40380
40610
|
|
|
40381
40611
|
// ../../packages/protocol/src/signal-report.ts
|
|
40382
|
-
var
|
|
40612
|
+
var uuidSchema26 = external_exports.string().uuid();
|
|
40383
40613
|
var dateOnlySchema3 = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD");
|
|
40384
40614
|
var signalReportInputSchema = external_exports.object({
|
|
40385
|
-
measurable_id:
|
|
40615
|
+
measurable_id: uuidSchema26,
|
|
40386
40616
|
value: external_exports.number().finite(),
|
|
40387
40617
|
// Optional; defaults to the measurable's current period (resolved in the
|
|
40388
40618
|
// command against the measurable's own cadence via the canonical bounds).
|
|
@@ -40393,8 +40623,8 @@ var signalReportInputSchema = external_exports.object({
|
|
|
40393
40623
|
confidence: external_exports.enum(["low", "medium", "high"]).optional()
|
|
40394
40624
|
}).strict();
|
|
40395
40625
|
var signalReportOutputSchema = external_exports.object({
|
|
40396
|
-
reading_id:
|
|
40397
|
-
measurable_id:
|
|
40626
|
+
reading_id: uuidSchema26,
|
|
40627
|
+
measurable_id: uuidSchema26,
|
|
40398
40628
|
// Always false: an agent-sourced reading is a draft until a human confirms it.
|
|
40399
40629
|
confirmed: external_exports.literal(false)
|
|
40400
40630
|
}).strict();
|
|
@@ -40425,12 +40655,12 @@ var signalReadingProposalSchema = external_exports.object({
|
|
|
40425
40655
|
});
|
|
40426
40656
|
|
|
40427
40657
|
// ../../packages/protocol/src/signal-draft-first-readings.ts
|
|
40428
|
-
var
|
|
40658
|
+
var uuidSchema27 = external_exports.string().uuid();
|
|
40429
40659
|
var signalDraftFirstReadingsInputSchema = external_exports.object({
|
|
40430
|
-
measurable_id:
|
|
40660
|
+
measurable_id: uuidSchema27
|
|
40431
40661
|
}).strict();
|
|
40432
40662
|
var signalDraftFirstReadingsOutputSchema = external_exports.object({
|
|
40433
|
-
measurable_id:
|
|
40663
|
+
measurable_id: uuidSchema27,
|
|
40434
40664
|
// The live pull outcome, surfaced verbatim so the UI can explain a no-datapoint
|
|
40435
40665
|
// result honestly ("source polled, nothing came back") rather than silently.
|
|
40436
40666
|
outcome: external_exports.enum(["ok", "blocked", "error"]),
|
|
@@ -40438,7 +40668,7 @@ var signalDraftFirstReadingsOutputSchema = external_exports.object({
|
|
|
40438
40668
|
// Never fabricates back-dated history the source cannot actually produce.
|
|
40439
40669
|
drafted: external_exports.number().int().min(0).max(1),
|
|
40440
40670
|
// Present only when drafted === 1.
|
|
40441
|
-
reading_id:
|
|
40671
|
+
reading_id: uuidSchema27.optional(),
|
|
40442
40672
|
value: external_exports.number().finite().optional(),
|
|
40443
40673
|
period_start: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD").optional(),
|
|
40444
40674
|
// Present only when drafted === 0: a short, non-secret machine reason
|
|
@@ -42149,7 +42379,7 @@ var softwareFactoryBudgetExhaustedEventSchema = external_exports.object({
|
|
|
42149
42379
|
}).strict();
|
|
42150
42380
|
|
|
42151
42381
|
// ../../packages/protocol/src/sync-brief.ts
|
|
42152
|
-
var
|
|
42382
|
+
var uuidSchema28 = external_exports.string().uuid();
|
|
42153
42383
|
var dateSchema = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/);
|
|
42154
42384
|
var syncBriefGapSchema = external_exports.object({
|
|
42155
42385
|
section: external_exports.enum(["exceptions", "goal_deltas", "task_review", "friction", "agent_activity"]),
|
|
@@ -42162,8 +42392,8 @@ var sectionSchema = (itemSchema) => external_exports.object({
|
|
|
42162
42392
|
flagged_gaps: external_exports.array(syncBriefGapSchema)
|
|
42163
42393
|
}).strict();
|
|
42164
42394
|
var syncBriefExceptionSchema = external_exports.object({
|
|
42165
|
-
measurable_id:
|
|
42166
|
-
seat_id:
|
|
42395
|
+
measurable_id: uuidSchema28,
|
|
42396
|
+
seat_id: uuidSchema28,
|
|
42167
42397
|
seat_name: external_exports.string().min(1),
|
|
42168
42398
|
name: external_exports.string().min(1),
|
|
42169
42399
|
state: external_exports.enum(["risk", "crit", "pending"]),
|
|
@@ -42174,8 +42404,8 @@ var syncBriefExceptionSchema = external_exports.object({
|
|
|
42174
42404
|
freshness: external_exports.enum(["fresh", "due", "stale", "awaiting_first_reading", "not_expected"]).optional()
|
|
42175
42405
|
}).strict();
|
|
42176
42406
|
var syncBriefGoalDeltaSchema = external_exports.object({
|
|
42177
|
-
goal_id:
|
|
42178
|
-
seat_id:
|
|
42407
|
+
goal_id: uuidSchema28,
|
|
42408
|
+
seat_id: uuidSchema28.nullable(),
|
|
42179
42409
|
seat_name: external_exports.string().nullable(),
|
|
42180
42410
|
title: external_exports.string().min(1),
|
|
42181
42411
|
status: external_exports.enum(["on", "off", "done", "dropped"]),
|
|
@@ -42202,22 +42432,22 @@ var syncBriefTaskReviewSchema = external_exports.object({
|
|
|
42202
42432
|
previous_done_rate: external_exports.number().min(0).max(1),
|
|
42203
42433
|
delta: external_exports.number().min(-1).max(1),
|
|
42204
42434
|
stalled: external_exports.array(external_exports.object({
|
|
42205
|
-
task_id:
|
|
42206
|
-
owner_seat_id:
|
|
42435
|
+
task_id: uuidSchema28,
|
|
42436
|
+
owner_seat_id: uuidSchema28,
|
|
42207
42437
|
owner_seat_name: external_exports.string().min(1),
|
|
42208
42438
|
title: external_exports.string().min(1),
|
|
42209
42439
|
due_on: dateSchema,
|
|
42210
42440
|
stalled_at: external_exports.string().nullable()
|
|
42211
42441
|
}).strict()),
|
|
42212
42442
|
overdue_by_owner: external_exports.array(external_exports.object({
|
|
42213
|
-
owner_seat_id:
|
|
42443
|
+
owner_seat_id: uuidSchema28,
|
|
42214
42444
|
owner_seat_name: external_exports.string().min(1),
|
|
42215
42445
|
overdue_count: external_exports.number().int().nonnegative()
|
|
42216
42446
|
}).strict())
|
|
42217
42447
|
}).strict();
|
|
42218
42448
|
var syncBriefIssueSchema = external_exports.object({
|
|
42219
|
-
issue_id:
|
|
42220
|
-
raised_by_seat_id:
|
|
42449
|
+
issue_id: uuidSchema28,
|
|
42450
|
+
raised_by_seat_id: uuidSchema28,
|
|
42221
42451
|
raised_by_seat_name: external_exports.string().min(1),
|
|
42222
42452
|
summary: external_exports.string().min(1),
|
|
42223
42453
|
severity: external_exports.enum(["low", "med", "high", "critical"]),
|
|
@@ -42234,9 +42464,9 @@ var syncBriefActionItemTrendSchema = external_exports.object({
|
|
|
42234
42464
|
has_prior: external_exports.boolean()
|
|
42235
42465
|
}).strict();
|
|
42236
42466
|
var syncBriefCascadeAtRiskSchema = external_exports.object({
|
|
42237
|
-
goal_id:
|
|
42467
|
+
goal_id: uuidSchema28,
|
|
42238
42468
|
title: external_exports.string().min(1),
|
|
42239
|
-
seat_id:
|
|
42469
|
+
seat_id: uuidSchema28.nullable(),
|
|
42240
42470
|
progress_pct: external_exports.number().int().min(0).max(100),
|
|
42241
42471
|
classification: external_exports.enum(["at_risk", "projected_miss"]),
|
|
42242
42472
|
behind_days: external_exports.number().nullable(),
|
|
@@ -42245,7 +42475,7 @@ var syncBriefCascadeAtRiskSchema = external_exports.object({
|
|
|
42245
42475
|
target_date: external_exports.string().date().nullable().optional()
|
|
42246
42476
|
}).strict();
|
|
42247
42477
|
var syncBriefRunHeartbeatStalledSeatSchema = external_exports.object({
|
|
42248
|
-
seat_id:
|
|
42478
|
+
seat_id: uuidSchema28,
|
|
42249
42479
|
current_phase: external_exports.string().nullable(),
|
|
42250
42480
|
stalled_run_count: external_exports.number().int().nonnegative()
|
|
42251
42481
|
}).strict();
|
|
@@ -42270,8 +42500,8 @@ var syncBriefRunHeartbeatRollupSchema = external_exports.object({
|
|
|
42270
42500
|
stalled_seats: external_exports.array(syncBriefRunHeartbeatStalledSeatSchema)
|
|
42271
42501
|
}).strict();
|
|
42272
42502
|
var syncBriefAgentActivitySchema = external_exports.object({
|
|
42273
|
-
agent_id:
|
|
42274
|
-
seat_id:
|
|
42503
|
+
agent_id: uuidSchema28,
|
|
42504
|
+
seat_id: uuidSchema28,
|
|
42275
42505
|
seat_name: external_exports.string().min(1),
|
|
42276
42506
|
run_count: external_exports.number().int().nonnegative(),
|
|
42277
42507
|
failed_run_count: external_exports.number().int().nonnegative(),
|
|
@@ -42284,11 +42514,11 @@ var syncBriefAgentActivitySchema = external_exports.object({
|
|
|
42284
42514
|
var syncBriefSchema = external_exports.object({
|
|
42285
42515
|
schema_version: external_exports.literal(1),
|
|
42286
42516
|
tenant: external_exports.object({
|
|
42287
|
-
id:
|
|
42517
|
+
id: uuidSchema28,
|
|
42288
42518
|
name: external_exports.string().min(1)
|
|
42289
42519
|
}).strict(),
|
|
42290
42520
|
cluster: external_exports.object({
|
|
42291
|
-
id:
|
|
42521
|
+
id: uuidSchema28,
|
|
42292
42522
|
name: external_exports.string().min(1)
|
|
42293
42523
|
}).strict().nullable(),
|
|
42294
42524
|
period: external_exports.object({
|
|
@@ -42332,17 +42562,17 @@ var syncBriefSchema = external_exports.object({
|
|
|
42332
42562
|
}).strict();
|
|
42333
42563
|
|
|
42334
42564
|
// ../../packages/protocol/src/charter-backfill.ts
|
|
42335
|
-
var
|
|
42565
|
+
var uuidSchema29 = external_exports.string().uuid();
|
|
42336
42566
|
var charterBackfillStockEvidenceInputSchema = external_exports.object({}).strict();
|
|
42337
42567
|
var charterBackfillStockEvidenceOutputSchema = external_exports.object({
|
|
42338
|
-
tenant_id:
|
|
42568
|
+
tenant_id: uuidSchema29,
|
|
42339
42569
|
updated: external_exports.array(external_exports.object({
|
|
42340
|
-
seat_id:
|
|
42341
|
-
charter_version_id:
|
|
42342
|
-
superseded_charter_version_id:
|
|
42570
|
+
seat_id: uuidSchema29,
|
|
42571
|
+
charter_version_id: uuidSchema29,
|
|
42572
|
+
superseded_charter_version_id: uuidSchema29,
|
|
42343
42573
|
from_revision: external_exports.enum(["0092", "0124", "current"]),
|
|
42344
|
-
decision_id:
|
|
42345
|
-
receipt_id:
|
|
42574
|
+
decision_id: uuidSchema29,
|
|
42575
|
+
receipt_id: uuidSchema29.nullable(),
|
|
42346
42576
|
// DER-3043 r8 disclosure: the permission-manifest grant delta this
|
|
42347
42577
|
// supersession applied (0092 -> current appends the two Trusted auto-band
|
|
42348
42578
|
// grants; 0124 -> current drops tool_grants.agent.update; current -> []).
|
|
@@ -42353,28 +42583,28 @@ var charterBackfillStockEvidenceOutputSchema = external_exports.object({
|
|
|
42353
42583
|
}).strict()
|
|
42354
42584
|
}).strict()),
|
|
42355
42585
|
already_current: external_exports.array(external_exports.object({
|
|
42356
|
-
seat_id:
|
|
42357
|
-
charter_version_id:
|
|
42586
|
+
seat_id: uuidSchema29,
|
|
42587
|
+
charter_version_id: uuidSchema29,
|
|
42358
42588
|
reason: external_exports.literal("evidence_already_verified")
|
|
42359
42589
|
}).strict()),
|
|
42360
42590
|
excluded_edited: external_exports.array(external_exports.object({
|
|
42361
|
-
seat_id:
|
|
42362
|
-
charter_version_id:
|
|
42591
|
+
seat_id: uuidSchema29,
|
|
42592
|
+
charter_version_id: uuidSchema29,
|
|
42363
42593
|
reason: external_exports.literal("charter_doc_not_a_recognized_stock_revision")
|
|
42364
42594
|
}).strict()),
|
|
42365
42595
|
excluded_in_flight: external_exports.array(external_exports.object({
|
|
42366
|
-
seat_id:
|
|
42367
|
-
charter_version_id:
|
|
42596
|
+
seat_id: uuidSchema29,
|
|
42597
|
+
charter_version_id: uuidSchema29,
|
|
42368
42598
|
successor_kind: external_exports.enum(["agent", "charter_version"]),
|
|
42369
42599
|
reason: external_exports.literal("successor_in_flight")
|
|
42370
42600
|
}).strict()),
|
|
42371
42601
|
excluded_no_active_charter: external_exports.array(external_exports.object({
|
|
42372
|
-
seat_id:
|
|
42602
|
+
seat_id: uuidSchema29.nullable(),
|
|
42373
42603
|
reason: external_exports.enum(["no_active_charter_version", "no_canonical_aicos_seat"])
|
|
42374
42604
|
}).strict()),
|
|
42375
42605
|
excluded_noncanonical: external_exports.array(external_exports.object({
|
|
42376
|
-
seat_id:
|
|
42377
|
-
charter_version_id:
|
|
42606
|
+
seat_id: uuidSchema29,
|
|
42607
|
+
charter_version_id: uuidSchema29,
|
|
42378
42608
|
reason: external_exports.enum(["stock_doc_off_canonical_seat", "canonical_seat_without_stock_occupancy"])
|
|
42379
42609
|
}).strict())
|
|
42380
42610
|
}).strict();
|
|
@@ -42453,11 +42683,11 @@ var usageSnapshotOutputSchema = external_exports.object({
|
|
|
42453
42683
|
}).strict();
|
|
42454
42684
|
|
|
42455
42685
|
// ../../packages/protocol/src/event-payloads.ts
|
|
42456
|
-
var
|
|
42686
|
+
var uuidSchema30 = external_exports.string().uuid();
|
|
42457
42687
|
var evidenceSchema = external_exports.array(external_exports.unknown());
|
|
42458
42688
|
var statusEventPayloadSchema = external_exports.object({
|
|
42459
42689
|
measurables: external_exports.array(external_exports.object({
|
|
42460
|
-
id:
|
|
42690
|
+
id: uuidSchema30,
|
|
42461
42691
|
value: external_exports.number().finite(),
|
|
42462
42692
|
// DER-1045: an optional, non-secret citation for an agent-proposed reading
|
|
42463
42693
|
// (signal.report) — where the number came from + the agent's confidence.
|
|
@@ -42492,7 +42722,7 @@ var statusEventPayloadSchema = external_exports.object({
|
|
|
42492
42722
|
}).strict().optional()
|
|
42493
42723
|
}).strict()).optional(),
|
|
42494
42724
|
goals: external_exports.array(external_exports.object({
|
|
42495
|
-
id:
|
|
42725
|
+
id: uuidSchema30,
|
|
42496
42726
|
state: external_exports.enum(["on", "off"]),
|
|
42497
42727
|
note: external_exports.string().min(1).optional(),
|
|
42498
42728
|
// DER-2214: structured status-event attribution so "deliberately human-pinned"
|
|
@@ -42524,8 +42754,8 @@ var escalationEventPayloadSchema = escalationRaiseInputSchema.extend({
|
|
|
42524
42754
|
}).strict();
|
|
42525
42755
|
var issueEventPayloadSchema = external_exports.object({
|
|
42526
42756
|
summary: external_exports.string().min(1),
|
|
42527
|
-
blocking_goal_id:
|
|
42528
|
-
broken_measurable_id:
|
|
42757
|
+
blocking_goal_id: uuidSchema30.optional(),
|
|
42758
|
+
broken_measurable_id: uuidSchema30.optional(),
|
|
42529
42759
|
evidence: evidenceSchema,
|
|
42530
42760
|
severity: external_exports.enum(["low", "med", "high", "critical"]),
|
|
42531
42761
|
// DER-1978 (S2): an OPTIONAL short human-readable title written at creation.
|
|
@@ -42537,7 +42767,7 @@ var issueEventPayloadSchema = external_exports.object({
|
|
|
42537
42767
|
}).strict();
|
|
42538
42768
|
|
|
42539
42769
|
// ../../packages/protocol/src/event-internal-payloads.ts
|
|
42540
|
-
var
|
|
42770
|
+
var uuidSchema31 = external_exports.string().uuid();
|
|
42541
42771
|
var internalEventObjectSchema = external_exports.record(external_exports.string(), external_exports.unknown()).refine((payload) => !Array.isArray(payload), "Internal event payload must be an object");
|
|
42542
42772
|
var actionEventPayloadSchema = external_exports.object({ action: external_exports.string().min(1) }).passthrough();
|
|
42543
42773
|
function authoritativePrefixUnion(branches, authoritative) {
|
|
@@ -42559,25 +42789,25 @@ function authoritativePrefixUnion(branches, authoritative) {
|
|
|
42559
42789
|
}
|
|
42560
42790
|
var inviteCreatedEventPayloadSchema = external_exports.object({
|
|
42561
42791
|
action: external_exports.literal("invite.created"),
|
|
42562
|
-
invite_id:
|
|
42792
|
+
invite_id: uuidSchema31,
|
|
42563
42793
|
email: external_exports.string().email(),
|
|
42564
42794
|
role: memberRoleSchema,
|
|
42565
42795
|
member_type: memberTypeSchema,
|
|
42566
42796
|
access_profile: memberAccessProfileSchema,
|
|
42567
42797
|
aicos_access_scope: aicosAccessScopeSchema,
|
|
42568
|
-
invited_by:
|
|
42798
|
+
invited_by: uuidSchema31
|
|
42569
42799
|
}).strict();
|
|
42570
42800
|
var inviteRevokedEventPayloadSchema = external_exports.object({
|
|
42571
42801
|
action: external_exports.literal("invite.revoked"),
|
|
42572
|
-
invite_id:
|
|
42573
|
-
revoked_by:
|
|
42802
|
+
invite_id: uuidSchema31,
|
|
42803
|
+
revoked_by: uuidSchema31
|
|
42574
42804
|
}).strict();
|
|
42575
42805
|
var inviteAcceptedEventPayloadSchema = external_exports.object({
|
|
42576
42806
|
action: external_exports.literal("invite.accepted"),
|
|
42577
|
-
invite_id:
|
|
42578
|
-
user_id:
|
|
42579
|
-
membership_id:
|
|
42580
|
-
linked_seat_ids: external_exports.array(
|
|
42807
|
+
invite_id: uuidSchema31,
|
|
42808
|
+
user_id: uuidSchema31,
|
|
42809
|
+
membership_id: uuidSchema31,
|
|
42810
|
+
linked_seat_ids: external_exports.array(uuidSchema31)
|
|
42581
42811
|
}).strict();
|
|
42582
42812
|
var inviteLifecycleEventPayloadSchema = external_exports.union([
|
|
42583
42813
|
inviteCreatedEventPayloadSchema,
|
|
@@ -42642,14 +42872,14 @@ var heldToolActionReplaySchema = external_exports.object({
|
|
|
42642
42872
|
}).strict();
|
|
42643
42873
|
|
|
42644
42874
|
// ../../packages/protocol/src/operating.ts
|
|
42645
|
-
var
|
|
42875
|
+
var uuidSchema32 = external_exports.string().uuid();
|
|
42646
42876
|
var taskListInputSchema = external_exports.object({}).strict();
|
|
42647
42877
|
var operatingTaskSchema = external_exports.object({
|
|
42648
|
-
id:
|
|
42878
|
+
id: uuidSchema32,
|
|
42649
42879
|
title: external_exports.string(),
|
|
42650
42880
|
description: external_exports.string().nullable(),
|
|
42651
|
-
from_seat_id:
|
|
42652
|
-
goal_id:
|
|
42881
|
+
from_seat_id: uuidSchema32.nullable(),
|
|
42882
|
+
goal_id: uuidSchema32.nullable(),
|
|
42653
42883
|
acceptance_criteria: external_exports.unknown(),
|
|
42654
42884
|
due_on: external_exports.string().nullable(),
|
|
42655
42885
|
status: external_exports.string()
|
|
@@ -42658,54 +42888,54 @@ var taskListOutputSchema = external_exports.object({
|
|
|
42658
42888
|
tasks: external_exports.array(operatingTaskSchema)
|
|
42659
42889
|
}).strict();
|
|
42660
42890
|
var taskAcceptInputSchema = external_exports.object({
|
|
42661
|
-
id:
|
|
42891
|
+
id: uuidSchema32
|
|
42662
42892
|
}).strict();
|
|
42663
42893
|
var taskConfirmProposalInputSchema = external_exports.object({
|
|
42664
|
-
id:
|
|
42894
|
+
id: uuidSchema32
|
|
42665
42895
|
}).strict();
|
|
42666
42896
|
var taskMutationOutputSchema = external_exports.object({
|
|
42667
42897
|
task: external_exports.object({
|
|
42668
|
-
id:
|
|
42898
|
+
id: uuidSchema32,
|
|
42669
42899
|
status: external_exports.string()
|
|
42670
42900
|
}).strict()
|
|
42671
42901
|
}).strict();
|
|
42672
42902
|
var taskDeclineInputSchema = external_exports.object({
|
|
42673
|
-
id:
|
|
42903
|
+
id: uuidSchema32,
|
|
42674
42904
|
reason: external_exports.string().min(1)
|
|
42675
42905
|
}).strict();
|
|
42676
42906
|
var taskDeclineOutputSchema = external_exports.object({
|
|
42677
42907
|
task: external_exports.object({
|
|
42678
|
-
id:
|
|
42908
|
+
id: uuidSchema32,
|
|
42679
42909
|
status: external_exports.string(),
|
|
42680
42910
|
decline_reason: external_exports.string()
|
|
42681
42911
|
}).strict()
|
|
42682
42912
|
}).strict();
|
|
42683
42913
|
var taskCompleteInputSchema = external_exports.object({
|
|
42684
|
-
id:
|
|
42914
|
+
id: uuidSchema32,
|
|
42685
42915
|
summary: external_exports.string().min(1),
|
|
42686
42916
|
artifacts: external_exports.unknown().optional()
|
|
42687
42917
|
}).strict();
|
|
42688
42918
|
var taskCompleteOutputSchema = external_exports.object({
|
|
42689
|
-
task_id:
|
|
42690
|
-
event_id:
|
|
42919
|
+
task_id: uuidSchema32,
|
|
42920
|
+
event_id: uuidSchema32,
|
|
42691
42921
|
type: external_exports.literal("handoff")
|
|
42692
42922
|
}).strict();
|
|
42693
42923
|
var statusRecordOutputSchema = external_exports.object({
|
|
42694
|
-
event_id:
|
|
42924
|
+
event_id: uuidSchema32,
|
|
42695
42925
|
type: external_exports.literal("status")
|
|
42696
42926
|
}).strict();
|
|
42697
42927
|
var frictionFileIssueInputSchema = issueEventPayloadSchema.extend({
|
|
42698
42928
|
source_key: external_exports.string().trim().min(1).max(200).optional()
|
|
42699
42929
|
}).strict();
|
|
42700
42930
|
var duplicateFrictionCandidateSchema = external_exports.object({
|
|
42701
|
-
issue_id:
|
|
42931
|
+
issue_id: uuidSchema32,
|
|
42702
42932
|
summary: external_exports.string().min(1),
|
|
42703
42933
|
// pg_trgm similarity in [0, 1]; higher is more similar.
|
|
42704
42934
|
similarity: external_exports.number().min(0).max(1)
|
|
42705
42935
|
}).strict();
|
|
42706
42936
|
var frictionFileIssueOutputSchema = external_exports.object({
|
|
42707
|
-
event_id:
|
|
42708
|
-
issue_id:
|
|
42937
|
+
event_id: uuidSchema32,
|
|
42938
|
+
issue_id: uuidSchema32,
|
|
42709
42939
|
type: external_exports.literal("issue"),
|
|
42710
42940
|
// DER-1522: likely-duplicate candidates detected before creation. Recommend,
|
|
42711
42941
|
// never block — filing always proceeds; empty when nothing crossed the
|
|
@@ -42719,12 +42949,12 @@ var workLogInputSchema = external_exports.object({
|
|
|
42719
42949
|
note: external_exports.string().min(1)
|
|
42720
42950
|
}).strict();
|
|
42721
42951
|
var workLogOutputSchema = external_exports.object({
|
|
42722
|
-
event_id:
|
|
42952
|
+
event_id: uuidSchema32,
|
|
42723
42953
|
type: external_exports.literal("task")
|
|
42724
42954
|
}).strict();
|
|
42725
42955
|
var escalationRaiseOutputSchema = external_exports.object({
|
|
42726
|
-
event_id:
|
|
42727
|
-
escalation_id:
|
|
42956
|
+
event_id: uuidSchema32,
|
|
42957
|
+
escalation_id: uuidSchema32,
|
|
42728
42958
|
type: external_exports.literal("escalation")
|
|
42729
42959
|
}).strict();
|
|
42730
42960
|
var deliverableKindSchema2 = external_exports.enum(["brief", "work_evidence", "artifact", "report", "other"]);
|
|
@@ -42783,7 +43013,7 @@ var deliverableRejectOutputSchema = external_exports.object({
|
|
|
42783
43013
|
}).strict();
|
|
42784
43014
|
|
|
42785
43015
|
// ../../packages/protocol/src/steward.ts
|
|
42786
|
-
var
|
|
43016
|
+
var uuidSchema33 = external_exports.string().uuid();
|
|
42787
43017
|
var escalationStatusSchema = external_exports.enum([
|
|
42788
43018
|
"open",
|
|
42789
43019
|
"approved",
|
|
@@ -42792,18 +43022,18 @@ var escalationStatusSchema = external_exports.enum([
|
|
|
42792
43022
|
]);
|
|
42793
43023
|
var stewardReplayActionSummarySchema = external_exports.object({
|
|
42794
43024
|
tool_name: external_exports.string(),
|
|
42795
|
-
run_id:
|
|
43025
|
+
run_id: uuidSchema33
|
|
42796
43026
|
}).strict();
|
|
42797
43027
|
var stewardProposedToolCallSchema = external_exports.object({
|
|
42798
43028
|
tool_name: external_exports.string(),
|
|
42799
43029
|
args_summary: external_exports.unknown()
|
|
42800
43030
|
}).strict();
|
|
42801
43031
|
var stewardEscalationSchema = external_exports.object({
|
|
42802
|
-
id:
|
|
42803
|
-
seat_id:
|
|
43032
|
+
id: uuidSchema33,
|
|
43033
|
+
seat_id: uuidSchema33,
|
|
42804
43034
|
seat_name: external_exports.string(),
|
|
42805
43035
|
seat_type: external_exports.enum(["human", "agent", "hybrid"]),
|
|
42806
|
-
steward_seat_id:
|
|
43036
|
+
steward_seat_id: uuidSchema33,
|
|
42807
43037
|
steward_seat_name: external_exports.string(),
|
|
42808
43038
|
reason: external_exports.string(),
|
|
42809
43039
|
// DER-1978 (S2): OPTIONAL short headline written at creation; null/absent when unset
|
|
@@ -42826,11 +43056,11 @@ var stewardEscalationSchema = external_exports.object({
|
|
|
42826
43056
|
proposed_tool_call: stewardProposedToolCallSchema.optional(),
|
|
42827
43057
|
recommended_action: external_exports.string().nullable(),
|
|
42828
43058
|
status: escalationStatusSchema,
|
|
42829
|
-
decided_by:
|
|
43059
|
+
decided_by: uuidSchema33.nullable(),
|
|
42830
43060
|
decided_by_name: external_exports.string().nullable(),
|
|
42831
43061
|
decided_at: external_exports.string().nullable(),
|
|
42832
43062
|
decision_note: external_exports.string().nullable(),
|
|
42833
|
-
issue_id:
|
|
43063
|
+
issue_id: uuidSchema33.nullable(),
|
|
42834
43064
|
created_at: external_exports.string(),
|
|
42835
43065
|
updated_at: external_exports.string()
|
|
42836
43066
|
}).strict();
|
|
@@ -42841,27 +43071,27 @@ var escalationListOutputSchema = external_exports.object({
|
|
|
42841
43071
|
escalations: external_exports.array(stewardEscalationSchema)
|
|
42842
43072
|
}).strict();
|
|
42843
43073
|
var escalationGetInputSchema = external_exports.object({
|
|
42844
|
-
id:
|
|
43074
|
+
id: uuidSchema33
|
|
42845
43075
|
}).strict();
|
|
42846
43076
|
var escalationGetOutputSchema = external_exports.object({
|
|
42847
43077
|
escalation: stewardEscalationSchema
|
|
42848
43078
|
}).strict();
|
|
42849
43079
|
var escalationResolveActionSchema = external_exports.enum(["approve", "convert_to_issue"]);
|
|
42850
43080
|
var escalationResolveInputSchema = external_exports.object({
|
|
42851
|
-
id:
|
|
43081
|
+
id: uuidSchema33,
|
|
42852
43082
|
action: escalationResolveActionSchema.optional(),
|
|
42853
43083
|
rationale: external_exports.string().trim().min(1).optional()
|
|
42854
43084
|
}).strict();
|
|
42855
43085
|
var escalationRejectInputSchema = external_exports.object({
|
|
42856
|
-
id:
|
|
43086
|
+
id: uuidSchema33,
|
|
42857
43087
|
rationale: external_exports.string().trim().min(1).optional()
|
|
42858
43088
|
}).strict();
|
|
42859
43089
|
var escalationDecisionOutputSchema = external_exports.object({
|
|
42860
|
-
escalation_id:
|
|
43090
|
+
escalation_id: uuidSchema33,
|
|
42861
43091
|
status: escalationStatusSchema,
|
|
42862
|
-
decision_id:
|
|
42863
|
-
decided_by:
|
|
42864
|
-
issue_id:
|
|
43092
|
+
decision_id: uuidSchema33,
|
|
43093
|
+
decided_by: uuidSchema33,
|
|
43094
|
+
issue_id: uuidSchema33.nullable(),
|
|
42865
43095
|
// DER-1478: true when the resolved escalation carries a durable replay_action
|
|
42866
43096
|
// (an approval-gated connector write) that the approvals path should actuate
|
|
42867
43097
|
// after this decision is recorded. Omitted (not false) for non-connector
|
|
@@ -43042,7 +43272,7 @@ var workDetailsSchemas = {
|
|
|
43042
43272
|
};
|
|
43043
43273
|
|
|
43044
43274
|
// ../../packages/protocol/src/agent-grant-intervention.ts
|
|
43045
|
-
var
|
|
43275
|
+
var uuidSchema34 = external_exports.string().uuid();
|
|
43046
43276
|
var agentGrantBlockerKindSchema = external_exports.enum([
|
|
43047
43277
|
"rost_capability",
|
|
43048
43278
|
"os_permission",
|
|
@@ -43059,16 +43289,16 @@ var agentGrantInterventionStatusSchema = external_exports.enum([
|
|
|
43059
43289
|
]);
|
|
43060
43290
|
var agentGrantKindSchema = external_exports.enum(["allow_once", "permanent"]);
|
|
43061
43291
|
var agentGrantInterventionSchema = external_exports.object({
|
|
43062
|
-
id:
|
|
43063
|
-
seat_id:
|
|
43292
|
+
id: uuidSchema34,
|
|
43293
|
+
seat_id: uuidSchema34,
|
|
43064
43294
|
seat_name: external_exports.string().nullable(),
|
|
43065
|
-
agent_id:
|
|
43295
|
+
agent_id: uuidSchema34.nullable(),
|
|
43066
43296
|
// The source blocked attempt (audit link); null once the run is retention-purged.
|
|
43067
|
-
run_id:
|
|
43297
|
+
run_id: uuidSchema34.nullable(),
|
|
43068
43298
|
// The runner the blocker lives on, for os_permission repairs ("Open on Runner").
|
|
43069
|
-
runner_id:
|
|
43299
|
+
runner_id: uuidSchema34.nullable(),
|
|
43070
43300
|
// The linked continuation attempt, populated when a continuation is enqueued.
|
|
43071
|
-
continuation_run_id:
|
|
43301
|
+
continuation_run_id: uuidSchema34.nullable(),
|
|
43072
43302
|
blocker_kind: agentGrantBlockerKindSchema,
|
|
43073
43303
|
status: agentGrantInterventionStatusSchema,
|
|
43074
43304
|
// The specific capability/scope requested (e.g. "gmail.send"), when applicable.
|
|
@@ -43083,7 +43313,7 @@ var agentGrantInterventionSchema = external_exports.object({
|
|
|
43083
43313
|
// True once the blocked attempt released its lease/compute (AC #2 clean termination).
|
|
43084
43314
|
compute_released: external_exports.boolean(),
|
|
43085
43315
|
grant_kind: agentGrantKindSchema.nullable(),
|
|
43086
|
-
decided_by:
|
|
43316
|
+
decided_by: uuidSchema34.nullable(),
|
|
43087
43317
|
decided_by_name: external_exports.string().nullable(),
|
|
43088
43318
|
decided_at: external_exports.string().nullable(),
|
|
43089
43319
|
expires_at: external_exports.string().nullable(),
|
|
@@ -43092,7 +43322,7 @@ var agentGrantInterventionSchema = external_exports.object({
|
|
|
43092
43322
|
}).strict();
|
|
43093
43323
|
var agentGrantInterventionListInputSchema = external_exports.object({
|
|
43094
43324
|
// Optional seat filter (a seat-scoped caller is additionally clamped to its own seat).
|
|
43095
|
-
seat_id:
|
|
43325
|
+
seat_id: uuidSchema34.optional(),
|
|
43096
43326
|
// When true, include decided/terminal records (declined/resumed/expired) too;
|
|
43097
43327
|
// by default only the actionable open blocked/granted records are returned.
|
|
43098
43328
|
include_decided: external_exports.boolean().optional()
|
|
@@ -43101,14 +43331,14 @@ var agentGrantInterventionListOutputSchema = external_exports.object({
|
|
|
43101
43331
|
interventions: external_exports.array(agentGrantInterventionSchema)
|
|
43102
43332
|
}).strict();
|
|
43103
43333
|
var agentGrantInterventionGetInputSchema = external_exports.object({
|
|
43104
|
-
id:
|
|
43334
|
+
id: uuidSchema34
|
|
43105
43335
|
}).strict();
|
|
43106
43336
|
var agentGrantInterventionGetOutputSchema = external_exports.object({
|
|
43107
43337
|
intervention: agentGrantInterventionSchema
|
|
43108
43338
|
}).strict();
|
|
43109
43339
|
var agentGrantInterventionDecideActionSchema = external_exports.enum(["grant", "decline"]);
|
|
43110
43340
|
var agentGrantInterventionDecideInputSchema = external_exports.object({
|
|
43111
|
-
intervention_id:
|
|
43341
|
+
intervention_id: uuidSchema34,
|
|
43112
43342
|
action: agentGrantInterventionDecideActionSchema,
|
|
43113
43343
|
// Defaults to allow_once. `permanent` never auto-widens — it returns
|
|
43114
43344
|
// requires_charter_resign so the surface routes the human to a Charter re-sign.
|
|
@@ -43120,12 +43350,12 @@ var agentGrantInterventionDecideInputSchema = external_exports.object({
|
|
|
43120
43350
|
rationale: external_exports.string().trim().min(1).max(2e3).optional()
|
|
43121
43351
|
}).strict();
|
|
43122
43352
|
var agentGrantInterventionDecideOutputSchema = external_exports.object({
|
|
43123
|
-
intervention_id:
|
|
43353
|
+
intervention_id: uuidSchema34,
|
|
43124
43354
|
status: agentGrantInterventionStatusSchema,
|
|
43125
|
-
continuation_run_id:
|
|
43355
|
+
continuation_run_id: uuidSchema34.nullable(),
|
|
43126
43356
|
// The human decision row written for a grant/decline (invariant #7). Null only
|
|
43127
43357
|
// when a permanent grant deferred to a Charter re-sign (no one-time decision made).
|
|
43128
|
-
decision_id:
|
|
43358
|
+
decision_id: uuidSchema34.nullable(),
|
|
43129
43359
|
// True when the human chose the permanent option — the surface must route to a
|
|
43130
43360
|
// Charter re-sign; no authority was widened by this call (invariant #10).
|
|
43131
43361
|
requires_charter_resign: external_exports.boolean(),
|
|
@@ -43139,12 +43369,12 @@ var agentGrantInterventionDecideOutputSchema = external_exports.object({
|
|
|
43139
43369
|
enqueue_failed: external_exports.boolean()
|
|
43140
43370
|
}).strict();
|
|
43141
43371
|
var agentGrantInterventionResumeInputSchema = external_exports.object({
|
|
43142
|
-
intervention_id:
|
|
43372
|
+
intervention_id: uuidSchema34
|
|
43143
43373
|
}).strict();
|
|
43144
43374
|
var agentGrantInterventionResumeOutputSchema = external_exports.object({
|
|
43145
|
-
intervention_id:
|
|
43375
|
+
intervention_id: uuidSchema34,
|
|
43146
43376
|
status: agentGrantInterventionStatusSchema,
|
|
43147
|
-
continuation_run_id:
|
|
43377
|
+
continuation_run_id: uuidSchema34.nullable(),
|
|
43148
43378
|
enqueue_failed: external_exports.boolean()
|
|
43149
43379
|
}).strict();
|
|
43150
43380
|
|
|
@@ -43162,7 +43392,7 @@ var eventTypes = [
|
|
|
43162
43392
|
"task"
|
|
43163
43393
|
];
|
|
43164
43394
|
var publicMessageTypes = ["status", "handoff", "escalation", "issue"];
|
|
43165
|
-
var
|
|
43395
|
+
var uuidSchema35 = external_exports.string().uuid();
|
|
43166
43396
|
var evidenceSchema2 = external_exports.array(external_exports.unknown());
|
|
43167
43397
|
var internalEventPayloadSchema = external_exports.record(external_exports.string(), external_exports.unknown()).refine((payload) => !Array.isArray(payload), "Internal event payload must be an object");
|
|
43168
43398
|
var handoffEventPayloadSchema = external_exports.object({
|
|
@@ -43172,24 +43402,24 @@ var handoffEventPayloadSchema = external_exports.object({
|
|
|
43172
43402
|
acceptance_criteria: external_exports.array(external_exports.string().min(1)),
|
|
43173
43403
|
due: external_exports.string().datetime({ offset: true })
|
|
43174
43404
|
}).strict(),
|
|
43175
|
-
to_seat_id:
|
|
43405
|
+
to_seat_id: uuidSchema35
|
|
43176
43406
|
}).strict();
|
|
43177
43407
|
var intakeEventPayloadSchema = external_exports.discriminatedUnion("action", [
|
|
43178
43408
|
external_exports.object({
|
|
43179
43409
|
action: external_exports.literal("uploaded"),
|
|
43180
|
-
document_id:
|
|
43410
|
+
document_id: uuidSchema35,
|
|
43181
43411
|
storage_ref: external_exports.string().min(1)
|
|
43182
43412
|
}).strict(),
|
|
43183
43413
|
external_exports.object({
|
|
43184
43414
|
action: external_exports.literal("parsed"),
|
|
43185
|
-
document_id:
|
|
43415
|
+
document_id: uuidSchema35,
|
|
43186
43416
|
mode: external_exports.enum(["source_tree", "function_first"]),
|
|
43187
43417
|
seat_count: external_exports.number().int().nonnegative(),
|
|
43188
43418
|
edge_count: external_exports.number().int().nonnegative()
|
|
43189
43419
|
}).strict(),
|
|
43190
43420
|
external_exports.object({
|
|
43191
43421
|
action: external_exports.literal("failed"),
|
|
43192
|
-
document_id:
|
|
43422
|
+
document_id: uuidSchema35,
|
|
43193
43423
|
reason: external_exports.string().min(1)
|
|
43194
43424
|
}).strict(),
|
|
43195
43425
|
external_exports.object({
|
|
@@ -43295,9 +43525,9 @@ var publicMessageTypeSchema = external_exports.enum(publicMessageTypes);
|
|
|
43295
43525
|
var eventEnvelopeBaseSchema = external_exports.object({
|
|
43296
43526
|
protocol: external_exports.literal(EVENT_PROTOCOL),
|
|
43297
43527
|
type: eventTypeSchema,
|
|
43298
|
-
seat_id:
|
|
43528
|
+
seat_id: uuidSchema35.nullable(),
|
|
43299
43529
|
occurred_at: external_exports.string().datetime({ offset: true }),
|
|
43300
|
-
goal_ancestry: external_exports.array(
|
|
43530
|
+
goal_ancestry: external_exports.array(uuidSchema35),
|
|
43301
43531
|
// DER-2381: optional so historical rows and every caller that hasn't been
|
|
43302
43532
|
// updated yet keep parsing — but every per-type writer envelope below
|
|
43303
43533
|
// extends THIS base and re-`.strict()`s, so adding it here propagates the
|
|
@@ -69392,7 +69622,7 @@ async function removeWorkspace(ws) {
|
|
|
69392
69622
|
|
|
69393
69623
|
// src/runner-serve.ts
|
|
69394
69624
|
import { execFile as execFileCallback5, spawn } from "node:child_process";
|
|
69395
|
-
import { createHash as createHash4, randomUUID } from "node:crypto";
|
|
69625
|
+
import { createHash as createHash4, createPrivateKey, createPublicKey as createPublicKey2, generateKeyPairSync, randomUUID } from "node:crypto";
|
|
69396
69626
|
import { constants as fsConstants6 } from "node:fs";
|
|
69397
69627
|
import { access as access3, chmod as chmod2, lstat as lstat2, mkdir as mkdir8, open as open2, readFile as readFile11, rename as rename2, rm as rm8, statfs, writeFile as writeFile8 } from "node:fs/promises";
|
|
69398
69628
|
import { cpus, homedir as homedir7, hostname as hostname3, platform, totalmem, tmpdir as tmpdir2 } from "node:os";
|
|
@@ -70152,16 +70382,20 @@ async function pairIfNeeded(client, fetchImpl, appUrl2, config2, io) {
|
|
|
70152
70382
|
`No paired runner state at ${config2.stateFile}. Provide --user-code <code> from Settings > Runners (Add a runner), or run \`${cliBrand.binName} login --device\` once to pair this runner.`
|
|
70153
70383
|
);
|
|
70154
70384
|
}
|
|
70385
|
+
const serviceKey = runnerServiceKeyPairForState(priorState);
|
|
70155
70386
|
const { runnerId, runnerSecret, tenantId: claimedTenantId, name: claimedName } = await claimRunnerPairingCode(
|
|
70156
70387
|
fetchImpl,
|
|
70157
70388
|
appUrl2,
|
|
70158
|
-
userCode
|
|
70389
|
+
userCode,
|
|
70390
|
+
serviceKey
|
|
70159
70391
|
);
|
|
70160
70392
|
const state = {
|
|
70161
70393
|
runner_id: runnerId,
|
|
70162
70394
|
runner_secret: runnerSecret,
|
|
70163
70395
|
...typeof claimedTenantId === "string" ? { tenant_id: claimedTenantId } : config2.expectedTenantId ? { tenant_id: config2.expectedTenantId } : {},
|
|
70164
|
-
name: typeof claimedName === "string" ? claimedName : config2.name
|
|
70396
|
+
name: typeof claimedName === "string" ? claimedName : config2.name,
|
|
70397
|
+
service_key_private: serviceKey.privateKey,
|
|
70398
|
+
service_key_public: serviceKey.publicKey
|
|
70165
70399
|
};
|
|
70166
70400
|
await saveState(config2.stateFile, state);
|
|
70167
70401
|
await reapSupersededRunnerHomes(priorState, runnerId, config2.homeDir);
|
|
@@ -70245,6 +70479,8 @@ async function loadState(filePath, expectedTenantId) {
|
|
|
70245
70479
|
runner_secret: parsed.runner_secret,
|
|
70246
70480
|
...typeof parsed.tenant_id === "string" ? { tenant_id: parsed.tenant_id } : {},
|
|
70247
70481
|
...typeof parsed.name === "string" ? { name: parsed.name } : {},
|
|
70482
|
+
...typeof parsed.service_key_private === "string" ? { service_key_private: parsed.service_key_private } : {},
|
|
70483
|
+
...typeof parsed.service_key_public === "string" ? { service_key_public: parsed.service_key_public } : {},
|
|
70248
70484
|
...isRuntimeSessionMap(parsed.runtime_sessions) ? { runtime_sessions: parsed.runtime_sessions } : {},
|
|
70249
70485
|
...isInFlightWorkOrderMap(parsed.in_flight_work_orders) ? { in_flight_work_orders: parsed.in_flight_work_orders } : {}
|
|
70250
70486
|
};
|
|
@@ -70279,8 +70515,56 @@ async function saveState(filePath, state) {
|
|
|
70279
70515
|
throw error51;
|
|
70280
70516
|
}
|
|
70281
70517
|
}
|
|
70282
|
-
|
|
70283
|
-
|
|
70518
|
+
var RUNNER_SERVICE_KEY_REPAIR_MESSAGE = "The persisted runner service key is invalid. Repair the local service-key state, then re-pair the runner or use explicit service-key rotation.";
|
|
70519
|
+
var RunnerServiceKeyError = class extends Error {
|
|
70520
|
+
code = "service_key_invalid";
|
|
70521
|
+
constructor() {
|
|
70522
|
+
super(RUNNER_SERVICE_KEY_REPAIR_MESSAGE);
|
|
70523
|
+
this.name = "RunnerServiceKeyError";
|
|
70524
|
+
}
|
|
70525
|
+
};
|
|
70526
|
+
function sshWireField(value) {
|
|
70527
|
+
const bytes = Buffer.isBuffer(value) ? value : Buffer.from(value, "utf8");
|
|
70528
|
+
const length = Buffer.allocUnsafe(4);
|
|
70529
|
+
length.writeUInt32BE(bytes.length, 0);
|
|
70530
|
+
return Buffer.concat([length, bytes]);
|
|
70531
|
+
}
|
|
70532
|
+
function openSshEd25519PublicKey(publicKey) {
|
|
70533
|
+
const der = publicKey.export({ type: "spki", format: "der" });
|
|
70534
|
+
if (!Buffer.isBuffer(der) || der.length < 32) {
|
|
70535
|
+
throw new Error("Unable to encode the runner service key.");
|
|
70536
|
+
}
|
|
70537
|
+
const rawKey = der.subarray(der.length - 32);
|
|
70538
|
+
const wire = Buffer.concat([sshWireField("ssh-ed25519"), sshWireField(rawKey)]);
|
|
70539
|
+
return `ssh-ed25519 ${wire.toString("base64")}`;
|
|
70540
|
+
}
|
|
70541
|
+
function generateRunnerServiceKeyPair() {
|
|
70542
|
+
const { publicKey, privateKey } = generateKeyPairSync("ed25519");
|
|
70543
|
+
const privatePem = privateKey.export({ type: "pkcs8", format: "pem" });
|
|
70544
|
+
if (typeof privatePem !== "string") {
|
|
70545
|
+
throw new Error("Unable to persist the runner service key.");
|
|
70546
|
+
}
|
|
70547
|
+
return { privateKey: privatePem, publicKey: openSshEd25519PublicKey(publicKey) };
|
|
70548
|
+
}
|
|
70549
|
+
function runnerServiceKeyPairFromPrivate(privatePem) {
|
|
70550
|
+
const privateKey = createPrivateKey(privatePem);
|
|
70551
|
+
return { privateKey: privatePem, publicKey: openSshEd25519PublicKey(createPublicKey2(privateKey)) };
|
|
70552
|
+
}
|
|
70553
|
+
function runnerServiceKeyPairForState(state) {
|
|
70554
|
+
if (state?.service_key_private === void 0) {
|
|
70555
|
+
return generateRunnerServiceKeyPair();
|
|
70556
|
+
}
|
|
70557
|
+
try {
|
|
70558
|
+
return runnerServiceKeyPairFromPrivate(state.service_key_private);
|
|
70559
|
+
} catch {
|
|
70560
|
+
throw new RunnerServiceKeyError();
|
|
70561
|
+
}
|
|
70562
|
+
}
|
|
70563
|
+
async function claimRunnerPairingCode(fetchImpl, appUrl2, userCode, serviceKey) {
|
|
70564
|
+
const claim = await post2(fetchImpl, appUrl2, "/api/runner/pairing/claim", {
|
|
70565
|
+
user_code: userCode,
|
|
70566
|
+
...serviceKey ? { service_key_public: serviceKey.publicKey } : {}
|
|
70567
|
+
});
|
|
70284
70568
|
const runnerSecret = claim.json.runner_secret;
|
|
70285
70569
|
const runnerId = claim.json.runner_id;
|
|
70286
70570
|
const tenantId = claim.json.tenant_id;
|
|
@@ -70291,7 +70575,10 @@ async function claimRunnerPairingCode(fetchImpl, appUrl2, userCode) {
|
|
|
70291
70575
|
runnerId,
|
|
70292
70576
|
runnerSecret,
|
|
70293
70577
|
tenantId: typeof tenantId === "string" ? tenantId : null,
|
|
70294
|
-
name: typeof claim.json.name === "string" ? claim.json.name : null
|
|
70578
|
+
name: typeof claim.json.name === "string" ? claim.json.name : null,
|
|
70579
|
+
...serviceKey ? { serviceKeyPrivate: serviceKey.privateKey, serviceKeyPublic: serviceKey.publicKey } : {},
|
|
70580
|
+
...typeof claim.json.service_key_generation === "number" ? { serviceKeyGeneration: claim.json.service_key_generation } : {},
|
|
70581
|
+
...typeof claim.json.service_key_bound === "boolean" ? { serviceKeyBound: claim.json.service_key_bound } : {}
|
|
70295
70582
|
};
|
|
70296
70583
|
}
|
|
70297
70584
|
async function startPairing(client, config2) {
|
|
@@ -73757,7 +74044,14 @@ async function runPairingStage(sidecar, userCode, agent, fetchImpl, appUrl2, hom
|
|
|
73757
74044
|
}
|
|
73758
74045
|
if (userCode !== void 0) {
|
|
73759
74046
|
const priorState = await loadState(sidecar.state_file, expectedTenantId);
|
|
73760
|
-
|
|
74047
|
+
let serviceKey;
|
|
74048
|
+
try {
|
|
74049
|
+
serviceKey = runnerServiceKeyPairForState(priorState);
|
|
74050
|
+
} catch (error51) {
|
|
74051
|
+
const message = error51 instanceof RunnerServiceKeyError ? error51.message : RUNNER_SERVICE_KEY_REPAIR_MESSAGE;
|
|
74052
|
+
return { kind: "claim_failed", exitCode: 1, message: redactForLog(message) };
|
|
74053
|
+
}
|
|
74054
|
+
const claimResult = await claimRunnerPairingCodeSafe(fetchImpl, appUrl2, userCode, serviceKey);
|
|
73761
74055
|
if (!claimResult.ok) {
|
|
73762
74056
|
return { kind: "claim_failed", exitCode: claimResult.exitCode, message: claimResult.message };
|
|
73763
74057
|
}
|
|
@@ -73779,7 +74073,9 @@ async function runPairingStage(sidecar, userCode, agent, fetchImpl, appUrl2, hom
|
|
|
73779
74073
|
runner_id: claimResult.runnerId,
|
|
73780
74074
|
runner_secret: claimResult.runnerSecret,
|
|
73781
74075
|
...claimResult.tenantId !== null ? { tenant_id: claimResult.tenantId } : {},
|
|
73782
|
-
...claimResult.name !== null ? { name: claimResult.name } : {}
|
|
74076
|
+
...claimResult.name !== null ? { name: claimResult.name } : {},
|
|
74077
|
+
...claimResult.serviceKeyPrivate !== void 0 ? { service_key_private: claimResult.serviceKeyPrivate } : {},
|
|
74078
|
+
...claimResult.serviceKeyPublic !== void 0 ? { service_key_public: claimResult.serviceKeyPublic } : {}
|
|
73783
74079
|
};
|
|
73784
74080
|
await saveState(sidecar.state_file, newState);
|
|
73785
74081
|
await reapSupersededRunnerHomes(priorState, newState.runner_id, homeDir);
|
|
@@ -73804,9 +74100,9 @@ async function runPairingStage(sidecar, userCode, agent, fetchImpl, appUrl2, hom
|
|
|
73804
74100
|
}
|
|
73805
74101
|
return { kind: "needs_user_code" };
|
|
73806
74102
|
}
|
|
73807
|
-
async function claimRunnerPairingCodeSafe(fetchImpl, appUrl2, userCode) {
|
|
74103
|
+
async function claimRunnerPairingCodeSafe(fetchImpl, appUrl2, userCode, serviceKey) {
|
|
73808
74104
|
try {
|
|
73809
|
-
const claim = await claimRunnerPairingCode(fetchImpl, appUrl2, userCode);
|
|
74105
|
+
const claim = await claimRunnerPairingCode(fetchImpl, appUrl2, userCode, serviceKey);
|
|
73810
74106
|
return { ok: true, ...claim };
|
|
73811
74107
|
} catch (error51) {
|
|
73812
74108
|
const message = error51 instanceof Error ? error51.message : String(error51);
|