@rudderhq/cli 0.3.5-canary.8 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -114,7 +114,7 @@ var init_home = __esm({
114
114
  });
115
115
 
116
116
  // ../packages/shared/dist/constants.js
117
- var ORGANIZATION_STATUSES, ORGANIZATION_INTELLIGENCE_PROFILE_PURPOSES, ORGANIZATION_INTELLIGENCE_PROFILE_STATUSES, DEPLOYMENT_MODES, DEPLOYMENT_EXPOSURES, AUTH_BASE_URL_MODES, AGENT_STATUSES, AGENT_RUNTIME_TYPES, AGENT_ROLES, AGENT_ICON_NAMES, AGENT_DICEBEAR_NOTIONISTS_ICON_PREFIX, AGENT_AVATAR_BACKGROUND_PRESET_IDS, ISSUE_STATUSES, ISSUE_PRIORITIES, CALENDAR_SOURCE_TYPES, CALENDAR_OWNER_TYPES, CALENDAR_VISIBILITIES, CALENDAR_SOURCE_STATUSES, CALENDAR_EVENT_KINDS, CALENDAR_EVENT_STATUSES, CALENDAR_SOURCE_MODES, CHAT_CONVERSATION_STATUSES, CHAT_ISSUE_CREATION_MODES, CHAT_MESSAGE_ROLES, CHAT_MESSAGE_KINDS, CHAT_MESSAGE_STATUSES, CHAT_CONTEXT_ENTITY_TYPES, GOAL_LEVELS, GOAL_STATUSES, PROJECT_STATUSES, ORGANIZATION_RESOURCE_KINDS, ORGANIZATION_RESOURCE_SOURCE_TYPES, PROJECT_RESOURCE_ATTACHMENT_ROLES, AUTOMATION_STATUSES, AUTOMATION_CONCURRENCY_POLICIES, AUTOMATION_CATCH_UP_POLICIES, AUTOMATION_OUTPUT_MODES, AUTOMATION_TRIGGER_SIGNING_MODES, PROJECT_COLORS, PROJECT_ICONS, APPROVAL_TYPES, SECRET_PROVIDERS, STORAGE_PROVIDERS, BILLING_TYPES, FINANCE_EVENT_KINDS, FINANCE_DIRECTIONS, FINANCE_UNITS, BUDGET_SCOPE_TYPES, BUDGET_METRICS, BUDGET_WINDOW_KINDS, BUDGET_INCIDENT_RESOLUTION_ACTIONS, INVITE_JOIN_TYPES, JOIN_REQUEST_TYPES, JOIN_REQUEST_STATUSES, PERMISSION_KEYS, PLUGIN_STATUSES, PLUGIN_CATEGORIES, PLUGIN_CAPABILITIES, PLUGIN_UI_SLOT_TYPES, PLUGIN_RESERVED_COMPANY_ROUTE_SEGMENTS, PLUGIN_LAUNCHER_PLACEMENT_ZONES, PLUGIN_LAUNCHER_ACTIONS, PLUGIN_LAUNCHER_BOUNDS, PLUGIN_LAUNCHER_RENDER_ENVIRONMENTS, PLUGIN_UI_SLOT_ENTITY_TYPES, PLUGIN_STATE_SCOPE_KINDS;
117
+ var ORGANIZATION_STATUSES, ORGANIZATION_INTELLIGENCE_PROFILE_PURPOSES, ORGANIZATION_INTELLIGENCE_PROFILE_STATUSES, DEPLOYMENT_MODES, DEPLOYMENT_EXPOSURES, AUTH_BASE_URL_MODES, AGENT_STATUSES, AGENT_RUNTIME_TYPES, AGENT_ROLES, AGENT_ICON_NAMES, AGENT_DICEBEAR_NOTIONISTS_ICON_PREFIX, AGENT_AVATAR_BACKGROUND_PRESET_IDS, ISSUE_STATUSES, ISSUE_PRIORITIES, AGENT_INTEGRATION_PROVIDERS, AGENT_INTEGRATION_STATUSES, AGENT_INTEGRATION_TRANSPORTS, AGENT_INTEGRATION_PROVIDER_REGIONS, AGENT_INTEGRATION_CHAT_TYPES, AGENT_INTEGRATION_DROP_REASONS, AGENT_INTEGRATION_OUTBOUND_STATUSES, CALENDAR_SOURCE_TYPES, CALENDAR_OWNER_TYPES, CALENDAR_VISIBILITIES, CALENDAR_SOURCE_STATUSES, CALENDAR_EVENT_KINDS, CALENDAR_EVENT_STATUSES, CALENDAR_SOURCE_MODES, CHAT_CONVERSATION_STATUSES, CHAT_ISSUE_CREATION_MODES, CHAT_MESSAGE_ROLES, CHAT_MESSAGE_KINDS, CHAT_MESSAGE_STATUSES, CHAT_CONTEXT_ENTITY_TYPES, GOAL_LEVELS, GOAL_STATUSES, PROJECT_STATUSES, ORGANIZATION_RESOURCE_KINDS, ORGANIZATION_RESOURCE_SOURCE_TYPES, PROJECT_RESOURCE_ATTACHMENT_ROLES, AUTOMATION_STATUSES, AUTOMATION_CONCURRENCY_POLICIES, AUTOMATION_CATCH_UP_POLICIES, AUTOMATION_OUTPUT_MODES, AUTOMATION_TRIGGER_SIGNING_MODES, PROJECT_COLORS, PROJECT_ICONS, APPROVAL_TYPES, SECRET_PROVIDERS, STORAGE_PROVIDERS, BILLING_TYPES, FINANCE_EVENT_KINDS, FINANCE_DIRECTIONS, FINANCE_UNITS, BUDGET_SCOPE_TYPES, BUDGET_METRICS, BUDGET_WINDOW_KINDS, BUDGET_INCIDENT_RESOLUTION_ACTIONS, INVITE_JOIN_TYPES, JOIN_REQUEST_TYPES, JOIN_REQUEST_STATUSES, PERMISSION_KEYS, PLUGIN_STATUSES, PLUGIN_CATEGORIES, PLUGIN_CAPABILITIES, PLUGIN_UI_SLOT_TYPES, PLUGIN_RESERVED_COMPANY_ROUTE_SEGMENTS, PLUGIN_LAUNCHER_PLACEMENT_ZONES, PLUGIN_LAUNCHER_ACTIONS, PLUGIN_LAUNCHER_BOUNDS, PLUGIN_LAUNCHER_RENDER_ENVIRONMENTS, PLUGIN_UI_SLOT_ENTITY_TYPES, PLUGIN_STATE_SCOPE_KINDS;
118
118
  var init_constants = __esm({
119
119
  "../packages/shared/dist/constants.js"() {
120
120
  "use strict";
@@ -220,6 +220,22 @@ var init_constants = __esm({
220
220
  "cancelled"
221
221
  ];
222
222
  ISSUE_PRIORITIES = ["critical", "high", "medium", "low"];
223
+ AGENT_INTEGRATION_PROVIDERS = ["feishu"];
224
+ AGENT_INTEGRATION_STATUSES = ["active", "revoked", "error"];
225
+ AGENT_INTEGRATION_TRANSPORTS = ["long_connection", "webhook"];
226
+ AGENT_INTEGRATION_PROVIDER_REGIONS = ["feishu_cn", "lark_global"];
227
+ AGENT_INTEGRATION_CHAT_TYPES = ["p2p", "group"];
228
+ AGENT_INTEGRATION_DROP_REASONS = [
229
+ "unbound_user",
230
+ "non_org_member",
231
+ "not_addressed_in_group",
232
+ "duplicate",
233
+ "revoked_installation",
234
+ "invalid_event",
235
+ "agent_unavailable",
236
+ "unsupported_message_type"
237
+ ];
238
+ AGENT_INTEGRATION_OUTBOUND_STATUSES = ["pending", "streaming", "final", "error"];
223
239
  CALENDAR_SOURCE_TYPES = ["rudder_local", "google_calendar", "agent_work", "system"];
224
240
  CALENDAR_OWNER_TYPES = ["user", "agent", "system"];
225
241
  CALENDAR_VISIBILITIES = ["full", "busy_only", "private"];
@@ -768,7 +784,7 @@ var init_adapter_skills = __esm({
768
784
 
769
785
  // ../packages/shared/dist/validators/chat.js
770
786
  import { z as z4 } from "zod";
771
- var chatConversationStatusSchema, chatIssueCreationModeSchema, chatMessageRoleSchema, chatMessageKindSchema, chatMessageStatusSchema, chatContextEntityTypeSchema, createChatContextLinkSchema, createChatConversationSchema, setChatProjectContextSchema, updateChatConversationSchema, addChatMessageSchema, chatRichReferenceDisplaySchema, chatIssueIdentifierSchema, chatAskUserIdentifierSchema, chatAskUserOptionSchema, chatAskUserQuestionSchema, chatAskUserRequestSchema, chatIssueRichReferenceSchema, chatIssueCommentRichReferenceSchema, chatRichReferenceSchema, chatRichReferencesSchema, chatAutomationCreateSchema, createChatAttachmentMetadataSchema, chatIssueProposalSchema, convertChatToIssueSchema, chatOperationProposalSchema, resolveChatOperationProposalSchema, updateChatConversationUserStateSchema, updateMessengerThreadUserStateSchema;
787
+ var chatConversationStatusSchema, chatIssueCreationModeSchema, chatMessageRoleSchema, chatMessageKindSchema, chatMessageStatusSchema, chatContextEntityTypeSchema, createChatContextLinkSchema, createChatConversationSchema, setChatProjectContextSchema, updateChatConversationSchema, addChatMessageSchema, chatRichReferenceDisplaySchema, chatIssueIdentifierSchema, chatAskUserIdentifierSchema, chatAskUserOptionSchema, chatAskUserQuestionSchema, chatAskUserRequestSchema, chatIssueRichReferenceSchema, chatIssueCommentRichReferenceSchema, chatRichReferenceSchema, chatRichReferencesSchema, chatAutomationCreateSchema, createChatAttachmentMetadataSchema, chatIssueProposalSchema, convertChatToIssueSchema, chatOperationProposalSchema, resolveChatOperationProposalSchema, updateChatConversationUserStateSchema, updateMessengerThreadUserStateSchema, createMessengerCustomGroupSchema, updateMessengerCustomGroupSchema, reorderMessengerCustomGroupsSchema, assignMessengerCustomGroupEntrySchema, reorderMessengerCustomGroupEntriesSchema;
772
788
  var init_chat = __esm({
773
789
  "../packages/shared/dist/validators/chat.js"() {
774
790
  "use strict";
@@ -951,6 +967,25 @@ var init_chat = __esm({
951
967
  updateMessengerThreadUserStateSchema = z4.object({
952
968
  pinned: z4.boolean().optional()
953
969
  });
970
+ createMessengerCustomGroupSchema = z4.object({
971
+ name: z4.string().trim().min(1).max(80),
972
+ icon: z4.string().trim().min(1).max(24).optional().nullable()
973
+ });
974
+ updateMessengerCustomGroupSchema = z4.object({
975
+ name: z4.string().trim().min(1).max(80).optional(),
976
+ icon: z4.string().trim().min(1).max(24).optional().nullable(),
977
+ collapsed: z4.boolean().optional(),
978
+ sortOrder: z4.number().int().min(0).optional()
979
+ });
980
+ reorderMessengerCustomGroupsSchema = z4.object({
981
+ groupIds: z4.array(z4.string().uuid()).max(200)
982
+ });
983
+ assignMessengerCustomGroupEntrySchema = z4.object({
984
+ threadKey: z4.string().trim().min(1).max(240)
985
+ });
986
+ reorderMessengerCustomGroupEntriesSchema = z4.object({
987
+ threadKeys: z4.array(z4.string().trim().min(1).max(240)).max(500)
988
+ });
954
989
  }
955
990
  });
956
991
 
@@ -1107,7 +1142,7 @@ var init_organization_intelligence_profile = __esm({
1107
1142
  upsertOrganizationIntelligenceProfileSchema = z7.object({
1108
1143
  agentRuntimeType: z7.enum(AGENT_RUNTIME_TYPES),
1109
1144
  agentRuntimeConfig: organizationIntelligenceProfileConfigSchema.default({}),
1110
- status: organizationIntelligenceProfileStatusSchema.optional().default("configured")
1145
+ status: organizationIntelligenceProfileStatusSchema.optional().default("disabled")
1111
1146
  });
1112
1147
  }
1113
1148
  });
@@ -1731,8 +1766,37 @@ var init_agent = __esm({
1731
1766
  }
1732
1767
  });
1733
1768
 
1734
- // ../packages/shared/dist/validators/project.js
1769
+ // ../packages/shared/dist/validators/agent-integration.js
1735
1770
  import { z as z13 } from "zod";
1771
+ var agentIntegrationProviderSchema, agentIntegrationStatusSchema, agentIntegrationTransportSchema, agentIntegrationProviderRegionSchema, agentIntegrationChatTypeSchema, agentIntegrationDropReasonSchema, agentIntegrationOutboundStatusSchema, createAgentIntegrationSchema;
1772
+ var init_agent_integration = __esm({
1773
+ "../packages/shared/dist/validators/agent-integration.js"() {
1774
+ "use strict";
1775
+ init_constants();
1776
+ agentIntegrationProviderSchema = z13.enum(AGENT_INTEGRATION_PROVIDERS);
1777
+ agentIntegrationStatusSchema = z13.enum(AGENT_INTEGRATION_STATUSES);
1778
+ agentIntegrationTransportSchema = z13.enum(AGENT_INTEGRATION_TRANSPORTS);
1779
+ agentIntegrationProviderRegionSchema = z13.enum(AGENT_INTEGRATION_PROVIDER_REGIONS);
1780
+ agentIntegrationChatTypeSchema = z13.enum(AGENT_INTEGRATION_CHAT_TYPES);
1781
+ agentIntegrationDropReasonSchema = z13.enum(AGENT_INTEGRATION_DROP_REASONS);
1782
+ agentIntegrationOutboundStatusSchema = z13.enum(AGENT_INTEGRATION_OUTBOUND_STATUSES);
1783
+ createAgentIntegrationSchema = z13.object({
1784
+ agentId: z13.string().uuid(),
1785
+ provider: agentIntegrationProviderSchema.default("feishu"),
1786
+ transport: agentIntegrationTransportSchema.default("long_connection"),
1787
+ providerRegion: agentIntegrationProviderRegionSchema.default("feishu_cn"),
1788
+ appCredentialSecretId: z13.string().uuid(),
1789
+ externalAppId: z13.string().min(1),
1790
+ externalBotOpenId: z13.string().min(1).optional().nullable(),
1791
+ externalTenantKey: z13.string().min(1).optional().nullable(),
1792
+ installerUserId: z13.string().min(1).optional().nullable(),
1793
+ manageUrl: z13.string().url().optional().nullable()
1794
+ });
1795
+ }
1796
+ });
1797
+
1798
+ // ../packages/shared/dist/validators/project.js
1799
+ import { z as z14 } from "zod";
1736
1800
  function validateProjectWorkspace(value, ctx) {
1737
1801
  const sourceType = value.sourceType ?? "local_path";
1738
1802
  const hasCwd = typeof value.cwd === "string" && value.cwd.trim().length > 0;
@@ -1741,7 +1805,7 @@ function validateProjectWorkspace(value, ctx) {
1741
1805
  if (sourceType === "remote_managed") {
1742
1806
  if (!hasRemoteRef && !hasRepo) {
1743
1807
  ctx.addIssue({
1744
- code: z13.ZodIssueCode.custom,
1808
+ code: z14.ZodIssueCode.custom,
1745
1809
  message: "Remote-managed workspace requires remoteWorkspaceRef or repoUrl.",
1746
1810
  path: ["remoteWorkspaceRef"]
1747
1811
  });
@@ -1750,7 +1814,7 @@ function validateProjectWorkspace(value, ctx) {
1750
1814
  }
1751
1815
  if (!hasCwd && !hasRepo) {
1752
1816
  ctx.addIssue({
1753
- code: z13.ZodIssueCode.custom,
1817
+ code: z14.ZodIssueCode.custom,
1754
1818
  message: "Workspace requires at least one of cwd or repoUrl.",
1755
1819
  path: ["cwd"]
1756
1820
  });
@@ -1762,120 +1826,120 @@ var init_project = __esm({
1762
1826
  "use strict";
1763
1827
  init_constants();
1764
1828
  init_resource();
1765
- executionWorkspaceStrategySchema = z13.object({
1766
- type: z13.enum(["project_primary", "git_worktree", "adapter_managed", "cloud_sandbox"]).optional(),
1767
- baseRef: z13.string().optional().nullable(),
1768
- branchTemplate: z13.string().optional().nullable(),
1769
- worktreeParentDir: z13.string().optional().nullable(),
1770
- provisionCommand: z13.string().optional().nullable(),
1771
- teardownCommand: z13.string().optional().nullable()
1829
+ executionWorkspaceStrategySchema = z14.object({
1830
+ type: z14.enum(["project_primary", "git_worktree", "adapter_managed", "cloud_sandbox"]).optional(),
1831
+ baseRef: z14.string().optional().nullable(),
1832
+ branchTemplate: z14.string().optional().nullable(),
1833
+ worktreeParentDir: z14.string().optional().nullable(),
1834
+ provisionCommand: z14.string().optional().nullable(),
1835
+ teardownCommand: z14.string().optional().nullable()
1772
1836
  }).strict();
1773
- projectExecutionWorkspacePolicySchema = z13.object({
1774
- enabled: z13.boolean(),
1775
- defaultMode: z13.enum(["shared_workspace", "isolated_workspace", "operator_branch", "adapter_default"]).optional(),
1776
- allowIssueOverride: z13.boolean().optional(),
1777
- defaultProjectWorkspaceId: z13.string().uuid().optional().nullable(),
1837
+ projectExecutionWorkspacePolicySchema = z14.object({
1838
+ enabled: z14.boolean(),
1839
+ defaultMode: z14.enum(["shared_workspace", "isolated_workspace", "operator_branch", "adapter_default"]).optional(),
1840
+ allowIssueOverride: z14.boolean().optional(),
1841
+ defaultProjectWorkspaceId: z14.string().uuid().optional().nullable(),
1778
1842
  workspaceStrategy: executionWorkspaceStrategySchema.optional().nullable(),
1779
- workspaceRuntime: z13.record(z13.unknown()).optional().nullable(),
1780
- branchPolicy: z13.record(z13.unknown()).optional().nullable(),
1781
- pullRequestPolicy: z13.record(z13.unknown()).optional().nullable(),
1782
- runtimePolicy: z13.record(z13.unknown()).optional().nullable(),
1783
- cleanupPolicy: z13.record(z13.unknown()).optional().nullable()
1843
+ workspaceRuntime: z14.record(z14.unknown()).optional().nullable(),
1844
+ branchPolicy: z14.record(z14.unknown()).optional().nullable(),
1845
+ pullRequestPolicy: z14.record(z14.unknown()).optional().nullable(),
1846
+ runtimePolicy: z14.record(z14.unknown()).optional().nullable(),
1847
+ cleanupPolicy: z14.record(z14.unknown()).optional().nullable()
1784
1848
  }).strict();
1785
- projectWorkspaceSourceTypeSchema = z13.enum(["local_path", "git_repo", "remote_managed", "non_git_path"]);
1786
- projectWorkspaceVisibilitySchema = z13.enum(["default", "advanced"]);
1849
+ projectWorkspaceSourceTypeSchema = z14.enum(["local_path", "git_repo", "remote_managed", "non_git_path"]);
1850
+ projectWorkspaceVisibilitySchema = z14.enum(["default", "advanced"]);
1787
1851
  projectWorkspaceFields = {
1788
- name: z13.string().min(1).optional(),
1852
+ name: z14.string().min(1).optional(),
1789
1853
  sourceType: projectWorkspaceSourceTypeSchema.optional(),
1790
- cwd: z13.string().min(1).optional().nullable(),
1791
- repoUrl: z13.string().url().optional().nullable(),
1792
- repoRef: z13.string().optional().nullable(),
1793
- defaultRef: z13.string().optional().nullable(),
1854
+ cwd: z14.string().min(1).optional().nullable(),
1855
+ repoUrl: z14.string().url().optional().nullable(),
1856
+ repoRef: z14.string().optional().nullable(),
1857
+ defaultRef: z14.string().optional().nullable(),
1794
1858
  visibility: projectWorkspaceVisibilitySchema.optional(),
1795
- setupCommand: z13.string().optional().nullable(),
1796
- cleanupCommand: z13.string().optional().nullable(),
1797
- remoteProvider: z13.string().optional().nullable(),
1798
- remoteWorkspaceRef: z13.string().optional().nullable(),
1799
- sharedWorkspaceKey: z13.string().optional().nullable(),
1800
- metadata: z13.record(z13.unknown()).optional().nullable()
1859
+ setupCommand: z14.string().optional().nullable(),
1860
+ cleanupCommand: z14.string().optional().nullable(),
1861
+ remoteProvider: z14.string().optional().nullable(),
1862
+ remoteWorkspaceRef: z14.string().optional().nullable(),
1863
+ sharedWorkspaceKey: z14.string().optional().nullable(),
1864
+ metadata: z14.record(z14.unknown()).optional().nullable()
1801
1865
  };
1802
1866
  projectColorValues = new Set(PROJECT_COLORS);
1803
- legacyProjectColorSchema = z13.string().regex(/^#[0-9a-fA-F]{6}$/);
1804
- projectColorSchema = z13.string().refine((value) => legacyProjectColorSchema.safeParse(value).success || projectColorValues.has(value), "Color must be a 6-digit hex value or a supported project gradient");
1805
- projectIconSchema = z13.enum(PROJECT_ICONS);
1806
- createProjectWorkspaceSchema = z13.object({
1867
+ legacyProjectColorSchema = z14.string().regex(/^#[0-9a-fA-F]{6}$/);
1868
+ projectColorSchema = z14.string().refine((value) => legacyProjectColorSchema.safeParse(value).success || projectColorValues.has(value), "Color must be a 6-digit hex value or a supported project gradient");
1869
+ projectIconSchema = z14.enum(PROJECT_ICONS);
1870
+ createProjectWorkspaceSchema = z14.object({
1807
1871
  ...projectWorkspaceFields,
1808
- isPrimary: z13.boolean().optional().default(false)
1872
+ isPrimary: z14.boolean().optional().default(false)
1809
1873
  }).superRefine(validateProjectWorkspace);
1810
- updateProjectWorkspaceSchema = z13.object({
1874
+ updateProjectWorkspaceSchema = z14.object({
1811
1875
  ...projectWorkspaceFields,
1812
- isPrimary: z13.boolean().optional()
1876
+ isPrimary: z14.boolean().optional()
1813
1877
  }).partial();
1814
1878
  projectFields = {
1815
1879
  /** @deprecated Use goalIds instead */
1816
- goalId: z13.string().uuid().optional().nullable(),
1817
- goalIds: z13.array(z13.string().uuid()).optional(),
1818
- name: z13.string().min(1),
1819
- description: z13.string().optional().nullable(),
1820
- status: z13.enum(PROJECT_STATUSES).optional().default("backlog"),
1821
- leadAgentId: z13.string().uuid().optional().nullable(),
1822
- targetDate: z13.string().optional().nullable(),
1880
+ goalId: z14.string().uuid().optional().nullable(),
1881
+ goalIds: z14.array(z14.string().uuid()).optional(),
1882
+ name: z14.string().min(1),
1883
+ description: z14.string().optional().nullable(),
1884
+ status: z14.enum(PROJECT_STATUSES).optional().default("backlog"),
1885
+ leadAgentId: z14.string().uuid().optional().nullable(),
1886
+ targetDate: z14.string().optional().nullable(),
1823
1887
  color: projectColorSchema.optional().nullable(),
1824
1888
  icon: projectIconSchema.optional().nullable(),
1825
1889
  executionWorkspacePolicy: projectExecutionWorkspacePolicySchema.optional().nullable(),
1826
- resourceAttachments: z13.array(projectResourceAttachmentInputSchema).optional(),
1827
- newResources: z13.array(createProjectInlineResourceSchema).optional(),
1828
- archivedAt: z13.string().datetime().optional().nullable()
1890
+ resourceAttachments: z14.array(projectResourceAttachmentInputSchema).optional(),
1891
+ newResources: z14.array(createProjectInlineResourceSchema).optional(),
1892
+ archivedAt: z14.string().datetime().optional().nullable()
1829
1893
  };
1830
- createProjectSchema = z13.object({
1894
+ createProjectSchema = z14.object({
1831
1895
  ...projectFields
1832
1896
  });
1833
- updateProjectSchema = z13.object(projectFields).partial();
1897
+ updateProjectSchema = z14.object(projectFields).partial();
1834
1898
  }
1835
1899
  });
1836
1900
 
1837
1901
  // ../packages/shared/dist/validators/issue.js
1838
- import { z as z14 } from "zod";
1902
+ import { z as z15 } from "zod";
1839
1903
  var runWorkspaceStrategySchema, issueRunWorkspaceSettingsSchema, issueAssigneeAdapterOverridesSchema, createIssueSchema, createIssueLabelSchema, updateIssueLabelSchema, updateIssueSchema, reorderIssueSchema, checkoutIssueSchema, addIssueCommentSchema, updateIssueCommentSchema, reportIssueCommitSchema, linkIssueApprovalSchema, createIssueAttachmentMetadataSchema, createIssueWorkspaceAttachmentSchema, ISSUE_DOCUMENT_FORMATS, issueDocumentFormatSchema, createLibraryDocumentSchema, updateLibraryDocumentSchema, restoreLibraryDocumentRevisionSchema;
1840
1904
  var init_issue = __esm({
1841
1905
  "../packages/shared/dist/validators/issue.js"() {
1842
1906
  "use strict";
1843
1907
  init_constants();
1844
- runWorkspaceStrategySchema = z14.object({
1845
- type: z14.enum(["project_primary", "git_worktree", "adapter_managed", "cloud_sandbox"]).optional(),
1846
- baseRef: z14.string().optional().nullable(),
1847
- branchTemplate: z14.string().optional().nullable(),
1848
- worktreeParentDir: z14.string().optional().nullable(),
1849
- provisionCommand: z14.string().optional().nullable(),
1850
- teardownCommand: z14.string().optional().nullable()
1908
+ runWorkspaceStrategySchema = z15.object({
1909
+ type: z15.enum(["project_primary", "git_worktree", "adapter_managed", "cloud_sandbox"]).optional(),
1910
+ baseRef: z15.string().optional().nullable(),
1911
+ branchTemplate: z15.string().optional().nullable(),
1912
+ worktreeParentDir: z15.string().optional().nullable(),
1913
+ provisionCommand: z15.string().optional().nullable(),
1914
+ teardownCommand: z15.string().optional().nullable()
1851
1915
  }).strict();
1852
- issueRunWorkspaceSettingsSchema = z14.object({
1853
- mode: z14.enum(["inherit", "shared_workspace", "isolated_workspace", "operator_branch", "reuse_existing", "agent_default"]).optional(),
1916
+ issueRunWorkspaceSettingsSchema = z15.object({
1917
+ mode: z15.enum(["inherit", "shared_workspace", "isolated_workspace", "operator_branch", "reuse_existing", "agent_default"]).optional(),
1854
1918
  workspaceStrategy: runWorkspaceStrategySchema.optional().nullable(),
1855
- workspaceRuntime: z14.record(z14.unknown()).optional().nullable()
1919
+ workspaceRuntime: z15.record(z15.unknown()).optional().nullable()
1856
1920
  }).strict();
1857
- issueAssigneeAdapterOverridesSchema = z14.object({
1858
- agentRuntimeConfig: z14.record(z14.unknown()).optional(),
1859
- useProjectWorkspace: z14.boolean().optional()
1921
+ issueAssigneeAdapterOverridesSchema = z15.object({
1922
+ agentRuntimeConfig: z15.record(z15.unknown()).optional(),
1923
+ useProjectWorkspace: z15.boolean().optional()
1860
1924
  }).strict();
1861
- createIssueSchema = z14.object({
1862
- projectId: z14.string().uuid().optional().nullable(),
1863
- projectWorkspaceId: z14.string().uuid().optional().nullable(),
1864
- goalId: z14.string().uuid().optional().nullable(),
1865
- parentId: z14.string().uuid().optional().nullable(),
1866
- title: z14.string().min(1),
1867
- description: z14.string().optional().nullable(),
1868
- status: z14.enum(ISSUE_STATUSES).optional().default("backlog"),
1869
- priority: z14.enum(ISSUE_PRIORITIES).optional().default("medium"),
1870
- assigneeAgentId: z14.string().uuid().optional().nullable(),
1871
- assigneeUserId: z14.string().optional().nullable(),
1872
- reviewerAgentId: z14.string().uuid().optional().nullable(),
1873
- reviewerUserId: z14.string().optional().nullable(),
1874
- requestDepth: z14.number().int().nonnegative().optional().default(0),
1875
- billingCode: z14.string().optional().nullable(),
1925
+ createIssueSchema = z15.object({
1926
+ projectId: z15.string().uuid().optional().nullable(),
1927
+ projectWorkspaceId: z15.string().uuid().optional().nullable(),
1928
+ goalId: z15.string().uuid().optional().nullable(),
1929
+ parentId: z15.string().uuid().optional().nullable(),
1930
+ title: z15.string().min(1),
1931
+ description: z15.string().optional().nullable(),
1932
+ status: z15.enum(ISSUE_STATUSES).optional().default("backlog"),
1933
+ priority: z15.enum(ISSUE_PRIORITIES).optional().default("medium"),
1934
+ assigneeAgentId: z15.string().uuid().optional().nullable(),
1935
+ assigneeUserId: z15.string().optional().nullable(),
1936
+ reviewerAgentId: z15.string().uuid().optional().nullable(),
1937
+ reviewerUserId: z15.string().optional().nullable(),
1938
+ requestDepth: z15.number().int().nonnegative().optional().default(0),
1939
+ billingCode: z15.string().optional().nullable(),
1876
1940
  assigneeAgentRuntimeOverrides: issueAssigneeAdapterOverridesSchema.optional().nullable(),
1877
- runWorkspaceId: z14.string().uuid().optional().nullable(),
1878
- runWorkspacePreference: z14.enum([
1941
+ runWorkspaceId: z15.string().uuid().optional().nullable(),
1942
+ runWorkspacePreference: z15.enum([
1879
1943
  "inherit",
1880
1944
  "shared_workspace",
1881
1945
  "isolated_workspace",
@@ -1885,9 +1949,9 @@ var init_issue = __esm({
1885
1949
  ]).optional().nullable(),
1886
1950
  runWorkspaceSettings: issueRunWorkspaceSettingsSchema.optional().nullable(),
1887
1951
  /** @deprecated Use runWorkspaceId. */
1888
- executionWorkspaceId: z14.string().uuid().optional().nullable(),
1952
+ executionWorkspaceId: z15.string().uuid().optional().nullable(),
1889
1953
  /** @deprecated Use runWorkspacePreference. */
1890
- executionWorkspacePreference: z14.enum([
1954
+ executionWorkspacePreference: z15.enum([
1891
1955
  "inherit",
1892
1956
  "shared_workspace",
1893
1957
  "isolated_workspace",
@@ -1897,88 +1961,88 @@ var init_issue = __esm({
1897
1961
  ]).optional().nullable(),
1898
1962
  /** @deprecated Use runWorkspaceSettings. */
1899
1963
  executionWorkspaceSettings: issueRunWorkspaceSettingsSchema.optional().nullable(),
1900
- labelIds: z14.array(z14.string().uuid()).optional()
1964
+ labelIds: z15.array(z15.string().uuid()).optional()
1901
1965
  });
1902
- createIssueLabelSchema = z14.object({
1903
- name: z14.string().trim().min(1).max(48),
1904
- color: z14.string().regex(/^#(?:[0-9a-fA-F]{6})$/, "Color must be a 6-digit hex value")
1966
+ createIssueLabelSchema = z15.object({
1967
+ name: z15.string().trim().min(1).max(48),
1968
+ color: z15.string().regex(/^#(?:[0-9a-fA-F]{6})$/, "Color must be a 6-digit hex value")
1905
1969
  });
1906
1970
  updateIssueLabelSchema = createIssueLabelSchema.partial().refine((value) => value.name !== void 0 || value.color !== void 0, {
1907
1971
  message: "At least one label field must be provided"
1908
1972
  });
1909
1973
  updateIssueSchema = createIssueSchema.partial().extend({
1910
- comment: z14.string().min(1).optional(),
1911
- reopen: z14.boolean().optional(),
1912
- hiddenAt: z14.string().datetime().nullable().optional(),
1913
- reviewDecision: z14.enum(["approve", "request_changes", "needs_followup", "blocked"]).optional()
1914
- });
1915
- reorderIssueSchema = z14.object({
1916
- issueId: z14.string().uuid(),
1917
- targetStatus: z14.enum(ISSUE_STATUSES),
1918
- previousIssueId: z14.string().uuid().optional().nullable(),
1919
- nextIssueId: z14.string().uuid().optional().nullable(),
1920
- position: z14.enum(["start", "end"]).optional()
1974
+ comment: z15.string().min(1).optional(),
1975
+ reopen: z15.boolean().optional(),
1976
+ hiddenAt: z15.string().datetime().nullable().optional(),
1977
+ reviewDecision: z15.enum(["approve", "request_changes", "needs_followup", "blocked"]).optional()
1978
+ });
1979
+ reorderIssueSchema = z15.object({
1980
+ issueId: z15.string().uuid(),
1981
+ targetStatus: z15.enum(ISSUE_STATUSES),
1982
+ previousIssueId: z15.string().uuid().optional().nullable(),
1983
+ nextIssueId: z15.string().uuid().optional().nullable(),
1984
+ position: z15.enum(["start", "end"]).optional()
1921
1985
  }).refine((value) => !(value.previousIssueId && value.nextIssueId && value.previousIssueId === value.nextIssueId), {
1922
1986
  message: "previousIssueId and nextIssueId must be different"
1923
1987
  });
1924
- checkoutIssueSchema = z14.object({
1925
- agentId: z14.string().uuid(),
1926
- expectedStatuses: z14.array(z14.enum(ISSUE_STATUSES)).nonempty()
1988
+ checkoutIssueSchema = z15.object({
1989
+ agentId: z15.string().uuid(),
1990
+ expectedStatuses: z15.array(z15.enum(ISSUE_STATUSES)).nonempty()
1927
1991
  });
1928
- addIssueCommentSchema = z14.object({
1929
- body: z14.string().min(1),
1930
- reopen: z14.boolean().optional(),
1931
- interrupt: z14.boolean().optional()
1992
+ addIssueCommentSchema = z15.object({
1993
+ body: z15.string().min(1),
1994
+ reopen: z15.boolean().optional(),
1995
+ interrupt: z15.boolean().optional()
1932
1996
  });
1933
- updateIssueCommentSchema = z14.object({
1934
- body: z14.string().trim().min(1)
1997
+ updateIssueCommentSchema = z15.object({
1998
+ body: z15.string().trim().min(1)
1935
1999
  });
1936
- reportIssueCommitSchema = z14.object({
1937
- sha: z14.string().trim().regex(/^[0-9a-f]{7,64}$/i, "Commit SHA must be 7 to 64 hexadecimal characters"),
1938
- message: z14.string().trim().min(1).max(500),
1939
- branch: z14.string().trim().min(1).max(255).optional().nullable(),
1940
- repoPath: z14.string().trim().min(1).max(2048).optional().nullable(),
1941
- workspacePath: z14.string().trim().min(1).max(2048).optional().nullable(),
1942
- commitCount: z14.number().int().positive().max(1e3).optional()
2000
+ reportIssueCommitSchema = z15.object({
2001
+ sha: z15.string().trim().regex(/^[0-9a-f]{7,64}$/i, "Commit SHA must be 7 to 64 hexadecimal characters"),
2002
+ message: z15.string().trim().min(1).max(500),
2003
+ branch: z15.string().trim().min(1).max(255).optional().nullable(),
2004
+ repoPath: z15.string().trim().min(1).max(2048).optional().nullable(),
2005
+ workspacePath: z15.string().trim().min(1).max(2048).optional().nullable(),
2006
+ commitCount: z15.number().int().positive().max(1e3).optional()
1943
2007
  });
1944
- linkIssueApprovalSchema = z14.object({
1945
- approvalId: z14.string().uuid()
2008
+ linkIssueApprovalSchema = z15.object({
2009
+ approvalId: z15.string().uuid()
1946
2010
  });
1947
- createIssueAttachmentMetadataSchema = z14.object({
1948
- issueCommentId: z14.string().uuid().optional().nullable(),
1949
- usage: z14.enum(["issue", "description_inline", "document_inline", "comment_inline", "comment_attachment"]).optional()
2011
+ createIssueAttachmentMetadataSchema = z15.object({
2012
+ issueCommentId: z15.string().uuid().optional().nullable(),
2013
+ usage: z15.enum(["issue", "description_inline", "document_inline", "comment_inline", "comment_attachment"]).optional()
1950
2014
  });
1951
- createIssueWorkspaceAttachmentSchema = z14.object({
1952
- path: z14.string().trim().min(1).max(2048)
2015
+ createIssueWorkspaceAttachmentSchema = z15.object({
2016
+ path: z15.string().trim().min(1).max(2048)
1953
2017
  });
1954
2018
  ISSUE_DOCUMENT_FORMATS = ["markdown"];
1955
- issueDocumentFormatSchema = z14.enum(ISSUE_DOCUMENT_FORMATS);
1956
- createLibraryDocumentSchema = z14.object({
1957
- title: z14.string().trim().max(200).nullable().optional(),
2019
+ issueDocumentFormatSchema = z15.enum(ISSUE_DOCUMENT_FORMATS);
2020
+ createLibraryDocumentSchema = z15.object({
2021
+ title: z15.string().trim().max(200).nullable().optional(),
1958
2022
  format: issueDocumentFormatSchema.optional().default("markdown"),
1959
- body: z14.string().max(524288).optional().default(""),
1960
- changeSummary: z14.string().trim().max(500).nullable().optional()
2023
+ body: z15.string().max(524288).optional().default(""),
2024
+ changeSummary: z15.string().trim().max(500).nullable().optional()
1961
2025
  });
1962
- updateLibraryDocumentSchema = z14.object({
1963
- title: z14.string().trim().max(200).nullable().optional(),
2026
+ updateLibraryDocumentSchema = z15.object({
2027
+ title: z15.string().trim().max(200).nullable().optional(),
1964
2028
  format: issueDocumentFormatSchema.optional().default("markdown"),
1965
- body: z14.string().max(524288),
1966
- changeSummary: z14.string().trim().max(500).nullable().optional(),
1967
- baseRevisionId: z14.string().uuid().nullable().optional()
2029
+ body: z15.string().max(524288),
2030
+ changeSummary: z15.string().trim().max(500).nullable().optional(),
2031
+ baseRevisionId: z15.string().uuid().nullable().optional()
1968
2032
  });
1969
- restoreLibraryDocumentRevisionSchema = z14.object({
1970
- changeSummary: z14.string().trim().max(500).nullable().optional()
2033
+ restoreLibraryDocumentRevisionSchema = z15.object({
2034
+ changeSummary: z15.string().trim().max(500).nullable().optional()
1971
2035
  });
1972
2036
  }
1973
2037
  });
1974
2038
 
1975
2039
  // ../packages/shared/dist/validators/work-product.js
1976
- import { z as z15 } from "zod";
2040
+ import { z as z16 } from "zod";
1977
2041
  var issueWorkProductTypeSchema, issueWorkProductStatusSchema, issueWorkProductReviewStateSchema, createIssueWorkProductSchema, updateIssueWorkProductSchema;
1978
2042
  var init_work_product = __esm({
1979
2043
  "../packages/shared/dist/validators/work-product.js"() {
1980
2044
  "use strict";
1981
- issueWorkProductTypeSchema = z15.enum([
2045
+ issueWorkProductTypeSchema = z16.enum([
1982
2046
  "preview_url",
1983
2047
  "runtime_service",
1984
2048
  "pull_request",
@@ -1987,7 +2051,7 @@ var init_work_product = __esm({
1987
2051
  "artifact",
1988
2052
  "document"
1989
2053
  ]);
1990
- issueWorkProductStatusSchema = z15.enum([
2054
+ issueWorkProductStatusSchema = z16.enum([
1991
2055
  "active",
1992
2056
  "ready_for_review",
1993
2057
  "approved",
@@ -1998,125 +2062,125 @@ var init_work_product = __esm({
1998
2062
  "archived",
1999
2063
  "draft"
2000
2064
  ]);
2001
- issueWorkProductReviewStateSchema = z15.enum([
2065
+ issueWorkProductReviewStateSchema = z16.enum([
2002
2066
  "none",
2003
2067
  "needs_board_review",
2004
2068
  "approved",
2005
2069
  "changes_requested"
2006
2070
  ]);
2007
- createIssueWorkProductSchema = z15.object({
2008
- projectId: z15.string().uuid().optional().nullable(),
2009
- runWorkspaceId: z15.string().uuid().optional().nullable(),
2071
+ createIssueWorkProductSchema = z16.object({
2072
+ projectId: z16.string().uuid().optional().nullable(),
2073
+ runWorkspaceId: z16.string().uuid().optional().nullable(),
2010
2074
  /** @deprecated Use runWorkspaceId. */
2011
- executionWorkspaceId: z15.string().uuid().optional().nullable(),
2012
- runtimeServiceId: z15.string().uuid().optional().nullable(),
2075
+ executionWorkspaceId: z16.string().uuid().optional().nullable(),
2076
+ runtimeServiceId: z16.string().uuid().optional().nullable(),
2013
2077
  type: issueWorkProductTypeSchema,
2014
- provider: z15.string().min(1),
2015
- externalId: z15.string().optional().nullable(),
2016
- title: z15.string().min(1),
2017
- url: z15.string().url().optional().nullable(),
2078
+ provider: z16.string().min(1),
2079
+ externalId: z16.string().optional().nullable(),
2080
+ title: z16.string().min(1),
2081
+ url: z16.string().url().optional().nullable(),
2018
2082
  status: issueWorkProductStatusSchema.default("active"),
2019
2083
  reviewState: issueWorkProductReviewStateSchema.optional().default("none"),
2020
- isPrimary: z15.boolean().optional().default(false),
2021
- healthStatus: z15.enum(["unknown", "healthy", "unhealthy"]).optional().default("unknown"),
2022
- summary: z15.string().optional().nullable(),
2023
- metadata: z15.record(z15.unknown()).optional().nullable(),
2024
- createdByRunId: z15.string().uuid().optional().nullable()
2084
+ isPrimary: z16.boolean().optional().default(false),
2085
+ healthStatus: z16.enum(["unknown", "healthy", "unhealthy"]).optional().default("unknown"),
2086
+ summary: z16.string().optional().nullable(),
2087
+ metadata: z16.record(z16.unknown()).optional().nullable(),
2088
+ createdByRunId: z16.string().uuid().optional().nullable()
2025
2089
  });
2026
2090
  updateIssueWorkProductSchema = createIssueWorkProductSchema.partial();
2027
2091
  }
2028
2092
  });
2029
2093
 
2030
2094
  // ../packages/shared/dist/validators/execution-workspace.js
2031
- import { z as z16 } from "zod";
2095
+ import { z as z17 } from "zod";
2032
2096
  var runWorkspaceStatusSchema, updateRunWorkspaceSchema;
2033
2097
  var init_execution_workspace = __esm({
2034
2098
  "../packages/shared/dist/validators/execution-workspace.js"() {
2035
2099
  "use strict";
2036
- runWorkspaceStatusSchema = z16.enum([
2100
+ runWorkspaceStatusSchema = z17.enum([
2037
2101
  "active",
2038
2102
  "idle",
2039
2103
  "in_review",
2040
2104
  "archived",
2041
2105
  "cleanup_failed"
2042
2106
  ]);
2043
- updateRunWorkspaceSchema = z16.object({
2107
+ updateRunWorkspaceSchema = z17.object({
2044
2108
  status: runWorkspaceStatusSchema.optional(),
2045
- cleanupEligibleAt: z16.string().datetime().optional().nullable(),
2046
- cleanupReason: z16.string().optional().nullable(),
2047
- metadata: z16.record(z16.unknown()).optional().nullable()
2109
+ cleanupEligibleAt: z17.string().datetime().optional().nullable(),
2110
+ cleanupReason: z17.string().optional().nullable(),
2111
+ metadata: z17.record(z17.unknown()).optional().nullable()
2048
2112
  }).strict();
2049
2113
  }
2050
2114
  });
2051
2115
 
2052
2116
  // ../packages/shared/dist/validators/workspace-backup.js
2053
- import { z as z17 } from "zod";
2117
+ import { z as z18 } from "zod";
2054
2118
  var workspaceBackupTriggerSourceSchema, createWorkspaceBackupSchema, restoreWorkspaceBackupSchema;
2055
2119
  var init_workspace_backup2 = __esm({
2056
2120
  "../packages/shared/dist/validators/workspace-backup.js"() {
2057
2121
  "use strict";
2058
- workspaceBackupTriggerSourceSchema = z17.enum(["manual", "scheduled", "pre_restore"]);
2059
- createWorkspaceBackupSchema = z17.object({
2122
+ workspaceBackupTriggerSourceSchema = z18.enum(["manual", "scheduled", "pre_restore"]);
2123
+ createWorkspaceBackupSchema = z18.object({
2060
2124
  triggerSource: workspaceBackupTriggerSourceSchema.optional().default("manual")
2061
2125
  }).strict();
2062
- restoreWorkspaceBackupSchema = z17.object({
2063
- confirm: z17.literal(true)
2126
+ restoreWorkspaceBackupSchema = z18.object({
2127
+ confirm: z18.literal(true)
2064
2128
  }).strict();
2065
2129
  }
2066
2130
  });
2067
2131
 
2068
2132
  // ../packages/shared/dist/validators/goal.js
2069
- import { z as z18 } from "zod";
2133
+ import { z as z19 } from "zod";
2070
2134
  var createGoalSchema, updateGoalSchema;
2071
2135
  var init_goal = __esm({
2072
2136
  "../packages/shared/dist/validators/goal.js"() {
2073
2137
  "use strict";
2074
2138
  init_constants();
2075
- createGoalSchema = z18.object({
2076
- title: z18.string().min(1),
2077
- description: z18.string().optional().nullable(),
2078
- level: z18.enum(GOAL_LEVELS).optional().default("task"),
2079
- status: z18.enum(GOAL_STATUSES).optional().default("planned"),
2080
- parentId: z18.string().uuid().optional().nullable(),
2081
- ownerAgentId: z18.string().uuid().optional().nullable()
2139
+ createGoalSchema = z19.object({
2140
+ title: z19.string().min(1),
2141
+ description: z19.string().optional().nullable(),
2142
+ level: z19.enum(GOAL_LEVELS).optional().default("task"),
2143
+ status: z19.enum(GOAL_STATUSES).optional().default("planned"),
2144
+ parentId: z19.string().uuid().optional().nullable(),
2145
+ ownerAgentId: z19.string().uuid().optional().nullable()
2082
2146
  });
2083
2147
  updateGoalSchema = createGoalSchema.partial();
2084
2148
  }
2085
2149
  });
2086
2150
 
2087
2151
  // ../packages/shared/dist/validators/approval.js
2088
- import { z as z19 } from "zod";
2152
+ import { z as z20 } from "zod";
2089
2153
  var createApprovalSchema, resolveApprovalSchema, requestApprovalRevisionSchema, resubmitApprovalSchema, addApprovalCommentSchema;
2090
2154
  var init_approval = __esm({
2091
2155
  "../packages/shared/dist/validators/approval.js"() {
2092
2156
  "use strict";
2093
2157
  init_constants();
2094
- createApprovalSchema = z19.object({
2095
- type: z19.enum(APPROVAL_TYPES),
2096
- requestedByAgentId: z19.string().uuid().optional().nullable(),
2097
- payload: z19.record(z19.unknown()),
2098
- issueIds: z19.array(z19.string().uuid()).optional()
2158
+ createApprovalSchema = z20.object({
2159
+ type: z20.enum(APPROVAL_TYPES),
2160
+ requestedByAgentId: z20.string().uuid().optional().nullable(),
2161
+ payload: z20.record(z20.unknown()),
2162
+ issueIds: z20.array(z20.string().uuid()).optional()
2099
2163
  });
2100
- resolveApprovalSchema = z19.object({
2101
- decisionNote: z19.string().optional().nullable(),
2102
- decidedByUserId: z19.string().optional().default("board"),
2103
- payload: z19.record(z19.unknown()).optional()
2164
+ resolveApprovalSchema = z20.object({
2165
+ decisionNote: z20.string().optional().nullable(),
2166
+ decidedByUserId: z20.string().optional().default("board"),
2167
+ payload: z20.record(z20.unknown()).optional()
2104
2168
  });
2105
- requestApprovalRevisionSchema = z19.object({
2106
- decisionNote: z19.string().optional().nullable(),
2107
- decidedByUserId: z19.string().optional().default("board")
2169
+ requestApprovalRevisionSchema = z20.object({
2170
+ decisionNote: z20.string().optional().nullable(),
2171
+ decidedByUserId: z20.string().optional().default("board")
2108
2172
  });
2109
- resubmitApprovalSchema = z19.object({
2110
- payload: z19.record(z19.unknown()).optional()
2173
+ resubmitApprovalSchema = z20.object({
2174
+ payload: z20.record(z20.unknown()).optional()
2111
2175
  });
2112
- addApprovalCommentSchema = z19.object({
2113
- body: z19.string().min(1)
2176
+ addApprovalCommentSchema = z20.object({
2177
+ body: z20.string().min(1)
2114
2178
  });
2115
2179
  }
2116
2180
  });
2117
2181
 
2118
2182
  // ../packages/shared/dist/validators/automation.js
2119
- import { z as z20 } from "zod";
2183
+ import { z as z21 } from "zod";
2120
2184
  function normalizeAutomationInstructions(value) {
2121
2185
  const { instructions, ...rest } = value;
2122
2186
  return {
@@ -2134,27 +2198,27 @@ var init_automation = __esm({
2134
2198
  "../packages/shared/dist/validators/automation.js"() {
2135
2199
  "use strict";
2136
2200
  init_constants();
2137
- automationTextFieldSchema = z20.string().optional().nullable();
2138
- automationBodyFieldsSchema = z20.object({
2139
- projectId: z20.string().uuid().optional().nullable().default(null),
2140
- goalId: z20.string().uuid().optional().nullable(),
2141
- parentIssueId: z20.string().uuid().optional().nullable(),
2142
- title: z20.string().trim().min(1).max(200),
2201
+ automationTextFieldSchema = z21.string().optional().nullable();
2202
+ automationBodyFieldsSchema = z21.object({
2203
+ projectId: z21.string().uuid().optional().nullable().default(null),
2204
+ goalId: z21.string().uuid().optional().nullable(),
2205
+ parentIssueId: z21.string().uuid().optional().nullable(),
2206
+ title: z21.string().trim().min(1).max(200),
2143
2207
  instructions: automationTextFieldSchema,
2144
2208
  description: automationTextFieldSchema,
2145
- assigneeAgentId: z20.string().uuid(),
2146
- priority: z20.enum(ISSUE_PRIORITIES).optional().default("medium"),
2147
- status: z20.enum(AUTOMATION_STATUSES).optional().default("active"),
2148
- concurrencyPolicy: z20.enum(AUTOMATION_CONCURRENCY_POLICIES).optional().default("coalesce_if_active"),
2149
- catchUpPolicy: z20.enum(AUTOMATION_CATCH_UP_POLICIES).optional().default("skip_missed"),
2150
- outputMode: z20.enum(AUTOMATION_OUTPUT_MODES).optional().default("track_issue"),
2151
- chatConversationId: z20.string().uuid().optional().nullable().default(null),
2152
- notifyOnIssueCreated: z20.boolean().optional().default(false)
2209
+ assigneeAgentId: z21.string().uuid(),
2210
+ priority: z21.enum(ISSUE_PRIORITIES).optional().default("medium"),
2211
+ status: z21.enum(AUTOMATION_STATUSES).optional().default("active"),
2212
+ concurrencyPolicy: z21.enum(AUTOMATION_CONCURRENCY_POLICIES).optional().default("coalesce_if_active"),
2213
+ catchUpPolicy: z21.enum(AUTOMATION_CATCH_UP_POLICIES).optional().default("skip_missed"),
2214
+ outputMode: z21.enum(AUTOMATION_OUTPUT_MODES).optional().default("track_issue"),
2215
+ chatConversationId: z21.string().uuid().optional().nullable().default(null),
2216
+ notifyOnIssueCreated: z21.boolean().optional().default(false)
2153
2217
  });
2154
2218
  createAutomationSchema = automationBodyFieldsSchema.superRefine((value, ctx) => {
2155
2219
  if (value.chatConversationId) {
2156
2220
  ctx.addIssue({
2157
- code: z20.ZodIssueCode.custom,
2221
+ code: z21.ZodIssueCode.custom,
2158
2222
  path: ["chatConversationId"],
2159
2223
  message: "Chat output creates an automation-owned conversation; existing chats cannot be selected"
2160
2224
  });
@@ -2163,185 +2227,185 @@ var init_automation = __esm({
2163
2227
  updateAutomationSchema = automationBodyFieldsSchema.partial().superRefine((value, ctx) => {
2164
2228
  if (value.chatConversationId) {
2165
2229
  ctx.addIssue({
2166
- code: z20.ZodIssueCode.custom,
2230
+ code: z21.ZodIssueCode.custom,
2167
2231
  path: ["chatConversationId"],
2168
2232
  message: "Chat output creates an automation-owned conversation; existing chats cannot be selected"
2169
2233
  });
2170
2234
  }
2171
2235
  }).transform(normalizeAutomationInstructions).transform(normalizeAutomationNotifications);
2172
- baseTriggerSchema = z20.object({
2173
- label: z20.string().trim().max(120).optional().nullable(),
2174
- enabled: z20.boolean().optional().default(true)
2236
+ baseTriggerSchema = z21.object({
2237
+ label: z21.string().trim().max(120).optional().nullable(),
2238
+ enabled: z21.boolean().optional().default(true)
2175
2239
  });
2176
- createAutomationTriggerSchema = z20.discriminatedUnion("kind", [
2240
+ createAutomationTriggerSchema = z21.discriminatedUnion("kind", [
2177
2241
  baseTriggerSchema.extend({
2178
- kind: z20.literal("schedule"),
2179
- cronExpression: z20.string().trim().min(1),
2180
- timezone: z20.string().trim().min(1).default("UTC")
2242
+ kind: z21.literal("schedule"),
2243
+ cronExpression: z21.string().trim().min(1),
2244
+ timezone: z21.string().trim().min(1).default("UTC")
2181
2245
  }),
2182
2246
  baseTriggerSchema.extend({
2183
- kind: z20.literal("webhook"),
2184
- signingMode: z20.enum(AUTOMATION_TRIGGER_SIGNING_MODES).optional().default("bearer"),
2185
- replayWindowSec: z20.number().int().min(30).max(86400).optional().default(300)
2247
+ kind: z21.literal("webhook"),
2248
+ signingMode: z21.enum(AUTOMATION_TRIGGER_SIGNING_MODES).optional().default("bearer"),
2249
+ replayWindowSec: z21.number().int().min(30).max(86400).optional().default(300)
2186
2250
  }),
2187
2251
  baseTriggerSchema.extend({
2188
- kind: z20.literal("api")
2252
+ kind: z21.literal("api")
2189
2253
  })
2190
2254
  ]);
2191
- updateAutomationTriggerSchema = z20.object({
2192
- label: z20.string().trim().max(120).optional().nullable(),
2193
- enabled: z20.boolean().optional(),
2194
- cronExpression: z20.string().trim().min(1).optional().nullable(),
2195
- timezone: z20.string().trim().min(1).optional().nullable(),
2196
- signingMode: z20.enum(AUTOMATION_TRIGGER_SIGNING_MODES).optional().nullable(),
2197
- replayWindowSec: z20.number().int().min(30).max(86400).optional().nullable()
2198
- });
2199
- runAutomationSchema = z20.object({
2200
- triggerId: z20.string().uuid().optional().nullable(),
2201
- payload: z20.record(z20.unknown()).optional().nullable(),
2202
- idempotencyKey: z20.string().trim().max(255).optional().nullable(),
2203
- source: z20.enum(["manual", "api"]).optional().default("manual")
2204
- });
2205
- rotateAutomationTriggerSecretSchema = z20.object({});
2255
+ updateAutomationTriggerSchema = z21.object({
2256
+ label: z21.string().trim().max(120).optional().nullable(),
2257
+ enabled: z21.boolean().optional(),
2258
+ cronExpression: z21.string().trim().min(1).optional().nullable(),
2259
+ timezone: z21.string().trim().min(1).optional().nullable(),
2260
+ signingMode: z21.enum(AUTOMATION_TRIGGER_SIGNING_MODES).optional().nullable(),
2261
+ replayWindowSec: z21.number().int().min(30).max(86400).optional().nullable()
2262
+ });
2263
+ runAutomationSchema = z21.object({
2264
+ triggerId: z21.string().uuid().optional().nullable(),
2265
+ payload: z21.record(z21.unknown()).optional().nullable(),
2266
+ idempotencyKey: z21.string().trim().max(255).optional().nullable(),
2267
+ source: z21.enum(["manual", "api"]).optional().default("manual")
2268
+ });
2269
+ rotateAutomationTriggerSecretSchema = z21.object({});
2206
2270
  }
2207
2271
  });
2208
2272
 
2209
2273
  // ../packages/shared/dist/validators/calendar.js
2210
- import { z as z21 } from "zod";
2274
+ import { z as z22 } from "zod";
2211
2275
  var nullableUuid, createCalendarSourceSchema, updateCalendarSourceSchema, calendarEventBaseSchema, createCalendarEventSchema, updateCalendarEventSchema, calendarEventListQuerySchema, googleCalendarSyncSchema, updateGoogleCalendarOAuthConfigSchema;
2212
2276
  var init_calendar = __esm({
2213
2277
  "../packages/shared/dist/validators/calendar.js"() {
2214
2278
  "use strict";
2215
2279
  init_constants();
2216
- nullableUuid = z21.string().uuid().optional().nullable();
2217
- createCalendarSourceSchema = z21.object({
2218
- type: z21.enum(CALENDAR_SOURCE_TYPES).optional().default("rudder_local"),
2219
- name: z21.string().trim().min(1).max(160),
2220
- ownerType: z21.enum(CALENDAR_OWNER_TYPES).optional().default("user"),
2221
- ownerUserId: z21.string().trim().min(1).optional().nullable(),
2280
+ nullableUuid = z22.string().uuid().optional().nullable();
2281
+ createCalendarSourceSchema = z22.object({
2282
+ type: z22.enum(CALENDAR_SOURCE_TYPES).optional().default("rudder_local"),
2283
+ name: z22.string().trim().min(1).max(160),
2284
+ ownerType: z22.enum(CALENDAR_OWNER_TYPES).optional().default("user"),
2285
+ ownerUserId: z22.string().trim().min(1).optional().nullable(),
2222
2286
  ownerAgentId: nullableUuid,
2223
- externalProvider: z21.string().trim().min(1).max(80).optional().nullable(),
2224
- externalCalendarId: z21.string().trim().min(1).max(512).optional().nullable(),
2225
- visibilityDefault: z21.enum(CALENDAR_VISIBILITIES).optional().default("full"),
2226
- status: z21.enum(CALENDAR_SOURCE_STATUSES).optional().default("active"),
2227
- syncCursorJson: z21.record(z21.unknown()).optional().nullable()
2287
+ externalProvider: z22.string().trim().min(1).max(80).optional().nullable(),
2288
+ externalCalendarId: z22.string().trim().min(1).max(512).optional().nullable(),
2289
+ visibilityDefault: z22.enum(CALENDAR_VISIBILITIES).optional().default("full"),
2290
+ status: z22.enum(CALENDAR_SOURCE_STATUSES).optional().default("active"),
2291
+ syncCursorJson: z22.record(z22.unknown()).optional().nullable()
2228
2292
  });
2229
2293
  updateCalendarSourceSchema = createCalendarSourceSchema.partial().extend({
2230
- lastSyncedAt: z21.coerce.date().optional().nullable()
2294
+ lastSyncedAt: z22.coerce.date().optional().nullable()
2231
2295
  });
2232
- calendarEventBaseSchema = z21.object({
2296
+ calendarEventBaseSchema = z22.object({
2233
2297
  sourceId: nullableUuid,
2234
- eventKind: z21.enum(CALENDAR_EVENT_KINDS),
2235
- eventStatus: z21.enum(CALENDAR_EVENT_STATUSES).optional().default("planned"),
2236
- ownerType: z21.enum(CALENDAR_OWNER_TYPES),
2237
- ownerUserId: z21.string().trim().min(1).optional().nullable(),
2298
+ eventKind: z22.enum(CALENDAR_EVENT_KINDS),
2299
+ eventStatus: z22.enum(CALENDAR_EVENT_STATUSES).optional().default("planned"),
2300
+ ownerType: z22.enum(CALENDAR_OWNER_TYPES),
2301
+ ownerUserId: z22.string().trim().min(1).optional().nullable(),
2238
2302
  ownerAgentId: nullableUuid,
2239
- title: z21.string().trim().min(1).max(240),
2240
- description: z21.string().optional().nullable(),
2241
- startAt: z21.coerce.date(),
2242
- endAt: z21.coerce.date(),
2243
- timezone: z21.string().trim().min(1).max(80).optional().default("UTC"),
2244
- allDay: z21.boolean().optional().default(false),
2245
- visibility: z21.enum(CALENDAR_VISIBILITIES).optional().default("full"),
2303
+ title: z22.string().trim().min(1).max(240),
2304
+ description: z22.string().optional().nullable(),
2305
+ startAt: z22.coerce.date(),
2306
+ endAt: z22.coerce.date(),
2307
+ timezone: z22.string().trim().min(1).max(80).optional().default("UTC"),
2308
+ allDay: z22.boolean().optional().default(false),
2309
+ visibility: z22.enum(CALENDAR_VISIBILITIES).optional().default("full"),
2246
2310
  issueId: nullableUuid,
2247
2311
  projectId: nullableUuid,
2248
2312
  goalId: nullableUuid,
2249
2313
  approvalId: nullableUuid,
2250
2314
  heartbeatRunId: nullableUuid,
2251
2315
  activityId: nullableUuid,
2252
- sourceMode: z21.enum(CALENDAR_SOURCE_MODES).optional().default("manual"),
2253
- externalProvider: z21.string().trim().min(1).max(80).optional().nullable(),
2254
- externalCalendarId: z21.string().trim().min(1).max(512).optional().nullable(),
2255
- externalEventId: z21.string().trim().min(1).max(512).optional().nullable(),
2256
- externalEtag: z21.string().trim().min(1).max(512).optional().nullable(),
2257
- externalUpdatedAt: z21.coerce.date().optional().nullable()
2316
+ sourceMode: z22.enum(CALENDAR_SOURCE_MODES).optional().default("manual"),
2317
+ externalProvider: z22.string().trim().min(1).max(80).optional().nullable(),
2318
+ externalCalendarId: z22.string().trim().min(1).max(512).optional().nullable(),
2319
+ externalEventId: z22.string().trim().min(1).max(512).optional().nullable(),
2320
+ externalEtag: z22.string().trim().min(1).max(512).optional().nullable(),
2321
+ externalUpdatedAt: z22.coerce.date().optional().nullable()
2258
2322
  });
2259
2323
  createCalendarEventSchema = calendarEventBaseSchema.refine((value) => value.endAt.getTime() > value.startAt.getTime(), { path: ["endAt"], message: "End time must be after start time" });
2260
2324
  updateCalendarEventSchema = calendarEventBaseSchema.partial().refine((value) => value.startAt === void 0 || value.endAt === void 0 || value.endAt.getTime() > value.startAt.getTime(), { path: ["endAt"], message: "End time must be after start time" });
2261
- calendarEventListQuerySchema = z21.object({
2262
- start: z21.coerce.date(),
2263
- end: z21.coerce.date(),
2264
- agentIds: z21.string().optional(),
2265
- sourceIds: z21.string().optional(),
2266
- eventKinds: z21.string().optional(),
2267
- statuses: z21.string().optional()
2325
+ calendarEventListQuerySchema = z22.object({
2326
+ start: z22.coerce.date(),
2327
+ end: z22.coerce.date(),
2328
+ agentIds: z22.string().optional(),
2329
+ sourceIds: z22.string().optional(),
2330
+ eventKinds: z22.string().optional(),
2331
+ statuses: z22.string().optional()
2268
2332
  }).refine((value) => value.end.getTime() > value.start.getTime(), { path: ["end"], message: "End time must be after start time" });
2269
- googleCalendarSyncSchema = z21.object({
2270
- sourceId: z21.string().uuid().optional().nullable()
2333
+ googleCalendarSyncSchema = z22.object({
2334
+ sourceId: z22.string().uuid().optional().nullable()
2271
2335
  });
2272
- updateGoogleCalendarOAuthConfigSchema = z21.object({
2273
- clientId: z21.string().trim().min(1).max(512).optional(),
2274
- clientSecret: z21.string().trim().min(1).max(2048).optional(),
2275
- clear: z21.boolean().optional().default(false)
2336
+ updateGoogleCalendarOAuthConfigSchema = z22.object({
2337
+ clientId: z22.string().trim().min(1).max(512).optional(),
2338
+ clientSecret: z22.string().trim().min(1).max(2048).optional(),
2339
+ clear: z22.boolean().optional().default(false)
2276
2340
  }).refine((value) => value.clear || value.clientId !== void 0 || value.clientSecret !== void 0, { message: "Provide credentials or clear the stored Google Calendar OAuth configuration" });
2277
2341
  }
2278
2342
  });
2279
2343
 
2280
2344
  // ../packages/shared/dist/validators/cost.js
2281
- import { z as z22 } from "zod";
2345
+ import { z as z23 } from "zod";
2282
2346
  var createCostEventSchema, updateBudgetSchema;
2283
2347
  var init_cost = __esm({
2284
2348
  "../packages/shared/dist/validators/cost.js"() {
2285
2349
  "use strict";
2286
2350
  init_constants();
2287
- createCostEventSchema = z22.object({
2288
- agentId: z22.string().uuid(),
2289
- issueId: z22.string().uuid().optional().nullable(),
2290
- projectId: z22.string().uuid().optional().nullable(),
2291
- goalId: z22.string().uuid().optional().nullable(),
2292
- heartbeatRunId: z22.string().uuid().optional().nullable(),
2293
- billingCode: z22.string().optional().nullable(),
2294
- provider: z22.string().min(1),
2295
- biller: z22.string().min(1).optional(),
2296
- billingType: z22.enum(BILLING_TYPES).optional().default("unknown"),
2297
- model: z22.string().min(1),
2298
- inputTokens: z22.number().int().nonnegative().optional().default(0),
2299
- cachedInputTokens: z22.number().int().nonnegative().optional().default(0),
2300
- outputTokens: z22.number().int().nonnegative().optional().default(0),
2301
- costCents: z22.number().int().nonnegative(),
2302
- occurredAt: z22.string().datetime()
2351
+ createCostEventSchema = z23.object({
2352
+ agentId: z23.string().uuid(),
2353
+ issueId: z23.string().uuid().optional().nullable(),
2354
+ projectId: z23.string().uuid().optional().nullable(),
2355
+ goalId: z23.string().uuid().optional().nullable(),
2356
+ heartbeatRunId: z23.string().uuid().optional().nullable(),
2357
+ billingCode: z23.string().optional().nullable(),
2358
+ provider: z23.string().min(1),
2359
+ biller: z23.string().min(1).optional(),
2360
+ billingType: z23.enum(BILLING_TYPES).optional().default("unknown"),
2361
+ model: z23.string().min(1),
2362
+ inputTokens: z23.number().int().nonnegative().optional().default(0),
2363
+ cachedInputTokens: z23.number().int().nonnegative().optional().default(0),
2364
+ outputTokens: z23.number().int().nonnegative().optional().default(0),
2365
+ costCents: z23.number().int().nonnegative(),
2366
+ occurredAt: z23.string().datetime()
2303
2367
  }).transform((value) => ({
2304
2368
  ...value,
2305
2369
  biller: value.biller ?? value.provider
2306
2370
  }));
2307
- updateBudgetSchema = z22.object({
2308
- budgetMonthlyCents: z22.number().int().nonnegative()
2371
+ updateBudgetSchema = z23.object({
2372
+ budgetMonthlyCents: z23.number().int().nonnegative()
2309
2373
  });
2310
2374
  }
2311
2375
  });
2312
2376
 
2313
2377
  // ../packages/shared/dist/validators/finance.js
2314
- import { z as z23 } from "zod";
2378
+ import { z as z24 } from "zod";
2315
2379
  var createFinanceEventSchema;
2316
2380
  var init_finance = __esm({
2317
2381
  "../packages/shared/dist/validators/finance.js"() {
2318
2382
  "use strict";
2319
2383
  init_constants();
2320
- createFinanceEventSchema = z23.object({
2321
- agentId: z23.string().uuid().optional().nullable(),
2322
- issueId: z23.string().uuid().optional().nullable(),
2323
- projectId: z23.string().uuid().optional().nullable(),
2324
- goalId: z23.string().uuid().optional().nullable(),
2325
- heartbeatRunId: z23.string().uuid().optional().nullable(),
2326
- costEventId: z23.string().uuid().optional().nullable(),
2327
- billingCode: z23.string().optional().nullable(),
2328
- description: z23.string().max(500).optional().nullable(),
2329
- eventKind: z23.enum(FINANCE_EVENT_KINDS),
2330
- direction: z23.enum(FINANCE_DIRECTIONS).optional().default("debit"),
2331
- biller: z23.string().min(1),
2332
- provider: z23.string().min(1).optional().nullable(),
2333
- executionAgentRuntimeType: z23.enum(AGENT_RUNTIME_TYPES).optional().nullable(),
2334
- pricingTier: z23.string().min(1).optional().nullable(),
2335
- region: z23.string().min(1).optional().nullable(),
2336
- model: z23.string().min(1).optional().nullable(),
2337
- quantity: z23.number().int().nonnegative().optional().nullable(),
2338
- unit: z23.enum(FINANCE_UNITS).optional().nullable(),
2339
- amountCents: z23.number().int().nonnegative(),
2340
- currency: z23.string().length(3).optional().default("USD"),
2341
- estimated: z23.boolean().optional().default(false),
2342
- externalInvoiceId: z23.string().optional().nullable(),
2343
- metadataJson: z23.record(z23.string(), z23.unknown()).optional().nullable(),
2344
- occurredAt: z23.string().datetime()
2384
+ createFinanceEventSchema = z24.object({
2385
+ agentId: z24.string().uuid().optional().nullable(),
2386
+ issueId: z24.string().uuid().optional().nullable(),
2387
+ projectId: z24.string().uuid().optional().nullable(),
2388
+ goalId: z24.string().uuid().optional().nullable(),
2389
+ heartbeatRunId: z24.string().uuid().optional().nullable(),
2390
+ costEventId: z24.string().uuid().optional().nullable(),
2391
+ billingCode: z24.string().optional().nullable(),
2392
+ description: z24.string().max(500).optional().nullable(),
2393
+ eventKind: z24.enum(FINANCE_EVENT_KINDS),
2394
+ direction: z24.enum(FINANCE_DIRECTIONS).optional().default("debit"),
2395
+ biller: z24.string().min(1),
2396
+ provider: z24.string().min(1).optional().nullable(),
2397
+ executionAgentRuntimeType: z24.enum(AGENT_RUNTIME_TYPES).optional().nullable(),
2398
+ pricingTier: z24.string().min(1).optional().nullable(),
2399
+ region: z24.string().min(1).optional().nullable(),
2400
+ model: z24.string().min(1).optional().nullable(),
2401
+ quantity: z24.number().int().nonnegative().optional().nullable(),
2402
+ unit: z24.enum(FINANCE_UNITS).optional().nullable(),
2403
+ amountCents: z24.number().int().nonnegative(),
2404
+ currency: z24.string().length(3).optional().default("USD"),
2405
+ estimated: z24.boolean().optional().default(false),
2406
+ externalInvoiceId: z24.string().optional().nullable(),
2407
+ metadataJson: z24.record(z24.string(), z24.unknown()).optional().nullable(),
2408
+ occurredAt: z24.string().datetime()
2345
2409
  }).transform((value) => ({
2346
2410
  ...value,
2347
2411
  currency: value.currency.toUpperCase()
@@ -2350,79 +2414,79 @@ var init_finance = __esm({
2350
2414
  });
2351
2415
 
2352
2416
  // ../packages/shared/dist/validators/asset.js
2353
- import { z as z24 } from "zod";
2417
+ import { z as z25 } from "zod";
2354
2418
  var createAssetImageMetadataSchema;
2355
2419
  var init_asset = __esm({
2356
2420
  "../packages/shared/dist/validators/asset.js"() {
2357
2421
  "use strict";
2358
- createAssetImageMetadataSchema = z24.object({
2359
- namespace: z24.string().trim().min(1).max(120).regex(/^[a-zA-Z0-9/_-]+$/).optional()
2422
+ createAssetImageMetadataSchema = z25.object({
2423
+ namespace: z25.string().trim().min(1).max(120).regex(/^[a-zA-Z0-9/_-]+$/).optional()
2360
2424
  });
2361
2425
  }
2362
2426
  });
2363
2427
 
2364
2428
  // ../packages/shared/dist/validators/access.js
2365
- import { z as z25 } from "zod";
2429
+ import { z as z26 } from "zod";
2366
2430
  var createCompanyInviteSchema, createOpenClawInvitePromptSchema, acceptInviteSchema, listJoinRequestsQuerySchema, claimJoinRequestApiKeySchema, boardCliAuthAccessLevelSchema, createCliAuthChallengeSchema, resolveCliAuthChallengeSchema, updateMemberPermissionsSchema, updateUserCompanyAccessSchema;
2367
2431
  var init_access = __esm({
2368
2432
  "../packages/shared/dist/validators/access.js"() {
2369
2433
  "use strict";
2370
2434
  init_constants();
2371
- createCompanyInviteSchema = z25.object({
2372
- allowedJoinTypes: z25.enum(INVITE_JOIN_TYPES).default("both"),
2373
- defaultsPayload: z25.record(z25.string(), z25.unknown()).optional().nullable(),
2374
- agentMessage: z25.string().max(4e3).optional().nullable()
2375
- });
2376
- createOpenClawInvitePromptSchema = z25.object({
2377
- agentMessage: z25.string().max(4e3).optional().nullable()
2378
- });
2379
- acceptInviteSchema = z25.object({
2380
- requestType: z25.enum(JOIN_REQUEST_TYPES),
2381
- agentName: z25.string().min(1).max(120).optional(),
2382
- agentRuntimeType: z25.enum(AGENT_RUNTIME_TYPES).optional(),
2383
- capabilities: z25.string().max(4e3).optional().nullable(),
2384
- agentDefaultsPayload: z25.record(z25.string(), z25.unknown()).optional().nullable(),
2435
+ createCompanyInviteSchema = z26.object({
2436
+ allowedJoinTypes: z26.enum(INVITE_JOIN_TYPES).default("both"),
2437
+ defaultsPayload: z26.record(z26.string(), z26.unknown()).optional().nullable(),
2438
+ agentMessage: z26.string().max(4e3).optional().nullable()
2439
+ });
2440
+ createOpenClawInvitePromptSchema = z26.object({
2441
+ agentMessage: z26.string().max(4e3).optional().nullable()
2442
+ });
2443
+ acceptInviteSchema = z26.object({
2444
+ requestType: z26.enum(JOIN_REQUEST_TYPES),
2445
+ agentName: z26.string().min(1).max(120).optional(),
2446
+ agentRuntimeType: z26.enum(AGENT_RUNTIME_TYPES).optional(),
2447
+ capabilities: z26.string().max(4e3).optional().nullable(),
2448
+ agentDefaultsPayload: z26.record(z26.string(), z26.unknown()).optional().nullable(),
2385
2449
  // OpenClaw join compatibility fields accepted at top level.
2386
- responsesWebhookUrl: z25.string().max(4e3).optional().nullable(),
2387
- responsesWebhookMethod: z25.string().max(32).optional().nullable(),
2388
- responsesWebhookHeaders: z25.record(z25.string(), z25.unknown()).optional().nullable(),
2389
- rudderApiUrl: z25.string().max(4e3).optional().nullable(),
2390
- webhookAuthHeader: z25.string().max(4e3).optional().nullable()
2450
+ responsesWebhookUrl: z26.string().max(4e3).optional().nullable(),
2451
+ responsesWebhookMethod: z26.string().max(32).optional().nullable(),
2452
+ responsesWebhookHeaders: z26.record(z26.string(), z26.unknown()).optional().nullable(),
2453
+ rudderApiUrl: z26.string().max(4e3).optional().nullable(),
2454
+ webhookAuthHeader: z26.string().max(4e3).optional().nullable()
2391
2455
  });
2392
- listJoinRequestsQuerySchema = z25.object({
2393
- status: z25.enum(JOIN_REQUEST_STATUSES).optional(),
2394
- requestType: z25.enum(JOIN_REQUEST_TYPES).optional()
2456
+ listJoinRequestsQuerySchema = z26.object({
2457
+ status: z26.enum(JOIN_REQUEST_STATUSES).optional(),
2458
+ requestType: z26.enum(JOIN_REQUEST_TYPES).optional()
2395
2459
  });
2396
- claimJoinRequestApiKeySchema = z25.object({
2397
- claimSecret: z25.string().min(16).max(256)
2460
+ claimJoinRequestApiKeySchema = z26.object({
2461
+ claimSecret: z26.string().min(16).max(256)
2398
2462
  });
2399
- boardCliAuthAccessLevelSchema = z25.enum([
2463
+ boardCliAuthAccessLevelSchema = z26.enum([
2400
2464
  "board",
2401
2465
  "instance_admin_required"
2402
2466
  ]);
2403
- createCliAuthChallengeSchema = z25.object({
2404
- command: z25.string().min(1).max(240),
2405
- clientName: z25.string().max(120).optional().nullable(),
2467
+ createCliAuthChallengeSchema = z26.object({
2468
+ command: z26.string().min(1).max(240),
2469
+ clientName: z26.string().max(120).optional().nullable(),
2406
2470
  requestedAccess: boardCliAuthAccessLevelSchema.default("board"),
2407
- requestedCompanyId: z25.string().uuid().optional().nullable()
2471
+ requestedCompanyId: z26.string().uuid().optional().nullable()
2408
2472
  });
2409
- resolveCliAuthChallengeSchema = z25.object({
2410
- token: z25.string().min(16).max(256)
2473
+ resolveCliAuthChallengeSchema = z26.object({
2474
+ token: z26.string().min(16).max(256)
2411
2475
  });
2412
- updateMemberPermissionsSchema = z25.object({
2413
- grants: z25.array(z25.object({
2414
- permissionKey: z25.enum(PERMISSION_KEYS),
2415
- scope: z25.record(z25.string(), z25.unknown()).optional().nullable()
2476
+ updateMemberPermissionsSchema = z26.object({
2477
+ grants: z26.array(z26.object({
2478
+ permissionKey: z26.enum(PERMISSION_KEYS),
2479
+ scope: z26.record(z26.string(), z26.unknown()).optional().nullable()
2416
2480
  }))
2417
2481
  });
2418
- updateUserCompanyAccessSchema = z25.object({
2419
- orgIds: z25.array(z25.string().uuid()).default([])
2482
+ updateUserCompanyAccessSchema = z26.object({
2483
+ orgIds: z26.array(z26.string().uuid()).default([])
2420
2484
  });
2421
2485
  }
2422
2486
  });
2423
2487
 
2424
2488
  // ../packages/shared/dist/validators/plugin.js
2425
- import { z as z26 } from "zod";
2489
+ import { z as z27 } from "zod";
2426
2490
  function isValidCronExpression(expression) {
2427
2491
  const trimmed = expression.trim();
2428
2492
  if (!trimmed)
@@ -2437,79 +2501,79 @@ var init_plugin = __esm({
2437
2501
  "../packages/shared/dist/validators/plugin.js"() {
2438
2502
  "use strict";
2439
2503
  init_constants();
2440
- jsonSchemaSchema = z26.record(z26.unknown()).refine((val) => {
2504
+ jsonSchemaSchema = z27.record(z27.unknown()).refine((val) => {
2441
2505
  if (Object.keys(val).length === 0)
2442
2506
  return true;
2443
2507
  return typeof val.type === "string" || val.$ref !== void 0 || val.oneOf !== void 0 || val.anyOf !== void 0 || val.allOf !== void 0;
2444
2508
  }, { message: "Must be a valid JSON Schema object (requires at least a 'type', '$ref', or composition keyword)" });
2445
2509
  CRON_FIELD_PATTERN = /^(\*(?:\/[0-9]+)?|[0-9]+(?:-[0-9]+)?(?:\/[0-9]+)?)(?:,(\*(?:\/[0-9]+)?|[0-9]+(?:-[0-9]+)?(?:\/[0-9]+)?))*$/;
2446
- pluginJobDeclarationSchema = z26.object({
2447
- jobKey: z26.string().min(1),
2448
- displayName: z26.string().min(1),
2449
- description: z26.string().optional(),
2450
- schedule: z26.string().refine((val) => isValidCronExpression(val), { message: "schedule must be a valid 5-field cron expression (e.g. '*/15 * * * *')" }).optional()
2451
- });
2452
- pluginWebhookDeclarationSchema = z26.object({
2453
- endpointKey: z26.string().min(1),
2454
- displayName: z26.string().min(1),
2455
- description: z26.string().optional()
2456
- });
2457
- pluginToolDeclarationSchema = z26.object({
2458
- name: z26.string().min(1),
2459
- displayName: z26.string().min(1),
2460
- description: z26.string().min(1),
2510
+ pluginJobDeclarationSchema = z27.object({
2511
+ jobKey: z27.string().min(1),
2512
+ displayName: z27.string().min(1),
2513
+ description: z27.string().optional(),
2514
+ schedule: z27.string().refine((val) => isValidCronExpression(val), { message: "schedule must be a valid 5-field cron expression (e.g. '*/15 * * * *')" }).optional()
2515
+ });
2516
+ pluginWebhookDeclarationSchema = z27.object({
2517
+ endpointKey: z27.string().min(1),
2518
+ displayName: z27.string().min(1),
2519
+ description: z27.string().optional()
2520
+ });
2521
+ pluginToolDeclarationSchema = z27.object({
2522
+ name: z27.string().min(1),
2523
+ displayName: z27.string().min(1),
2524
+ description: z27.string().min(1),
2461
2525
  parametersSchema: jsonSchemaSchema
2462
2526
  });
2463
- pluginUiSlotDeclarationSchema = z26.object({
2464
- type: z26.enum(PLUGIN_UI_SLOT_TYPES),
2465
- id: z26.string().min(1),
2466
- displayName: z26.string().min(1),
2467
- exportName: z26.string().min(1),
2468
- entityTypes: z26.array(z26.enum(PLUGIN_UI_SLOT_ENTITY_TYPES)).optional(),
2469
- routePath: z26.string().regex(/^[a-z0-9][a-z0-9-]*$/, {
2527
+ pluginUiSlotDeclarationSchema = z27.object({
2528
+ type: z27.enum(PLUGIN_UI_SLOT_TYPES),
2529
+ id: z27.string().min(1),
2530
+ displayName: z27.string().min(1),
2531
+ exportName: z27.string().min(1),
2532
+ entityTypes: z27.array(z27.enum(PLUGIN_UI_SLOT_ENTITY_TYPES)).optional(),
2533
+ routePath: z27.string().regex(/^[a-z0-9][a-z0-9-]*$/, {
2470
2534
  message: "routePath must be a lowercase single-segment slug (letters, numbers, hyphens)"
2471
2535
  }).optional(),
2472
- order: z26.number().int().optional()
2536
+ order: z27.number().int().optional()
2473
2537
  }).superRefine((value, ctx) => {
2474
2538
  const entityScopedTypes = ["detailTab", "taskDetailView", "contextMenuItem", "commentAnnotation", "commentContextMenuItem", "projectSidebarItem"];
2475
2539
  if (entityScopedTypes.includes(value.type) && (!value.entityTypes || value.entityTypes.length === 0)) {
2476
2540
  ctx.addIssue({
2477
- code: z26.ZodIssueCode.custom,
2541
+ code: z27.ZodIssueCode.custom,
2478
2542
  message: `${value.type} slots require at least one entityType`,
2479
2543
  path: ["entityTypes"]
2480
2544
  });
2481
2545
  }
2482
2546
  if (value.type === "projectSidebarItem" && value.entityTypes && !value.entityTypes.includes("project")) {
2483
2547
  ctx.addIssue({
2484
- code: z26.ZodIssueCode.custom,
2548
+ code: z27.ZodIssueCode.custom,
2485
2549
  message: 'projectSidebarItem slots require entityTypes to include "project"',
2486
2550
  path: ["entityTypes"]
2487
2551
  });
2488
2552
  }
2489
2553
  if (value.type === "commentAnnotation" && value.entityTypes && !value.entityTypes.includes("comment")) {
2490
2554
  ctx.addIssue({
2491
- code: z26.ZodIssueCode.custom,
2555
+ code: z27.ZodIssueCode.custom,
2492
2556
  message: 'commentAnnotation slots require entityTypes to include "comment"',
2493
2557
  path: ["entityTypes"]
2494
2558
  });
2495
2559
  }
2496
2560
  if (value.type === "commentContextMenuItem" && value.entityTypes && !value.entityTypes.includes("comment")) {
2497
2561
  ctx.addIssue({
2498
- code: z26.ZodIssueCode.custom,
2562
+ code: z27.ZodIssueCode.custom,
2499
2563
  message: 'commentContextMenuItem slots require entityTypes to include "comment"',
2500
2564
  path: ["entityTypes"]
2501
2565
  });
2502
2566
  }
2503
2567
  if (value.routePath && value.type !== "page") {
2504
2568
  ctx.addIssue({
2505
- code: z26.ZodIssueCode.custom,
2569
+ code: z27.ZodIssueCode.custom,
2506
2570
  message: "routePath is only supported for page slots",
2507
2571
  path: ["routePath"]
2508
2572
  });
2509
2573
  }
2510
2574
  if (value.routePath && PLUGIN_RESERVED_COMPANY_ROUTE_SEGMENTS.includes(value.routePath)) {
2511
2575
  ctx.addIssue({
2512
- code: z26.ZodIssueCode.custom,
2576
+ code: z27.ZodIssueCode.custom,
2513
2577
  message: `routePath "${value.routePath}" is reserved by the host`,
2514
2578
  path: ["routePath"]
2515
2579
  });
@@ -2530,29 +2594,29 @@ var init_plugin = __esm({
2530
2594
  external: [],
2531
2595
  iframe: ["compact", "default", "wide", "full"]
2532
2596
  };
2533
- pluginLauncherActionDeclarationSchema = z26.object({
2534
- type: z26.enum(PLUGIN_LAUNCHER_ACTIONS),
2535
- target: z26.string().min(1),
2536
- params: z26.record(z26.unknown()).optional()
2597
+ pluginLauncherActionDeclarationSchema = z27.object({
2598
+ type: z27.enum(PLUGIN_LAUNCHER_ACTIONS),
2599
+ target: z27.string().min(1),
2600
+ params: z27.record(z27.unknown()).optional()
2537
2601
  }).superRefine((value, ctx) => {
2538
2602
  if (value.type === "performAction" && value.target.includes("/")) {
2539
2603
  ctx.addIssue({
2540
- code: z26.ZodIssueCode.custom,
2604
+ code: z27.ZodIssueCode.custom,
2541
2605
  message: "performAction launchers must target an action key, not a route or URL",
2542
2606
  path: ["target"]
2543
2607
  });
2544
2608
  }
2545
2609
  if (value.type === "navigate" && /^https?:\/\//.test(value.target)) {
2546
2610
  ctx.addIssue({
2547
- code: z26.ZodIssueCode.custom,
2611
+ code: z27.ZodIssueCode.custom,
2548
2612
  message: "navigate launchers must target a host route, not an absolute URL",
2549
2613
  path: ["target"]
2550
2614
  });
2551
2615
  }
2552
2616
  });
2553
- pluginLauncherRenderDeclarationSchema = z26.object({
2554
- environment: z26.enum(PLUGIN_LAUNCHER_RENDER_ENVIRONMENTS),
2555
- bounds: z26.enum(PLUGIN_LAUNCHER_BOUNDS).optional()
2617
+ pluginLauncherRenderDeclarationSchema = z27.object({
2618
+ environment: z27.enum(PLUGIN_LAUNCHER_RENDER_ENVIRONMENTS),
2619
+ bounds: z27.enum(PLUGIN_LAUNCHER_BOUNDS).optional()
2556
2620
  }).superRefine((value, ctx) => {
2557
2621
  if (!value.bounds) {
2558
2622
  return;
@@ -2560,110 +2624,110 @@ var init_plugin = __esm({
2560
2624
  const supportedBounds = launcherBoundsByEnvironment[value.environment];
2561
2625
  if (!supportedBounds.includes(value.bounds)) {
2562
2626
  ctx.addIssue({
2563
- code: z26.ZodIssueCode.custom,
2627
+ code: z27.ZodIssueCode.custom,
2564
2628
  message: `bounds "${value.bounds}" is not supported for render environment "${value.environment}"`,
2565
2629
  path: ["bounds"]
2566
2630
  });
2567
2631
  }
2568
2632
  });
2569
- pluginLauncherDeclarationSchema = z26.object({
2570
- id: z26.string().min(1),
2571
- displayName: z26.string().min(1),
2572
- description: z26.string().optional(),
2573
- placementZone: z26.enum(PLUGIN_LAUNCHER_PLACEMENT_ZONES),
2574
- exportName: z26.string().min(1).optional(),
2575
- entityTypes: z26.array(z26.enum(PLUGIN_UI_SLOT_ENTITY_TYPES)).optional(),
2576
- order: z26.number().int().optional(),
2633
+ pluginLauncherDeclarationSchema = z27.object({
2634
+ id: z27.string().min(1),
2635
+ displayName: z27.string().min(1),
2636
+ description: z27.string().optional(),
2637
+ placementZone: z27.enum(PLUGIN_LAUNCHER_PLACEMENT_ZONES),
2638
+ exportName: z27.string().min(1).optional(),
2639
+ entityTypes: z27.array(z27.enum(PLUGIN_UI_SLOT_ENTITY_TYPES)).optional(),
2640
+ order: z27.number().int().optional(),
2577
2641
  action: pluginLauncherActionDeclarationSchema,
2578
2642
  render: pluginLauncherRenderDeclarationSchema.optional()
2579
2643
  }).superRefine((value, ctx) => {
2580
2644
  if (entityScopedLauncherPlacementZones.some((zone) => zone === value.placementZone) && (!value.entityTypes || value.entityTypes.length === 0)) {
2581
2645
  ctx.addIssue({
2582
- code: z26.ZodIssueCode.custom,
2646
+ code: z27.ZodIssueCode.custom,
2583
2647
  message: `${value.placementZone} launchers require at least one entityType`,
2584
2648
  path: ["entityTypes"]
2585
2649
  });
2586
2650
  }
2587
2651
  if (value.placementZone === "projectSidebarItem" && value.entityTypes && !value.entityTypes.includes("project")) {
2588
2652
  ctx.addIssue({
2589
- code: z26.ZodIssueCode.custom,
2653
+ code: z27.ZodIssueCode.custom,
2590
2654
  message: 'projectSidebarItem launchers require entityTypes to include "project"',
2591
2655
  path: ["entityTypes"]
2592
2656
  });
2593
2657
  }
2594
2658
  if (value.action.type === "performAction" && value.render) {
2595
2659
  ctx.addIssue({
2596
- code: z26.ZodIssueCode.custom,
2660
+ code: z27.ZodIssueCode.custom,
2597
2661
  message: "performAction launchers cannot declare render hints",
2598
2662
  path: ["render"]
2599
2663
  });
2600
2664
  }
2601
2665
  if (["openModal", "openDrawer", "openPopover"].includes(value.action.type) && !value.render) {
2602
2666
  ctx.addIssue({
2603
- code: z26.ZodIssueCode.custom,
2667
+ code: z27.ZodIssueCode.custom,
2604
2668
  message: `${value.action.type} launchers require render metadata`,
2605
2669
  path: ["render"]
2606
2670
  });
2607
2671
  }
2608
2672
  if (value.action.type === "openModal" && value.render?.environment === "hostInline") {
2609
2673
  ctx.addIssue({
2610
- code: z26.ZodIssueCode.custom,
2674
+ code: z27.ZodIssueCode.custom,
2611
2675
  message: "openModal launchers cannot use the hostInline render environment",
2612
2676
  path: ["render", "environment"]
2613
2677
  });
2614
2678
  }
2615
2679
  if (value.action.type === "openDrawer" && value.render && !["hostOverlay", "iframe"].includes(value.render.environment)) {
2616
2680
  ctx.addIssue({
2617
- code: z26.ZodIssueCode.custom,
2681
+ code: z27.ZodIssueCode.custom,
2618
2682
  message: "openDrawer launchers must use hostOverlay or iframe render environments",
2619
2683
  path: ["render", "environment"]
2620
2684
  });
2621
2685
  }
2622
2686
  if (value.action.type === "openPopover" && value.render?.environment === "hostRoute") {
2623
2687
  ctx.addIssue({
2624
- code: z26.ZodIssueCode.custom,
2688
+ code: z27.ZodIssueCode.custom,
2625
2689
  message: "openPopover launchers cannot use the hostRoute render environment",
2626
2690
  path: ["render", "environment"]
2627
2691
  });
2628
2692
  }
2629
2693
  });
2630
- pluginManifestV1Schema = z26.object({
2631
- id: z26.string().min(1).regex(/^[a-z0-9][a-z0-9._-]*$/, "Plugin id must start with a lowercase alphanumeric and contain only lowercase letters, digits, dots, hyphens, or underscores"),
2632
- apiVersion: z26.literal(1),
2633
- version: z26.string().min(1).regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/, "Version must follow semver (e.g. 1.0.0 or 1.0.0-beta.1)"),
2634
- displayName: z26.string().min(1).max(100),
2635
- description: z26.string().min(1).max(500),
2636
- author: z26.string().min(1).max(200),
2637
- categories: z26.array(z26.enum(PLUGIN_CATEGORIES)).min(1),
2638
- minimumHostVersion: z26.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/, "minimumHostVersion must follow semver (e.g. 1.0.0)").optional(),
2639
- minimumPaperclipVersion: z26.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/, "minimumPaperclipVersion must follow semver (e.g. 1.0.0)").optional(),
2640
- capabilities: z26.array(z26.enum(PLUGIN_CAPABILITIES)).min(1),
2641
- entrypoints: z26.object({
2642
- worker: z26.string().min(1),
2643
- ui: z26.string().min(1).optional()
2694
+ pluginManifestV1Schema = z27.object({
2695
+ id: z27.string().min(1).regex(/^[a-z0-9][a-z0-9._-]*$/, "Plugin id must start with a lowercase alphanumeric and contain only lowercase letters, digits, dots, hyphens, or underscores"),
2696
+ apiVersion: z27.literal(1),
2697
+ version: z27.string().min(1).regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/, "Version must follow semver (e.g. 1.0.0 or 1.0.0-beta.1)"),
2698
+ displayName: z27.string().min(1).max(100),
2699
+ description: z27.string().min(1).max(500),
2700
+ author: z27.string().min(1).max(200),
2701
+ categories: z27.array(z27.enum(PLUGIN_CATEGORIES)).min(1),
2702
+ minimumHostVersion: z27.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/, "minimumHostVersion must follow semver (e.g. 1.0.0)").optional(),
2703
+ minimumPaperclipVersion: z27.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/, "minimumPaperclipVersion must follow semver (e.g. 1.0.0)").optional(),
2704
+ capabilities: z27.array(z27.enum(PLUGIN_CAPABILITIES)).min(1),
2705
+ entrypoints: z27.object({
2706
+ worker: z27.string().min(1),
2707
+ ui: z27.string().min(1).optional()
2644
2708
  }),
2645
2709
  instanceConfigSchema: jsonSchemaSchema.optional(),
2646
- jobs: z26.array(pluginJobDeclarationSchema).optional(),
2647
- webhooks: z26.array(pluginWebhookDeclarationSchema).optional(),
2648
- tools: z26.array(pluginToolDeclarationSchema).optional(),
2649
- launchers: z26.array(pluginLauncherDeclarationSchema).optional(),
2650
- ui: z26.object({
2651
- slots: z26.array(pluginUiSlotDeclarationSchema).min(1).optional(),
2652
- launchers: z26.array(pluginLauncherDeclarationSchema).optional()
2710
+ jobs: z27.array(pluginJobDeclarationSchema).optional(),
2711
+ webhooks: z27.array(pluginWebhookDeclarationSchema).optional(),
2712
+ tools: z27.array(pluginToolDeclarationSchema).optional(),
2713
+ launchers: z27.array(pluginLauncherDeclarationSchema).optional(),
2714
+ ui: z27.object({
2715
+ slots: z27.array(pluginUiSlotDeclarationSchema).min(1).optional(),
2716
+ launchers: z27.array(pluginLauncherDeclarationSchema).optional()
2653
2717
  }).optional()
2654
2718
  }).superRefine((manifest, ctx) => {
2655
2719
  const hasUiSlots = (manifest.ui?.slots?.length ?? 0) > 0;
2656
2720
  const hasUiLaunchers = (manifest.ui?.launchers?.length ?? 0) > 0;
2657
2721
  if ((hasUiSlots || hasUiLaunchers) && !manifest.entrypoints.ui) {
2658
2722
  ctx.addIssue({
2659
- code: z26.ZodIssueCode.custom,
2723
+ code: z27.ZodIssueCode.custom,
2660
2724
  message: "entrypoints.ui is required when ui.slots or ui.launchers are declared",
2661
2725
  path: ["entrypoints", "ui"]
2662
2726
  });
2663
2727
  }
2664
2728
  if (manifest.minimumHostVersion && manifest.minimumPaperclipVersion && manifest.minimumHostVersion !== manifest.minimumPaperclipVersion) {
2665
2729
  ctx.addIssue({
2666
- code: z26.ZodIssueCode.custom,
2730
+ code: z27.ZodIssueCode.custom,
2667
2731
  message: "minimumHostVersion and minimumPaperclipVersion must match when both are declared",
2668
2732
  path: ["minimumHostVersion"]
2669
2733
  });
@@ -2671,7 +2735,7 @@ var init_plugin = __esm({
2671
2735
  if (manifest.tools && manifest.tools.length > 0) {
2672
2736
  if (!manifest.capabilities.includes("agent.tools.register")) {
2673
2737
  ctx.addIssue({
2674
- code: z26.ZodIssueCode.custom,
2738
+ code: z27.ZodIssueCode.custom,
2675
2739
  message: "Capability 'agent.tools.register' is required when tools are declared",
2676
2740
  path: ["capabilities"]
2677
2741
  });
@@ -2680,7 +2744,7 @@ var init_plugin = __esm({
2680
2744
  if (manifest.jobs && manifest.jobs.length > 0) {
2681
2745
  if (!manifest.capabilities.includes("jobs.schedule")) {
2682
2746
  ctx.addIssue({
2683
- code: z26.ZodIssueCode.custom,
2747
+ code: z27.ZodIssueCode.custom,
2684
2748
  message: "Capability 'jobs.schedule' is required when jobs are declared",
2685
2749
  path: ["capabilities"]
2686
2750
  });
@@ -2689,7 +2753,7 @@ var init_plugin = __esm({
2689
2753
  if (manifest.webhooks && manifest.webhooks.length > 0) {
2690
2754
  if (!manifest.capabilities.includes("webhooks.receive")) {
2691
2755
  ctx.addIssue({
2692
- code: z26.ZodIssueCode.custom,
2756
+ code: z27.ZodIssueCode.custom,
2693
2757
  message: "Capability 'webhooks.receive' is required when webhooks are declared",
2694
2758
  path: ["capabilities"]
2695
2759
  });
@@ -2700,7 +2764,7 @@ var init_plugin = __esm({
2700
2764
  const duplicates = jobKeys.filter((key, i) => jobKeys.indexOf(key) !== i);
2701
2765
  if (duplicates.length > 0) {
2702
2766
  ctx.addIssue({
2703
- code: z26.ZodIssueCode.custom,
2767
+ code: z27.ZodIssueCode.custom,
2704
2768
  message: `Duplicate job keys: ${[...new Set(duplicates)].join(", ")}`,
2705
2769
  path: ["jobs"]
2706
2770
  });
@@ -2711,7 +2775,7 @@ var init_plugin = __esm({
2711
2775
  const duplicates = endpointKeys.filter((key, i) => endpointKeys.indexOf(key) !== i);
2712
2776
  if (duplicates.length > 0) {
2713
2777
  ctx.addIssue({
2714
- code: z26.ZodIssueCode.custom,
2778
+ code: z27.ZodIssueCode.custom,
2715
2779
  message: `Duplicate webhook endpoint keys: ${[...new Set(duplicates)].join(", ")}`,
2716
2780
  path: ["webhooks"]
2717
2781
  });
@@ -2722,7 +2786,7 @@ var init_plugin = __esm({
2722
2786
  const duplicates = toolNames.filter((name, i) => toolNames.indexOf(name) !== i);
2723
2787
  if (duplicates.length > 0) {
2724
2788
  ctx.addIssue({
2725
- code: z26.ZodIssueCode.custom,
2789
+ code: z27.ZodIssueCode.custom,
2726
2790
  message: `Duplicate tool names: ${[...new Set(duplicates)].join(", ")}`,
2727
2791
  path: ["tools"]
2728
2792
  });
@@ -2734,7 +2798,7 @@ var init_plugin = __esm({
2734
2798
  const duplicates = slotIds.filter((id, i) => slotIds.indexOf(id) !== i);
2735
2799
  if (duplicates.length > 0) {
2736
2800
  ctx.addIssue({
2737
- code: z26.ZodIssueCode.custom,
2801
+ code: z27.ZodIssueCode.custom,
2738
2802
  message: `Duplicate UI slot ids: ${[...new Set(duplicates)].join(", ")}`,
2739
2803
  path: ["ui", "slots"]
2740
2804
  });
@@ -2750,50 +2814,50 @@ var init_plugin = __esm({
2750
2814
  const duplicates = launcherIds.filter((id, i) => launcherIds.indexOf(id) !== i);
2751
2815
  if (duplicates.length > 0) {
2752
2816
  ctx.addIssue({
2753
- code: z26.ZodIssueCode.custom,
2817
+ code: z27.ZodIssueCode.custom,
2754
2818
  message: `Duplicate launcher ids: ${[...new Set(duplicates)].join(", ")}`,
2755
2819
  path: manifest.ui?.launchers ? ["ui", "launchers"] : ["launchers"]
2756
2820
  });
2757
2821
  }
2758
2822
  }
2759
2823
  });
2760
- installPluginSchema = z26.object({
2761
- packageName: z26.string().min(1),
2762
- version: z26.string().min(1).optional(),
2824
+ installPluginSchema = z27.object({
2825
+ packageName: z27.string().min(1),
2826
+ version: z27.string().min(1).optional(),
2763
2827
  /** Set by loader for local-path installs so the worker can be resolved. */
2764
- packagePath: z26.string().min(1).optional()
2828
+ packagePath: z27.string().min(1).optional()
2765
2829
  });
2766
- upsertPluginConfigSchema = z26.object({
2767
- configJson: z26.record(z26.unknown())
2830
+ upsertPluginConfigSchema = z27.object({
2831
+ configJson: z27.record(z27.unknown())
2768
2832
  });
2769
- patchPluginConfigSchema = z26.object({
2770
- configJson: z26.record(z26.unknown())
2833
+ patchPluginConfigSchema = z27.object({
2834
+ configJson: z27.record(z27.unknown())
2771
2835
  });
2772
- updatePluginStatusSchema = z26.object({
2773
- status: z26.enum(PLUGIN_STATUSES),
2774
- lastError: z26.string().nullable().optional()
2836
+ updatePluginStatusSchema = z27.object({
2837
+ status: z27.enum(PLUGIN_STATUSES),
2838
+ lastError: z27.string().nullable().optional()
2775
2839
  });
2776
- uninstallPluginSchema = z26.object({
2777
- removeData: z26.boolean().optional().default(false)
2840
+ uninstallPluginSchema = z27.object({
2841
+ removeData: z27.boolean().optional().default(false)
2778
2842
  });
2779
- pluginStateScopeKeySchema = z26.object({
2780
- scopeKind: z26.enum(PLUGIN_STATE_SCOPE_KINDS),
2781
- scopeId: z26.string().min(1).optional(),
2782
- namespace: z26.string().min(1).optional(),
2783
- stateKey: z26.string().min(1)
2843
+ pluginStateScopeKeySchema = z27.object({
2844
+ scopeKind: z27.enum(PLUGIN_STATE_SCOPE_KINDS),
2845
+ scopeId: z27.string().min(1).optional(),
2846
+ namespace: z27.string().min(1).optional(),
2847
+ stateKey: z27.string().min(1)
2784
2848
  });
2785
- setPluginStateSchema = z26.object({
2786
- scopeKind: z26.enum(PLUGIN_STATE_SCOPE_KINDS),
2787
- scopeId: z26.string().min(1).optional(),
2788
- namespace: z26.string().min(1).optional(),
2789
- stateKey: z26.string().min(1),
2849
+ setPluginStateSchema = z27.object({
2850
+ scopeKind: z27.enum(PLUGIN_STATE_SCOPE_KINDS),
2851
+ scopeId: z27.string().min(1).optional(),
2852
+ namespace: z27.string().min(1).optional(),
2853
+ stateKey: z27.string().min(1),
2790
2854
  /** JSON-serializable value to store. */
2791
- value: z26.unknown()
2855
+ value: z27.unknown()
2792
2856
  });
2793
- listPluginStateSchema = z26.object({
2794
- scopeKind: z26.enum(PLUGIN_STATE_SCOPE_KINDS).optional(),
2795
- scopeId: z26.string().min(1).optional(),
2796
- namespace: z26.string().min(1).optional()
2857
+ listPluginStateSchema = z27.object({
2858
+ scopeKind: z27.enum(PLUGIN_STATE_SCOPE_KINDS).optional(),
2859
+ scopeId: z27.string().min(1).optional(),
2860
+ namespace: z27.string().min(1).optional()
2797
2861
  });
2798
2862
  }
2799
2863
  });
@@ -2812,6 +2876,7 @@ var init_validators = __esm({
2812
2876
  init_organization();
2813
2877
  init_resource();
2814
2878
  init_agent();
2879
+ init_agent_integration();
2815
2880
  init_project();
2816
2881
  init_issue();
2817
2882
  init_work_product();
@@ -2831,9 +2896,16 @@ var init_validators = __esm({
2831
2896
  });
2832
2897
 
2833
2898
  // ../packages/shared/dist/agent-url-key.js
2899
+ function isUuidLike(value) {
2900
+ if (typeof value !== "string")
2901
+ return false;
2902
+ return UUID_RE.test(value.trim());
2903
+ }
2904
+ var UUID_RE;
2834
2905
  var init_agent_url_key = __esm({
2835
2906
  "../packages/shared/dist/agent-url-key.js"() {
2836
2907
  "use strict";
2908
+ UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
2837
2909
  }
2838
2910
  });
2839
2911
 
@@ -2956,34 +3028,34 @@ var init_issue_activity = __esm({
2956
3028
  });
2957
3029
 
2958
3030
  // ../packages/shared/dist/config-schema.js
2959
- import { z as z27 } from "zod";
3031
+ import { z as z28 } from "zod";
2960
3032
  var DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES, configMetaSchema, llmConfigSchema, databaseBackupConfigSchema, databaseConfigSchema, loggingConfigSchema, serverConfigSchema, authConfigSchema, storageLocalDiskConfigSchema, storageS3ConfigSchema, storageConfigSchema, secretsLocalEncryptedConfigSchema, secretsConfigSchema, langfuseConfigSchema, rudderConfigSchema;
2961
3033
  var init_config_schema = __esm({
2962
3034
  "../packages/shared/dist/config-schema.js"() {
2963
3035
  "use strict";
2964
3036
  init_constants();
2965
3037
  DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES = 256 * 1024 * 1024;
2966
- configMetaSchema = z27.object({
2967
- version: z27.literal(1),
2968
- updatedAt: z27.string(),
2969
- source: z27.enum(["onboard", "configure", "doctor"])
2970
- });
2971
- llmConfigSchema = z27.object({
2972
- provider: z27.enum(["claude", "openai"]),
2973
- apiKey: z27.string().optional()
2974
- });
2975
- databaseBackupConfigSchema = z27.object({
2976
- enabled: z27.boolean().default(true),
2977
- intervalMinutes: z27.number().int().min(1).max(7 * 24 * 60).default(60),
2978
- retentionDays: z27.number().int().min(1).max(3650).default(30),
2979
- maxEstimatedBytes: z27.number().int().min(1).default(DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES),
2980
- dir: z27.string().default("~/.rudder/instances/default/data/backups")
2981
- });
2982
- databaseConfigSchema = z27.object({
2983
- mode: z27.enum(["embedded-postgres", "postgres"]).default("embedded-postgres"),
2984
- connectionString: z27.string().optional(),
2985
- embeddedPostgresDataDir: z27.string().default("~/.rudder/instances/default/db"),
2986
- embeddedPostgresPort: z27.number().int().min(1).max(65535).default(54329),
3038
+ configMetaSchema = z28.object({
3039
+ version: z28.literal(1),
3040
+ updatedAt: z28.string(),
3041
+ source: z28.enum(["onboard", "configure", "doctor"])
3042
+ });
3043
+ llmConfigSchema = z28.object({
3044
+ provider: z28.enum(["claude", "openai"]),
3045
+ apiKey: z28.string().optional()
3046
+ });
3047
+ databaseBackupConfigSchema = z28.object({
3048
+ enabled: z28.boolean().default(true),
3049
+ intervalMinutes: z28.number().int().min(1).max(7 * 24 * 60).default(60),
3050
+ retentionDays: z28.number().int().min(1).max(3650).default(30),
3051
+ maxEstimatedBytes: z28.number().int().min(1).default(DEFAULT_DATABASE_BACKUP_MAX_ESTIMATED_BYTES),
3052
+ dir: z28.string().default("~/.rudder/instances/default/data/backups")
3053
+ });
3054
+ databaseConfigSchema = z28.object({
3055
+ mode: z28.enum(["embedded-postgres", "postgres"]).default("embedded-postgres"),
3056
+ connectionString: z28.string().optional(),
3057
+ embeddedPostgresDataDir: z28.string().default("~/.rudder/instances/default/db"),
3058
+ embeddedPostgresPort: z28.number().int().min(1).max(65535).default(54329),
2987
3059
  backup: databaseBackupConfigSchema.default({
2988
3060
  enabled: true,
2989
3061
  intervalMinutes: 60,
@@ -2992,35 +3064,35 @@ var init_config_schema = __esm({
2992
3064
  dir: "~/.rudder/instances/default/data/backups"
2993
3065
  })
2994
3066
  });
2995
- loggingConfigSchema = z27.object({
2996
- mode: z27.enum(["file", "cloud"]),
2997
- logDir: z27.string().default("~/.rudder/instances/default/logs")
2998
- });
2999
- serverConfigSchema = z27.object({
3000
- deploymentMode: z27.enum(DEPLOYMENT_MODES).default("local_trusted"),
3001
- exposure: z27.enum(DEPLOYMENT_EXPOSURES).default("private"),
3002
- host: z27.string().default("127.0.0.1"),
3003
- port: z27.number().int().min(1).max(65535).default(3100),
3004
- allowedHostnames: z27.array(z27.string().min(1)).default([]),
3005
- serveUi: z27.boolean().default(true)
3006
- });
3007
- authConfigSchema = z27.object({
3008
- baseUrlMode: z27.enum(AUTH_BASE_URL_MODES).default("auto"),
3009
- publicBaseUrl: z27.string().url().optional(),
3010
- disableSignUp: z27.boolean().default(false)
3011
- });
3012
- storageLocalDiskConfigSchema = z27.object({
3013
- baseDir: z27.string().default("~/.rudder/instances/default/data/storage")
3014
- });
3015
- storageS3ConfigSchema = z27.object({
3016
- bucket: z27.string().min(1).default("rudder"),
3017
- region: z27.string().min(1).default("us-east-1"),
3018
- endpoint: z27.string().optional(),
3019
- prefix: z27.string().default(""),
3020
- forcePathStyle: z27.boolean().default(false)
3021
- });
3022
- storageConfigSchema = z27.object({
3023
- provider: z27.enum(STORAGE_PROVIDERS).default("local_disk"),
3067
+ loggingConfigSchema = z28.object({
3068
+ mode: z28.enum(["file", "cloud"]),
3069
+ logDir: z28.string().default("~/.rudder/instances/default/logs")
3070
+ });
3071
+ serverConfigSchema = z28.object({
3072
+ deploymentMode: z28.enum(DEPLOYMENT_MODES).default("local_trusted"),
3073
+ exposure: z28.enum(DEPLOYMENT_EXPOSURES).default("private"),
3074
+ host: z28.string().default("127.0.0.1"),
3075
+ port: z28.number().int().min(1).max(65535).default(3100),
3076
+ allowedHostnames: z28.array(z28.string().min(1)).default([]),
3077
+ serveUi: z28.boolean().default(true)
3078
+ });
3079
+ authConfigSchema = z28.object({
3080
+ baseUrlMode: z28.enum(AUTH_BASE_URL_MODES).default("auto"),
3081
+ publicBaseUrl: z28.string().url().optional(),
3082
+ disableSignUp: z28.boolean().default(false)
3083
+ });
3084
+ storageLocalDiskConfigSchema = z28.object({
3085
+ baseDir: z28.string().default("~/.rudder/instances/default/data/storage")
3086
+ });
3087
+ storageS3ConfigSchema = z28.object({
3088
+ bucket: z28.string().min(1).default("rudder"),
3089
+ region: z28.string().min(1).default("us-east-1"),
3090
+ endpoint: z28.string().optional(),
3091
+ prefix: z28.string().default(""),
3092
+ forcePathStyle: z28.boolean().default(false)
3093
+ });
3094
+ storageConfigSchema = z28.object({
3095
+ provider: z28.enum(STORAGE_PROVIDERS).default("local_disk"),
3024
3096
  localDisk: storageLocalDiskConfigSchema.default({
3025
3097
  baseDir: "~/.rudder/instances/default/data/storage"
3026
3098
  }),
@@ -3031,24 +3103,24 @@ var init_config_schema = __esm({
3031
3103
  forcePathStyle: false
3032
3104
  })
3033
3105
  });
3034
- secretsLocalEncryptedConfigSchema = z27.object({
3035
- keyFilePath: z27.string().default("~/.rudder/instances/default/secrets/master.key")
3106
+ secretsLocalEncryptedConfigSchema = z28.object({
3107
+ keyFilePath: z28.string().default("~/.rudder/instances/default/secrets/master.key")
3036
3108
  });
3037
- secretsConfigSchema = z27.object({
3038
- provider: z27.enum(SECRET_PROVIDERS).default("local_encrypted"),
3039
- strictMode: z27.boolean().default(false),
3109
+ secretsConfigSchema = z28.object({
3110
+ provider: z28.enum(SECRET_PROVIDERS).default("local_encrypted"),
3111
+ strictMode: z28.boolean().default(false),
3040
3112
  localEncrypted: secretsLocalEncryptedConfigSchema.default({
3041
3113
  keyFilePath: "~/.rudder/instances/default/secrets/master.key"
3042
3114
  })
3043
3115
  });
3044
- langfuseConfigSchema = z27.object({
3045
- enabled: z27.boolean().default(false),
3046
- baseUrl: z27.string().url().default("http://localhost:3000"),
3047
- publicKey: z27.string().optional(),
3048
- secretKey: z27.string().optional(),
3049
- environment: z27.string().optional()
3116
+ langfuseConfigSchema = z28.object({
3117
+ enabled: z28.boolean().default(false),
3118
+ baseUrl: z28.string().url().default("http://localhost:3000"),
3119
+ publicKey: z28.string().optional(),
3120
+ secretKey: z28.string().optional(),
3121
+ environment: z28.string().optional()
3050
3122
  });
3051
- rudderConfigSchema = z27.object({
3123
+ rudderConfigSchema = z28.object({
3052
3124
  $meta: configMetaSchema,
3053
3125
  llm: llmConfigSchema.optional(),
3054
3126
  database: databaseConfigSchema,
@@ -3082,7 +3154,7 @@ var init_config_schema = __esm({
3082
3154
  if (value.server.deploymentMode === "local_trusted") {
3083
3155
  if (value.server.exposure !== "private") {
3084
3156
  ctx.addIssue({
3085
- code: z27.ZodIssueCode.custom,
3157
+ code: z28.ZodIssueCode.custom,
3086
3158
  message: "server.exposure must be private when deploymentMode is local_trusted",
3087
3159
  path: ["server", "exposure"]
3088
3160
  });
@@ -3091,21 +3163,21 @@ var init_config_schema = __esm({
3091
3163
  }
3092
3164
  if (value.auth.baseUrlMode === "explicit" && !value.auth.publicBaseUrl) {
3093
3165
  ctx.addIssue({
3094
- code: z27.ZodIssueCode.custom,
3166
+ code: z28.ZodIssueCode.custom,
3095
3167
  message: "auth.publicBaseUrl is required when auth.baseUrlMode is explicit",
3096
3168
  path: ["auth", "publicBaseUrl"]
3097
3169
  });
3098
3170
  }
3099
3171
  if (value.server.exposure === "public" && value.auth.baseUrlMode !== "explicit") {
3100
3172
  ctx.addIssue({
3101
- code: z27.ZodIssueCode.custom,
3173
+ code: z28.ZodIssueCode.custom,
3102
3174
  message: "auth.baseUrlMode must be explicit when deploymentMode=authenticated and exposure=public",
3103
3175
  path: ["auth", "baseUrlMode"]
3104
3176
  });
3105
3177
  }
3106
3178
  if (value.server.exposure === "public" && !value.auth.publicBaseUrl) {
3107
3179
  ctx.addIssue({
3108
- code: z27.ZodIssueCode.custom,
3180
+ code: z28.ZodIssueCode.custom,
3109
3181
  message: "auth.publicBaseUrl is required when deploymentMode=authenticated and exposure=public",
3110
3182
  path: ["auth", "publicBaseUrl"]
3111
3183
  });
@@ -6289,6 +6361,7 @@ async function addAllowedHostname(host, opts) {
6289
6361
  init_auth_bootstrap_ceo();
6290
6362
 
6291
6363
  // src/commands/client/common.ts
6364
+ init_dist();
6292
6365
  import pc4 from "picocolors";
6293
6366
 
6294
6367
  // src/client/board-auth.ts
@@ -6792,8 +6865,11 @@ function toStringRecord(headers) {
6792
6865
 
6793
6866
  // src/commands/client/common.ts
6794
6867
  init_store();
6868
+ var currentCommandFullIds = false;
6869
+ var CLI_SHORT_UUID_LENGTH = 12;
6870
+ var UUID_SUBSTRING_RE = /\b[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\b/giu;
6795
6871
  function addCommonClientOptions(command, opts) {
6796
- command.option("-c, --config <path>", "Path to Rudder config file").option("-d, --data-dir <path>", "Rudder data directory root (isolates state from ~/.rudder)").option("--context <path>", "Path to CLI context file").option("--profile <name>", "CLI context profile name").option("--api-base <url>", "Base URL for the Rudder API").option("--api-key <token>", "Bearer token for agent-authenticated calls").option("--run-id <id>", "Run ID to attach on mutating agent requests").option("--json", "Output raw JSON");
6872
+ command.option("-c, --config <path>", "Path to Rudder config file").option("-d, --data-dir <path>", "Rudder data directory root (isolates state from ~/.rudder)").option("--context <path>", "Path to CLI context file").option("--profile <name>", "CLI context profile name").option("--api-base <url>", "Base URL for the Rudder API").option("--api-key <token>", "Bearer token for agent-authenticated calls").option("--run-id <id>", "Run ID to attach on mutating agent requests").option("--json", "Output JSON").option("--full-ids", "Show full UUIDs in output instead of CLI short IDs");
6797
6873
  if (opts?.includeCompany) {
6798
6874
  command.option("-O, --org-id <id>", "Organization ID (overrides context default)");
6799
6875
  }
@@ -6814,6 +6890,8 @@ function resolveCommandContext(options, opts) {
6814
6890
  "Organization ID is required. Pass --org-id, set RUDDER_ORG_ID, or set context profile orgId via `rudder context set`."
6815
6891
  );
6816
6892
  }
6893
+ const fullIds = Boolean(options.fullIds);
6894
+ currentCommandFullIds = fullIds;
6817
6895
  const api = new RudderApiClient({
6818
6896
  apiBase,
6819
6897
  apiKey,
@@ -6840,7 +6918,8 @@ function resolveCommandContext(options, opts) {
6840
6918
  runId,
6841
6919
  profileName,
6842
6920
  profile,
6843
- json: Boolean(options.json)
6921
+ json: Boolean(options.json),
6922
+ fullIds
6844
6923
  };
6845
6924
  }
6846
6925
  function shouldRecoverBoardAuth(error) {
@@ -6852,54 +6931,149 @@ function canAttemptInteractiveBoardAuth() {
6852
6931
  return Boolean(process.stdin.isTTY && process.stdout.isTTY);
6853
6932
  }
6854
6933
  function printOutput(data, opts = {}) {
6934
+ const outputData = shouldShowFullIds(opts.fullIds) ? data : toCliShortIdOutput(data);
6855
6935
  if (opts.json) {
6856
- const output = JSON.stringify(data, null, 2);
6936
+ const output = JSON.stringify(outputData, null, 2);
6857
6937
  process.stdout.write(output + "\n");
6858
6938
  return;
6859
6939
  }
6860
6940
  if (opts.label) {
6861
6941
  console.log(pc4.bold(opts.label));
6862
6942
  }
6863
- if (Array.isArray(data)) {
6864
- if (data.length === 0) {
6943
+ if (Array.isArray(outputData)) {
6944
+ if (outputData.length === 0) {
6865
6945
  console.log(pc4.dim("(empty)"));
6866
6946
  return;
6867
6947
  }
6868
- for (const item of data) {
6948
+ for (const item of outputData) {
6869
6949
  if (typeof item === "object" && item !== null) {
6870
- console.log(formatInlineRecord(item));
6950
+ console.log(formatInlineRecord(item, { fullIds: true }));
6871
6951
  } else {
6872
6952
  console.log(String(item));
6873
6953
  }
6874
6954
  }
6875
6955
  return;
6876
6956
  }
6877
- if (typeof data === "object" && data !== null) {
6878
- console.log(JSON.stringify(data, null, 2));
6957
+ if (typeof outputData === "object" && outputData !== null) {
6958
+ console.log(JSON.stringify(outputData, null, 2));
6879
6959
  return;
6880
6960
  }
6881
- if (data === void 0 || data === null) {
6961
+ if (outputData === void 0 || outputData === null) {
6882
6962
  console.log(pc4.dim("(null)"));
6883
6963
  return;
6884
6964
  }
6885
- console.log(String(data));
6965
+ console.log(String(outputData));
6886
6966
  }
6887
- function formatInlineRecord(record) {
6967
+ function formatInlineRecord(record, opts = {}) {
6968
+ const displayRecord = shouldShowFullIds(opts.fullIds) ? record : toCliShortIdOutput(record);
6888
6969
  const keyOrder = ["identifier", "id", "name", "status", "priority", "title", "action"];
6889
6970
  const seen = /* @__PURE__ */ new Set();
6890
6971
  const parts = [];
6891
6972
  for (const key of keyOrder) {
6892
- if (!(key in record)) continue;
6893
- parts.push(`${key}=${renderValue(record[key])}`);
6973
+ if (!(key in displayRecord)) continue;
6974
+ parts.push(`${key}=${renderValue(displayRecord[key])}`);
6894
6975
  seen.add(key);
6895
6976
  }
6896
- for (const [key, value] of Object.entries(record)) {
6977
+ for (const [key, value] of Object.entries(displayRecord)) {
6897
6978
  if (seen.has(key)) continue;
6898
6979
  if (typeof value === "object") continue;
6899
6980
  parts.push(`${key}=${renderValue(value)}`);
6900
6981
  }
6901
6982
  return parts.join(" ");
6902
6983
  }
6984
+ function toCliShortIdOutput(value) {
6985
+ if (Array.isArray(value)) {
6986
+ return value.map((item) => toCliShortIdOutput(item));
6987
+ }
6988
+ if (typeof value !== "object" || value === null) {
6989
+ return value;
6990
+ }
6991
+ const source = value;
6992
+ const output = {};
6993
+ for (const [key, childValue] of Object.entries(source)) {
6994
+ output[key] = shortenCliValueForKey(key, childValue, source);
6995
+ }
6996
+ return output;
6997
+ }
6998
+ function formatCliRunId(runId) {
6999
+ return isUuidLike(runId) ? shortUuid(runId) : runId;
7000
+ }
7001
+ function shortenCliValueForKey(key, value, parent) {
7002
+ if (typeof value === "string" && isCliIdKey(key) && isUuidLike(value)) {
7003
+ return displayIdForCli(key, value, parent);
7004
+ }
7005
+ if (typeof value === "string" && isCliReferenceStringKey(key)) {
7006
+ return value.replace(UUID_SUBSTRING_RE, (uuid) => shortUuid(uuid));
7007
+ }
7008
+ if (Array.isArray(value) && isCliIdListKey(key)) {
7009
+ return value.map(
7010
+ (item) => typeof item === "string" && isUuidLike(item) ? displayIdForCli(singularizeIdListKey(key), item, parent) : toCliShortIdOutput(item)
7011
+ );
7012
+ }
7013
+ return toCliShortIdOutput(value);
7014
+ }
7015
+ function displayIdForCli(key, uuid, parent) {
7016
+ if (key === "id") {
7017
+ const directShortRef = readString(parent.shortRef);
7018
+ if (directShortRef) return directShortRef;
7019
+ const issueIdentifier = readDirectIssueIdentifier(parent);
7020
+ if (issueIdentifier) return issueIdentifier;
7021
+ }
7022
+ if (isAgentIdKey(key, parent)) {
7023
+ return formatTypedShortRef("agent", uuid);
7024
+ }
7025
+ if (isIssueCommentIdKey(key)) {
7026
+ return formatTypedShortRef("issue_comment", uuid);
7027
+ }
7028
+ if (key === "entityId" && parent.entityType === "issue") {
7029
+ return readIssueIdentifier(parent) ?? shortUuid(uuid);
7030
+ }
7031
+ return shortUuid(uuid);
7032
+ }
7033
+ function shouldShowFullIds(explicit) {
7034
+ return Boolean((explicit ?? currentCommandFullIds) || process.argv.includes("--full-ids"));
7035
+ }
7036
+ function isCliIdKey(key) {
7037
+ return key === "id" || key.endsWith("Id");
7038
+ }
7039
+ function isCliIdListKey(key) {
7040
+ return key.endsWith("Ids");
7041
+ }
7042
+ function isCliReferenceStringKey(key) {
7043
+ const lowerKey = key.toLowerCase();
7044
+ return lowerKey.endsWith("ref") || lowerKey.endsWith("path");
7045
+ }
7046
+ function singularizeIdListKey(key) {
7047
+ return `${key.slice(0, -3)}Id`;
7048
+ }
7049
+ function isAgentIdKey(key, parent) {
7050
+ const lowerKey = key.toLowerCase();
7051
+ return lowerKey.includes("agentid") || key === "actorId" && parent.actorType === "agent";
7052
+ }
7053
+ function isIssueCommentIdKey(key) {
7054
+ return key.toLowerCase().includes("commentid");
7055
+ }
7056
+ function formatTypedShortRef(kind, uuid) {
7057
+ const prefix = kind === "agent" ? "agt" : "cmt";
7058
+ return `${prefix}_${shortUuid(uuid)}`;
7059
+ }
7060
+ function shortUuid(uuid) {
7061
+ return uuid.replace(/-/g, "").slice(0, CLI_SHORT_UUID_LENGTH).toLowerCase();
7062
+ }
7063
+ function readIssueIdentifier(parent) {
7064
+ const direct = readDirectIssueIdentifier(parent);
7065
+ if (direct) return direct;
7066
+ const details = parent.details;
7067
+ if (typeof details !== "object" || details === null) return null;
7068
+ const detailsRecord = details;
7069
+ return readString(detailsRecord.identifier) ?? readString(detailsRecord.issueIdentifier);
7070
+ }
7071
+ function readDirectIssueIdentifier(parent) {
7072
+ return readString(parent.identifier) ?? readString(parent.issueIdentifier);
7073
+ }
7074
+ function readString(value) {
7075
+ return typeof value === "string" && value.trim().length > 0 ? value : null;
7076
+ }
6903
7077
  function renderValue(value) {
6904
7078
  if (value === null || value === void 0) return "-";
6905
7079
  if (typeof value === "string") {
@@ -7061,16 +7235,16 @@ var RUDDER_AGENT_OPERATING_CONTRACT = [
7061
7235
  "",
7062
7236
  "When you mention Rudder entities in any user-visible Markdown output, prefer Rudder's renderable Markdown link syntax over plain IDs, bare URLs, or backticked references so the UI can render chips and navigate correctly.",
7063
7237
  "",
7064
- "- Issues: use `[<identifier-or-title>](issue://<issue-id>)`; include `?c=<comment-id>` when linking to a specific comment.",
7065
- "- Agents: use `[<agent-name>](agent://<agent-id>)` for reference-only links. In issue comments, use `[<agent-name>](agent://<agent-id>?intent=wake)` only when you intentionally want to wake that agent for attention or collaboration.",
7066
- "- Projects: use `[<project-name>](project://<project-id>)` when citing a Rudder project.",
7067
- "- Chat threads: use `[<chat-title>](chat://<conversation-id>)` when citing a Rudder chat conversation.",
7068
- "- Skills: use `[$<skill-ref>](<path-or-url-ending-in-SKILL.md>)` when citing a Rudder skill reference; the label may use `org/<org-url-key>/<skill-slug>`, `org/<org-url-key>/<agent-url-key>/<skill-slug>`, or `rudder/<skill-slug>`.",
7238
+ "- Issues: use `[](issue://<issue-id>)`; include `?c=<comment-id>` when linking to a specific comment.",
7239
+ "- Agents: use `[](agent://<agent-id>)` for reference-only links. In issue comments, use `[](agent://<agent-id>?intent=wake)` only when you intentionally want to wake that agent for attention or collaboration.",
7240
+ "- Projects: use `[](project://<project-id>)` when citing a Rudder project.",
7241
+ "- Chat threads: use `[](chat://<conversation-id>)` when citing a Rudder chat conversation.",
7242
+ "- Skills: use `[](skill://<skill-ref>)` when citing a Rudder skill reference. The skill ref may be an org skill, agent skill, bundled Rudder skill, or local-machine skill ref; the UI resolves the display label when metadata is available.",
7069
7243
  '- Library files: use the `markdownLink` returned by `rudder library file ref "$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>" --json`; do not hand-write `library-entry://...` links, and treat `library-file://...` as legacy path syntax only.',
7070
7244
  "",
7071
7245
  "Write these as normal Markdown links, not inside code spans or code blocks, unless you are literally documenting the syntax.",
7072
7246
  "",
7073
- "Mention-triggered comment wakes arrive with `RUDDER_WAKE_COMMENT_ID`; read that wake comment before acting. Issue comments can wake an agent only with an explicit wake-intent agent link serialized as `agent://agent-id?intent=wake`. Plain structured links such as `agent://agent-id` are reference-only links for rendering and navigation, and plain text agent names are not wake requests. Use wake-intent links only when you intentionally want to wake another agent for attention or collaboration; omit the wake intent for ordinary references. Mentioning an agent requests attention or collaboration; it does not transfer issue ownership unless the comment also makes an explicit handoff and normal checkout rules allow it.",
7247
+ "Mention-triggered comment wakes arrive with `RUDDER_WAKE_COMMENT_ID`; read that wake comment before acting. Issue comments can wake an agent only with an explicit wake-intent agent link serialized as `agent://agent-id?intent=wake`. Plain structured links such as `agent://agent-id` are reference-only links for rendering and navigation, and plain text agent names are not wake requests. Use wake-intent links only when you intentionally want to wake another agent for attention or collaboration; omit the wake intent for ordinary references. Mentioning an agent requests attention or collaboration; it does not transfer issue ownership unless the comment also makes an explicit handoff and normal checkout rules allow it. If a comment wakes you on an issue not assigned to you, including user-owned or unassigned issues, and the comment does not explicitly ask you to implement, modify files, close the issue, or take ownership, strictly respond to the comment's content instead of turning the wake into issue execution; answer questions, acknowledge corrections, explain status, or handle only the narrow action the comment explicitly requests.",
7074
7248
  "",
7075
7249
  "When an issue comment, done comment, or blocker comment cites visual evidence from a local screenshot/image path, attach the image with the Rudder CLI `--image <path>` option instead of leaving only the filesystem path in the text.",
7076
7250
  "",
@@ -7102,7 +7276,7 @@ var RUDDER_AGENT_HEARTBEAT_INSTRUCTION = [
7102
7276
  "1. Identify yourself and inspect wake context, including `RUDDER_TASK_ID`, `RUDDER_WAKE_REASON`, `RUDDER_WAKE_COMMENT_ID`, and `RUDDER_APPROVAL_ID` when present.",
7103
7277
  "2. Handle approval follow-up first: read the approval and linked issues, then close resolved work or comment on what remains.",
7104
7278
  "3. Inspect your Rudder inbox. Prioritize reviewer rows in `in_review` or `blocked`, then assignee `in_progress`, then assignee `todo`. Do not look for unassigned work.",
7105
- "4. For mention wakes, read the wake comment before acting. Mentions request attention; they do not transfer ownership unless the comment explicitly says so.",
7279
+ "4. For mention wakes, read the wake comment before acting. Mentions request attention; they do not transfer ownership unless the comment explicitly says so. If the issue is not assigned to you, including user-owned or unassigned issues, and the comment does not explicitly ask you to implement, modify files, close the issue, or take ownership, respond to the comment itself instead of executing the whole issue.",
7106
7280
  "5. Checkout before doing assignee task work. A `409` means another agent owns the task; do not retry it.",
7107
7281
  "6. Load compact issue context, do one bounded useful chunk, and preserve evidence.",
7108
7282
  "7. Before exiting active work, leave exactly one durable signal: progress, done, blocked, explicit handoff, or structured review decision.",
@@ -7538,6 +7712,18 @@ var AGENT_CLI_CAPABILITIES = [
7538
7712
  requiresRunId: false,
7539
7713
  attachesRunIdWhenAvailable: true
7540
7714
  },
7715
+ {
7716
+ id: "user.activity",
7717
+ command: "rudder user activity --user me --since today --json",
7718
+ category: "user",
7719
+ description: "Read a user-centered activity ledger with safe excerpts and provenance across chats, issue comments, approval comments, and user actor activity.",
7720
+ mutating: false,
7721
+ contract: "agent-v1",
7722
+ requiresOrgId: true,
7723
+ requiresAgentId: false,
7724
+ requiresRunId: false,
7725
+ attachesRunIdWhenAvailable: false
7726
+ },
7541
7727
  {
7542
7728
  id: "library.file.list",
7543
7729
  command: "rudder library file list [directory]",
@@ -8136,6 +8322,7 @@ var CATEGORY_TITLES = {
8136
8322
  runs: "Runs",
8137
8323
  approval: "Approval",
8138
8324
  skill: "Skill",
8325
+ user: "User",
8139
8326
  library: "Library"
8140
8327
  };
8141
8328
  function getAgentCliCapabilities() {
@@ -9475,11 +9662,17 @@ function formatChatSearchResult(row, maxChars) {
9475
9662
  };
9476
9663
  }
9477
9664
  function formatChatMessage(row, maxOutputChars = 1200) {
9665
+ const runId = row.runId ? formatCliRunId(row.runId) : null;
9478
9666
  return {
9479
9667
  id: row.id,
9480
9668
  role: row.role,
9481
9669
  kind: row.kind,
9482
9670
  status: row.status,
9671
+ ...runId ? {
9672
+ runId,
9673
+ runCommand: `rudder runs get ${runId}`,
9674
+ transcriptCommand: `rudder runs transcript ${runId}`
9675
+ } : {},
9483
9676
  createdAt: row.createdAt,
9484
9677
  body: clip(row.body, 220),
9485
9678
  transcriptEntries: row.transcriptSummary?.entryCount ?? row.transcript?.length ?? 0,
@@ -9487,11 +9680,17 @@ function formatChatMessage(row, maxOutputChars = 1200) {
9487
9680
  };
9488
9681
  }
9489
9682
  function formatChatTranscriptMessage(row, maxChars) {
9683
+ const runId = row.runId ? formatCliRunId(row.runId) : null;
9490
9684
  const header = {
9491
9685
  id: row.id,
9492
9686
  role: row.role,
9493
9687
  kind: row.kind,
9494
9688
  status: row.status,
9689
+ ...runId ? {
9690
+ runId,
9691
+ runCommand: `rudder runs get ${runId}`,
9692
+ transcriptCommand: `rudder runs transcript ${runId}`
9693
+ } : {},
9495
9694
  createdAt: row.createdAt,
9496
9695
  body: clip(row.body, 220)
9497
9696
  };
@@ -11815,7 +12014,7 @@ function registerRunsCommands(program) {
11815
12014
  { includeCompany: false }
11816
12015
  );
11817
12016
  addCommonClientOptions(
11818
- runs.command("get").description(getAgentCliCapabilityById("runs.get").description).argument("<runId>", "Run ID").action(async (runId, opts) => {
12017
+ runs.command("get").description(getAgentCliCapabilityById("runs.get").description).argument("<runId>", "Run ID or short run ID").action(async (runId, opts) => {
11819
12018
  try {
11820
12019
  const ctx = resolveCommandContext(opts);
11821
12020
  const row = await ctx.api.get(`/api/run-intelligence/runs/${encodeURIComponent(runId)}`);
@@ -11826,7 +12025,7 @@ function registerRunsCommands(program) {
11826
12025
  })
11827
12026
  );
11828
12027
  addCommonClientOptions(
11829
- runs.command("events").description(getAgentCliCapabilityById("runs.events").description).argument("<runId>", "Run ID").action(async (runId, opts) => {
12028
+ runs.command("events").description(getAgentCliCapabilityById("runs.events").description).argument("<runId>", "Run ID or short run ID").action(async (runId, opts) => {
11830
12029
  try {
11831
12030
  const ctx = resolveCommandContext(opts);
11832
12031
  const rows = await ctx.api.get(`/api/run-intelligence/runs/${encodeURIComponent(runId)}/events`) ?? [];
@@ -11837,7 +12036,7 @@ function registerRunsCommands(program) {
11837
12036
  })
11838
12037
  );
11839
12038
  addCommonClientOptions(
11840
- runs.command("log").description(getAgentCliCapabilityById("runs.log").description).argument("<runId>", "Run ID").option("--max-chars <n>", "Maximum log characters for human output", "12000").action(async (runId, opts) => {
12039
+ runs.command("log").description(getAgentCliCapabilityById("runs.log").description).argument("<runId>", "Run ID or short run ID").option("--max-chars <n>", "Maximum log characters for human output", "12000").action(async (runId, opts) => {
11841
12040
  try {
11842
12041
  const ctx = resolveCommandContext(opts);
11843
12042
  const row = await ctx.api.get(`/api/run-intelligence/runs/${encodeURIComponent(runId)}/log`);
@@ -11852,7 +12051,7 @@ function registerRunsCommands(program) {
11852
12051
  })
11853
12052
  );
11854
12053
  addCommonClientOptions(
11855
- runs.command("transcript").description(getAgentCliCapabilityById("runs.transcript").description).argument("<runId>", "Run ID").option("--errors-only", "Show only error transcript rows").option("--around-error <id>", "Show context around a run error id such as step-12").option("--context-turns <n>", "Turns around --around-error", "1").option("--cursor <cursor>", "Stable transcript cursor returned in page.nextCursor").option("--turn-limit <n>", "Maximum turns to return", "20").option("--chronological", "Show oldest-first instead of default newest-first").option("--narrative", "Use a narrative human layout").option("--max-chars <n>", "Maximum output characters per row", "1200").option("--max-output-chars <n>", "Alias for --max-chars").option("--include-output", "Include row output in compact human transcript rows").option("--include-outputs", "Alias for --include-output").action(async (runId, opts) => {
12054
+ runs.command("transcript").description(getAgentCliCapabilityById("runs.transcript").description).argument("<runId>", "Run ID or short run ID").option("--errors-only", "Show only error transcript rows").option("--around-error <id>", "Show context around a run error id such as step-12").option("--context-turns <n>", "Turns around --around-error", "1").option("--cursor <cursor>", "Stable transcript cursor returned in page.nextCursor").option("--turn-limit <n>", "Maximum turns to return", "20").option("--chronological", "Show oldest-first instead of default newest-first").option("--narrative", "Use a narrative human layout").option("--max-chars <n>", "Maximum output characters per row", "1200").option("--max-output-chars <n>", "Alias for --max-chars").option("--include-output", "Include row output in compact human transcript rows").option("--include-outputs", "Alias for --include-output").action(async (runId, opts) => {
11856
12055
  try {
11857
12056
  const ctx = resolveCommandContext(opts);
11858
12057
  const payload = await ctx.api.get(
@@ -11871,7 +12070,7 @@ function registerRunsCommands(program) {
11871
12070
  })
11872
12071
  );
11873
12072
  addCommonClientOptions(
11874
- runs.command("errors").description(getAgentCliCapabilityById("runs.errors").description).argument("<runId>", "Run ID").option("--max-chars <n>", "Maximum output characters per error", "1200").action(async (runId, opts) => {
12073
+ runs.command("errors").description(getAgentCliCapabilityById("runs.errors").description).argument("<runId>", "Run ID or short run ID").option("--max-chars <n>", "Maximum output characters per error", "1200").action(async (runId, opts) => {
11875
12074
  try {
11876
12075
  const ctx = resolveCommandContext(opts);
11877
12076
  const params = new URLSearchParams();
@@ -11886,7 +12085,7 @@ function registerRunsCommands(program) {
11886
12085
  })
11887
12086
  );
11888
12087
  addCommonClientOptions(
11889
- runs.command("cancel").description(getAgentCliCapabilityById("runs.cancel").description).argument("<runId>", "Run ID").action(async (runId, opts) => {
12088
+ runs.command("cancel").description(getAgentCliCapabilityById("runs.cancel").description).argument("<runId>", "Run ID or short run ID").action(async (runId, opts) => {
11890
12089
  try {
11891
12090
  const ctx = resolveCommandContext(opts);
11892
12091
  const row = await ctx.api.post(`/api/heartbeat-runs/${encodeURIComponent(runId)}/cancel`, {});
@@ -11897,7 +12096,7 @@ function registerRunsCommands(program) {
11897
12096
  })
11898
12097
  );
11899
12098
  addCommonClientOptions(
11900
- runs.command("retry").description(getAgentCliCapabilityById("runs.retry").description).argument("<runId>", "Run ID").action(async (runId, opts) => {
12099
+ runs.command("retry").description(getAgentCliCapabilityById("runs.retry").description).argument("<runId>", "Run ID or short run ID").action(async (runId, opts) => {
11901
12100
  try {
11902
12101
  const ctx = resolveCommandContext(opts);
11903
12102
  const row = await ctx.api.post(`/api/heartbeat-runs/${encodeURIComponent(runId)}/retry`, {});
@@ -11958,8 +12157,9 @@ function buildTranscriptQuery(opts, output) {
11958
12157
  return params.toString();
11959
12158
  }
11960
12159
  function formatRunListRow(row) {
12160
+ const runId = formatCliRunId(row.run.id);
11961
12161
  return {
11962
- id: row.run.id,
12162
+ id: runId,
11963
12163
  status: row.run.status,
11964
12164
  agent: row.agentName ?? row.run.agentId,
11965
12165
  runtime: row.bundle.agentRuntimeType,
@@ -11970,7 +12170,7 @@ function formatRunListRow(row) {
11970
12170
  skill: row.skillEvidence?.matchedSkillKey ?? "-",
11971
12171
  langfuse: readLangfuseTraceUrl(row.langfuse) ?? "-",
11972
12172
  error: row.errorSummary ?? "-",
11973
- next: row.run.status === "failed" ? `rudder runs errors ${row.run.id}` : `rudder runs transcript ${row.run.id}`
12173
+ next: row.run.status === "failed" ? `rudder runs errors ${runId}` : `rudder runs transcript ${runId}`
11974
12174
  };
11975
12175
  }
11976
12176
  function buildSkillRunReport(skill, evidenceType, rows) {
@@ -12016,7 +12216,10 @@ function buildSkillRunReport(skill, evidenceType, rows) {
12016
12216
  commonErrors: [...errors.entries()].map(([summary, count]) => ({ summary, count })).sort((a, b) => b.count - a.count).slice(0, 5)
12017
12217
  },
12018
12218
  rows,
12019
- nextCommands: rows.slice(0, 5).map((row) => row.run.status === "failed" ? `rudder runs errors ${row.run.id}` : `rudder runs transcript ${row.run.id}`)
12219
+ nextCommands: rows.slice(0, 5).map((row) => {
12220
+ const runId = formatCliRunId(row.run.id);
12221
+ return row.run.status === "failed" ? `rudder runs errors ${runId}` : `rudder runs transcript ${runId}`;
12222
+ })
12020
12223
  };
12021
12224
  }
12022
12225
  function formatSkillRunReport(report) {
@@ -12040,11 +12243,12 @@ function formatSkillRunReport(report) {
12040
12243
  return lines;
12041
12244
  }
12042
12245
  function formatInlineSkillRun(row) {
12246
+ const runId = formatCliRunId(row.run.id);
12043
12247
  const issue = formatIssueRef(row.issue);
12044
12248
  const label = row.skillEvidence?.matchedSkillLabel && row.skillEvidence.matchedSkillLabel !== row.skillEvidence.matchedSkillKey ? ` label=${row.skillEvidence.matchedSkillLabel}` : "";
12045
12249
  const langfuse = readLangfuseTraceUrl(row.langfuse);
12046
12250
  return [
12047
- `id=${row.run.id}`,
12251
+ `id=${runId}`,
12048
12252
  `status=${row.run.status}`,
12049
12253
  `agent=${row.agentName ?? row.run.agentId}`,
12050
12254
  `issue=${issue}`,
@@ -12055,7 +12259,7 @@ function formatInlineSkillRun(row) {
12055
12259
  `skill=${row.skillEvidence?.matchedSkillKey ?? "-"}${label}`,
12056
12260
  `langfuse=${langfuse ?? "-"}`,
12057
12261
  `error=${row.errorSummary ?? "-"}`,
12058
- `next=${row.run.status === "failed" ? `rudder runs errors ${row.run.id}` : `rudder runs transcript ${row.run.id}`}`
12262
+ `next=${row.run.status === "failed" ? `rudder runs errors ${runId}` : `rudder runs transcript ${runId}`}`
12059
12263
  ].join(" ");
12060
12264
  }
12061
12265
  function formatIssueRef(issue) {
@@ -12232,6 +12436,59 @@ function parseCsv5(value) {
12232
12436
  return rows.length > 0 ? rows : void 0;
12233
12437
  }
12234
12438
 
12439
+ // src/commands/client/user.ts
12440
+ function appendParam(params, key, value) {
12441
+ if (value && value.trim()) params.set(key, value.trim());
12442
+ }
12443
+ function formatUserActivityItem(item) {
12444
+ const time = new Date(item.occurredAt);
12445
+ const hhmm = Number.isNaN(time.getTime()) ? item.occurredAt : time.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
12446
+ const related = item.related.find((entry) => entry.type === "issue" || entry.type === "chat" || entry.type === "approval");
12447
+ const label = related?.label || related?.id || item.source.id;
12448
+ const excerpt = item.excerpt ? ` - ${item.excerpt}` : "";
12449
+ return `${hhmm} ${item.kind} ${label}: ${item.summary}${excerpt}`;
12450
+ }
12451
+ function registerUserCommands(program) {
12452
+ const user = program.command("user").description("User-oriented Rudder context commands");
12453
+ addCommonClientOptions(
12454
+ user.command("activity").description("List a user's recent Rudder activity ledger").option("-O, --org-id <id>", "Organization ID").option("--user <id>", "User ID or 'me'", "me").option("--since <value>", "Start time: today, 24h, 7d, or ISO timestamp", "today").option("--until <value>", "End time: ISO timestamp").option("--include <items>", "Comma-separated sources: chat,comments,issues,approvals,activity").option("--agent-id <id>", "Filter by related agent ID").option("--project-id <id>", "Filter by related project ID").option("--issue-id <id>", "Filter by related issue ID").option("--limit <n>", "Maximum items to return").option("--cursor <cursor>", "Pagination cursor from a prior response").action(async (opts) => {
12455
+ try {
12456
+ const ctx = resolveCommandContext(opts, { requireCompany: true });
12457
+ const userId = opts.user?.trim() || "me";
12458
+ const params = new URLSearchParams();
12459
+ appendParam(params, "since", opts.since);
12460
+ appendParam(params, "until", opts.until);
12461
+ appendParam(params, "include", opts.include);
12462
+ appendParam(params, "agentId", opts.agentId);
12463
+ appendParam(params, "projectId", opts.projectId);
12464
+ appendParam(params, "issueId", opts.issueId);
12465
+ appendParam(params, "limit", opts.limit);
12466
+ appendParam(params, "cursor", opts.cursor);
12467
+ const query = params.toString();
12468
+ const path23 = `/api/orgs/${ctx.orgId}/users/${encodeURIComponent(userId)}/activity-ledger${query ? `?${query}` : ""}`;
12469
+ const result = await ctx.api.get(path23);
12470
+ if (ctx.json) {
12471
+ printOutput(result, { json: true });
12472
+ return;
12473
+ }
12474
+ if (!result?.items?.length) {
12475
+ printOutput([], { json: false });
12476
+ return;
12477
+ }
12478
+ for (const item of result.items) {
12479
+ console.log(formatUserActivityItem(item));
12480
+ }
12481
+ if (result.nextCursor) {
12482
+ console.log(`nextCursor=${result.nextCursor}`);
12483
+ }
12484
+ } catch (err) {
12485
+ handleCommandError(err);
12486
+ }
12487
+ }),
12488
+ { includeCompany: false }
12489
+ );
12490
+ }
12491
+
12235
12492
  // src/commands/configure.ts
12236
12493
  init_home();
12237
12494
  init_schema();
@@ -12814,7 +13071,7 @@ async function heartbeatRun(opts) {
12814
13071
  return;
12815
13072
  }
12816
13073
  const run = invokeRes;
12817
- console.log(pc12.cyan(`Invoked heartbeat run ${run.id} for agent ${agent.name} (${agent.id})`));
13074
+ console.log(pc12.cyan(`Invoked heartbeat run ${formatCliRunId(run.id)} for agent ${agent.name} (${formatCliRunId(agent.id)})`));
12818
13075
  const runId = run.id;
12819
13076
  let activeRunId = null;
12820
13077
  let lastEventSeq = 0;
@@ -13026,7 +13283,7 @@ init_install2();
13026
13283
  init_install();
13027
13284
  import * as p15 from "@clack/prompts";
13028
13285
  import { spawn as spawn2, spawnSync as spawnSync3 } from "node:child_process";
13029
- import { createHash } from "node:crypto";
13286
+ import { createHash, randomUUID } from "node:crypto";
13030
13287
  import { createWriteStream, constants as fsConstants, mkdirSync, readFileSync as readFileSync2 } from "node:fs";
13031
13288
  import { access, chmod, copyFile, cp, mkdir as mkdir3, mkdtemp, readdir as readdir3, readFile as readFile6, rm as rm2, stat as stat4, utimes, writeFile as writeFile3 } from "node:fs/promises";
13032
13289
  import { homedir, tmpdir } from "node:os";
@@ -13162,6 +13419,8 @@ var DEFAULT_DESKTOP_ASSET_CACHE_MAX_ENTRIES = 2;
13162
13419
  var DEFAULT_DESKTOP_ASSET_CACHE_MAX_AGE_MS = 14 * 24 * 60 * 60 * 1e3;
13163
13420
  var DEFAULT_DESKTOP_ASSET_CACHE_MAX_BYTES = 768 * 1024 * 1024;
13164
13421
  var DEFAULT_DESKTOP_ASSET_CACHE_KEEP_PREVIOUS = 1;
13422
+ var DESKTOP_INSTALL_LOCK_TIMEOUT_MS = 60 * 60 * 1e3;
13423
+ var DESKTOP_INSTALL_LOCK_POLL_MS = 250;
13165
13424
  function normalizeProgressTotal(totalBytes) {
13166
13425
  return typeof totalBytes === "number" && Number.isFinite(totalBytes) && totalBytes > 0 ? totalBytes : null;
13167
13426
  }
@@ -13805,6 +14064,70 @@ async function pathExists2(targetPath) {
13805
14064
  return false;
13806
14065
  }
13807
14066
  }
14067
+ function resolveDesktopInstallLockPath(paths) {
14068
+ const installRootHash = createHash("sha256").update(path21.resolve(paths.installRoot)).digest("hex").slice(0, 16);
14069
+ return path21.join(path21.dirname(paths.appPath), `.rudder-desktop-install-${installRootHash}.lock`);
14070
+ }
14071
+ async function readDesktopInstallLock(lockPath) {
14072
+ try {
14073
+ const parsed = JSON.parse(await readFile6(lockPath, "utf8"));
14074
+ if (typeof parsed.pid !== "number" || !Number.isInteger(parsed.pid) || parsed.pid <= 0 || typeof parsed.lockId !== "string" || typeof parsed.installRoot !== "string" || typeof parsed.createdAt !== "string") {
14075
+ return null;
14076
+ }
14077
+ return {
14078
+ lockId: parsed.lockId,
14079
+ pid: parsed.pid,
14080
+ installRoot: parsed.installRoot,
14081
+ createdAt: parsed.createdAt
14082
+ };
14083
+ } catch {
14084
+ return null;
14085
+ }
14086
+ }
14087
+ async function withDesktopInstallLock(paths, fn, options = {}) {
14088
+ const lockPath = resolveDesktopInstallLockPath(paths);
14089
+ const lockDir = path21.dirname(lockPath);
14090
+ const timeoutMs = options.timeoutMs ?? DESKTOP_INSTALL_LOCK_TIMEOUT_MS;
14091
+ const pollMs = options.pollMs ?? DESKTOP_INSTALL_LOCK_POLL_MS;
14092
+ const startedAt = Date.now();
14093
+ const payload = {
14094
+ lockId: randomUUID(),
14095
+ pid: process.pid,
14096
+ installRoot: path21.resolve(paths.installRoot),
14097
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
14098
+ };
14099
+ await mkdir3(lockDir, { recursive: true });
14100
+ while (true) {
14101
+ try {
14102
+ await writeFile3(lockPath, `${JSON.stringify(payload, null, 2)}
14103
+ `, { encoding: "utf8", flag: "wx" });
14104
+ break;
14105
+ } catch (error) {
14106
+ const err = error;
14107
+ if (err.code !== "EEXIST") throw error;
14108
+ const existing = await readDesktopInstallLock(lockPath);
14109
+ const stale = !existing || !processExists(existing.pid);
14110
+ if (stale) {
14111
+ await rm2(lockPath, { force: true });
14112
+ continue;
14113
+ }
14114
+ if (Date.now() - startedAt >= timeoutMs) {
14115
+ throw new Error(
14116
+ `Timed out waiting for Rudder Desktop install lock for ${paths.appPath}. Held by pid ${existing.pid} for ${existing.installRoot}.`
14117
+ );
14118
+ }
14119
+ await delay2(pollMs);
14120
+ }
14121
+ }
14122
+ try {
14123
+ return await fn();
14124
+ } finally {
14125
+ const existing = await readDesktopInstallLock(lockPath);
14126
+ if (existing?.lockId === payload.lockId) {
14127
+ await rm2(lockPath, { force: true });
14128
+ }
14129
+ }
14130
+ }
13808
14131
  function runChecked(command, args, options = {}) {
13809
14132
  const result = spawnSync3(command, args, {
13810
14133
  encoding: "utf8",
@@ -14257,152 +14580,154 @@ async function startCommand(opts) {
14257
14580
  p15.outro(pc15.green("Dry run complete."));
14258
14581
  return;
14259
14582
  }
14260
- const directReleaseVersion = resolveDesktopReleaseVersion(tag);
14261
- const progressFactory = desktopProgressJson ? createDesktopProgressFactory() : createByteProgress;
14262
- let release = null;
14263
- try {
14264
- release = await runStartPhase(
14265
- "Resolving Desktop release...",
14266
- "Desktop release resolved.",
14267
- () => fetchGithubRelease(repo, tag),
14268
- desktopProgressJson ? "resolving_release" : null
14269
- );
14270
- } catch (error) {
14271
- if (!directReleaseVersion) throw error;
14272
- p15.log.warn(
14273
- `Desktop release metadata could not be resolved; falling back to deterministic download URLs. ${formatFetchError(error)}`
14274
- );
14275
- }
14276
- const releaseTag = release?.tag_name ?? (directReleaseVersion ? tag : null);
14277
- if (!releaseTag) {
14278
- throw new Error(`Unable to resolve Rudder Desktop release tag for ${repo}@${tag}.`);
14279
- }
14280
- const assetCandidates = resolveDesktopAssetCandidates({
14281
- releaseAssets: release?.assets ?? [],
14282
- target,
14283
- repo,
14284
- tag,
14285
- directReleaseVersion,
14286
- allowShellAssets: runtimeSupportsShellAssets
14287
- });
14288
- if (assetCandidates.length === 0) {
14289
- throw new Error(`No Rudder Desktop portable asset found for ${target.platform}/${target.arch} in ${repo}@${releaseTag}.`);
14290
- }
14291
- const checksumAsset = selectChecksumAsset(release?.assets ?? []) ?? (directReleaseVersion ? buildGithubReleaseAsset(repo, tag, DESKTOP_CHECKSUM_ASSET_NAME) : null);
14292
- const checksums = await downloadChecksums(checksumAsset, outputDir, progressFactory);
14293
- let selectedCandidate;
14294
- try {
14295
- selectedCandidate = selectChecksummedDesktopAssetCandidate(assetCandidates, checksums);
14296
- } catch (error) {
14297
- throw new Error(`No checksummed Rudder Desktop asset found for ${target.platform}/${target.arch} in ${repo}@${releaseTag}.`);
14298
- }
14299
- for (const warning of selectedCandidate.warnings) p15.log.warn(warning);
14300
- let selectedAsset = selectedCandidate.asset;
14301
- let selectedAssetKind = selectedCandidate.kind;
14302
- let expectedChecksum = selectedCandidate.expectedChecksum;
14303
- const metadata = await readInstallMetadata(installPaths.metadataPath);
14304
- if (isInstalledDesktopCurrent(metadata, releaseTag, selectedAsset.name, expectedChecksum) && await pathExists2(installPaths.executablePath)) {
14305
- p15.log.success(`Rudder Desktop is already installed at ${pc15.cyan(installPaths.appPath)}.`);
14306
- await runStartPhase(
14307
- "Refreshing Desktop launchers...",
14308
- "Desktop launchers ready.",
14309
- async () => {
14310
- await removeMacQuarantine(installPaths, target);
14311
- await createPlatformLaunchers(installPaths, target);
14312
- },
14313
- desktopProgressJson ? "preparing_restart" : null
14314
- );
14315
- } else {
14316
- let cachedAsset;
14583
+ await withDesktopInstallLock(installPaths, async () => {
14584
+ const directReleaseVersion = resolveDesktopReleaseVersion(tag);
14585
+ const progressFactory = desktopProgressJson ? createDesktopProgressFactory() : createByteProgress;
14586
+ let release = null;
14317
14587
  try {
14318
- cachedAsset = await downloadDesktopAssetWithCache(selectedAsset, expectedChecksum, {
14319
- outputDir,
14320
- progressFactory
14321
- });
14588
+ release = await runStartPhase(
14589
+ "Resolving Desktop release...",
14590
+ "Desktop release resolved.",
14591
+ () => fetchGithubRelease(repo, tag),
14592
+ desktopProgressJson ? "resolving_release" : null
14593
+ );
14322
14594
  } catch (error) {
14323
- const fullCandidate = assetCandidates.find((candidate) => candidate.kind === "full");
14324
- if (selectedAssetKind !== "shell" || !fullCandidate) throw error;
14595
+ if (!directReleaseVersion) throw error;
14325
14596
  p15.log.warn(
14326
- `Layered Desktop shell asset download failed; falling back to the full portable asset. ${formatFetchError(error)}`
14597
+ `Desktop release metadata could not be resolved; falling back to deterministic download URLs. ${formatFetchError(error)}`
14327
14598
  );
14328
- selectedAsset = fullCandidate.asset;
14329
- selectedAssetKind = fullCandidate.kind;
14330
- expectedChecksum = resolveAssetChecksum(checksums, selectedAsset.name);
14331
- cachedAsset = await downloadDesktopAssetWithCache(selectedAsset, expectedChecksum, {
14332
- outputDir,
14333
- progressFactory
14334
- });
14335
14599
  }
14336
- if (cachedAsset.cacheStatus === "hit") {
14337
- p15.log.success(`Desktop asset cache hit at ${pc15.cyan(cachedAsset.path)}.`);
14338
- if (desktopProgressJson) {
14600
+ const releaseTag = release?.tag_name ?? (directReleaseVersion ? tag : null);
14601
+ if (!releaseTag) {
14602
+ throw new Error(`Unable to resolve Rudder Desktop release tag for ${repo}@${tag}.`);
14603
+ }
14604
+ const assetCandidates = resolveDesktopAssetCandidates({
14605
+ releaseAssets: release?.assets ?? [],
14606
+ target,
14607
+ repo,
14608
+ tag,
14609
+ directReleaseVersion,
14610
+ allowShellAssets: runtimeSupportsShellAssets
14611
+ });
14612
+ if (assetCandidates.length === 0) {
14613
+ throw new Error(`No Rudder Desktop portable asset found for ${target.platform}/${target.arch} in ${repo}@${releaseTag}.`);
14614
+ }
14615
+ const checksumAsset = selectChecksumAsset(release?.assets ?? []) ?? (directReleaseVersion ? buildGithubReleaseAsset(repo, tag, DESKTOP_CHECKSUM_ASSET_NAME) : null);
14616
+ const checksums = await downloadChecksums(checksumAsset, outputDir, progressFactory);
14617
+ let selectedCandidate;
14618
+ try {
14619
+ selectedCandidate = selectChecksummedDesktopAssetCandidate(assetCandidates, checksums);
14620
+ } catch (error) {
14621
+ throw new Error(`No checksummed Rudder Desktop asset found for ${target.platform}/${target.arch} in ${repo}@${releaseTag}.`);
14622
+ }
14623
+ for (const warning of selectedCandidate.warnings) p15.log.warn(warning);
14624
+ let selectedAsset = selectedCandidate.asset;
14625
+ let selectedAssetKind = selectedCandidate.kind;
14626
+ let expectedChecksum = selectedCandidate.expectedChecksum;
14627
+ const metadata = await readInstallMetadata(installPaths.metadataPath);
14628
+ if (isInstalledDesktopCurrent(metadata, releaseTag, selectedAsset.name, expectedChecksum) && await pathExists2(installPaths.executablePath)) {
14629
+ p15.log.success(`Rudder Desktop is already installed at ${pc15.cyan(installPaths.appPath)}.`);
14630
+ await runStartPhase(
14631
+ "Refreshing Desktop launchers...",
14632
+ "Desktop launchers ready.",
14633
+ async () => {
14634
+ await removeMacQuarantine(installPaths, target);
14635
+ await createPlatformLaunchers(installPaths, target);
14636
+ },
14637
+ desktopProgressJson ? "preparing_restart" : null
14638
+ );
14639
+ } else {
14640
+ let cachedAsset;
14641
+ try {
14642
+ cachedAsset = await downloadDesktopAssetWithCache(selectedAsset, expectedChecksum, {
14643
+ outputDir,
14644
+ progressFactory
14645
+ });
14646
+ } catch (error) {
14647
+ const fullCandidate = assetCandidates.find((candidate) => candidate.kind === "full");
14648
+ if (selectedAssetKind !== "shell" || !fullCandidate) throw error;
14649
+ p15.log.warn(
14650
+ `Layered Desktop shell asset download failed; falling back to the full portable asset. ${formatFetchError(error)}`
14651
+ );
14652
+ selectedAsset = fullCandidate.asset;
14653
+ selectedAssetKind = fullCandidate.kind;
14654
+ expectedChecksum = resolveAssetChecksum(checksums, selectedAsset.name);
14655
+ cachedAsset = await downloadDesktopAssetWithCache(selectedAsset, expectedChecksum, {
14656
+ outputDir,
14657
+ progressFactory
14658
+ });
14659
+ }
14660
+ if (cachedAsset.cacheStatus === "hit") {
14661
+ p15.log.success(`Desktop asset cache hit at ${pc15.cyan(cachedAsset.path)}.`);
14662
+ if (desktopProgressJson) {
14663
+ writeDesktopProgress({
14664
+ phase: "downloading_asset",
14665
+ message: `Desktop asset cache hit for ${selectedAsset.name}.`,
14666
+ percent: 100
14667
+ });
14668
+ }
14669
+ }
14670
+ const checksum = await runStartPhase(
14671
+ "Verifying Desktop checksum...",
14672
+ `Verified ${pc15.cyan(path21.basename(cachedAsset.path))}.`,
14673
+ () => assertChecksumMatch(cachedAsset.path, expectedChecksum),
14674
+ desktopProgressJson ? "verifying_checksum" : null
14675
+ );
14676
+ if (desktopProgressJson && opts.desktopWaitForApply === true) {
14339
14677
  writeDesktopProgress({
14340
- phase: "downloading_asset",
14341
- message: `Desktop asset cache hit for ${selectedAsset.name}.`,
14678
+ phase: "ready_to_install",
14679
+ message: "Desktop update is downloaded and verified.",
14342
14680
  percent: 100
14343
14681
  });
14682
+ await waitForDesktopApplySignal();
14683
+ writeDesktopProgress({
14684
+ phase: "preparing_restart",
14685
+ message: "Applying Desktop update..."
14686
+ });
14344
14687
  }
14688
+ await runStartPhase(
14689
+ "Replacing existing Rudder Desktop if needed...",
14690
+ "Existing Desktop install is ready for replacement.",
14691
+ () => prepareForDesktopReplace(installPaths, target, { waitForActiveRuns: opts.waitForActiveRuns === true }),
14692
+ desktopProgressJson ? opts.waitForActiveRuns === true ? "waiting_for_active_runs" : "preparing_restart" : null
14693
+ );
14694
+ await runStartPhase(
14695
+ "Installing portable Desktop app...",
14696
+ `Installed Rudder Desktop to ${pc15.cyan(installPaths.appPath)}.`,
14697
+ () => installPortableDesktop(cachedAsset.path, installPaths, target),
14698
+ desktopProgressJson ? "preparing_restart" : null
14699
+ );
14700
+ await runStartPhase(
14701
+ "Preparing Desktop launchers...",
14702
+ "Desktop launchers ready.",
14703
+ async () => {
14704
+ await removeMacQuarantine(installPaths, target);
14705
+ await createPlatformLaunchers(installPaths, target);
14706
+ },
14707
+ desktopProgressJson ? "preparing_restart" : null
14708
+ );
14709
+ await writeInstallMetadata(installPaths, releaseTag, selectedAsset.name, checksum, selectedAssetKind);
14345
14710
  }
14346
- const checksum = await runStartPhase(
14347
- "Verifying Desktop checksum...",
14348
- `Verified ${pc15.cyan(path21.basename(cachedAsset.path))}.`,
14349
- () => assertChecksumMatch(cachedAsset.path, expectedChecksum),
14350
- desktopProgressJson ? "verifying_checksum" : null
14351
- );
14352
- if (desktopProgressJson && opts.desktopWaitForApply === true) {
14353
- writeDesktopProgress({
14354
- phase: "ready_to_install",
14355
- message: "Desktop update is downloaded and verified.",
14356
- percent: 100
14357
- });
14358
- await waitForDesktopApplySignal();
14359
- writeDesktopProgress({
14360
- phase: "preparing_restart",
14361
- message: "Applying Desktop update..."
14362
- });
14363
- }
14364
- await runStartPhase(
14365
- "Replacing existing Rudder Desktop if needed...",
14366
- "Existing Desktop install is ready for replacement.",
14367
- () => prepareForDesktopReplace(installPaths, target, { waitForActiveRuns: opts.waitForActiveRuns === true }),
14368
- desktopProgressJson ? opts.waitForActiveRuns === true ? "waiting_for_active_runs" : "preparing_restart" : null
14369
- );
14370
- await runStartPhase(
14371
- "Installing portable Desktop app...",
14372
- `Installed Rudder Desktop to ${pc15.cyan(installPaths.appPath)}.`,
14373
- () => installPortableDesktop(cachedAsset.path, installPaths, target),
14374
- desktopProgressJson ? "preparing_restart" : null
14375
- );
14376
- await runStartPhase(
14377
- "Preparing Desktop launchers...",
14378
- "Desktop launchers ready.",
14379
- async () => {
14380
- await removeMacQuarantine(installPaths, target);
14381
- await createPlatformLaunchers(installPaths, target);
14382
- },
14383
- desktopProgressJson ? "preparing_restart" : null
14384
- );
14385
- await writeInstallMetadata(installPaths, releaseTag, selectedAsset.name, checksum, selectedAssetKind);
14386
- }
14387
- const desktopAssetPrune = await maybePruneDesktopAssetCache({
14388
- protectedChecksums: [expectedChecksum]
14389
- });
14390
- if (desktopAssetPrune) {
14391
- if (desktopAssetPrune.deleted.length > 0) {
14392
- p15.log.success(
14393
- `Pruned ${desktopAssetPrune.deleted.length} old Desktop asset cache(s), freed ${formatBytes(desktopAssetPrune.freedBytes)}.`
14711
+ const desktopAssetPrune = await maybePruneDesktopAssetCache({
14712
+ protectedChecksums: [expectedChecksum]
14713
+ });
14714
+ if (desktopAssetPrune) {
14715
+ if (desktopAssetPrune.deleted.length > 0) {
14716
+ p15.log.success(
14717
+ `Pruned ${desktopAssetPrune.deleted.length} old Desktop asset cache(s), freed ${formatBytes(desktopAssetPrune.freedBytes)}.`
14718
+ );
14719
+ }
14720
+ for (const warning of desktopAssetPrune.warnings) p15.log.warn(warning);
14721
+ }
14722
+ if (opts.open !== false) {
14723
+ await runStartPhase(
14724
+ "Launching Rudder Desktop...",
14725
+ "Rudder Desktop launched.",
14726
+ () => launchDesktop(installPaths, target),
14727
+ desktopProgressJson ? "closing" : null
14394
14728
  );
14395
14729
  }
14396
- for (const warning of desktopAssetPrune.warnings) p15.log.warn(warning);
14397
- }
14398
- if (opts.open !== false) {
14399
- await runStartPhase(
14400
- "Launching Rudder Desktop...",
14401
- "Rudder Desktop launched.",
14402
- () => launchDesktop(installPaths, target),
14403
- desktopProgressJson ? "closing" : null
14404
- );
14405
- }
14730
+ });
14406
14731
  }
14407
14732
  p15.outro(pc15.green("Rudder start complete."));
14408
14733
  }
@@ -14502,6 +14827,7 @@ function createProgram() {
14502
14827
  registerAgentCommands(program);
14503
14828
  registerApprovalCommands(program);
14504
14829
  registerActivityCommands(program);
14830
+ registerUserCommands(program);
14505
14831
  registerDashboardCommands(program);
14506
14832
  registerSkillCommands(program);
14507
14833
  registerLibraryCommands(program);