@rosthq/cli 0.7.121 → 0.7.123
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/README.md +22 -3
- package/dist/commands/onboarding.d.ts +2 -2
- package/dist/commands/onboarding.d.ts.map +1 -1
- package/dist/generated/command-manifest.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +630 -320
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/prompts/how-tos/human-confirmations.md +4 -1
package/dist/index.js
CHANGED
|
@@ -31772,15 +31772,16 @@ var charterBudgetSchema = external_exports.object({
|
|
|
31772
31772
|
approval_required_over_usd: external_exports.number().nonnegative().nullable(),
|
|
31773
31773
|
notes: external_exports.string().min(1)
|
|
31774
31774
|
}).strict();
|
|
31775
|
+
var charterDecisionAuthoritySchema = external_exports.object({
|
|
31776
|
+
autonomous: external_exports.array(charterAuthorityItemSchema),
|
|
31777
|
+
approval: external_exports.array(charterAuthorityItemSchema),
|
|
31778
|
+
escalate: external_exports.array(charterAuthorityItemSchema).min(1)
|
|
31779
|
+
}).strict();
|
|
31775
31780
|
var charterDocObjectSchema = external_exports.object({
|
|
31776
31781
|
payload_version: external_exports.literal(1),
|
|
31777
31782
|
purpose: external_exports.string().min(1),
|
|
31778
31783
|
accountabilities: external_exports.array(charterAccountabilitySchema).min(1),
|
|
31779
|
-
decision_authority:
|
|
31780
|
-
autonomous: external_exports.array(charterAuthorityItemSchema),
|
|
31781
|
-
approval: external_exports.array(charterAuthorityItemSchema),
|
|
31782
|
-
escalate: external_exports.array(charterAuthorityItemSchema).min(1)
|
|
31783
|
-
}).strict(),
|
|
31784
|
+
decision_authority: charterDecisionAuthoritySchema,
|
|
31784
31785
|
escalation_rules: external_exports.array(external_exports.string().min(1)).min(1),
|
|
31785
31786
|
measurables: external_exports.array(charterMeasurableSchema).min(1),
|
|
31786
31787
|
permission_manifest: external_exports.array(charterPermissionSchema),
|
|
@@ -36587,9 +36588,163 @@ var onboardingRehearseOutputSchema = external_exports.union([
|
|
|
36587
36588
|
terminalOutputSchema
|
|
36588
36589
|
]);
|
|
36589
36590
|
|
|
36591
|
+
// ../../packages/protocol/src/onboarding-activation.ts
|
|
36592
|
+
var uuidSchema18 = external_exports.string().uuid();
|
|
36593
|
+
var digestSchema4 = external_exports.string().regex(/^sha256:[0-9a-f]{64}$/);
|
|
36594
|
+
var boundedText3 = (max) => external_exports.string().trim().min(1).max(max);
|
|
36595
|
+
var rehearsalRunEntrySchema = external_exports.object({
|
|
36596
|
+
agent_id: uuidSchema18,
|
|
36597
|
+
rehearsal_run_id: uuidSchema18
|
|
36598
|
+
}).strict();
|
|
36599
|
+
var configurationDigestEntrySchema = external_exports.object({
|
|
36600
|
+
agent_id: uuidSchema18,
|
|
36601
|
+
configuration_digest: digestSchema4
|
|
36602
|
+
}).strict();
|
|
36603
|
+
function uniqueAgentEntries(values, ctx) {
|
|
36604
|
+
const seen = /* @__PURE__ */ new Set();
|
|
36605
|
+
values.forEach((value, index) => {
|
|
36606
|
+
if (seen.has(value.agent_id)) {
|
|
36607
|
+
ctx.addIssue({
|
|
36608
|
+
code: external_exports.ZodIssueCode.custom,
|
|
36609
|
+
path: [index, "agent_id"],
|
|
36610
|
+
message: "Activation evidence must not repeat an agent_id."
|
|
36611
|
+
});
|
|
36612
|
+
}
|
|
36613
|
+
seen.add(value.agent_id);
|
|
36614
|
+
});
|
|
36615
|
+
}
|
|
36616
|
+
var onboardingActivationRehearsalRunsSchema = external_exports.array(rehearsalRunEntrySchema).min(1).max(100).superRefine(uniqueAgentEntries);
|
|
36617
|
+
var onboardingActivationConfigurationDigestsSchema = external_exports.array(configurationDigestEntrySchema).min(1).max(100).superRefine(uniqueAgentEntries);
|
|
36618
|
+
var onboardingActivateInputSchema = external_exports.object({
|
|
36619
|
+
idempotency_key: boundedText3(120),
|
|
36620
|
+
setup_application_id: uuidSchema18,
|
|
36621
|
+
expected_input_digest: digestSchema4,
|
|
36622
|
+
expected_receipt_revision: external_exports.number().int().positive(),
|
|
36623
|
+
terminal_rehearsal_batch_receipt_id: uuidSchema18,
|
|
36624
|
+
rehearsal_runs: onboardingActivationRehearsalRunsSchema,
|
|
36625
|
+
configuration_digests: onboardingActivationConfigurationDigestsSchema
|
|
36626
|
+
}).strict();
|
|
36627
|
+
var effectivePermissionManifestRuleSchema = external_exports.object({
|
|
36628
|
+
name: boundedText3(200),
|
|
36629
|
+
mode: external_exports.enum(["allow", "deny", "escalate"]),
|
|
36630
|
+
clause: boundedText3(500),
|
|
36631
|
+
scopeTier: external_exports.enum(["read", "draft", "write_with_approval", "full"]).optional(),
|
|
36632
|
+
args: external_exports.object({
|
|
36633
|
+
equals: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
36634
|
+
}).strict().optional(),
|
|
36635
|
+
credentialGrant: external_exports.object({
|
|
36636
|
+
capabilityId: boundedText3(200),
|
|
36637
|
+
integrationId: uuidSchema18.nullable(),
|
|
36638
|
+
requestedAccessLevel: capabilityGrantAccessLevelSchema,
|
|
36639
|
+
actingSeatId: uuidSchema18.optional(),
|
|
36640
|
+
effectiveCharterVersionId: uuidSchema18.optional()
|
|
36641
|
+
}).strict().optional()
|
|
36642
|
+
}).strict();
|
|
36643
|
+
var onboardingActivationAgentProposalSchema = external_exports.object({
|
|
36644
|
+
agent_id: uuidSchema18,
|
|
36645
|
+
seat_id: uuidSchema18,
|
|
36646
|
+
charter_version_id: uuidSchema18,
|
|
36647
|
+
manifest: external_exports.object({
|
|
36648
|
+
digest: digestSchema4,
|
|
36649
|
+
evidence_receipt_id: uuidSchema18,
|
|
36650
|
+
evidence_revision: external_exports.number().int().positive()
|
|
36651
|
+
}).strict(),
|
|
36652
|
+
configuration_digest: digestSchema4,
|
|
36653
|
+
rehearsal_run_id: uuidSchema18,
|
|
36654
|
+
effective_lane: external_exports.enum(["cloud", "mcp_session", "runner"]),
|
|
36655
|
+
effective_model: external_exports.string().trim().min(1).max(200).nullable(),
|
|
36656
|
+
decision_authority: charterDecisionAuthoritySchema,
|
|
36657
|
+
effective_permission_manifest: external_exports.array(effectivePermissionManifestRuleSchema).max(200),
|
|
36658
|
+
schedule: external_exports.object({
|
|
36659
|
+
cron: external_exports.string().trim().min(1).max(200).nullable(),
|
|
36660
|
+
timezone: external_exports.string().trim().min(1).max(100).nullable()
|
|
36661
|
+
}).strict(),
|
|
36662
|
+
budget: external_exports.object({
|
|
36663
|
+
current_spend_usd: external_exports.string().trim().min(1).max(100),
|
|
36664
|
+
hard_cap_usd: external_exports.string().trim().min(1).max(100).nullable()
|
|
36665
|
+
}).strict(),
|
|
36666
|
+
sources: external_exports.object({
|
|
36667
|
+
checked: external_exports.number().int().nonnegative(),
|
|
36668
|
+
required: external_exports.number().int().positive()
|
|
36669
|
+
}).strict(),
|
|
36670
|
+
warnings: external_exports.array(external_exports.string().trim().min(1).max(500)).max(100)
|
|
36671
|
+
}).strict();
|
|
36672
|
+
var onboardingActivationApprovalProjectionSchema = external_exports.object({
|
|
36673
|
+
kind: external_exports.literal("onboarding_activation"),
|
|
36674
|
+
setup_application_id: uuidSchema18,
|
|
36675
|
+
implementation_run_id: uuidSchema18.nullable(),
|
|
36676
|
+
expected_input_digest: digestSchema4,
|
|
36677
|
+
expected_receipt_revision: external_exports.number().int().positive(),
|
|
36678
|
+
terminal_rehearsal_batch_receipt_id: uuidSchema18,
|
|
36679
|
+
activation_input_digest: digestSchema4,
|
|
36680
|
+
agents: external_exports.array(onboardingActivationAgentProposalSchema).min(1).max(100),
|
|
36681
|
+
checked_count: external_exports.number().int().positive(),
|
|
36682
|
+
total_count: external_exports.number().int().positive(),
|
|
36683
|
+
onboarding_completion_effect: external_exports.literal(true)
|
|
36684
|
+
}).strict();
|
|
36685
|
+
var onboardingActivationCommittedAgentSchema = external_exports.object({
|
|
36686
|
+
agent_id: uuidSchema18,
|
|
36687
|
+
seat_id: uuidSchema18,
|
|
36688
|
+
status: external_exports.literal("live"),
|
|
36689
|
+
schedule_armed: external_exports.boolean()
|
|
36690
|
+
}).strict();
|
|
36691
|
+
var onboardingActivationCommittedAgentsSchema = external_exports.array(
|
|
36692
|
+
onboardingActivationCommittedAgentSchema
|
|
36693
|
+
).min(1).max(100).superRefine((agents, ctx) => {
|
|
36694
|
+
const agentIds = /* @__PURE__ */ new Set();
|
|
36695
|
+
const seatIds = /* @__PURE__ */ new Set();
|
|
36696
|
+
agents.forEach((agent, index) => {
|
|
36697
|
+
if (agentIds.has(agent.agent_id)) {
|
|
36698
|
+
ctx.addIssue({
|
|
36699
|
+
code: external_exports.ZodIssueCode.custom,
|
|
36700
|
+
path: [index, "agent_id"],
|
|
36701
|
+
message: "Activation snapshot agents must have unique agent_id values."
|
|
36702
|
+
});
|
|
36703
|
+
}
|
|
36704
|
+
if (seatIds.has(agent.seat_id)) {
|
|
36705
|
+
ctx.addIssue({
|
|
36706
|
+
code: external_exports.ZodIssueCode.custom,
|
|
36707
|
+
path: [index, "seat_id"],
|
|
36708
|
+
message: "Activation snapshot agents must have unique seat_id values."
|
|
36709
|
+
});
|
|
36710
|
+
}
|
|
36711
|
+
agentIds.add(agent.agent_id);
|
|
36712
|
+
seatIds.add(agent.seat_id);
|
|
36713
|
+
});
|
|
36714
|
+
});
|
|
36715
|
+
var onboardingActivationCommitSnapshotSchema = external_exports.object({
|
|
36716
|
+
terminal_rehearsal_batch_receipt_id: uuidSchema18,
|
|
36717
|
+
agents: onboardingActivationCommittedAgentsSchema,
|
|
36718
|
+
onboarding_completed_at: external_exports.string().datetime({ offset: true })
|
|
36719
|
+
}).strict();
|
|
36720
|
+
var onboardingActivationPersistenceInputSchema = external_exports.object({
|
|
36721
|
+
activation_confirmation_id: uuidSchema18,
|
|
36722
|
+
activation_idempotency_key: boundedText3(120),
|
|
36723
|
+
activation_input_digest: digestSchema4,
|
|
36724
|
+
receipt_revision: external_exports.number().int().positive(),
|
|
36725
|
+
activation_snapshot: onboardingActivationCommitSnapshotSchema
|
|
36726
|
+
}).strict();
|
|
36727
|
+
var onboardingActivationReceiptSchema = external_exports.object({
|
|
36728
|
+
activation_receipt_id: uuidSchema18,
|
|
36729
|
+
activation_confirmation_id: uuidSchema18,
|
|
36730
|
+
setup_application_id: uuidSchema18,
|
|
36731
|
+
implementation_run_id: uuidSchema18.nullable(),
|
|
36732
|
+
activation_input_digest: digestSchema4,
|
|
36733
|
+
setup_receipt_revision: external_exports.number().int().positive(),
|
|
36734
|
+
terminal_rehearsal_batch_receipt_id: uuidSchema18,
|
|
36735
|
+
agents: external_exports.array(onboardingActivationCommittedAgentSchema).min(1).max(100),
|
|
36736
|
+
onboarding_completed_at: external_exports.string().datetime({ offset: true }),
|
|
36737
|
+
activated_at: external_exports.string().datetime({ offset: true })
|
|
36738
|
+
}).strict();
|
|
36739
|
+
var onboardingActivateOutputSchema = external_exports.object({
|
|
36740
|
+
application_id: uuidSchema18,
|
|
36741
|
+
status: external_exports.literal("activated"),
|
|
36742
|
+
receipt: onboardingActivationReceiptSchema
|
|
36743
|
+
}).strict();
|
|
36744
|
+
|
|
36590
36745
|
// ../../packages/protocol/src/mcp-onboarding.ts
|
|
36591
36746
|
var MCP_TOKEN_ABSOLUTE_MAX_EXPIRY_MS = (MCP_TOKEN_NO_EXPIRY_SENTINEL_DAYS + 1) * 24 * 60 * 60 * 1e3;
|
|
36592
|
-
var
|
|
36747
|
+
var uuidSchema19 = external_exports.string().uuid();
|
|
36593
36748
|
var isoDateTime6 = external_exports.string().datetime({ offset: true });
|
|
36594
36749
|
var onboardingStatusInputSchema = external_exports.object({}).strict();
|
|
36595
36750
|
var onboardingStatusOutputSchema = external_exports.object({
|
|
@@ -36633,7 +36788,7 @@ var onboardingAttachReferenceInputSchema = external_exports.object({
|
|
|
36633
36788
|
source: external_exports.string().trim().min(1).max(500).optional()
|
|
36634
36789
|
}).strict();
|
|
36635
36790
|
var onboardingAttachReferenceOutputSchema = external_exports.object({
|
|
36636
|
-
document_id:
|
|
36791
|
+
document_id: uuidSchema19,
|
|
36637
36792
|
storage_ref: external_exports.string().min(1),
|
|
36638
36793
|
kind: external_exports.enum(["org_chart", "role_doc", "plan", "financial", "other"]),
|
|
36639
36794
|
title: external_exports.string().min(1).nullable()
|
|
@@ -36658,7 +36813,7 @@ var onboardingCreateInviteInputSchema = external_exports.object({
|
|
|
36658
36813
|
flags: external_exports.record(external_exports.string(), external_exports.unknown()).default({})
|
|
36659
36814
|
}).strict();
|
|
36660
36815
|
var onboardingCreateInviteOutputSchema = external_exports.object({
|
|
36661
|
-
invite_id:
|
|
36816
|
+
invite_id: uuidSchema19,
|
|
36662
36817
|
email: external_exports.string().email(),
|
|
36663
36818
|
role: external_exports.enum(["owner", "admin", "steward", "member"]),
|
|
36664
36819
|
token: external_exports.string().min(1)
|
|
@@ -36671,19 +36826,19 @@ var tenantAnthropicKeySaveOutputSchema = external_exports.object({
|
|
|
36671
36826
|
}).strict();
|
|
36672
36827
|
var tenantAnthropicKeyDisableInputSchema = external_exports.object({}).strict();
|
|
36673
36828
|
var tenantAnthropicKeyDisableOutputSchema = external_exports.object({
|
|
36674
|
-
tenant_id:
|
|
36675
|
-
credential_id:
|
|
36829
|
+
tenant_id: uuidSchema19,
|
|
36830
|
+
credential_id: uuidSchema19.nullable(),
|
|
36676
36831
|
disabled: external_exports.boolean(),
|
|
36677
36832
|
already_disabled: external_exports.boolean(),
|
|
36678
36833
|
managed_fallback_ready: external_exports.boolean()
|
|
36679
36834
|
}).strict();
|
|
36680
36835
|
var seatCreateInputSchema = external_exports.object({
|
|
36681
36836
|
name: external_exports.string().trim().min(1).max(120),
|
|
36682
|
-
parent_seat_id:
|
|
36837
|
+
parent_seat_id: uuidSchema19.nullable().optional(),
|
|
36683
36838
|
seat_type: external_exports.enum(["human", "agent", "hybrid"]).default("human")
|
|
36684
36839
|
}).strict();
|
|
36685
36840
|
var seatCreateOutputSchema = withCommandEffect({
|
|
36686
|
-
seat_id:
|
|
36841
|
+
seat_id: uuidSchema19,
|
|
36687
36842
|
// Mirrors the literal `createSeat` writes at insert time. Not sourced from a
|
|
36688
36843
|
// read-back: `createSeat` returns only the new id, and widening its
|
|
36689
36844
|
// signature to return the row is out of scope for this issue (schema +
|
|
@@ -36694,29 +36849,29 @@ var seatCreateOutputSchema = withCommandEffect({
|
|
|
36694
36849
|
status: external_exports.enum(["draft", "active", "vacant", "decommissioned"])
|
|
36695
36850
|
});
|
|
36696
36851
|
var seatRenameInputSchema = external_exports.object({
|
|
36697
|
-
seat_id:
|
|
36852
|
+
seat_id: uuidSchema19,
|
|
36698
36853
|
name: external_exports.string().trim().min(1).max(120)
|
|
36699
36854
|
}).strict();
|
|
36700
36855
|
var seatReparentInputSchema = external_exports.object({
|
|
36701
|
-
seat_id:
|
|
36702
|
-
new_parent_seat_id:
|
|
36856
|
+
seat_id: uuidSchema19,
|
|
36857
|
+
new_parent_seat_id: uuidSchema19.nullable()
|
|
36703
36858
|
}).strict();
|
|
36704
36859
|
var seatSetTypeInputSchema = external_exports.object({
|
|
36705
|
-
seat_id:
|
|
36860
|
+
seat_id: uuidSchema19,
|
|
36706
36861
|
seat_type: external_exports.enum(["human", "agent", "hybrid"])
|
|
36707
36862
|
}).strict();
|
|
36708
36863
|
var seatDecommissionInputSchema = external_exports.object({
|
|
36709
|
-
seat_id:
|
|
36864
|
+
seat_id: uuidSchema19
|
|
36710
36865
|
}).strict();
|
|
36711
36866
|
var seatMutationOutputSchema = external_exports.object({
|
|
36712
|
-
seat_id:
|
|
36867
|
+
seat_id: uuidSchema19
|
|
36713
36868
|
}).strict();
|
|
36714
36869
|
var seatDecommissionPreviewOutputSchema = external_exports.object({
|
|
36715
|
-
seat_id:
|
|
36870
|
+
seat_id: uuidSchema19,
|
|
36716
36871
|
seat_name: external_exports.string(),
|
|
36717
36872
|
previous_status: external_exports.enum(["draft", "active", "vacant", "decommissioned"]),
|
|
36718
36873
|
active_occupancy_count: external_exports.number().int().nonnegative(),
|
|
36719
|
-
active_agent_ids: external_exports.array(
|
|
36874
|
+
active_agent_ids: external_exports.array(uuidSchema19),
|
|
36720
36875
|
active_charter_count: external_exports.number().int().nonnegative(),
|
|
36721
36876
|
active_mcp_token_count: external_exports.number().int().nonnegative(),
|
|
36722
36877
|
active_credential_count: external_exports.number().int().nonnegative(),
|
|
@@ -36726,16 +36881,16 @@ var seatDecommissionPreviewOutputSchema = external_exports.object({
|
|
|
36726
36881
|
effects: external_exports.array(external_exports.string())
|
|
36727
36882
|
}).strict();
|
|
36728
36883
|
var charterDraftInputSchema = external_exports.object({
|
|
36729
|
-
seat_id:
|
|
36884
|
+
seat_id: uuidSchema19
|
|
36730
36885
|
}).strict();
|
|
36731
36886
|
var charterDraftOutputSchema = external_exports.object({
|
|
36732
|
-
charter_version_id:
|
|
36733
|
-
seat_id:
|
|
36887
|
+
charter_version_id: uuidSchema19,
|
|
36888
|
+
seat_id: uuidSchema19,
|
|
36734
36889
|
edit_revision: external_exports.number().int().min(1).optional(),
|
|
36735
36890
|
doc: external_exports.unknown()
|
|
36736
36891
|
}).strict();
|
|
36737
36892
|
var charterUpdateDraftInputSchema = external_exports.object({
|
|
36738
|
-
charter_version_id:
|
|
36893
|
+
charter_version_id: uuidSchema19,
|
|
36739
36894
|
expected_edit_revision: external_exports.number().int().min(1).optional(),
|
|
36740
36895
|
// DER-785 (Part G): the full Charter document contract (was `z.unknown()`).
|
|
36741
36896
|
// The DB layer already validated this with `charterSchema.parse`; advertising
|
|
@@ -36744,18 +36899,18 @@ var charterUpdateDraftInputSchema = external_exports.object({
|
|
|
36744
36899
|
doc: charterDocSchema
|
|
36745
36900
|
}).strict();
|
|
36746
36901
|
var charterSetInputSchema = external_exports.object({
|
|
36747
|
-
seat_id:
|
|
36902
|
+
seat_id: uuidSchema19,
|
|
36748
36903
|
doc: charterDocSchema,
|
|
36749
36904
|
approve: external_exports.boolean().default(false)
|
|
36750
36905
|
}).strict();
|
|
36751
36906
|
var charterMutationOutputSchema = external_exports.object({
|
|
36752
|
-
charter_version_id:
|
|
36753
|
-
seat_id:
|
|
36907
|
+
charter_version_id: uuidSchema19,
|
|
36908
|
+
seat_id: uuidSchema19,
|
|
36754
36909
|
edit_revision: external_exports.number().int().min(1).optional()
|
|
36755
36910
|
}).strict();
|
|
36756
36911
|
var charterApproveInputSchema = external_exports.object({
|
|
36757
|
-
seat_id:
|
|
36758
|
-
charter_version_id:
|
|
36912
|
+
seat_id: uuidSchema19.optional(),
|
|
36913
|
+
charter_version_id: uuidSchema19.optional(),
|
|
36759
36914
|
// DER-785 (Part G): a partial of the Charter doc shape (was an untyped record).
|
|
36760
36915
|
// These fields are shallow-merged onto the existing draft, then the merged doc
|
|
36761
36916
|
// is re-validated against the full schema at persist time.
|
|
@@ -36766,25 +36921,101 @@ var charterApproveInputSchema = external_exports.object({
|
|
|
36766
36921
|
message: "Provide seat_id or charter_version_id.",
|
|
36767
36922
|
path: ["seat_id"]
|
|
36768
36923
|
});
|
|
36924
|
+
var charterSignalDeclarationNameSchema = external_exports.string().trim().min(1).max(120);
|
|
36925
|
+
var charterSignalResolutionSchema = external_exports.discriminatedUnion("action", [
|
|
36926
|
+
external_exports.object({
|
|
36927
|
+
declaration_name: charterSignalDeclarationNameSchema,
|
|
36928
|
+
action: external_exports.literal("adopt_existing"),
|
|
36929
|
+
measurable_id: uuidSchema19
|
|
36930
|
+
}).strict(),
|
|
36931
|
+
external_exports.object({
|
|
36932
|
+
declaration_name: charterSignalDeclarationNameSchema,
|
|
36933
|
+
action: external_exports.literal("move_existing"),
|
|
36934
|
+
measurable_id: uuidSchema19
|
|
36935
|
+
}).strict(),
|
|
36936
|
+
external_exports.object({
|
|
36937
|
+
declaration_name: charterSignalDeclarationNameSchema,
|
|
36938
|
+
action: external_exports.literal("create_new")
|
|
36939
|
+
}).strict()
|
|
36940
|
+
]);
|
|
36941
|
+
var charterReconcileSignalsInputSchema = external_exports.object({
|
|
36942
|
+
charter_version_id: uuidSchema19,
|
|
36943
|
+
// The stale-draft guard: `charter_versions.edit_revision` starts at 1, so 0 is
|
|
36944
|
+
// never a real revision.
|
|
36945
|
+
expected_edit_revision: external_exports.number().int().min(1),
|
|
36946
|
+
signal_resolutions: external_exports.array(charterSignalResolutionSchema).min(1),
|
|
36947
|
+
apply_seat_type: external_exports.boolean().default(false)
|
|
36948
|
+
}).strict();
|
|
36949
|
+
var charterSignalGoalBindingSchema = external_exports.object({
|
|
36950
|
+
goal_id: uuidSchema19,
|
|
36951
|
+
goal_title: external_exports.string(),
|
|
36952
|
+
// Null for a company objective, which owns no Seat. A `drives_status` binding on a
|
|
36953
|
+
// seatless goal can never match a destination Seat, so movement fails closed.
|
|
36954
|
+
goal_seat_id: uuidSchema19.nullable(),
|
|
36955
|
+
role: external_exports.enum(["drives_status", "informs"])
|
|
36956
|
+
}).strict();
|
|
36957
|
+
var charterSignalCandidateSchema = external_exports.object({
|
|
36958
|
+
measurable_id: uuidSchema19,
|
|
36959
|
+
owner_seat_id: uuidSchema19,
|
|
36960
|
+
owner_seat_name: external_exports.string(),
|
|
36961
|
+
stored_source: external_exports.enum(["human", "agent", "integration"]),
|
|
36962
|
+
reading_count: external_exports.number().int().min(0),
|
|
36963
|
+
latest_reading: external_exports.object({
|
|
36964
|
+
value: external_exports.number(),
|
|
36965
|
+
period_start: external_exports.string(),
|
|
36966
|
+
confirmed: external_exports.boolean()
|
|
36967
|
+
}).strict().nullable(),
|
|
36968
|
+
goal_bindings: external_exports.array(charterSignalGoalBindingSchema),
|
|
36969
|
+
// Bindings in ANY status, draft included — "a connected source is bound", not "a source is
|
|
36970
|
+
// actively feeding it". The preview's warning copy is worded to match.
|
|
36971
|
+
source_binding_count: external_exports.number().int().min(0),
|
|
36972
|
+
// What choosing THIS candidate would cost or carry. Present on every candidate, including
|
|
36973
|
+
// each side of an ambiguous match, which is where the differences decide the answer.
|
|
36974
|
+
warnings: external_exports.array(external_exports.string())
|
|
36975
|
+
}).strict();
|
|
36976
|
+
var charterSignalReconciliationItemSchema = external_exports.object({
|
|
36977
|
+
declaration_name: external_exports.string(),
|
|
36978
|
+
status: external_exports.enum(["linked", "candidate", "ambiguous", "missing"]),
|
|
36979
|
+
linked_measurable_id: uuidSchema19.nullable(),
|
|
36980
|
+
candidates: external_exports.array(charterSignalCandidateSchema),
|
|
36981
|
+
// A DERIVED suggestion, never an applied one: `null` whenever a human must choose
|
|
36982
|
+
// (ambiguous), whenever nothing matches (missing), or when the declaration is already
|
|
36983
|
+
// linked. Approval still requires the explicit action.
|
|
36984
|
+
recommended_action: external_exports.enum(["adopt_existing", "move_existing"]).nullable(),
|
|
36985
|
+
// What this choice would cost or carry — a cadence the reading history locks, a
|
|
36986
|
+
// status-driving goal on another Seat that blocks a move. Empty when nothing is at risk.
|
|
36987
|
+
warnings: external_exports.array(external_exports.string())
|
|
36988
|
+
}).strict();
|
|
36989
|
+
var charterPreviewSignalReconciliationInputSchema = external_exports.object({
|
|
36990
|
+
charter_version_id: uuidSchema19
|
|
36991
|
+
}).strict();
|
|
36992
|
+
var charterPreviewSignalReconciliationOutputSchema = external_exports.object({
|
|
36993
|
+
charter_version_id: uuidSchema19,
|
|
36994
|
+
seat_id: uuidSchema19,
|
|
36995
|
+
// Pass this back as `expected_edit_revision` when reconciling, so a draft edited after
|
|
36996
|
+
// the preview cannot be reconciled against a stale reading of it.
|
|
36997
|
+
edit_revision: external_exports.number().int().min(1),
|
|
36998
|
+
items: external_exports.array(charterSignalReconciliationItemSchema)
|
|
36999
|
+
}).strict();
|
|
36769
37000
|
var charterDraftAllInputSchema = external_exports.object({}).strict();
|
|
36770
37001
|
var charterDraftSkipReasonSchema = external_exports.enum(["seat_not_active", "charter_exists"]);
|
|
36771
37002
|
var charterDraftAllOutputSchema = withCommandEffect({
|
|
36772
37003
|
drafted: external_exports.number().int().nonnegative(),
|
|
36773
37004
|
skipped: external_exports.number().int().nonnegative(),
|
|
36774
|
-
draft_ids: external_exports.array(
|
|
37005
|
+
draft_ids: external_exports.array(uuidSchema19),
|
|
36775
37006
|
skipped_seats: external_exports.array(external_exports.object({
|
|
36776
|
-
seat_id:
|
|
37007
|
+
seat_id: uuidSchema19,
|
|
36777
37008
|
reason: charterDraftSkipReasonSchema
|
|
36778
37009
|
}).strict())
|
|
36779
37010
|
});
|
|
36780
37011
|
var charterSkipInputSchema = external_exports.object({
|
|
36781
|
-
charter_version_id:
|
|
37012
|
+
charter_version_id: uuidSchema19
|
|
36782
37013
|
}).strict();
|
|
36783
37014
|
var charterApplySeatTypeRecommendationInputSchema = external_exports.object({
|
|
36784
|
-
charter_version_id:
|
|
37015
|
+
charter_version_id: uuidSchema19
|
|
36785
37016
|
}).strict();
|
|
36786
37017
|
var charterSignManifestInputSchema = external_exports.object({
|
|
36787
|
-
charter_version_id:
|
|
37018
|
+
charter_version_id: uuidSchema19
|
|
36788
37019
|
}).strict();
|
|
36789
37020
|
var pendingConfirmationSchema = external_exports.object({
|
|
36790
37021
|
confirmationId: external_exports.string().min(1),
|
|
@@ -36838,7 +37069,7 @@ var confirmationListInputSchema = external_exports.object({
|
|
|
36838
37069
|
limit: external_exports.number().int().min(1).max(200).optional()
|
|
36839
37070
|
}).strict();
|
|
36840
37071
|
var confirmationSummarySchema = external_exports.object({
|
|
36841
|
-
id:
|
|
37072
|
+
id: uuidSchema19,
|
|
36842
37073
|
command_id: external_exports.string(),
|
|
36843
37074
|
redacted_args: external_exports.unknown(),
|
|
36844
37075
|
// DER-2161 kickback round 1, finding (6): tracks `PendingConfirmationListRow`'s
|
|
@@ -36848,7 +37079,7 @@ var confirmationSummarySchema = external_exports.object({
|
|
|
36848
37079
|
actor_kind: external_exports.enum(["user", "agent", "system", "operator"]),
|
|
36849
37080
|
source: external_exports.string(),
|
|
36850
37081
|
scope_kind: external_exports.enum(["tenant_admin", "tenant", "seat"]),
|
|
36851
|
-
seat_id:
|
|
37082
|
+
seat_id: uuidSchema19.nullable(),
|
|
36852
37083
|
seat_name: external_exports.string().nullable(),
|
|
36853
37084
|
seat_type: external_exports.enum(["human", "agent", "hybrid"]).nullable(),
|
|
36854
37085
|
risk_level: external_exports.enum(["normal", "sensitive", "dangerous"]),
|
|
@@ -36860,37 +37091,37 @@ var confirmationListOutputSchema = external_exports.object({
|
|
|
36860
37091
|
confirmations: external_exports.array(confirmationSummarySchema)
|
|
36861
37092
|
}).strict();
|
|
36862
37093
|
var confirmationDismissInputSchema = external_exports.object({
|
|
36863
|
-
confirmation_id:
|
|
37094
|
+
confirmation_id: uuidSchema19
|
|
36864
37095
|
}).strict();
|
|
36865
37096
|
var confirmationDismissOutputSchema = external_exports.object({
|
|
36866
37097
|
dismissed: external_exports.object({
|
|
36867
|
-
id:
|
|
37098
|
+
id: uuidSchema19,
|
|
36868
37099
|
status: external_exports.literal("dismissed")
|
|
36869
37100
|
}).strict()
|
|
36870
37101
|
}).strict();
|
|
36871
37102
|
var confirmationDismissStaleInputSchema = external_exports.object({}).strict();
|
|
36872
37103
|
var confirmationDismissStaleOutputSchema = external_exports.object({
|
|
36873
37104
|
dismissed_count: external_exports.number().int().min(0),
|
|
36874
|
-
dismissed_ids: external_exports.array(
|
|
37105
|
+
dismissed_ids: external_exports.array(uuidSchema19)
|
|
36875
37106
|
}).strict();
|
|
36876
37107
|
var credentialIngressInputSchema = external_exports.object({
|
|
36877
|
-
seat_id:
|
|
37108
|
+
seat_id: uuidSchema19.optional(),
|
|
36878
37109
|
provider: external_exports.string().trim().min(1),
|
|
36879
37110
|
scope_description: external_exports.string().trim().min(1),
|
|
36880
37111
|
secret_name: external_exports.string().trim().min(1),
|
|
36881
37112
|
secret: external_exports.string().trim().min(1)
|
|
36882
37113
|
}).strict();
|
|
36883
37114
|
var credentialIngressOutputSchema = external_exports.object({
|
|
36884
|
-
credential_id:
|
|
37115
|
+
credential_id: uuidSchema19,
|
|
36885
37116
|
provider: external_exports.string().min(1),
|
|
36886
|
-
seat_id:
|
|
37117
|
+
seat_id: uuidSchema19.nullable()
|
|
36887
37118
|
}).strict();
|
|
36888
37119
|
var credentialListInputSchema = external_exports.object({}).strict();
|
|
36889
37120
|
var credentialSummarySchema = external_exports.object({
|
|
36890
|
-
credential_id:
|
|
37121
|
+
credential_id: uuidSchema19,
|
|
36891
37122
|
provider: external_exports.string(),
|
|
36892
37123
|
scope_description: external_exports.string(),
|
|
36893
|
-
seat_id:
|
|
37124
|
+
seat_id: uuidSchema19.nullable(),
|
|
36894
37125
|
status: external_exports.string(),
|
|
36895
37126
|
created_at: external_exports.string(),
|
|
36896
37127
|
rotated_at: external_exports.string(),
|
|
@@ -36900,16 +37131,16 @@ var credentialListOutputSchema = external_exports.object({
|
|
|
36900
37131
|
credentials: external_exports.array(credentialSummarySchema)
|
|
36901
37132
|
}).strict();
|
|
36902
37133
|
var agentGoLiveInputSchema = external_exports.object({
|
|
36903
|
-
seat_id:
|
|
36904
|
-
charter_version_id:
|
|
37134
|
+
seat_id: uuidSchema19,
|
|
37135
|
+
charter_version_id: uuidSchema19
|
|
36905
37136
|
}).strict();
|
|
36906
37137
|
var agentGoLiveOutputSchema = external_exports.object({
|
|
36907
|
-
seat_id:
|
|
36908
|
-
charter_version_id:
|
|
37138
|
+
seat_id: uuidSchema19,
|
|
37139
|
+
charter_version_id: uuidSchema19,
|
|
36909
37140
|
status: external_exports.literal("live")
|
|
36910
37141
|
}).strict();
|
|
36911
37142
|
var compassSetInputSchema = external_exports.object({
|
|
36912
|
-
draft_id:
|
|
37143
|
+
draft_id: uuidSchema19.optional(),
|
|
36913
37144
|
doc: compassDraftSchema.optional(),
|
|
36914
37145
|
approve: external_exports.boolean().default(false)
|
|
36915
37146
|
}).strict().refine((input) => Boolean(input.draft_id) !== Boolean(input.doc), {
|
|
@@ -36917,7 +37148,7 @@ var compassSetInputSchema = external_exports.object({
|
|
|
36917
37148
|
path: ["draft_id"]
|
|
36918
37149
|
});
|
|
36919
37150
|
var compassMutationOutputSchema = external_exports.object({
|
|
36920
|
-
compass_version_id:
|
|
37151
|
+
compass_version_id: uuidSchema19,
|
|
36921
37152
|
status: external_exports.enum(["draft", "active", "superseded"]),
|
|
36922
37153
|
version: external_exports.number().int().nonnegative()
|
|
36923
37154
|
}).strict();
|
|
@@ -36926,42 +37157,42 @@ var compassDraftInputSchema = external_exports.object({
|
|
|
36926
37157
|
doc: compassDraftSchema
|
|
36927
37158
|
}).strict();
|
|
36928
37159
|
var compassUpdateDraftInputSchema = external_exports.object({
|
|
36929
|
-
draft_id:
|
|
37160
|
+
draft_id: uuidSchema19,
|
|
36930
37161
|
doc: compassDraftSchema
|
|
36931
37162
|
}).strict();
|
|
36932
37163
|
var compassApproveVersionInputSchema = external_exports.object({
|
|
36933
|
-
draft_id:
|
|
37164
|
+
draft_id: uuidSchema19
|
|
36934
37165
|
}).strict();
|
|
36935
37166
|
var compassRejectDraftInputSchema = external_exports.object({
|
|
36936
|
-
draft_id:
|
|
37167
|
+
draft_id: uuidSchema19
|
|
36937
37168
|
}).strict();
|
|
36938
37169
|
var compassAnswerGapInputSchema = external_exports.object({
|
|
36939
37170
|
gap_id: external_exports.string().min(1),
|
|
36940
37171
|
answer: external_exports.string().trim().min(1)
|
|
36941
37172
|
}).strict();
|
|
36942
37173
|
var seatStaffInputSchema = external_exports.object({
|
|
36943
|
-
seat_id:
|
|
37174
|
+
seat_id: uuidSchema19,
|
|
36944
37175
|
occupant: external_exports.discriminatedUnion("type", [
|
|
36945
37176
|
external_exports.object({ type: external_exports.literal("vacant") }).strict(),
|
|
36946
|
-
external_exports.object({ type: external_exports.literal("user"), user_id:
|
|
36947
|
-
external_exports.object({ type: external_exports.literal("agent"), agent_id:
|
|
37177
|
+
external_exports.object({ type: external_exports.literal("user"), user_id: uuidSchema19 }).strict(),
|
|
37178
|
+
external_exports.object({ type: external_exports.literal("agent"), agent_id: uuidSchema19 }).strict()
|
|
36948
37179
|
])
|
|
36949
37180
|
}).strict();
|
|
36950
37181
|
var staffingMutationOutputSchema = external_exports.object({
|
|
36951
|
-
seat_id:
|
|
37182
|
+
seat_id: uuidSchema19,
|
|
36952
37183
|
staffed: external_exports.enum(["vacant", "user", "agent"])
|
|
36953
37184
|
}).strict();
|
|
36954
37185
|
var staffingAssignUserInputSchema = external_exports.object({
|
|
36955
|
-
seat_id:
|
|
36956
|
-
user_id:
|
|
37186
|
+
seat_id: uuidSchema19,
|
|
37187
|
+
user_id: uuidSchema19
|
|
36957
37188
|
}).strict();
|
|
36958
37189
|
var staffingAssignAgentDryRunInputSchema = external_exports.object({
|
|
36959
|
-
seat_id:
|
|
36960
|
-
agent_id:
|
|
37190
|
+
seat_id: uuidSchema19,
|
|
37191
|
+
agent_id: uuidSchema19
|
|
36961
37192
|
}).strict();
|
|
36962
37193
|
var mcpTokenCreateInputSchema = external_exports.object({
|
|
36963
37194
|
scope: external_exports.enum(["tenant_admin", "seat"]),
|
|
36964
|
-
seat_id:
|
|
37195
|
+
seat_id: uuidSchema19.optional(),
|
|
36965
37196
|
// DER-830: explicit absolute expiry (kept for back-compat / direct callers).
|
|
36966
37197
|
// When omitted OR null, the DB default (now() + 90 days) applies — `null` is an
|
|
36967
37198
|
// accepted "no explicit expiry" signal (existing UI/MCP callers pass it), so it
|
|
@@ -37005,17 +37236,17 @@ var mcpTokenCreateInputSchema = external_exports.object({
|
|
|
37005
37236
|
}
|
|
37006
37237
|
});
|
|
37007
37238
|
var mcpTokenCreateOutputSchema = external_exports.object({
|
|
37008
|
-
token_id:
|
|
37239
|
+
token_id: uuidSchema19,
|
|
37009
37240
|
token: external_exports.string().min(1),
|
|
37010
37241
|
scope: external_exports.enum(["tenant_admin", "seat"]),
|
|
37011
|
-
seat_id:
|
|
37242
|
+
seat_id: uuidSchema19.nullable()
|
|
37012
37243
|
}).strict();
|
|
37013
37244
|
var mcpTokenRevokeInputSchema = external_exports.object({
|
|
37014
|
-
token_id:
|
|
37015
|
-
seat_id:
|
|
37245
|
+
token_id: uuidSchema19,
|
|
37246
|
+
seat_id: uuidSchema19.optional()
|
|
37016
37247
|
}).strict();
|
|
37017
37248
|
var mcpTokenRevokeOutputSchema = external_exports.object({
|
|
37018
|
-
token_id:
|
|
37249
|
+
token_id: uuidSchema19,
|
|
37019
37250
|
revoked: external_exports.boolean()
|
|
37020
37251
|
}).strict();
|
|
37021
37252
|
|
|
@@ -37028,7 +37259,7 @@ var markNotificationsReadRequestSchema = external_exports.object({
|
|
|
37028
37259
|
});
|
|
37029
37260
|
|
|
37030
37261
|
// ../../packages/protocol/src/product-analytics.ts
|
|
37031
|
-
var
|
|
37262
|
+
var uuidSchema20 = external_exports.string().uuid();
|
|
37032
37263
|
var opaqueRequestIdSchema = external_exports.string().trim().min(1).max(240);
|
|
37033
37264
|
var safeNameSchema = external_exports.string().trim().min(1).max(120).regex(/^[a-z][a-z0-9._:-]*$/);
|
|
37034
37265
|
var safeSurfaceSchema = external_exports.string().trim().min(1).max(80).regex(/^[a-z][a-z0-9_-]*$/);
|
|
@@ -37122,8 +37353,8 @@ var recommendationOutcomeStatusSchema = external_exports.enum([
|
|
|
37122
37353
|
]);
|
|
37123
37354
|
var durationMsSchema = external_exports.number().int().nonnegative().max(24 * 60 * 60 * 1e3).optional();
|
|
37124
37355
|
var productEventInputSchema = external_exports.object({
|
|
37125
|
-
tenant_id:
|
|
37126
|
-
user_id:
|
|
37356
|
+
tenant_id: uuidSchema20,
|
|
37357
|
+
user_id: uuidSchema20.optional(),
|
|
37127
37358
|
source: analyticsSourceSchema,
|
|
37128
37359
|
event_name: safeNameSchema,
|
|
37129
37360
|
route_template: routeTemplateSchema.optional(),
|
|
@@ -37132,8 +37363,8 @@ var productEventInputSchema = external_exports.object({
|
|
|
37132
37363
|
occurred_at: external_exports.string().datetime({ offset: true }).optional()
|
|
37133
37364
|
}).strict();
|
|
37134
37365
|
var pageViewInputSchema = external_exports.object({
|
|
37135
|
-
tenant_id:
|
|
37136
|
-
user_id:
|
|
37366
|
+
tenant_id: uuidSchema20,
|
|
37367
|
+
user_id: uuidSchema20.optional(),
|
|
37137
37368
|
route_template: routeTemplateSchema,
|
|
37138
37369
|
referrer_route_template: routeTemplateSchema.optional(),
|
|
37139
37370
|
surface: safeSurfaceSchema.default("web"),
|
|
@@ -37142,12 +37373,12 @@ var pageViewInputSchema = external_exports.object({
|
|
|
37142
37373
|
occurred_at: external_exports.string().datetime({ offset: true }).optional()
|
|
37143
37374
|
}).strict();
|
|
37144
37375
|
var commandInvocationInputSchema = external_exports.object({
|
|
37145
|
-
tenant_id:
|
|
37146
|
-
user_id:
|
|
37147
|
-
seat_id:
|
|
37148
|
-
run_id:
|
|
37149
|
-
agent_turn_execution_id:
|
|
37150
|
-
session_id:
|
|
37376
|
+
tenant_id: uuidSchema20,
|
|
37377
|
+
user_id: uuidSchema20.optional(),
|
|
37378
|
+
seat_id: uuidSchema20.optional(),
|
|
37379
|
+
run_id: uuidSchema20.optional(),
|
|
37380
|
+
agent_turn_execution_id: uuidSchema20.optional(),
|
|
37381
|
+
session_id: uuidSchema20.optional(),
|
|
37151
37382
|
command_id: safeNameSchema,
|
|
37152
37383
|
source: analyticsSourceSchema,
|
|
37153
37384
|
// DER-2161 kickback round 1, finding (6): tracks `command_invocations.actor_kind`
|
|
@@ -37161,7 +37392,7 @@ var commandInvocationInputSchema = external_exports.object({
|
|
|
37161
37392
|
// `packages/commands/src/context.ts`'s operator context builder now sets
|
|
37162
37393
|
// `initiatorKind: "operator"` instead of coercing to "agent".
|
|
37163
37394
|
initiator_kind: external_exports.enum(["user", "agent", "system", "operator"]).optional(),
|
|
37164
|
-
initiator_user_id:
|
|
37395
|
+
initiator_user_id: uuidSchema20.nullable().optional(),
|
|
37165
37396
|
scope_kind: external_exports.enum(["tenant_admin", "tenant", "seat"]),
|
|
37166
37397
|
status: commandInvocationStatusSchema,
|
|
37167
37398
|
guard_result: external_exports.enum(["allowed", "denied_manifest", "denied_budget", "escalated", "denied_tenant_policy"]).optional(),
|
|
@@ -37180,8 +37411,8 @@ var commandInvocationInputSchema = external_exports.object({
|
|
|
37180
37411
|
}
|
|
37181
37412
|
});
|
|
37182
37413
|
var onboardingMilestoneInputSchema = external_exports.object({
|
|
37183
|
-
tenant_id:
|
|
37184
|
-
user_id:
|
|
37414
|
+
tenant_id: uuidSchema20,
|
|
37415
|
+
user_id: uuidSchema20.optional(),
|
|
37185
37416
|
milestone: safeNameSchema,
|
|
37186
37417
|
status: analyticsOutcomeStatusSchema,
|
|
37187
37418
|
step_index: external_exports.number().int().nonnegative().max(100).optional(),
|
|
@@ -37190,19 +37421,19 @@ var onboardingMilestoneInputSchema = external_exports.object({
|
|
|
37190
37421
|
occurred_at: external_exports.string().datetime({ offset: true }).optional()
|
|
37191
37422
|
}).strict();
|
|
37192
37423
|
var recommendationEventInputSchema = external_exports.object({
|
|
37193
|
-
tenant_id:
|
|
37194
|
-
user_id:
|
|
37424
|
+
tenant_id: uuidSchema20,
|
|
37425
|
+
user_id: uuidSchema20.optional(),
|
|
37195
37426
|
recommendation_type: safeNameSchema,
|
|
37196
37427
|
source_surface: safeSurfaceSchema,
|
|
37197
37428
|
status: recommendationOutcomeStatusSchema,
|
|
37198
37429
|
target_kind: safeSurfaceSchema.optional(),
|
|
37199
|
-
target_id:
|
|
37430
|
+
target_id: uuidSchema20.optional(),
|
|
37200
37431
|
properties: recommendationAnalyticsPropertiesSchema.optional(),
|
|
37201
37432
|
occurred_at: external_exports.string().datetime({ offset: true }).optional()
|
|
37202
37433
|
}).strict();
|
|
37203
37434
|
|
|
37204
37435
|
// ../../packages/protocol/src/reads.ts
|
|
37205
|
-
var
|
|
37436
|
+
var uuidSchema21 = external_exports.string().uuid();
|
|
37206
37437
|
var isoDateTime7 = external_exports.string().datetime({ offset: true });
|
|
37207
37438
|
var seatTypeSchema = external_exports.enum(["human", "agent", "hybrid"]);
|
|
37208
37439
|
var seatStatusSchema = external_exports.enum(["draft", "active", "vacant", "decommissioned"]);
|
|
@@ -37217,13 +37448,13 @@ var credentialStatusSchema = external_exports.enum(["active", "revoked"]);
|
|
|
37217
37448
|
var runStatusSchema = external_exports.enum(["running", "succeeded", "failed", "timeout", "cancelled"]);
|
|
37218
37449
|
var graphGetInputSchema = external_exports.object({}).strict();
|
|
37219
37450
|
var graphNodeSchema = external_exports.object({
|
|
37220
|
-
seat_id:
|
|
37451
|
+
seat_id: uuidSchema21,
|
|
37221
37452
|
name: external_exports.string(),
|
|
37222
37453
|
seat_type: seatTypeSchema,
|
|
37223
37454
|
status: seatStatusSchema,
|
|
37224
|
-
parent_seat_id:
|
|
37455
|
+
parent_seat_id: uuidSchema21.nullable(),
|
|
37225
37456
|
is_root: external_exports.boolean(),
|
|
37226
|
-
steward_seat_id:
|
|
37457
|
+
steward_seat_id: uuidSchema21.nullable(),
|
|
37227
37458
|
occupant: external_exports.object({
|
|
37228
37459
|
kind: external_exports.enum(["user", "agent"]),
|
|
37229
37460
|
label: external_exports.string(),
|
|
@@ -37236,11 +37467,11 @@ var graphNodeSchema = external_exports.object({
|
|
|
37236
37467
|
is_peer: external_exports.boolean()
|
|
37237
37468
|
}).strict();
|
|
37238
37469
|
var graphEdgeSchema = external_exports.object({
|
|
37239
|
-
parent_seat_id:
|
|
37240
|
-
child_seat_id:
|
|
37470
|
+
parent_seat_id: uuidSchema21,
|
|
37471
|
+
child_seat_id: uuidSchema21
|
|
37241
37472
|
}).strict();
|
|
37242
37473
|
var graphGetOutputSchema = external_exports.object({
|
|
37243
|
-
root_seat_id:
|
|
37474
|
+
root_seat_id: uuidSchema21.nullable(),
|
|
37244
37475
|
nodes: external_exports.array(graphNodeSchema),
|
|
37245
37476
|
edges: external_exports.array(graphEdgeSchema),
|
|
37246
37477
|
status_rollups: external_exports.object({
|
|
@@ -37252,32 +37483,32 @@ var graphGetOutputSchema = external_exports.object({
|
|
|
37252
37483
|
}).strict()
|
|
37253
37484
|
}).strict();
|
|
37254
37485
|
var seatGetInputSchema = external_exports.object({
|
|
37255
|
-
seat_id:
|
|
37486
|
+
seat_id: uuidSchema21
|
|
37256
37487
|
}).strict();
|
|
37257
37488
|
var seatGetOutputSchema = external_exports.object({
|
|
37258
|
-
seat_id:
|
|
37489
|
+
seat_id: uuidSchema21,
|
|
37259
37490
|
name: external_exports.string(),
|
|
37260
37491
|
seat_type: seatTypeSchema,
|
|
37261
37492
|
status: seatStatusSchema,
|
|
37262
37493
|
purpose: external_exports.string().nullable(),
|
|
37263
|
-
parent_seat_id:
|
|
37494
|
+
parent_seat_id: uuidSchema21.nullable(),
|
|
37264
37495
|
steward_chain: external_exports.array(external_exports.object({
|
|
37265
|
-
seat_id:
|
|
37496
|
+
seat_id: uuidSchema21,
|
|
37266
37497
|
name: external_exports.string()
|
|
37267
37498
|
}).strict()),
|
|
37268
37499
|
occupancies: external_exports.array(external_exports.object({
|
|
37269
|
-
occupancy_id:
|
|
37500
|
+
occupancy_id: uuidSchema21,
|
|
37270
37501
|
occupant_type: external_exports.enum(["user", "agent"]),
|
|
37271
37502
|
label: external_exports.string(),
|
|
37272
37503
|
started_at: isoDateTime7,
|
|
37273
37504
|
ended_at: isoDateTime7.nullable()
|
|
37274
37505
|
}).strict()),
|
|
37275
|
-
active_charter_version_id:
|
|
37276
|
-
draft_charter_version_id:
|
|
37506
|
+
active_charter_version_id: uuidSchema21.nullable(),
|
|
37507
|
+
draft_charter_version_id: uuidSchema21.nullable(),
|
|
37277
37508
|
agent_status: agentStatusEnum2.nullable(),
|
|
37278
37509
|
agent_lane: agentLaneSchema3.nullable(),
|
|
37279
37510
|
mcp_tokens: external_exports.array(external_exports.object({
|
|
37280
|
-
token_id:
|
|
37511
|
+
token_id: uuidSchema21,
|
|
37281
37512
|
scope: mcpScopeSchema,
|
|
37282
37513
|
created_at: isoDateTime7,
|
|
37283
37514
|
last_seen_at: isoDateTime7.nullable(),
|
|
@@ -37287,7 +37518,7 @@ var seatGetOutputSchema = external_exports.object({
|
|
|
37287
37518
|
revoked_at: isoDateTime7.nullable()
|
|
37288
37519
|
}).strict()),
|
|
37289
37520
|
credentials: external_exports.array(external_exports.object({
|
|
37290
|
-
credential_id:
|
|
37521
|
+
credential_id: uuidSchema21,
|
|
37291
37522
|
provider: external_exports.string(),
|
|
37292
37523
|
status: credentialStatusSchema
|
|
37293
37524
|
}).strict()),
|
|
@@ -37299,12 +37530,12 @@ var seatGetOutputSchema = external_exports.object({
|
|
|
37299
37530
|
}).strict()
|
|
37300
37531
|
}).strict();
|
|
37301
37532
|
var charterListInputSchema = external_exports.object({
|
|
37302
|
-
seat_id:
|
|
37533
|
+
seat_id: uuidSchema21.optional(),
|
|
37303
37534
|
status: charterStatusSchema.optional()
|
|
37304
37535
|
}).strict();
|
|
37305
37536
|
var charterSummarySchema = external_exports.object({
|
|
37306
|
-
charter_version_id:
|
|
37307
|
-
seat_id:
|
|
37537
|
+
charter_version_id: uuidSchema21,
|
|
37538
|
+
seat_id: uuidSchema21,
|
|
37308
37539
|
version: external_exports.number().int().nonnegative(),
|
|
37309
37540
|
status: charterStatusSchema,
|
|
37310
37541
|
created_at: isoDateTime7,
|
|
@@ -37314,11 +37545,11 @@ var charterListOutputSchema = external_exports.object({
|
|
|
37314
37545
|
charters: external_exports.array(charterSummarySchema)
|
|
37315
37546
|
}).strict();
|
|
37316
37547
|
var charterGetInputSchema = external_exports.object({
|
|
37317
|
-
charter_version_id:
|
|
37548
|
+
charter_version_id: uuidSchema21
|
|
37318
37549
|
}).strict();
|
|
37319
37550
|
var charterGetOutputSchema = external_exports.object({
|
|
37320
|
-
charter_version_id:
|
|
37321
|
-
seat_id:
|
|
37551
|
+
charter_version_id: uuidSchema21,
|
|
37552
|
+
seat_id: uuidSchema21,
|
|
37322
37553
|
version: external_exports.number().int().nonnegative(),
|
|
37323
37554
|
status: charterStatusSchema,
|
|
37324
37555
|
created_at: isoDateTime7,
|
|
@@ -37332,7 +37563,7 @@ var charterGetOutputSchema = external_exports.object({
|
|
|
37332
37563
|
}).strict();
|
|
37333
37564
|
var compassGetCurrentInputSchema = external_exports.object({}).strict();
|
|
37334
37565
|
var compassVersionRefSchema = external_exports.object({
|
|
37335
|
-
compass_version_id:
|
|
37566
|
+
compass_version_id: uuidSchema21,
|
|
37336
37567
|
version: external_exports.number().int().nonnegative(),
|
|
37337
37568
|
status: compassStatusSchema,
|
|
37338
37569
|
doc: external_exports.unknown()
|
|
@@ -37343,7 +37574,7 @@ var compassGetCurrentOutputSchema = external_exports.object({
|
|
|
37343
37574
|
// Sources expose document id and kind only. The underlying storage_ref can
|
|
37344
37575
|
// be a local file path, so it is never surfaced (redaction rule).
|
|
37345
37576
|
sources: external_exports.array(external_exports.object({
|
|
37346
|
-
document_id:
|
|
37577
|
+
document_id: uuidSchema21,
|
|
37347
37578
|
kind: external_exports.string()
|
|
37348
37579
|
}).strict())
|
|
37349
37580
|
}).strict();
|
|
@@ -37358,22 +37589,22 @@ var compassGapSchema = external_exports.object({
|
|
|
37358
37589
|
answer: external_exports.string().nullable()
|
|
37359
37590
|
}).strict();
|
|
37360
37591
|
var compassListGapsOutputSchema = external_exports.object({
|
|
37361
|
-
compass_version_id:
|
|
37592
|
+
compass_version_id: uuidSchema21.nullable(),
|
|
37362
37593
|
unanswered: external_exports.array(compassGapSchema),
|
|
37363
37594
|
answered: external_exports.array(compassGapSchema)
|
|
37364
37595
|
}).strict();
|
|
37365
37596
|
var agentStatusInputSchema = external_exports.object({
|
|
37366
|
-
seat_id:
|
|
37597
|
+
seat_id: uuidSchema21
|
|
37367
37598
|
}).strict();
|
|
37368
37599
|
var agentStatusOutputSchema = external_exports.object({
|
|
37369
|
-
seat_id:
|
|
37600
|
+
seat_id: uuidSchema21,
|
|
37370
37601
|
// DER-786 (C7): `has_agent` is true whenever a setup agent exists for the seat
|
|
37371
37602
|
// — including a draft setup that has no occupancy yet — so it agrees with
|
|
37372
37603
|
// agent_setup.get. `lifecycle` is the shared cross-surface term derived from
|
|
37373
37604
|
// `status` (none | draft_setup | dry_run | live | …).
|
|
37374
37605
|
has_agent: external_exports.boolean(),
|
|
37375
37606
|
lifecycle: agentLifecycleSchema,
|
|
37376
|
-
agent_id:
|
|
37607
|
+
agent_id: uuidSchema21.nullable(),
|
|
37377
37608
|
kind: agentKindSchema2.nullable(),
|
|
37378
37609
|
display_name: external_exports.string().nullable(),
|
|
37379
37610
|
lane: agentLaneSchema3.nullable(),
|
|
@@ -37381,9 +37612,9 @@ var agentStatusOutputSchema = external_exports.object({
|
|
|
37381
37612
|
schedule_cron: external_exports.string().nullable(),
|
|
37382
37613
|
schedule_timezone: external_exports.string().min(1).max(100).nullable(),
|
|
37383
37614
|
live: external_exports.boolean(),
|
|
37384
|
-
charter_version_id:
|
|
37615
|
+
charter_version_id: uuidSchema21.nullable(),
|
|
37385
37616
|
steward_chain: external_exports.array(external_exports.object({
|
|
37386
|
-
seat_id:
|
|
37617
|
+
seat_id: uuidSchema21,
|
|
37387
37618
|
name: external_exports.string()
|
|
37388
37619
|
}).strict()),
|
|
37389
37620
|
steward_chain_resolves_to_human: external_exports.boolean(),
|
|
@@ -37424,7 +37655,7 @@ var fleetWorkEvidenceSchema = external_exports.object({
|
|
|
37424
37655
|
label: external_exports.string(),
|
|
37425
37656
|
detail: external_exports.string(),
|
|
37426
37657
|
href: external_exports.string().nullable(),
|
|
37427
|
-
run_id:
|
|
37658
|
+
run_id: uuidSchema21.nullable(),
|
|
37428
37659
|
linkable_run: external_exports.boolean(),
|
|
37429
37660
|
can_run_now: external_exports.boolean()
|
|
37430
37661
|
}).strict();
|
|
@@ -37438,7 +37669,7 @@ var fleetWorkProgressSchema = external_exports.object({
|
|
|
37438
37669
|
last_durable_activity_at: isoDateTime7.nullable()
|
|
37439
37670
|
}).strict();
|
|
37440
37671
|
var fleetOverviewRowSchema = external_exports.object({
|
|
37441
|
-
seat_id:
|
|
37672
|
+
seat_id: uuidSchema21,
|
|
37442
37673
|
seat_name: external_exports.string(),
|
|
37443
37674
|
seat_path: external_exports.string(),
|
|
37444
37675
|
// DER-2068 (N-2): the seat's immediate parent seat name (null for the root
|
|
@@ -37475,7 +37706,7 @@ var agentListFleetOutputSchema = external_exports.object({
|
|
|
37475
37706
|
agents: external_exports.array(fleetOverviewRowSchema)
|
|
37476
37707
|
}).strict();
|
|
37477
37708
|
var runErrorLogSchema = external_exports.object({
|
|
37478
|
-
error_log_id:
|
|
37709
|
+
error_log_id: uuidSchema21,
|
|
37479
37710
|
source: external_exports.enum(["run", "llm", "tool", "mcp", "runner", "integration", "job", "web"]),
|
|
37480
37711
|
severity: external_exports.enum(["warning", "error", "critical"]),
|
|
37481
37712
|
code: external_exports.string().nullable(),
|
|
@@ -37488,9 +37719,9 @@ var agentFleetDigestInputSchema = external_exports.object({
|
|
|
37488
37719
|
error_limit: external_exports.number().int().min(1).max(100).default(50)
|
|
37489
37720
|
}).strict();
|
|
37490
37721
|
var fleetDigestRunSchema = external_exports.object({
|
|
37491
|
-
run_id:
|
|
37492
|
-
seat_id:
|
|
37493
|
-
agent_id:
|
|
37722
|
+
run_id: uuidSchema21,
|
|
37723
|
+
seat_id: uuidSchema21,
|
|
37724
|
+
agent_id: uuidSchema21,
|
|
37494
37725
|
status: runStatusSchema,
|
|
37495
37726
|
lane: agentLaneSchema3,
|
|
37496
37727
|
model: external_exports.string(),
|
|
@@ -37500,22 +37731,22 @@ var fleetDigestRunSchema = external_exports.object({
|
|
|
37500
37731
|
error_logs: external_exports.array(runErrorLogSchema)
|
|
37501
37732
|
}).strict();
|
|
37502
37733
|
var fleetDigestErrorSchema = runErrorLogSchema.extend({
|
|
37503
|
-
seat_id:
|
|
37504
|
-
agent_id:
|
|
37505
|
-
run_id:
|
|
37734
|
+
seat_id: uuidSchema21.nullable(),
|
|
37735
|
+
agent_id: uuidSchema21.nullable(),
|
|
37736
|
+
run_id: uuidSchema21.nullable(),
|
|
37506
37737
|
disposition: external_exports.enum(["active", "acknowledged", "resolved", "superseded"])
|
|
37507
37738
|
}).strict();
|
|
37508
37739
|
var fleetDigestNotificationErrorSchema = external_exports.object({
|
|
37509
|
-
notification_id:
|
|
37740
|
+
notification_id: uuidSchema21,
|
|
37510
37741
|
kind: external_exports.string(),
|
|
37511
37742
|
channel: external_exports.string(),
|
|
37512
37743
|
status: external_exports.string(),
|
|
37513
37744
|
provider: external_exports.string(),
|
|
37514
37745
|
error_message: external_exports.string().nullable(),
|
|
37515
|
-
error_log_id:
|
|
37746
|
+
error_log_id: uuidSchema21.nullable(),
|
|
37516
37747
|
source: external_exports.enum(["run", "llm", "tool", "mcp", "runner", "integration", "job", "web"]).nullable(),
|
|
37517
|
-
seat_id:
|
|
37518
|
-
run_id:
|
|
37748
|
+
seat_id: uuidSchema21.nullable(),
|
|
37749
|
+
run_id: uuidSchema21.nullable(),
|
|
37519
37750
|
created_at: isoDateTime7
|
|
37520
37751
|
}).strict();
|
|
37521
37752
|
var fleetDigestAgentSchema = fleetOverviewRowSchema.extend({
|
|
@@ -37564,21 +37795,21 @@ var seatTrustSummarySchema = external_exports.object({
|
|
|
37564
37795
|
last_activity_at: isoDateTime7.nullable()
|
|
37565
37796
|
}).strict();
|
|
37566
37797
|
var agentListRunsInputSchema = external_exports.object({
|
|
37567
|
-
seat_id:
|
|
37798
|
+
seat_id: uuidSchema21,
|
|
37568
37799
|
// Conservative, bounded page size; the timeline is a recent-history view.
|
|
37569
37800
|
limit: external_exports.number().int().min(1).max(200).default(50)
|
|
37570
37801
|
}).strict();
|
|
37571
37802
|
var agentGetRunInputSchema = external_exports.object({
|
|
37572
|
-
seat_id:
|
|
37573
|
-
run_id:
|
|
37803
|
+
seat_id: uuidSchema21,
|
|
37804
|
+
run_id: uuidSchema21,
|
|
37574
37805
|
// DER-1661: opt in to the persisted session transcript (`--transcript`). Off by
|
|
37575
37806
|
// default so the diagnostic read stays lean; the (potentially large) transcript body
|
|
37576
37807
|
// loads only when asked.
|
|
37577
37808
|
transcript: external_exports.boolean().default(false)
|
|
37578
37809
|
}).strict();
|
|
37579
37810
|
var seatRunSchema = external_exports.object({
|
|
37580
|
-
run_id:
|
|
37581
|
-
agent_id:
|
|
37811
|
+
run_id: uuidSchema21,
|
|
37812
|
+
agent_id: uuidSchema21,
|
|
37582
37813
|
agent_display_name: external_exports.string().nullable(),
|
|
37583
37814
|
status: runStatusSchema,
|
|
37584
37815
|
lane: agentLaneSchema3,
|
|
@@ -37595,8 +37826,8 @@ var seatRunErrorLogSchema = runErrorLogSchema.extend({
|
|
|
37595
37826
|
error_class: external_exports.string().nullable()
|
|
37596
37827
|
}).strict();
|
|
37597
37828
|
var seatRunDetailSchema = seatRunSchema.extend({
|
|
37598
|
-
task_id:
|
|
37599
|
-
work_order_id:
|
|
37829
|
+
task_id: uuidSchema21.nullable(),
|
|
37830
|
+
work_order_id: uuidSchema21.nullable(),
|
|
37600
37831
|
transcript_ref: external_exports.string(),
|
|
37601
37832
|
// DER-1913: null = usage UNKNOWN — a Codex / read-status / timeout / spawn-error
|
|
37602
37833
|
// runner turn reports no model-usage envelope, so the run records no token count.
|
|
@@ -37606,8 +37837,8 @@ var seatRunDetailSchema = seatRunSchema.extend({
|
|
|
37606
37837
|
outcome: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
37607
37838
|
error_logs: external_exports.array(seatRunErrorLogSchema),
|
|
37608
37839
|
skill_activations: external_exports.array(external_exports.object({
|
|
37609
|
-
skill_activation_id:
|
|
37610
|
-
skill_version_id:
|
|
37840
|
+
skill_activation_id: uuidSchema21,
|
|
37841
|
+
skill_version_id: uuidSchema21,
|
|
37611
37842
|
slug: external_exports.string().min(1),
|
|
37612
37843
|
name: external_exports.string().min(1),
|
|
37613
37844
|
version: external_exports.number().int().positive(),
|
|
@@ -37624,23 +37855,23 @@ var seatRunDetailSchema = seatRunSchema.extend({
|
|
|
37624
37855
|
transcript: sessionTranscriptReadResultSchema.nullable().optional()
|
|
37625
37856
|
}).strict();
|
|
37626
37857
|
var agentListRunsOutputSchema = external_exports.object({
|
|
37627
|
-
seat_id:
|
|
37858
|
+
seat_id: uuidSchema21,
|
|
37628
37859
|
summary: seatTrustSummarySchema,
|
|
37629
37860
|
runs: external_exports.array(seatRunSchema)
|
|
37630
37861
|
}).strict();
|
|
37631
37862
|
var agentGetRunOutputSchema = external_exports.object({
|
|
37632
|
-
seat_id:
|
|
37863
|
+
seat_id: uuidSchema21,
|
|
37633
37864
|
run: seatRunDetailSchema
|
|
37634
37865
|
}).strict();
|
|
37635
37866
|
var agentListToolCallsInputSchema = external_exports.object({
|
|
37636
|
-
seat_id:
|
|
37867
|
+
seat_id: uuidSchema21,
|
|
37637
37868
|
limit: external_exports.number().int().min(1).max(200).default(50),
|
|
37638
37869
|
// When true, return only HELD (non-allowed) tool calls — the governance view.
|
|
37639
37870
|
held_only: external_exports.boolean().default(false)
|
|
37640
37871
|
}).strict();
|
|
37641
37872
|
var seatToolCallSchema = external_exports.object({
|
|
37642
|
-
tool_call_id:
|
|
37643
|
-
run_id:
|
|
37873
|
+
tool_call_id: uuidSchema21,
|
|
37874
|
+
run_id: uuidSchema21.nullable(),
|
|
37644
37875
|
tool_name: external_exports.string(),
|
|
37645
37876
|
guard_result: guardResultSchema,
|
|
37646
37877
|
manifest_clause: external_exports.string().nullable(),
|
|
@@ -37649,13 +37880,13 @@ var seatToolCallSchema = external_exports.object({
|
|
|
37649
37880
|
finished_at: isoDateTime7.nullable()
|
|
37650
37881
|
}).strict();
|
|
37651
37882
|
var agentListToolCallsOutputSchema = external_exports.object({
|
|
37652
|
-
seat_id:
|
|
37883
|
+
seat_id: uuidSchema21,
|
|
37653
37884
|
summary: seatTrustSummarySchema,
|
|
37654
37885
|
tool_calls: external_exports.array(seatToolCallSchema)
|
|
37655
37886
|
}).strict();
|
|
37656
37887
|
var agentWatchRunInputSchema = external_exports.object({
|
|
37657
|
-
seat_id:
|
|
37658
|
-
run_id:
|
|
37888
|
+
seat_id: uuidSchema21,
|
|
37889
|
+
run_id: uuidSchema21
|
|
37659
37890
|
}).strict();
|
|
37660
37891
|
var runWatchCurrentStateSchema = external_exports.object({
|
|
37661
37892
|
state: workProgressStateSchema,
|
|
@@ -37676,7 +37907,7 @@ var runWatchHeartbeatSchema = external_exports.object({
|
|
|
37676
37907
|
reasons: external_exports.array(external_exports.string())
|
|
37677
37908
|
}).strict();
|
|
37678
37909
|
var agentWatchRunOutputSchema = external_exports.object({
|
|
37679
|
-
seat_id:
|
|
37910
|
+
seat_id: uuidSchema21,
|
|
37680
37911
|
run: seatRunSchema,
|
|
37681
37912
|
// the lean run row (status/lane/model/counts/timestamps)
|
|
37682
37913
|
is_live: external_exports.boolean(),
|
|
@@ -37700,16 +37931,16 @@ var deliverableLinkSchema = external_exports.object({
|
|
|
37700
37931
|
kind: external_exports.enum(["internal", "linear", "github", "external"])
|
|
37701
37932
|
}).strict();
|
|
37702
37933
|
var deliverableIdSchema = external_exports.union([
|
|
37703
|
-
|
|
37934
|
+
uuidSchema21,
|
|
37704
37935
|
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)
|
|
37705
37936
|
]);
|
|
37706
37937
|
var deliverableRowSchema = external_exports.object({
|
|
37707
37938
|
id: deliverableIdSchema,
|
|
37708
|
-
seat_id:
|
|
37709
|
-
agent_id:
|
|
37710
|
-
run_id:
|
|
37711
|
-
task_id:
|
|
37712
|
-
work_order_id:
|
|
37939
|
+
seat_id: uuidSchema21,
|
|
37940
|
+
agent_id: uuidSchema21.nullable(),
|
|
37941
|
+
run_id: uuidSchema21.nullable(),
|
|
37942
|
+
task_id: uuidSchema21.nullable(),
|
|
37943
|
+
work_order_id: uuidSchema21.nullable(),
|
|
37713
37944
|
kind: deliverableKindSchema,
|
|
37714
37945
|
title: external_exports.string(),
|
|
37715
37946
|
summary: external_exports.string().nullable(),
|
|
@@ -37729,13 +37960,13 @@ var deliverableRowSchema = external_exports.object({
|
|
|
37729
37960
|
receipt_presence: receiptPresenceSchema
|
|
37730
37961
|
}).strict();
|
|
37731
37962
|
var deliverableListInputSchema = external_exports.object({
|
|
37732
|
-
seat_id:
|
|
37963
|
+
seat_id: uuidSchema21
|
|
37733
37964
|
}).strict();
|
|
37734
37965
|
var deliverableListOutputSchema = external_exports.object({
|
|
37735
37966
|
deliverables: external_exports.array(deliverableRowSchema)
|
|
37736
37967
|
}).strict();
|
|
37737
37968
|
var deliverableGetInputSchema = external_exports.object({
|
|
37738
|
-
seat_id:
|
|
37969
|
+
seat_id: uuidSchema21,
|
|
37739
37970
|
deliverable_id: deliverableIdSchema
|
|
37740
37971
|
}).strict();
|
|
37741
37972
|
var deliverableGetOutputSchema = external_exports.object({
|
|
@@ -37743,12 +37974,12 @@ var deliverableGetOutputSchema = external_exports.object({
|
|
|
37743
37974
|
}).strict();
|
|
37744
37975
|
var mcpTokenListInputSchema = external_exports.object({
|
|
37745
37976
|
include_revoked: external_exports.boolean().default(false),
|
|
37746
|
-
seat_id:
|
|
37977
|
+
seat_id: uuidSchema21.optional()
|
|
37747
37978
|
}).strict();
|
|
37748
37979
|
var mcpTokenMetadataSchema = external_exports.object({
|
|
37749
|
-
token_id:
|
|
37980
|
+
token_id: uuidSchema21,
|
|
37750
37981
|
scope: mcpScopeSchema,
|
|
37751
|
-
seat_id:
|
|
37982
|
+
seat_id: uuidSchema21.nullable(),
|
|
37752
37983
|
created_at: isoDateTime7,
|
|
37753
37984
|
last_seen_at: isoDateTime7.nullable(),
|
|
37754
37985
|
// DER-830: expires_at is now always present (the column is NOT NULL).
|
|
@@ -37762,29 +37993,29 @@ var mcpTokenListOutputSchema = external_exports.object({
|
|
|
37762
37993
|
tokens: external_exports.array(mcpTokenMetadataSchema)
|
|
37763
37994
|
}).strict();
|
|
37764
37995
|
var errorLogListInputSchema = external_exports.object({
|
|
37765
|
-
seat_id:
|
|
37996
|
+
seat_id: uuidSchema21.optional(),
|
|
37766
37997
|
source: external_exports.enum(["run", "llm", "tool", "mcp", "runner", "integration", "job", "web"]).optional(),
|
|
37767
37998
|
severity: external_exports.enum(["warning", "error", "critical"]).optional(),
|
|
37768
37999
|
resolved: external_exports.enum(["active", "acknowledged", "resolved", "all"]).default("active"),
|
|
37769
38000
|
limit: external_exports.number().int().min(1).max(200).default(50)
|
|
37770
38001
|
}).strict();
|
|
37771
38002
|
var errorLogListItemSchema = external_exports.object({
|
|
37772
|
-
error_log_id:
|
|
38003
|
+
error_log_id: uuidSchema21,
|
|
37773
38004
|
source: external_exports.enum(["run", "llm", "tool", "mcp", "runner", "integration", "job", "web"]),
|
|
37774
38005
|
severity: external_exports.enum(["warning", "error", "critical"]),
|
|
37775
38006
|
code: external_exports.string().nullable(),
|
|
37776
38007
|
message: external_exports.string(),
|
|
37777
|
-
seat_id:
|
|
37778
|
-
agent_id:
|
|
37779
|
-
run_id:
|
|
38008
|
+
seat_id: uuidSchema21.nullable(),
|
|
38009
|
+
agent_id: uuidSchema21.nullable(),
|
|
38010
|
+
run_id: uuidSchema21.nullable(),
|
|
37780
38011
|
disposition: external_exports.enum(["active", "acknowledged", "resolved", "superseded"]),
|
|
37781
38012
|
resolved_at: isoDateTime7.nullable(),
|
|
37782
|
-
resolved_by:
|
|
38013
|
+
resolved_by: uuidSchema21.nullable(),
|
|
37783
38014
|
resolution_reason: external_exports.string().nullable(),
|
|
37784
|
-
linked_task_id:
|
|
37785
|
-
linked_issue_id:
|
|
38015
|
+
linked_task_id: uuidSchema21.nullable(),
|
|
38016
|
+
linked_issue_id: uuidSchema21.nullable(),
|
|
37786
38017
|
linked_pr_ref: external_exports.string().nullable(),
|
|
37787
|
-
superseded_by_id:
|
|
38018
|
+
superseded_by_id: uuidSchema21.nullable(),
|
|
37788
38019
|
created_at: isoDateTime7
|
|
37789
38020
|
}).strict();
|
|
37790
38021
|
var errorLogListOutputSchema = external_exports.object({
|
|
@@ -37792,29 +38023,29 @@ var errorLogListOutputSchema = external_exports.object({
|
|
|
37792
38023
|
total: external_exports.number().int().nonnegative()
|
|
37793
38024
|
}).strict();
|
|
37794
38025
|
var errorLogResolveInputSchema = external_exports.object({
|
|
37795
|
-
error_log_id:
|
|
38026
|
+
error_log_id: uuidSchema21,
|
|
37796
38027
|
reason: external_exports.string().trim().min(1),
|
|
37797
38028
|
disposition: external_exports.enum(["acknowledged", "resolved"]).default("acknowledged"),
|
|
37798
|
-
linked_task_id:
|
|
37799
|
-
linked_issue_id:
|
|
38029
|
+
linked_task_id: uuidSchema21.optional(),
|
|
38030
|
+
linked_issue_id: uuidSchema21.optional(),
|
|
37800
38031
|
linked_pr_ref: external_exports.string().trim().min(1).optional()
|
|
37801
38032
|
}).strict();
|
|
37802
38033
|
var errorLogResolveOutputSchema = external_exports.object({
|
|
37803
|
-
error_log_id:
|
|
38034
|
+
error_log_id: uuidSchema21,
|
|
37804
38035
|
disposition: external_exports.enum(["acknowledged", "resolved"]),
|
|
37805
38036
|
resolved_at: isoDateTime7
|
|
37806
38037
|
}).strict();
|
|
37807
38038
|
var errorLogSupersedeInputSchema = external_exports.object({
|
|
37808
|
-
error_log_id:
|
|
37809
|
-
new_error_log_id:
|
|
38039
|
+
error_log_id: uuidSchema21,
|
|
38040
|
+
new_error_log_id: uuidSchema21,
|
|
37810
38041
|
reason: external_exports.string().trim().min(1),
|
|
37811
|
-
linked_task_id:
|
|
37812
|
-
linked_issue_id:
|
|
38042
|
+
linked_task_id: uuidSchema21.optional(),
|
|
38043
|
+
linked_issue_id: uuidSchema21.optional(),
|
|
37813
38044
|
linked_pr_ref: external_exports.string().trim().min(1).optional()
|
|
37814
38045
|
}).strict();
|
|
37815
38046
|
var errorLogSupersedeOutputSchema = external_exports.object({
|
|
37816
|
-
error_log_id:
|
|
37817
|
-
superseded_by_id:
|
|
38047
|
+
error_log_id: uuidSchema21,
|
|
38048
|
+
superseded_by_id: uuidSchema21,
|
|
37818
38049
|
disposition: external_exports.literal("superseded"),
|
|
37819
38050
|
resolved_at: isoDateTime7
|
|
37820
38051
|
}).strict();
|
|
@@ -37825,17 +38056,17 @@ var staleCandidatesInputSchema = external_exports.object({
|
|
|
37825
38056
|
limit: external_exports.number().int().min(1).max(200).default(50)
|
|
37826
38057
|
}).strict();
|
|
37827
38058
|
var errorLogStaleCandidateSchema = external_exports.object({
|
|
37828
|
-
error_log_id:
|
|
38059
|
+
error_log_id: uuidSchema21,
|
|
37829
38060
|
source: external_exports.enum(["run", "llm", "tool", "mcp", "runner", "integration", "job", "web"]),
|
|
37830
38061
|
severity: external_exports.enum(["warning", "error", "critical"]),
|
|
37831
38062
|
code: external_exports.string().nullable(),
|
|
37832
38063
|
message: external_exports.string(),
|
|
37833
|
-
seat_id:
|
|
38064
|
+
seat_id: uuidSchema21.nullable(),
|
|
37834
38065
|
occurrence_count: external_exports.number().int(),
|
|
37835
38066
|
last_seen_at: isoDateTime7,
|
|
37836
38067
|
created_at: isoDateTime7,
|
|
37837
38068
|
days_stale: external_exports.number().int(),
|
|
37838
|
-
linked_issue_id:
|
|
38069
|
+
linked_issue_id: uuidSchema21.nullable(),
|
|
37839
38070
|
linked_issue_resolved: external_exports.boolean(),
|
|
37840
38071
|
confidence: staleCandidateConfidenceSchema,
|
|
37841
38072
|
evidence: staleCandidateEvidenceSchema
|
|
@@ -37845,8 +38076,8 @@ var errorLogStaleCandidatesOutputSchema = external_exports.object({
|
|
|
37845
38076
|
total: external_exports.number().int().nonnegative()
|
|
37846
38077
|
}).strict();
|
|
37847
38078
|
var escalationStaleCandidateSchema = external_exports.object({
|
|
37848
|
-
escalation_id:
|
|
37849
|
-
seat_id:
|
|
38079
|
+
escalation_id: uuidSchema21,
|
|
38080
|
+
seat_id: uuidSchema21,
|
|
37850
38081
|
seat_name: external_exports.string(),
|
|
37851
38082
|
reason: external_exports.string(),
|
|
37852
38083
|
status: external_exports.literal("open"),
|
|
@@ -37862,14 +38093,14 @@ var escalationStaleCandidatesOutputSchema = external_exports.object({
|
|
|
37862
38093
|
total: external_exports.number().int().nonnegative()
|
|
37863
38094
|
}).strict();
|
|
37864
38095
|
var frictionStaleCandidateSchema = external_exports.object({
|
|
37865
|
-
issue_id:
|
|
38096
|
+
issue_id: uuidSchema21,
|
|
37866
38097
|
summary: external_exports.string(),
|
|
37867
38098
|
severity: external_exports.enum(["low", "med", "high", "critical"]),
|
|
37868
38099
|
status: external_exports.enum(["open", "diagnosing"]),
|
|
37869
38100
|
created_at: isoDateTime7,
|
|
37870
38101
|
updated_at: isoDateTime7,
|
|
37871
38102
|
days_stale: external_exports.number().int(),
|
|
37872
|
-
action_task_id:
|
|
38103
|
+
action_task_id: uuidSchema21.nullable(),
|
|
37873
38104
|
action_task_status: external_exports.string().nullable(),
|
|
37874
38105
|
action_task_done: external_exports.boolean(),
|
|
37875
38106
|
confidence: staleCandidateConfidenceSchema,
|
|
@@ -37880,20 +38111,20 @@ var frictionStaleCandidatesOutputSchema = external_exports.object({
|
|
|
37880
38111
|
total: external_exports.number().int().nonnegative()
|
|
37881
38112
|
}).strict();
|
|
37882
38113
|
var errorLogBulkResolveInputSchema = external_exports.object({
|
|
37883
|
-
error_log_ids: external_exports.array(
|
|
38114
|
+
error_log_ids: external_exports.array(uuidSchema21).min(1).max(200),
|
|
37884
38115
|
reason: external_exports.string().trim().min(1),
|
|
37885
38116
|
disposition: external_exports.enum(["acknowledged", "resolved"]).default("resolved")
|
|
37886
38117
|
}).strict();
|
|
37887
38118
|
var errorLogBulkResolveSkippedSchema = external_exports.object({
|
|
37888
|
-
error_log_id:
|
|
38119
|
+
error_log_id: uuidSchema21,
|
|
37889
38120
|
reason: external_exports.string()
|
|
37890
38121
|
}).strict();
|
|
37891
38122
|
var errorLogBulkResolveFailedSchema = external_exports.object({
|
|
37892
|
-
error_log_id:
|
|
38123
|
+
error_log_id: uuidSchema21,
|
|
37893
38124
|
reason: external_exports.string()
|
|
37894
38125
|
}).strict();
|
|
37895
38126
|
var errorLogBulkResolveOutputSchema = external_exports.object({
|
|
37896
|
-
resolved: external_exports.array(
|
|
38127
|
+
resolved: external_exports.array(uuidSchema21),
|
|
37897
38128
|
skipped: external_exports.array(errorLogBulkResolveSkippedSchema),
|
|
37898
38129
|
failed: external_exports.array(errorLogBulkResolveFailedSchema),
|
|
37899
38130
|
resolved_count: external_exports.number().int().nonnegative(),
|
|
@@ -37902,19 +38133,19 @@ var errorLogBulkResolveOutputSchema = external_exports.object({
|
|
|
37902
38133
|
total: external_exports.number().int().nonnegative()
|
|
37903
38134
|
}).strict();
|
|
37904
38135
|
var escalationBulkResolveInputSchema = external_exports.object({
|
|
37905
|
-
escalation_ids: external_exports.array(
|
|
38136
|
+
escalation_ids: external_exports.array(uuidSchema21).min(1).max(200),
|
|
37906
38137
|
reason: external_exports.string().trim().min(1)
|
|
37907
38138
|
}).strict();
|
|
37908
38139
|
var escalationBulkResolveSkippedSchema = external_exports.object({
|
|
37909
|
-
escalation_id:
|
|
38140
|
+
escalation_id: uuidSchema21,
|
|
37910
38141
|
reason: external_exports.string()
|
|
37911
38142
|
}).strict();
|
|
37912
38143
|
var escalationBulkResolveFailedSchema = external_exports.object({
|
|
37913
|
-
escalation_id:
|
|
38144
|
+
escalation_id: uuidSchema21,
|
|
37914
38145
|
reason: external_exports.string()
|
|
37915
38146
|
}).strict();
|
|
37916
38147
|
var escalationBulkResolveOutputSchema = external_exports.object({
|
|
37917
|
-
resolved: external_exports.array(
|
|
38148
|
+
resolved: external_exports.array(uuidSchema21),
|
|
37918
38149
|
skipped: external_exports.array(escalationBulkResolveSkippedSchema),
|
|
37919
38150
|
failed: external_exports.array(escalationBulkResolveFailedSchema),
|
|
37920
38151
|
resolved_count: external_exports.number().int().nonnegative(),
|
|
@@ -37923,19 +38154,19 @@ var escalationBulkResolveOutputSchema = external_exports.object({
|
|
|
37923
38154
|
total: external_exports.number().int().nonnegative()
|
|
37924
38155
|
}).strict();
|
|
37925
38156
|
var frictionBulkResolveInputSchema = external_exports.object({
|
|
37926
|
-
issue_ids: external_exports.array(
|
|
38157
|
+
issue_ids: external_exports.array(uuidSchema21).min(1).max(200),
|
|
37927
38158
|
root_cause: external_exports.string().trim().min(1)
|
|
37928
38159
|
}).strict();
|
|
37929
38160
|
var frictionBulkResolveSkippedSchema = external_exports.object({
|
|
37930
|
-
issue_id:
|
|
38161
|
+
issue_id: uuidSchema21,
|
|
37931
38162
|
reason: external_exports.string()
|
|
37932
38163
|
}).strict();
|
|
37933
38164
|
var frictionBulkResolveFailedSchema = external_exports.object({
|
|
37934
|
-
issue_id:
|
|
38165
|
+
issue_id: uuidSchema21,
|
|
37935
38166
|
reason: external_exports.string()
|
|
37936
38167
|
}).strict();
|
|
37937
38168
|
var frictionBulkResolveOutputSchema = external_exports.object({
|
|
37938
|
-
resolved: external_exports.array(
|
|
38169
|
+
resolved: external_exports.array(uuidSchema21),
|
|
37939
38170
|
skipped: external_exports.array(frictionBulkResolveSkippedSchema),
|
|
37940
38171
|
failed: external_exports.array(frictionBulkResolveFailedSchema),
|
|
37941
38172
|
resolved_count: external_exports.number().int().nonnegative(),
|
|
@@ -37945,10 +38176,10 @@ var frictionBulkResolveOutputSchema = external_exports.object({
|
|
|
37945
38176
|
}).strict();
|
|
37946
38177
|
var runHeartbeatStateSchema = external_exports.enum(["working", "quiet_healthy", "recovered", "stalled", "unavailable"]);
|
|
37947
38178
|
var agentRunHeartbeatsInputSchema = external_exports.object({
|
|
37948
|
-
seat_ids: external_exports.array(
|
|
38179
|
+
seat_ids: external_exports.array(uuidSchema21).min(1).max(200).optional()
|
|
37949
38180
|
}).strict();
|
|
37950
38181
|
var runHeartbeatSeatRollupSchema = external_exports.object({
|
|
37951
|
-
seat_id:
|
|
38182
|
+
seat_id: uuidSchema21,
|
|
37952
38183
|
state: runHeartbeatStateSchema,
|
|
37953
38184
|
stalled: external_exports.boolean(),
|
|
37954
38185
|
run_count: external_exports.number().int().nonnegative(),
|
|
@@ -38068,13 +38299,13 @@ var runSummaryOutputSchema = external_exports.object({
|
|
|
38068
38299
|
});
|
|
38069
38300
|
|
|
38070
38301
|
// ../../packages/protocol/src/system-health.ts
|
|
38071
|
-
var
|
|
38302
|
+
var uuidSchema22 = external_exports.string().uuid();
|
|
38072
38303
|
var isoDateTime9 = external_exports.string().datetime({ offset: true });
|
|
38073
38304
|
var systemHealthCallerKindSchema = external_exports.enum(["tenant_admin", "member", "seat_token"]);
|
|
38074
38305
|
var systemHealthCallerSchema = external_exports.object({
|
|
38075
38306
|
kind: systemHealthCallerKindSchema,
|
|
38076
|
-
seat_id:
|
|
38077
|
-
seat_ids: external_exports.array(
|
|
38307
|
+
seat_id: uuidSchema22.optional(),
|
|
38308
|
+
seat_ids: external_exports.array(uuidSchema22).min(1).optional()
|
|
38078
38309
|
}).strict();
|
|
38079
38310
|
var systemHealthVerdictSchema = external_exports.enum(["healthy", "degraded", "blocked"]);
|
|
38080
38311
|
var systemHealthSeveritySchema = external_exports.enum(["info", "warning", "critical"]);
|
|
@@ -38112,18 +38343,18 @@ var systemHealthFindingSchema = external_exports.object({
|
|
|
38112
38343
|
summary: external_exports.string().min(1),
|
|
38113
38344
|
detail: external_exports.string().min(1),
|
|
38114
38345
|
remediation: systemHealthActionSchema,
|
|
38115
|
-
seat_id:
|
|
38116
|
-
goal_id:
|
|
38117
|
-
run_id:
|
|
38118
|
-
issue_id:
|
|
38119
|
-
task_id:
|
|
38120
|
-
error_log_id:
|
|
38346
|
+
seat_id: uuidSchema22.nullable(),
|
|
38347
|
+
goal_id: uuidSchema22.nullable(),
|
|
38348
|
+
run_id: uuidSchema22.nullable(),
|
|
38349
|
+
issue_id: uuidSchema22.nullable(),
|
|
38350
|
+
task_id: uuidSchema22.nullable(),
|
|
38351
|
+
error_log_id: uuidSchema22.nullable()
|
|
38121
38352
|
}).strict();
|
|
38122
38353
|
var systemHealthScopeSchema = external_exports.object({
|
|
38123
38354
|
mode: systemHealthScopeModeSchema,
|
|
38124
|
-
root_seat_ids: external_exports.array(
|
|
38125
|
-
included_seat_ids: external_exports.array(
|
|
38126
|
-
requested_seat_id:
|
|
38355
|
+
root_seat_ids: external_exports.array(uuidSchema22),
|
|
38356
|
+
included_seat_ids: external_exports.array(uuidSchema22),
|
|
38357
|
+
requested_seat_id: uuidSchema22.nullable(),
|
|
38127
38358
|
total_seat_count: external_exports.number().int().nonnegative()
|
|
38128
38359
|
}).strict();
|
|
38129
38360
|
var systemHealthFleetSectionSchema = external_exports.object({
|
|
@@ -38180,7 +38411,7 @@ var systemHealthSectionsSchema = external_exports.object({
|
|
|
38180
38411
|
sync: systemHealthSyncSectionSchema
|
|
38181
38412
|
}).strict();
|
|
38182
38413
|
var systemHealthInputSchema = external_exports.object({
|
|
38183
|
-
seat_id:
|
|
38414
|
+
seat_id: uuidSchema22.optional()
|
|
38184
38415
|
}).strict();
|
|
38185
38416
|
var systemHealthCheckInputSchema = systemHealthInputSchema.extend({
|
|
38186
38417
|
caller: systemHealthCallerSchema
|
|
@@ -38207,10 +38438,10 @@ var baserowFilteredCountInputSchema = external_exports.object({
|
|
|
38207
38438
|
}).strict();
|
|
38208
38439
|
|
|
38209
38440
|
// ../../packages/protocol/src/signal-report.ts
|
|
38210
|
-
var
|
|
38441
|
+
var uuidSchema23 = external_exports.string().uuid();
|
|
38211
38442
|
var dateOnlySchema3 = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD");
|
|
38212
38443
|
var signalReportInputSchema = external_exports.object({
|
|
38213
|
-
measurable_id:
|
|
38444
|
+
measurable_id: uuidSchema23,
|
|
38214
38445
|
value: external_exports.number().finite(),
|
|
38215
38446
|
// Optional; defaults to the measurable's current period (resolved in the
|
|
38216
38447
|
// command against the measurable's own cadence via the canonical bounds).
|
|
@@ -38221,8 +38452,8 @@ var signalReportInputSchema = external_exports.object({
|
|
|
38221
38452
|
confidence: external_exports.enum(["low", "medium", "high"]).optional()
|
|
38222
38453
|
}).strict();
|
|
38223
38454
|
var signalReportOutputSchema = external_exports.object({
|
|
38224
|
-
reading_id:
|
|
38225
|
-
measurable_id:
|
|
38455
|
+
reading_id: uuidSchema23,
|
|
38456
|
+
measurable_id: uuidSchema23,
|
|
38226
38457
|
// Always false: an agent-sourced reading is a draft until a human confirms it.
|
|
38227
38458
|
confirmed: external_exports.literal(false)
|
|
38228
38459
|
}).strict();
|
|
@@ -38253,12 +38484,12 @@ var signalReadingProposalSchema = external_exports.object({
|
|
|
38253
38484
|
});
|
|
38254
38485
|
|
|
38255
38486
|
// ../../packages/protocol/src/signal-draft-first-readings.ts
|
|
38256
|
-
var
|
|
38487
|
+
var uuidSchema24 = external_exports.string().uuid();
|
|
38257
38488
|
var signalDraftFirstReadingsInputSchema = external_exports.object({
|
|
38258
|
-
measurable_id:
|
|
38489
|
+
measurable_id: uuidSchema24
|
|
38259
38490
|
}).strict();
|
|
38260
38491
|
var signalDraftFirstReadingsOutputSchema = external_exports.object({
|
|
38261
|
-
measurable_id:
|
|
38492
|
+
measurable_id: uuidSchema24,
|
|
38262
38493
|
// The live pull outcome, surfaced verbatim so the UI can explain a no-datapoint
|
|
38263
38494
|
// result honestly ("source polled, nothing came back") rather than silently.
|
|
38264
38495
|
outcome: external_exports.enum(["ok", "blocked", "error"]),
|
|
@@ -38266,7 +38497,7 @@ var signalDraftFirstReadingsOutputSchema = external_exports.object({
|
|
|
38266
38497
|
// Never fabricates back-dated history the source cannot actually produce.
|
|
38267
38498
|
drafted: external_exports.number().int().min(0).max(1),
|
|
38268
38499
|
// Present only when drafted === 1.
|
|
38269
|
-
reading_id:
|
|
38500
|
+
reading_id: uuidSchema24.optional(),
|
|
38270
38501
|
value: external_exports.number().finite().optional(),
|
|
38271
38502
|
period_start: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD").optional(),
|
|
38272
38503
|
// Present only when drafted === 0: a short, non-secret machine reason
|
|
@@ -39974,7 +40205,7 @@ var softwareFactoryBudgetExhaustedEventSchema = external_exports.object({
|
|
|
39974
40205
|
}).strict();
|
|
39975
40206
|
|
|
39976
40207
|
// ../../packages/protocol/src/sync-brief.ts
|
|
39977
|
-
var
|
|
40208
|
+
var uuidSchema25 = external_exports.string().uuid();
|
|
39978
40209
|
var dateSchema = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/);
|
|
39979
40210
|
var syncBriefGapSchema = external_exports.object({
|
|
39980
40211
|
section: external_exports.enum(["exceptions", "goal_deltas", "task_review", "friction", "agent_activity"]),
|
|
@@ -39987,8 +40218,8 @@ var sectionSchema = (itemSchema) => external_exports.object({
|
|
|
39987
40218
|
flagged_gaps: external_exports.array(syncBriefGapSchema)
|
|
39988
40219
|
}).strict();
|
|
39989
40220
|
var syncBriefExceptionSchema = external_exports.object({
|
|
39990
|
-
measurable_id:
|
|
39991
|
-
seat_id:
|
|
40221
|
+
measurable_id: uuidSchema25,
|
|
40222
|
+
seat_id: uuidSchema25,
|
|
39992
40223
|
seat_name: external_exports.string().min(1),
|
|
39993
40224
|
name: external_exports.string().min(1),
|
|
39994
40225
|
state: external_exports.enum(["risk", "crit", "pending"]),
|
|
@@ -39999,8 +40230,8 @@ var syncBriefExceptionSchema = external_exports.object({
|
|
|
39999
40230
|
freshness: external_exports.enum(["fresh", "due", "stale", "awaiting_first_reading", "not_expected"]).optional()
|
|
40000
40231
|
}).strict();
|
|
40001
40232
|
var syncBriefGoalDeltaSchema = external_exports.object({
|
|
40002
|
-
goal_id:
|
|
40003
|
-
seat_id:
|
|
40233
|
+
goal_id: uuidSchema25,
|
|
40234
|
+
seat_id: uuidSchema25.nullable(),
|
|
40004
40235
|
seat_name: external_exports.string().nullable(),
|
|
40005
40236
|
title: external_exports.string().min(1),
|
|
40006
40237
|
status: external_exports.enum(["on", "off", "done", "dropped"]),
|
|
@@ -40027,22 +40258,22 @@ var syncBriefTaskReviewSchema = external_exports.object({
|
|
|
40027
40258
|
previous_done_rate: external_exports.number().min(0).max(1),
|
|
40028
40259
|
delta: external_exports.number().min(-1).max(1),
|
|
40029
40260
|
stalled: external_exports.array(external_exports.object({
|
|
40030
|
-
task_id:
|
|
40031
|
-
owner_seat_id:
|
|
40261
|
+
task_id: uuidSchema25,
|
|
40262
|
+
owner_seat_id: uuidSchema25,
|
|
40032
40263
|
owner_seat_name: external_exports.string().min(1),
|
|
40033
40264
|
title: external_exports.string().min(1),
|
|
40034
40265
|
due_on: dateSchema,
|
|
40035
40266
|
stalled_at: external_exports.string().nullable()
|
|
40036
40267
|
}).strict()),
|
|
40037
40268
|
overdue_by_owner: external_exports.array(external_exports.object({
|
|
40038
|
-
owner_seat_id:
|
|
40269
|
+
owner_seat_id: uuidSchema25,
|
|
40039
40270
|
owner_seat_name: external_exports.string().min(1),
|
|
40040
40271
|
overdue_count: external_exports.number().int().nonnegative()
|
|
40041
40272
|
}).strict())
|
|
40042
40273
|
}).strict();
|
|
40043
40274
|
var syncBriefIssueSchema = external_exports.object({
|
|
40044
|
-
issue_id:
|
|
40045
|
-
raised_by_seat_id:
|
|
40275
|
+
issue_id: uuidSchema25,
|
|
40276
|
+
raised_by_seat_id: uuidSchema25,
|
|
40046
40277
|
raised_by_seat_name: external_exports.string().min(1),
|
|
40047
40278
|
summary: external_exports.string().min(1),
|
|
40048
40279
|
severity: external_exports.enum(["low", "med", "high", "critical"]),
|
|
@@ -40059,9 +40290,9 @@ var syncBriefActionItemTrendSchema = external_exports.object({
|
|
|
40059
40290
|
has_prior: external_exports.boolean()
|
|
40060
40291
|
}).strict();
|
|
40061
40292
|
var syncBriefCascadeAtRiskSchema = external_exports.object({
|
|
40062
|
-
goal_id:
|
|
40293
|
+
goal_id: uuidSchema25,
|
|
40063
40294
|
title: external_exports.string().min(1),
|
|
40064
|
-
seat_id:
|
|
40295
|
+
seat_id: uuidSchema25.nullable(),
|
|
40065
40296
|
progress_pct: external_exports.number().int().min(0).max(100),
|
|
40066
40297
|
classification: external_exports.enum(["at_risk", "projected_miss"]),
|
|
40067
40298
|
behind_days: external_exports.number().nullable(),
|
|
@@ -40070,7 +40301,7 @@ var syncBriefCascadeAtRiskSchema = external_exports.object({
|
|
|
40070
40301
|
target_date: external_exports.string().date().nullable().optional()
|
|
40071
40302
|
}).strict();
|
|
40072
40303
|
var syncBriefRunHeartbeatStalledSeatSchema = external_exports.object({
|
|
40073
|
-
seat_id:
|
|
40304
|
+
seat_id: uuidSchema25,
|
|
40074
40305
|
current_phase: external_exports.string().nullable(),
|
|
40075
40306
|
stalled_run_count: external_exports.number().int().nonnegative()
|
|
40076
40307
|
}).strict();
|
|
@@ -40095,8 +40326,8 @@ var syncBriefRunHeartbeatRollupSchema = external_exports.object({
|
|
|
40095
40326
|
stalled_seats: external_exports.array(syncBriefRunHeartbeatStalledSeatSchema)
|
|
40096
40327
|
}).strict();
|
|
40097
40328
|
var syncBriefAgentActivitySchema = external_exports.object({
|
|
40098
|
-
agent_id:
|
|
40099
|
-
seat_id:
|
|
40329
|
+
agent_id: uuidSchema25,
|
|
40330
|
+
seat_id: uuidSchema25,
|
|
40100
40331
|
seat_name: external_exports.string().min(1),
|
|
40101
40332
|
run_count: external_exports.number().int().nonnegative(),
|
|
40102
40333
|
failed_run_count: external_exports.number().int().nonnegative(),
|
|
@@ -40109,11 +40340,11 @@ var syncBriefAgentActivitySchema = external_exports.object({
|
|
|
40109
40340
|
var syncBriefSchema = external_exports.object({
|
|
40110
40341
|
schema_version: external_exports.literal(1),
|
|
40111
40342
|
tenant: external_exports.object({
|
|
40112
|
-
id:
|
|
40343
|
+
id: uuidSchema25,
|
|
40113
40344
|
name: external_exports.string().min(1)
|
|
40114
40345
|
}).strict(),
|
|
40115
40346
|
cluster: external_exports.object({
|
|
40116
|
-
id:
|
|
40347
|
+
id: uuidSchema25,
|
|
40117
40348
|
name: external_exports.string().min(1)
|
|
40118
40349
|
}).strict().nullable(),
|
|
40119
40350
|
period: external_exports.object({
|
|
@@ -40230,11 +40461,11 @@ var usageSnapshotOutputSchema = external_exports.object({
|
|
|
40230
40461
|
}).strict();
|
|
40231
40462
|
|
|
40232
40463
|
// ../../packages/protocol/src/event-payloads.ts
|
|
40233
|
-
var
|
|
40464
|
+
var uuidSchema26 = external_exports.string().uuid();
|
|
40234
40465
|
var evidenceSchema = external_exports.array(external_exports.unknown());
|
|
40235
40466
|
var statusEventPayloadSchema = external_exports.object({
|
|
40236
40467
|
measurables: external_exports.array(external_exports.object({
|
|
40237
|
-
id:
|
|
40468
|
+
id: uuidSchema26,
|
|
40238
40469
|
value: external_exports.number().finite(),
|
|
40239
40470
|
// DER-1045: an optional, non-secret citation for an agent-proposed reading
|
|
40240
40471
|
// (signal.report) — where the number came from + the agent's confidence.
|
|
@@ -40269,7 +40500,7 @@ var statusEventPayloadSchema = external_exports.object({
|
|
|
40269
40500
|
}).strict().optional()
|
|
40270
40501
|
}).strict()).optional(),
|
|
40271
40502
|
goals: external_exports.array(external_exports.object({
|
|
40272
|
-
id:
|
|
40503
|
+
id: uuidSchema26,
|
|
40273
40504
|
state: external_exports.enum(["on", "off"]),
|
|
40274
40505
|
note: external_exports.string().min(1).optional(),
|
|
40275
40506
|
// DER-2214: structured status-event attribution so "deliberately human-pinned"
|
|
@@ -40301,8 +40532,8 @@ var escalationEventPayloadSchema = escalationRaiseInputSchema.extend({
|
|
|
40301
40532
|
}).strict();
|
|
40302
40533
|
var issueEventPayloadSchema = external_exports.object({
|
|
40303
40534
|
summary: external_exports.string().min(1),
|
|
40304
|
-
blocking_goal_id:
|
|
40305
|
-
broken_measurable_id:
|
|
40535
|
+
blocking_goal_id: uuidSchema26.optional(),
|
|
40536
|
+
broken_measurable_id: uuidSchema26.optional(),
|
|
40306
40537
|
evidence: evidenceSchema,
|
|
40307
40538
|
severity: external_exports.enum(["low", "med", "high", "critical"]),
|
|
40308
40539
|
// DER-1978 (S2): an OPTIONAL short human-readable title written at creation.
|
|
@@ -40314,7 +40545,7 @@ var issueEventPayloadSchema = external_exports.object({
|
|
|
40314
40545
|
}).strict();
|
|
40315
40546
|
|
|
40316
40547
|
// ../../packages/protocol/src/event-internal-payloads.ts
|
|
40317
|
-
var
|
|
40548
|
+
var uuidSchema27 = external_exports.string().uuid();
|
|
40318
40549
|
var internalEventObjectSchema = external_exports.record(external_exports.string(), external_exports.unknown()).refine((payload) => !Array.isArray(payload), "Internal event payload must be an object");
|
|
40319
40550
|
var actionEventPayloadSchema = external_exports.object({ action: external_exports.string().min(1) }).passthrough();
|
|
40320
40551
|
function authoritativePrefixUnion(branches, authoritative) {
|
|
@@ -40336,25 +40567,25 @@ function authoritativePrefixUnion(branches, authoritative) {
|
|
|
40336
40567
|
}
|
|
40337
40568
|
var inviteCreatedEventPayloadSchema = external_exports.object({
|
|
40338
40569
|
action: external_exports.literal("invite.created"),
|
|
40339
|
-
invite_id:
|
|
40570
|
+
invite_id: uuidSchema27,
|
|
40340
40571
|
email: external_exports.string().email(),
|
|
40341
40572
|
role: memberRoleSchema,
|
|
40342
40573
|
member_type: memberTypeSchema,
|
|
40343
40574
|
access_profile: memberAccessProfileSchema,
|
|
40344
40575
|
aicos_access_scope: aicosAccessScopeSchema,
|
|
40345
|
-
invited_by:
|
|
40576
|
+
invited_by: uuidSchema27
|
|
40346
40577
|
}).strict();
|
|
40347
40578
|
var inviteRevokedEventPayloadSchema = external_exports.object({
|
|
40348
40579
|
action: external_exports.literal("invite.revoked"),
|
|
40349
|
-
invite_id:
|
|
40350
|
-
revoked_by:
|
|
40580
|
+
invite_id: uuidSchema27,
|
|
40581
|
+
revoked_by: uuidSchema27
|
|
40351
40582
|
}).strict();
|
|
40352
40583
|
var inviteAcceptedEventPayloadSchema = external_exports.object({
|
|
40353
40584
|
action: external_exports.literal("invite.accepted"),
|
|
40354
|
-
invite_id:
|
|
40355
|
-
user_id:
|
|
40356
|
-
membership_id:
|
|
40357
|
-
linked_seat_ids: external_exports.array(
|
|
40585
|
+
invite_id: uuidSchema27,
|
|
40586
|
+
user_id: uuidSchema27,
|
|
40587
|
+
membership_id: uuidSchema27,
|
|
40588
|
+
linked_seat_ids: external_exports.array(uuidSchema27)
|
|
40358
40589
|
}).strict();
|
|
40359
40590
|
var inviteLifecycleEventPayloadSchema = external_exports.union([
|
|
40360
40591
|
inviteCreatedEventPayloadSchema,
|
|
@@ -40419,14 +40650,14 @@ var heldToolActionReplaySchema = external_exports.object({
|
|
|
40419
40650
|
}).strict();
|
|
40420
40651
|
|
|
40421
40652
|
// ../../packages/protocol/src/operating.ts
|
|
40422
|
-
var
|
|
40653
|
+
var uuidSchema28 = external_exports.string().uuid();
|
|
40423
40654
|
var taskListInputSchema = external_exports.object({}).strict();
|
|
40424
40655
|
var operatingTaskSchema = external_exports.object({
|
|
40425
|
-
id:
|
|
40656
|
+
id: uuidSchema28,
|
|
40426
40657
|
title: external_exports.string(),
|
|
40427
40658
|
description: external_exports.string().nullable(),
|
|
40428
|
-
from_seat_id:
|
|
40429
|
-
goal_id:
|
|
40659
|
+
from_seat_id: uuidSchema28.nullable(),
|
|
40660
|
+
goal_id: uuidSchema28.nullable(),
|
|
40430
40661
|
acceptance_criteria: external_exports.unknown(),
|
|
40431
40662
|
due_on: external_exports.string().nullable(),
|
|
40432
40663
|
status: external_exports.string()
|
|
@@ -40435,54 +40666,54 @@ var taskListOutputSchema = external_exports.object({
|
|
|
40435
40666
|
tasks: external_exports.array(operatingTaskSchema)
|
|
40436
40667
|
}).strict();
|
|
40437
40668
|
var taskAcceptInputSchema = external_exports.object({
|
|
40438
|
-
id:
|
|
40669
|
+
id: uuidSchema28
|
|
40439
40670
|
}).strict();
|
|
40440
40671
|
var taskConfirmProposalInputSchema = external_exports.object({
|
|
40441
|
-
id:
|
|
40672
|
+
id: uuidSchema28
|
|
40442
40673
|
}).strict();
|
|
40443
40674
|
var taskMutationOutputSchema = external_exports.object({
|
|
40444
40675
|
task: external_exports.object({
|
|
40445
|
-
id:
|
|
40676
|
+
id: uuidSchema28,
|
|
40446
40677
|
status: external_exports.string()
|
|
40447
40678
|
}).strict()
|
|
40448
40679
|
}).strict();
|
|
40449
40680
|
var taskDeclineInputSchema = external_exports.object({
|
|
40450
|
-
id:
|
|
40681
|
+
id: uuidSchema28,
|
|
40451
40682
|
reason: external_exports.string().min(1)
|
|
40452
40683
|
}).strict();
|
|
40453
40684
|
var taskDeclineOutputSchema = external_exports.object({
|
|
40454
40685
|
task: external_exports.object({
|
|
40455
|
-
id:
|
|
40686
|
+
id: uuidSchema28,
|
|
40456
40687
|
status: external_exports.string(),
|
|
40457
40688
|
decline_reason: external_exports.string()
|
|
40458
40689
|
}).strict()
|
|
40459
40690
|
}).strict();
|
|
40460
40691
|
var taskCompleteInputSchema = external_exports.object({
|
|
40461
|
-
id:
|
|
40692
|
+
id: uuidSchema28,
|
|
40462
40693
|
summary: external_exports.string().min(1),
|
|
40463
40694
|
artifacts: external_exports.unknown().optional()
|
|
40464
40695
|
}).strict();
|
|
40465
40696
|
var taskCompleteOutputSchema = external_exports.object({
|
|
40466
|
-
task_id:
|
|
40467
|
-
event_id:
|
|
40697
|
+
task_id: uuidSchema28,
|
|
40698
|
+
event_id: uuidSchema28,
|
|
40468
40699
|
type: external_exports.literal("handoff")
|
|
40469
40700
|
}).strict();
|
|
40470
40701
|
var statusRecordOutputSchema = external_exports.object({
|
|
40471
|
-
event_id:
|
|
40702
|
+
event_id: uuidSchema28,
|
|
40472
40703
|
type: external_exports.literal("status")
|
|
40473
40704
|
}).strict();
|
|
40474
40705
|
var frictionFileIssueInputSchema = issueEventPayloadSchema.extend({
|
|
40475
40706
|
source_key: external_exports.string().trim().min(1).max(200).optional()
|
|
40476
40707
|
}).strict();
|
|
40477
40708
|
var duplicateFrictionCandidateSchema = external_exports.object({
|
|
40478
|
-
issue_id:
|
|
40709
|
+
issue_id: uuidSchema28,
|
|
40479
40710
|
summary: external_exports.string().min(1),
|
|
40480
40711
|
// pg_trgm similarity in [0, 1]; higher is more similar.
|
|
40481
40712
|
similarity: external_exports.number().min(0).max(1)
|
|
40482
40713
|
}).strict();
|
|
40483
40714
|
var frictionFileIssueOutputSchema = external_exports.object({
|
|
40484
|
-
event_id:
|
|
40485
|
-
issue_id:
|
|
40715
|
+
event_id: uuidSchema28,
|
|
40716
|
+
issue_id: uuidSchema28,
|
|
40486
40717
|
type: external_exports.literal("issue"),
|
|
40487
40718
|
// DER-1522: likely-duplicate candidates detected before creation. Recommend,
|
|
40488
40719
|
// never block — filing always proceeds; empty when nothing crossed the
|
|
@@ -40496,12 +40727,12 @@ var workLogInputSchema = external_exports.object({
|
|
|
40496
40727
|
note: external_exports.string().min(1)
|
|
40497
40728
|
}).strict();
|
|
40498
40729
|
var workLogOutputSchema = external_exports.object({
|
|
40499
|
-
event_id:
|
|
40730
|
+
event_id: uuidSchema28,
|
|
40500
40731
|
type: external_exports.literal("task")
|
|
40501
40732
|
}).strict();
|
|
40502
40733
|
var escalationRaiseOutputSchema = external_exports.object({
|
|
40503
|
-
event_id:
|
|
40504
|
-
escalation_id:
|
|
40734
|
+
event_id: uuidSchema28,
|
|
40735
|
+
escalation_id: uuidSchema28,
|
|
40505
40736
|
type: external_exports.literal("escalation")
|
|
40506
40737
|
}).strict();
|
|
40507
40738
|
var deliverableKindSchema2 = external_exports.enum(["brief", "work_evidence", "artifact", "report", "other"]);
|
|
@@ -40560,7 +40791,7 @@ var deliverableRejectOutputSchema = external_exports.object({
|
|
|
40560
40791
|
}).strict();
|
|
40561
40792
|
|
|
40562
40793
|
// ../../packages/protocol/src/steward.ts
|
|
40563
|
-
var
|
|
40794
|
+
var uuidSchema29 = external_exports.string().uuid();
|
|
40564
40795
|
var escalationStatusSchema = external_exports.enum([
|
|
40565
40796
|
"open",
|
|
40566
40797
|
"approved",
|
|
@@ -40569,18 +40800,18 @@ var escalationStatusSchema = external_exports.enum([
|
|
|
40569
40800
|
]);
|
|
40570
40801
|
var stewardReplayActionSummarySchema = external_exports.object({
|
|
40571
40802
|
tool_name: external_exports.string(),
|
|
40572
|
-
run_id:
|
|
40803
|
+
run_id: uuidSchema29
|
|
40573
40804
|
}).strict();
|
|
40574
40805
|
var stewardProposedToolCallSchema = external_exports.object({
|
|
40575
40806
|
tool_name: external_exports.string(),
|
|
40576
40807
|
args_summary: external_exports.unknown()
|
|
40577
40808
|
}).strict();
|
|
40578
40809
|
var stewardEscalationSchema = external_exports.object({
|
|
40579
|
-
id:
|
|
40580
|
-
seat_id:
|
|
40810
|
+
id: uuidSchema29,
|
|
40811
|
+
seat_id: uuidSchema29,
|
|
40581
40812
|
seat_name: external_exports.string(),
|
|
40582
40813
|
seat_type: external_exports.enum(["human", "agent", "hybrid"]),
|
|
40583
|
-
steward_seat_id:
|
|
40814
|
+
steward_seat_id: uuidSchema29,
|
|
40584
40815
|
steward_seat_name: external_exports.string(),
|
|
40585
40816
|
reason: external_exports.string(),
|
|
40586
40817
|
// DER-1978 (S2): OPTIONAL short headline written at creation; null/absent when unset
|
|
@@ -40603,11 +40834,11 @@ var stewardEscalationSchema = external_exports.object({
|
|
|
40603
40834
|
proposed_tool_call: stewardProposedToolCallSchema.optional(),
|
|
40604
40835
|
recommended_action: external_exports.string().nullable(),
|
|
40605
40836
|
status: escalationStatusSchema,
|
|
40606
|
-
decided_by:
|
|
40837
|
+
decided_by: uuidSchema29.nullable(),
|
|
40607
40838
|
decided_by_name: external_exports.string().nullable(),
|
|
40608
40839
|
decided_at: external_exports.string().nullable(),
|
|
40609
40840
|
decision_note: external_exports.string().nullable(),
|
|
40610
|
-
issue_id:
|
|
40841
|
+
issue_id: uuidSchema29.nullable(),
|
|
40611
40842
|
created_at: external_exports.string(),
|
|
40612
40843
|
updated_at: external_exports.string()
|
|
40613
40844
|
}).strict();
|
|
@@ -40618,27 +40849,27 @@ var escalationListOutputSchema = external_exports.object({
|
|
|
40618
40849
|
escalations: external_exports.array(stewardEscalationSchema)
|
|
40619
40850
|
}).strict();
|
|
40620
40851
|
var escalationGetInputSchema = external_exports.object({
|
|
40621
|
-
id:
|
|
40852
|
+
id: uuidSchema29
|
|
40622
40853
|
}).strict();
|
|
40623
40854
|
var escalationGetOutputSchema = external_exports.object({
|
|
40624
40855
|
escalation: stewardEscalationSchema
|
|
40625
40856
|
}).strict();
|
|
40626
40857
|
var escalationResolveActionSchema = external_exports.enum(["approve", "convert_to_issue"]);
|
|
40627
40858
|
var escalationResolveInputSchema = external_exports.object({
|
|
40628
|
-
id:
|
|
40859
|
+
id: uuidSchema29,
|
|
40629
40860
|
action: escalationResolveActionSchema.optional(),
|
|
40630
40861
|
rationale: external_exports.string().trim().min(1).optional()
|
|
40631
40862
|
}).strict();
|
|
40632
40863
|
var escalationRejectInputSchema = external_exports.object({
|
|
40633
|
-
id:
|
|
40864
|
+
id: uuidSchema29,
|
|
40634
40865
|
rationale: external_exports.string().trim().min(1).optional()
|
|
40635
40866
|
}).strict();
|
|
40636
40867
|
var escalationDecisionOutputSchema = external_exports.object({
|
|
40637
|
-
escalation_id:
|
|
40868
|
+
escalation_id: uuidSchema29,
|
|
40638
40869
|
status: escalationStatusSchema,
|
|
40639
|
-
decision_id:
|
|
40640
|
-
decided_by:
|
|
40641
|
-
issue_id:
|
|
40870
|
+
decision_id: uuidSchema29,
|
|
40871
|
+
decided_by: uuidSchema29,
|
|
40872
|
+
issue_id: uuidSchema29.nullable(),
|
|
40642
40873
|
// DER-1478: true when the resolved escalation carries a durable replay_action
|
|
40643
40874
|
// (an approval-gated connector write) that the approvals path should actuate
|
|
40644
40875
|
// after this decision is recorded. Omitted (not false) for non-connector
|
|
@@ -40819,7 +41050,7 @@ var workDetailsSchemas = {
|
|
|
40819
41050
|
};
|
|
40820
41051
|
|
|
40821
41052
|
// ../../packages/protocol/src/agent-grant-intervention.ts
|
|
40822
|
-
var
|
|
41053
|
+
var uuidSchema30 = external_exports.string().uuid();
|
|
40823
41054
|
var agentGrantBlockerKindSchema = external_exports.enum([
|
|
40824
41055
|
"rost_capability",
|
|
40825
41056
|
"os_permission",
|
|
@@ -40836,16 +41067,16 @@ var agentGrantInterventionStatusSchema = external_exports.enum([
|
|
|
40836
41067
|
]);
|
|
40837
41068
|
var agentGrantKindSchema = external_exports.enum(["allow_once", "permanent"]);
|
|
40838
41069
|
var agentGrantInterventionSchema = external_exports.object({
|
|
40839
|
-
id:
|
|
40840
|
-
seat_id:
|
|
41070
|
+
id: uuidSchema30,
|
|
41071
|
+
seat_id: uuidSchema30,
|
|
40841
41072
|
seat_name: external_exports.string().nullable(),
|
|
40842
|
-
agent_id:
|
|
41073
|
+
agent_id: uuidSchema30.nullable(),
|
|
40843
41074
|
// The source blocked attempt (audit link); null once the run is retention-purged.
|
|
40844
|
-
run_id:
|
|
41075
|
+
run_id: uuidSchema30.nullable(),
|
|
40845
41076
|
// The runner the blocker lives on, for os_permission repairs ("Open on Runner").
|
|
40846
|
-
runner_id:
|
|
41077
|
+
runner_id: uuidSchema30.nullable(),
|
|
40847
41078
|
// The linked continuation attempt, populated when a continuation is enqueued.
|
|
40848
|
-
continuation_run_id:
|
|
41079
|
+
continuation_run_id: uuidSchema30.nullable(),
|
|
40849
41080
|
blocker_kind: agentGrantBlockerKindSchema,
|
|
40850
41081
|
status: agentGrantInterventionStatusSchema,
|
|
40851
41082
|
// The specific capability/scope requested (e.g. "gmail.send"), when applicable.
|
|
@@ -40860,7 +41091,7 @@ var agentGrantInterventionSchema = external_exports.object({
|
|
|
40860
41091
|
// True once the blocked attempt released its lease/compute (AC #2 clean termination).
|
|
40861
41092
|
compute_released: external_exports.boolean(),
|
|
40862
41093
|
grant_kind: agentGrantKindSchema.nullable(),
|
|
40863
|
-
decided_by:
|
|
41094
|
+
decided_by: uuidSchema30.nullable(),
|
|
40864
41095
|
decided_by_name: external_exports.string().nullable(),
|
|
40865
41096
|
decided_at: external_exports.string().nullable(),
|
|
40866
41097
|
expires_at: external_exports.string().nullable(),
|
|
@@ -40869,7 +41100,7 @@ var agentGrantInterventionSchema = external_exports.object({
|
|
|
40869
41100
|
}).strict();
|
|
40870
41101
|
var agentGrantInterventionListInputSchema = external_exports.object({
|
|
40871
41102
|
// Optional seat filter (a seat-scoped caller is additionally clamped to its own seat).
|
|
40872
|
-
seat_id:
|
|
41103
|
+
seat_id: uuidSchema30.optional(),
|
|
40873
41104
|
// When true, include decided/terminal records (declined/resumed/expired) too;
|
|
40874
41105
|
// by default only the actionable open blocked/granted records are returned.
|
|
40875
41106
|
include_decided: external_exports.boolean().optional()
|
|
@@ -40878,14 +41109,14 @@ var agentGrantInterventionListOutputSchema = external_exports.object({
|
|
|
40878
41109
|
interventions: external_exports.array(agentGrantInterventionSchema)
|
|
40879
41110
|
}).strict();
|
|
40880
41111
|
var agentGrantInterventionGetInputSchema = external_exports.object({
|
|
40881
|
-
id:
|
|
41112
|
+
id: uuidSchema30
|
|
40882
41113
|
}).strict();
|
|
40883
41114
|
var agentGrantInterventionGetOutputSchema = external_exports.object({
|
|
40884
41115
|
intervention: agentGrantInterventionSchema
|
|
40885
41116
|
}).strict();
|
|
40886
41117
|
var agentGrantInterventionDecideActionSchema = external_exports.enum(["grant", "decline"]);
|
|
40887
41118
|
var agentGrantInterventionDecideInputSchema = external_exports.object({
|
|
40888
|
-
intervention_id:
|
|
41119
|
+
intervention_id: uuidSchema30,
|
|
40889
41120
|
action: agentGrantInterventionDecideActionSchema,
|
|
40890
41121
|
// Defaults to allow_once. `permanent` never auto-widens — it returns
|
|
40891
41122
|
// requires_charter_resign so the surface routes the human to a Charter re-sign.
|
|
@@ -40897,12 +41128,12 @@ var agentGrantInterventionDecideInputSchema = external_exports.object({
|
|
|
40897
41128
|
rationale: external_exports.string().trim().min(1).max(2e3).optional()
|
|
40898
41129
|
}).strict();
|
|
40899
41130
|
var agentGrantInterventionDecideOutputSchema = external_exports.object({
|
|
40900
|
-
intervention_id:
|
|
41131
|
+
intervention_id: uuidSchema30,
|
|
40901
41132
|
status: agentGrantInterventionStatusSchema,
|
|
40902
|
-
continuation_run_id:
|
|
41133
|
+
continuation_run_id: uuidSchema30.nullable(),
|
|
40903
41134
|
// The human decision row written for a grant/decline (invariant #7). Null only
|
|
40904
41135
|
// when a permanent grant deferred to a Charter re-sign (no one-time decision made).
|
|
40905
|
-
decision_id:
|
|
41136
|
+
decision_id: uuidSchema30.nullable(),
|
|
40906
41137
|
// True when the human chose the permanent option — the surface must route to a
|
|
40907
41138
|
// Charter re-sign; no authority was widened by this call (invariant #10).
|
|
40908
41139
|
requires_charter_resign: external_exports.boolean(),
|
|
@@ -40916,12 +41147,12 @@ var agentGrantInterventionDecideOutputSchema = external_exports.object({
|
|
|
40916
41147
|
enqueue_failed: external_exports.boolean()
|
|
40917
41148
|
}).strict();
|
|
40918
41149
|
var agentGrantInterventionResumeInputSchema = external_exports.object({
|
|
40919
|
-
intervention_id:
|
|
41150
|
+
intervention_id: uuidSchema30
|
|
40920
41151
|
}).strict();
|
|
40921
41152
|
var agentGrantInterventionResumeOutputSchema = external_exports.object({
|
|
40922
|
-
intervention_id:
|
|
41153
|
+
intervention_id: uuidSchema30,
|
|
40923
41154
|
status: agentGrantInterventionStatusSchema,
|
|
40924
|
-
continuation_run_id:
|
|
41155
|
+
continuation_run_id: uuidSchema30.nullable(),
|
|
40925
41156
|
enqueue_failed: external_exports.boolean()
|
|
40926
41157
|
}).strict();
|
|
40927
41158
|
|
|
@@ -40939,7 +41170,7 @@ var eventTypes = [
|
|
|
40939
41170
|
"task"
|
|
40940
41171
|
];
|
|
40941
41172
|
var publicMessageTypes = ["status", "handoff", "escalation", "issue"];
|
|
40942
|
-
var
|
|
41173
|
+
var uuidSchema31 = external_exports.string().uuid();
|
|
40943
41174
|
var evidenceSchema2 = external_exports.array(external_exports.unknown());
|
|
40944
41175
|
var internalEventPayloadSchema = external_exports.record(external_exports.string(), external_exports.unknown()).refine((payload) => !Array.isArray(payload), "Internal event payload must be an object");
|
|
40945
41176
|
var handoffEventPayloadSchema = external_exports.object({
|
|
@@ -40949,24 +41180,24 @@ var handoffEventPayloadSchema = external_exports.object({
|
|
|
40949
41180
|
acceptance_criteria: external_exports.array(external_exports.string().min(1)),
|
|
40950
41181
|
due: external_exports.string().datetime({ offset: true })
|
|
40951
41182
|
}).strict(),
|
|
40952
|
-
to_seat_id:
|
|
41183
|
+
to_seat_id: uuidSchema31
|
|
40953
41184
|
}).strict();
|
|
40954
41185
|
var intakeEventPayloadSchema = external_exports.discriminatedUnion("action", [
|
|
40955
41186
|
external_exports.object({
|
|
40956
41187
|
action: external_exports.literal("uploaded"),
|
|
40957
|
-
document_id:
|
|
41188
|
+
document_id: uuidSchema31,
|
|
40958
41189
|
storage_ref: external_exports.string().min(1)
|
|
40959
41190
|
}).strict(),
|
|
40960
41191
|
external_exports.object({
|
|
40961
41192
|
action: external_exports.literal("parsed"),
|
|
40962
|
-
document_id:
|
|
41193
|
+
document_id: uuidSchema31,
|
|
40963
41194
|
mode: external_exports.enum(["source_tree", "function_first"]),
|
|
40964
41195
|
seat_count: external_exports.number().int().nonnegative(),
|
|
40965
41196
|
edge_count: external_exports.number().int().nonnegative()
|
|
40966
41197
|
}).strict(),
|
|
40967
41198
|
external_exports.object({
|
|
40968
41199
|
action: external_exports.literal("failed"),
|
|
40969
|
-
document_id:
|
|
41200
|
+
document_id: uuidSchema31,
|
|
40970
41201
|
reason: external_exports.string().min(1)
|
|
40971
41202
|
}).strict(),
|
|
40972
41203
|
external_exports.object({
|
|
@@ -41072,9 +41303,9 @@ var publicMessageTypeSchema = external_exports.enum(publicMessageTypes);
|
|
|
41072
41303
|
var eventEnvelopeBaseSchema = external_exports.object({
|
|
41073
41304
|
protocol: external_exports.literal(EVENT_PROTOCOL),
|
|
41074
41305
|
type: eventTypeSchema,
|
|
41075
|
-
seat_id:
|
|
41306
|
+
seat_id: uuidSchema31.nullable(),
|
|
41076
41307
|
occurred_at: external_exports.string().datetime({ offset: true }),
|
|
41077
|
-
goal_ancestry: external_exports.array(
|
|
41308
|
+
goal_ancestry: external_exports.array(uuidSchema31),
|
|
41078
41309
|
// DER-2381: optional so historical rows and every caller that hasn't been
|
|
41079
41310
|
// updated yet keep parsing — but every per-type writer envelope below
|
|
41080
41311
|
// extends THIS base and re-`.strict()`s, so adding it here propagates the
|
|
@@ -51820,7 +52051,7 @@ var referenceDocuments = [
|
|
|
51820
52051
|
order: 10,
|
|
51821
52052
|
title: "{{brand}} implementation method",
|
|
51822
52053
|
summary: "The staged operating-system setup path used by humans, CLI sessions, MCP clients, and in-app agents.",
|
|
51823
|
-
version: "2026-07-29.
|
|
52054
|
+
version: "2026-07-29.4",
|
|
51824
52055
|
public: true,
|
|
51825
52056
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
51826
52057
|
stages: ["company_setup", "graph_design", "charter_design", "staffing", "operating_rhythm"],
|
|
@@ -51833,6 +52064,7 @@ var referenceDocuments = [
|
|
|
51833
52064
|
"onboarding.create_invite",
|
|
51834
52065
|
"onboarding.setup",
|
|
51835
52066
|
"onboarding.rehearse",
|
|
52067
|
+
"onboarding.activate",
|
|
51836
52068
|
"onboarding.source_ingest",
|
|
51837
52069
|
"seat.create",
|
|
51838
52070
|
"seat.set_type",
|
|
@@ -51948,7 +52180,7 @@ The Compass is drafted, then activated by a human through supersession.
|
|
|
51948
52180
|
|
|
51949
52181
|
\`onboarding.setup\`, \`onboarding.finish\`, \`compass.approve_version\`, \`compass.reject_draft\`, and \`compass.set\` are \`human_required\`. \`onboarding.source_ingest\` is a bootstrap-safe \`none\` prerequisite that retains bounded source bytes encrypted under the exact tenant/run, computes its digest and canonical parser manifest server-side, and remains permanently outside Trusted and Full Operator. \`onboarding.setup\` is the one-approval composite apply: it freezes the complete plan and live proof at staging, then rechecks them and applies Compass, cycle, Responsibility Graph, Charters, staffing, goals, Signals/readings, Frictions, tasks, and Sync scope in one transaction. A failure rolls back the entire application and leaves the confirmation pending.
|
|
51950
52182
|
|
|
51951
|
-
After setup succeeds, call \`onboarding.rehearse\` with the exact setup application, expected setup digest/revision, and a caller idempotency key. This is the implementation principal's one bounded \`execute\` exception: it is ungated because it can run only the setup receipt's exact agents in the sandbox, with no schedule arming, go-live transition, credential access, source mutation, or external communication. It rechecks the current Charter manifest, pinned published Skill versions and content hashes, schedule, execution lane, and canonical configuration digest under the same tenant/run boundary. A complete batch returns an immutable terminal batch receipt plus one immutable per-agent receipt with nonzero checked counts, runtime run ids, bounded tool previews/manifest holds/errors, and \`passed\` or \`failed\` status. Same-key/same-configuration retry returns that terminal evidence; a changed configuration conflicts instead of silently reusing it. The rehearsal never returns an approval URL and never stages activation.
|
|
52183
|
+
After setup succeeds, call \`onboarding.rehearse\` with the exact setup application, expected setup digest/revision, and a caller idempotency key. This is the implementation principal's one bounded \`execute\` exception: it is ungated because it can run only the setup receipt's exact agents in the sandbox, with no schedule arming, go-live transition, credential access, source mutation, or external communication. It rechecks the current Charter manifest, pinned published Skill versions and content hashes, schedule, execution lane, and canonical configuration digest under the same tenant/run boundary. A complete batch returns an immutable terminal batch receipt plus one immutable per-agent receipt with nonzero checked counts, runtime run ids, bounded tool previews/manifest holds/errors, and \`passed\` or \`failed\` status. Same-key/same-configuration retry returns that terminal evidence; a changed configuration conflicts instead of silently reusing it. The rehearsal never returns an approval URL and never stages activation. The later, separate \`onboarding.activate\` command consumes that exact terminal batch and the unique run/configuration evidence for the setup receipt's complete agent set. It stages one owner approval whose durable card shows every agent, Seat, Charter/configuration digest, rehearsal run, effective lane/model, permissions, schedule, warnings, and the onboarding-completion effect. Approval rechecks the full projection, records one composite human decision, makes every agent live, arms eligible schedules, and completes onboarding atomically. Any stale or failed member rolls the transaction back; same-key retry returns the committed receipt without duplicating effects.
|
|
51952
52184
|
|
|
51953
52185
|
\`onboarding.advance_step\`, \`onboarding.create_invite\`, \`onboarding.attach_reference\`, \`compass.answer_gap\`, and drafting a Compass are \`none\` \u2014 none of them returns a pending confirmation. \`none\` is not the same as "agent-callable", though: \`onboarding.create_invite\` and \`compass.answer_gap\` record the human who ran them, so they run as a person, not from an agent session, while advancing a step, attaching a reference, drafting a Compass, and exact-run source ingestion are safe for the bootstrap agent. Approving a version (a supersession) is a human act. The agent drafts and surfaces the approve link. See the confirmations guide.
|
|
51954
52186
|
|
|
@@ -52403,11 +52635,11 @@ When operating through CLI or MCP, create fewer seats first and ask for confirma
|
|
|
52403
52635
|
order: 30,
|
|
52404
52636
|
title: "Charter design playbook",
|
|
52405
52637
|
summary: "How to draft strong Charters that work for human, agent, and hybrid seats.",
|
|
52406
|
-
version: "2026-07-
|
|
52638
|
+
version: "2026-07-29.1",
|
|
52407
52639
|
public: true,
|
|
52408
52640
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
52409
52641
|
stages: ["charter_design", "staffing"],
|
|
52410
|
-
relatedCommandIds: ["charter.draft", "charter.draft_all", "charter.update_draft", "charter.approve", "charter.skip", "charter.apply_seat_type_recommendation", "charter.sign_manifest", "charter.list", "charter.get", "confirmation.approve"],
|
|
52642
|
+
relatedCommandIds: ["charter.draft", "charter.draft_all", "charter.update_draft", "charter.approve", "charter.preview_signal_reconciliation", "charter.reconcile_signals", "charter.skip", "charter.apply_seat_type_recommendation", "charter.sign_manifest", "charter.list", "charter.get", "confirmation.approve"],
|
|
52411
52643
|
legal: {
|
|
52412
52644
|
publicRisk: "low",
|
|
52413
52645
|
notes: [
|
|
@@ -52465,6 +52697,14 @@ In the app, \`/charters\` is both a drafting queue and a governance library. It
|
|
|
52465
52697
|
|
|
52466
52698
|
Daily and weekly measurable rows can carry Signal metadata: unit, numeric target, direction, cadence, and source. When a human approves a Charter, those structured measurables materialize into tenant Signal definitions for that seat. Free-text, monthly, and quarterly measurable prose remains accountability text until a human converts it into a supported structured Signal or creates the Signal separately.
|
|
52467
52699
|
|
|
52700
|
+
## When a declared Signal already exists
|
|
52701
|
+
|
|
52702
|
+
Preview first. Approval requires an explicit choice for a declaration that COLLIDES with an active exact-name Signal and is not already linked to one: adopt it if it is already owned by the Charter Seat, move it if another Seat owns it, or deliberately create a second Signal. A declaration nothing matches is created automatically, and one already linked to a Signal takes no choice. Adoption and movement preserve the Signal ID, readings, and compatible goal bindings.
|
|
52703
|
+
|
|
52704
|
+
\`charter.preview_signal_reconciliation\` is the owner-only dry run: per declaration it reports whether the declaration is already linked, which existing Signals match its name, who owns them, how much reading history and how many goal links they carry, the action that fits, and what that action would cost. \`charter.reconcile_signals\` then approves the Charter carrying one explicit decision per COLLIDING, UNLINKED declaration, and takes the \`edit_revision\` the preview returned so a draft edited in between is refused rather than reconciled against a stale reading.
|
|
52705
|
+
|
|
52706
|
+
Both commands are owner-only. Ordinary \`charter.approve\` stays seat-scoped and cannot take ownership of another Seat's Signal: when a declared name collides, it refuses and says an owner must decide. A Signal that already sets the status of a goal owned by another Seat cannot be moved until that goal's status driver is rebound \u2014 informative goal indicators survive a move.
|
|
52707
|
+
|
|
52468
52708
|
## When to stop for confirmation
|
|
52469
52709
|
|
|
52470
52710
|
\`charter.approve\`, \`charter.skip\`, \`charter.apply_seat_type_recommendation\`, and \`charter.sign_manifest\` are \`human_required\`. Over MCP \`rost_approve_charter\` returns a pending confirmation, not an activation. Approving a Charter, signing a permission manifest, or expanding authority is a human act recorded against \`decided_by\`. An agent prepares the draft and surfaces the approve link; it does not approve. See the confirmations guide.
|
|
@@ -53080,7 +53320,7 @@ External connectors are being rolled out provider by provider, conservatively (r
|
|
|
53080
53320
|
order: 48,
|
|
53081
53321
|
title: "CLI and MCP installation guide",
|
|
53082
53322
|
summary: "Install the public CLI, register remote token-backed MCP clients, and find the full command and tool catalog.",
|
|
53083
|
-
version: "2026-07-
|
|
53323
|
+
version: "2026-07-29.2",
|
|
53084
53324
|
public: true,
|
|
53085
53325
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
53086
53326
|
stages: ["company_setup", "staffing"],
|
|
@@ -53772,6 +54012,7 @@ Several rows here are seat-operating commands (\`task.create\`, the \`signal.*\`
|
|
|
53772
54012
|
| \`rost_ingest_onboarding_source\` | \`onboarding.source_ingest\` | Retain one bounded encrypted onboarding source for the current implementation run or direct owner setup. | Tenant | Call with one source and its declared kind; use the returned logical source key in setup. |
|
|
53773
54013
|
| \`rost_apply_onboarding_setup\` | \`onboarding.setup\` | Stage one atomic company setup proposal for owner review without making agents live. | Tenant | Submit the complete normalized plan; expect one human confirmation. |
|
|
53774
54014
|
| \`rost_rehearse_onboarding_agents\` | \`onboarding.rehearse\` | Run the setup receipt's exact agents in a run-bound sandbox and return the complete immutable terminal batch plus per-agent evidence. It cannot activate agents, arm schedules, use credentials, mutate sources, send externally, or stage a confirmation. | Tenant | Inspect the live command contract, then pass the exact setup application, expected digest/revision, and idempotency key. A retry returns the same terminal evidence only when configuration is unchanged. |
|
|
54015
|
+
| \`rost_activate_onboarding_agents\` | \`onboarding.activate\` | Stage one complete owner approval for the setup receipt's exact all-passed agent set; approval activates the group and completes onboarding atomically. | Tenant | Pass the terminal batch receipt id plus every per-agent rehearsal run and configuration digest returned by \`onboarding.rehearse\`; expect one approval URL. |
|
|
53775
54016
|
| \`rost_onboard_resume\` | \`onboarding.resume\` | Return the machine-readable onboarding resume state (path choice, pending setup, next step). | Tenant | Call with \`{}\`. |
|
|
53776
54017
|
| \`rost_attach_reference_document\` | \`onboarding.attach_reference\` | Attach a company reference document (text/markdown) with title/kind/source so Compass and Charters can cite it. | Tenant | Call with \`text\`, a \`title\`, a \`kind\`, and a \`source\`. |
|
|
53777
54018
|
| \`rost_upload_org_context\` | \`onboarding.upload_context\` | Back-compat alias of \`onboarding.attach_reference\`. | Tenant | Prefer \`rost_attach_reference_document\`; same widened schema. |
|
|
@@ -53790,6 +54031,8 @@ Several rows here are seat-operating commands (\`task.create\`, the \`signal.*\`
|
|
|
53790
54031
|
| \`rost_update_charter_draft\` | \`charter.update_draft\` | Update a draft Charter document. | Seat or tenant-admin | Call with \`charter_version_id\` and the full \`doc\`. |
|
|
53791
54032
|
| \`rost_set_charter\` | \`charter.set\` | Create or replace a seat's draft Charter from a full document in one call. | Seat or tenant-admin | Call with \`seat_id\` and \`doc\`; \`approve\` activates it (human gate). |
|
|
53792
54033
|
| \`rost_approve_charter\` | \`charter.approve\` | Approve a draft Charter as a human owner. | Seat or tenant-admin | Expect confirmation when authority changes. |
|
|
54034
|
+
| \`rost_preview_charter_signal_reconciliation\` | \`charter.preview_signal_reconciliation\` | Owner-only dry run of how a draft Charter's declared Signals resolve against the Signals the company already tracks. | Tenant-admin | Call with \`charter_version_id\`; reads only, and returns the \`edit_revision\` to reconcile with. |
|
|
54035
|
+
| \`rost_reconcile_charter_signals\` | \`charter.reconcile_signals\` | Owner-only Charter approval carrying an explicit adopt / move / create decision per colliding Signal declaration. | Tenant-admin | Preview first; pass its \`edit_revision\` and one resolution per colliding, unlinked declaration. |
|
|
53793
54036
|
| \`rost_skip_charter_draft\` | \`charter.skip\` | Mark a Charter draft as skipped. | Seat or tenant-admin | Call only when a human defers the seat. |
|
|
53794
54037
|
| \`rost_apply_charter_seat_type_recommendation\` | \`charter.apply_seat_type_recommendation\` | Apply a Charter's seat-type recommendation. | Seat or tenant-admin | Call after reviewing the draft. |
|
|
53795
54038
|
| \`rost_sign_charter_manifest\` | \`charter.sign_manifest\` | Request human confirmation for a permission manifest. | Seat or tenant-admin | Use after tool permissions are reviewed. |
|
|
@@ -57747,6 +57990,7 @@ function parseSemver(value) {
|
|
|
57747
57990
|
|
|
57748
57991
|
// src/commands/onboarding.ts
|
|
57749
57992
|
var REHEARSE_USAGE = `${cliBrand.binName} onboard rehearse --setup-application-id <uuid> --expected-input-digest <sha256:digest> --expected-receipt-revision <integer> --idempotency-key <key> [--json]`;
|
|
57993
|
+
var ACTIVATE_USAGE = `${cliBrand.binName} onboard activate --setup-application-id <uuid> --expected-input-digest <sha256:digest> --expected-receipt-revision <integer> --terminal-rehearsal-batch-receipt-id <uuid> --rehearsal-runs '<json-array>' --configuration-digests '<json-array>' --idempotency-key <key> [--json]`;
|
|
57750
57994
|
var OnboardingUsageError = class extends Error {
|
|
57751
57995
|
constructor(message) {
|
|
57752
57996
|
super(message);
|
|
@@ -57787,14 +58031,19 @@ function parseOnboardingInvocation(args) {
|
|
|
57787
58031
|
action
|
|
57788
58032
|
};
|
|
57789
58033
|
}
|
|
57790
|
-
if (action !== "rehearse") {
|
|
58034
|
+
if (action !== "rehearse" && action !== "activate") {
|
|
57791
58035
|
throw new OnboardingUsageError(`Unknown onboard action: ${action ?? "(missing)"}`);
|
|
57792
58036
|
}
|
|
57793
58037
|
const allowed = /* @__PURE__ */ new Set([
|
|
57794
58038
|
"setup-application-id",
|
|
57795
58039
|
"expected-input-digest",
|
|
57796
58040
|
"expected-receipt-revision",
|
|
57797
|
-
"idempotency-key"
|
|
58041
|
+
"idempotency-key",
|
|
58042
|
+
...action === "activate" ? [
|
|
58043
|
+
"terminal-rehearsal-batch-receipt-id",
|
|
58044
|
+
"rehearsal-runs",
|
|
58045
|
+
"configuration-digests"
|
|
58046
|
+
] : []
|
|
57798
58047
|
]);
|
|
57799
58048
|
const values = /* @__PURE__ */ new Map();
|
|
57800
58049
|
let json2 = false;
|
|
@@ -57839,14 +58088,36 @@ function parseOnboardingInvocation(args) {
|
|
|
57839
58088
|
if (!Number.isSafeInteger(expectedReceiptRevision) || expectedReceiptRevision <= 0) {
|
|
57840
58089
|
throw new OnboardingUsageError("--expected-receipt-revision must be a positive integer.");
|
|
57841
58090
|
}
|
|
58091
|
+
const sharedBody = {
|
|
58092
|
+
setup_application_id: setupApplicationId,
|
|
58093
|
+
expected_input_digest: expectedInputDigest,
|
|
58094
|
+
expected_receipt_revision: expectedReceiptRevision,
|
|
58095
|
+
idempotency_key: idempotencyKey
|
|
58096
|
+
};
|
|
58097
|
+
if (action === "activate") {
|
|
58098
|
+
return {
|
|
58099
|
+
commandId: "onboarding.activate",
|
|
58100
|
+
body: {
|
|
58101
|
+
...sharedBody,
|
|
58102
|
+
terminal_rehearsal_batch_receipt_id: requiredValue2(
|
|
58103
|
+
"terminal-rehearsal-batch-receipt-id"
|
|
58104
|
+
),
|
|
58105
|
+
rehearsal_runs: parseJsonArrayFlag(
|
|
58106
|
+
"rehearsal-runs",
|
|
58107
|
+
requiredValue2("rehearsal-runs")
|
|
58108
|
+
),
|
|
58109
|
+
configuration_digests: parseJsonArrayFlag(
|
|
58110
|
+
"configuration-digests",
|
|
58111
|
+
requiredValue2("configuration-digests")
|
|
58112
|
+
)
|
|
58113
|
+
},
|
|
58114
|
+
json: json2,
|
|
58115
|
+
action
|
|
58116
|
+
};
|
|
58117
|
+
}
|
|
57842
58118
|
return {
|
|
57843
58119
|
commandId: "onboarding.rehearse",
|
|
57844
|
-
body:
|
|
57845
|
-
setup_application_id: setupApplicationId,
|
|
57846
|
-
expected_input_digest: expectedInputDigest,
|
|
57847
|
-
expected_receipt_revision: expectedReceiptRevision,
|
|
57848
|
-
idempotency_key: idempotencyKey
|
|
57849
|
-
},
|
|
58120
|
+
body: sharedBody,
|
|
57850
58121
|
json: json2,
|
|
57851
58122
|
action
|
|
57852
58123
|
};
|
|
@@ -57854,19 +58125,55 @@ function parseOnboardingInvocation(args) {
|
|
|
57854
58125
|
function onboardingUsage() {
|
|
57855
58126
|
return [
|
|
57856
58127
|
`Usage: ${cliBrand.binName} onboard status|resume [--json]`,
|
|
57857
|
-
` ${REHEARSE_USAGE}
|
|
58128
|
+
` ${REHEARSE_USAGE}`,
|
|
58129
|
+
` ${ACTIVATE_USAGE}`
|
|
57858
58130
|
].join("\n");
|
|
57859
58131
|
}
|
|
57860
58132
|
function formatOnboardingOutput(action, output) {
|
|
57861
58133
|
if (action === "rehearse") {
|
|
57862
58134
|
return formatRehearsalOutput(output);
|
|
57863
58135
|
}
|
|
58136
|
+
if (action === "activate") {
|
|
58137
|
+
return formatActivationOutput(output);
|
|
58138
|
+
}
|
|
57864
58139
|
const record2 = typeof output === "object" && output !== null ? output : {};
|
|
57865
58140
|
if (typeof record2.summary === "string") {
|
|
57866
58141
|
return record2.summary;
|
|
57867
58142
|
}
|
|
57868
58143
|
return JSON.stringify(output, null, 2);
|
|
57869
58144
|
}
|
|
58145
|
+
function parseJsonArrayFlag(flag, value) {
|
|
58146
|
+
try {
|
|
58147
|
+
const parsed = JSON.parse(value);
|
|
58148
|
+
if (!Array.isArray(parsed)) {
|
|
58149
|
+
throw new Error("not an array");
|
|
58150
|
+
}
|
|
58151
|
+
return parsed;
|
|
58152
|
+
} catch {
|
|
58153
|
+
throw new OnboardingUsageError(`--${flag} must be a valid JSON array.`);
|
|
58154
|
+
}
|
|
58155
|
+
}
|
|
58156
|
+
function formatActivationOutput(output) {
|
|
58157
|
+
const record2 = asRecord(output);
|
|
58158
|
+
const approveVia = asRecord(record2.approveVia);
|
|
58159
|
+
if (typeof approveVia.webUrl === "string") {
|
|
58160
|
+
return [
|
|
58161
|
+
"Onboarding activation approval is ready.",
|
|
58162
|
+
`Approve once: ${approveVia.webUrl}`
|
|
58163
|
+
].join("\n");
|
|
58164
|
+
}
|
|
58165
|
+
const receipt = asRecord(record2.receipt);
|
|
58166
|
+
const agents = Array.isArray(receipt.agents) ? receipt.agents : [];
|
|
58167
|
+
if (record2.status === "activated") {
|
|
58168
|
+
return [
|
|
58169
|
+
"Onboarding activation completed.",
|
|
58170
|
+
`Activation receipt: ${field(receipt, "activation_receipt_id")}`,
|
|
58171
|
+
`Agents live: ${agents.length} of ${agents.length}`,
|
|
58172
|
+
`Onboarding completed: ${field(receipt, "onboarding_completed_at")}`
|
|
58173
|
+
].join("\n");
|
|
58174
|
+
}
|
|
58175
|
+
return JSON.stringify(output, null, 2);
|
|
58176
|
+
}
|
|
57870
58177
|
function formatRehearsalOutput(output) {
|
|
57871
58178
|
const record2 = asRecord(output);
|
|
57872
58179
|
if (record2.status === "in_progress") {
|
|
@@ -58233,6 +58540,8 @@ var COMMAND_MANIFEST = [
|
|
|
58233
58540
|
{ "id": "charter.draft_all", "namespace": "charter", "action": "draft_all", "title": "Draft all charters", "description": "Draft Charters for every eligible seat in a tenant.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Draft Charters in onboarding order after the Responsibility Graph has enough seat clarity.", "example": {} },
|
|
58234
58541
|
{ "id": "charter.get", "namespace": "charter", "action": "get", "title": "Get Charter", "description": "Return a Charter version with its supersession history and latest dry-run status.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "charter_version_id", "flag": "charter-version-id", "type": "string", "required": true }], "hasComplexInput": false, "help": "Read a Charter with its supersession history and dry-run status before approving or signing a manifest." },
|
|
58235
58542
|
{ "id": "charter.list", "namespace": "charter", "action": "list", "title": "List Charters", "description": "List Charter versions in the tenant, optionally filtered by seat or status.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": false }, { "name": "status", "flag": "status", "type": "enum", "required": false, "enumValues": ["draft", "active", "superseded"] }], "hasComplexInput": false, "help": "List Charter versions to find the right draft or active version id before reading or amending it." },
|
|
58543
|
+
{ "id": "charter.preview_signal_reconciliation", "namespace": "charter", "action": "preview_signal_reconciliation", "title": "Preview Charter Signal reconciliation", "description": "Owner-only dry run: for each Signal a draft Charter declares, show whether it is already linked, which existing Signals match its name, who owns them, how much reading history and how many goal links they carry, the action that fits, and what it would cost. Reads only \u2014 nothing is changed. Approval needs an explicit choice only for a declaration that COLLIDES with an existing Signal and is not already linked: a declaration nothing matches is created automatically, and one already linked to a Signal takes no choice.", "requiredScope": "tenant_admin", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "charter_version_id", "flag": "charter-version-id", "type": "string", "required": true }], "hasComplexInput": false, "help": "Preview first. Approval requires an explicit choice when an exact-name active Signal exists: adopt it if it is already owned by the Charter Seat, move it if another Seat owns it, or deliberately create a second Signal. Adoption and movement preserve the Signal ID, readings, and compatible goal bindings." },
|
|
58544
|
+
{ "id": "charter.reconcile_signals", "namespace": "charter", "action": "reconcile_signals", "title": "Reconcile Charter Signals", "description": "Owner-only: approve a draft Charter with an explicit decision for each declared Signal that collides with one the company already tracks and is not already linked to one \u2014 adopt the existing Signal when this Seat owns it, move it to this Seat, or deliberately create a second one. Adoption and movement keep the Signal's id, its readings, and its compatible goal links. Preview first, and pass that preview's edit_revision.", "requiredScope": "tenant_admin", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "charter_version_id", "flag": "charter-version-id", "type": "string", "required": true }, { "name": "expected_edit_revision", "flag": "expected-edit-revision", "type": "integer", "required": true }, { "name": "apply_seat_type", "flag": "apply-seat-type", "type": "boolean", "required": false }], "hasComplexInput": true, "help": "Owner-only Charter approval carrying one explicit decision per COLLIDING, UNLINKED Signal declaration \u2014 a declaration nothing matches is created automatically, and an already-linked one takes no choice. Take the preview first and pass its edit_revision; adoption and movement keep the Signal's id, readings, and compatible goal bindings, and a cross-Seat status driver blocks a move." },
|
|
58236
58545
|
{ "id": "charter.set", "namespace": "charter", "action": "set", "title": "Set charter", "description": "Create or replace a seat's draft Charter from a full document in one call; approve activates it as a human owner.", "requiredScope": "seat", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }, { "name": "approve", "flag": "approve", "type": "boolean", "required": false }], "hasComplexInput": true, "help": "Create or replace a seat's draft Charter from a full document in one call; read the charter authoring deep-dive first. Approving activates the seat's contract and is a human decision.", "example": { "seat_id": "0190aaaa-aaaa-7aaa-8aaa-aaaaaaaaaaaa", "doc": { "payload_version": 1, "purpose": "AP intake clerk: draft accounts-payable invoice entries from inbound vendor emails for human review.", "accountabilities": [{ "title": "Draft every inbound invoice", "description": "Convert each inbound vendor invoice into a draft AP entry with the correct vendor, amount, and GL coding within one business day." }, { "title": "Flag discrepancies", "description": "Surface duplicate, mismatched, or out-of-policy invoices as Friction issues instead of drafting them silently." }], "decision_authority": { "autonomous": [{ "action": "Draft AP entries and propose GL coding from inbound invoices", "condition": "Allowed when the vendor is known and the amount is within the standard purchase range.", "rationale": "Drafting is reversible and reviewed by a human before posting.", "unanswered_boundary": false }], "approval": [{ "action": "Post an invoice or send any vendor-facing message", "condition": "Require explicit human approval before posting or sending.", "rationale": "Posting and sending are durable, money-moving actions.", "unanswered_boundary": false }], "escalate": [{ "action": "Unknown vendor, payment over the approval threshold, or a suspected duplicate", "condition": "Always escalate to the Steward before acting.", "rationale": "Conservative default for ambiguous, irreversible, or financial exposure.", "unanswered_boundary": true }] }, "escalation_rules": ["Escalate any invoice over $5,000 or from a vendor not already in the ledger.", "Escalate when an invoice appears to duplicate one already drafted or posted."], "measurables": [{ "name": "Invoices drafted within one business day", "target": "100%", "cadence": "weekly", "source": "agent" }, { "name": "Discrepancies caught before posting", "target": "\u2265 95%", "cadence": "monthly", "source": "human" }], "permission_manifest": [{ "tool": "ap.invoices.read", "scope": "Read inbound invoices and the vendor ledger.", "granted": true, "rationale": "Needed to draft entries from source invoices." }, { "tool": "email.draft", "scope": "Draft vendor replies for human review; never send.", "granted": true, "rationale": "Lets the seat prepare clarifications without taking a send action." }], "budget": { "monthly_usd": null, "approval_required_over_usd": 0, "notes": "No autonomous spend; any spend requires Steward approval until a budget is set." }, "unanswered_boundaries": ["Approval threshold for auto-posting", "Vendor onboarding authority"], "seat_type_recommendation": { "recommendation": "agent", "rationale": "The work is high-volume, rule-bound, and fully reviewable, which suits a draft-and-confirm agent under a human Steward.", "confidence": 0.8 } }, "approve": false } },
|
|
58237
58546
|
{ "id": "charter.show_markdown", "namespace": "charter", "action": "show_markdown", "title": "Show Charter as markdown", "description": "Compose a seat's active or latest Charter into a clean, human-skimmable markdown card for review.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }], "hasComplexInput": false, "help": "Render a seat's active or latest Charter as a clean markdown card to show your human a quick review." },
|
|
58238
58547
|
{ "id": "charter.sign_manifest", "namespace": "charter", "action": "sign_manifest", "title": "Sign charter manifest", "description": "Request human confirmation for a Charter permission manifest.", "requiredScope": "seat", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "charter_version_id", "flag": "charter-version-id", "type": "string", "required": true }], "hasComplexInput": false, "help": "Sign tool manifests only when the Charter explains why the tool is needed and how it is bounded." },
|
|
@@ -58328,6 +58637,7 @@ var COMMAND_MANIFEST = [
|
|
|
58328
58637
|
{ "id": "notification.settings.get", "namespace": "notification", "action": "settings.get", "title": "Get notification settings", "description": "Read tenant notification preferences (escalations, Sync brief, default channel).", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Read notification preferences before changing escalation or Sync brief delivery." },
|
|
58329
58638
|
{ "id": "notification.settings.update", "namespace": "notification", "action": "settings.update", "title": "Update notification settings", "description": "Update tenant notification preferences.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "escalations_enabled", "flag": "escalations-enabled", "type": "boolean", "required": false }, { "name": "sync_brief_enabled", "flag": "sync-brief-enabled", "type": "boolean", "required": false }, { "name": "default_channel", "flag": "default-channel", "type": "enum", "required": false, "enumValues": ["slack", "email", "in_app"] }], "hasComplexInput": false, "help": "Update notification preferences for escalations, Sync briefs, and the default channel." },
|
|
58330
58639
|
{ "id": "notification.test", "namespace": "notification", "action": "test", "title": "Send test notification", "description": "Emit an in-app test notification to the acting human to verify delivery is wired.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Send an in-app test notification to confirm the delivery path is wired." },
|
|
58640
|
+
{ "id": "onboarding.activate", "namespace": "onboarding", "action": "activate", "title": "Activate onboarding agents", "description": "Stage one owner approval to activate every agent in an applied onboarding receipt and complete onboarding atomically.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "idempotency_key", "flag": "idempotency-key", "type": "string", "required": true }, { "name": "setup_application_id", "flag": "setup-application-id", "type": "string", "required": true }, { "name": "expected_input_digest", "flag": "expected-input-digest", "type": "string", "required": true }, { "name": "expected_receipt_revision", "flag": "expected-receipt-revision", "type": "integer", "required": true }, { "name": "terminal_rehearsal_batch_receipt_id", "flag": "terminal-rehearsal-batch-receipt-id", "type": "string", "required": true }], "hasComplexInput": true, "help": "After a terminal all-passed onboarding rehearsal, submit its exact batch receipt, per-agent run IDs, and configuration digests. One owner approval activates the entire group and completes onboarding atomically." },
|
|
58331
58641
|
{ "id": "onboarding.advance_step", "namespace": "onboarding", "action": "advance_step", "title": "Advance onboarding step", "description": "Persist the current onboarding step after server-side validation.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "step", "flag": "step", "type": "string", "required": true }, { "name": "completed", "flag": "completed", "type": "boolean", "required": false }], "hasComplexInput": true, "help": "Advance onboarding only after the current setup step is represented in the tenant state." },
|
|
58332
58642
|
{ "id": "onboarding.attach_reference", "namespace": "onboarding", "action": "attach_reference", "title": "Attach reference document", "description": "Attach a company reference document (text/markdown) so Compass and Charters can cite it. Reference-only \u2014 it does not build a Compass; convert each meaningful doc to markdown and attach it with a title, kind, and source.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "text", "flag": "text", "type": "string", "required": true }, { "name": "filename", "flag": "filename", "type": "string", "required": false }, { "name": "mime_type", "flag": "mime-type", "type": "enum", "required": false, "enumValues": ["text/plain", "text/markdown", "text/csv"] }, { "name": "title", "flag": "title", "type": "string", "required": false }, { "name": "kind", "flag": "kind", "type": "enum", "required": false, "enumValues": ["plan", "financial", "org_chart", "process"] }, { "name": "source", "flag": "source", "type": "string", "required": false }], "hasComplexInput": false, "help": "Convert each meaningful company doc to markdown and attach it as a reference (title, kind, source) so Compass and Charters can cite it; this attaches a reference, it does not build a Compass \u2014 author Compass directly.", "example": { "text": "# Company handbook\n\nWe build precision components for the aerospace supply chain.", "filename": "handbook.md", "mime_type": "text/markdown", "title": "Company handbook", "kind": "plan", "source": "handbook/overview.md" } },
|
|
58333
58643
|
{ "id": "onboarding.create_invite", "namespace": "onboarding", "action": "create_invite", "title": "Create onboarding invite", "description": "Create a pending invite for an onboarding team member.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "email", "flag": "email", "type": "string", "required": true }, { "name": "role", "flag": "role", "type": "enum", "required": false, "enumValues": ["owner", "admin", "steward", "member"] }], "hasComplexInput": true, "help": "Invites should give humans access to the company without assigning work directly to people instead of seats." },
|
|
@@ -67424,7 +67734,7 @@ async function main(argv = process.argv.slice(2), options = {}) {
|
|
|
67424
67734
|
allowDevelopmentAppUrl: process.env[allowInsecureAppUrlEnv] === "1"
|
|
67425
67735
|
});
|
|
67426
67736
|
}
|
|
67427
|
-
if (command === "onboard" && (args[0] === "status" || args[0] === "resume" || args[0] === "rehearse")) {
|
|
67737
|
+
if (command === "onboard" && (args[0] === "status" || args[0] === "resume" || args[0] === "rehearse" || args[0] === "activate")) {
|
|
67428
67738
|
let implCredential = null;
|
|
67429
67739
|
try {
|
|
67430
67740
|
implCredential = await createImplementationCredentialStore().read();
|