@wave-ai-os/wave-cli 0.1.86 → 0.1.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +909 -328
- package/dist/index.js +906 -325
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
// src/index.ts
|
|
5
5
|
var import_commander3 = require("commander");
|
|
6
|
-
var
|
|
6
|
+
var import_zod22 = require("zod");
|
|
7
7
|
|
|
8
8
|
// src/cli.ts
|
|
9
9
|
var import_commander2 = require("commander");
|
|
@@ -1165,6 +1165,8 @@ var RESOURCE_QUERY_FIELDS = {
|
|
|
1165
1165
|
"archivedAt",
|
|
1166
1166
|
"organizationId",
|
|
1167
1167
|
"memberId",
|
|
1168
|
+
"member",
|
|
1169
|
+
"assignee",
|
|
1168
1170
|
"creatorId",
|
|
1169
1171
|
"projectId",
|
|
1170
1172
|
"projectSlug",
|
|
@@ -1212,6 +1214,7 @@ var RESOURCE_QUERY_FIELDS = {
|
|
|
1212
1214
|
"role",
|
|
1213
1215
|
"status",
|
|
1214
1216
|
"title",
|
|
1217
|
+
"rolePurpose",
|
|
1215
1218
|
"firstName",
|
|
1216
1219
|
"lastName",
|
|
1217
1220
|
"createdAt",
|
|
@@ -1662,7 +1665,8 @@ function defaultQuerySelectionSet(field, isList) {
|
|
|
1662
1665
|
const canonicalField = RESOURCE_FIELD_ALIASES[field] ?? field;
|
|
1663
1666
|
const explicitFields = RESOURCE_QUERY_FIELDS[canonicalField];
|
|
1664
1667
|
if (explicitFields) {
|
|
1665
|
-
const
|
|
1668
|
+
const detailFields = canonicalField === "smart_kpi" && !isList ? ["smartKpiMetrics { id date value }", "smartKpiGoals { id date value }"] : [];
|
|
1669
|
+
const attributes = explicitFields.length > 0 ? `attributes { ${Array.from(/* @__PURE__ */ new Set(["id", ...explicitFields, ...detailFields])).join(" ")} }` : "attributes";
|
|
1666
1670
|
if (isList) {
|
|
1667
1671
|
return `{ data { id type ${attributes} } count currentPage totalPages }`;
|
|
1668
1672
|
}
|
|
@@ -4038,7 +4042,7 @@ var projectPriorityValues = projectPrioritySchema.options.join(", ");
|
|
|
4038
4042
|
var projectCreateDataJsonHelp = buildDataJsonHelp("project", "create") ?? 'JSON object for project or {"project": {...}}';
|
|
4039
4043
|
var projectUpdateDataJsonHelp = buildDataJsonHelp("project", "update") ?? 'JSON object for project or {"project": {...}}';
|
|
4040
4044
|
function projectsIndexMinimalSelectionSet(includeProjectTypes = false) {
|
|
4041
|
-
return `{ count currentPage totalPages data { id type attributes { name slug status priority${includeProjectTypes ? " projectType" : ""} } } }`;
|
|
4045
|
+
return `{ count currentPage totalPages data { id type attributes { name slug status priority createdAt updatedAt${includeProjectTypes ? " projectType" : ""} } } }`;
|
|
4042
4046
|
}
|
|
4043
4047
|
var displayPreferenceAttributesSelectionSet = "attributes { id viewType favorite groupingField groupToggleState memberId focusMemberId focusTeamId displayableId displayableType preferenceType agendaItemId }";
|
|
4044
4048
|
var filterPreferenceAttributesSelectionSet = "attributes { id filterType filter memberId focusMemberId focusTeamId filterableId filterableType preferenceType agendaItemId }";
|
|
@@ -4485,6 +4489,22 @@ function registerMeetingCommands(program) {
|
|
|
4485
4489
|
isShow: true
|
|
4486
4490
|
});
|
|
4487
4491
|
});
|
|
4492
|
+
meetings.command("note-show").description("Read the authorized AI note context for a meeting").requiredOption("--id <id>").action(async (opts, cmd) => {
|
|
4493
|
+
const meetingId = idSchema5.parse(opts.id);
|
|
4494
|
+
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
4495
|
+
const organizationId = resolveOrganizationId(context.organizationId);
|
|
4496
|
+
await runGraphqlQueryCommand({
|
|
4497
|
+
command: "meetings.note-show",
|
|
4498
|
+
runtimeOptions: context.runtimeOptions,
|
|
4499
|
+
field: "meeting_note_by_meeting",
|
|
4500
|
+
variables: {
|
|
4501
|
+
organization_id: organizationId,
|
|
4502
|
+
meeting_id: meetingId
|
|
4503
|
+
},
|
|
4504
|
+
selectionSet: "{ answerContext }",
|
|
4505
|
+
isShow: true
|
|
4506
|
+
});
|
|
4507
|
+
});
|
|
4488
4508
|
meetings.command("notes").requiredOption("--id <id>").requiredOption("--content <content>").action(async (opts, cmd) => {
|
|
4489
4509
|
const id = idSchema5.parse(opts.id);
|
|
4490
4510
|
const notes = notesSchema.parse(opts.content);
|
|
@@ -4540,10 +4560,25 @@ function registerMeetingCommands(program) {
|
|
|
4540
4560
|
|
|
4541
4561
|
// src/commands/members.ts
|
|
4542
4562
|
var import_zod8 = require("zod");
|
|
4543
|
-
var idSchema6 = import_zod8.z.string().min(1);
|
|
4563
|
+
var idSchema6 = import_zod8.z.string().trim().min(1);
|
|
4544
4564
|
var createHelp3 = buildDataJsonHelp("member", "create") ?? 'JSON object for member or {"member": {...}}';
|
|
4545
4565
|
var updateHelp3 = buildDataJsonHelp("member", "update") ?? 'JSON object for member or {"member": {...}}';
|
|
4546
4566
|
var MEMBER_META_PROFILE_SELECTION = "{ id type memberId summary profile attributes { id memberId summary profile } }";
|
|
4567
|
+
var MEMBER_REFERENCE_RESOLUTION_SELECTION = `{
|
|
4568
|
+
status
|
|
4569
|
+
reasonCode
|
|
4570
|
+
organizationId
|
|
4571
|
+
reference
|
|
4572
|
+
eligibilityPolicy
|
|
4573
|
+
complete
|
|
4574
|
+
source
|
|
4575
|
+
asOf
|
|
4576
|
+
traceId
|
|
4577
|
+
receiptId
|
|
4578
|
+
memberId
|
|
4579
|
+
memberName
|
|
4580
|
+
candidates { memberId memberName status eligible }
|
|
4581
|
+
}`;
|
|
4547
4582
|
function parseStrictBooleanOption(value, optionName) {
|
|
4548
4583
|
if (typeof value === "boolean") {
|
|
4549
4584
|
return value;
|
|
@@ -4600,6 +4635,29 @@ function registerMemberCommands(program) {
|
|
|
4600
4635
|
command: "members",
|
|
4601
4636
|
field: "members"
|
|
4602
4637
|
});
|
|
4638
|
+
members.command("resolve").description("Resolve a member reference within the authenticated organization").requiredOption("--query <query>", "Member name or email reference").action(async (opts, cmd) => {
|
|
4639
|
+
const reference = idSchema6.parse(opts.query);
|
|
4640
|
+
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
4641
|
+
const organizationId = resolveOrganizationId(context.organizationId);
|
|
4642
|
+
await runGraphqlQueryCommand({
|
|
4643
|
+
command: "members.resolve",
|
|
4644
|
+
runtimeOptions: context.runtimeOptions,
|
|
4645
|
+
operationName: "MemberReferenceResolution",
|
|
4646
|
+
field: "member_reference_resolution",
|
|
4647
|
+
variables: normalizeGraphqlVariables2({
|
|
4648
|
+
organization_id: organizationId,
|
|
4649
|
+
reference,
|
|
4650
|
+
trace_id: context.runtimeOptions.requestId
|
|
4651
|
+
}),
|
|
4652
|
+
variableTypes: {
|
|
4653
|
+
organization_id: "ID!",
|
|
4654
|
+
reference: "String!",
|
|
4655
|
+
trace_id: "String"
|
|
4656
|
+
},
|
|
4657
|
+
selectionSet: MEMBER_REFERENCE_RESOLUTION_SELECTION,
|
|
4658
|
+
isShow: true
|
|
4659
|
+
});
|
|
4660
|
+
});
|
|
4603
4661
|
members.command("meta-profile").description("Read a member meta profile by member id").requiredOption("--member-id <memberId>", "Member id").requiredOption("--json", "Emit the stable JSON envelope").action(async (opts, cmd) => {
|
|
4604
4662
|
const memberId = idSchema6.parse(opts.memberId);
|
|
4605
4663
|
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
@@ -4668,10 +4726,69 @@ function registerMemberCommands(program) {
|
|
|
4668
4726
|
});
|
|
4669
4727
|
}
|
|
4670
4728
|
|
|
4671
|
-
// src/commands/
|
|
4729
|
+
// src/commands/resources.ts
|
|
4672
4730
|
var import_zod9 = require("zod");
|
|
4673
|
-
var
|
|
4674
|
-
|
|
4731
|
+
var resourceTypeSchema = import_zod9.z.enum([
|
|
4732
|
+
"project",
|
|
4733
|
+
"team",
|
|
4734
|
+
"agent",
|
|
4735
|
+
"automation",
|
|
4736
|
+
"file"
|
|
4737
|
+
]);
|
|
4738
|
+
var referenceSchema = import_zod9.z.string().trim().min(1);
|
|
4739
|
+
var RESOURCE_REFERENCE_RESOLUTION_SELECTION = `{
|
|
4740
|
+
status
|
|
4741
|
+
reasonCode
|
|
4742
|
+
organizationId
|
|
4743
|
+
resourceType
|
|
4744
|
+
reference
|
|
4745
|
+
eligibilityPolicy
|
|
4746
|
+
complete
|
|
4747
|
+
source
|
|
4748
|
+
asOf
|
|
4749
|
+
traceId
|
|
4750
|
+
receiptId
|
|
4751
|
+
resourceId
|
|
4752
|
+
resourceName
|
|
4753
|
+
candidates { resourceId resourceName resourceType status eligible }
|
|
4754
|
+
}`;
|
|
4755
|
+
function registerResourceCommands(program) {
|
|
4756
|
+
const resources = program.command("resources").description("Organization-scoped resource resolution");
|
|
4757
|
+
resources.command("resolve").description("Resolve a project, team, agent, automation, or file reference").requiredOption(
|
|
4758
|
+
"--type <type>",
|
|
4759
|
+
"Resource type: project, team, agent, automation, or file"
|
|
4760
|
+
).requiredOption("--query <query>", "Resource name or reference").action(async (opts, cmd) => {
|
|
4761
|
+
const resourceType = resourceTypeSchema.parse(opts.type);
|
|
4762
|
+
const reference = referenceSchema.parse(opts.query);
|
|
4763
|
+
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
4764
|
+
const organizationId = resolveOrganizationId(context.organizationId);
|
|
4765
|
+
await runGraphqlQueryCommand({
|
|
4766
|
+
command: "resources.resolve",
|
|
4767
|
+
runtimeOptions: context.runtimeOptions,
|
|
4768
|
+
operationName: "OrganizationResourceReferenceResolution",
|
|
4769
|
+
field: "organization_resource_reference_resolution",
|
|
4770
|
+
variables: normalizeGraphqlVariables2({
|
|
4771
|
+
organization_id: organizationId,
|
|
4772
|
+
resource_type: resourceType,
|
|
4773
|
+
reference,
|
|
4774
|
+
trace_id: context.runtimeOptions.requestId
|
|
4775
|
+
}),
|
|
4776
|
+
variableTypes: {
|
|
4777
|
+
organization_id: "ID!",
|
|
4778
|
+
resource_type: "String!",
|
|
4779
|
+
reference: "String!",
|
|
4780
|
+
trace_id: "String"
|
|
4781
|
+
},
|
|
4782
|
+
selectionSet: RESOURCE_REFERENCE_RESOLUTION_SELECTION,
|
|
4783
|
+
isShow: true
|
|
4784
|
+
});
|
|
4785
|
+
});
|
|
4786
|
+
}
|
|
4787
|
+
|
|
4788
|
+
// src/commands/skills.ts
|
|
4789
|
+
var import_zod10 = require("zod");
|
|
4790
|
+
var idSchema7 = import_zod10.z.string().min(1);
|
|
4791
|
+
var limitSchema = import_zod10.z.coerce.number().int().positive();
|
|
4675
4792
|
var SKILL_SELECTION = `{
|
|
4676
4793
|
id
|
|
4677
4794
|
type
|
|
@@ -4747,14 +4864,14 @@ function registerSkillCommands(program) {
|
|
|
4747
4864
|
}
|
|
4748
4865
|
|
|
4749
4866
|
// src/commands/issues.ts
|
|
4750
|
-
var
|
|
4751
|
-
var issueGroupIdSchema =
|
|
4752
|
-
var idSchema8 =
|
|
4753
|
-
var nameSchema =
|
|
4754
|
-
var issueTypeSchema =
|
|
4867
|
+
var import_zod11 = require("zod");
|
|
4868
|
+
var issueGroupIdSchema = import_zod11.z.string().min(1);
|
|
4869
|
+
var idSchema8 = import_zod11.z.string().min(1);
|
|
4870
|
+
var nameSchema = import_zod11.z.string().min(1);
|
|
4871
|
+
var issueTypeSchema = import_zod11.z.string().min(1).refine((value) => value === "short_term" || value === "long_term", {
|
|
4755
4872
|
message: "Invalid issue type. Use one of: short_term, long_term."
|
|
4756
4873
|
});
|
|
4757
|
-
var issueStatusSchema =
|
|
4874
|
+
var issueStatusSchema = import_zod11.z.string().min(1).refine((value) => value === "open" || value === "completed", {
|
|
4758
4875
|
message: "Invalid issue status. Use one of: open, completed."
|
|
4759
4876
|
});
|
|
4760
4877
|
var updateHelp4 = buildDataJsonHelp("issue", "update") ?? 'JSON object for issue or {"issue": {...}}';
|
|
@@ -5818,8 +5935,8 @@ function registerSystemToolCommands(program) {
|
|
|
5818
5935
|
}
|
|
5819
5936
|
|
|
5820
5937
|
// src/commands/teams.ts
|
|
5821
|
-
var
|
|
5822
|
-
var idSchema9 =
|
|
5938
|
+
var import_zod12 = require("zod");
|
|
5939
|
+
var idSchema9 = import_zod12.z.string().min(1);
|
|
5823
5940
|
function registerTeamCommands(program) {
|
|
5824
5941
|
const teams = program.command("teams").description("Team operations");
|
|
5825
5942
|
teams.command("list").option("--page <page>").option("--per <per>").action(async (opts, cmd) => {
|
|
@@ -5885,8 +6002,8 @@ function registerTeamCommands(program) {
|
|
|
5885
6002
|
}
|
|
5886
6003
|
|
|
5887
6004
|
// src/commands/organizations.ts
|
|
5888
|
-
var
|
|
5889
|
-
var idSchema10 =
|
|
6005
|
+
var import_zod13 = require("zod");
|
|
6006
|
+
var idSchema10 = import_zod13.z.string().min(1);
|
|
5890
6007
|
function isRecord3(value) {
|
|
5891
6008
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
5892
6009
|
}
|
|
@@ -6111,8 +6228,8 @@ function registerOrganizationCommands(program) {
|
|
|
6111
6228
|
}
|
|
6112
6229
|
|
|
6113
6230
|
// src/commands/foundation.ts
|
|
6114
|
-
var
|
|
6115
|
-
var idSchema11 =
|
|
6231
|
+
var import_zod14 = require("zod");
|
|
6232
|
+
var idSchema11 = import_zod14.z.string().min(1);
|
|
6116
6233
|
var STRATEGIC_PLAN_ALLOWED_UPDATE_KEYS = /* @__PURE__ */ new Set([
|
|
6117
6234
|
"published_at",
|
|
6118
6235
|
"profile",
|
|
@@ -6313,9 +6430,9 @@ function registerFoundationCommands(program) {
|
|
|
6313
6430
|
}
|
|
6314
6431
|
|
|
6315
6432
|
// src/commands/childEntities.ts
|
|
6316
|
-
var
|
|
6317
|
-
var idSchema12 =
|
|
6318
|
-
var jsonObjectSchema =
|
|
6433
|
+
var import_zod15 = require("zod");
|
|
6434
|
+
var idSchema12 = import_zod15.z.string().min(1);
|
|
6435
|
+
var jsonObjectSchema = import_zod15.z.record(import_zod15.z.string(), import_zod15.z.unknown());
|
|
6319
6436
|
var NOTE_DETAIL_FIELDS = [
|
|
6320
6437
|
"notes",
|
|
6321
6438
|
"hasNotes",
|
|
@@ -6739,9 +6856,9 @@ function registerChildEntityCommands(program) {
|
|
|
6739
6856
|
}
|
|
6740
6857
|
|
|
6741
6858
|
// src/commands/content.ts
|
|
6742
|
-
var
|
|
6743
|
-
var idSchema13 =
|
|
6744
|
-
var nonEmptyString =
|
|
6859
|
+
var import_zod16 = require("zod");
|
|
6860
|
+
var idSchema13 = import_zod16.z.string().min(1);
|
|
6861
|
+
var nonEmptyString = import_zod16.z.string().min(1);
|
|
6745
6862
|
var contentAttributesSelection = "attributes { id type name slug content firstChildSlug rootParentSlug status contentType lastEdited organizationId memberId focusMemberId focusTeamId teamId creatorId createdAt updatedAt childCount assignmentType contentableId contentableSlug contentableType votesTotal labelIds rootContentId parentContentId }";
|
|
6746
6863
|
function assertUpdateFields(params) {
|
|
6747
6864
|
if (!params.name && !params.content && !params.status) {
|
|
@@ -6929,9 +7046,9 @@ function registerContentCommands(program) {
|
|
|
6929
7046
|
}
|
|
6930
7047
|
|
|
6931
7048
|
// src/commands/markdownTree.ts
|
|
6932
|
-
var
|
|
6933
|
-
var nonEmptyString2 =
|
|
6934
|
-
var nonNegativeInt =
|
|
7049
|
+
var import_zod17 = require("zod");
|
|
7050
|
+
var nonEmptyString2 = import_zod17.z.string().min(1);
|
|
7051
|
+
var nonNegativeInt = import_zod17.z.coerce.number().int().min(0);
|
|
6935
7052
|
function addScopeOptions(command) {
|
|
6936
7053
|
return command.requiredOption("--tool-key <toolKey>").requiredOption("--node-key <nodeKey>").option("--parent-id <parentId>").option("--record-id <recordId>").option("--member-id <memberId>").option("--team-id <teamId>").option("--content-type <contentType>").option("--tree-view");
|
|
6937
7054
|
}
|
|
@@ -7096,7 +7213,7 @@ function registerMarkdownTreeCommands(program) {
|
|
|
7096
7213
|
}
|
|
7097
7214
|
|
|
7098
7215
|
// src/commands/navigation.ts
|
|
7099
|
-
var
|
|
7216
|
+
var import_zod18 = require("zod");
|
|
7100
7217
|
|
|
7101
7218
|
// src/internalOptions.ts
|
|
7102
7219
|
var INTERNAL_OPTIONS_KEY = "__waveInternalOptions";
|
|
@@ -7126,8 +7243,8 @@ function getInternalCliOptions(command) {
|
|
|
7126
7243
|
}
|
|
7127
7244
|
|
|
7128
7245
|
// src/commands/navigation.ts
|
|
7129
|
-
var nonEmpty =
|
|
7130
|
-
var nonNegativeInt2 =
|
|
7246
|
+
var nonEmpty = import_zod18.z.string().min(1);
|
|
7247
|
+
var nonNegativeInt2 = import_zod18.z.coerce.number().int().min(0);
|
|
7131
7248
|
var MIGRATED_BRANCHES = ["directory", "projects", "knowledge"];
|
|
7132
7249
|
function normalizeText(input) {
|
|
7133
7250
|
if (typeof input !== "string") return "";
|
|
@@ -7910,14 +8027,14 @@ function registerMutationCapabilityCommands(program) {
|
|
|
7910
8027
|
// src/commands/osmd.ts
|
|
7911
8028
|
var import_promises3 = require("fs/promises");
|
|
7912
8029
|
var import_node_path3 = require("path");
|
|
7913
|
-
var
|
|
8030
|
+
var import_zod19 = require("zod");
|
|
7914
8031
|
var import_commander = require("commander");
|
|
7915
8032
|
|
|
7916
8033
|
// src/operationManifest.ts
|
|
7917
8034
|
var import_node_crypto3 = require("crypto");
|
|
7918
8035
|
|
|
7919
8036
|
// src/version.ts
|
|
7920
|
-
var CLI_VERSION = "0.1.
|
|
8037
|
+
var CLI_VERSION = "0.1.87";
|
|
7921
8038
|
|
|
7922
8039
|
// src/operationMetadata.ts
|
|
7923
8040
|
var DISCOVERY_OPERATION_IDS = [
|
|
@@ -7945,6 +8062,8 @@ var DISCOVERY_OPERATION_IDS = [
|
|
|
7945
8062
|
"customers.examples",
|
|
7946
8063
|
"customers.schema",
|
|
7947
8064
|
"datasheets.examples",
|
|
8065
|
+
"data-pipeline.examples",
|
|
8066
|
+
"data-pipeline.schema",
|
|
7948
8067
|
"datasheets.schema",
|
|
7949
8068
|
"desktop-context.examples",
|
|
7950
8069
|
"desktop-context.schema",
|
|
@@ -8060,7 +8179,13 @@ var READ_OPERATION_IDS = [
|
|
|
8060
8179
|
"customers.show",
|
|
8061
8180
|
"datasheets.list",
|
|
8062
8181
|
"datasheets.open",
|
|
8182
|
+
"data-pipeline.execute-source-action",
|
|
8183
|
+
"data-pipeline.overview",
|
|
8184
|
+
"data-pipeline.source-actions",
|
|
8185
|
+
"data-pipeline.sources",
|
|
8063
8186
|
"datasheets.show",
|
|
8187
|
+
"desktop-context.activity",
|
|
8188
|
+
"desktop-context.member-statuses",
|
|
8064
8189
|
"desktop-context.recent",
|
|
8065
8190
|
"desktop-context.status",
|
|
8066
8191
|
"feedbacks.list",
|
|
@@ -8112,12 +8237,15 @@ var READ_OPERATION_IDS = [
|
|
|
8112
8237
|
"markdown-tree.root",
|
|
8113
8238
|
"markdown-tree.subtree",
|
|
8114
8239
|
"meetings.list",
|
|
8240
|
+
"meetings.note-show",
|
|
8115
8241
|
"meetings.search",
|
|
8116
8242
|
"meetings.show",
|
|
8117
8243
|
"members.list",
|
|
8118
8244
|
"members.meta-profile",
|
|
8245
|
+
"members.resolve",
|
|
8119
8246
|
"members.search",
|
|
8120
8247
|
"members.show",
|
|
8248
|
+
"resources.resolve",
|
|
8121
8249
|
"milestones.list",
|
|
8122
8250
|
"milestones.search",
|
|
8123
8251
|
"milestones.show",
|
|
@@ -8426,6 +8554,14 @@ var OPERATION_IDS_BY_CLASSIFICATION = {
|
|
|
8426
8554
|
auth: AUTH_OPERATION_IDS
|
|
8427
8555
|
};
|
|
8428
8556
|
var metadataByOperationId = /* @__PURE__ */ new Map();
|
|
8557
|
+
function assertDataPipelineReadOnlyRegistration(id, metadata) {
|
|
8558
|
+
if (!id.startsWith("data-pipeline.")) return;
|
|
8559
|
+
const isReadOnlyOperation = metadata.classification === "read" && metadata.atlasSafetyClass === "read_only" || metadata.classification === "discovery" && metadata.atlasSafetyClass === "discovery";
|
|
8560
|
+
if (isReadOnlyOperation && !metadata.requiresApproval && !metadata.machine.supportsPreview) {
|
|
8561
|
+
return;
|
|
8562
|
+
}
|
|
8563
|
+
throw new Error(`Data Pipeline operations must remain read-only: ${id}`);
|
|
8564
|
+
}
|
|
8429
8565
|
for (const [classification, operationIds] of Object.entries(OPERATION_IDS_BY_CLASSIFICATION)) {
|
|
8430
8566
|
for (const id of operationIds) {
|
|
8431
8567
|
if (metadataByOperationId.has(id)) {
|
|
@@ -8435,7 +8571,7 @@ for (const [classification, operationIds] of Object.entries(OPERATION_IDS_BY_CLA
|
|
|
8435
8571
|
if (DESTRUCTIVE_OPERATION_IDS.has(id) && classification !== "write") {
|
|
8436
8572
|
throw new Error(`Destructive Wave CLI operation must be a write: ${id}`);
|
|
8437
8573
|
}
|
|
8438
|
-
|
|
8574
|
+
const metadata = {
|
|
8439
8575
|
classification,
|
|
8440
8576
|
requiresApproval: classification === "write" && !DIRECT_MACHINE_WRITE_OPERATION_IDS.has(id),
|
|
8441
8577
|
atlasSafetyClass,
|
|
@@ -8445,7 +8581,9 @@ for (const [classification, operationIds] of Object.entries(OPERATION_IDS_BY_CLA
|
|
|
8445
8581
|
supportsExecute: true,
|
|
8446
8582
|
executionMode: "sync"
|
|
8447
8583
|
}
|
|
8448
|
-
}
|
|
8584
|
+
};
|
|
8585
|
+
assertDataPipelineReadOnlyRegistration(id, metadata);
|
|
8586
|
+
metadataByOperationId.set(id, metadata);
|
|
8449
8587
|
}
|
|
8450
8588
|
}
|
|
8451
8589
|
function registeredOperationMetadata(id) {
|
|
@@ -8607,15 +8745,15 @@ function buildOperationManifest(program) {
|
|
|
8607
8745
|
}
|
|
8608
8746
|
|
|
8609
8747
|
// src/commands/osmd.ts
|
|
8610
|
-
var sourceSchema =
|
|
8748
|
+
var sourceSchema = import_zod19.z.enum([
|
|
8611
8749
|
"canonical_osmd",
|
|
8612
8750
|
"agent_overlay",
|
|
8613
8751
|
"agent_wiki",
|
|
8614
8752
|
"thread_workspace"
|
|
8615
8753
|
]);
|
|
8616
|
-
var accessSchema =
|
|
8617
|
-
var ownerSchema =
|
|
8618
|
-
var suggestedActionSchema =
|
|
8754
|
+
var accessSchema = import_zod19.z.enum(["read_only", "read_write", "append_only"]).catch("read_write");
|
|
8755
|
+
var ownerSchema = import_zod19.z.enum(["system", "atlas"]);
|
|
8756
|
+
var suggestedActionSchema = import_zod19.z.enum([
|
|
8619
8757
|
"read",
|
|
8620
8758
|
"create",
|
|
8621
8759
|
"init",
|
|
@@ -8624,7 +8762,7 @@ var suggestedActionSchema = import_zod18.z.enum([
|
|
|
8624
8762
|
"forbidden",
|
|
8625
8763
|
"invalid_parent"
|
|
8626
8764
|
]).catch("update");
|
|
8627
|
-
var agentMarkdownErrorCodeSchema =
|
|
8765
|
+
var agentMarkdownErrorCodeSchema = import_zod19.z.enum([
|
|
8628
8766
|
"canonical_osmd_read_only",
|
|
8629
8767
|
"agent_parent_not_found",
|
|
8630
8768
|
"agent_file_not_found",
|
|
@@ -8635,9 +8773,9 @@ var agentMarkdownErrorCodeSchema = import_zod18.z.enum([
|
|
|
8635
8773
|
"invalid_agent_wiki_path"
|
|
8636
8774
|
]);
|
|
8637
8775
|
var agentMarkdownErrorCodeFieldSchema = agentMarkdownErrorCodeSchema.nullable().catch(null);
|
|
8638
|
-
var nonEmptyString3 =
|
|
8639
|
-
var nonNegativeInt3 =
|
|
8640
|
-
var positiveInt =
|
|
8776
|
+
var nonEmptyString3 = import_zod19.z.string().min(1);
|
|
8777
|
+
var nonNegativeInt3 = import_zod19.z.coerce.number().int().min(0);
|
|
8778
|
+
var positiveInt = import_zod19.z.coerce.number().int().min(1);
|
|
8641
8779
|
var supportedAgentOverlaySystemFiles = ["notes.md", "summary.md"];
|
|
8642
8780
|
var supportedWikiIndexFile = "index.md";
|
|
8643
8781
|
var supportedWikiLogFile = "log.md";
|
|
@@ -8653,20 +8791,20 @@ var supportedWikiControlledPatterns = supportedWikiControlledFolders.map(
|
|
|
8653
8791
|
);
|
|
8654
8792
|
var controlledWikiSlugPattern = /^[a-z0-9][a-z0-9-]*$/;
|
|
8655
8793
|
var agentMarkdownSlugPattern = /^[a-z0-9][a-z0-9-]*$/;
|
|
8656
|
-
var osmdSearchScopeSchema =
|
|
8794
|
+
var osmdSearchScopeSchema = import_zod19.z.enum([
|
|
8657
8795
|
"os-only",
|
|
8658
8796
|
"agent-overlay-only",
|
|
8659
8797
|
"agent-wiki-only",
|
|
8660
8798
|
"combined"
|
|
8661
8799
|
]);
|
|
8662
|
-
var osmdLintScopeSchema =
|
|
8800
|
+
var osmdLintScopeSchema = import_zod19.z.enum([
|
|
8663
8801
|
"combined",
|
|
8664
8802
|
"agent-overlay-only",
|
|
8665
8803
|
"agent-wiki-only"
|
|
8666
8804
|
]);
|
|
8667
|
-
var osmdMemoryQualityScopeSchema =
|
|
8668
|
-
var osmdIngestKindSchema =
|
|
8669
|
-
var osmdRawSourceTypeSchema =
|
|
8805
|
+
var osmdMemoryQualityScopeSchema = import_zod19.z.enum(["agent-overlay-only"]);
|
|
8806
|
+
var osmdIngestKindSchema = import_zod19.z.enum(["text", "file", "url", "transcript"]);
|
|
8807
|
+
var osmdRawSourceTypeSchema = import_zod19.z.enum([
|
|
8670
8808
|
"pasted_text",
|
|
8671
8809
|
"uploaded_markdown",
|
|
8672
8810
|
"uploaded_text",
|
|
@@ -8675,37 +8813,37 @@ var osmdRawSourceTypeSchema = import_zod18.z.enum([
|
|
|
8675
8813
|
"meeting_transcript",
|
|
8676
8814
|
"url"
|
|
8677
8815
|
]);
|
|
8678
|
-
var agentMarkdownFileSchema =
|
|
8816
|
+
var agentMarkdownFileSchema = import_zod19.z.preprocess(
|
|
8679
8817
|
normalizeAgentMarkdownJsonKeys,
|
|
8680
|
-
|
|
8681
|
-
path:
|
|
8818
|
+
import_zod19.z.object({
|
|
8819
|
+
path: import_zod19.z.string(),
|
|
8682
8820
|
source: sourceSchema,
|
|
8683
8821
|
access: accessSchema,
|
|
8684
8822
|
owner: ownerSchema,
|
|
8685
|
-
exists:
|
|
8686
|
-
canCreate:
|
|
8687
|
-
canUpdate:
|
|
8688
|
-
canAppend:
|
|
8689
|
-
wikiRole:
|
|
8690
|
-
formatVersion:
|
|
8691
|
-
createdAt:
|
|
8692
|
-
updatedAt:
|
|
8693
|
-
ingestedAt:
|
|
8694
|
-
lastSeenAt:
|
|
8695
|
-
canonicalParentUpdatedAt:
|
|
8696
|
-
parentRef:
|
|
8697
|
-
agentChildrenAllowed:
|
|
8823
|
+
exists: import_zod19.z.boolean(),
|
|
8824
|
+
canCreate: import_zod19.z.boolean(),
|
|
8825
|
+
canUpdate: import_zod19.z.boolean(),
|
|
8826
|
+
canAppend: import_zod19.z.boolean(),
|
|
8827
|
+
wikiRole: import_zod19.z.string().nullable().optional(),
|
|
8828
|
+
formatVersion: import_zod19.z.string().nullable().optional(),
|
|
8829
|
+
createdAt: import_zod19.z.string().nullable().optional(),
|
|
8830
|
+
updatedAt: import_zod19.z.string().nullable().optional(),
|
|
8831
|
+
ingestedAt: import_zod19.z.string().nullable().optional(),
|
|
8832
|
+
lastSeenAt: import_zod19.z.string().nullable().optional(),
|
|
8833
|
+
canonicalParentUpdatedAt: import_zod19.z.string().nullable().optional(),
|
|
8834
|
+
parentRef: import_zod19.z.string().nullable().optional(),
|
|
8835
|
+
agentChildrenAllowed: import_zod19.z.boolean(),
|
|
8698
8836
|
suggestedAction: suggestedActionSchema,
|
|
8699
8837
|
errorCode: agentMarkdownErrorCodeFieldSchema.optional(),
|
|
8700
|
-
content:
|
|
8701
|
-
url:
|
|
8702
|
-
workspaceId:
|
|
8703
|
-
fileId:
|
|
8704
|
-
name:
|
|
8705
|
-
displayName:
|
|
8706
|
-
contentSha:
|
|
8707
|
-
versionSha:
|
|
8708
|
-
mediaType:
|
|
8838
|
+
content: import_zod19.z.string().nullable().optional(),
|
|
8839
|
+
url: import_zod19.z.string().nullable().optional(),
|
|
8840
|
+
workspaceId: import_zod19.z.string().nullable().optional(),
|
|
8841
|
+
fileId: import_zod19.z.string().nullable().optional(),
|
|
8842
|
+
name: import_zod19.z.string().nullable().optional(),
|
|
8843
|
+
displayName: import_zod19.z.string().nullable().optional(),
|
|
8844
|
+
contentSha: import_zod19.z.string().nullable().optional(),
|
|
8845
|
+
versionSha: import_zod19.z.string().nullable().optional(),
|
|
8846
|
+
mediaType: import_zod19.z.string().nullable().optional()
|
|
8709
8847
|
}).transform((value) => ({
|
|
8710
8848
|
...value,
|
|
8711
8849
|
wikiRole: value.wikiRole ?? null,
|
|
@@ -8728,31 +8866,31 @@ var agentMarkdownFileSchema = import_zod18.z.preprocess(
|
|
|
8728
8866
|
mediaType: value.mediaType ?? null
|
|
8729
8867
|
}))
|
|
8730
8868
|
);
|
|
8731
|
-
var agentMarkdownFilesSchema =
|
|
8732
|
-
var agentMarkdownMutationDataSchema =
|
|
8869
|
+
var agentMarkdownFilesSchema = import_zod19.z.array(agentMarkdownFileSchema);
|
|
8870
|
+
var agentMarkdownMutationDataSchema = import_zod19.z.union([
|
|
8733
8871
|
agentMarkdownFileSchema,
|
|
8734
|
-
|
|
8872
|
+
import_zod19.z.object({ files: agentMarkdownFilesSchema })
|
|
8735
8873
|
]);
|
|
8736
|
-
var osmdSearchCandidateSchema =
|
|
8874
|
+
var osmdSearchCandidateSchema = import_zod19.z.preprocess(
|
|
8737
8875
|
normalizeAgentMarkdownJsonKeys,
|
|
8738
|
-
|
|
8739
|
-
path:
|
|
8876
|
+
import_zod19.z.object({
|
|
8877
|
+
path: import_zod19.z.string(),
|
|
8740
8878
|
source: sourceSchema,
|
|
8741
8879
|
access: accessSchema,
|
|
8742
8880
|
owner: ownerSchema,
|
|
8743
|
-
wikiRole:
|
|
8744
|
-
formatVersion:
|
|
8745
|
-
parentRef:
|
|
8746
|
-
exists:
|
|
8747
|
-
agentChildrenAllowed:
|
|
8748
|
-
title:
|
|
8749
|
-
label:
|
|
8750
|
-
snippet:
|
|
8751
|
-
rank:
|
|
8752
|
-
matchReason:
|
|
8753
|
-
toolKey:
|
|
8754
|
-
nodeKey:
|
|
8755
|
-
nodeKind:
|
|
8881
|
+
wikiRole: import_zod19.z.string().nullable().optional(),
|
|
8882
|
+
formatVersion: import_zod19.z.string().nullable().optional(),
|
|
8883
|
+
parentRef: import_zod19.z.string().nullable().optional(),
|
|
8884
|
+
exists: import_zod19.z.boolean(),
|
|
8885
|
+
agentChildrenAllowed: import_zod19.z.boolean(),
|
|
8886
|
+
title: import_zod19.z.string(),
|
|
8887
|
+
label: import_zod19.z.string(),
|
|
8888
|
+
snippet: import_zod19.z.string().nullable().optional(),
|
|
8889
|
+
rank: import_zod19.z.number().int(),
|
|
8890
|
+
matchReason: import_zod19.z.string().nullable().optional(),
|
|
8891
|
+
toolKey: import_zod19.z.string().nullable().optional(),
|
|
8892
|
+
nodeKey: import_zod19.z.string().nullable().optional(),
|
|
8893
|
+
nodeKind: import_zod19.z.string().nullable().optional()
|
|
8756
8894
|
}).transform((value) => ({
|
|
8757
8895
|
...value,
|
|
8758
8896
|
wikiRole: value.wikiRole ?? null,
|
|
@@ -8765,26 +8903,26 @@ var osmdSearchCandidateSchema = import_zod18.z.preprocess(
|
|
|
8765
8903
|
nodeKind: value.nodeKind ?? null
|
|
8766
8904
|
}))
|
|
8767
8905
|
);
|
|
8768
|
-
var osmdSearchResultSchema =
|
|
8906
|
+
var osmdSearchResultSchema = import_zod19.z.preprocess(
|
|
8769
8907
|
normalizeAgentMarkdownJsonKeys,
|
|
8770
|
-
|
|
8771
|
-
query:
|
|
8772
|
-
scope:
|
|
8773
|
-
count:
|
|
8774
|
-
candidates:
|
|
8908
|
+
import_zod19.z.object({
|
|
8909
|
+
query: import_zod19.z.string(),
|
|
8910
|
+
scope: import_zod19.z.string(),
|
|
8911
|
+
count: import_zod19.z.number().int().min(0),
|
|
8912
|
+
candidates: import_zod19.z.array(osmdSearchCandidateSchema)
|
|
8775
8913
|
})
|
|
8776
8914
|
);
|
|
8777
|
-
var osmdWikiLintIssueSchema =
|
|
8915
|
+
var osmdWikiLintIssueSchema = import_zod19.z.preprocess(
|
|
8778
8916
|
normalizeAgentMarkdownJsonKeys,
|
|
8779
|
-
|
|
8780
|
-
code:
|
|
8781
|
-
severity:
|
|
8782
|
-
path:
|
|
8783
|
-
source:
|
|
8784
|
-
parentRef:
|
|
8785
|
-
message:
|
|
8786
|
-
suggestedAction:
|
|
8787
|
-
canAutoFix:
|
|
8917
|
+
import_zod19.z.object({
|
|
8918
|
+
code: import_zod19.z.string(),
|
|
8919
|
+
severity: import_zod19.z.string(),
|
|
8920
|
+
path: import_zod19.z.string(),
|
|
8921
|
+
source: import_zod19.z.string().nullable().optional(),
|
|
8922
|
+
parentRef: import_zod19.z.string().nullable().optional(),
|
|
8923
|
+
message: import_zod19.z.string(),
|
|
8924
|
+
suggestedAction: import_zod19.z.string().nullable().optional(),
|
|
8925
|
+
canAutoFix: import_zod19.z.boolean()
|
|
8788
8926
|
}).transform((value) => ({
|
|
8789
8927
|
...value,
|
|
8790
8928
|
source: value.source ?? null,
|
|
@@ -8792,37 +8930,37 @@ var osmdWikiLintIssueSchema = import_zod18.z.preprocess(
|
|
|
8792
8930
|
suggestedAction: value.suggestedAction ?? null
|
|
8793
8931
|
}))
|
|
8794
8932
|
);
|
|
8795
|
-
var osmdWikiLintResultSchema =
|
|
8933
|
+
var osmdWikiLintResultSchema = import_zod19.z.preprocess(
|
|
8796
8934
|
normalizeAgentMarkdownJsonKeys,
|
|
8797
|
-
|
|
8798
|
-
status:
|
|
8799
|
-
summary:
|
|
8800
|
-
totalIssues:
|
|
8801
|
-
errors:
|
|
8802
|
-
warnings:
|
|
8803
|
-
suggestions:
|
|
8935
|
+
import_zod19.z.object({
|
|
8936
|
+
status: import_zod19.z.string(),
|
|
8937
|
+
summary: import_zod19.z.object({
|
|
8938
|
+
totalIssues: import_zod19.z.number().int().min(0),
|
|
8939
|
+
errors: import_zod19.z.number().int().min(0),
|
|
8940
|
+
warnings: import_zod19.z.number().int().min(0),
|
|
8941
|
+
suggestions: import_zod19.z.number().int().min(0)
|
|
8804
8942
|
}),
|
|
8805
|
-
issues:
|
|
8943
|
+
issues: import_zod19.z.array(osmdWikiLintIssueSchema)
|
|
8806
8944
|
})
|
|
8807
8945
|
);
|
|
8808
|
-
var nullableCountSchema =
|
|
8946
|
+
var nullableCountSchema = import_zod19.z.preprocess(
|
|
8809
8947
|
(value) => value === void 0 || value === null || value === "" ? null : value,
|
|
8810
|
-
|
|
8948
|
+
import_zod19.z.coerce.number().int().min(0).nullable()
|
|
8811
8949
|
).catch(null);
|
|
8812
|
-
var osmdMemoryQualityIssueSchema =
|
|
8950
|
+
var osmdMemoryQualityIssueSchema = import_zod19.z.preprocess(
|
|
8813
8951
|
normalizeAgentMarkdownJsonKeys,
|
|
8814
|
-
|
|
8815
|
-
code:
|
|
8816
|
-
issueCode:
|
|
8817
|
-
path:
|
|
8818
|
-
parentRef:
|
|
8819
|
-
dimension:
|
|
8820
|
-
evidence:
|
|
8821
|
-
evidenceSnippet:
|
|
8822
|
-
message:
|
|
8823
|
-
severity:
|
|
8824
|
-
suggestedAction:
|
|
8825
|
-
canAutoFix:
|
|
8952
|
+
import_zod19.z.object({
|
|
8953
|
+
code: import_zod19.z.string().nullable().optional(),
|
|
8954
|
+
issueCode: import_zod19.z.string().nullable().optional(),
|
|
8955
|
+
path: import_zod19.z.string().nullable().optional(),
|
|
8956
|
+
parentRef: import_zod19.z.string().nullable().optional(),
|
|
8957
|
+
dimension: import_zod19.z.string().nullable().optional(),
|
|
8958
|
+
evidence: import_zod19.z.string().nullable().optional(),
|
|
8959
|
+
evidenceSnippet: import_zod19.z.string().nullable().optional(),
|
|
8960
|
+
message: import_zod19.z.string().nullable().optional(),
|
|
8961
|
+
severity: import_zod19.z.string().nullable().optional(),
|
|
8962
|
+
suggestedAction: import_zod19.z.string().nullable().optional(),
|
|
8963
|
+
canAutoFix: import_zod19.z.boolean().nullable().optional()
|
|
8826
8964
|
}).passthrough().transform((value) => ({
|
|
8827
8965
|
...value,
|
|
8828
8966
|
code: value.code ?? value.issueCode ?? "unknown_issue",
|
|
@@ -8837,16 +8975,16 @@ var osmdMemoryQualityIssueSchema = import_zod18.z.preprocess(
|
|
|
8837
8975
|
canAutoFix: value.canAutoFix === true ? true : false
|
|
8838
8976
|
}))
|
|
8839
8977
|
);
|
|
8840
|
-
var osmdMemoryQualityOverlaySchema =
|
|
8978
|
+
var osmdMemoryQualityOverlaySchema = import_zod19.z.preprocess(
|
|
8841
8979
|
normalizeAgentMarkdownJsonKeys,
|
|
8842
|
-
|
|
8843
|
-
path:
|
|
8844
|
-
parentRef:
|
|
8845
|
-
status:
|
|
8846
|
-
score:
|
|
8847
|
-
overallScore:
|
|
8848
|
-
dimensions:
|
|
8849
|
-
issues:
|
|
8980
|
+
import_zod19.z.object({
|
|
8981
|
+
path: import_zod19.z.string().nullable().optional(),
|
|
8982
|
+
parentRef: import_zod19.z.string().nullable().optional(),
|
|
8983
|
+
status: import_zod19.z.string().nullable().optional(),
|
|
8984
|
+
score: import_zod19.z.union([import_zod19.z.number(), import_zod19.z.string()]).nullable().optional(),
|
|
8985
|
+
overallScore: import_zod19.z.union([import_zod19.z.number(), import_zod19.z.string()]).nullable().optional(),
|
|
8986
|
+
dimensions: import_zod19.z.unknown().nullable().optional(),
|
|
8987
|
+
issues: import_zod19.z.array(osmdMemoryQualityIssueSchema).optional()
|
|
8850
8988
|
}).passthrough().transform((value) => ({
|
|
8851
8989
|
...value,
|
|
8852
8990
|
path: value.path ?? null,
|
|
@@ -8858,9 +8996,9 @@ var osmdMemoryQualityOverlaySchema = import_zod18.z.preprocess(
|
|
|
8858
8996
|
issues: value.issues ?? []
|
|
8859
8997
|
}))
|
|
8860
8998
|
);
|
|
8861
|
-
var osmdMemoryQualitySummarySchema =
|
|
8999
|
+
var osmdMemoryQualitySummarySchema = import_zod19.z.preprocess(
|
|
8862
9000
|
normalizeAgentMarkdownJsonKeys,
|
|
8863
|
-
|
|
9001
|
+
import_zod19.z.object({
|
|
8864
9002
|
evaluatedCount: nullableCountSchema.optional(),
|
|
8865
9003
|
passCount: nullableCountSchema.optional(),
|
|
8866
9004
|
warnCount: nullableCountSchema.optional(),
|
|
@@ -8878,19 +9016,19 @@ var osmdMemoryQualitySummarySchema = import_zod18.z.preprocess(
|
|
|
8878
9016
|
failCount: value.failCount ?? value.failures ?? null
|
|
8879
9017
|
}))
|
|
8880
9018
|
);
|
|
8881
|
-
var osmdMemoryQualityResultSchema =
|
|
9019
|
+
var osmdMemoryQualityResultSchema = import_zod19.z.preprocess(
|
|
8882
9020
|
normalizeAgentMarkdownJsonKeys,
|
|
8883
|
-
|
|
8884
|
-
status:
|
|
8885
|
-
scope:
|
|
9021
|
+
import_zod19.z.object({
|
|
9022
|
+
status: import_zod19.z.string(),
|
|
9023
|
+
scope: import_zod19.z.string().nullable().optional(),
|
|
8886
9024
|
evaluatedCount: nullableCountSchema.optional(),
|
|
8887
9025
|
passCount: nullableCountSchema.optional(),
|
|
8888
9026
|
warnCount: nullableCountSchema.optional(),
|
|
8889
9027
|
failCount: nullableCountSchema.optional(),
|
|
8890
9028
|
summary: osmdMemoryQualitySummarySchema.optional(),
|
|
8891
|
-
weakestOverlays:
|
|
8892
|
-
issues:
|
|
8893
|
-
scores:
|
|
9029
|
+
weakestOverlays: import_zod19.z.array(osmdMemoryQualityOverlaySchema).optional(),
|
|
9030
|
+
issues: import_zod19.z.array(osmdMemoryQualityIssueSchema).optional(),
|
|
9031
|
+
scores: import_zod19.z.array(osmdMemoryQualityOverlaySchema).optional()
|
|
8894
9032
|
}).passthrough().transform((value) => {
|
|
8895
9033
|
const summary = isRecord5(value.summary) ? value.summary : null;
|
|
8896
9034
|
return {
|
|
@@ -8914,24 +9052,24 @@ function normalizeOsmdIngestFileRecordInput(value) {
|
|
|
8914
9052
|
}
|
|
8915
9053
|
return normalized;
|
|
8916
9054
|
}
|
|
8917
|
-
var osmdIngestFileRecordSchema =
|
|
9055
|
+
var osmdIngestFileRecordSchema = import_zod19.z.preprocess(
|
|
8918
9056
|
normalizeOsmdIngestFileRecordInput,
|
|
8919
|
-
|
|
8920
|
-
path:
|
|
8921
|
-
source:
|
|
8922
|
-
access:
|
|
8923
|
-
owner:
|
|
8924
|
-
parentRef:
|
|
8925
|
-
exists:
|
|
8926
|
-
canCreate:
|
|
8927
|
-
canUpdate:
|
|
8928
|
-
canAppend:
|
|
8929
|
-
wikiRole:
|
|
8930
|
-
formatVersion:
|
|
8931
|
-
createdAt:
|
|
8932
|
-
updatedAt:
|
|
8933
|
-
suggestedAction:
|
|
8934
|
-
errorCode:
|
|
9057
|
+
import_zod19.z.object({
|
|
9058
|
+
path: import_zod19.z.string(),
|
|
9059
|
+
source: import_zod19.z.string().nullable().optional(),
|
|
9060
|
+
access: import_zod19.z.string().nullable().optional(),
|
|
9061
|
+
owner: import_zod19.z.string().nullable().optional(),
|
|
9062
|
+
parentRef: import_zod19.z.string().nullable().optional(),
|
|
9063
|
+
exists: import_zod19.z.boolean().nullable().optional(),
|
|
9064
|
+
canCreate: import_zod19.z.boolean().nullable().optional(),
|
|
9065
|
+
canUpdate: import_zod19.z.boolean().nullable().optional(),
|
|
9066
|
+
canAppend: import_zod19.z.boolean().nullable().optional(),
|
|
9067
|
+
wikiRole: import_zod19.z.string().nullable().optional(),
|
|
9068
|
+
formatVersion: import_zod19.z.string().nullable().optional(),
|
|
9069
|
+
createdAt: import_zod19.z.string().nullable().optional(),
|
|
9070
|
+
updatedAt: import_zod19.z.string().nullable().optional(),
|
|
9071
|
+
suggestedAction: import_zod19.z.string().nullable().optional(),
|
|
9072
|
+
errorCode: import_zod19.z.string().nullable().optional()
|
|
8935
9073
|
}).passthrough().transform((value) => ({
|
|
8936
9074
|
...value,
|
|
8937
9075
|
source: value.source ?? null,
|
|
@@ -8950,17 +9088,17 @@ var osmdIngestFileRecordSchema = import_zod18.z.preprocess(
|
|
|
8950
9088
|
errorCode: value.errorCode ?? null
|
|
8951
9089
|
}))
|
|
8952
9090
|
);
|
|
8953
|
-
var osmdIngestResultSchema =
|
|
9091
|
+
var osmdIngestResultSchema = import_zod19.z.preprocess(
|
|
8954
9092
|
normalizeAgentMarkdownJsonKeys,
|
|
8955
|
-
|
|
8956
|
-
rawSourceId:
|
|
8957
|
-
sourceSummaryPath:
|
|
9093
|
+
import_zod19.z.object({
|
|
9094
|
+
rawSourceId: import_zod19.z.union([import_zod19.z.string(), import_zod19.z.number()]).nullable().optional(),
|
|
9095
|
+
sourceSummaryPath: import_zod19.z.string().nullable().optional(),
|
|
8958
9096
|
sourceSummaryFile: osmdIngestFileRecordSchema.nullable().optional(),
|
|
8959
|
-
slug:
|
|
8960
|
-
runLint:
|
|
8961
|
-
createdFiles:
|
|
8962
|
-
updatedFiles:
|
|
8963
|
-
skippedUpdates:
|
|
9097
|
+
slug: import_zod19.z.string().nullable().optional(),
|
|
9098
|
+
runLint: import_zod19.z.boolean().nullable().optional(),
|
|
9099
|
+
createdFiles: import_zod19.z.array(osmdIngestFileRecordSchema).optional(),
|
|
9100
|
+
updatedFiles: import_zod19.z.array(osmdIngestFileRecordSchema).optional(),
|
|
9101
|
+
skippedUpdates: import_zod19.z.array(import_zod19.z.unknown()).optional(),
|
|
8964
9102
|
lintResult: osmdWikiLintResultSchema.nullable().optional()
|
|
8965
9103
|
}).passthrough().transform((value) => ({
|
|
8966
9104
|
...value,
|
|
@@ -8975,37 +9113,37 @@ var osmdIngestResultSchema = import_zod18.z.preprocess(
|
|
|
8975
9113
|
lintResult: value.lintResult ?? null
|
|
8976
9114
|
}))
|
|
8977
9115
|
);
|
|
8978
|
-
var mutationPayloadSchema =
|
|
8979
|
-
ok:
|
|
8980
|
-
status:
|
|
8981
|
-
errorCode:
|
|
8982
|
-
data:
|
|
8983
|
-
errors:
|
|
9116
|
+
var mutationPayloadSchema = import_zod19.z.object({
|
|
9117
|
+
ok: import_zod19.z.boolean(),
|
|
9118
|
+
status: import_zod19.z.number(),
|
|
9119
|
+
errorCode: import_zod19.z.string().nullable().optional(),
|
|
9120
|
+
data: import_zod19.z.unknown().nullable().optional(),
|
|
9121
|
+
errors: import_zod19.z.unknown().nullable().optional()
|
|
8984
9122
|
});
|
|
8985
|
-
var markdownTreeNodeSchema =
|
|
8986
|
-
() =>
|
|
8987
|
-
toolKey:
|
|
8988
|
-
nodeKey:
|
|
8989
|
-
nodeKind:
|
|
8990
|
-
runtimeLabel:
|
|
8991
|
-
path:
|
|
9123
|
+
var markdownTreeNodeSchema = import_zod19.z.lazy(
|
|
9124
|
+
() => import_zod19.z.object({
|
|
9125
|
+
toolKey: import_zod19.z.string(),
|
|
9126
|
+
nodeKey: import_zod19.z.string(),
|
|
9127
|
+
nodeKind: import_zod19.z.string(),
|
|
9128
|
+
runtimeLabel: import_zod19.z.string(),
|
|
9129
|
+
path: import_zod19.z.string().nullable().optional().transform((value) => value ?? null),
|
|
8992
9130
|
source: sourceSchema,
|
|
8993
9131
|
access: accessSchema,
|
|
8994
9132
|
owner: ownerSchema,
|
|
8995
|
-
parentRef:
|
|
8996
|
-
agentChildrenAllowed:
|
|
8997
|
-
exists:
|
|
8998
|
-
resolvedScope:
|
|
8999
|
-
parentId:
|
|
9000
|
-
recordId:
|
|
9001
|
-
memberId:
|
|
9002
|
-
teamId:
|
|
9003
|
-
contentType:
|
|
9133
|
+
parentRef: import_zod19.z.string().nullable().optional().transform((value) => value ?? null),
|
|
9134
|
+
agentChildrenAllowed: import_zod19.z.boolean(),
|
|
9135
|
+
exists: import_zod19.z.boolean(),
|
|
9136
|
+
resolvedScope: import_zod19.z.object({
|
|
9137
|
+
parentId: import_zod19.z.string().nullable().optional().transform((value) => value ?? null),
|
|
9138
|
+
recordId: import_zod19.z.string().nullable().optional().transform((value) => value ?? null),
|
|
9139
|
+
memberId: import_zod19.z.string().nullable().optional().transform((value) => value ?? null),
|
|
9140
|
+
teamId: import_zod19.z.string().nullable().optional().transform((value) => value ?? null),
|
|
9141
|
+
contentType: import_zod19.z.string().nullable().optional().transform((value) => value ?? null)
|
|
9004
9142
|
}),
|
|
9005
|
-
isLeaf:
|
|
9006
|
-
treeView:
|
|
9007
|
-
details:
|
|
9008
|
-
children:
|
|
9143
|
+
isLeaf: import_zod19.z.boolean(),
|
|
9144
|
+
treeView: import_zod19.z.boolean(),
|
|
9145
|
+
details: import_zod19.z.unknown().nullable(),
|
|
9146
|
+
children: import_zod19.z.array(markdownTreeNodeSchema).optional().transform((value) => value ?? [])
|
|
9009
9147
|
})
|
|
9010
9148
|
);
|
|
9011
9149
|
var AGENT_MARKDOWN_FILE_SELECTION = `{
|
|
@@ -13932,14 +14070,14 @@ function registerMailCommands(program) {
|
|
|
13932
14070
|
}
|
|
13933
14071
|
|
|
13934
14072
|
// src/commands/phantom.ts
|
|
13935
|
-
var
|
|
13936
|
-
var nonNegativeInt4 =
|
|
13937
|
-
var nullableString =
|
|
13938
|
-
var idString =
|
|
13939
|
-
var nullableIdString =
|
|
14073
|
+
var import_zod20 = require("zod");
|
|
14074
|
+
var nonNegativeInt4 = import_zod20.z.coerce.number().int().min(0);
|
|
14075
|
+
var nullableString = import_zod20.z.string().nullable().optional().transform((value) => value ?? null);
|
|
14076
|
+
var idString = import_zod20.z.union([import_zod20.z.string(), import_zod20.z.number()]).transform((value) => String(value));
|
|
14077
|
+
var nullableIdString = import_zod20.z.union([import_zod20.z.string(), import_zod20.z.number()]).nullable().optional().transform(
|
|
13940
14078
|
(value) => value === void 0 || value === null ? null : String(value)
|
|
13941
14079
|
);
|
|
13942
|
-
var jsonObject =
|
|
14080
|
+
var jsonObject = import_zod20.z.record(import_zod20.z.string(), import_zod20.z.unknown());
|
|
13943
14081
|
var PHANTOM_LEDGER_INVENTORY_SELECTION = `{
|
|
13944
14082
|
schemaVersion
|
|
13945
14083
|
runsCount
|
|
@@ -14152,10 +14290,10 @@ var PHANTOM_LEDGER_KEY_ALIASES = {
|
|
|
14152
14290
|
content_hash: "contentHash",
|
|
14153
14291
|
observed_at: "observedAt"
|
|
14154
14292
|
};
|
|
14155
|
-
var phantomLedgerInventorySchema =
|
|
14293
|
+
var phantomLedgerInventorySchema = import_zod20.z.preprocess(
|
|
14156
14294
|
normalizePhantomLedgerKeys,
|
|
14157
|
-
|
|
14158
|
-
schemaVersion:
|
|
14295
|
+
import_zod20.z.object({
|
|
14296
|
+
schemaVersion: import_zod20.z.string(),
|
|
14159
14297
|
runsCount: nonNegativeInt4,
|
|
14160
14298
|
observationsCount: nonNegativeInt4,
|
|
14161
14299
|
candidatesCount: nonNegativeInt4,
|
|
@@ -14165,16 +14303,16 @@ var phantomLedgerInventorySchema = import_zod19.z.preprocess(
|
|
|
14165
14303
|
reportsCount: nonNegativeInt4
|
|
14166
14304
|
})
|
|
14167
14305
|
);
|
|
14168
|
-
var phantomRunSchema =
|
|
14306
|
+
var phantomRunSchema = import_zod20.z.preprocess(
|
|
14169
14307
|
normalizePhantomLedgerKeys,
|
|
14170
|
-
|
|
14308
|
+
import_zod20.z.object({
|
|
14171
14309
|
id: idString,
|
|
14172
14310
|
organizationId: idString,
|
|
14173
|
-
notificationId:
|
|
14311
|
+
notificationId: import_zod20.z.union([import_zod20.z.string(), import_zod20.z.number()]).nullable().optional().transform(
|
|
14174
14312
|
(value) => value === void 0 || value === null ? null : String(value)
|
|
14175
14313
|
),
|
|
14176
|
-
status:
|
|
14177
|
-
triggerType:
|
|
14314
|
+
status: import_zod20.z.string(),
|
|
14315
|
+
triggerType: import_zod20.z.string(),
|
|
14178
14316
|
startedAt: nullableString,
|
|
14179
14317
|
completedAt: nullableString,
|
|
14180
14318
|
scannedFileCount: nonNegativeInt4,
|
|
@@ -14184,163 +14322,163 @@ var phantomRunSchema = import_zod19.z.preprocess(
|
|
|
14184
14322
|
errorCount: nonNegativeInt4,
|
|
14185
14323
|
warningCount: nonNegativeInt4,
|
|
14186
14324
|
errorMessage: nullableString,
|
|
14187
|
-
dryRun:
|
|
14188
|
-
schemaVersion:
|
|
14325
|
+
dryRun: import_zod20.z.boolean(),
|
|
14326
|
+
schemaVersion: import_zod20.z.string(),
|
|
14189
14327
|
testRunId: nullableString,
|
|
14190
14328
|
idempotencyKey: nullableString,
|
|
14191
14329
|
ledgerMetadata: jsonObject.catch({}),
|
|
14192
|
-
createdAt:
|
|
14193
|
-
updatedAt:
|
|
14330
|
+
createdAt: import_zod20.z.string(),
|
|
14331
|
+
updatedAt: import_zod20.z.string()
|
|
14194
14332
|
})
|
|
14195
14333
|
);
|
|
14196
|
-
var phantomRunListItemSchema =
|
|
14334
|
+
var phantomRunListItemSchema = import_zod20.z.preprocess(
|
|
14197
14335
|
normalizePhantomLedgerKeys,
|
|
14198
|
-
|
|
14336
|
+
import_zod20.z.object({
|
|
14199
14337
|
id: idString,
|
|
14200
14338
|
organizationId: idString,
|
|
14201
|
-
status:
|
|
14202
|
-
triggerType:
|
|
14203
|
-
dryRun:
|
|
14204
|
-
schemaVersion:
|
|
14339
|
+
status: import_zod20.z.string(),
|
|
14340
|
+
triggerType: import_zod20.z.string(),
|
|
14341
|
+
dryRun: import_zod20.z.boolean(),
|
|
14342
|
+
schemaVersion: import_zod20.z.string(),
|
|
14205
14343
|
testRunId: nullableString,
|
|
14206
|
-
createdAt:
|
|
14207
|
-
updatedAt:
|
|
14344
|
+
createdAt: import_zod20.z.string(),
|
|
14345
|
+
updatedAt: import_zod20.z.string()
|
|
14208
14346
|
})
|
|
14209
14347
|
);
|
|
14210
|
-
var phantomReportSchema =
|
|
14348
|
+
var phantomReportSchema = import_zod20.z.preprocess(
|
|
14211
14349
|
normalizePhantomLedgerKeys,
|
|
14212
|
-
|
|
14350
|
+
import_zod20.z.object({
|
|
14213
14351
|
id: idString,
|
|
14214
14352
|
organizationId: idString,
|
|
14215
14353
|
phantomRunId: idString,
|
|
14216
|
-
status:
|
|
14217
|
-
reportType:
|
|
14218
|
-
schemaVersion:
|
|
14354
|
+
status: import_zod20.z.string(),
|
|
14355
|
+
reportType: import_zod20.z.string(),
|
|
14356
|
+
schemaVersion: import_zod20.z.string(),
|
|
14219
14357
|
markdownPath: nullableString,
|
|
14220
14358
|
payload: jsonObject.catch({}),
|
|
14221
14359
|
testRunId: nullableString,
|
|
14222
|
-
idempotencyKey:
|
|
14223
|
-
createdAt:
|
|
14224
|
-
updatedAt:
|
|
14360
|
+
idempotencyKey: import_zod20.z.string(),
|
|
14361
|
+
createdAt: import_zod20.z.string(),
|
|
14362
|
+
updatedAt: import_zod20.z.string()
|
|
14225
14363
|
})
|
|
14226
14364
|
);
|
|
14227
|
-
var phantomObservationSchema =
|
|
14365
|
+
var phantomObservationSchema = import_zod20.z.preprocess(
|
|
14228
14366
|
normalizePhantomLedgerKeys,
|
|
14229
|
-
|
|
14367
|
+
import_zod20.z.object({
|
|
14230
14368
|
id: idString,
|
|
14231
14369
|
organizationId: idString,
|
|
14232
14370
|
phantomRunId: idString,
|
|
14233
|
-
status:
|
|
14234
|
-
observationType:
|
|
14371
|
+
status: import_zod20.z.string(),
|
|
14372
|
+
observationType: import_zod20.z.string(),
|
|
14235
14373
|
targetType: nullableString,
|
|
14236
14374
|
targetId: nullableString,
|
|
14237
14375
|
sourceTable: nullableString,
|
|
14238
14376
|
sourceRecordId: nullableString,
|
|
14239
14377
|
sourceEventId: nullableString,
|
|
14240
14378
|
contentHash: nullableString,
|
|
14241
|
-
observedAt:
|
|
14242
|
-
confidence:
|
|
14379
|
+
observedAt: import_zod20.z.string(),
|
|
14380
|
+
confidence: import_zod20.z.coerce.number(),
|
|
14243
14381
|
payload: jsonObject.catch({}),
|
|
14244
|
-
schemaVersion:
|
|
14382
|
+
schemaVersion: import_zod20.z.string(),
|
|
14245
14383
|
testRunId: nullableString,
|
|
14246
|
-
idempotencyKey:
|
|
14247
|
-
createdAt:
|
|
14248
|
-
updatedAt:
|
|
14384
|
+
idempotencyKey: import_zod20.z.string(),
|
|
14385
|
+
createdAt: import_zod20.z.string(),
|
|
14386
|
+
updatedAt: import_zod20.z.string()
|
|
14249
14387
|
})
|
|
14250
14388
|
);
|
|
14251
|
-
var phantomCandidateSchema =
|
|
14389
|
+
var phantomCandidateSchema = import_zod20.z.preprocess(
|
|
14252
14390
|
normalizePhantomLedgerKeys,
|
|
14253
|
-
|
|
14391
|
+
import_zod20.z.object({
|
|
14254
14392
|
id: idString,
|
|
14255
14393
|
organizationId: idString,
|
|
14256
14394
|
phantomRunId: idString,
|
|
14257
14395
|
phantomObservationId: nullableString,
|
|
14258
|
-
status:
|
|
14259
|
-
candidateType:
|
|
14396
|
+
status: import_zod20.z.string(),
|
|
14397
|
+
candidateType: import_zod20.z.string(),
|
|
14260
14398
|
targetType: nullableString,
|
|
14261
14399
|
targetId: nullableString,
|
|
14262
14400
|
title: nullableString,
|
|
14263
|
-
dryRun:
|
|
14401
|
+
dryRun: import_zod20.z.boolean(),
|
|
14264
14402
|
payload: jsonObject.catch({}),
|
|
14265
|
-
approvalStatus:
|
|
14403
|
+
approvalStatus: import_zod20.z.string(),
|
|
14266
14404
|
approvedById: nullableIdString,
|
|
14267
14405
|
approvedAt: nullableString,
|
|
14268
14406
|
approvalSource: nullableString,
|
|
14269
14407
|
approvalReason: nullableString,
|
|
14270
14408
|
approvalMetadata: jsonObject.catch({}),
|
|
14271
|
-
schemaVersion:
|
|
14409
|
+
schemaVersion: import_zod20.z.string(),
|
|
14272
14410
|
testRunId: nullableString,
|
|
14273
|
-
idempotencyKey:
|
|
14274
|
-
createdAt:
|
|
14275
|
-
updatedAt:
|
|
14411
|
+
idempotencyKey: import_zod20.z.string(),
|
|
14412
|
+
createdAt: import_zod20.z.string(),
|
|
14413
|
+
updatedAt: import_zod20.z.string()
|
|
14276
14414
|
})
|
|
14277
14415
|
);
|
|
14278
|
-
var phantomCandidateEvidenceSchema =
|
|
14416
|
+
var phantomCandidateEvidenceSchema = import_zod20.z.preprocess(
|
|
14279
14417
|
normalizePhantomLedgerKeys,
|
|
14280
|
-
|
|
14418
|
+
import_zod20.z.object({
|
|
14281
14419
|
id: idString,
|
|
14282
14420
|
organizationId: idString,
|
|
14283
14421
|
phantomCandidateId: idString,
|
|
14284
14422
|
phantomObservationId: nullableString,
|
|
14285
|
-
evidenceType:
|
|
14423
|
+
evidenceType: import_zod20.z.string(),
|
|
14286
14424
|
sourceType: nullableString,
|
|
14287
14425
|
sourceId: nullableString,
|
|
14288
14426
|
contentHash: nullableString,
|
|
14289
14427
|
payload: jsonObject.catch({}),
|
|
14290
|
-
schemaVersion:
|
|
14428
|
+
schemaVersion: import_zod20.z.string(),
|
|
14291
14429
|
testRunId: nullableString,
|
|
14292
|
-
idempotencyKey:
|
|
14293
|
-
createdAt:
|
|
14294
|
-
updatedAt:
|
|
14430
|
+
idempotencyKey: import_zod20.z.string(),
|
|
14431
|
+
createdAt: import_zod20.z.string(),
|
|
14432
|
+
updatedAt: import_zod20.z.string()
|
|
14295
14433
|
})
|
|
14296
14434
|
);
|
|
14297
|
-
var phantomValidationSchema =
|
|
14435
|
+
var phantomValidationSchema = import_zod20.z.preprocess(
|
|
14298
14436
|
normalizePhantomLedgerKeys,
|
|
14299
|
-
|
|
14437
|
+
import_zod20.z.object({
|
|
14300
14438
|
id: idString,
|
|
14301
14439
|
organizationId: idString,
|
|
14302
14440
|
phantomRunId: idString,
|
|
14303
14441
|
phantomCandidateId: idString,
|
|
14304
|
-
status:
|
|
14305
|
-
validationType:
|
|
14306
|
-
dryRun:
|
|
14442
|
+
status: import_zod20.z.string(),
|
|
14443
|
+
validationType: import_zod20.z.string(),
|
|
14444
|
+
dryRun: import_zod20.z.boolean(),
|
|
14307
14445
|
payload: jsonObject.catch({}),
|
|
14308
14446
|
resultPayload: jsonObject.catch({}),
|
|
14309
|
-
schemaVersion:
|
|
14447
|
+
schemaVersion: import_zod20.z.string(),
|
|
14310
14448
|
testRunId: nullableString,
|
|
14311
|
-
idempotencyKey:
|
|
14312
|
-
createdAt:
|
|
14313
|
-
updatedAt:
|
|
14449
|
+
idempotencyKey: import_zod20.z.string(),
|
|
14450
|
+
createdAt: import_zod20.z.string(),
|
|
14451
|
+
updatedAt: import_zod20.z.string()
|
|
14314
14452
|
})
|
|
14315
14453
|
);
|
|
14316
|
-
var phantomApplyOperationSchema =
|
|
14454
|
+
var phantomApplyOperationSchema = import_zod20.z.preprocess(
|
|
14317
14455
|
normalizePhantomLedgerKeys,
|
|
14318
|
-
|
|
14456
|
+
import_zod20.z.object({
|
|
14319
14457
|
id: idString,
|
|
14320
14458
|
organizationId: idString,
|
|
14321
14459
|
phantomRunId: idString,
|
|
14322
14460
|
phantomCandidateId: idString,
|
|
14323
|
-
status:
|
|
14324
|
-
operationType:
|
|
14325
|
-
dryRun:
|
|
14461
|
+
status: import_zod20.z.string(),
|
|
14462
|
+
operationType: import_zod20.z.string(),
|
|
14463
|
+
dryRun: import_zod20.z.boolean(),
|
|
14326
14464
|
targetType: nullableString,
|
|
14327
14465
|
targetId: nullableString,
|
|
14328
14466
|
payload: jsonObject.catch({}),
|
|
14329
14467
|
resultPayload: jsonObject.catch({}),
|
|
14330
|
-
schemaVersion:
|
|
14468
|
+
schemaVersion: import_zod20.z.string(),
|
|
14331
14469
|
testRunId: nullableString,
|
|
14332
|
-
idempotencyKey:
|
|
14333
|
-
createdAt:
|
|
14334
|
-
updatedAt:
|
|
14470
|
+
idempotencyKey: import_zod20.z.string(),
|
|
14471
|
+
createdAt: import_zod20.z.string(),
|
|
14472
|
+
updatedAt: import_zod20.z.string()
|
|
14335
14473
|
})
|
|
14336
14474
|
);
|
|
14337
|
-
var phantomRunsSchema =
|
|
14338
|
-
var phantomReportsSchema =
|
|
14339
|
-
var phantomObservationsSchema =
|
|
14340
|
-
var phantomCandidatesSchema =
|
|
14341
|
-
var phantomCandidateEvidencesSchema =
|
|
14342
|
-
var phantomValidationsSchema =
|
|
14343
|
-
var phantomApplyOperationsSchema =
|
|
14475
|
+
var phantomRunsSchema = import_zod20.z.array(phantomRunListItemSchema);
|
|
14476
|
+
var phantomReportsSchema = import_zod20.z.array(phantomReportSchema);
|
|
14477
|
+
var phantomObservationsSchema = import_zod20.z.array(phantomObservationSchema);
|
|
14478
|
+
var phantomCandidatesSchema = import_zod20.z.array(phantomCandidateSchema);
|
|
14479
|
+
var phantomCandidateEvidencesSchema = import_zod20.z.array(phantomCandidateEvidenceSchema);
|
|
14480
|
+
var phantomValidationsSchema = import_zod20.z.array(phantomValidationSchema);
|
|
14481
|
+
var phantomApplyOperationsSchema = import_zod20.z.array(phantomApplyOperationSchema);
|
|
14344
14482
|
function isRecord6(value) {
|
|
14345
14483
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
14346
14484
|
}
|
|
@@ -16269,72 +16407,72 @@ function registerSignatureCommands(program) {
|
|
|
16269
16407
|
}
|
|
16270
16408
|
|
|
16271
16409
|
// src/commands/atlasAuthoring.ts
|
|
16272
|
-
var
|
|
16273
|
-
var idSchema15 =
|
|
16274
|
-
var idempotencyKeySchema =
|
|
16275
|
-
var skillScopeSchema =
|
|
16276
|
-
var isoDateSchema =
|
|
16277
|
-
var nonEmptyStringSchema =
|
|
16410
|
+
var import_zod21 = require("zod");
|
|
16411
|
+
var idSchema15 = import_zod21.z.string().trim().min(1);
|
|
16412
|
+
var idempotencyKeySchema = import_zod21.z.string().min(1).refine((value) => value.trim() === value, "Idempotency key must not have leading or trailing whitespace.");
|
|
16413
|
+
var skillScopeSchema = import_zod21.z.enum(["ADMIN_GLOBAL", "MEMBER_PERSONAL"]);
|
|
16414
|
+
var isoDateSchema = import_zod21.z.iso.date();
|
|
16415
|
+
var nonEmptyStringSchema = import_zod21.z.string().trim().min(1);
|
|
16278
16416
|
var AUTOMATION_RUN_HTTP_TIMEOUT_MS = 6e4;
|
|
16279
|
-
var agentToolAccessSchema =
|
|
16280
|
-
|
|
16417
|
+
var agentToolAccessSchema = import_zod21.z.array(
|
|
16418
|
+
import_zod21.z.object({
|
|
16281
16419
|
tool_key: nonEmptyStringSchema,
|
|
16282
16420
|
scope_value: nonEmptyStringSchema
|
|
16283
16421
|
}).strict()
|
|
16284
16422
|
).min(1);
|
|
16285
16423
|
var agentToolAccessUpdateSchema = agentToolAccessSchema.min(0);
|
|
16286
|
-
var agentPluginConnectionsSchema =
|
|
16287
|
-
|
|
16424
|
+
var agentPluginConnectionsSchema = import_zod21.z.array(
|
|
16425
|
+
import_zod21.z.object({
|
|
16288
16426
|
external_tool_connection_id: nonEmptyStringSchema,
|
|
16289
16427
|
tool_key: nonEmptyStringSchema,
|
|
16290
16428
|
scope_value: nonEmptyStringSchema.optional(),
|
|
16291
|
-
allowed_tools:
|
|
16292
|
-
allowed_scopes:
|
|
16293
|
-
requires_confirmation:
|
|
16294
|
-
enabled:
|
|
16429
|
+
allowed_tools: import_zod21.z.array(nonEmptyStringSchema).optional(),
|
|
16430
|
+
allowed_scopes: import_zod21.z.array(nonEmptyStringSchema).optional(),
|
|
16431
|
+
requires_confirmation: import_zod21.z.boolean().optional(),
|
|
16432
|
+
enabled: import_zod21.z.boolean().optional()
|
|
16295
16433
|
}).strict()
|
|
16296
16434
|
).min(1);
|
|
16297
|
-
var agentPluginConnectionUpdateSchema =
|
|
16298
|
-
|
|
16299
|
-
|
|
16435
|
+
var agentPluginConnectionUpdateSchema = import_zod21.z.array(
|
|
16436
|
+
import_zod21.z.union([
|
|
16437
|
+
import_zod21.z.object({
|
|
16300
16438
|
id: nonEmptyStringSchema,
|
|
16301
|
-
_destroy:
|
|
16439
|
+
_destroy: import_zod21.z.literal(true)
|
|
16302
16440
|
}).strict(),
|
|
16303
|
-
|
|
16441
|
+
import_zod21.z.object({
|
|
16304
16442
|
id: nonEmptyStringSchema.optional(),
|
|
16305
16443
|
external_tool_connection_id: nonEmptyStringSchema.optional(),
|
|
16306
16444
|
tool_key: nonEmptyStringSchema.optional(),
|
|
16307
16445
|
scope_value: nonEmptyStringSchema.optional(),
|
|
16308
|
-
allowed_tools:
|
|
16309
|
-
allowed_scopes:
|
|
16310
|
-
requires_confirmation:
|
|
16311
|
-
enabled:
|
|
16446
|
+
allowed_tools: import_zod21.z.array(nonEmptyStringSchema).optional(),
|
|
16447
|
+
allowed_scopes: import_zod21.z.array(nonEmptyStringSchema).optional(),
|
|
16448
|
+
requires_confirmation: import_zod21.z.boolean().optional(),
|
|
16449
|
+
enabled: import_zod21.z.boolean().optional()
|
|
16312
16450
|
}).strict().superRefine((value, context) => {
|
|
16313
16451
|
if (value.id || value.external_tool_connection_id && value.tool_key) return;
|
|
16314
16452
|
context.addIssue({
|
|
16315
|
-
code:
|
|
16453
|
+
code: import_zod21.z.ZodIssueCode.custom,
|
|
16316
16454
|
message: "Plugin updates require an id, or both external_tool_connection_id and tool_key for a new grant."
|
|
16317
16455
|
});
|
|
16318
16456
|
})
|
|
16319
16457
|
])
|
|
16320
16458
|
);
|
|
16321
|
-
var agentTriggerSchema =
|
|
16322
|
-
trigger_type:
|
|
16459
|
+
var agentTriggerSchema = import_zod21.z.object({
|
|
16460
|
+
trigger_type: import_zod21.z.literal("cron"),
|
|
16323
16461
|
cron_expression: nonEmptyStringSchema,
|
|
16324
16462
|
timezone: nonEmptyStringSchema,
|
|
16325
|
-
starts_at:
|
|
16326
|
-
ends_at:
|
|
16327
|
-
max_runs:
|
|
16328
|
-
enabled:
|
|
16463
|
+
starts_at: import_zod21.z.iso.datetime({ offset: true }).nullable().optional(),
|
|
16464
|
+
ends_at: import_zod21.z.iso.datetime({ offset: true }).nullable().optional(),
|
|
16465
|
+
max_runs: import_zod21.z.number().int().positive().nullable().optional(),
|
|
16466
|
+
enabled: import_zod21.z.boolean().optional()
|
|
16329
16467
|
}).strict();
|
|
16330
|
-
var agentTriggerUpdateSchema =
|
|
16468
|
+
var agentTriggerUpdateSchema = import_zod21.z.union([
|
|
16331
16469
|
agentTriggerSchema.extend({ id: nonEmptyStringSchema.optional() }).strict(),
|
|
16332
|
-
|
|
16470
|
+
import_zod21.z.object({
|
|
16333
16471
|
id: nonEmptyStringSchema,
|
|
16334
|
-
_destroy:
|
|
16472
|
+
_destroy: import_zod21.z.literal(true)
|
|
16335
16473
|
}).strict()
|
|
16336
16474
|
]);
|
|
16337
|
-
var automationConfigSchema =
|
|
16475
|
+
var automationConfigSchema = import_zod21.z.record(import_zod21.z.string(), import_zod21.z.unknown());
|
|
16338
16476
|
var AGENT_SELECTION = `{
|
|
16339
16477
|
id
|
|
16340
16478
|
type
|
|
@@ -17012,7 +17150,7 @@ function registerAtlasAuthoringCommands(program) {
|
|
|
17012
17150
|
"--service <service>",
|
|
17013
17151
|
"Supported service: gmail, calendar, slack, or stripe"
|
|
17014
17152
|
).action(async (opts, cmd) => {
|
|
17015
|
-
const service =
|
|
17153
|
+
const service = import_zod21.z.enum(["gmail", "calendar", "slack", "stripe"]).parse(opts.service);
|
|
17016
17154
|
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
17017
17155
|
const organizationId = resolveOrganizationId(context.organizationId);
|
|
17018
17156
|
await runGraphqlQueryCommand({
|
|
@@ -17297,6 +17435,15 @@ var VARIABLE_TYPES = {
|
|
|
17297
17435
|
organization_id: "ID!",
|
|
17298
17436
|
member_id: "ID"
|
|
17299
17437
|
};
|
|
17438
|
+
var ACTIVITY_VARIABLE_TYPES = {
|
|
17439
|
+
...VARIABLE_TYPES,
|
|
17440
|
+
start_at: "ISO8601DateTime!",
|
|
17441
|
+
end_at: "ISO8601DateTime!"
|
|
17442
|
+
};
|
|
17443
|
+
var MEMBER_STATUSES_VARIABLE_TYPES = {
|
|
17444
|
+
organization_id: "ID!",
|
|
17445
|
+
member_ids: "[ID!]!"
|
|
17446
|
+
};
|
|
17300
17447
|
function parseRecentLimit(value) {
|
|
17301
17448
|
const limit = Number(value);
|
|
17302
17449
|
if (!Number.isInteger(limit) || limit < 1 || limit > 50) {
|
|
@@ -17304,6 +17451,25 @@ function parseRecentLimit(value) {
|
|
|
17304
17451
|
}
|
|
17305
17452
|
return limit;
|
|
17306
17453
|
}
|
|
17454
|
+
function parseIsoDateTime(optionName, value) {
|
|
17455
|
+
const timestamp = Date.parse(value);
|
|
17456
|
+
if (!Number.isFinite(timestamp) || !value.includes("T")) {
|
|
17457
|
+
throw new Error(`${optionName} must be an ISO 8601 date-time`);
|
|
17458
|
+
}
|
|
17459
|
+
return value;
|
|
17460
|
+
}
|
|
17461
|
+
function validateActivityRange(startAt, endAt) {
|
|
17462
|
+
if (Date.parse(endAt) <= Date.parse(startAt)) {
|
|
17463
|
+
throw new Error("end-at must be after start-at");
|
|
17464
|
+
}
|
|
17465
|
+
}
|
|
17466
|
+
function parseMemberIds(value) {
|
|
17467
|
+
const memberIds = [...new Set(value.split(",").map((id) => id.trim()).filter(Boolean))];
|
|
17468
|
+
if (memberIds.length < 1 || memberIds.length > 100) {
|
|
17469
|
+
throw new Error("member-ids must contain between 1 and 100 unique member IDs");
|
|
17470
|
+
}
|
|
17471
|
+
return memberIds;
|
|
17472
|
+
}
|
|
17307
17473
|
async function runDesktopContextQuery(cmd, params) {
|
|
17308
17474
|
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
17309
17475
|
await runGraphqlQueryCommand({
|
|
@@ -17314,9 +17480,12 @@ async function runDesktopContextQuery(cmd, params) {
|
|
|
17314
17480
|
variables: normalizeGraphqlVariables2({
|
|
17315
17481
|
organization_id: resolveOrganizationId(context.organizationId),
|
|
17316
17482
|
member_id: params.memberId,
|
|
17317
|
-
|
|
17483
|
+
member_ids: params.memberIds,
|
|
17484
|
+
limit: params.limit,
|
|
17485
|
+
start_at: params.startAt,
|
|
17486
|
+
end_at: params.endAt
|
|
17318
17487
|
}),
|
|
17319
|
-
variableTypes: {
|
|
17488
|
+
variableTypes: params.command === "desktop-context.activity" ? ACTIVITY_VARIABLE_TYPES : params.command === "desktop-context.member-statuses" ? MEMBER_STATUSES_VARIABLE_TYPES : {
|
|
17320
17489
|
...VARIABLE_TYPES,
|
|
17321
17490
|
...params.command === "desktop-context.recent" ? { limit: "Int" } : {}
|
|
17322
17491
|
},
|
|
@@ -17334,6 +17503,18 @@ function registerDesktopContextCommands(program) {
|
|
|
17334
17503
|
memberId: opts.memberId
|
|
17335
17504
|
});
|
|
17336
17505
|
});
|
|
17506
|
+
desktopContext.command("member-statuses").description("Read capture and enrollment status for up to 100 organization members").requiredOption(
|
|
17507
|
+
"--member-ids <memberIds>",
|
|
17508
|
+
"Comma-separated organization member IDs (1-100)",
|
|
17509
|
+
parseMemberIds
|
|
17510
|
+
).action(async (opts, cmd) => {
|
|
17511
|
+
await runDesktopContextQuery(cmd, {
|
|
17512
|
+
command: "desktop-context.member-statuses",
|
|
17513
|
+
operationName: "DesktopContextMemberStatuses",
|
|
17514
|
+
field: "desktop_context_member_statuses",
|
|
17515
|
+
memberIds: opts.memberIds
|
|
17516
|
+
});
|
|
17517
|
+
});
|
|
17337
17518
|
desktopContext.command("recent").description("Read recent sanitized evidence excerpts").option("--member-id <memberId>", "Member scope; defaults to the authenticated member").option("--limit <limit>", "Maximum observations (1-50)", parseRecentLimit).action(async (opts, cmd) => {
|
|
17338
17519
|
await runDesktopContextQuery(cmd, {
|
|
17339
17520
|
command: "desktop-context.recent",
|
|
@@ -17343,6 +17524,380 @@ function registerDesktopContextCommands(program) {
|
|
|
17343
17524
|
limit: opts.limit
|
|
17344
17525
|
});
|
|
17345
17526
|
});
|
|
17527
|
+
desktopContext.command("activity").description("Read canonical active, AFK, gap, and app duration for a bounded range").requiredOption(
|
|
17528
|
+
"--start-at <dateTime>",
|
|
17529
|
+
"Inclusive ISO 8601 range start",
|
|
17530
|
+
(value) => parseIsoDateTime("start-at", value)
|
|
17531
|
+
).requiredOption(
|
|
17532
|
+
"--end-at <dateTime>",
|
|
17533
|
+
"Exclusive ISO 8601 range end",
|
|
17534
|
+
(value) => parseIsoDateTime("end-at", value)
|
|
17535
|
+
).option("--member-id <memberId>", "Member scope; defaults to the authenticated member").action(async (opts, cmd) => {
|
|
17536
|
+
validateActivityRange(opts.startAt, opts.endAt);
|
|
17537
|
+
await runDesktopContextQuery(cmd, {
|
|
17538
|
+
command: "desktop-context.activity",
|
|
17539
|
+
operationName: "DesktopContextActivity",
|
|
17540
|
+
field: "desktop_context_activity_summary",
|
|
17541
|
+
memberId: opts.memberId,
|
|
17542
|
+
startAt: opts.startAt,
|
|
17543
|
+
endAt: opts.endAt
|
|
17544
|
+
});
|
|
17545
|
+
});
|
|
17546
|
+
}
|
|
17547
|
+
|
|
17548
|
+
// src/commands/dataPipeline.ts
|
|
17549
|
+
var MAX_PARAMETERS_JSON_BYTES = 16384;
|
|
17550
|
+
var SECRET_LIKE_PARAMETER_KEY = /(?:^|_)(?:api_?key|authorization|credential|password|secret|token)(?:$|_)/i;
|
|
17551
|
+
var UNSAFE_PARAMETER_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
17552
|
+
var ORGANIZATION_VARIABLE_TYPES = {
|
|
17553
|
+
organization_id: "ID!"
|
|
17554
|
+
};
|
|
17555
|
+
var SOURCES_VARIABLE_TYPES = {
|
|
17556
|
+
...ORGANIZATION_VARIABLE_TYPES,
|
|
17557
|
+
category_key: "String!"
|
|
17558
|
+
};
|
|
17559
|
+
var SOURCE_ACTIONS_VARIABLE_TYPES = {
|
|
17560
|
+
...ORGANIZATION_VARIABLE_TYPES,
|
|
17561
|
+
source_id: "ID!"
|
|
17562
|
+
};
|
|
17563
|
+
var EXECUTE_SOURCE_ACTION_VARIABLE_TYPES = {
|
|
17564
|
+
...SOURCE_ACTIONS_VARIABLE_TYPES,
|
|
17565
|
+
category_key: "String!",
|
|
17566
|
+
provider_key: "String!",
|
|
17567
|
+
action_key: "String!",
|
|
17568
|
+
parameters: "JSON"
|
|
17569
|
+
};
|
|
17570
|
+
var PROVIDER_SELECTION = `
|
|
17571
|
+
organizationPluginId
|
|
17572
|
+
key
|
|
17573
|
+
name
|
|
17574
|
+
categories
|
|
17575
|
+
availability
|
|
17576
|
+
integrationKey
|
|
17577
|
+
arcadeProvider
|
|
17578
|
+
arcadeService
|
|
17579
|
+
logoAssetPath
|
|
17580
|
+
`.trim();
|
|
17581
|
+
var OVERVIEW_SELECTION = `
|
|
17582
|
+
{
|
|
17583
|
+
totalSourceCount
|
|
17584
|
+
connectedSourceCount
|
|
17585
|
+
categoriesConfiguredCount
|
|
17586
|
+
actionRequiredCount
|
|
17587
|
+
categories {
|
|
17588
|
+
key
|
|
17589
|
+
name
|
|
17590
|
+
description
|
|
17591
|
+
iconKey
|
|
17592
|
+
sortOrder
|
|
17593
|
+
allowedSourceTypes
|
|
17594
|
+
suggestedSourceLabels
|
|
17595
|
+
sourceCount
|
|
17596
|
+
activeSourceCount
|
|
17597
|
+
attentionSourceCount
|
|
17598
|
+
status
|
|
17599
|
+
providers {
|
|
17600
|
+
${PROVIDER_SELECTION}
|
|
17601
|
+
}
|
|
17602
|
+
}
|
|
17603
|
+
}
|
|
17604
|
+
`.trim();
|
|
17605
|
+
var SOURCE_SELECTION = `
|
|
17606
|
+
{
|
|
17607
|
+
id
|
|
17608
|
+
type
|
|
17609
|
+
organizationId
|
|
17610
|
+
categoryKey
|
|
17611
|
+
sourceType
|
|
17612
|
+
providerKey
|
|
17613
|
+
organizationPluginId
|
|
17614
|
+
name
|
|
17615
|
+
url
|
|
17616
|
+
status
|
|
17617
|
+
connection
|
|
17618
|
+
configuration
|
|
17619
|
+
metadata
|
|
17620
|
+
lastSyncedAt
|
|
17621
|
+
lastSuccessfulSyncAt
|
|
17622
|
+
lastErrorAt
|
|
17623
|
+
lastErrorMessage
|
|
17624
|
+
createdById
|
|
17625
|
+
createdAt
|
|
17626
|
+
updatedAt
|
|
17627
|
+
}
|
|
17628
|
+
`.trim();
|
|
17629
|
+
var SOURCE_ACTION_SELECTION = `
|
|
17630
|
+
{
|
|
17631
|
+
key
|
|
17632
|
+
displayName
|
|
17633
|
+
inputSchema
|
|
17634
|
+
safetyClass
|
|
17635
|
+
requiresApproval
|
|
17636
|
+
}
|
|
17637
|
+
`.trim();
|
|
17638
|
+
var SOURCE_ACTION_RESULT_SELECTION = `
|
|
17639
|
+
{
|
|
17640
|
+
ok
|
|
17641
|
+
status
|
|
17642
|
+
errorCode
|
|
17643
|
+
errors
|
|
17644
|
+
traceId
|
|
17645
|
+
organizationId
|
|
17646
|
+
categoryKey
|
|
17647
|
+
providerKey
|
|
17648
|
+
sourceId
|
|
17649
|
+
actionKey
|
|
17650
|
+
records
|
|
17651
|
+
pageInfo
|
|
17652
|
+
metadata
|
|
17653
|
+
}
|
|
17654
|
+
`.trim();
|
|
17655
|
+
function invalidParameters(message, details = {}) {
|
|
17656
|
+
return new CliError({
|
|
17657
|
+
message,
|
|
17658
|
+
kind: "invalid_args",
|
|
17659
|
+
status: 400,
|
|
17660
|
+
exitCode: EXIT_CODES.invalidArgs,
|
|
17661
|
+
details
|
|
17662
|
+
});
|
|
17663
|
+
}
|
|
17664
|
+
function parseNonBlank(value, optionName) {
|
|
17665
|
+
const parsed = value.trim();
|
|
17666
|
+
if (!parsed) {
|
|
17667
|
+
throw invalidParameters(`${optionName} must not be blank`);
|
|
17668
|
+
}
|
|
17669
|
+
return parsed;
|
|
17670
|
+
}
|
|
17671
|
+
function parseCategoryKey(value) {
|
|
17672
|
+
return parseNonBlank(value, "category-key");
|
|
17673
|
+
}
|
|
17674
|
+
function secretLikeParameterPath(value, path = []) {
|
|
17675
|
+
if (!value || typeof value !== "object") return null;
|
|
17676
|
+
if (Array.isArray(value)) {
|
|
17677
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
17678
|
+
const nestedPath = secretLikeParameterPath(value[index], [...path, String(index)]);
|
|
17679
|
+
if (nestedPath) return nestedPath;
|
|
17680
|
+
}
|
|
17681
|
+
return null;
|
|
17682
|
+
}
|
|
17683
|
+
for (const [key, nestedValue] of Object.entries(value)) {
|
|
17684
|
+
const keyPath = [...path, key];
|
|
17685
|
+
if (UNSAFE_PARAMETER_KEYS.has(key) || SECRET_LIKE_PARAMETER_KEY.test(key)) {
|
|
17686
|
+
return keyPath.join(".");
|
|
17687
|
+
}
|
|
17688
|
+
const nestedPath = secretLikeParameterPath(nestedValue, keyPath);
|
|
17689
|
+
if (nestedPath) return nestedPath;
|
|
17690
|
+
}
|
|
17691
|
+
return null;
|
|
17692
|
+
}
|
|
17693
|
+
function parseSourceActionParameters(raw) {
|
|
17694
|
+
if (Buffer.byteLength(raw, "utf8") > MAX_PARAMETERS_JSON_BYTES) {
|
|
17695
|
+
throw invalidParameters(
|
|
17696
|
+
`parameters-json must not exceed ${MAX_PARAMETERS_JSON_BYTES} bytes`
|
|
17697
|
+
);
|
|
17698
|
+
}
|
|
17699
|
+
let parsed;
|
|
17700
|
+
try {
|
|
17701
|
+
parsed = JSON.parse(raw);
|
|
17702
|
+
} catch {
|
|
17703
|
+
throw invalidParameters("parameters-json must be a valid JSON object");
|
|
17704
|
+
}
|
|
17705
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
17706
|
+
throw invalidParameters("parameters-json must be a JSON object");
|
|
17707
|
+
}
|
|
17708
|
+
const secretPath = secretLikeParameterPath(parsed);
|
|
17709
|
+
if (secretPath) {
|
|
17710
|
+
throw invalidParameters(
|
|
17711
|
+
`parameters-json contains a secret-like parameter key: ${secretPath}`,
|
|
17712
|
+
{ parameterPath: secretPath }
|
|
17713
|
+
);
|
|
17714
|
+
}
|
|
17715
|
+
return parsed;
|
|
17716
|
+
}
|
|
17717
|
+
function isJsonRecord(value) {
|
|
17718
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
17719
|
+
}
|
|
17720
|
+
function sourceActionFailureKind(errorCode, status) {
|
|
17721
|
+
if (errorCode === "AUTH_REQUIRED" || errorCode === "UNAUTHORIZED") return "missing_auth";
|
|
17722
|
+
if (errorCode === "NOT_FOUND") return "not_found";
|
|
17723
|
+
if (errorCode === "PROVIDER_ERROR") return "upstream_error";
|
|
17724
|
+
if (errorCode === "ACTION_NOT_ALLOWED") return "forbidden";
|
|
17725
|
+
if (errorCode === "INVALID_INPUT" || errorCode === "INVALID_SOURCE") {
|
|
17726
|
+
return "validation";
|
|
17727
|
+
}
|
|
17728
|
+
if (status === 403) return "forbidden";
|
|
17729
|
+
if (status === 404) return "not_found";
|
|
17730
|
+
if (status >= 500) return "upstream_error";
|
|
17731
|
+
if (status === 400 || status === 422) return "validation";
|
|
17732
|
+
return "generic_error";
|
|
17733
|
+
}
|
|
17734
|
+
function sourceActionFailureExitCode(kind, status) {
|
|
17735
|
+
if (kind === "missing_auth") return EXIT_CODES.missingOrInvalidAuth;
|
|
17736
|
+
if (kind === "forbidden") return EXIT_CODES.forbidden;
|
|
17737
|
+
if (kind === "not_found") return EXIT_CODES.notFound;
|
|
17738
|
+
if (kind === "validation") return EXIT_CODES.validationFailure;
|
|
17739
|
+
if (kind === "upstream_error" || kind === "malformed_response") {
|
|
17740
|
+
return EXIT_CODES.networkOrUpstream;
|
|
17741
|
+
}
|
|
17742
|
+
return mapStatusToExitCode(status);
|
|
17743
|
+
}
|
|
17744
|
+
function transformSourceActionResult(value) {
|
|
17745
|
+
if (!isJsonRecord(value) || typeof value.ok !== "boolean") {
|
|
17746
|
+
throw new CliError({
|
|
17747
|
+
message: "Data Pipeline source action returned a malformed response",
|
|
17748
|
+
kind: "malformed_response",
|
|
17749
|
+
status: 502,
|
|
17750
|
+
exitCode: EXIT_CODES.networkOrUpstream
|
|
17751
|
+
});
|
|
17752
|
+
}
|
|
17753
|
+
if (value.ok) return value;
|
|
17754
|
+
const status = typeof value.status === "number" && Number.isInteger(value.status) ? value.status : 500;
|
|
17755
|
+
const errorCode = typeof value.errorCode === "string" && value.errorCode.length > 0 ? value.errorCode.toUpperCase() : "SOURCE_ACTION_FAILED";
|
|
17756
|
+
const errors = Array.isArray(value.errors) ? value.errors.filter((error) => typeof error === "string") : [];
|
|
17757
|
+
const traceId = typeof value.traceId === "string" ? value.traceId : null;
|
|
17758
|
+
const kind = sourceActionFailureKind(errorCode, status);
|
|
17759
|
+
throw new CliError({
|
|
17760
|
+
message: errors.find((error) => error.trim().length > 0) ?? "Data Pipeline source action failed",
|
|
17761
|
+
kind,
|
|
17762
|
+
status,
|
|
17763
|
+
exitCode: sourceActionFailureExitCode(kind, status),
|
|
17764
|
+
details: { errorCode, traceId, errors }
|
|
17765
|
+
});
|
|
17766
|
+
}
|
|
17767
|
+
function transformSourceActions(value) {
|
|
17768
|
+
if (!Array.isArray(value)) {
|
|
17769
|
+
throw new CliError({
|
|
17770
|
+
message: "Data Pipeline source action discovery returned a malformed response",
|
|
17771
|
+
kind: "malformed_response",
|
|
17772
|
+
status: 502,
|
|
17773
|
+
exitCode: EXIT_CODES.networkOrUpstream
|
|
17774
|
+
});
|
|
17775
|
+
}
|
|
17776
|
+
for (const action of value) {
|
|
17777
|
+
if (!isJsonRecord(action) || typeof action.key !== "string") {
|
|
17778
|
+
throw new CliError({
|
|
17779
|
+
message: "Data Pipeline source action discovery returned a malformed action",
|
|
17780
|
+
kind: "malformed_response",
|
|
17781
|
+
status: 502,
|
|
17782
|
+
exitCode: EXIT_CODES.networkOrUpstream
|
|
17783
|
+
});
|
|
17784
|
+
}
|
|
17785
|
+
if (action.safetyClass !== "read_only" || action.requiresApproval !== false) {
|
|
17786
|
+
throw new CliError({
|
|
17787
|
+
message: `Data Pipeline source action discovery returned a non-read-only action: ${action.key}`,
|
|
17788
|
+
kind: "malformed_response",
|
|
17789
|
+
status: 502,
|
|
17790
|
+
exitCode: EXIT_CODES.networkOrUpstream,
|
|
17791
|
+
details: {
|
|
17792
|
+
actionKey: action.key,
|
|
17793
|
+
safetyClass: action.safetyClass,
|
|
17794
|
+
requiresApproval: action.requiresApproval
|
|
17795
|
+
}
|
|
17796
|
+
});
|
|
17797
|
+
}
|
|
17798
|
+
}
|
|
17799
|
+
return value;
|
|
17800
|
+
}
|
|
17801
|
+
function registerDataPipelineCommands(program) {
|
|
17802
|
+
const dataPipeline = program.command("data-pipeline").description("Inspect the organization's configured Data Pipeline control plane");
|
|
17803
|
+
dataPipeline.command("overview").description("Read source counts, category status, and available organization plugins").action(async (_opts, cmd) => {
|
|
17804
|
+
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
17805
|
+
await runGraphqlQueryCommand({
|
|
17806
|
+
command: "data-pipeline.overview",
|
|
17807
|
+
operationName: "DataPipelineOverview",
|
|
17808
|
+
runtimeOptions: context.runtimeOptions,
|
|
17809
|
+
field: "data_pipeline_overview",
|
|
17810
|
+
variables: {
|
|
17811
|
+
organization_id: resolveOrganizationId(context.organizationId)
|
|
17812
|
+
},
|
|
17813
|
+
variableTypes: ORGANIZATION_VARIABLE_TYPES,
|
|
17814
|
+
isShow: true,
|
|
17815
|
+
selectionSet: OVERVIEW_SELECTION
|
|
17816
|
+
});
|
|
17817
|
+
});
|
|
17818
|
+
dataPipeline.command("sources").description("Read the saved source records configured for one Data Pipeline category").requiredOption(
|
|
17819
|
+
"--category-key <categoryKey>",
|
|
17820
|
+
"Data Pipeline category key from the overview response",
|
|
17821
|
+
parseCategoryKey
|
|
17822
|
+
).action(async (opts, cmd) => {
|
|
17823
|
+
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
17824
|
+
await runGraphqlQueryCommand({
|
|
17825
|
+
command: "data-pipeline.sources",
|
|
17826
|
+
operationName: "DataPipelineSources",
|
|
17827
|
+
runtimeOptions: context.runtimeOptions,
|
|
17828
|
+
field: "data_pipeline_sources",
|
|
17829
|
+
variables: {
|
|
17830
|
+
organization_id: resolveOrganizationId(context.organizationId),
|
|
17831
|
+
category_key: opts.categoryKey
|
|
17832
|
+
},
|
|
17833
|
+
variableTypes: SOURCES_VARIABLE_TYPES,
|
|
17834
|
+
isList: true,
|
|
17835
|
+
selectionSet: SOURCE_SELECTION
|
|
17836
|
+
});
|
|
17837
|
+
});
|
|
17838
|
+
dataPipeline.command("source-actions").description("Read the certified provider actions available for one configured source").requiredOption(
|
|
17839
|
+
"--source-id <sourceId>",
|
|
17840
|
+
"Configured Data Pipeline source ID",
|
|
17841
|
+
(value) => parseNonBlank(value, "source-id")
|
|
17842
|
+
).action(async (opts, cmd) => {
|
|
17843
|
+
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
17844
|
+
await runGraphqlQueryCommand({
|
|
17845
|
+
command: "data-pipeline.source-actions",
|
|
17846
|
+
operationName: "DataPipelineSourceActions",
|
|
17847
|
+
runtimeOptions: context.runtimeOptions,
|
|
17848
|
+
field: "data_pipeline_source_actions",
|
|
17849
|
+
variables: {
|
|
17850
|
+
organization_id: resolveOrganizationId(context.organizationId),
|
|
17851
|
+
source_id: opts.sourceId
|
|
17852
|
+
},
|
|
17853
|
+
variableTypes: SOURCE_ACTIONS_VARIABLE_TYPES,
|
|
17854
|
+
isList: true,
|
|
17855
|
+
transformData: transformSourceActions,
|
|
17856
|
+
selectionSet: SOURCE_ACTION_SELECTION
|
|
17857
|
+
});
|
|
17858
|
+
});
|
|
17859
|
+
dataPipeline.command("execute-source-action").description("Execute one backend-certified read-only action for a configured source").requiredOption(
|
|
17860
|
+
"--category-key <categoryKey>",
|
|
17861
|
+
"Data Pipeline category key",
|
|
17862
|
+
parseCategoryKey
|
|
17863
|
+
).requiredOption(
|
|
17864
|
+
"--provider-key <providerKey>",
|
|
17865
|
+
"Provider key from the configured source",
|
|
17866
|
+
(value) => parseNonBlank(value, "provider-key")
|
|
17867
|
+
).requiredOption(
|
|
17868
|
+
"--source-id <sourceId>",
|
|
17869
|
+
"Configured Data Pipeline source ID",
|
|
17870
|
+
(value) => parseNonBlank(value, "source-id")
|
|
17871
|
+
).requiredOption(
|
|
17872
|
+
"--action-key <actionKey>",
|
|
17873
|
+
"Action key returned by source-actions",
|
|
17874
|
+
(value) => parseNonBlank(value, "action-key")
|
|
17875
|
+
).option(
|
|
17876
|
+
"--parameters-json <parametersJson>",
|
|
17877
|
+
"Bounded JSON object matching the discovered action input schema",
|
|
17878
|
+
parseSourceActionParameters,
|
|
17879
|
+
{}
|
|
17880
|
+
).action(async (opts, cmd) => {
|
|
17881
|
+
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
17882
|
+
await runGraphqlQueryCommand({
|
|
17883
|
+
command: "data-pipeline.execute-source-action",
|
|
17884
|
+
operationName: "DataPipelineExecuteSourceAction",
|
|
17885
|
+
runtimeOptions: context.runtimeOptions,
|
|
17886
|
+
field: "data_pipeline_execute_source_action",
|
|
17887
|
+
variables: {
|
|
17888
|
+
organization_id: resolveOrganizationId(context.organizationId),
|
|
17889
|
+
category_key: opts.categoryKey,
|
|
17890
|
+
provider_key: opts.providerKey,
|
|
17891
|
+
source_id: opts.sourceId,
|
|
17892
|
+
action_key: opts.actionKey,
|
|
17893
|
+
parameters: opts.parametersJson
|
|
17894
|
+
},
|
|
17895
|
+
variableTypes: EXECUTE_SOURCE_ACTION_VARIABLE_TYPES,
|
|
17896
|
+
isShow: true,
|
|
17897
|
+
transformData: transformSourceActionResult,
|
|
17898
|
+
selectionSet: SOURCE_ACTION_RESULT_SELECTION
|
|
17899
|
+
});
|
|
17900
|
+
});
|
|
17346
17901
|
}
|
|
17347
17902
|
|
|
17348
17903
|
// src/commands/discovery.ts
|
|
@@ -17358,6 +17913,7 @@ var PRIMARY_NAMESPACES = [
|
|
|
17358
17913
|
"planner",
|
|
17359
17914
|
"mail",
|
|
17360
17915
|
"datasheets",
|
|
17916
|
+
"data-pipeline",
|
|
17361
17917
|
"desktop-context",
|
|
17362
17918
|
"phantom",
|
|
17363
17919
|
"tasks",
|
|
@@ -17446,7 +18002,9 @@ var NAMESPACE_DOCS = {
|
|
|
17446
18002
|
description: "Sanitized desktop capture health and recent evidence for Atlas grounding.",
|
|
17447
18003
|
examples: [
|
|
17448
18004
|
"wave desktop-context status",
|
|
18005
|
+
"wave desktop-context member-statuses --member-ids 123,456",
|
|
17449
18006
|
"wave desktop-context recent --limit 20",
|
|
18007
|
+
"wave desktop-context activity --start-at 2026-08-18T08:00:00Z --end-at 2026-08-18T09:00:00Z",
|
|
17450
18008
|
"wave desktop-context status --member-id 123"
|
|
17451
18009
|
],
|
|
17452
18010
|
schema: {
|
|
@@ -17457,7 +18015,28 @@ var NAMESPACE_DOCS = {
|
|
|
17457
18015
|
"Does not expose screenshots, raw audio, accessibility trees, clipboard contents, keystrokes, URLs, or filesystem paths.",
|
|
17458
18016
|
"Cross-member reads remain subject to backend organization policy and every response carries backend trace correlation when available."
|
|
17459
18017
|
],
|
|
17460
|
-
commands: ["status", "recent"]
|
|
18018
|
+
commands: ["status", "member-statuses", "recent", "activity"]
|
|
18019
|
+
}
|
|
18020
|
+
},
|
|
18021
|
+
"data-pipeline": {
|
|
18022
|
+
name: "data-pipeline",
|
|
18023
|
+
tier: "primary",
|
|
18024
|
+
description: "Organization Data Pipeline configuration, saved sources, and certified provider reads.",
|
|
18025
|
+
examples: [
|
|
18026
|
+
"wave data-pipeline overview",
|
|
18027
|
+
"wave data-pipeline sources --category-key communication_meetings",
|
|
18028
|
+
"wave data-pipeline source-actions --source-id 123",
|
|
18029
|
+
`wave data-pipeline execute-source-action --category-key marketing_analytics --provider-key posthog --source-id 123 --action-key posthog.list_dashboards --parameters-json '{"limit":10,"offset":0}'`
|
|
18030
|
+
],
|
|
18031
|
+
schema: {
|
|
18032
|
+
output: "json-envelope-default",
|
|
18033
|
+
readOnly: true,
|
|
18034
|
+
safety: [
|
|
18035
|
+
"Reads organization-scoped Data Pipeline configuration and backend-certified provider records only.",
|
|
18036
|
+
"Provider actions are discovered from the backend and remain read-only and approval-free.",
|
|
18037
|
+
"Does not install, enable, disable, or uninstall plugins; manage credentials; or create, update, or delete sources."
|
|
18038
|
+
],
|
|
18039
|
+
commands: ["overview", "sources", "source-actions", "execute-source-action"]
|
|
17461
18040
|
}
|
|
17462
18041
|
},
|
|
17463
18042
|
phantom: {
|
|
@@ -18403,6 +18982,7 @@ function buildCli(options) {
|
|
|
18403
18982
|
registerRockCommands(program);
|
|
18404
18983
|
registerMeetingCommands(program);
|
|
18405
18984
|
registerMemberCommands(program);
|
|
18985
|
+
registerResourceCommands(program);
|
|
18406
18986
|
registerSkillCommands(program);
|
|
18407
18987
|
registerAtlasAuthoringCommands(program);
|
|
18408
18988
|
registerTeamCommands(program);
|
|
@@ -18427,6 +19007,7 @@ function buildCli(options) {
|
|
|
18427
19007
|
registerDatasheetsCommands(program);
|
|
18428
19008
|
registerSignatureCommands(program);
|
|
18429
19009
|
registerDesktopContextCommands(program);
|
|
19010
|
+
registerDataPipelineCommands(program);
|
|
18430
19011
|
registerAuthCommands(program);
|
|
18431
19012
|
registerDiscoveryCommands(program);
|
|
18432
19013
|
attachNamespaceDiscovery(program);
|
|
@@ -18953,13 +19534,13 @@ main().catch((error) => {
|
|
|
18953
19534
|
});
|
|
18954
19535
|
return;
|
|
18955
19536
|
}
|
|
18956
|
-
if (error instanceof
|
|
19537
|
+
if (error instanceof import_zod22.ZodError || error instanceof import_commander3.InvalidArgumentError) {
|
|
18957
19538
|
printCliFailure({
|
|
18958
19539
|
status: 400,
|
|
18959
19540
|
code: "invalid_args",
|
|
18960
19541
|
message: "Invalid command arguments.",
|
|
18961
19542
|
details: {
|
|
18962
|
-
issues: error instanceof
|
|
19543
|
+
issues: error instanceof import_zod22.ZodError ? error.issues : [{ message: error.message, code: "invalid_argument" }]
|
|
18963
19544
|
},
|
|
18964
19545
|
exitCode: EXIT_CODES.invalidArgs
|
|
18965
19546
|
});
|