@sequenceholdings/studio-cli 0.7.2 → 0.9.0
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/README.md +351 -49
- package/dist/access/commands.d.ts +1 -1
- package/dist/access/commands.js +102 -55
- package/dist/access/custom-role-hosts.d.ts +3 -0
- package/dist/access/custom-role-hosts.js +88 -0
- package/dist/access/group-rosters.d.ts +6 -0
- package/dist/access/group-rosters.js +33 -0
- package/dist/access/host-contract.d.ts +55 -0
- package/dist/access/host-contract.js +33 -0
- package/dist/access/hosts.d.ts +4 -0
- package/dist/access/hosts.js +60 -0
- package/dist/access/principal.d.ts +16 -0
- package/dist/access/principal.js +36 -0
- package/dist/access/roles.d.ts +18 -0
- package/dist/access/roles.js +89 -0
- package/dist/access/tier-hosts.d.ts +12 -0
- package/dist/access/tier-hosts.js +206 -0
- package/dist/agents/commands.d.ts +1 -1
- package/dist/agents/commands.js +76 -16
- package/dist/agents/scaffold.js +8 -3
- package/dist/app/commands.js +37 -12
- package/dist/app/manifest.d.ts +2 -2
- package/dist/app/official-source.d.ts +4 -2
- package/dist/app/official-source.js +6 -4
- package/dist/app/readme.js +2 -2
- package/dist/app/workspace-model.js +4 -0
- package/dist/app/workspace-scaffold.js +5 -3
- package/dist/app/workspace.d.ts +2 -0
- package/dist/app/workspace.js +1 -1
- package/dist/artifact/delegate.js +26 -3
- package/dist/artifact/sandbox.js +2 -1
- package/dist/atlas-client.d.ts +15 -8
- package/dist/atlas-client.js +140 -64
- package/dist/bin.js +9 -1
- package/dist/cli-errors.js +4 -0
- package/dist/command-contract.d.ts +8 -2
- package/dist/command-contract.js +3 -2
- package/dist/command-help.d.ts +8 -6
- package/dist/command-help.js +50 -12
- package/dist/env-flags.d.ts +7 -0
- package/dist/env-flags.js +23 -0
- package/dist/functions/commands.js +66 -11
- package/dist/functions/manifest.d.ts +5 -0
- package/dist/functions/manifest.js +44 -23
- package/dist/functions/service-account-guidance.d.ts +21 -0
- package/dist/functions/service-account-guidance.js +62 -0
- package/dist/functions/workspace.d.ts +11 -0
- package/dist/functions/workspace.js +52 -0
- package/dist/main.d.ts +2 -1
- package/dist/main.js +12 -3
- package/dist/orm/delegate.js +49 -6
- package/dist/orm/execute.js +11 -5
- package/dist/orm/failures.d.ts +32 -0
- package/dist/orm/failures.js +75 -0
- package/dist/orm/read.js +3 -3
- package/dist/orm/version-guard.d.ts +3 -0
- package/dist/orm/version-guard.js +63 -0
- package/dist/pipeline/commands.js +4 -1
- package/dist/principals/commands.d.ts +3 -0
- package/dist/principals/commands.js +124 -0
- package/dist/process/runs.d.ts +4 -3
- package/dist/process/runs.js +52 -10
- package/dist/release-age.d.ts +1 -1
- package/dist/release-age.js +1 -0
- package/dist/repos/commands.d.ts +44 -0
- package/dist/repos/commands.js +55 -15
- package/dist/repos/init-repo.d.ts +45 -0
- package/dist/repos/init-repo.js +257 -0
- package/dist/sandbox-unpushed-warning.d.ts +23 -0
- package/dist/sandbox-unpushed-warning.js +86 -0
- package/dist/service-accounts/commands.js +15 -3
- package/dist/templates/commands.d.ts +14 -2
- package/dist/templates/commands.js +70 -16
- package/dist/templates/process/pnpm-workspace.yaml +1 -0
- package/package.json +14 -11
- package/templates/process/pnpm-workspace.yaml +1 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `seq-studio access roles` — create and edit a resource's roles in Atlas.
|
|
3
|
+
*
|
|
4
|
+
* Capabilities are code (declared in the resource's source and published by
|
|
5
|
+
* its deploy); roles are data: they bundle capabilities, live in the Atlas
|
|
6
|
+
* role registry, and are edited here or on the Permissions page. This wraps
|
|
7
|
+
* the registry routes the Permissions page uses, so registry write authority
|
|
8
|
+
* (the resource's capability admins) and DAG validation stay server-side.
|
|
9
|
+
*/
|
|
10
|
+
import { deleteJson, getJson, patchJson, postJson } from '../atlas-client.js';
|
|
11
|
+
import { validateCommandInput } from '../command-input.js';
|
|
12
|
+
import { buildContext, clientOptions } from '../functions/commands.js';
|
|
13
|
+
export const ACCESS_ROLES_USAGE = `usage:
|
|
14
|
+
seq-studio access roles list <artifact|function|orm> <resource-id> -e <env>
|
|
15
|
+
seq-studio access roles create <artifact|function|orm> <resource-id> <role-key> -e <env>
|
|
16
|
+
[--grants <capability,...>] [--inherits <role,...>] [--description <text>] [--default]
|
|
17
|
+
seq-studio access roles update <artifact|function|orm> <resource-id> <role-key> -e <env>
|
|
18
|
+
[--grants <capability,...>] [--inherits <role,...>] [--description <text>] [--default | --no-default]
|
|
19
|
+
seq-studio access roles delete <artifact|function|orm> <resource-id> <role-key> -e <env>
|
|
20
|
+
|
|
21
|
+
Roles bundle the capabilities a resource declares in its source; create and edit
|
|
22
|
+
them here, then assign them with seq-studio access grant ... --key <role-key>.
|
|
23
|
+
--grants and --inherits replace the role's whole list on update.
|
|
24
|
+
Editing roles requires capability-admin authority on the resource.
|
|
25
|
+
`;
|
|
26
|
+
const VERBS = new Set(['list', 'create', 'update', 'delete']);
|
|
27
|
+
const HOST_TYPES = new Set(['artifact', 'function', 'orm']);
|
|
28
|
+
function keyList(value) {
|
|
29
|
+
if (typeof value !== 'string')
|
|
30
|
+
return undefined;
|
|
31
|
+
return value.split(',').map((key) => key.trim()).filter(Boolean);
|
|
32
|
+
}
|
|
33
|
+
/** The role fields passed as flags; omitted flags leave the field unchanged on update. */
|
|
34
|
+
function roleFields(args) {
|
|
35
|
+
if (args.flags.default === true && args.flags['no-default'] === true)
|
|
36
|
+
throw new Error('Choose one of --default or --no-default.');
|
|
37
|
+
const grants = keyList(args.flags.grants);
|
|
38
|
+
const inherits = keyList(args.flags.inherits);
|
|
39
|
+
const description = typeof args.flags.description === 'string' ? args.flags.description : undefined;
|
|
40
|
+
const isDefault = args.flags.default === true ? true : args.flags['no-default'] === true ? false : undefined;
|
|
41
|
+
return {
|
|
42
|
+
...(grants ? { grants } : {}),
|
|
43
|
+
...(inherits ? { inherits } : {}),
|
|
44
|
+
...(description !== undefined ? { description } : {}),
|
|
45
|
+
...(isDefault !== undefined ? { isDefault } : {}),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/** The request one `access roles` invocation makes. */
|
|
49
|
+
export function rolesRequest(args) {
|
|
50
|
+
const [verb, hostType, hostId, key] = args.positional;
|
|
51
|
+
if (!verb || !VERBS.has(verb))
|
|
52
|
+
throw new Error('Usage: seq-studio access roles <list|create|update|delete> ... See: seq-studio access roles --help');
|
|
53
|
+
const editing = verb === 'create' || verb === 'update';
|
|
54
|
+
validateCommandInput({
|
|
55
|
+
args,
|
|
56
|
+
flags: editing
|
|
57
|
+
? { grants: 'string', inherits: 'string', description: 'string', default: 'boolean', ...(verb === 'update' ? { 'no-default': 'boolean' } : {}) }
|
|
58
|
+
: {},
|
|
59
|
+
positional: verb === 'list' ? 3 : 4,
|
|
60
|
+
});
|
|
61
|
+
if (!hostType || !HOST_TYPES.has(hostType))
|
|
62
|
+
throw new Error('Resource type must be artifact, function, or orm.');
|
|
63
|
+
if (!hostId?.trim())
|
|
64
|
+
throw new Error('A resource ID is required.');
|
|
65
|
+
const roles = `/api/custom-roles/registry/${encodeURIComponent(`${hostType}_${hostId}`)}/roles`;
|
|
66
|
+
if (verb === 'list')
|
|
67
|
+
return { method: 'GET', path: roles };
|
|
68
|
+
if (!key || !/^[a-z0-9-]{1,64}$/.test(key))
|
|
69
|
+
throw new Error('A role key is 1–64 lowercase letters, digits, and hyphens.');
|
|
70
|
+
const path = `${roles}/${encodeURIComponent(key)}`;
|
|
71
|
+
if (verb === 'delete')
|
|
72
|
+
return { method: 'DELETE', path };
|
|
73
|
+
const body = roleFields(args);
|
|
74
|
+
if (verb === 'create')
|
|
75
|
+
return { method: 'POST', path: roles, body: { key, ...body } };
|
|
76
|
+
if (Object.keys(body).length === 0)
|
|
77
|
+
throw new Error('Pass at least one of --grants, --inherits, --description, --default, or --no-default.');
|
|
78
|
+
return { method: 'PATCH', path, body };
|
|
79
|
+
}
|
|
80
|
+
export async function runAccessRolesCommand(args) {
|
|
81
|
+
const { method, path, body } = rolesRequest(args);
|
|
82
|
+
const request = { ...clientOptions(await buildContext(args)), path };
|
|
83
|
+
const result = method === 'GET' ? await getJson(request)
|
|
84
|
+
: method === 'POST' ? await postJson({ ...request, body })
|
|
85
|
+
: method === 'PATCH' ? await patchJson({ ...request, body })
|
|
86
|
+
: await deleteJson(request);
|
|
87
|
+
console.log(JSON.stringify(result, null, 2));
|
|
88
|
+
return 0;
|
|
89
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type AccessHost } from './host-contract.js';
|
|
2
|
+
export declare function permissionsHost({ name, resourceType, summary, keys, floor, routeId }: {
|
|
3
|
+
name: string;
|
|
4
|
+
resourceType: string;
|
|
5
|
+
summary: string;
|
|
6
|
+
keys: readonly string[];
|
|
7
|
+
floor?: string;
|
|
8
|
+
routeId?: (id: string) => string;
|
|
9
|
+
}): AccessHost;
|
|
10
|
+
export declare const secretHost: AccessHost;
|
|
11
|
+
export declare function gitHost(kind: 'repo' | 'namespace'): AccessHost;
|
|
12
|
+
export declare const workspaceHost: AccessHost;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/** Hosts with fixed tiers, where a principal holds one tier per resource. */
|
|
2
|
+
import { resolveRepo } from '@sequenceholdings/artifact-studio/git-service-client';
|
|
3
|
+
import { getJson, putJson, sendJsonOrNoContent } from '../atlas-client.js';
|
|
4
|
+
import { heldTierConflict, requireTier, selectedTier, staticDefinitions, unsupportedPrincipal, } from './host-contract.js';
|
|
5
|
+
import { serviceAccountSubject } from './principal.js';
|
|
6
|
+
function permissionsSubject(principal) {
|
|
7
|
+
if (principal.kind === 'group')
|
|
8
|
+
return { type: 'group', id: principal.id, fga: `group:${principal.id}#member` };
|
|
9
|
+
const id = principal.kind === 'service-account' ? serviceAccountSubject(principal.id) : principal.id;
|
|
10
|
+
return { type: principal.kind === 'service-account' ? 'service_account' : 'user', id, fga: `user:${id}` };
|
|
11
|
+
}
|
|
12
|
+
export function permissionsHost({ name, resourceType, summary, keys, floor, routeId }) {
|
|
13
|
+
const path = (id) => `/api/authz/permissions/${resourceType}/${encodeURIComponent(routeId ? routeId(id) : id)}`;
|
|
14
|
+
const read = (call) => getJson({ ...call.request, path: path(call.id) });
|
|
15
|
+
const host = {
|
|
16
|
+
name,
|
|
17
|
+
summary,
|
|
18
|
+
floor,
|
|
19
|
+
keys,
|
|
20
|
+
singleTier: true,
|
|
21
|
+
principals: ['user', 'group', 'service-account'],
|
|
22
|
+
definitions: async () => staticDefinitions(host),
|
|
23
|
+
list: async (call) => {
|
|
24
|
+
const tier = selectedTier(host, call.selection);
|
|
25
|
+
const current = await read(call);
|
|
26
|
+
if (!tier)
|
|
27
|
+
return current;
|
|
28
|
+
const holders = new Set((current.directGrants?.tuples ?? []).filter((tuple) => tuple.relation === tier).map((tuple) => tuple.subject));
|
|
29
|
+
return {
|
|
30
|
+
...current,
|
|
31
|
+
principals: (current.principals ?? []).filter((principal) => holders.has(principal.type === 'group' ? `group:${principal.id}#member` : `user:${principal.id}`)),
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
grant: async (call) => {
|
|
35
|
+
const tier = requireTier(host, call.change);
|
|
36
|
+
if (!host.principals.includes(call.change.principal.kind))
|
|
37
|
+
throw unsupportedPrincipal(host, call.change.principal.kind);
|
|
38
|
+
const subject = permissionsSubject(call.change.principal);
|
|
39
|
+
const current = await read(call);
|
|
40
|
+
const held = heldTiers({ current, subject: subject.fga, keys });
|
|
41
|
+
if (held.includes(tier) && held.length === 1)
|
|
42
|
+
return { ok: true, unchanged: true };
|
|
43
|
+
const others = held.filter((role) => role !== tier);
|
|
44
|
+
if (others.length > 0 && !call.change.replace)
|
|
45
|
+
throw heldTierConflict({ host, current: others.join(', '), tier });
|
|
46
|
+
const principal = { type: subject.type, id: subject.id, role: tier };
|
|
47
|
+
return putJson({
|
|
48
|
+
...call.request,
|
|
49
|
+
path: path(call.id),
|
|
50
|
+
// Echo the public set so older servers (which default it to []) never
|
|
51
|
+
// unpublish the resource as a side effect of a named grant.
|
|
52
|
+
body: { ...(held.length > 0 ? { updated: [principal] } : { added: [principal] }), publicRelations: current.publicRelations ?? [] },
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
revoke: async (call) => {
|
|
56
|
+
const tier = requireTier(host, call.change);
|
|
57
|
+
const subject = permissionsSubject(call.change.principal);
|
|
58
|
+
const current = await read(call);
|
|
59
|
+
const held = heldTiers({ current, subject: subject.fga, keys });
|
|
60
|
+
if (!held.includes(tier))
|
|
61
|
+
throw new Error(`This principal holds no direct ${tier} grant on this ${name}${held.length ? ` (it holds ${held.join(', ')})` : ''}.`);
|
|
62
|
+
const remaining = held.filter((role) => role !== tier);
|
|
63
|
+
if (remaining.length > 1) {
|
|
64
|
+
throw new Error(`This principal holds ${held.join(', ')}; revoke would need to keep several tiers. Change it in the Permissions page.`);
|
|
65
|
+
}
|
|
66
|
+
const body = remaining.length === 1
|
|
67
|
+
? { updated: [{ type: subject.type, id: subject.id, role: remaining[0] }] }
|
|
68
|
+
: { removed: [{ type: subject.type, id: subject.id }] };
|
|
69
|
+
return putJson({ ...call.request, path: path(call.id), body: { ...body, publicRelations: current.publicRelations ?? [] } });
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
return host;
|
|
73
|
+
}
|
|
74
|
+
function heldTiers({ current, subject, keys }) {
|
|
75
|
+
return [...new Set((current.directGrants?.tuples ?? [])
|
|
76
|
+
.filter((tuple) => tuple.subject === subject && keys.includes(tuple.relation))
|
|
77
|
+
.map((tuple) => tuple.relation))];
|
|
78
|
+
}
|
|
79
|
+
function principalRowsHost({ name, summary, keys, floor, basePath, toAccess, fromAccess, rowsKey }) {
|
|
80
|
+
const readRows = (body) => (body[rowsKey] ?? []);
|
|
81
|
+
const target = (principal) => {
|
|
82
|
+
if (principal.kind === 'organization')
|
|
83
|
+
throw unsupportedPrincipal(host, principal.kind);
|
|
84
|
+
return principal.kind === 'group'
|
|
85
|
+
? { principalType: 'role', principalId: principal.id }
|
|
86
|
+
: { principalType: 'user', principalId: principal.kind === 'service-account' ? serviceAccountSubject(principal.id) : principal.id };
|
|
87
|
+
};
|
|
88
|
+
const currentTier = async (call, principal) => {
|
|
89
|
+
const rows = readRows(await getJson({ ...call.request, path: await basePath(call) }));
|
|
90
|
+
const row = rows.find((entry) => entry.principalType === principal.principalType && entry.principalId === principal.principalId);
|
|
91
|
+
return row ? fromAccess(row.access) : undefined;
|
|
92
|
+
};
|
|
93
|
+
const host = {
|
|
94
|
+
name,
|
|
95
|
+
summary,
|
|
96
|
+
floor,
|
|
97
|
+
keys,
|
|
98
|
+
singleTier: true,
|
|
99
|
+
principals: ['user', 'group', 'service-account'],
|
|
100
|
+
definitions: async () => staticDefinitions(host),
|
|
101
|
+
list: async (call) => {
|
|
102
|
+
const tier = selectedTier(host, call.selection);
|
|
103
|
+
const body = await getJson({ ...call.request, path: await basePath(call) });
|
|
104
|
+
if (!tier)
|
|
105
|
+
return body;
|
|
106
|
+
return { ...body, [rowsKey]: readRows(body).filter((row) => fromAccess(row.access) === tier) };
|
|
107
|
+
},
|
|
108
|
+
grant: async (call) => {
|
|
109
|
+
const tier = requireTier(host, call.change);
|
|
110
|
+
const principal = target(call.change.principal);
|
|
111
|
+
const current = await currentTier(call, principal);
|
|
112
|
+
if (current === tier)
|
|
113
|
+
return { ok: true, unchanged: true };
|
|
114
|
+
if (current && !call.change.replace)
|
|
115
|
+
throw heldTierConflict({ host, current, tier });
|
|
116
|
+
const result = await sendJsonOrNoContent({ ...call.request, method: 'POST', path: await basePath(call), body: { ...principal, access: toAccess(tier) } });
|
|
117
|
+
return result ?? { ok: true };
|
|
118
|
+
},
|
|
119
|
+
revoke: async (call) => {
|
|
120
|
+
const tier = requireTier(host, call.change);
|
|
121
|
+
const principal = target(call.change.principal);
|
|
122
|
+
const current = await currentTier(call, principal);
|
|
123
|
+
if (current !== tier)
|
|
124
|
+
throw new Error(`This principal holds no direct ${tier} grant on this ${name}${current ? ` (it holds ${current})` : ''}.`);
|
|
125
|
+
const result = await sendJsonOrNoContent({ ...call.request, method: 'DELETE', path: await basePath(call), body: principal });
|
|
126
|
+
return result ?? { ok: true };
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
return host;
|
|
130
|
+
}
|
|
131
|
+
const identity = (value) => value;
|
|
132
|
+
export const secretHost = principalRowsHost({
|
|
133
|
+
name: 'secret',
|
|
134
|
+
summary: 'Managed secret (id from seq-studio secrets list); user = runtime read via attachment',
|
|
135
|
+
keys: ['user', 'editor', 'admin'],
|
|
136
|
+
floor: 'user',
|
|
137
|
+
basePath: async ({ id }) => `/api/managed-secrets/${encodeURIComponent(id)}/principals`,
|
|
138
|
+
toAccess: identity,
|
|
139
|
+
fromAccess: identity,
|
|
140
|
+
rowsKey: 'principals',
|
|
141
|
+
});
|
|
142
|
+
const GIT_TIER_TO_ACCESS = { reader: 'read', writer: 'write', merger: 'merge', admin: 'admin' };
|
|
143
|
+
const GIT_ACCESS_TO_TIER = Object.fromEntries(Object.entries(GIT_TIER_TO_ACCESS).map(([tier, access]) => [access, tier]));
|
|
144
|
+
async function repoId(call) {
|
|
145
|
+
const parts = call.id.split('/');
|
|
146
|
+
if (parts.length === 1)
|
|
147
|
+
return call.id;
|
|
148
|
+
if (parts.length !== 2 || !parts[0] || !parts[1])
|
|
149
|
+
throw new Error('Repos are <namespace>/<name> or a repo id.');
|
|
150
|
+
const resolved = await resolveRepo({ ...call.request, namespace: parts[0], name: parts[1] });
|
|
151
|
+
return resolved.id;
|
|
152
|
+
}
|
|
153
|
+
export function gitHost(kind) {
|
|
154
|
+
return principalRowsHost({
|
|
155
|
+
name: kind,
|
|
156
|
+
summary: kind === 'repo' ? 'Git-service repository (<namespace>/<name> or id)' : 'Git-service namespace (slug); tiers cascade to its repos',
|
|
157
|
+
keys: ['reader', 'writer', 'merger', 'admin'],
|
|
158
|
+
basePath: async (call) => kind === 'repo'
|
|
159
|
+
? `/api/git-service/repos/${encodeURIComponent(await repoId(call))}/principals`
|
|
160
|
+
: `/api/git-service/namespaces/${encodeURIComponent(call.id)}/principals`,
|
|
161
|
+
toAccess: (tier) => GIT_TIER_TO_ACCESS[tier] ?? tier,
|
|
162
|
+
fromAccess: (access) => GIT_ACCESS_TO_TIER[access] ?? access,
|
|
163
|
+
rowsKey: 'items',
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function storagePrincipal(principal) {
|
|
167
|
+
return { type: principal.kind === 'service-account' ? 'service_account' : principal.kind, id: principal.id };
|
|
168
|
+
}
|
|
169
|
+
export const workspaceHost = {
|
|
170
|
+
name: 'workspace',
|
|
171
|
+
summary: 'Workspaces V2 storage workspace (use seq-studio storage access for folders/files)',
|
|
172
|
+
keys: ['viewer', 'editor', 'admin'],
|
|
173
|
+
singleTier: true,
|
|
174
|
+
principals: ['user', 'group', 'organization', 'service-account'],
|
|
175
|
+
definitions: async () => staticDefinitions(workspaceHost),
|
|
176
|
+
list: async (call) => {
|
|
177
|
+
const tier = selectedTier(workspaceHost, call.selection);
|
|
178
|
+
const access = await getJson({ ...call.request, path: storagePath(call) });
|
|
179
|
+
return tier ? { ...access, grants: access.grants.filter((grant) => grant.role === tier) } : access;
|
|
180
|
+
},
|
|
181
|
+
grant: async (call) => {
|
|
182
|
+
const tier = requireTier(workspaceHost, call.change);
|
|
183
|
+
const principal = storagePrincipal(call.change.principal);
|
|
184
|
+
const access = await getJson({ ...call.request, path: storagePath(call) });
|
|
185
|
+
const existing = access.grants.find((grant) => grant.type === principal.type && grant.id === principal.id);
|
|
186
|
+
if (existing?.role === tier)
|
|
187
|
+
return { ok: true, unchanged: true };
|
|
188
|
+
if (existing && !call.change.replace)
|
|
189
|
+
throw heldTierConflict({ host: workspaceHost, current: existing.role, tier });
|
|
190
|
+
const grants = [...access.grants.filter((grant) => grant !== existing), { ...principal, role: tier }];
|
|
191
|
+
return putJson({ ...call.request, path: storagePath(call), body: { expectedRevision: access.revision, restricted: access.restricted, grants } });
|
|
192
|
+
},
|
|
193
|
+
revoke: async (call) => {
|
|
194
|
+
const tier = requireTier(workspaceHost, call.change);
|
|
195
|
+
const principal = storagePrincipal(call.change.principal);
|
|
196
|
+
const access = await getJson({ ...call.request, path: storagePath(call) });
|
|
197
|
+
const existing = access.grants.find((grant) => grant.type === principal.type && grant.id === principal.id);
|
|
198
|
+
if (existing?.role !== tier)
|
|
199
|
+
throw new Error(`This principal holds no direct ${tier} grant on this workspace${existing ? ` (it holds ${existing.role})` : ''}.`);
|
|
200
|
+
const grants = access.grants.filter((grant) => grant !== existing);
|
|
201
|
+
return putJson({ ...call.request, path: storagePath(call), body: { expectedRevision: access.revision, restricted: access.restricted, grants } });
|
|
202
|
+
},
|
|
203
|
+
};
|
|
204
|
+
function storagePath({ id }) {
|
|
205
|
+
return `/api/storage/workspaces/${encodeURIComponent(id)}/access`;
|
|
206
|
+
}
|
|
@@ -20,5 +20,5 @@ export declare function agentsApplyCommand(args: ParsedArgs, { mode }?: {
|
|
|
20
20
|
}): Promise<number>;
|
|
21
21
|
export declare function agentsListCommand(args: ParsedArgs): Promise<number>;
|
|
22
22
|
export declare function agentsShowCommand(args: ParsedArgs): Promise<number>;
|
|
23
|
-
export declare const AGENTS_USAGE = "usage:\n seq-studio agents init <dir>
|
|
23
|
+
export declare const AGENTS_USAGE = "usage:\n seq-studio agents init <dir> [--repo <ns>/<name>] scaffold a typed agent (--repo: into a git-service repo)\n seq-studio agents validate [--dir d] [--target app] [--only ids] offline compile + validation\n seq-studio agents bundle --out <file> [--dir d] [--target app] [--only ids] offline deploy body { definitions, bundleHash }\n seq-studio agents plan [--dir d] [-e <env>] [--only ids] [--managed] [--check-execution] offline bundle plan or live diff\n seq-studio agents apply [--dir d] -e <env> [--only ids] [--yes] [--managed] [--check-execution] apply creates/updates; never deletes\n seq-studio agents list -e <env> list visible agents\n seq-studio agents show <id> -e <env> show one agent\n seq-studio agents voice help internal Voice authoring/publication\n\n plan and apply deploy configuration only, as you: a new agent needs Can\n create on Agent Builder, an existing one needs editor, and access stays\n whatever Agent Builder or the API set. --managed is Sequence's code-managed\n path, where the definition also owns access; it is limited to Sequence staff.\n\n --check-execution requires -e, CONFIG mode and at most 20 existing agents in\n one whole bundle. It checks proposed pinned-execution eligibility before\n apply writes; it is point-in-time and grants no access or future identity.\n Unknown checked routes or missing acknowledgement fail without fallback.\n\n Source: local --dir (default .), --repo agents/<name>, or --git-url <url>.\n Use --ref for remote sources. --target selects the deployment APP_ENV when it\n differs from the CLI environment alias (notably OpCo registrations). --only\n accepts a comma-separated list of agent IDs after environment selection.\n\n Init into a repo: --repo <ns>/<name> on an init command creates that platform\n git-service repo if missing (same name rules as repos create), then clones it\n into <dir> and scaffolds there, or, when <dir> is inside a Git checkout, sets\n it as that checkout's origin (a different existing origin is refused). It\n needs -e <env>, or an agent sandbox. Nothing is committed or pushed; the\n command prints the git add, commit, and push to run.\n";
|
|
24
24
|
export declare function runAgentsCommand(sub: string | undefined, args: ParsedArgs): Promise<number>;
|
package/dist/agents/commands.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getJson, postJson } from '../atlas-client.js';
|
|
2
2
|
import { readConfig } from '../config.js';
|
|
3
|
+
import { INIT_INTO_REPO_HELP } from '../command-help.js';
|
|
3
4
|
import { wantsHelp } from '../command-input.js';
|
|
4
5
|
import { applyInChunks } from './apply-chunks.js';
|
|
5
6
|
import { confirmYes } from '../prompt.js';
|
|
@@ -13,6 +14,36 @@ const DEPLOY_ROUTES = {
|
|
|
13
14
|
managed: { plan: '/api/agents/deploy/plan', apply: '/api/agents/deploy/apply' },
|
|
14
15
|
config: { plan: '/api/agents/deploy/config/plan', apply: '/api/agents/deploy/config/apply' },
|
|
15
16
|
};
|
|
17
|
+
const CHECKED_CONFIG_ROUTES = {
|
|
18
|
+
plan: '/api/agents/deploy/config/execution/plan', apply: '/api/agents/deploy/config/execution/apply',
|
|
19
|
+
};
|
|
20
|
+
function executionCheckRequested({ args, mode }) {
|
|
21
|
+
if (!Object.prototype.hasOwnProperty.call(args.flags, 'check-execution'))
|
|
22
|
+
return false;
|
|
23
|
+
const values = [...(args.repeatedFlags?.['check-execution'] ?? []), args.flags['check-execution']];
|
|
24
|
+
if (values.some(value => value !== true && value !== 'true')) {
|
|
25
|
+
throw new Error('Use the bare --check-execution flag (or --check-execution=true); other values cannot select unchecked deployment');
|
|
26
|
+
}
|
|
27
|
+
if (mode !== 'config' || requestedDeployMode(args) !== 'config')
|
|
28
|
+
throw new Error('--check-execution supports CONFIG deployment only; remove --managed');
|
|
29
|
+
if (!requestedEnvironment(args))
|
|
30
|
+
throw new Error('--check-execution requires an explicit environment (-e <env>)');
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function requireCheckedBundleBudget({ count }) {
|
|
34
|
+
if (count > 20)
|
|
35
|
+
throw new Error('--check-execution accepts at most 20 agents in one whole bundle; select a smaller bundle');
|
|
36
|
+
}
|
|
37
|
+
/** A response cannot silently downgrade a checked operation on an older/mixed backend. */
|
|
38
|
+
function requireExecutionReadiness({ response, ids }) {
|
|
39
|
+
const ack = response && typeof response === 'object' ? Reflect.get(response, 'executionReadiness') : undefined;
|
|
40
|
+
const checked = ack && typeof ack === 'object' ? Reflect.get(ack, 'checked') : undefined;
|
|
41
|
+
const returnedIds = ack && typeof ack === 'object' ? Reflect.get(ack, 'agentIds') : undefined;
|
|
42
|
+
if (checked !== true || !Array.isArray(returnedIds) || returnedIds.some(id => typeof id !== 'string')
|
|
43
|
+
|| JSON.stringify([...returnedIds].sort()) !== JSON.stringify([...ids].sort())) {
|
|
44
|
+
throw new Error('Backend did not acknowledge execution readiness for the complete selected bundle; no unchecked fallback is allowed');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
16
47
|
/** Config deploys by default; `--managed` selects Sequence's code-managed path. */
|
|
17
48
|
function requestedDeployMode(args) {
|
|
18
49
|
return flagBool(args.flags, 'managed') ? 'managed' : 'config';
|
|
@@ -70,11 +101,12 @@ function printPlan(plan) {
|
|
|
70
101
|
const fields = entry.changedFields?.length
|
|
71
102
|
? `: ${entry.changedFields.join(', ')}`
|
|
72
103
|
: '';
|
|
73
|
-
console.log(` ${marker} ${entry.name} (${entry.id}) ${entry.action}${fields}`);
|
|
104
|
+
console.log(` ${marker} ${entry.name ?? entry.id} (${entry.id}) ${entry.action}${fields}`);
|
|
74
105
|
}
|
|
75
106
|
console.log(`${LOG} plan: ${plan.summary.creates} create, ${plan.summary.updates} update, ${plan.summary.unchanged} unchanged`);
|
|
76
107
|
}
|
|
77
108
|
export async function agentsPlanCommand(args) {
|
|
109
|
+
const checkExecution = executionCheckRequested({ args, mode: requestedDeployMode(args) });
|
|
78
110
|
const environment = requestedEnvironment(args);
|
|
79
111
|
if (!environment) {
|
|
80
112
|
const { source } = await materialize({ args, requireEnvironment: false });
|
|
@@ -105,16 +137,22 @@ export async function agentsPlanCommand(args) {
|
|
|
105
137
|
throw new Error('Missing deployment context');
|
|
106
138
|
try {
|
|
107
139
|
const bundle = await deploymentBundle({ args, source, context });
|
|
140
|
+
if (checkExecution)
|
|
141
|
+
requireCheckedBundleBudget({ count: bundle.definitions.length });
|
|
108
142
|
const plan = await postJson({
|
|
109
143
|
...clientOptions(context),
|
|
110
|
-
path: DEPLOY_ROUTES[requestedDeployMode(args)].plan,
|
|
144
|
+
path: (checkExecution ? CHECKED_CONFIG_ROUTES : DEPLOY_ROUTES[requestedDeployMode(args)]).plan,
|
|
111
145
|
body: {
|
|
112
146
|
definitions: bundle.definitions,
|
|
113
147
|
bundleHash: bundle.hash,
|
|
114
148
|
source: source.provenance.gitCommit ?? 'local',
|
|
115
149
|
},
|
|
116
150
|
});
|
|
151
|
+
if (checkExecution)
|
|
152
|
+
requireExecutionReadiness({ response: plan, ids: bundle.definitions.map(({ id }) => id) });
|
|
117
153
|
printPlan(plan);
|
|
154
|
+
if (checkExecution)
|
|
155
|
+
console.log(`${LOG} execution readiness checked for this proposed configuration at this time; admission still rechecks source and access`);
|
|
118
156
|
return 0;
|
|
119
157
|
}
|
|
120
158
|
finally {
|
|
@@ -122,7 +160,8 @@ export async function agentsPlanCommand(args) {
|
|
|
122
160
|
}
|
|
123
161
|
}
|
|
124
162
|
export async function agentsApplyCommand(args, { mode = requestedDeployMode(args) } = {}) {
|
|
125
|
-
const
|
|
163
|
+
const checkExecution = executionCheckRequested({ args, mode });
|
|
164
|
+
const routes = checkExecution ? CHECKED_CONFIG_ROUTES : DEPLOY_ROUTES[mode];
|
|
126
165
|
const { source, context } = await materialize({
|
|
127
166
|
args,
|
|
128
167
|
requireEnvironment: true,
|
|
@@ -131,6 +170,8 @@ export async function agentsApplyCommand(args, { mode = requestedDeployMode(args
|
|
|
131
170
|
throw new Error('Missing deployment context');
|
|
132
171
|
try {
|
|
133
172
|
const bundle = await deploymentBundle({ args, source, context });
|
|
173
|
+
if (checkExecution)
|
|
174
|
+
requireCheckedBundleBudget({ count: bundle.definitions.length });
|
|
134
175
|
const plan = await postJson({
|
|
135
176
|
...clientOptions(context),
|
|
136
177
|
path: routes.plan,
|
|
@@ -140,6 +181,8 @@ export async function agentsApplyCommand(args, { mode = requestedDeployMode(args
|
|
|
140
181
|
source: source.provenance.gitCommit ?? 'local',
|
|
141
182
|
},
|
|
142
183
|
});
|
|
184
|
+
if (checkExecution)
|
|
185
|
+
requireExecutionReadiness({ response: plan, ids: bundle.definitions.map(({ id }) => id) });
|
|
143
186
|
printPlan(plan);
|
|
144
187
|
const preview = [
|
|
145
188
|
`${LOG} apply ${bundle.definitions.length} agent definitions to ${context.env.name}`,
|
|
@@ -150,15 +193,26 @@ export async function agentsApplyCommand(args, { mode = requestedDeployMode(args
|
|
|
150
193
|
if (!(await confirmYes({ preview, confirmed: flagBool(args.flags, 'yes') }))) {
|
|
151
194
|
return 1;
|
|
152
195
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
196
|
+
let summary;
|
|
197
|
+
if (checkExecution) {
|
|
198
|
+
// Dedicated checked apply repeats readiness before writes; never split or use the ordinary endpoint.
|
|
199
|
+
const result = await postJson({
|
|
200
|
+
...clientOptions(context), path: routes.apply,
|
|
201
|
+
body: { definitions: bundle.definitions, bundleHash: bundle.hash, source: source.provenance.gitCommit ?? 'local' },
|
|
202
|
+
});
|
|
203
|
+
requireExecutionReadiness({ response: result, ids: bundle.definitions.map(({ id }) => id) });
|
|
204
|
+
summary = result.summary;
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
summary = await applyInChunks({
|
|
208
|
+
context,
|
|
209
|
+
definitions: bundle.definitions,
|
|
210
|
+
source: source.provenance.gitCommit ?? 'local',
|
|
211
|
+
path: routes.apply,
|
|
212
|
+
// A normal CONFIG deploy retains its existing whole-bundle behavior.
|
|
213
|
+
...(mode === 'config' ? { chunkSize: Math.max(bundle.definitions.length, 1) } : {}),
|
|
214
|
+
});
|
|
215
|
+
}
|
|
162
216
|
console.log(`${LOG} applied: ${summary.created} created, ${summary.updated} updated, ${summary.unchanged} unchanged`);
|
|
163
217
|
return 0;
|
|
164
218
|
}
|
|
@@ -192,11 +246,11 @@ export async function agentsShowCommand(args) {
|
|
|
192
246
|
return 0;
|
|
193
247
|
}
|
|
194
248
|
export const AGENTS_USAGE = `usage:
|
|
195
|
-
seq-studio agents init <dir>
|
|
249
|
+
seq-studio agents init <dir> [--repo <ns>/<name>] scaffold a typed agent (--repo: into a git-service repo)
|
|
196
250
|
seq-studio agents validate [--dir d] [--target app] [--only ids] offline compile + validation
|
|
197
251
|
seq-studio agents bundle --out <file> [--dir d] [--target app] [--only ids] offline deploy body { definitions, bundleHash }
|
|
198
|
-
seq-studio agents plan [--dir d] [-e <env>] [--only ids] [--managed]
|
|
199
|
-
seq-studio agents apply [--dir d] -e <env> [--only ids] [--yes] [--managed] apply creates/updates; never deletes
|
|
252
|
+
seq-studio agents plan [--dir d] [-e <env>] [--only ids] [--managed] [--check-execution] offline bundle plan or live diff
|
|
253
|
+
seq-studio agents apply [--dir d] -e <env> [--only ids] [--yes] [--managed] [--check-execution] apply creates/updates; never deletes
|
|
200
254
|
seq-studio agents list -e <env> list visible agents
|
|
201
255
|
seq-studio agents show <id> -e <env> show one agent
|
|
202
256
|
seq-studio agents voice help internal Voice authoring/publication
|
|
@@ -206,11 +260,17 @@ export const AGENTS_USAGE = `usage:
|
|
|
206
260
|
whatever Agent Builder or the API set. --managed is Sequence's code-managed
|
|
207
261
|
path, where the definition also owns access; it is limited to Sequence staff.
|
|
208
262
|
|
|
263
|
+
--check-execution requires -e, CONFIG mode and at most 20 existing agents in
|
|
264
|
+
one whole bundle. It checks proposed pinned-execution eligibility before
|
|
265
|
+
apply writes; it is point-in-time and grants no access or future identity.
|
|
266
|
+
Unknown checked routes or missing acknowledgement fail without fallback.
|
|
267
|
+
|
|
209
268
|
Source: local --dir (default .), --repo agents/<name>, or --git-url <url>.
|
|
210
269
|
Use --ref for remote sources. --target selects the deployment APP_ENV when it
|
|
211
270
|
differs from the CLI environment alias (notably OpCo registrations). --only
|
|
212
271
|
accepts a comma-separated list of agent IDs after environment selection.
|
|
213
|
-
|
|
272
|
+
|
|
273
|
+
${INIT_INTO_REPO_HELP}`;
|
|
214
274
|
export async function runAgentsCommand(sub, args) {
|
|
215
275
|
try {
|
|
216
276
|
// `agents <sub> --help` prints help instead of running the subcommand.
|
package/dist/agents/scaffold.js
CHANGED
|
@@ -2,6 +2,7 @@ import { randomBytes } from 'node:crypto';
|
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
4
4
|
import { basename, join, resolve } from 'node:path';
|
|
5
|
+
import { RECOMMENDED_AGENT_MODEL } from '@sequenceholdings/agent-spec';
|
|
5
6
|
import { currentVersion } from '../update-check.js';
|
|
6
7
|
import { FIRST_PARTY_RELEASE_AGE_EXCLUDE } from '../release-age.js';
|
|
7
8
|
import { writeScaffoldGuidance } from '../scaffold-guidance.js';
|
|
@@ -12,8 +13,8 @@ export const agent = defineAgent({
|
|
|
12
13
|
id: '${id}',
|
|
13
14
|
name: '${name}',
|
|
14
15
|
model: {
|
|
15
|
-
provider: '
|
|
16
|
-
name: '
|
|
16
|
+
provider: '${RECOMMENDED_AGENT_MODEL.provider}',
|
|
17
|
+
name: '${RECOMMENDED_AGENT_MODEL.name}',
|
|
17
18
|
},
|
|
18
19
|
systemPrompt: 'Describe the agent role and operating instructions.',
|
|
19
20
|
})
|
|
@@ -21,9 +22,13 @@ export const agent = defineAgent({
|
|
|
21
22
|
export async function agentsInitCommand(args) {
|
|
22
23
|
const target = args.positional[0];
|
|
23
24
|
if (!target) {
|
|
24
|
-
console.error('usage: seq-studio agents init <dir>');
|
|
25
|
+
console.error('usage: seq-studio agents init <dir> [--repo <ns>/<name> -e <env>]');
|
|
25
26
|
return 1;
|
|
26
27
|
}
|
|
28
|
+
if (args.flags.repo !== undefined) {
|
|
29
|
+
const { runInitWithRepo, withoutRepoFlag } = await import('../repos/init-repo.js');
|
|
30
|
+
return runInitWithRepo({ args, target, scaffold: () => agentsInitCommand(withoutRepoFlag(args)) });
|
|
31
|
+
}
|
|
27
32
|
const directory = resolve(target);
|
|
28
33
|
const file = join(directory, 'agent.ts');
|
|
29
34
|
if (existsSync(file)) {
|
package/dist/app/commands.js
CHANGED
|
@@ -43,12 +43,17 @@ export const APP_INIT_USAGE = `usage:
|
|
|
43
43
|
--template <t> react-vite (default) or nextjs for the artifact, or
|
|
44
44
|
<name>@<version> to start from a published app
|
|
45
45
|
template in the -e deployment
|
|
46
|
-
-e, --env <name> registered deployment whose template catalog to
|
|
46
|
+
-e, --env <name> registered deployment whose template catalog (or --repo) to use
|
|
47
47
|
--description <text> optional app.description in the manifest
|
|
48
48
|
--skip-install skip pnpm install and ORM migration authoring (offline)
|
|
49
|
+
--repo <ns>/<name> scaffold into a platform git-service repo, created if
|
|
50
|
+
missing: clone it into <dir>, or set it as origin when
|
|
51
|
+
<dir> is inside a Git checkout. Needs -e (or an agent
|
|
52
|
+
sandbox). Prints the commit and push commands.
|
|
49
53
|
|
|
50
54
|
Examples:
|
|
51
55
|
seq-studio init pokedex
|
|
56
|
+
seq-studio init pokedex --repo apps/pokedex -e staging
|
|
52
57
|
seq-studio init . --template nextjs
|
|
53
58
|
seq-studio init reports # a new app inside an existing repository
|
|
54
59
|
seq-studio init pokedex --with orm,function,artifact
|
|
@@ -208,7 +213,30 @@ function printError(error) {
|
|
|
208
213
|
const message = error instanceof Error ? error.message : String(error);
|
|
209
214
|
console.error(`${LOG} ${message}`);
|
|
210
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* A published-template request (`--template <name>@<version>`), validated so
|
|
218
|
+
* a bad combination fails before `--repo` creates anything; null for the
|
|
219
|
+
* artifact templates (react-vite, nextjs) and the plain scaffold.
|
|
220
|
+
*/
|
|
221
|
+
function publishedTemplateRequest({ flags, kinds }) {
|
|
222
|
+
const { template } = flags;
|
|
223
|
+
if (template === undefined || template === 'react-vite' || template === 'nextjs')
|
|
224
|
+
return null;
|
|
225
|
+
if (template === true)
|
|
226
|
+
throw new Error('--template requires <name>@<version>.');
|
|
227
|
+
const requested = flags.env ?? flags.e;
|
|
228
|
+
const environment = explicitOrSandboxEnv(typeof requested === 'string' ? requested : undefined);
|
|
229
|
+
if (!environment)
|
|
230
|
+
throw new Error('--template requires -e <deployment>.');
|
|
231
|
+
if (kinds.length > 0)
|
|
232
|
+
throw new Error('Use either --template or --with/primitive flags.');
|
|
233
|
+
return { selection: template, environment };
|
|
234
|
+
}
|
|
211
235
|
export async function runAppInitCommand(args) {
|
|
236
|
+
return initApp({ args, intoCheckout: false });
|
|
237
|
+
}
|
|
238
|
+
/** `intoCheckout`: the target is the git-service checkout `--repo` just prepared. */
|
|
239
|
+
async function initApp({ args, intoCheckout }) {
|
|
212
240
|
if (args.flags.help === true || args.flags.h === true) {
|
|
213
241
|
console.log(APP_INIT_USAGE);
|
|
214
242
|
return 0;
|
|
@@ -219,27 +247,24 @@ export async function runAppInitCommand(args) {
|
|
|
219
247
|
return 1;
|
|
220
248
|
}
|
|
221
249
|
let kinds;
|
|
250
|
+
let published;
|
|
222
251
|
try {
|
|
223
252
|
kinds = resolveRequestedKinds(args.flags);
|
|
253
|
+
published = publishedTemplateRequest({ flags: args.flags, kinds });
|
|
224
254
|
}
|
|
225
255
|
catch (error) {
|
|
226
256
|
printError(error);
|
|
227
257
|
console.error(APP_INIT_USAGE);
|
|
228
258
|
return 1;
|
|
229
259
|
}
|
|
230
|
-
|
|
231
|
-
|
|
260
|
+
if (args.flags.repo !== undefined) {
|
|
261
|
+
const { runInitWithRepo, withoutRepoFlag } = await import('../repos/init-repo.js');
|
|
262
|
+
return runInitWithRepo({ args, target, scaffold: () => initApp({ args: withoutRepoFlag(args), intoCheckout: true }) });
|
|
263
|
+
}
|
|
264
|
+
if (published) {
|
|
232
265
|
try {
|
|
233
|
-
if (args.flags.template === true)
|
|
234
|
-
throw new Error('--template requires <name>@<version>.');
|
|
235
|
-
const requested = args.flags.env ?? args.flags.e;
|
|
236
|
-
const env = explicitOrSandboxEnv(typeof requested === 'string' ? requested : undefined);
|
|
237
|
-
if (!env)
|
|
238
|
-
throw new Error('--template requires -e <deployment>.');
|
|
239
|
-
if (kinds.length > 0)
|
|
240
|
-
throw new Error('Use either --template or --with/primitive flags.');
|
|
241
266
|
const { initFromTemplate } = await import('../templates/commands.js');
|
|
242
|
-
await initFromTemplate({
|
|
267
|
+
await initFromTemplate({ ...published, target, intoCheckout });
|
|
243
268
|
return 0;
|
|
244
269
|
}
|
|
245
270
|
catch (error) {
|
package/dist/app/manifest.d.ts
CHANGED
|
@@ -95,11 +95,11 @@ export declare const applicationCollaboratorsSchema: z.ZodObject<{
|
|
|
95
95
|
includes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
96
96
|
primitive: z.ZodString;
|
|
97
97
|
tier: z.ZodEnum<{
|
|
98
|
+
operator: "operator";
|
|
98
99
|
viewer: "viewer";
|
|
99
100
|
editor: "editor";
|
|
100
101
|
reader: "reader";
|
|
101
102
|
writer: "writer";
|
|
102
|
-
operator: "operator";
|
|
103
103
|
actor: "actor";
|
|
104
104
|
}>;
|
|
105
105
|
}, z.core.$strict>>>;
|
|
@@ -234,11 +234,11 @@ export declare const appManifestSchema: z.ZodObject<{
|
|
|
234
234
|
includes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
235
235
|
primitive: z.ZodString;
|
|
236
236
|
tier: z.ZodEnum<{
|
|
237
|
+
operator: "operator";
|
|
237
238
|
viewer: "viewer";
|
|
238
239
|
editor: "editor";
|
|
239
240
|
reader: "reader";
|
|
240
241
|
writer: "writer";
|
|
241
|
-
operator: "operator";
|
|
242
242
|
actor: "actor";
|
|
243
243
|
}>;
|
|
244
244
|
}, z.core.$strict>>>;
|