primcli 3.0.0-preview.20 → 3.0.0-preview.22

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.
@@ -0,0 +1,362 @@
1
+ // src/oclif/cli-command-names.ts
2
+ /** Direct generated/task pairs share one canonical command. */
3
+ const COMMAND_PAIR_RENAMES = {
4
+ "contacts:delete-contact": "contacts:delete",
5
+ "contacts:get-contact": "contacts:get",
6
+ "contacts:list-contacts": "contacts:list",
7
+ "credentials:get-key": "keys:get",
8
+ "credentials:list-keys": "keys:list",
9
+ "credits:get-credit-balance": "credits:balance",
10
+ "functions:redeploy-function": "functions:redeploy",
11
+ "functions:set-function-route": "functions:set-route",
12
+ "functions:set-function-secret": "functions:set-secret",
13
+ "functions:unset-function-route": "functions:unset-route",
14
+ "mailbox-access:list-groups": "roles:groups",
15
+ "mailbox-access:list-mailbox-access": "roles:mailbox-access",
16
+ "memories:delete-memory": "memories:delete",
17
+ "memories:get-memory": "memories:get",
18
+ "memories:search-memories": "memories:search",
19
+ "memories:set-memory": "memories:set",
20
+ "projects:list-organization-people": "members:list",
21
+ "roles-and-members:get-access-mode": "roles:access-mode",
22
+ "roles-and-members:list-roles": "roles:list",
23
+ "roles:members": "members:list",
24
+ "routes:create-route": "routes:create",
25
+ "routes:delete-route": "routes:delete",
26
+ "routes:list-routes": "routes:list",
27
+ "routes:reorder-routes": "routes:reorder",
28
+ "routes:update-route": "routes:update",
29
+ "threads:mute-thread": "threads:mute",
30
+ "threads:unmute-thread": "threads:unmute",
31
+ "wake:create-wake-authorization": "wake:authorizations:create",
32
+ "wake:create-wake-schedule": "wake:schedules:create",
33
+ "wake:delete-wake-authorization": "wake:authorizations:delete",
34
+ "wake:delete-wake-schedule": "wake:schedules:delete",
35
+ "wake:get-wake-schedule": "wake:schedules:get",
36
+ "wake:list-wake-authorizations": "wake:authorizations:list",
37
+ "wake:list-wake-dispatches": "wake:dispatches:list",
38
+ "wake:list-wake-schedules": "wake:schedules:list",
39
+ "wake:run-wake-schedule": "wake:schedules:run",
40
+ "wake:update-wake-authorization": "wake:authorizations:update",
41
+ "wake:update-wake-schedule": "wake:schedules:update"
42
+ };
43
+ /** Canonical executable names. API operation identifiers stay unchanged. */
44
+ const COMMAND_RENAMES = {
45
+ ...COMMAND_PAIR_RENAMES,
46
+ "account:get-account": "account:get",
47
+ "account:get-storage-stats": "account:storage",
48
+ "account:get-webhook-secret": "account:webhook-secret",
49
+ "account:leave-organization": "roles-and-members:leave",
50
+ "account:show": "account:get",
51
+ "account:update-account": "account:update",
52
+ "activity:list-activity-objects": "activity:list",
53
+ "address-notes:delete-address-note": "address-notes:delete",
54
+ "address-notes:get-address-note": "address-notes:get",
55
+ "address-notes:get-public-address-note": "address-notes:get-public",
56
+ "address-notes:list-address-notes": "address-notes:list",
57
+ "address-notes:list-address-notes-batch": "address-notes:list-batch",
58
+ "address-notes:list-public-address-notes": "address-notes:list-public",
59
+ "address-notes:put-address-note": "address-notes:set",
60
+ "agent-connections:agent-connection-setup": "agent-connections:setup",
61
+ "agent-connections:agent-connection-trusted-origins": "agent-connections:trusted-origins",
62
+ "agent-connections:claim-agent-connection": "agent:connect",
63
+ "agent-connections:create-agent-connection": "agent-connections:create",
64
+ "agent-connections:get-agent-connection-settings": "agent-connections:get-settings",
65
+ "agent-connections:get-own-agent-connection": "agent-connections:get-own",
66
+ "agent-connections:invite-agent-connection": "agent-connections:invite",
67
+ "agent-connections:list-agent-connections": "agent-connections:list",
68
+ "agent-connections:remove-agent-connection": "agent-connections:delete",
69
+ "agent-connections:rename-agent-connection": "agent-connections:rename",
70
+ "agent-connections:revoke-agent-connection": "agent-connections:revoke",
71
+ "agent-connections:set-agent-connection-visibility": "agent-connections:set-visibility",
72
+ "agent-connections:update-agent-connection-settings": "agent-connections:update-settings",
73
+ "agent-networks:add-default-network-member": "agent-networks:add-member",
74
+ "agent-networks:check-default-network-contact-admission": "agent-networks:check-contact-admission",
75
+ "agent-networks:get-default-network-agent": "agent-networks:get-agent",
76
+ "agent-networks:list-agent-networks": "agent-networks:list",
77
+ "agent-networks:list-default-network-agents": "agent-networks:list-agents",
78
+ "agent-networks:list-default-network-members": "agent-networks:list-members",
79
+ "agent-networks:remove-default-network-member": "agent-networks:delete-member",
80
+ "agent-networks:update-default-network-member": "agent-networks:update-member",
81
+ "agent-work:agent-work-agree-deadline": "agent-work:agree-deadline",
82
+ "agent-work:agent-work-create": "agent-work:create",
83
+ "agent-work:agent-work-get": "agent-work:get",
84
+ "agent-work:agent-work-list": "agent-work:list",
85
+ "agent-work:agent-work-manage-state": "agent-work:manage-state",
86
+ "agent-work:agent-work-propose-deadline": "agent-work:propose-deadline",
87
+ "agent-work:agent-work-report-status": "agent-work:report-status",
88
+ "agent-work:agent-work-withdraw-deadline": "agent-work:withdraw-deadline",
89
+ "agent:contacts:add": "agent:contacts:create",
90
+ "agent:contacts:remove": "agent:contacts:delete",
91
+ "agent:create-agent-account": "agent:create",
92
+ "agent:create-agent-claim-link": "agent:claim-link",
93
+ "agent:resend-agent-signup-verification": "agent:resend-signup",
94
+ "agent:start-agent-claim": "agent:claim",
95
+ "agent:start-agent-signup": "agent:start-signup",
96
+ "agent:verify-agent-claim": "agent:claim-verify",
97
+ "agent:verify-agent-signup": "agent:verify-signup",
98
+ "changes:list-changes": "changes:list",
99
+ "cli:cli-logout": "cli:logout",
100
+ "cli:list-cli-orgs": "org:list",
101
+ "cli:poll-cli-login": "cli:poll-login",
102
+ "cli:resend-cli-signup-verification": "cli:resend-signup",
103
+ "cli:start-cli-login": "cli:start-login",
104
+ "cli:start-cli-signup": "cli:start-signup",
105
+ "cli:verify-cli-signup": "cli:verify-signup",
106
+ "contacts:add": "contacts:create",
107
+ "contacts:delete-agent-contact": "contacts:delete-for-agent",
108
+ "contacts:get-agent-contact-policy": "contacts:get-agent-policy",
109
+ "contacts:get-contact-policy": "contacts:get-policy",
110
+ "contacts:list-agent-contacts": "contacts:list-for-agent",
111
+ "contacts:prepare-contact-acceptance": "contacts:prepare-acceptance",
112
+ "contacts:prepare-contact-request": "contacts:prepare-request",
113
+ "contacts:put-agent-contact": "contacts:set-for-agent",
114
+ "contacts:put-agent-contact-policy": "contacts:set-agent-policy",
115
+ "contacts:put-contact": "contacts:set",
116
+ "contacts:put-contact-policy": "contacts:set-policy",
117
+ "contacts:remove": "contacts:delete",
118
+ "credentials:get-credential-policy": "credentials:get-policy",
119
+ "credentials:get-key-builder": "credentials:key-builder",
120
+ "credentials:get-key-suggestion": "credentials:key-suggestion",
121
+ "credentials:list-credential-events": "credentials:list-events",
122
+ "credentials:list-credentials": "credentials:list",
123
+ "credentials:revoke-all-credentials": "credentials:revoke-all",
124
+ "credentials:update-credential-policy": "credentials:update-policy",
125
+ "credits:redeem-credit-code": "credits:redeem",
126
+ "domains:add": "domains:create",
127
+ "domains:add-domain": "domains:create",
128
+ "domains:check-domain-dns": "domains:check-dns",
129
+ "domains:check-vanity-inbox-name": "domains:check-vanity-name",
130
+ "domains:claim-vanity-inbox-name": "domains:claim-vanity-name",
131
+ "domains:delete-domain": "domains:delete",
132
+ "domains:download-domain-zone-file": "domains:zone-file",
133
+ "domains:get-domain-agent-authorization": "domains:get-agent-authorization",
134
+ "domains:list-domains": "domains:list",
135
+ "domains:update-domain": "domains:update",
136
+ "domains:verify-domain": "domains:verify",
137
+ "email-rule-oversight:accept-email-rule-objection": "email-rule-oversight:accept-objection",
138
+ "email-rule-oversight:amend-email-rule-objection": "email-rule-oversight:amend-objection",
139
+ "email-rule-oversight:create-email-rule-objection": "email-rule-oversight:create-objection",
140
+ "email-rule-oversight:decline-email-rule-objection": "email-rule-oversight:decline-objection",
141
+ "email-rule-oversight:get-email-rule-covering-me": "email-rule-oversight:get-covering-me",
142
+ "email-rule-oversight:get-email-rule-objection": "email-rule-oversight:get-objection",
143
+ "email-rule-oversight:list-email-rule-decisions-on-my-mail": "email-rule-oversight:list-decisions-on-my-mail",
144
+ "email-rule-oversight:list-email-rule-objections": "email-rule-oversight:list-objections",
145
+ "email-rule-oversight:list-email-rule-versions-covering-me": "email-rule-oversight:list-versions-covering-me",
146
+ "email-rule-oversight:list-email-rules-covering-me": "email-rule-oversight:list-covering-me",
147
+ "email-rule-oversight:withdraw-email-rule-objection": "email-rule-oversight:withdraw-objection",
148
+ "email-rules:accept-email-rule-request": "email-rules:accept-request",
149
+ "email-rules:check-email-rule-request-target": "email-rules:check-request-target",
150
+ "email-rules:compile-email-rule": "email-rules:compile",
151
+ "email-rules:create-email-rule": "email-rules:create",
152
+ "email-rules:create-email-rule-request": "email-rules:create-request",
153
+ "email-rules:decline-email-rule-request": "email-rules:decline-request",
154
+ "email-rules:delete-email-rule": "email-rules:delete",
155
+ "email-rules:delete-email-rule-request": "email-rules:delete-request",
156
+ "email-rules:end-email-rule-share": "email-rules:end-share",
157
+ "email-rules:get-email-rule": "email-rules:get",
158
+ "email-rules:get-email-rule-request": "email-rules:get-request",
159
+ "email-rules:get-email-rule-scope": "email-rules:get-scope",
160
+ "email-rules:get-email-rule-share": "email-rules:get-share",
161
+ "email-rules:get-email-rule-vocabulary": "email-rules:vocabulary",
162
+ "email-rules:list-email-rule-decisions": "email-rules:list-decisions",
163
+ "email-rules:list-email-rule-requests": "email-rules:list-requests",
164
+ "email-rules:list-email-rule-results": "email-rules:list-results",
165
+ "email-rules:list-email-rule-scope-options": "email-rules:list-scope-options",
166
+ "email-rules:list-email-rule-share-emails": "email-rules:list-share-emails",
167
+ "email-rules:list-email-rule-shares": "email-rules:list-shares",
168
+ "email-rules:list-email-rule-versions": "email-rules:list-versions",
169
+ "email-rules:list-email-rules": "email-rules:list",
170
+ "email-rules:list-given-email-rule-shares": "email-rules:list-given-shares",
171
+ "email-rules:test-email-rule": "email-rules:test",
172
+ "email-rules:test-email-rule-on-sample": "email-rules:test-sample",
173
+ "email-rules:update-email-rule": "email-rules:update",
174
+ "email-rules:withdraw-email-rule-request": "email-rules:withdraw-request",
175
+ "emails:delete-email": "emails:delete",
176
+ "emails:discard-email-content": "emails:discard-content",
177
+ "emails:download-email-attachment-archive-member": "emails:download-attachment-archive-member",
178
+ "emails:download-email-attachment-by-filename": "emails:download-attachment-by-filename",
179
+ "emails:download-email-attachment-part": "emails:download-attachment-part",
180
+ "emails:download-raw-email": "emails:download-raw",
181
+ "emails:get-conversation": "emails:conversation",
182
+ "emails:get-email": "emails:get",
183
+ "emails:get-email-readable": "emails:get-readable",
184
+ "emails:list-email-attachment-archive-members": "emails:list-attachment-archive-members",
185
+ "emails:list-emails": "emails:list",
186
+ "emails:replay-email-webhooks": "emails:replay-webhooks",
187
+ "emails:search-emails": "emails:search",
188
+ "endpoints:complete-webhook-event": "endpoints:complete-event",
189
+ "endpoints:create-endpoint": "endpoints:create",
190
+ "endpoints:delete-endpoint": "endpoints:delete",
191
+ "endpoints:get-endpoint": "endpoints:get",
192
+ "endpoints:get-endpoint-signing-secret": "endpoints:signing-secret",
193
+ "endpoints:list-endpoints": "endpoints:list",
194
+ "endpoints:pull-webhook-event": "endpoints:pull-event",
195
+ "endpoints:rotate-endpoint-signing-secret": "endpoints:rotate-signing-secret",
196
+ "endpoints:test-endpoint": "endpoints:test",
197
+ "endpoints:test-endpoint-rules": "endpoints:test-rules",
198
+ "endpoints:update-endpoint": "endpoints:update",
199
+ "filters:create-filter": "filters:create",
200
+ "filters:delete-filter": "filters:delete",
201
+ "filters:list-filters": "filters:list",
202
+ "filters:update-filter": "filters:update",
203
+ "functions:create-function": "functions:create",
204
+ "functions:create-function-secret": "functions:create-secret",
205
+ "functions:delete-function": "functions:delete",
206
+ "functions:delete-function-secret": "functions:delete-secret",
207
+ "functions:get-function": "functions:get",
208
+ "functions:get-function-deployment": "functions:get-deployment",
209
+ "functions:get-function-invocation": "functions:get-invocation",
210
+ "functions:get-function-routing": "functions:get-routing",
211
+ "functions:get-function-runtime-key": "functions:get-runtime-key",
212
+ "functions:get-function-source": "functions:get-source",
213
+ "functions:get-function-test-run-trace": "functions:get-test-trace",
214
+ "functions:get-function-usage": "functions:get-usage",
215
+ "functions:get-function-users": "functions:get-users",
216
+ "functions:get-org-function-fallback": "functions:get-org-fallback",
217
+ "functions:get-org-function-invocation-series": "functions:get-org-invocation-series",
218
+ "functions:get-org-function-usage": "functions:get-org-usage",
219
+ "functions:get-org-routing-topology": "functions:get-org-routing",
220
+ "functions:list-function-activity": "functions:list-activity",
221
+ "functions:list-function-deployments": "functions:list-deployments",
222
+ "functions:list-function-invocations": "functions:list-invocations",
223
+ "functions:list-function-logs": "functions:list-logs",
224
+ "functions:list-function-runtime-key-presets": "functions:list-runtime-key-presets",
225
+ "functions:list-function-secrets": "functions:list-secrets",
226
+ "functions:list-functions": "functions:list",
227
+ "functions:lookup-function": "functions:lookup",
228
+ "functions:reaffirm-function-runtime-key": "functions:reaffirm-runtime-key",
229
+ "functions:request-function-runtime-key-runner": "functions:request-runtime-key-runner",
230
+ "functions:route-get": "functions:get-route",
231
+ "functions:route-set": "functions:set-route",
232
+ "functions:route-unset": "functions:unset-route",
233
+ "functions:set-function-runtime-key": "functions:set-runtime-key",
234
+ "functions:suspend-function-runtime-key": "functions:suspend-runtime-key",
235
+ "functions:test-function": "functions:test",
236
+ "functions:update-function": "functions:update",
237
+ "functions:update-function-tags": "functions:update-tags",
238
+ "inbox:get-inbox-status": "inbox:status",
239
+ "interactions:get-interaction": "interactions:get",
240
+ "interactions:list-interactions": "interactions:list",
241
+ "interactions:send-interaction-step": "interactions:send-step",
242
+ "interactions:start-interaction": "interactions:start",
243
+ "org:secrets:remove": "org:secrets:delete",
244
+ "organization-settings:get-organization": "organization-settings:get",
245
+ "organization-settings:list-oauth-grants": "organization-settings:list-grants",
246
+ "organization-settings:remove-organization-logo": "organization-settings:delete-logo",
247
+ "organization-settings:revoke-oauth-grant": "organization-settings:revoke-grant",
248
+ "organization-settings:update-organization": "organization-settings:update",
249
+ "organization-settings:update-organization-logo": "organization-settings:update-logo",
250
+ "organizations:invite-organization-member": "organizations:invite-member",
251
+ "organizations:list-organization-invitations": "organizations:list-invitations",
252
+ "organizations:revoke-organization-invitation": "organizations:revoke-invitation",
253
+ orgs: "org:list",
254
+ "projects:create-project": "projects:create",
255
+ "projects:delete-project": "projects:delete",
256
+ "projects:get-project": "projects:get",
257
+ "projects:invite-project-member": "projects:invite-member",
258
+ "projects:list-project-invitations": "projects:list-invitations",
259
+ "projects:list-projects": "projects:list",
260
+ "projects:revoke-project-invitation": "projects:revoke-invitation",
261
+ "projects:update-project": "projects:update",
262
+ "repeating-sends:delete-repeating-send": "repeating-sends:delete",
263
+ "repeating-sends:get-repeating-send": "repeating-sends:get",
264
+ "repeating-sends:list-repeating-sends": "repeating-sends:list",
265
+ "repeating-sends:stop-repeat-from-email": "repeating-sends:stop-from-email",
266
+ "repeating-sends:update-repeating-send": "repeating-sends:update",
267
+ "roles-and-members:leave-organization": "roles-and-members:leave",
268
+ "routes:add": "routes:create",
269
+ "routes:remove": "routes:delete",
270
+ "routes:simulate-route": "routes:simulate",
271
+ "search:semantic-search": "semantic-search",
272
+ "sending:cancel-sent-email": "sending:cancel",
273
+ "sending:cancel-sent-email-by-idempotency-key": "sending:cancel-by-key",
274
+ "sending:delete-sent-email": "sent:delete",
275
+ "sending:download-sent-attachment-archive-member": "sending:download-attachment-archive-member",
276
+ "sending:download-sent-attachment-by-filename": "sending:download-attachment-by-filename",
277
+ "sending:download-sent-attachment-part": "sending:download-attachment-part",
278
+ "sending:download-sent-attachments": "sending:download-attachments",
279
+ "sending:get-send-permissions": "sending:permissions",
280
+ "sending:get-sent-email": "sending:get",
281
+ "sending:list-sent-attachment-archive-members": "sending:list-attachment-archive-members",
282
+ "sending:list-sent-emails": "sending:list",
283
+ "sending:release-sent-email": "sending:release",
284
+ "sending:reply-to-email": "sending:reply",
285
+ "sending:reschedule-sent-email": "sending:reschedule",
286
+ "sending:send-email": "sending:send",
287
+ "sending:send-mail-batch": "sending:send-batch",
288
+ "sending:signal-email": "sending:signal",
289
+ "stats:get-inbound-hourly-stats": "stats:inbound-hourly",
290
+ "stats:get-sent-hourly-stats": "stats:sent-hourly",
291
+ "stats:get-webhook-delivery-stats": "stats:webhook-deliveries",
292
+ "templates:get-template": "templates:get",
293
+ "templates:get-template-install": "templates:get-install",
294
+ "templates:install-template": "templates:install",
295
+ "templates:list-templates": "templates:list",
296
+ "threads:get-thread": "threads:get",
297
+ "threads:list-muted-threads": "threads:list-muted",
298
+ "threads:list-thread-read-states": "threads:list-read-states",
299
+ "threads:mark-thread-read": "threads:mark-read",
300
+ "webhook-deliveries:get-delivery": "webhook-deliveries:get",
301
+ "webhook-deliveries:list-deliveries": "webhook-deliveries:list",
302
+ "webhook-deliveries:replay-delivery": "webhook-deliveries:replay"
303
+ };
304
+ function canonicalCommandId(id) {
305
+ return Object.hasOwn(COMMAND_RENAMES, id) ? COMMAND_RENAMES[id] ?? id : id;
306
+ }
307
+ /** Join presentation fields, including operations offered at the root. */
308
+ function operationCommandId(operation) {
309
+ return [operation.tagCommand, operation.command].filter(Boolean).join(":");
310
+ }
311
+ function canonicalOperation(operation) {
312
+ const id = canonicalCommandId(operationCommandId(operation));
313
+ const at = id.lastIndexOf(":");
314
+ return {
315
+ ...operation,
316
+ ...typeof operation.description === "string" ? { description: canonicalCliText(operation.description) } : {},
317
+ tagCommand: at < 0 ? "" : id.slice(0, at),
318
+ command: id.slice(at + 1)
319
+ };
320
+ }
321
+ const SCOPE_OPERATIONS = /* @__PURE__ */ new Set([
322
+ "compileEmailRule",
323
+ "createEmailRule",
324
+ "updateEmailRule",
325
+ "testEmailRule",
326
+ "testEmailRuleOnSample",
327
+ "generateLookAlikes"
328
+ ]);
329
+ /** CLI flags project to the original request-body field, never a renamed wire key. */
330
+ function canonicalBodyFlagName(sdkName, property) {
331
+ return property === "evaluation_scope" && SCOPE_OPERATIONS.has(sdkName) ? "scope" : property.replace(/_/g, "-");
332
+ }
333
+ /** Rekey registrations without keeping retired names as executable aliases. */
334
+ function canonicalCommands(commands) {
335
+ const result = {};
336
+ for (const [oldId, command] of Object.entries(commands)) {
337
+ const id = canonicalCommandId(oldId);
338
+ if (Object.hasOwn(result, id) && result[id] !== command) throw new Error(`Different command implementations collide at ${id}`);
339
+ result[id] = command;
340
+ }
341
+ return result;
342
+ }
343
+ const commandTextPattern = new RegExp(`\\b(primitive(?:@[a-zA-Z0-9.+-]+)?|prim)[ \t]+(${Object.keys(COMMAND_RENAMES).sort((a, b) => b.length - a.length).map((id) => id.split(":").join("(?:[ ]+|:)")).join("|")})(?![a-zA-Z0-9_:-])`, "g");
344
+ function canonicalCliText(text) {
345
+ return text.replace(commandTextPattern, (_match, bin, name) => `${bin} ${canonicalCommandId(name.replace(/[ \t]+/g, ":")).replaceAll(":", " ")}`).replaceAll("--evaluation-scope", "--scope").replaceAll("--add-expectation-samples-file", "--add-samples-file").replaceAll("--expectation-samples-file", "--samples-file");
346
+ }
347
+ /** Detect retired paths before a positional parent can consume one as a value. */
348
+ function retiredCommandTarget(argv) {
349
+ let id = "";
350
+ let match;
351
+ for (const word of argv) {
352
+ if (word.startsWith("-")) break;
353
+ id = id ? `${id}:${word}` : word;
354
+ const replacement = Object.hasOwn(COMMAND_RENAMES, id) ? COMMAND_RENAMES[id] : void 0;
355
+ if (replacement) match = {
356
+ oldId: id,
357
+ newId: replacement
358
+ };
359
+ }
360
+ return match;
361
+ }
362
+ export { canonicalCommandId as a, operationCommandId as c, canonicalCliText as i, retiredCommandTarget as l, COMMAND_RENAMES as n, canonicalCommands as o, canonicalBodyFlagName as r, canonicalOperation as s, COMMAND_PAIR_RENAMES as t };
@@ -343,4 +343,4 @@ function guardJsonOutputCommands(commands) {
343
343
  if (flags && "json" in flags || enableJsonFlag === true) guardJsonOutput(command);
344
344
  }
345
345
  }
346
- export { thrownErrorBody as a, runStreamingJson as i, guardJsonOutputCommands as n, jsonOutputRequested as r, JSON_OUTPUT_FLAG as t };
346
+ export { runStreamingJson as a, jsonOutputRequested as i, captureOutput as n, thrownErrorBody as o, guardJsonOutputCommands as r, JSON_OUTPUT_FLAG as t };
@@ -1,12 +1,12 @@
1
1
  import { B as parseOwnerMemberAddress, F as agentProfilesDirectory, I as connectedAgentIdentity, L as connectedApiBaseUrl, M as AgentConnectionSetupError, N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, U as saveConnectedAgentProfile, V as profileAlreadyConnectedMessage, W as PrimitiveApiClient, b as loadCliCredentials, j as AGENT_PROFILE_ENV, z as parseConnectedAgentProfile } from "./cli-config-Ms_0vNjq.js";
2
- import { An as putAgentContact, Ft as getContact, Gn as sendEmail, Hn as searchEmails, Mn as putContact, Pt as getAgentContactPolicy, St as deleteContact, an as listAgentContacts, fr as __exportAll, in as listAgentConnections, jn as putAgentContactPolicy, sn as listContacts, tn as inviteAgentConnection, un as listDomains, wn as listSentEmails, xt as deleteAgentContact, zt as getEmail } from "./repeats-Dj_o6c-X-CliyH3ge.js";
3
- import { Mt as cliInvocation, Pt as defaultConnectionName, Tn as refuseOrgSelectionForProfile, wn as refreshStoredCliCredentials, zt as detectAgentRuntime } from "./api-command-DXiAX_N2.js";
2
+ import { An as putAgentContact, Ft as getContact, Gn as sendEmail, Hn as searchEmails, Mn as putContact, Pt as getAgentContactPolicy, St as deleteContact, an as listAgentContacts, fr as __exportAll, in as listAgentConnections, jn as putAgentContactPolicy, sn as listContacts, tn as inviteAgentConnection, un as listDomains, wn as listSentEmails, xt as deleteAgentContact, zt as getEmail } from "./repeats-Dj_o6c-X-x61TNLz-.js";
3
+ import { Cn as refreshStoredCliCredentials, It as detectAgentRuntime, jt as defaultConnectionName, kt as cliInvocation, wn as refuseOrgSelectionForProfile } from "./api-command-Dm1BKxOr.js";
4
4
  import { _ as acquireListenLock, b as listenLockHeld, c as mailTime, d as readMailJson, f as removeMailFile, g as ListenStateError, h as writeMailJson, i as mailId, l as privateMailDirectory, o as mailObject, p as syncMailDirectory, r as mailAddress, s as mailString } from "./shared-mail-files-BAQSGxxz.js";
5
- import { C as readBundledConnectSkill, a as NotificationRetryError, b as installSkill, d as SESSION_UUID, f as connectNativeSession, m as NativeSessionDisconnectedError, p as defaultSessionSocket, t as notificationScope } from "./notify-session-C8USviF_.js";
5
+ import { C as readBundledConnectSkill, a as NotificationRetryError, b as installSkill, d as SESSION_UUID, f as connectNativeSession, m as NativeSessionDisconnectedError, p as defaultSessionSocket, t as notificationScope } from "./notify-session-DHQbjXOq.js";
6
6
  import { a as backgroundListenStatus, d as stopBackgroundListen } from "./listen-background-DyBYca28.js";
7
- import { t as readSharedMailOwner } from "./shared-mail-watch-BAPMsFNv.js";
7
+ import { t as readSharedMailOwner } from "./shared-mail-watch-DdtgJOrV.js";
8
8
  import { withoutOrgSelection } from "./oclif/global-org-flag.js";
9
- import { o as scopedChatSenderTrust } from "./scoped-chat-CUy0Ta_y.js";
9
+ import { o as scopedChatSenderTrust } from "./scoped-chat-Bss3OjFI.js";
10
10
  import { accessSync, chmodSync, closeSync, constants, copyFileSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
11
11
  import { createHash, randomUUID } from "node:crypto";
12
12
  import { basename, delimiter, dirname, isAbsolute, join, resolve } from "node:path";
@@ -2510,7 +2510,7 @@ async function membershipVersion(client, agent, address, signal) {
2510
2510
  if (found.agent_address !== agent) throw new Error("The contacts API returned a different agent.");
2511
2511
  return version(found.version);
2512
2512
  }
2513
- if (next === null) throw new Error("Agent contact not found. Use agent contacts add to create it.");
2513
+ if (next === null) throw new Error("Agent contact not found. Use agent contacts create to create it.");
2514
2514
  if (seen.has(next)) throw new Error("Contact pagination repeated a cursor; no write was attempted.");
2515
2515
  seen.add(next);
2516
2516
  cursor = next;
@@ -1,5 +1,5 @@
1
- import { _ as isTrustedSender, c as classifySignalContent, g as isEmailReceivedEvent, kt as downloadEmailAttachmentPart, v as parseWebhookEvent } from "./repeats-Dj_o6c-X-CliyH3ge.js";
2
- import { H as wakeReadCommand, V as skillFirstLine, rt as wakeInteractionSentence } from "./api-command-DXiAX_N2.js";
1
+ import { _ as isTrustedSender, c as classifySignalContent, g as isEmailReceivedEvent, kt as downloadEmailAttachmentPart, v as parseWebhookEvent } from "./repeats-Dj_o6c-X-x61TNLz-.js";
2
+ import { R as skillFirstLine, et as wakeInteractionSentence, z as wakeReadCommand } from "./api-command-Dm1BKxOr.js";
3
3
  import { _ as acquireListenLock, g as ListenStateError, y as listenIdentity } from "./shared-mail-files-BAQSGxxz.js";
4
4
  import { closeSync, copyFileSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, opendirSync, readFileSync, readdirSync, readlinkSync, renameSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
5
5
  import { createHash, randomUUID, scryptSync } from "node:crypto";
@@ -1,8 +1,8 @@
1
- import { Qt as getSentEmail } from "../repeats-Dj_o6c-X-CliyH3ge.js";
2
- import { L as readThreadContext, Sn as createAuthenticatedCliApiClient } from "../api-command-DXiAX_N2.js";
1
+ import { Qt as getSentEmail } from "../repeats-Dj_o6c-X-x61TNLz-.js";
2
+ import { P as readThreadContext, xn as createAuthenticatedCliApiClient } from "../api-command-Dm1BKxOr.js";
3
3
  import { AUTO_SIGNAL_KIND_ENV, AUTO_WORKING_RENEW_MS, autoSignalsDisabled, clearWorkingSending, markWorkingSending, readAutoClaim, readWorkingLease, recordRenewer, stopWorkingLease, writeWorkingLease } from "./auto-signals.js";
4
4
  import { _ as acquireListenLock } from "../shared-mail-files-BAQSGxxz.js";
5
- import { t as sendSignal } from "../signal-command-DHwFky03.js";
5
+ import { t as sendSignal } from "../signal-command-vIo4maG0.js";
6
6
  import { join } from "node:path";
7
7
  import { homedir } from "node:os";
8
8
  // src/oclif/auto-signal-worker.ts
@@ -1,4 +1,4 @@
1
- import { n as isPlainChatReply, o as scopedChatSenderTrust } from "../scoped-chat-CUy0Ta_y.js";
1
+ import { n as isPlainChatReply, o as scopedChatSenderTrust } from "../scoped-chat-Bss3OjFI.js";
2
2
  import { d as readMailJson, h as writeMailJson, i as mailId, l as privateMailDirectory, r as mailAddress } from "../shared-mail-files-BAQSGxxz.js";
3
3
  import { existsSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
4
4
  import { randomUUID } from "node:crypto";
@@ -1,11 +1,12 @@
1
- import { r as jsonOutputRequested } from "../json-output-xgN0ZLWP.js";
1
+ import { n as COMMAND_RENAMES } from "../cli-command-names-DteMqL-H.js";
2
+ import { i as jsonOutputRequested } from "../json-output-BMZrLH47.js";
2
3
  // src/oclif/command-not-found.ts
3
4
  /** At most this many commands are suggested for one word. */
4
5
  const MOST_SUGGESTED = 3;
5
6
  /**
6
7
  * The commands in another group named by the word typed where a subcommand
7
- * was expected, said as a question (`email-rules list-email-rule-objections`
8
- * is `email-rule-oversight list-email-rule-objections`), or none when there are
8
+ * was expected, said as a question (`email-rules list-objections`
9
+ * is `email-rule-oversight list-objections`), or none when there are
9
10
  * none or too many to be a likely meaning. Only those words are looked up,
10
11
  * never a value typed after them, which can be any word at all.
11
12
  */
@@ -80,6 +81,9 @@ function visibleEntries(commands, topics) {
80
81
  function commandNotFoundMessage(id, lookup) {
81
82
  const parts = id.split(":");
82
83
  const typed = `primitive ${parts.join(" ")}`;
84
+ if (id === "focus:get" && lookup.visible?.includes("focus") && lookup.find("focus")) return unknown(typed, ["focus"], "Run \"primitive focus --help\" to see its options.", lookup);
85
+ const replacement = Object.hasOwn(COMMAND_RENAMES, id) ? COMMAND_RENAMES[id] : void 0;
86
+ if (replacement && lookup.visible?.includes(replacement)) return unknown(typed, [replacement], "Run \"primitive --help\" to see the commands.", lookup);
83
87
  for (let end = parts.length - 1; end > 0; end -= 1) {
84
88
  const known = parts.slice(0, end).join(":");
85
89
  const command = lookup.find(known);
@@ -0,0 +1,9 @@
1
+ // src/oclif/command-stdin.ts
2
+ /** Only a command's explicit body, secret or hook reader may consume stdin. */
3
+ function ignoreArgumentStdin(command) {
4
+ for (const argument of Object.values(command.args ?? {})) argument.ignoreStdin = true;
5
+ }
6
+ const prerun = async ({ Command: command }) => {
7
+ ignoreArgumentStdin(command);
8
+ };
9
+ export { prerun as default, ignoreArgumentStdin };