@phnx-labs/agents-cli 1.22.114 → 1.22.115
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/CHANGELOG.md +110 -0
- package/README.md +22 -102
- package/dist/browser.js +0 -0
- package/dist/cli/command-registry.js +0 -7
- package/dist/commands/accounts.d.ts +3 -77
- package/dist/commands/accounts.js +13 -366
- package/dist/commands/audit.js +1 -1
- package/dist/commands/auth.js +0 -2
- package/dist/commands/browser.d.ts +53 -0
- package/dist/commands/browser.js +199 -9
- package/dist/commands/doctor.d.ts +2 -3
- package/dist/commands/doctor.js +0 -11
- package/dist/commands/events.d.ts +1 -3
- package/dist/commands/events.js +4 -7
- package/dist/commands/exec.d.ts +0 -1
- package/dist/commands/exec.js +2 -7
- package/dist/commands/feed-watch.js +52 -8
- package/dist/commands/focus.js +1 -1
- package/dist/commands/go.d.ts +0 -17
- package/dist/commands/go.js +2 -19
- package/dist/commands/logs.js +1 -1
- package/dist/commands/mcp.js +8 -83
- package/dist/commands/memory.js +4 -47
- package/dist/commands/message.js +4 -4
- package/dist/commands/plugins.js +1 -93
- package/dist/commands/repo.js +0 -44
- package/dist/commands/resume.js +4 -1
- package/dist/commands/secrets-passthrough.js +2 -2
- package/dist/commands/send.d.ts +4 -4
- package/dist/commands/send.js +6 -51
- package/dist/commands/sessions-backup-setup.js +1 -1
- package/dist/commands/sessions-resume.js +0 -1
- package/dist/commands/sessions-share.d.ts +5 -7
- package/dist/commands/sessions-share.js +98 -49
- package/dist/commands/sessions.js +1 -8
- package/dist/commands/setup-browser.js +18 -2
- package/dist/commands/setup-computer.js +20 -6
- package/dist/commands/setup-secrets.js +24 -4
- package/dist/commands/setup-terminal.d.ts +3 -0
- package/dist/commands/setup-terminal.js +22 -0
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.js +20 -10
- package/dist/commands/skills.js +0 -8
- package/dist/commands/ssh.d.ts +6 -0
- package/dist/commands/ssh.js +92 -233
- package/dist/commands/sync.js +14 -5
- package/dist/commands/teams.js +1 -1
- package/dist/commands/traces.js +1 -1
- package/dist/lib/accounts/add.d.ts +0 -5
- package/dist/lib/accounts/add.js +1 -7
- package/dist/lib/artifacts-client.d.ts +20 -0
- package/dist/lib/artifacts-client.js +46 -0
- package/dist/lib/auth-mint.js +2 -2
- package/dist/lib/browser/runtime-state.d.ts +55 -0
- package/dist/lib/browser/runtime-state.js +99 -18
- package/dist/lib/browser/service.js +21 -1
- package/dist/lib/cli-resources.js +3 -1
- package/dist/lib/cloud/dispatch.js +1 -1
- package/dist/lib/cloudflare/creds.d.ts +10 -0
- package/dist/lib/cloudflare/creds.js +46 -0
- package/dist/lib/cloudflare/provision.d.ts +35 -0
- package/dist/lib/cloudflare/provision.js +144 -0
- package/dist/lib/computer/sessions-list.d.ts +55 -0
- package/dist/lib/computer/sessions-list.js +168 -1
- package/dist/lib/daemon/daemon.js +8 -1
- package/dist/lib/daemon/feed-stream-service.d.ts +23 -0
- package/dist/lib/daemon/feed-stream-service.js +40 -0
- package/dist/lib/daemon-services.d.ts +1 -1
- package/dist/lib/daemon-services.js +5 -0
- package/dist/lib/devices/connect.d.ts +49 -5
- package/dist/lib/devices/connect.js +169 -21
- package/dist/lib/feed/envelope.d.ts +79 -0
- package/dist/lib/feed/envelope.js +23 -0
- package/dist/lib/feed/events.d.ts +6 -0
- package/dist/lib/feed/events.js +8 -0
- package/dist/lib/feed/hub-server.d.ts +86 -0
- package/dist/lib/feed/hub-server.js +334 -0
- package/dist/lib/feed/hub.d.ts +95 -0
- package/dist/lib/feed/hub.js +255 -0
- package/dist/lib/feed/tool-activity.d.ts +108 -0
- package/dist/lib/feed/tool-activity.js +313 -0
- package/dist/lib/feed/tools.d.ts +198 -0
- package/dist/lib/feed/tools.js +265 -0
- package/dist/lib/feed/watch.d.ts +50 -50
- package/dist/lib/feed/watch.js +147 -16
- package/dist/lib/format.d.ts +1 -1
- package/dist/lib/format.js +1 -1
- package/dist/lib/git.d.ts +0 -16
- package/dist/lib/git.js +0 -58
- package/dist/lib/helper-versions.js +1 -1
- package/dist/lib/hosts/remote-cmd.d.ts +51 -1
- package/dist/lib/hosts/remote-cmd.js +125 -8
- package/dist/lib/hosts/remote-cmd.test-fixture.d.ts +2 -0
- package/dist/lib/hosts/remote-cmd.test-fixture.js +22 -0
- package/dist/lib/mcp.js +17 -11
- package/dist/lib/probe.d.ts +4 -1
- package/dist/lib/probe.js +5 -2
- package/dist/lib/pwsh.d.ts +33 -0
- package/dist/lib/pwsh.js +56 -0
- package/dist/lib/redact.d.ts +8 -0
- package/dist/lib/redact.js +11 -0
- package/dist/lib/refresh.d.ts +6 -2
- package/dist/lib/refresh.js +92 -72
- package/dist/lib/secrets-cli.d.ts +11 -0
- package/dist/lib/secrets-cli.js +30 -0
- package/dist/lib/secrets-client.js +3 -2
- package/dist/lib/session/detached.d.ts +7 -0
- package/dist/lib/session/detached.js +29 -0
- package/dist/lib/session/remote/peer-stream.d.ts +24 -2
- package/dist/lib/session/remote/peer-stream.js +33 -6
- package/dist/lib/session/sync/backend.d.ts +3 -3
- package/dist/lib/session/sync/backend.js +3 -3
- package/dist/lib/session/sync/provision.d.ts +1 -1
- package/dist/lib/session/sync/provision.js +2 -2
- package/dist/lib/sessions-client.js +0 -3
- package/dist/lib/setup-tool-install.d.ts +3 -0
- package/dist/lib/setup-tool-install.js +26 -0
- package/dist/lib/setup-tool-status.d.ts +22 -0
- package/dist/lib/setup-tool-status.js +215 -0
- package/dist/lib/share-runtime.d.ts +11 -0
- package/dist/lib/share-runtime.js +63 -0
- package/dist/lib/smart-launch.d.ts +1 -5
- package/dist/lib/smart-launch.js +3 -11
- package/dist/lib/ssh-exec.d.ts +44 -0
- package/dist/lib/ssh-exec.js +119 -0
- package/dist/lib/startup/command-registry.d.ts +6 -4
- package/dist/lib/startup/command-registry.js +10 -7
- package/dist/lib/state.js +2 -2
- package/dist/lib/storage/selection.d.ts +2 -2
- package/dist/lib/storage/selection.js +2 -2
- package/dist/lib/sync-umbrella.d.ts +5 -0
- package/dist/lib/sync-umbrella.js +18 -10
- package/dist/lib/traces/backend.d.ts +1 -2
- package/dist/lib/traces/backend.js +1 -2
- package/dist/lib/traces/provision.d.ts +1 -1
- package/dist/lib/traces/provision.js +2 -2
- package/dist/lib/types.d.ts +8 -6
- package/package.json +2 -3
- package/dist/commands/artifacts-setup.d.ts +0 -53
- package/dist/commands/artifacts-setup.js +0 -161
- package/dist/commands/artifacts.d.ts +0 -18
- package/dist/commands/artifacts.js +0 -58
- package/dist/commands/attach.d.ts +0 -12
- package/dist/commands/attach.js +0 -86
- package/dist/commands/auth-mint.d.ts +0 -12
- package/dist/commands/auth-mint.js +0 -108
- package/dist/commands/reconnect.d.ts +0 -46
- package/dist/commands/reconnect.js +0 -115
- package/dist/commands/share.d.ts +0 -293
- package/dist/commands/share.js +0 -1424
- package/dist/lib/share/analytics.d.ts +0 -13
- package/dist/lib/share/analytics.js +0 -45
- package/dist/lib/share/backend.d.ts +0 -120
- package/dist/lib/share/backend.js +0 -176
- package/dist/lib/share/capture.d.ts +0 -31
- package/dist/lib/share/capture.js +0 -174
- package/dist/lib/share/config.d.ts +0 -72
- package/dist/lib/share/config.js +0 -211
- package/dist/lib/share/delete.d.ts +0 -123
- package/dist/lib/share/delete.js +0 -173
- package/dist/lib/share/html.d.ts +0 -20
- package/dist/lib/share/html.js +0 -88
- package/dist/lib/share/http-error.d.ts +0 -53
- package/dist/lib/share/http-error.js +0 -65
- package/dist/lib/share/og.d.ts +0 -26
- package/dist/lib/share/og.js +0 -84
- package/dist/lib/share/provision.d.ts +0 -127
- package/dist/lib/share/provision.js +0 -285
- package/dist/lib/share/publish.d.ts +0 -379
- package/dist/lib/share/publish.js +0 -818
- package/dist/lib/share/worker-template.d.ts +0 -27
- package/dist/lib/share/worker-template.js +0 -2424
- package/dist/lib/storage/index.d.ts +0 -14
- package/dist/lib/storage/index.js +0 -14
- package/dist/lib/storage/visibility.d.ts +0 -82
- package/dist/lib/storage/visibility.js +0 -99
package/dist/commands/share.d.ts
DELETED
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
import { type Command } from 'commander';
|
|
2
|
-
import { type ShareConfig } from '../lib/share/config.js';
|
|
3
|
-
import { type CloudflareRequester } from '../lib/share/provision.js';
|
|
4
|
-
import { type PublishResult, type ShareVisibility } from '../lib/share/publish.js';
|
|
5
|
-
import { deleteShare, type DeleteShareResult } from '../lib/share/delete.js';
|
|
6
|
-
import type { PhoenixSession } from '../lib/identity/client.js';
|
|
7
|
-
export declare function formatSharePublishResult(result: PublishResult, json?: boolean): string;
|
|
8
|
-
/** Compare the configured endpoint's last-deployed template hash against the
|
|
9
|
-
* hash of the CURRENT `worker-template.ts` render. A config with no recorded
|
|
10
|
-
* hash (every endpoint provisioned before this field existed) is "unknown" —
|
|
11
|
-
* never "current" or "outdated", since there is nothing to compare against. */
|
|
12
|
-
export declare function shareTemplateStatus(cfg: ShareConfig): 'current' | 'outdated' | 'unknown';
|
|
13
|
-
/** One published object as reported by the Worker's `?format=json` listing route. */
|
|
14
|
-
interface ShareListItem {
|
|
15
|
-
slug: string;
|
|
16
|
-
url: string;
|
|
17
|
-
/** Object size in bytes. */
|
|
18
|
-
size: number;
|
|
19
|
-
/** Stored content type, or null if the Worker had none recorded. */
|
|
20
|
-
contentType: string | null;
|
|
21
|
-
/** ISO timestamp the object was last written (R2 `uploaded`). */
|
|
22
|
-
publishedAt: string;
|
|
23
|
-
/** ISO auto-expire timestamp, or null for a permanent share. */
|
|
24
|
-
expiresAt: string | null;
|
|
25
|
-
/** Human display title (explicit `--label` or auto-derived), or null for a
|
|
26
|
-
* share published before this field existed. */
|
|
27
|
-
label: string | null;
|
|
28
|
-
/** Harness/agent name that published this (`AGENTS_AGENT_NAME`), or null. */
|
|
29
|
-
agent: string | null;
|
|
30
|
-
/** Session id that published this, or null. */
|
|
31
|
-
session: string | null;
|
|
32
|
-
/** Hostname the publish ran from, or null. */
|
|
33
|
-
host: string | null;
|
|
34
|
-
/** git repo name at publish time, or null (published outside a git repo, or
|
|
35
|
-
* before this field existed). */
|
|
36
|
-
repo: string | null;
|
|
37
|
-
/** Count of retained prior versions under this slug (see `share revisions`). */
|
|
38
|
-
revisionCount: number;
|
|
39
|
-
/** The visibility stamped at publish time: public | unlisted | me | org.
|
|
40
|
-
* Missing on Workers that predate this field → treated as public. */
|
|
41
|
-
visibility: ShareVisibility;
|
|
42
|
-
/** Arbitrary `--meta key=value` entries attached at publish time (RUSH-2683)
|
|
43
|
-
* — everything that isn't a reserved provenance/label key. `{}` when none
|
|
44
|
-
* were set, or when the deployed Worker predates this field. */
|
|
45
|
-
meta: Record<string, string>;
|
|
46
|
-
}
|
|
47
|
-
interface ShareListResult {
|
|
48
|
-
/** The namespace listed. */
|
|
49
|
-
user: string;
|
|
50
|
-
count: number;
|
|
51
|
-
objects: ShareListItem[];
|
|
52
|
-
}
|
|
53
|
-
/** DI seam for tests — override the real HTTP GET of the JSON listing route.
|
|
54
|
-
* The optional `headers` carry the owner bearer for hidden-visibility listings. */
|
|
55
|
-
type ListingFetchFn = (url: string, headers?: Record<string, string>) => Promise<{
|
|
56
|
-
status: number;
|
|
57
|
-
contentType: string;
|
|
58
|
-
body: string;
|
|
59
|
-
}>;
|
|
60
|
-
interface ShareEditResult {
|
|
61
|
-
ok: true;
|
|
62
|
-
url: string;
|
|
63
|
-
label: string | null;
|
|
64
|
-
meta: Record<string, string>;
|
|
65
|
-
/** The visibility the page now carries (present on Workers that support the
|
|
66
|
-
* visibility edit; absent from an older deployed template). */
|
|
67
|
-
visibility?: ShareVisibility;
|
|
68
|
-
/** The visibility the page had before this edit, when the Worker reports it. */
|
|
69
|
-
previousVisibility?: ShareVisibility;
|
|
70
|
-
}
|
|
71
|
-
export declare function runShareEdit(target: string, opts: {
|
|
72
|
-
githubUser?: string;
|
|
73
|
-
config?: ShareConfig;
|
|
74
|
-
writeToken?: string;
|
|
75
|
-
byo?: boolean;
|
|
76
|
-
session?: PhoenixSession | null;
|
|
77
|
-
label?: string | null;
|
|
78
|
-
meta?: Record<string, string>;
|
|
79
|
-
metaMode?: 'merge' | 'replace';
|
|
80
|
-
removeMeta?: string[];
|
|
81
|
-
/** Change the page's visibility in place (public | unlisted | me | org).
|
|
82
|
-
* A metadata-only rewrite like label/meta — the body is untouched, so no
|
|
83
|
-
* revision is created. me/org require a Phoenix session. `private` is
|
|
84
|
-
* rejected here — token-gating needs a fresh viewer key only the publish
|
|
85
|
-
* path mints (PHNX-3654). */
|
|
86
|
-
visibility?: ShareVisibility;
|
|
87
|
-
force?: boolean;
|
|
88
|
-
fetchEdit?: typeof fetch;
|
|
89
|
-
}): Promise<ShareEditResult>;
|
|
90
|
-
/** Parse the Worker's listing JSON into a validated result, failing loud (with the
|
|
91
|
-
* outdated-template hint) on any body that isn't the expected shape — an old Worker
|
|
92
|
-
* serves the HTML gallery for a non-empty namespace, which must not be silently
|
|
93
|
-
* accepted as "you have published nothing". */
|
|
94
|
-
export declare function parseShareListing(user: string, body: string): ShareListResult;
|
|
95
|
-
/** Fetch and parse the machine-readable listing of the caller's namespace from the
|
|
96
|
-
* Worker's `?format=json` route. Fails loud when share was never configured, when
|
|
97
|
-
* the deployed template is known-outdated (RUSH-2449 templateHash), or when the
|
|
98
|
-
* live response proves the route is absent (404 or a non-JSON 200 = the old HTML
|
|
99
|
-
* gallery) — never a silent empty/wrong result. Signed-in users hit the managed
|
|
100
|
-
* endpoint; BYO still uses `readShareConfig()`. */
|
|
101
|
-
export declare function runShareList(opts?: {
|
|
102
|
-
githubUser?: string;
|
|
103
|
-
config?: ShareConfig;
|
|
104
|
-
writeToken?: string;
|
|
105
|
-
byo?: boolean;
|
|
106
|
-
/** DI seam — override `readSession()`. Named `phoenixSession` because
|
|
107
|
-
* `session` is already the listing filter (session id). */
|
|
108
|
-
phoenixSession?: PhoenixSession | null;
|
|
109
|
-
fetchListing?: ListingFetchFn;
|
|
110
|
-
/** Only shares published by this agent/harness (case-insensitive, exact). */
|
|
111
|
-
agent?: string;
|
|
112
|
-
/** Only shares published from this session id (exact). */
|
|
113
|
-
session?: string;
|
|
114
|
-
/** Only shares whose label contains this text (case-insensitive substring). */
|
|
115
|
-
label?: string;
|
|
116
|
-
/** Only shares matching every provided `--meta key=value` entry. */
|
|
117
|
-
meta?: Record<string, string>;
|
|
118
|
-
/** Visibility filter. `public` (default) lists only public gallery pages;
|
|
119
|
-
* `unlisted`/`me`/`org` include that owner's hidden pages; `all` includes
|
|
120
|
-
* every active page. Hidden scopes send the owner's bearer and `scope=mine`. */
|
|
121
|
-
scope?: 'public' | 'unlisted' | 'private' | 'me' | 'org' | 'all';
|
|
122
|
-
}): Promise<ShareListResult>;
|
|
123
|
-
/** Client-side filtering over an already-fetched listing (RUSH-2683) — the
|
|
124
|
-
* Worker has no query surface for this, so it narrows the fetched set instead
|
|
125
|
-
* of a second round trip. `count` reflects the FILTERED set, matching what the
|
|
126
|
-
* caller actually sees. */
|
|
127
|
-
export declare function applyShareListFilters(result: ShareListResult, filters: {
|
|
128
|
-
agent?: string;
|
|
129
|
-
session?: string;
|
|
130
|
-
label?: string;
|
|
131
|
-
meta?: Record<string, string>;
|
|
132
|
-
scope?: 'public' | 'unlisted' | 'private' | 'me' | 'org' | 'all';
|
|
133
|
-
}): ShareListResult;
|
|
134
|
-
export declare function formatShareList(result: ShareListResult, json?: boolean): string;
|
|
135
|
-
/** One retained prior version of a slug, as reported by the Worker's
|
|
136
|
-
* `?revisions=json` route. */
|
|
137
|
-
interface ShareRevisionItem {
|
|
138
|
-
/** R2 object key, `<user>/<slug>/rev-<ts>-<rand>`. */
|
|
139
|
-
key: string;
|
|
140
|
-
url: string;
|
|
141
|
-
size: number;
|
|
142
|
-
contentType: string | null;
|
|
143
|
-
/** ISO timestamp this version was replaced (when the copy was made). */
|
|
144
|
-
uploadedAt: string;
|
|
145
|
-
expiresAt: string | null;
|
|
146
|
-
label: string | null;
|
|
147
|
-
agent: string | null;
|
|
148
|
-
session: string | null;
|
|
149
|
-
host: string | null;
|
|
150
|
-
repo: string | null;
|
|
151
|
-
/** Arbitrary `--meta key=value` entries attached at publish time (RUSH-2683)
|
|
152
|
-
* — everything that isn't a reserved provenance/label key. `{}` when none
|
|
153
|
-
* were set, or when the deployed Worker predates this field. */
|
|
154
|
-
meta: Record<string, string>;
|
|
155
|
-
}
|
|
156
|
-
interface ShareRevisionsResult {
|
|
157
|
-
/** The canonical `<user>/<slug>` key these are revisions of. */
|
|
158
|
-
key: string;
|
|
159
|
-
count: number;
|
|
160
|
-
revisions: ShareRevisionItem[];
|
|
161
|
-
}
|
|
162
|
-
/** Parse the Worker's `?revisions=json` payload, failing loud (with the same
|
|
163
|
-
* outdated-template hint as {@link parseShareListing}) on an unexpected shape. */
|
|
164
|
-
export declare function parseShareRevisions(key: string, body: string): ShareRevisionsResult;
|
|
165
|
-
/** Fetch and parse the retained prior versions of one published slug. `target`
|
|
166
|
-
* accepts the same three forms as `agents artifacts unshare` (a full URL, `<user>/<slug>`,
|
|
167
|
-
* or a bare slug resolved against the caller's own namespace) — reuses
|
|
168
|
-
* {@link resolveDeleteTarget} rather than re-deriving the key. */
|
|
169
|
-
export declare function runShareRevisions(target: string, opts?: {
|
|
170
|
-
githubUser?: string;
|
|
171
|
-
config?: ShareConfig;
|
|
172
|
-
writeToken?: string;
|
|
173
|
-
byo?: boolean;
|
|
174
|
-
session?: PhoenixSession | null;
|
|
175
|
-
fetchListing?: ListingFetchFn;
|
|
176
|
-
}): Promise<ShareRevisionsResult>;
|
|
177
|
-
/** The resolved page URL plus a signed-in-owner URL that carries a one-time
|
|
178
|
-
* login ticket, so opening it activates the shared page's inline visibility
|
|
179
|
-
* control (PHNX-3370). */
|
|
180
|
-
interface ShareOpenResult {
|
|
181
|
-
/** `<user>/<slug>` key of the target page. */
|
|
182
|
-
key: string;
|
|
183
|
-
/** The plain page URL (no ticket). */
|
|
184
|
-
url: string;
|
|
185
|
-
/** The page URL with `?phoenix_ticket=<t>` — open THIS to be the owner. */
|
|
186
|
-
ownerUrl: string;
|
|
187
|
-
}
|
|
188
|
-
/** Mint a one-time login ticket for the signed-in owner and build the URL that
|
|
189
|
-
* opens their own published page **as the owner**, so the inline visibility
|
|
190
|
-
* control is live in the browser. Managed backend only — the control is gated on
|
|
191
|
-
* the Phoenix identity, and BYO (WRITE_TOKEN) endpoints have no per-viewer login.
|
|
192
|
-
* `target` accepts the same three forms as `visibility`/`unshare` (a full URL,
|
|
193
|
-
* `<user>/<slug>`, or a bare slug in the caller's namespace). */
|
|
194
|
-
export declare function runShareOpen(target: string, opts?: {
|
|
195
|
-
githubUser?: string;
|
|
196
|
-
config?: ShareConfig;
|
|
197
|
-
session?: PhoenixSession | null;
|
|
198
|
-
/** DI seam — override the ticket-mint POST. */
|
|
199
|
-
fetchTicket?: (url: string, bearer: string) => Promise<{
|
|
200
|
-
status: number;
|
|
201
|
-
body: string;
|
|
202
|
-
}>;
|
|
203
|
-
}): Promise<ShareOpenResult>;
|
|
204
|
-
export declare function formatShareRevisions(result: ShareRevisionsResult, json?: boolean): string;
|
|
205
|
-
export declare function formatShareDeleteResult(result: DeleteShareResult, json?: boolean): string;
|
|
206
|
-
interface ShareDeleteCliOpts {
|
|
207
|
-
keepCover?: boolean;
|
|
208
|
-
keepRevisions?: boolean;
|
|
209
|
-
ifExists?: boolean;
|
|
210
|
-
forUser?: string;
|
|
211
|
-
deleteJson?: boolean;
|
|
212
|
-
}
|
|
213
|
-
/** Shared handler for `agents artifacts share delete <targets...>` and the
|
|
214
|
-
* nested `agents artifacts unshare <targets...>` alias. Deletes each target independently and
|
|
215
|
-
* continues past a failed one (rm-style), reporting all results and exiting
|
|
216
|
-
* non-zero if any target failed to verify as gone.
|
|
217
|
-
*
|
|
218
|
-
* `deleteFn` is a DI seam for tests (defaults to the real `deleteShare`) — it is
|
|
219
|
-
* never exposed as a CLI flag, only used to inject a fake config/checker/deleter
|
|
220
|
-
* without touching the keychain or a live endpoint. */
|
|
221
|
-
export declare function runShareDelete(targets: string[], opts: ShareDeleteCliOpts, deleteFn?: typeof deleteShare): Promise<void>;
|
|
222
|
-
/**
|
|
223
|
-
* Register the `share` subtree under its parent group — `agents artifacts share`
|
|
224
|
-
* (see commands/artifacts.ts). `agents artifacts unshare` is the nested alias
|
|
225
|
-
* registered via {@link registerUnshareCommand} on the artifacts group.
|
|
226
|
-
* registration on the ROOT program, so it is {@link registerUnshareCommand}, not
|
|
227
|
-
* part of this subtree.
|
|
228
|
-
*/
|
|
229
|
-
export declare function registerShareCommands(artifactsCmd: Command): void;
|
|
230
|
-
/**
|
|
231
|
-
* Register `agents artifacts unshare <targets...>` as the nested alias of
|
|
232
|
-
* `agents artifacts share delete`. Top-level `agents unshare` is retired.
|
|
233
|
-
*/
|
|
234
|
-
export declare function registerUnshareCommand(artifactsCmd: Command): void;
|
|
235
|
-
/** Provision a fresh R2 bucket + Worker on the user's Cloudflare and persist the
|
|
236
|
-
* endpoint config + write token. Shared by both modes of `agents artifacts setup`
|
|
237
|
-
* (the flag-driven provision and the interactive wizard). */
|
|
238
|
-
export declare function runShareProvision(opts: {
|
|
239
|
-
bundle: string;
|
|
240
|
-
worker: string;
|
|
241
|
-
bucket: string;
|
|
242
|
-
account?: string;
|
|
243
|
-
token?: string;
|
|
244
|
-
domain?: string;
|
|
245
|
-
analyticsToken?: string;
|
|
246
|
-
request?: CloudflareRequester;
|
|
247
|
-
/** Bind PHOENIX_ID_BASE even when the mapped hostname is not the managed domain. */
|
|
248
|
-
managed?: boolean;
|
|
249
|
-
}): Promise<void>;
|
|
250
|
-
interface ShareUpdateResult {
|
|
251
|
-
updated: boolean;
|
|
252
|
-
templateHash: string;
|
|
253
|
-
baseUrl: string;
|
|
254
|
-
workerName: string;
|
|
255
|
-
/** True when this was a `--check` run: nothing was deployed, the fields below
|
|
256
|
-
* just report whether a deploy WOULD be needed. Used by the release train to
|
|
257
|
-
* decide during preflight — before it verifies deploy creds — whether this
|
|
258
|
-
* release even changes the Worker. */
|
|
259
|
-
checked?: boolean;
|
|
260
|
-
/** Whether the current `worker-template.ts` render differs from what the
|
|
261
|
-
* endpoint last deployed (or `--force`/an endpoint with no recorded hash). */
|
|
262
|
-
deployNeeded?: boolean;
|
|
263
|
-
/** The template hash the endpoint last deployed, per local config. Undefined
|
|
264
|
-
* on an endpoint provisioned before the hash field existed. */
|
|
265
|
-
deployedHash?: string;
|
|
266
|
-
}
|
|
267
|
-
/** Re-deploy the Worker script on an ALREADY-provisioned endpoint to match the
|
|
268
|
-
* current `worker-template.ts`. Reuses the existing account/worker/bucket and
|
|
269
|
-
* write token from `readShareConfig()`/the `share` bundle — never creates a
|
|
270
|
-
* bucket, touches routes/domains, or regenerates the token (see
|
|
271
|
-
* `updateWorker` in `lib/share/provision.ts` for how the token — and, on a
|
|
272
|
-
* managed endpoint, `PHOENIX_ID_BASE` — survives the re-upload). Idempotent:
|
|
273
|
-
* no-ops the script upload when the deployed hash already matches unless
|
|
274
|
-
* `force`; a managed endpoint still re-applies `PHOENIX_ID_BASE`. */
|
|
275
|
-
export declare function runShareUpdate(opts?: {
|
|
276
|
-
bundle?: string;
|
|
277
|
-
account?: string;
|
|
278
|
-
token?: string;
|
|
279
|
-
force?: boolean;
|
|
280
|
-
/** Report whether a deploy is needed and return without deploying. Needs no
|
|
281
|
-
* Cloudflare credentials — change detection is a pure local render+hash. */
|
|
282
|
-
check?: boolean;
|
|
283
|
-
request?: CloudflareRequester;
|
|
284
|
-
/** Bind PHOENIX_ID_BASE even when the configured hostname is not the managed domain. */
|
|
285
|
-
managed?: boolean;
|
|
286
|
-
}): Promise<ShareUpdateResult>;
|
|
287
|
-
/** Join an existing share endpoint (no provisioning): prompt for the endpoint
|
|
288
|
-
* details + write token and persist them. Shared by `agents artifacts share join`
|
|
289
|
-
* and the `agents artifacts setup` wizard. */
|
|
290
|
-
export declare function runShareJoin(baseUrl?: string, opts?: {
|
|
291
|
-
token?: string;
|
|
292
|
-
}): Promise<void>;
|
|
293
|
-
export {};
|