@agentsky/sky 3.42.0 → 3.43.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/dist/{chunk-ALJRHTMX.js → chunk-44XF4EGE.js} +2 -108
- package/dist/chunk-4A4PDUT5.js +8 -0
- package/dist/{trace-ZZLFGVWA.js → chunk-4MVM65ET.js} +23 -21
- package/dist/chunk-AB7SUDX4.js +413 -0
- package/dist/{chunk-YY2ZSZDH.js → chunk-BIZJ4VZL.js} +8 -10
- package/dist/chunk-J3KIEZXM.js +761 -0
- package/dist/chunk-OKNWK75U.js +745 -0
- package/dist/chunk-UJ7IXSJX.js +404 -0
- package/dist/index.js +2732 -2717
- package/dist/local-skills-AVLHV36B.js +27 -0
- package/dist/local-skills-run-UJK4ZO4P.js +49 -0
- package/dist/trace-H3FVIFE3.js +54 -0
- package/dist/trace-exclusions-MYECULMA.js +20 -0
- package/dist/{trace-library-536NQQJJ.js → trace-library-XLBJHI3I.js} +576 -413
- package/package.json +2 -1
|
@@ -0,0 +1,745 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ApiError,
|
|
3
|
+
api
|
|
4
|
+
} from "./chunk-44XF4EGE.js";
|
|
5
|
+
import {
|
|
6
|
+
SKILL_NAME
|
|
7
|
+
} from "./chunk-J3KIEZXM.js";
|
|
8
|
+
import {
|
|
9
|
+
configPath,
|
|
10
|
+
currentUniverse
|
|
11
|
+
} from "./chunk-XHZJG3QT.js";
|
|
12
|
+
|
|
13
|
+
// src/local-agents.ts
|
|
14
|
+
import { existsSync } from "fs";
|
|
15
|
+
import { homedir } from "os";
|
|
16
|
+
import { join } from "path";
|
|
17
|
+
function localAgents(env = process.env, home = homedir()) {
|
|
18
|
+
const claude = env.CLAUDE_CONFIG_DIR || join(home, ".claude");
|
|
19
|
+
const codex = env.CODEX_HOME || join(home, ".codex");
|
|
20
|
+
const cursor = join(home, ".cursor");
|
|
21
|
+
const grok = env.GROK_HOME || join(home, ".grok");
|
|
22
|
+
return [
|
|
23
|
+
{ id: "claude_code", name: "Claude Code", root: claude, skillsDir: join(claude, "skills") },
|
|
24
|
+
{ id: "codex", name: "Codex", root: codex, skillsDir: join(codex, "skills") },
|
|
25
|
+
{ id: "cursor", name: "Cursor", root: cursor, skillsDir: join(cursor, "skills") },
|
|
26
|
+
{ id: "grok", name: "Grok", root: grok, skillsDir: join(grok, "skills") }
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
function detectLocalAgents(env = process.env, home = homedir()) {
|
|
30
|
+
return localAgents(env, home).filter((agent) => existsSync(agent.root));
|
|
31
|
+
}
|
|
32
|
+
function selectLocalAgents(ids, env = process.env, home = homedir()) {
|
|
33
|
+
if (!ids?.length) return detectLocalAgents(env, home);
|
|
34
|
+
const known = localAgents(env, home);
|
|
35
|
+
return ids.map((id) => {
|
|
36
|
+
const agent = known.find((candidate) => candidate.id === id);
|
|
37
|
+
if (!agent) throw new Error(`unknown agent ${id} \u2014 expected ${known.map((candidate) => candidate.id).join(" | ")}`);
|
|
38
|
+
return agent;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// src/mcp-register.ts
|
|
43
|
+
import { existsSync as existsSync2, readFileSync, writeFileSync } from "fs";
|
|
44
|
+
import { spawnSync } from "child_process";
|
|
45
|
+
import { homedir as homedir2 } from "os";
|
|
46
|
+
import { join as join2 } from "path";
|
|
47
|
+
import { parse as parseToml } from "smol-toml";
|
|
48
|
+
import { isMap, parseDocument } from "yaml";
|
|
49
|
+
|
|
50
|
+
// ../../packages/spec/src/mcp-tool-list.ts
|
|
51
|
+
var MCP_TOOL_LIST_PARAM = "tools";
|
|
52
|
+
function mcpUrlWithToolList(mcpUrl, list) {
|
|
53
|
+
const url = new URL(mcpUrl);
|
|
54
|
+
if (list === "short") url.searchParams.set(MCP_TOOL_LIST_PARAM, "short");
|
|
55
|
+
else url.searchParams.delete(MCP_TOOL_LIST_PARAM);
|
|
56
|
+
return url.toString();
|
|
57
|
+
}
|
|
58
|
+
function mcpToolListOf(mcpUrl) {
|
|
59
|
+
const value = (typeof mcpUrl === "string" ? new URL(mcpUrl) : mcpUrl).searchParams.get(MCP_TOOL_LIST_PARAM);
|
|
60
|
+
if (value === null) return "every";
|
|
61
|
+
return value === "short" || value === "every" ? value : null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// src/mcp-register.ts
|
|
65
|
+
var MCP_SERVER_NAME = SKILL_NAME;
|
|
66
|
+
function detectHermes(env = process.env, home = homedir2()) {
|
|
67
|
+
const root = env.HERMES_HOME || join2(home, ".hermes");
|
|
68
|
+
return existsSync2(root) ? { id: "hermes", name: "Hermes", root } : null;
|
|
69
|
+
}
|
|
70
|
+
function detectMcpClients(env = process.env, home = homedir2()) {
|
|
71
|
+
const hermes = detectHermes(env, home);
|
|
72
|
+
return [...detectLocalAgents(env, home), ...hermes ? [hermes] : []];
|
|
73
|
+
}
|
|
74
|
+
function systemCommandRunner() {
|
|
75
|
+
return {
|
|
76
|
+
has: (command) => spawnSync(command, ["--version"], { stdio: "ignore" }).status === 0,
|
|
77
|
+
run: (command, args) => {
|
|
78
|
+
const result = spawnSync(command, args, { encoding: "utf8" });
|
|
79
|
+
return { status: result.status, stderr: result.stderr ?? "", stdout: result.stdout ?? "" };
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function mcpUrlFor(apiBase, list = "every") {
|
|
84
|
+
return mcpUrlWithToolList(`${apiBase.replace(/\/$/, "")}/mcp`, list);
|
|
85
|
+
}
|
|
86
|
+
function mcpCommands(agent, opts) {
|
|
87
|
+
if (agent === "claude_code") {
|
|
88
|
+
return {
|
|
89
|
+
command: "claude",
|
|
90
|
+
remove: ["mcp", "remove", "--scope", "user", MCP_SERVER_NAME],
|
|
91
|
+
add: ["mcp", "add", "--scope", "user", "--transport", "http", MCP_SERVER_NAME, opts.mcpUrl, "--header", `Authorization: Bearer ${opts.token}`]
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
if (agent === "grok") {
|
|
95
|
+
return {
|
|
96
|
+
command: "grok",
|
|
97
|
+
remove: ["mcp", "remove", MCP_SERVER_NAME],
|
|
98
|
+
add: ["mcp", "add", "--scope", "user", "--transport", "http", "--header", `Authorization: Bearer ${opts.token}`, MCP_SERVER_NAME, opts.mcpUrl]
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
function redact(text, token) {
|
|
104
|
+
return text.split(token).join(`${token.slice(0, 10)}\u2026`);
|
|
105
|
+
}
|
|
106
|
+
function registerMcpServer(client, opts, runner = systemCommandRunner()) {
|
|
107
|
+
if (client.id === "codex") return registerCodex(client, opts);
|
|
108
|
+
if (client.id === "cursor") return registerCursor(client, opts);
|
|
109
|
+
if (client.id === "hermes") return registerHermes(client, opts);
|
|
110
|
+
const commands = mcpCommands(client.id, opts);
|
|
111
|
+
if (!commands) return { agent: client.id, outcome: "unsupported" };
|
|
112
|
+
if (!runner.has(commands.command)) return { agent: client.id, outcome: "no_command", detail: `${commands.command} is not on PATH` };
|
|
113
|
+
if (opts.dryRun) return { agent: client.id, outcome: "planned", detail: redact(`run ${[commands.command, ...commands.add].join(" ")}`, opts.token) };
|
|
114
|
+
runner.run(commands.command, commands.remove);
|
|
115
|
+
const added = runner.run(commands.command, commands.add);
|
|
116
|
+
if (added.status !== 0) return { agent: client.id, outcome: "failed", detail: redact(added.stderr.trim() || `exit ${added.status}`, opts.token) };
|
|
117
|
+
return { agent: client.id, outcome: "registered" };
|
|
118
|
+
}
|
|
119
|
+
function mcpConfigPath(client, env = process.env, home = homedir2()) {
|
|
120
|
+
switch (client.id) {
|
|
121
|
+
case "claude_code":
|
|
122
|
+
return join2(env.CLAUDE_CONFIG_DIR || home, ".claude.json");
|
|
123
|
+
case "codex":
|
|
124
|
+
case "grok":
|
|
125
|
+
return join2(client.root, "config.toml");
|
|
126
|
+
case "cursor":
|
|
127
|
+
return join2(client.root, "mcp.json");
|
|
128
|
+
case "hermes":
|
|
129
|
+
return join2(client.root, "config.yaml");
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function readText(path) {
|
|
133
|
+
try {
|
|
134
|
+
return readFileSync(path, "utf8");
|
|
135
|
+
} catch {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function registeredMcpUrl(client, env = process.env, home = homedir2()) {
|
|
140
|
+
const raw = readText(mcpConfigPath(client, env, home));
|
|
141
|
+
if (raw === null) return null;
|
|
142
|
+
try {
|
|
143
|
+
let entry;
|
|
144
|
+
if (client.id === "codex" || client.id === "grok") entry = parseToml(raw).mcp_servers?.[MCP_SERVER_NAME];
|
|
145
|
+
else if (client.id === "hermes") entry = parseDocument(raw).toJS()?.mcp_servers?.[MCP_SERVER_NAME];
|
|
146
|
+
else entry = JSON.parse(raw).mcpServers?.[MCP_SERVER_NAME];
|
|
147
|
+
const url = entry?.url;
|
|
148
|
+
return typeof url === "string" ? url : null;
|
|
149
|
+
} catch {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function registeredToolList(client, env = process.env, home = homedir2()) {
|
|
154
|
+
const url = registeredMcpUrl(client, env, home);
|
|
155
|
+
if (url === null) return "every";
|
|
156
|
+
try {
|
|
157
|
+
return mcpToolListOf(url) === "short" ? "short" : "every";
|
|
158
|
+
} catch {
|
|
159
|
+
return "every";
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function hasMcpServer(client, env = process.env, home = homedir2()) {
|
|
163
|
+
const raw = readText(mcpConfigPath(client, env, home));
|
|
164
|
+
if (raw === null) return false;
|
|
165
|
+
try {
|
|
166
|
+
if (client.id === "codex" || client.id === "grok") return Boolean(parseToml(raw).mcp_servers?.[MCP_SERVER_NAME]);
|
|
167
|
+
if (client.id === "hermes") return parseDocument(raw).hasIn(["mcp_servers", MCP_SERVER_NAME]);
|
|
168
|
+
return Boolean(JSON.parse(raw).mcpServers?.[MCP_SERVER_NAME]);
|
|
169
|
+
} catch {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function planned(client, path, entry, opts) {
|
|
174
|
+
return { agent: client.id, outcome: "planned", detail: `write to ${path}: ${redact(entry, opts.token)}` };
|
|
175
|
+
}
|
|
176
|
+
function written(client, path, text) {
|
|
177
|
+
try {
|
|
178
|
+
writeFileSync(path, text, { encoding: "utf8", mode: 384 });
|
|
179
|
+
} catch (err) {
|
|
180
|
+
return { agent: client.id, outcome: "failed", detail: String(err) };
|
|
181
|
+
}
|
|
182
|
+
return { agent: client.id, outcome: "registered" };
|
|
183
|
+
}
|
|
184
|
+
function tomlTableKey(name) {
|
|
185
|
+
const escaped = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
186
|
+
return `(?:${escaped}|"${escaped}"|'${escaped}')`;
|
|
187
|
+
}
|
|
188
|
+
function withoutTomlServer(text, name) {
|
|
189
|
+
const ours = new RegExp(`^\\s*\\[\\s*mcp_servers\\s*\\.\\s*${tomlTableKey(name)}\\s*(?:\\.[^\\]]*)?\\]\\s*(?:#.*)?$`);
|
|
190
|
+
let skipping = false;
|
|
191
|
+
const kept = [];
|
|
192
|
+
for (const line of text.split(/\r?\n/)) {
|
|
193
|
+
if (/^\s*\[/.test(line)) skipping = ours.test(line);
|
|
194
|
+
if (!skipping) kept.push(line);
|
|
195
|
+
}
|
|
196
|
+
return kept.join("\n").replace(/\n+$/, "");
|
|
197
|
+
}
|
|
198
|
+
function registerCodex(client, opts) {
|
|
199
|
+
const path = mcpConfigPath(client);
|
|
200
|
+
const block = [
|
|
201
|
+
`[mcp_servers.${MCP_SERVER_NAME}]`,
|
|
202
|
+
`url = ${JSON.stringify(opts.mcpUrl)}`,
|
|
203
|
+
`http_headers = { Authorization = ${JSON.stringify(`Bearer ${opts.token}`)} }`
|
|
204
|
+
].join("\n");
|
|
205
|
+
if (opts.dryRun) return planned(client, path, block, opts);
|
|
206
|
+
const raw = readText(path) ?? "";
|
|
207
|
+
let before;
|
|
208
|
+
try {
|
|
209
|
+
before = parseToml(raw);
|
|
210
|
+
} catch (err) {
|
|
211
|
+
return { agent: client.id, outcome: "failed", detail: `${path} is not valid TOML, left as it was (${String(err).split("\n")[0]})` };
|
|
212
|
+
}
|
|
213
|
+
const rest = withoutTomlServer(raw, MCP_SERVER_NAME);
|
|
214
|
+
const text = `${rest ? `${rest}
|
|
215
|
+
|
|
216
|
+
` : ""}${block}
|
|
217
|
+
`;
|
|
218
|
+
try {
|
|
219
|
+
const after = parseToml(text);
|
|
220
|
+
const others = Object.keys(before.mcp_servers ?? {}).filter((name) => name !== MCP_SERVER_NAME);
|
|
221
|
+
if (after.mcp_servers?.[MCP_SERVER_NAME]?.url !== opts.mcpUrl || others.some((name) => !after.mcp_servers?.[name])) throw new Error("the edited file lost an entry");
|
|
222
|
+
} catch (err) {
|
|
223
|
+
return { agent: client.id, outcome: "failed", detail: `could not edit ${path} safely, left as it was (${String(err).split("\n")[0]})` };
|
|
224
|
+
}
|
|
225
|
+
return written(client, path, text);
|
|
226
|
+
}
|
|
227
|
+
function registerCursor(client, opts) {
|
|
228
|
+
const path = mcpConfigPath(client);
|
|
229
|
+
const entry = { url: opts.mcpUrl, headers: { Authorization: `Bearer ${opts.token}` } };
|
|
230
|
+
if (opts.dryRun) return planned(client, path, JSON.stringify({ [MCP_SERVER_NAME]: entry }, null, 2), opts);
|
|
231
|
+
let existing = {};
|
|
232
|
+
try {
|
|
233
|
+
const parsed = JSON.parse(readText(path) ?? "");
|
|
234
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) existing = parsed;
|
|
235
|
+
} catch {
|
|
236
|
+
existing = {};
|
|
237
|
+
}
|
|
238
|
+
const updated = { ...existing, mcpServers: { ...existing.mcpServers ?? {}, [MCP_SERVER_NAME]: entry } };
|
|
239
|
+
return written(client, path, `${JSON.stringify(updated, null, 2)}
|
|
240
|
+
`);
|
|
241
|
+
}
|
|
242
|
+
function registerHermes(client, opts) {
|
|
243
|
+
const path = mcpConfigPath(client);
|
|
244
|
+
const entry = { url: opts.mcpUrl, headers: { Authorization: `Bearer ${opts.token}` } };
|
|
245
|
+
if (opts.dryRun) return planned(client, path, `mcp_servers.${MCP_SERVER_NAME}: ${JSON.stringify(entry)}`, opts);
|
|
246
|
+
const doc = parseDocument(readText(path) ?? "");
|
|
247
|
+
if (doc.errors.length) return { agent: client.id, outcome: "failed", detail: `${path} is not valid YAML, left as it was (${doc.errors[0].message.split("\n")[0]})` };
|
|
248
|
+
if (doc.contents !== null && !isMap(doc.contents)) {
|
|
249
|
+
return { agent: client.id, outcome: "failed", detail: `${path} is not a YAML mapping, left as it was` };
|
|
250
|
+
}
|
|
251
|
+
doc.setIn(["mcp_servers", MCP_SERVER_NAME], doc.createNode(entry));
|
|
252
|
+
return written(client, path, doc.toString());
|
|
253
|
+
}
|
|
254
|
+
function refreshMcpRegistrations(opts, clients = detectMcpClients(), runner = systemCommandRunner(), env = process.env, home = homedir2()) {
|
|
255
|
+
return clients.filter((client) => hasMcpServer(client, env, home)).map((client) => registerMcpServer(client, { token: opts.token, mcpUrl: mcpUrlFor(opts.apiBase, registeredToolList(client, env, home)) }, runner));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// src/setup-journal.ts
|
|
259
|
+
import { createHash } from "crypto";
|
|
260
|
+
import { chmodSync, existsSync as existsSync4, lstatSync, mkdirSync as mkdirSync2, readdirSync, readFileSync as readFileSync3, rmdirSync, rmSync, statSync, unlinkSync, writeFileSync as writeFileSync3 } from "fs";
|
|
261
|
+
import { dirname as dirname2, join as join4, sep } from "path";
|
|
262
|
+
|
|
263
|
+
// src/shell-env.ts
|
|
264
|
+
import { appendFileSync, existsSync as existsSync3, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
265
|
+
import { homedir as homedir3 } from "os";
|
|
266
|
+
import { basename, dirname, join as join3 } from "path";
|
|
267
|
+
var TOKEN_ENV = "AGENTSKY_API_KEY";
|
|
268
|
+
var SHELL_HOOK_MARK = "# AgentSky API token, kept current by sky";
|
|
269
|
+
function shellEnvFiles() {
|
|
270
|
+
const dir = dirname(configPath());
|
|
271
|
+
return { sh: join3(dir, "env.sh"), fish: join3(dir, "env.fish") };
|
|
272
|
+
}
|
|
273
|
+
function quoted(value) {
|
|
274
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
275
|
+
}
|
|
276
|
+
function shellStartupFiles(env = process.env, home = homedir3(), platform = process.platform) {
|
|
277
|
+
const shell = basename(env.SHELL ?? "");
|
|
278
|
+
const files = [];
|
|
279
|
+
const zshenv = join3(env.ZDOTDIR || home, ".zshenv");
|
|
280
|
+
if (shell === "zsh" || platform === "darwin" || existsSync3(zshenv)) files.push({ path: zshenv, kind: "sh" });
|
|
281
|
+
const bashrc = join3(home, ".bashrc");
|
|
282
|
+
if (shell === "bash" || existsSync3(bashrc)) files.push({ path: bashrc, kind: "sh" });
|
|
283
|
+
const bashProfile = join3(home, ".bash_profile");
|
|
284
|
+
if (existsSync3(bashProfile)) files.push({ path: bashProfile, kind: "sh" });
|
|
285
|
+
const fish = join3(env.XDG_CONFIG_HOME || join3(home, ".config"), "fish");
|
|
286
|
+
if (shell === "fish" || existsSync3(fish)) files.push({ path: join3(fish, "conf.d", "agentsky.fish"), kind: "fish" });
|
|
287
|
+
return files;
|
|
288
|
+
}
|
|
289
|
+
function writeShellEnv(token, opts = {}) {
|
|
290
|
+
const { sh, fish } = shellEnvFiles();
|
|
291
|
+
const startup = shellStartupFiles(opts.env, opts.home, opts.platform);
|
|
292
|
+
if (opts.dryRun) return { outcome: "planned", files: [sh, fish, ...startup.map((file) => file.path)] };
|
|
293
|
+
const header = "# Written by sky. `sky auth login` and `sky auth logout` rewrite this file.\n";
|
|
294
|
+
const hooked = [];
|
|
295
|
+
try {
|
|
296
|
+
mkdirSync(dirname(sh), { recursive: true });
|
|
297
|
+
writeFileSync2(sh, `${header}${token ? `export ${TOKEN_ENV}=${quoted(token)}` : `unset ${TOKEN_ENV}`}
|
|
298
|
+
`, { mode: 384 });
|
|
299
|
+
writeFileSync2(fish, `${header}${token ? `set -gx ${TOKEN_ENV} ${quoted(token)}` : `set -e ${TOKEN_ENV}`}
|
|
300
|
+
`, { mode: 384 });
|
|
301
|
+
for (const file of startup) {
|
|
302
|
+
const existing = existsSync3(file.path) ? readFileSync2(file.path, "utf8") : "";
|
|
303
|
+
if (existing.includes(SHELL_HOOK_MARK)) continue;
|
|
304
|
+
const line = file.kind === "fish" ? `${SHELL_HOOK_MARK}
|
|
305
|
+
test -f ${quoted(fish)}; and source ${quoted(fish)}
|
|
306
|
+
` : `${SHELL_HOOK_MARK}
|
|
307
|
+
[ -f ${quoted(sh)} ] && . ${quoted(sh)}
|
|
308
|
+
`;
|
|
309
|
+
mkdirSync(dirname(file.path), { recursive: true });
|
|
310
|
+
appendFileSync(file.path, `${existing && !existing.endsWith("\n") ? "\n" : ""}${line}`);
|
|
311
|
+
hooked.push(file.path);
|
|
312
|
+
}
|
|
313
|
+
} catch (err) {
|
|
314
|
+
return { outcome: "failed", files: [sh, fish, ...hooked], detail: String(err) };
|
|
315
|
+
}
|
|
316
|
+
return { outcome: token ? "written" : "cleared", files: [sh, fish, ...hooked] };
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// src/setup-journal.ts
|
|
320
|
+
var sha = (bytes) => bytes ? createHash("sha256").update(bytes).digest("hex") : null;
|
|
321
|
+
function readBytes(path) {
|
|
322
|
+
try {
|
|
323
|
+
return readFileSync3(path);
|
|
324
|
+
} catch {
|
|
325
|
+
return null;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
function journalPath() {
|
|
329
|
+
return join4(dirname2(configPath()), "setup-journal.json");
|
|
330
|
+
}
|
|
331
|
+
var SetupJournal = class {
|
|
332
|
+
constructor(path = journalPath()) {
|
|
333
|
+
this.path = path;
|
|
334
|
+
let loaded = {};
|
|
335
|
+
try {
|
|
336
|
+
loaded = JSON.parse(readFileSync3(path, "utf8"));
|
|
337
|
+
} catch {
|
|
338
|
+
loaded = {};
|
|
339
|
+
}
|
|
340
|
+
this.data = { version: 1, files: loaded.files ?? {}, owned: loaded.owned ?? [], dirs: loaded.dirs ?? [], jobs: loaded.jobs ?? [] };
|
|
341
|
+
}
|
|
342
|
+
path;
|
|
343
|
+
data;
|
|
344
|
+
touched = /* @__PURE__ */ new Set();
|
|
345
|
+
/** Whether this machine has anything setup could remove. */
|
|
346
|
+
get empty() {
|
|
347
|
+
return !Object.keys(this.data.files).length && !this.data.owned.length && !this.data.dirs.length && !this.data.jobs.length;
|
|
348
|
+
}
|
|
349
|
+
createdDirs(path) {
|
|
350
|
+
const missing = [];
|
|
351
|
+
for (let dir = dirname2(path); !existsSync4(dir) && dirname2(dir) !== dir; dir = dirname2(dir)) missing.push(dir);
|
|
352
|
+
for (const dir of missing.reverse()) if (!this.data.dirs.includes(dir)) this.data.dirs.push(dir);
|
|
353
|
+
}
|
|
354
|
+
/** Call before setup writes `path`: keeps its bytes the first time, and notes the entries setup puts in it. */
|
|
355
|
+
track(path, entries = []) {
|
|
356
|
+
if (this.owns(path)) return;
|
|
357
|
+
const record = this.data.files[path];
|
|
358
|
+
const current = readBytes(path);
|
|
359
|
+
if (!record) {
|
|
360
|
+
this.createdDirs(path);
|
|
361
|
+
let mode = null;
|
|
362
|
+
try {
|
|
363
|
+
mode = statSync(path).mode & 4095;
|
|
364
|
+
} catch {
|
|
365
|
+
mode = null;
|
|
366
|
+
}
|
|
367
|
+
this.data.files[path] = { original: current ? current.toString("base64") : null, mode, written: sha(current), entries: [...new Set(entries)] };
|
|
368
|
+
} else {
|
|
369
|
+
if (!this.touched.has(path) && sha(current) !== record.written) record.edited = true;
|
|
370
|
+
record.entries = [.../* @__PURE__ */ new Set([...record.entries, ...entries])];
|
|
371
|
+
}
|
|
372
|
+
this.touched.add(path);
|
|
373
|
+
}
|
|
374
|
+
/** Call before setup creates a path it owns outright (its own state, a CLI it installs); one that already existed is left to its owner. */
|
|
375
|
+
own(path) {
|
|
376
|
+
if (existsSync4(path) || this.owns(path) || this.data.files[path]) return;
|
|
377
|
+
this.createdDirs(path);
|
|
378
|
+
this.data.owned.push(path);
|
|
379
|
+
}
|
|
380
|
+
/** Whether `path` is, or lies inside, a path setup owns outright. */
|
|
381
|
+
owns(path) {
|
|
382
|
+
return this.data.owned.some((owned) => path === owned || path.startsWith(`${owned}${sep}`));
|
|
383
|
+
}
|
|
384
|
+
/** A launchd job setup loaded, unloaded first on removal. */
|
|
385
|
+
job(label) {
|
|
386
|
+
if (!this.data.jobs.includes(label)) this.data.jobs.push(label);
|
|
387
|
+
}
|
|
388
|
+
/** After a run: record what setup left in each file it touched, and save. */
|
|
389
|
+
save() {
|
|
390
|
+
for (const path of this.touched) {
|
|
391
|
+
const record = this.data.files[path];
|
|
392
|
+
if (record) record.written = sha(readBytes(path));
|
|
393
|
+
}
|
|
394
|
+
this.touched.clear();
|
|
395
|
+
if (this.empty) {
|
|
396
|
+
rmSync(this.path, { force: true });
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
mkdirSync2(dirname2(this.path), { recursive: true });
|
|
400
|
+
writeFileSync3(this.path, `${JSON.stringify(this.data, null, 2)}
|
|
401
|
+
`, { mode: 384 });
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Put back everything setup changed: unload its jobs (with `unload`), restore each file, delete what it owns, remove
|
|
405
|
+
* the directories it created when they are empty, and delete the journal. Returns what was done with each path.
|
|
406
|
+
*/
|
|
407
|
+
restore(unload = () => {
|
|
408
|
+
}) {
|
|
409
|
+
const results = [];
|
|
410
|
+
for (const label of this.data.jobs) {
|
|
411
|
+
try {
|
|
412
|
+
unload(label);
|
|
413
|
+
} catch {
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
for (const [path, record] of Object.entries(this.data.files)) results.push(restoreFile(path, record));
|
|
417
|
+
for (const path of this.data.owned) {
|
|
418
|
+
if (!existsSync4(path) && !isLink(path)) continue;
|
|
419
|
+
rmSync(path, { recursive: true, force: true });
|
|
420
|
+
results.push({ path, outcome: "removed" });
|
|
421
|
+
}
|
|
422
|
+
rmSync(this.path, { force: true });
|
|
423
|
+
for (const dir of [...this.data.dirs].sort((a, b) => b.length - a.length)) {
|
|
424
|
+
try {
|
|
425
|
+
if (readdirSync(dir).length === 0) {
|
|
426
|
+
rmdirSync(dir);
|
|
427
|
+
results.push({ path: dir, outcome: "removed" });
|
|
428
|
+
}
|
|
429
|
+
} catch {
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
this.data = { version: 1, files: {}, owned: [], dirs: [], jobs: [] };
|
|
433
|
+
return results;
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
function isLink(path) {
|
|
437
|
+
try {
|
|
438
|
+
return lstatSync(path).isSymbolicLink();
|
|
439
|
+
} catch {
|
|
440
|
+
return false;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
function restoreFile(path, record) {
|
|
444
|
+
const current = readBytes(path);
|
|
445
|
+
const original = record.original === null ? null : Buffer.from(record.original, "base64");
|
|
446
|
+
if (sha(current) === sha(original)) return { path, outcome: "unchanged" };
|
|
447
|
+
if (!record.edited && sha(current) === record.written) {
|
|
448
|
+
if (original === null) {
|
|
449
|
+
unlinkSync(path);
|
|
450
|
+
return { path, outcome: "removed" };
|
|
451
|
+
}
|
|
452
|
+
mkdirSync2(dirname2(path), { recursive: true });
|
|
453
|
+
writeFileSync3(path, original);
|
|
454
|
+
if (record.mode !== null) chmodSync(path, record.mode);
|
|
455
|
+
return { path, outcome: "restored" };
|
|
456
|
+
}
|
|
457
|
+
if (current === null) return { path, outcome: "left", detail: "deleted since setup" };
|
|
458
|
+
const before = original?.toString("utf8") ?? "";
|
|
459
|
+
let text = current.toString("utf8");
|
|
460
|
+
for (const entry of record.entries) {
|
|
461
|
+
const remove = ENTRY_REMOVERS[entry];
|
|
462
|
+
if (original !== null && remove(before) !== before) continue;
|
|
463
|
+
text = remove(text);
|
|
464
|
+
}
|
|
465
|
+
if (text === current.toString("utf8")) return { path, outcome: "left", detail: "changed since setup; nothing of setup's is left in it" };
|
|
466
|
+
writeFileSync3(path, text);
|
|
467
|
+
return { path, outcome: "entries_removed", detail: "changed since setup, so only setup's entries were taken out" };
|
|
468
|
+
}
|
|
469
|
+
var CAPTURE_HOOK_ARGS = ["trace", "sync", "--hook"];
|
|
470
|
+
var isCaptureCommand = (command) => /\btrace\b.*\bsync\b.*--hook\b/.test(command);
|
|
471
|
+
function withoutClaudeHook(text) {
|
|
472
|
+
let settings;
|
|
473
|
+
try {
|
|
474
|
+
settings = JSON.parse(text);
|
|
475
|
+
} catch {
|
|
476
|
+
return text;
|
|
477
|
+
}
|
|
478
|
+
if (!settings || typeof settings !== "object" || !settings.hooks) return text;
|
|
479
|
+
let changed = false;
|
|
480
|
+
for (const [event, groups] of Object.entries(settings.hooks)) {
|
|
481
|
+
if (!Array.isArray(groups)) continue;
|
|
482
|
+
const kept = groups.filter((group) => !group.hooks?.some((hook) => typeof hook.command === "string" && isCaptureCommand(hook.command)));
|
|
483
|
+
if (kept.length === groups.length) continue;
|
|
484
|
+
changed = true;
|
|
485
|
+
if (kept.length) settings.hooks[event] = kept;
|
|
486
|
+
else delete settings.hooks[event];
|
|
487
|
+
}
|
|
488
|
+
if (!changed) return text;
|
|
489
|
+
if (!Object.keys(settings.hooks).length) delete settings.hooks;
|
|
490
|
+
return `${JSON.stringify(settings, null, 2)}
|
|
491
|
+
`;
|
|
492
|
+
}
|
|
493
|
+
var NOTIFY_LINE = /^\s*notify\s*=.*$/;
|
|
494
|
+
function withoutCodexNotify(text) {
|
|
495
|
+
const lines = text.split("\n");
|
|
496
|
+
const at = lines.findIndex((line) => NOTIFY_LINE.test(line) && isCaptureCommand(line.replace(/["',[\]]/g, " ")));
|
|
497
|
+
if (at < 0) return text;
|
|
498
|
+
lines.splice(at, 1);
|
|
499
|
+
return lines.join("\n");
|
|
500
|
+
}
|
|
501
|
+
function withoutJsonServer(text) {
|
|
502
|
+
let config;
|
|
503
|
+
try {
|
|
504
|
+
config = JSON.parse(text);
|
|
505
|
+
} catch {
|
|
506
|
+
return text;
|
|
507
|
+
}
|
|
508
|
+
if (!config?.mcpServers || !(MCP_SERVER_NAME in config.mcpServers)) return text;
|
|
509
|
+
delete config.mcpServers[MCP_SERVER_NAME];
|
|
510
|
+
return `${JSON.stringify(config, null, 2)}
|
|
511
|
+
`;
|
|
512
|
+
}
|
|
513
|
+
function withoutTomlServerText(text) {
|
|
514
|
+
const rest = withoutTomlServer(text, MCP_SERVER_NAME);
|
|
515
|
+
return rest === text.replace(/\n+$/, "") ? text : `${rest}
|
|
516
|
+
`;
|
|
517
|
+
}
|
|
518
|
+
function withoutYamlServer(text) {
|
|
519
|
+
const lines = text.split("\n");
|
|
520
|
+
const parent = lines.findIndex((line) => /^mcp_servers:\s*$/.test(line));
|
|
521
|
+
if (parent < 0) return text;
|
|
522
|
+
const start = lines.findIndex((line, index) => index > parent && new RegExp(`^(\\s+)${MCP_SERVER_NAME}:\\s*`).test(line));
|
|
523
|
+
if (start < 0) return text;
|
|
524
|
+
const indent = /^(\s*)/.exec(lines[start])[1].length;
|
|
525
|
+
let end = start + 1;
|
|
526
|
+
while (end < lines.length && (lines[end].trim() === "" || /^(\s*)/.exec(lines[end])[1].length > indent)) end++;
|
|
527
|
+
lines.splice(start, end - start);
|
|
528
|
+
const rest = lines.slice(parent + 1).some((line) => line.trim() && /^\s/.test(line));
|
|
529
|
+
if (!rest) lines.splice(parent, 1);
|
|
530
|
+
return lines.join("\n").replace(/^\n+/, "");
|
|
531
|
+
}
|
|
532
|
+
function withoutShellLine(text) {
|
|
533
|
+
const lines = text.split("\n");
|
|
534
|
+
const at = lines.indexOf(SHELL_HOOK_MARK);
|
|
535
|
+
if (at < 0) return text;
|
|
536
|
+
lines.splice(at, 2);
|
|
537
|
+
return lines.join("\n");
|
|
538
|
+
}
|
|
539
|
+
function withCaptureOff(text) {
|
|
540
|
+
let config;
|
|
541
|
+
try {
|
|
542
|
+
config = JSON.parse(text);
|
|
543
|
+
} catch {
|
|
544
|
+
return text;
|
|
545
|
+
}
|
|
546
|
+
if (!config?.enabled) return text;
|
|
547
|
+
return `${JSON.stringify({ ...config, enabled: false }, null, 2)}
|
|
548
|
+
`;
|
|
549
|
+
}
|
|
550
|
+
var ENTRY_REMOVERS = {
|
|
551
|
+
claude_hook: withoutClaudeHook,
|
|
552
|
+
codex_notify: withoutCodexNotify,
|
|
553
|
+
mcp_json: withoutJsonServer,
|
|
554
|
+
mcp_toml: withoutTomlServerText,
|
|
555
|
+
mcp_yaml: withoutYamlServer,
|
|
556
|
+
shell_line: withoutShellLine,
|
|
557
|
+
sync_config: withCaptureOff
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
// src/workspace.ts
|
|
561
|
+
import { createInterface } from "readline";
|
|
562
|
+
var KINDS = ["TOOL_CALL", "SPEND_CAP", "CALL_COUNT", "CAPABILITY"];
|
|
563
|
+
async function workspaceSlug(explicit) {
|
|
564
|
+
if (explicit) return explicit;
|
|
565
|
+
const current = currentUniverse();
|
|
566
|
+
if (current) return current;
|
|
567
|
+
return (await api("GET", "/whoami")).universe.slug;
|
|
568
|
+
}
|
|
569
|
+
var workspacePath = (slug) => `/universes/${encodeURIComponent(slug)}`;
|
|
570
|
+
async function listMembers(slug, page = {}) {
|
|
571
|
+
const query = new URLSearchParams({ ...page.limit ? { limit: page.limit } : {}, ...page.cursor ? { cursor: page.cursor } : {} }).toString();
|
|
572
|
+
return api("GET", `${workspacePath(slug)}/members${query ? `?${query}` : ""}`);
|
|
573
|
+
}
|
|
574
|
+
function findMember(members, ref) {
|
|
575
|
+
const needle = ref.toLowerCase();
|
|
576
|
+
const found = members.find((m) => m.user_id === ref || m.email?.toLowerCase() === needle);
|
|
577
|
+
if (!found) throw new ApiError(404, "not_found", `no member ${ref} in this workspace`);
|
|
578
|
+
return found;
|
|
579
|
+
}
|
|
580
|
+
function inviteBody(emails, options) {
|
|
581
|
+
if (options.role && options.role !== "admin" && options.role !== "member") {
|
|
582
|
+
throw new ApiError(400, "invalid_request", "--role is admin or member");
|
|
583
|
+
}
|
|
584
|
+
return {
|
|
585
|
+
emails,
|
|
586
|
+
...options.role ? { role: options.role } : {},
|
|
587
|
+
...options.sendEmail ? { send_email: true } : {}
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
async function invite(slug, emails, options) {
|
|
591
|
+
return api("POST", `${workspacePath(slug)}/invites`, inviteBody(emails, options));
|
|
592
|
+
}
|
|
593
|
+
async function withdrawInvite(slug, inviteId) {
|
|
594
|
+
await api("DELETE", `${workspacePath(slug)}/invites/${encodeURIComponent(inviteId)}`);
|
|
595
|
+
}
|
|
596
|
+
async function setRole(slug, memberRef, role) {
|
|
597
|
+
if (role !== "admin" && role !== "member") throw new ApiError(400, "invalid_request", "a role is admin or member");
|
|
598
|
+
const member = findMember((await listMembers(slug)).members, memberRef);
|
|
599
|
+
await api("PATCH", `${workspacePath(slug)}/members/${encodeURIComponent(member.user_id)}`, { role });
|
|
600
|
+
return member;
|
|
601
|
+
}
|
|
602
|
+
async function removeMember(slug, memberRef) {
|
|
603
|
+
if (memberRef === "me") {
|
|
604
|
+
await leaveWorkspace(slug);
|
|
605
|
+
return null;
|
|
606
|
+
}
|
|
607
|
+
const member = findMember((await listMembers(slug)).members, memberRef);
|
|
608
|
+
await api("DELETE", `${workspacePath(slug)}/members/${encodeURIComponent(member.user_id)}`);
|
|
609
|
+
return member;
|
|
610
|
+
}
|
|
611
|
+
async function leaveWorkspace(slug) {
|
|
612
|
+
await api("DELETE", `${workspacePath(slug)}/members/me`);
|
|
613
|
+
}
|
|
614
|
+
async function joinWorkspace(token) {
|
|
615
|
+
return (await api("POST", `/invites/${encodeURIComponent(token)}`)).workspace;
|
|
616
|
+
}
|
|
617
|
+
function renderMembers(page) {
|
|
618
|
+
const lines = page.members.map((m) => `${m.role.padEnd(6)} ${m.email ?? m.user_id}${m.name ? ` (${m.name})` : ""} ${m.user_id}`);
|
|
619
|
+
for (const i of page.invites) lines.push(`invited ${i.email} as ${i.role} by ${i.invited_by} until ${i.expires_at.slice(0, 10)} ${i.id}`);
|
|
620
|
+
if (page.next_cursor) lines.push(`more: --cursor ${page.next_cursor}`);
|
|
621
|
+
return lines;
|
|
622
|
+
}
|
|
623
|
+
function policyRuleBody(options) {
|
|
624
|
+
const kind = options.kind.toUpperCase().replace(/-/g, "_");
|
|
625
|
+
if (!KINDS.includes(kind)) throw new ApiError(400, "invalid_request", `--kind is one of ${KINDS.join(", ")}`);
|
|
626
|
+
let config;
|
|
627
|
+
try {
|
|
628
|
+
config = JSON.parse(options.config);
|
|
629
|
+
} catch {
|
|
630
|
+
throw new ApiError(400, "invalid_request", "--config must be a JSON object");
|
|
631
|
+
}
|
|
632
|
+
if (!config || typeof config !== "object" || Array.isArray(config)) {
|
|
633
|
+
throw new ApiError(400, "invalid_request", "--config must be a JSON object");
|
|
634
|
+
}
|
|
635
|
+
const position = options.position === void 0 ? void 0 : Number(options.position);
|
|
636
|
+
if (position !== void 0 && !Number.isInteger(position)) throw new ApiError(400, "invalid_request", "--position is a whole number");
|
|
637
|
+
return {
|
|
638
|
+
name: options.name,
|
|
639
|
+
kind,
|
|
640
|
+
config,
|
|
641
|
+
...position !== void 0 ? { position } : {},
|
|
642
|
+
...options.disabled ? { enabled: false } : {}
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
var policiesPath = (scope) => "session" in scope ? `/sessions/${encodeURIComponent(scope.session)}/policies` : `${workspacePath(scope.slug)}/policies`;
|
|
646
|
+
async function listPolicies(scope, effective = false) {
|
|
647
|
+
if (effective && "session" in scope) return api("GET", `/sessions/${encodeURIComponent(scope.session)}/effective-policy`);
|
|
648
|
+
return api("GET", policiesPath(scope));
|
|
649
|
+
}
|
|
650
|
+
async function addPolicy(scope, options) {
|
|
651
|
+
return (await api("POST", policiesPath(scope), policyRuleBody(options))).rule;
|
|
652
|
+
}
|
|
653
|
+
async function setPolicyEnabled(scope, ruleId, enabled) {
|
|
654
|
+
return (await api("PATCH", `${policiesPath(scope)}/${encodeURIComponent(ruleId)}`, { enabled })).rule;
|
|
655
|
+
}
|
|
656
|
+
async function removePolicy(scope, ruleId) {
|
|
657
|
+
await api("DELETE", `${policiesPath(scope)}/${encodeURIComponent(ruleId)}`);
|
|
658
|
+
}
|
|
659
|
+
function renderPolicy(rule) {
|
|
660
|
+
const state = rule.enabled ? "on " : "off";
|
|
661
|
+
return `${state} ${rule.layer.padEnd(9)} ${rule.kind.padEnd(10)} ${rule.name} ${JSON.stringify(rule.config)} ${rule.id}`;
|
|
662
|
+
}
|
|
663
|
+
var REMOVED_KINDS = [
|
|
664
|
+
["sessions", "sessions and their transcripts"],
|
|
665
|
+
["agents", "agents"],
|
|
666
|
+
["artifacts", "artifacts"],
|
|
667
|
+
["files", "task files"],
|
|
668
|
+
["memory_stores", "memory stores"],
|
|
669
|
+
["routines", "routines"],
|
|
670
|
+
["channels", "channel connections"],
|
|
671
|
+
["webhooks", "webhooks"],
|
|
672
|
+
["api_keys", "API keys"],
|
|
673
|
+
["vaults", "vaults"],
|
|
674
|
+
["skills", "skills"],
|
|
675
|
+
["environments", "environments"],
|
|
676
|
+
["connections", "connected apps"],
|
|
677
|
+
["traces", "uploaded traces"],
|
|
678
|
+
["members", "other members"],
|
|
679
|
+
["invites", "pending invitations"]
|
|
680
|
+
];
|
|
681
|
+
async function deletionPreview(slug) {
|
|
682
|
+
return api("GET", `/universes/${encodeURIComponent(slug)}/deletion`);
|
|
683
|
+
}
|
|
684
|
+
function renderDeletionPreview(preview) {
|
|
685
|
+
if (!preview.can_delete) return [`${preview.workspace.slug} cannot be deleted:`, ...preview.blockers.map((b) => ` ${b.message}`)];
|
|
686
|
+
const lines = [`Deleting ${preview.workspace.slug} (${preview.workspace.name}) permanently removes:`];
|
|
687
|
+
const removed = REMOVED_KINDS.filter(([key]) => (preview.removes[key] ?? 0) > 0);
|
|
688
|
+
for (const [key, label] of removed) lines.push(` ${preview.removes[key]} ${label}`);
|
|
689
|
+
if (!removed.length) lines.push(" nothing: the workspace is empty");
|
|
690
|
+
const running = preview.removes.running_sessions ?? 0;
|
|
691
|
+
if (running) lines.push(`${running} running session${running === 1 ? " is" : "s are"} stopped first.`);
|
|
692
|
+
if (preview.wallet) lines.push(`$${(preview.wallet.balance_micros / 1e6).toFixed(2)} in its wallet goes back to ${preview.wallet.returns_to ?? "you"}.`);
|
|
693
|
+
lines.push("This cannot be undone.");
|
|
694
|
+
return lines;
|
|
695
|
+
}
|
|
696
|
+
async function deleteWorkspace(slug) {
|
|
697
|
+
return (await api("DELETE", `/universes/${encodeURIComponent(slug)}`)).deleted;
|
|
698
|
+
}
|
|
699
|
+
function typedConfirmation(slug) {
|
|
700
|
+
return new Promise((done) => {
|
|
701
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
702
|
+
rl.question(`Type ${slug} to delete it: `, (answer) => {
|
|
703
|
+
rl.close();
|
|
704
|
+
done(answer.trim() === slug);
|
|
705
|
+
});
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
export {
|
|
710
|
+
detectLocalAgents,
|
|
711
|
+
selectLocalAgents,
|
|
712
|
+
detectHermes,
|
|
713
|
+
detectMcpClients,
|
|
714
|
+
systemCommandRunner,
|
|
715
|
+
mcpUrlFor,
|
|
716
|
+
registerMcpServer,
|
|
717
|
+
mcpConfigPath,
|
|
718
|
+
hasMcpServer,
|
|
719
|
+
refreshMcpRegistrations,
|
|
720
|
+
TOKEN_ENV,
|
|
721
|
+
shellEnvFiles,
|
|
722
|
+
shellStartupFiles,
|
|
723
|
+
writeShellEnv,
|
|
724
|
+
SetupJournal,
|
|
725
|
+
CAPTURE_HOOK_ARGS,
|
|
726
|
+
isCaptureCommand,
|
|
727
|
+
workspaceSlug,
|
|
728
|
+
listMembers,
|
|
729
|
+
invite,
|
|
730
|
+
withdrawInvite,
|
|
731
|
+
setRole,
|
|
732
|
+
removeMember,
|
|
733
|
+
leaveWorkspace,
|
|
734
|
+
joinWorkspace,
|
|
735
|
+
renderMembers,
|
|
736
|
+
listPolicies,
|
|
737
|
+
addPolicy,
|
|
738
|
+
setPolicyEnabled,
|
|
739
|
+
removePolicy,
|
|
740
|
+
renderPolicy,
|
|
741
|
+
deletionPreview,
|
|
742
|
+
renderDeletionPreview,
|
|
743
|
+
deleteWorkspace,
|
|
744
|
+
typedConfirmation
|
|
745
|
+
};
|