flyspace-cli 0.1.54 → 0.1.55
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-ONGRYEWS.js → chunk-44WHW7NK.js} +1 -1
- package/dist/{chunk-ZSRDP5HJ.js → chunk-CN6YV335.js} +24 -7
- package/dist/{chunk-67WA56OD.js → chunk-XACRG7BO.js} +14 -0
- package/dist/cli.js +20 -6
- package/dist/index.js +2 -2
- package/dist/{threads-PTTZUNIJ.js → threads-I52LSA5X.js} +2 -2
- package/package.json +1 -1
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
resolveEffort,
|
|
43
43
|
resolveLogicalCwd,
|
|
44
44
|
resolveModel,
|
|
45
|
+
resolveOwnPersona,
|
|
45
46
|
runWithProfile,
|
|
46
47
|
setSupabaseClientFactory,
|
|
47
48
|
startChannelRegistryPolling,
|
|
@@ -50,7 +51,7 @@ import {
|
|
|
50
51
|
updateChannelById,
|
|
51
52
|
uploadLocalImages,
|
|
52
53
|
warnOnBrokenChannelCwds
|
|
53
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-XACRG7BO.js";
|
|
54
55
|
|
|
55
56
|
// ../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js
|
|
56
57
|
var require_delayed_stream = __commonJS({
|
|
@@ -18456,6 +18457,15 @@ async function setWorkspaceAutoContinueLimit(workspaceId, limit) {
|
|
|
18456
18457
|
const { error } = await getSupabaseClient().from("workspaces").update({ auto_continue_limit: limit }).eq("id", workspaceId);
|
|
18457
18458
|
if (error) throw new Error(`setWorkspaceAutoContinueLimit(${workspaceId}): ${error.message}`);
|
|
18458
18459
|
}
|
|
18460
|
+
async function getWorkspaceOwnPersona(workspaceId) {
|
|
18461
|
+
const { data, error } = await getSupabaseClient().from("workspaces").select("own_persona").eq("id", workspaceId).maybeSingle();
|
|
18462
|
+
if (error) throw new Error(`getWorkspaceOwnPersona(${workspaceId}): ${error.message}`);
|
|
18463
|
+
return data?.["own_persona"] === true;
|
|
18464
|
+
}
|
|
18465
|
+
async function setWorkspaceOwnPersona(workspaceId, enabled) {
|
|
18466
|
+
const { error } = await getSupabaseClient().from("workspaces").update({ own_persona: enabled }).eq("id", workspaceId);
|
|
18467
|
+
if (error) throw new Error(`setWorkspaceOwnPersona(${workspaceId}): ${error.message}`);
|
|
18468
|
+
}
|
|
18459
18469
|
async function setWorkspacePermissionMode(workspaceId, mode) {
|
|
18460
18470
|
const { error } = await getSupabaseClient().from("workspaces").update({ permission_mode: mode }).eq("id", workspaceId);
|
|
18461
18471
|
if (error) throw new Error(`setWorkspacePermissionMode(${workspaceId}): ${error.message}`);
|
|
@@ -19867,12 +19877,11 @@ function loadCapabilities(slackBound) {
|
|
|
19867
19877
|
slackBound ? loadPackagePrompt("system.slack.md") : ""
|
|
19868
19878
|
].filter(Boolean).join("\n\n");
|
|
19869
19879
|
}
|
|
19870
|
-
function buildSystemPrompt(botName, agentPersona, channelPrompt, outputStyle, slackBound = true) {
|
|
19871
|
-
const prompt = loadSystemPrompt().replaceAll("{{botName}}", botName);
|
|
19880
|
+
function buildSystemPrompt(botName, agentPersona, channelPrompt, outputStyle, slackBound = true, ownPersona = false) {
|
|
19872
19881
|
const capabilities = loadCapabilities(slackBound);
|
|
19873
|
-
const withCapabilities = capabilities ?
|
|
19882
|
+
const withCapabilities = ownPersona ? `Keep the identity, name and voice already defined by your own configuration (output style, plugins, CLAUDE.md). Do not adopt a different name or persona. Below is context about the Flyspace platform you're running on.` + (capabilities ? `
|
|
19874
19883
|
|
|
19875
|
-
${capabilities}` :
|
|
19884
|
+
${capabilities}` : "") : [loadSystemPrompt().replaceAll("{{botName}}", botName), capabilities].filter(Boolean).join("\n\n");
|
|
19876
19885
|
const withOutputStyle = outputStyle ? `${withCapabilities}
|
|
19877
19886
|
|
|
19878
19887
|
---
|
|
@@ -19963,7 +19972,8 @@ function buildArgs(prompt, botName, options, resumeSessionId, isolatedStyle) {
|
|
|
19963
19972
|
// Host runs: the CLI applies settings.json's style itself. An isolated run
|
|
19964
19973
|
// cannot see that file, so a custom style's body is injected here instead.
|
|
19965
19974
|
isolatedStyle?.builtIn ? void 0 : isolatedStyle?.body,
|
|
19966
|
-
options.slackBound
|
|
19975
|
+
options.slackBound,
|
|
19976
|
+
options.ownPersona
|
|
19967
19977
|
),
|
|
19968
19978
|
options.memoryPrompt,
|
|
19969
19979
|
docsAccessPromptNote(options.docsAccess, options.docsAccessUnverified)
|
|
@@ -22618,6 +22628,7 @@ async function runAutomation(opts) {
|
|
|
22618
22628
|
model,
|
|
22619
22629
|
maxBudgetUsd,
|
|
22620
22630
|
channelPrompt: resolveChannelPrompt(channel),
|
|
22631
|
+
ownPersona: resolveOwnPersona(channel),
|
|
22621
22632
|
// Nobody is watching a scheduled run: in `ask` mode a blocked call is denied.
|
|
22622
22633
|
permissionMode: resolveChannelPermissionMode(channel),
|
|
22623
22634
|
...memory.memoryPrompt ? { memoryPrompt: memory.memoryPrompt } : {},
|
|
@@ -24650,7 +24661,7 @@ async function withMcpConfig(profile, connectionIds, fn, extraServers = {}) {
|
|
|
24650
24661
|
|
|
24651
24662
|
// ../api/src/version.ts
|
|
24652
24663
|
import { readFileSync as readFileSync7 } from "fs";
|
|
24653
|
-
var CLI_VERSION = true ? "0.1.
|
|
24664
|
+
var CLI_VERSION = true ? "0.1.55" : devVersion();
|
|
24654
24665
|
function isOlderVersion(a, b) {
|
|
24655
24666
|
const parse2 = (v) => v.replace(/^v/, "").split("-")[0].split(".").map(Number);
|
|
24656
24667
|
const [pa, pb] = [parse2(a), parse2(b)];
|
|
@@ -25396,6 +25407,7 @@ function resolveChannelConfig(channelId) {
|
|
|
25396
25407
|
runtime: channel?.runtime ?? "host",
|
|
25397
25408
|
mounts: channel?.mounts ?? [],
|
|
25398
25409
|
permissionMode: resolveChannelPermissionMode(channelId),
|
|
25410
|
+
ownPersona: resolveOwnPersona(channelId),
|
|
25399
25411
|
prompt: channel?.prompt?.trim() || void 0,
|
|
25400
25412
|
codexModel: profileEnv("CUSTIE_CODEX_MODEL")?.trim() || DEFAULT_CODEX_MODEL,
|
|
25401
25413
|
claudeConfigDir: profileClaudeConfigDir(),
|
|
@@ -29245,6 +29257,7 @@ ${content}`;
|
|
|
29245
29257
|
runtime: channelConfig.runtime,
|
|
29246
29258
|
mounts: channelConfig.mounts,
|
|
29247
29259
|
channelPrompt: resolveChannelPrompt(channelId),
|
|
29260
|
+
ownPersona: resolveOwnPersona(channelId),
|
|
29248
29261
|
usageContext: { source: "automation", channelId, label: "export-artifact" }
|
|
29249
29262
|
},
|
|
29250
29263
|
channelConfig.claudeConfigDir,
|
|
@@ -31674,6 +31687,7 @@ ${msg.body}` : expandSkillCommand(channelConfig.claudeConfigDir, channelConfig.c
|
|
|
31674
31687
|
maxBudgetUsd: this.config.maxBudgetUsd,
|
|
31675
31688
|
agentPersona,
|
|
31676
31689
|
channelPrompt: channelConfig.prompt,
|
|
31690
|
+
ownPersona: channelConfig.ownPersona,
|
|
31677
31691
|
slackBound: channelConfig.slackBound,
|
|
31678
31692
|
onActivity,
|
|
31679
31693
|
signal,
|
|
@@ -32619,6 +32633,7 @@ ${trimmedDetail.slice(0, 1500)}
|
|
|
32619
32633
|
// workspace prompt for this channel only — same source the dashboard
|
|
32620
32634
|
// chat path reads through resolveChannelConfig().
|
|
32621
32635
|
channelPrompt: resolveChannelPrompt(channelId),
|
|
32636
|
+
ownPersona: resolveOwnPersona(channelId),
|
|
32622
32637
|
// No prompt tool here: in `ask` mode a blocked call is just denied.
|
|
32623
32638
|
permissionMode: resolveChannelPermissionMode(channelId),
|
|
32624
32639
|
signal: abortController.signal,
|
|
@@ -34212,6 +34227,8 @@ export {
|
|
|
34212
34227
|
getWorkspacePermissionMode,
|
|
34213
34228
|
getWorkspaceAutoContinueLimit,
|
|
34214
34229
|
setWorkspaceAutoContinueLimit,
|
|
34230
|
+
getWorkspaceOwnPersona,
|
|
34231
|
+
setWorkspaceOwnPersona,
|
|
34215
34232
|
setWorkspacePermissionMode,
|
|
34216
34233
|
getAgentPaused,
|
|
34217
34234
|
setAgentPaused,
|
|
@@ -266,6 +266,18 @@ function resolveAutoContinueLimit(channelId) {
|
|
|
266
266
|
const channel = channelId ? findChannel(channelId) : void 0;
|
|
267
267
|
return workspaceAutoContinueLimits.get(channel?.profile ?? getProfile()) ?? DEFAULT_AUTO_CONTINUE_LIMIT;
|
|
268
268
|
}
|
|
269
|
+
var workspaceOwnPersona = /* @__PURE__ */ new Set();
|
|
270
|
+
async function refreshWorkspaceOwnPersona() {
|
|
271
|
+
const { data, error } = await getSupabaseClient().from("workspaces").select("slug, own_persona");
|
|
272
|
+
if (error) return;
|
|
273
|
+
workspaceOwnPersona = new Set(
|
|
274
|
+
(data ?? []).filter((w) => w.own_persona === true).map((w) => w.slug)
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
function resolveOwnPersona(channelId) {
|
|
278
|
+
const channel = channelId ? findChannel(channelId) : void 0;
|
|
279
|
+
return workspaceOwnPersona.has(channel?.profile ?? getProfile());
|
|
280
|
+
}
|
|
269
281
|
async function refreshWorkspacePermissionModes() {
|
|
270
282
|
const { data, error } = await getSupabaseClient().from("workspaces").select("slug, permission_mode");
|
|
271
283
|
if (error) return;
|
|
@@ -387,6 +399,7 @@ async function refreshChannelRegistry() {
|
|
|
387
399
|
await Promise.all([
|
|
388
400
|
refreshWorkspaceRoots(),
|
|
389
401
|
refreshWorkspacePermissionModes(),
|
|
402
|
+
refreshWorkspaceOwnPersona(),
|
|
390
403
|
refreshWorkspaceAutoContinueLimits()
|
|
391
404
|
]);
|
|
392
405
|
if (JSON.stringify([...workspaceRoots]) !== rootsBefore) lastSnapshot = void 0;
|
|
@@ -1195,6 +1208,7 @@ export {
|
|
|
1195
1208
|
isLogicalCwd,
|
|
1196
1209
|
DEFAULT_AUTO_CONTINUE_LIMIT,
|
|
1197
1210
|
resolveAutoContinueLimit,
|
|
1211
|
+
resolveOwnPersona,
|
|
1198
1212
|
resolveLogicalCwd,
|
|
1199
1213
|
isUnderLogicalRoot,
|
|
1200
1214
|
ensureLogicalCwdDir,
|
package/dist/cli.js
CHANGED
|
@@ -106,6 +106,7 @@ import {
|
|
|
106
106
|
getWorkspaceByStripeCustomerId,
|
|
107
107
|
getWorkspaceDomain,
|
|
108
108
|
getWorkspaceGreetedAt,
|
|
109
|
+
getWorkspaceOwnPersona,
|
|
109
110
|
getWorkspacePermissionMode,
|
|
110
111
|
getWorkspacePlanStatus,
|
|
111
112
|
handleAttachmentUrlResult,
|
|
@@ -226,6 +227,7 @@ import {
|
|
|
226
227
|
setProfileConfigCache,
|
|
227
228
|
setWorkspaceArchived,
|
|
228
229
|
setWorkspaceAutoContinueLimit,
|
|
230
|
+
setWorkspaceOwnPersona,
|
|
229
231
|
setWorkspacePermissionMode,
|
|
230
232
|
setWorkspaceStripeSubscription,
|
|
231
233
|
slackConfigured,
|
|
@@ -259,7 +261,7 @@ import {
|
|
|
259
261
|
workspaceHostname,
|
|
260
262
|
workspaceSkillsDir,
|
|
261
263
|
writeSkillFile
|
|
262
|
-
} from "./chunk-
|
|
264
|
+
} from "./chunk-CN6YV335.js";
|
|
263
265
|
import {
|
|
264
266
|
canReadThread,
|
|
265
267
|
firstReplyBody,
|
|
@@ -269,7 +271,7 @@ import {
|
|
|
269
271
|
moveThreadFully,
|
|
270
272
|
resolveChannel,
|
|
271
273
|
resolveThreadOwner
|
|
272
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-44WHW7NK.js";
|
|
273
275
|
import {
|
|
274
276
|
AGENT_AUTHOR,
|
|
275
277
|
ChannelCwdError,
|
|
@@ -315,7 +317,7 @@ import {
|
|
|
315
317
|
updateChannelById,
|
|
316
318
|
updateChannelsMcpConnections,
|
|
317
319
|
warnOnBrokenChannelCwds
|
|
318
|
-
} from "./chunk-
|
|
320
|
+
} from "./chunk-XACRG7BO.js";
|
|
319
321
|
|
|
320
322
|
// ../core/src/logger.ts
|
|
321
323
|
var ALREADY_STAMPED = /^\[\d{4}-\d{2}-\d{2}T/;
|
|
@@ -2357,7 +2359,7 @@ function npmEnv(target) {
|
|
|
2357
2359
|
return nodeBin ? { ...process.env, PATH: `${nodeBin}:${process.env.PATH ?? ""}` } : process.env;
|
|
2358
2360
|
}
|
|
2359
2361
|
async function runUpgrade() {
|
|
2360
|
-
const current = "0.1.
|
|
2362
|
+
const current = "0.1.55";
|
|
2361
2363
|
console.log(`Current version: ${current}`);
|
|
2362
2364
|
console.log("Checking for updates...\n");
|
|
2363
2365
|
try {
|
|
@@ -6285,7 +6287,7 @@ async function runMcpCmd(args) {
|
|
|
6285
6287
|
useHostDbWithoutCredentials();
|
|
6286
6288
|
switch (server) {
|
|
6287
6289
|
case "threads": {
|
|
6288
|
-
const { startThreadsServer } = await import("./threads-
|
|
6290
|
+
const { startThreadsServer } = await import("./threads-I52LSA5X.js");
|
|
6289
6291
|
await startThreadsServer();
|
|
6290
6292
|
return;
|
|
6291
6293
|
}
|
|
@@ -12700,6 +12702,18 @@ function registerDataRoutes(api, agent = {}) {
|
|
|
12700
12702
|
await setWorkspacePermissionMode(auth.workspaceId, body.permissionMode);
|
|
12701
12703
|
return c.json({ permissionMode: body.permissionMode });
|
|
12702
12704
|
});
|
|
12705
|
+
api.get("/own-persona", async (c) => {
|
|
12706
|
+
const auth = c.get("auth");
|
|
12707
|
+
return c.json({ enabled: await getWorkspaceOwnPersona(auth.workspaceId) });
|
|
12708
|
+
});
|
|
12709
|
+
api.put("/own-persona", async (c) => {
|
|
12710
|
+
const auth = c.get("auth");
|
|
12711
|
+
if (auth.role !== "admin") return c.json({ error: "admin access required" }, 403);
|
|
12712
|
+
const body = await c.req.json().catch(() => ({}));
|
|
12713
|
+
if (typeof body.enabled !== "boolean") return c.json({ error: "enabled must be a boolean" }, 400);
|
|
12714
|
+
await setWorkspaceOwnPersona(auth.workspaceId, body.enabled);
|
|
12715
|
+
return c.json({ enabled: body.enabled });
|
|
12716
|
+
});
|
|
12703
12717
|
api.get("/auto-continue", async (c) => {
|
|
12704
12718
|
const auth = c.get("auth");
|
|
12705
12719
|
return c.json({ limit: await getWorkspaceAutoContinueLimit(auth.workspaceId) });
|
|
@@ -15754,7 +15768,7 @@ async function main() {
|
|
|
15754
15768
|
break;
|
|
15755
15769
|
case "-v":
|
|
15756
15770
|
case "--version":
|
|
15757
|
-
printRaw("0.1.
|
|
15771
|
+
printRaw("0.1.55");
|
|
15758
15772
|
break;
|
|
15759
15773
|
case "-h":
|
|
15760
15774
|
case "--help":
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { createRequire as __flyspaceCreateRequire } from 'node:module';
|
|
|
3
3
|
const require = __flyspaceCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
startServer
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-CN6YV335.js";
|
|
7
|
+
import "./chunk-XACRG7BO.js";
|
|
8
8
|
export {
|
|
9
9
|
startServer
|
|
10
10
|
};
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
parseThreadRef,
|
|
10
10
|
resolveThreadOwner,
|
|
11
11
|
threadPath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-44WHW7NK.js";
|
|
13
13
|
import {
|
|
14
14
|
AGENT_AUTHOR,
|
|
15
15
|
getSupabaseClient,
|
|
16
16
|
postToDashboardChannel
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XACRG7BO.js";
|
|
18
18
|
|
|
19
19
|
// src/mcp/servers/threads.ts
|
|
20
20
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|