@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
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `lib/storage` — the surface-agnostic core the managed-storage surfaces share:
|
|
3
|
-
*
|
|
4
|
-
* - {@link selection} the ONE managed-vs-BYO selection policy.
|
|
5
|
-
* - {@link visibility} the ONE visibility model + product default (`me`).
|
|
6
|
-
*
|
|
7
|
-
* Consume the SELECTION + VISIBILITY POLICY from here; keep each surface's typed,
|
|
8
|
-
* `kind`-tagged backend adapter (endpoint, namespace, covers) in that surface's
|
|
9
|
-
* own module. `agents artifacts share` (`lib/share/`) and `agents traces`
|
|
10
|
-
* (`lib/traces/`) are the two current adapters; the `sessions` sync adapter is
|
|
11
|
-
* the next consumer.
|
|
12
|
-
*/
|
|
13
|
-
export { type StorageBackendKind, type StorageSelectionOpts, selectStorageBackendKind, isManagedSelection, } from './selection.js';
|
|
14
|
-
export { type ShareVisibility, type VisibilityFlags, PUBLISH_VISIBILITY_LEVELS, EDITABLE_VISIBILITY_LEVELS, MANAGED_DEFAULT_VISIBILITY, BYO_DEFAULT_VISIBILITY, defaultVisibilityForBackend, explicitVisibility, resolveVisibility, publishVisibility, } from './visibility.js';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `lib/storage` — the surface-agnostic core the managed-storage surfaces share:
|
|
3
|
-
*
|
|
4
|
-
* - {@link selection} the ONE managed-vs-BYO selection policy.
|
|
5
|
-
* - {@link visibility} the ONE visibility model + product default (`me`).
|
|
6
|
-
*
|
|
7
|
-
* Consume the SELECTION + VISIBILITY POLICY from here; keep each surface's typed,
|
|
8
|
-
* `kind`-tagged backend adapter (endpoint, namespace, covers) in that surface's
|
|
9
|
-
* own module. `agents artifacts share` (`lib/share/`) and `agents traces`
|
|
10
|
-
* (`lib/traces/`) are the two current adapters; the `sessions` sync adapter is
|
|
11
|
-
* the next consumer.
|
|
12
|
-
*/
|
|
13
|
-
export { selectStorageBackendKind, isManagedSelection, } from './selection.js';
|
|
14
|
-
export { PUBLISH_VISIBILITY_LEVELS, EDITABLE_VISIBILITY_LEVELS, MANAGED_DEFAULT_VISIBILITY, BYO_DEFAULT_VISIBILITY, defaultVisibilityForBackend, explicitVisibility, resolveVisibility, publishVisibility, } from './visibility.js';
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The ONE visibility model, identical on every surface that publishes to managed
|
|
3
|
-
* storage. Three levels the operator ever chooses between:
|
|
4
|
-
*
|
|
5
|
-
* - PRIVATE = `me` — owner-only, Phoenix-gated. THE DEFAULT for a new
|
|
6
|
-
* managed share (see {@link MANAGED_DEFAULT_VISIBILITY}).
|
|
7
|
-
* - TEAM = `org` — everyone at the sharer's signed-in email DOMAIN,
|
|
8
|
-
* Phoenix-gated. Automatic from the domain — there is
|
|
9
|
-
* no organization to create and no member to add.
|
|
10
|
-
* - PUBLIC = `public` — explicit opt-in; listed in the gallery, gets an OG
|
|
11
|
-
* card.
|
|
12
|
-
*
|
|
13
|
-
* Two capability-URL levels remain for the power path (unguessable link, not a
|
|
14
|
-
* login gate): `unlisted` (obscurity — noindex, gallery-hidden, still
|
|
15
|
-
* world-readable) and `private`-token-gated (`--protected`: a `?k=` key the
|
|
16
|
-
* Worker checks, 404 without it). `me`/`org` require a Phoenix session; the
|
|
17
|
-
* Worker refuses them for a bare WRITE_TOKEN (BYO) publish, which is why the BYO
|
|
18
|
-
* default stays `public`.
|
|
19
|
-
*
|
|
20
|
-
* The names match the Worker's own metadata vocabulary (`lib/share/worker-template.ts`),
|
|
21
|
-
* so this module is the single client-side source of truth for the level set and
|
|
22
|
-
* the DEFAULT, reusable by any surface.
|
|
23
|
-
*/
|
|
24
|
-
/** Every visibility level the Worker understands. `me`/`org` are the
|
|
25
|
-
* Phoenix-gated (login-required) levels; `public`/`unlisted`/`private` are the
|
|
26
|
-
* link-reachable levels. */
|
|
27
|
-
export type ShareVisibility = 'public' | 'unlisted' | 'private' | 'me' | 'org';
|
|
28
|
-
/** The levels a publish (`share <file> --visibility`) may select. */
|
|
29
|
-
export declare const PUBLISH_VISIBILITY_LEVELS: readonly ShareVisibility[];
|
|
30
|
-
/** The levels an ALREADY-published page may be re-scoped to in place
|
|
31
|
-
* (`share visibility <target> <level>`). Excludes `private`: re-scoping to
|
|
32
|
-
* token-gated needs a fresh viewer token, which only the publish path mints. */
|
|
33
|
-
export declare const EDITABLE_VISIBILITY_LEVELS: readonly ShareVisibility[];
|
|
34
|
-
/**
|
|
35
|
-
* The product default for a MANAGED (signed-in) share: PRIVATE = owner-only,
|
|
36
|
-
* Phoenix-gated. A publish with no visibility flag lands here.
|
|
37
|
-
*/
|
|
38
|
-
export declare const MANAGED_DEFAULT_VISIBILITY: ShareVisibility;
|
|
39
|
-
/**
|
|
40
|
-
* The default for a BYO (bring-your-own bucket) publish. `me`/`org` are refused
|
|
41
|
-
* server-side for a WRITE_TOKEN publish — there is no Phoenix owner to gate on —
|
|
42
|
-
* so a BYO share with no flag stays `public`, matching the pre-managed behavior.
|
|
43
|
-
*/
|
|
44
|
-
export declare const BYO_DEFAULT_VISIBILITY: ShareVisibility;
|
|
45
|
-
import type { StorageBackendKind } from './selection.js';
|
|
46
|
-
/** The no-flags default for a given storage backend: `me` on managed,
|
|
47
|
-
* `public` on BYO. */
|
|
48
|
-
export declare function defaultVisibilityForBackend(kind: StorageBackendKind): ShareVisibility;
|
|
49
|
-
export interface VisibilityFlags {
|
|
50
|
-
/** An explicit `--visibility <level>`. */
|
|
51
|
-
visibility?: ShareVisibility;
|
|
52
|
-
/** `--unlisted` / `--private` (obscurity, not read-auth). */
|
|
53
|
-
unlisted?: boolean;
|
|
54
|
-
/** `--protected` — token-gated read auth (maps to `private`). */
|
|
55
|
-
protected?: boolean;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* The visibility the caller EXPLICITLY asked for, or `undefined` when they
|
|
59
|
-
* passed no visibility signal at all. `--protected` wins over `--unlisted`
|
|
60
|
-
* (stronger control), which wins over an explicit `--visibility`.
|
|
61
|
-
*
|
|
62
|
-
* The distinction between "explicit" and "no preference" is what lets a caller
|
|
63
|
-
* apply the product default only when nothing was asked — a caller that passes
|
|
64
|
-
* `--visibility public` gets `public`, never the `me` default.
|
|
65
|
-
*/
|
|
66
|
-
export declare function explicitVisibility(opts?: VisibilityFlags): ShareVisibility | undefined;
|
|
67
|
-
/**
|
|
68
|
-
* Resolve visibility from the caller's flags, falling back to `fallback` when no
|
|
69
|
-
* explicit signal was given. The library fallback stays `public` so a caller
|
|
70
|
-
* that hasn't opted into the managed private default (e.g. an existing lib
|
|
71
|
-
* consumer) is never silently flipped; the surface applies the product default
|
|
72
|
-
* itself via {@link defaultVisibilityForBackend}.
|
|
73
|
-
*/
|
|
74
|
-
export declare function resolveVisibility(opts?: VisibilityFlags, fallback?: ShareVisibility): ShareVisibility;
|
|
75
|
-
/**
|
|
76
|
-
* The visibility a PUBLISH should stamp: the caller's explicit flag if any, else
|
|
77
|
-
* the product default for the resolved backend (`me` on managed, `public` on
|
|
78
|
-
* BYO). This is the one call a publishing surface makes — `agents artifacts
|
|
79
|
-
* share` today, `agents sessions` sync next — so "private by default when signed
|
|
80
|
-
* in" is decided in exactly one place.
|
|
81
|
-
*/
|
|
82
|
-
export declare function publishVisibility(opts: VisibilityFlags, kind: StorageBackendKind): ShareVisibility;
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The ONE visibility model, identical on every surface that publishes to managed
|
|
3
|
-
* storage. Three levels the operator ever chooses between:
|
|
4
|
-
*
|
|
5
|
-
* - PRIVATE = `me` — owner-only, Phoenix-gated. THE DEFAULT for a new
|
|
6
|
-
* managed share (see {@link MANAGED_DEFAULT_VISIBILITY}).
|
|
7
|
-
* - TEAM = `org` — everyone at the sharer's signed-in email DOMAIN,
|
|
8
|
-
* Phoenix-gated. Automatic from the domain — there is
|
|
9
|
-
* no organization to create and no member to add.
|
|
10
|
-
* - PUBLIC = `public` — explicit opt-in; listed in the gallery, gets an OG
|
|
11
|
-
* card.
|
|
12
|
-
*
|
|
13
|
-
* Two capability-URL levels remain for the power path (unguessable link, not a
|
|
14
|
-
* login gate): `unlisted` (obscurity — noindex, gallery-hidden, still
|
|
15
|
-
* world-readable) and `private`-token-gated (`--protected`: a `?k=` key the
|
|
16
|
-
* Worker checks, 404 without it). `me`/`org` require a Phoenix session; the
|
|
17
|
-
* Worker refuses them for a bare WRITE_TOKEN (BYO) publish, which is why the BYO
|
|
18
|
-
* default stays `public`.
|
|
19
|
-
*
|
|
20
|
-
* The names match the Worker's own metadata vocabulary (`lib/share/worker-template.ts`),
|
|
21
|
-
* so this module is the single client-side source of truth for the level set and
|
|
22
|
-
* the DEFAULT, reusable by any surface.
|
|
23
|
-
*/
|
|
24
|
-
/** The levels a publish (`share <file> --visibility`) may select. */
|
|
25
|
-
export const PUBLISH_VISIBILITY_LEVELS = [
|
|
26
|
-
'public',
|
|
27
|
-
'unlisted',
|
|
28
|
-
'private',
|
|
29
|
-
'me',
|
|
30
|
-
'org',
|
|
31
|
-
];
|
|
32
|
-
/** The levels an ALREADY-published page may be re-scoped to in place
|
|
33
|
-
* (`share visibility <target> <level>`). Excludes `private`: re-scoping to
|
|
34
|
-
* token-gated needs a fresh viewer token, which only the publish path mints. */
|
|
35
|
-
export const EDITABLE_VISIBILITY_LEVELS = [
|
|
36
|
-
'public',
|
|
37
|
-
'unlisted',
|
|
38
|
-
'me',
|
|
39
|
-
'org',
|
|
40
|
-
];
|
|
41
|
-
/**
|
|
42
|
-
* The product default for a MANAGED (signed-in) share: PRIVATE = owner-only,
|
|
43
|
-
* Phoenix-gated. A publish with no visibility flag lands here.
|
|
44
|
-
*/
|
|
45
|
-
export const MANAGED_DEFAULT_VISIBILITY = 'me';
|
|
46
|
-
/**
|
|
47
|
-
* The default for a BYO (bring-your-own bucket) publish. `me`/`org` are refused
|
|
48
|
-
* server-side for a WRITE_TOKEN publish — there is no Phoenix owner to gate on —
|
|
49
|
-
* so a BYO share with no flag stays `public`, matching the pre-managed behavior.
|
|
50
|
-
*/
|
|
51
|
-
export const BYO_DEFAULT_VISIBILITY = 'public';
|
|
52
|
-
/** The no-flags default for a given storage backend: `me` on managed,
|
|
53
|
-
* `public` on BYO. */
|
|
54
|
-
export function defaultVisibilityForBackend(kind) {
|
|
55
|
-
return kind === 'managed' ? MANAGED_DEFAULT_VISIBILITY : BYO_DEFAULT_VISIBILITY;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* The visibility the caller EXPLICITLY asked for, or `undefined` when they
|
|
59
|
-
* passed no visibility signal at all. `--protected` wins over `--unlisted`
|
|
60
|
-
* (stronger control), which wins over an explicit `--visibility`.
|
|
61
|
-
*
|
|
62
|
-
* The distinction between "explicit" and "no preference" is what lets a caller
|
|
63
|
-
* apply the product default only when nothing was asked — a caller that passes
|
|
64
|
-
* `--visibility public` gets `public`, never the `me` default.
|
|
65
|
-
*/
|
|
66
|
-
export function explicitVisibility(opts = {}) {
|
|
67
|
-
if (opts.protected === true)
|
|
68
|
-
return 'private';
|
|
69
|
-
if (opts.unlisted === true)
|
|
70
|
-
return 'unlisted';
|
|
71
|
-
if (opts.visibility === 'public' ||
|
|
72
|
-
opts.visibility === 'unlisted' ||
|
|
73
|
-
opts.visibility === 'private' ||
|
|
74
|
-
opts.visibility === 'me' ||
|
|
75
|
-
opts.visibility === 'org') {
|
|
76
|
-
return opts.visibility;
|
|
77
|
-
}
|
|
78
|
-
return undefined;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Resolve visibility from the caller's flags, falling back to `fallback` when no
|
|
82
|
-
* explicit signal was given. The library fallback stays `public` so a caller
|
|
83
|
-
* that hasn't opted into the managed private default (e.g. an existing lib
|
|
84
|
-
* consumer) is never silently flipped; the surface applies the product default
|
|
85
|
-
* itself via {@link defaultVisibilityForBackend}.
|
|
86
|
-
*/
|
|
87
|
-
export function resolveVisibility(opts = {}, fallback = 'public') {
|
|
88
|
-
return explicitVisibility(opts) ?? fallback;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* The visibility a PUBLISH should stamp: the caller's explicit flag if any, else
|
|
92
|
-
* the product default for the resolved backend (`me` on managed, `public` on
|
|
93
|
-
* BYO). This is the one call a publishing surface makes — `agents artifacts
|
|
94
|
-
* share` today, `agents sessions` sync next — so "private by default when signed
|
|
95
|
-
* in" is decided in exactly one place.
|
|
96
|
-
*/
|
|
97
|
-
export function publishVisibility(opts, kind) {
|
|
98
|
-
return explicitVisibility(opts) ?? defaultVisibilityForBackend(kind);
|
|
99
|
-
}
|