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