flyspace-cli 0.1.54 → 0.1.56
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-67WA56OD.js → chunk-XACRG7BO.js} +14 -0
- package/dist/{chunk-ZSRDP5HJ.js → chunk-ZUYZL7Y3.js} +227 -135
- package/dist/cli.js +23 -8
- package/dist/index.js +2 -2
- package/dist/{threads-PTTZUNIJ.js → threads-I52LSA5X.js} +2 -2
- package/package.json +1 -1
|
@@ -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,
|
|
@@ -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.56" : 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)];
|
|
@@ -24908,105 +24919,42 @@ function createHostDbClient(via = "socket") {
|
|
|
24908
24919
|
}
|
|
24909
24920
|
|
|
24910
24921
|
// src/claude/agents.ts
|
|
24911
|
-
import { existsSync as
|
|
24912
|
-
import { homedir as homedir3 } from "os";
|
|
24913
|
-
import { basename as basename2, join as join11 } from "path";
|
|
24914
|
-
import yaml from "js-yaml";
|
|
24915
|
-
function defaultConfigDir() {
|
|
24916
|
-
return join11(homedir3(), ".claude");
|
|
24917
|
-
}
|
|
24918
|
-
function expandHome(p) {
|
|
24919
|
-
if (p === "~") return homedir3();
|
|
24920
|
-
if (p.startsWith("~/")) return join11(homedir3(), p.slice(2));
|
|
24921
|
-
return p;
|
|
24922
|
-
}
|
|
24923
|
-
function parseFrontmatter(file) {
|
|
24924
|
-
let content;
|
|
24925
|
-
try {
|
|
24926
|
-
content = readFileSync9(file, "utf-8");
|
|
24927
|
-
} catch {
|
|
24928
|
-
return {};
|
|
24929
|
-
}
|
|
24930
|
-
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
24931
|
-
if (!match) return {};
|
|
24932
|
-
try {
|
|
24933
|
-
const fm = yaml.load(match[1]);
|
|
24934
|
-
const name = typeof fm?.["name"] === "string" ? fm["name"] : void 0;
|
|
24935
|
-
const description = typeof fm?.["description"] === "string" ? fm["description"] : void 0;
|
|
24936
|
-
return { name, description };
|
|
24937
|
-
} catch {
|
|
24938
|
-
return {};
|
|
24939
|
-
}
|
|
24940
|
-
}
|
|
24941
|
-
function collectFrom(root, source) {
|
|
24942
|
-
if (!existsSync11(root)) return [];
|
|
24943
|
-
let entries2;
|
|
24944
|
-
try {
|
|
24945
|
-
entries2 = readdirSync2(root).filter((f) => f.endsWith(".md"));
|
|
24946
|
-
} catch {
|
|
24947
|
-
return [];
|
|
24948
|
-
}
|
|
24949
|
-
return entries2.map((file) => {
|
|
24950
|
-
const path = join11(root, file);
|
|
24951
|
-
const fm = parseFrontmatter(path);
|
|
24952
|
-
const name = fm.name?.trim() || basename2(file, ".md");
|
|
24953
|
-
return { name, description: (fm.description ?? "").trim(), source, path };
|
|
24954
|
-
});
|
|
24955
|
-
}
|
|
24956
|
-
function listAgents(configDir, cwd) {
|
|
24957
|
-
const base = configDir ? expandHome(configDir) : defaultConfigDir();
|
|
24958
|
-
const collected = [
|
|
24959
|
-
...collectFrom(join11(cwd, ".claude", "agents"), "project"),
|
|
24960
|
-
...collectFrom(join11(base, "agents"), "user")
|
|
24961
|
-
];
|
|
24962
|
-
const byName = /* @__PURE__ */ new Map();
|
|
24963
|
-
for (const agent of collected) {
|
|
24964
|
-
if (agent.name && !byName.has(agent.name)) byName.set(agent.name, agent);
|
|
24965
|
-
}
|
|
24966
|
-
return [...byName.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
24967
|
-
}
|
|
24968
|
-
function readAgentPersona(configDir, cwd, name) {
|
|
24969
|
-
const agent = listAgents(configDir, cwd).find((a) => a.name === name);
|
|
24970
|
-
if (!agent) return void 0;
|
|
24971
|
-
try {
|
|
24972
|
-
const content = readFileSync9(agent.path, "utf-8");
|
|
24973
|
-
return content.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/, "").trim();
|
|
24974
|
-
} catch {
|
|
24975
|
-
return void 0;
|
|
24976
|
-
}
|
|
24977
|
-
}
|
|
24978
|
-
|
|
24979
|
-
// ../api/src/claude/skills.ts
|
|
24980
|
-
import { existsSync as existsSync13, readdirSync as readdirSync4, readFileSync as readFileSync11, statSync as statSync5 } from "fs";
|
|
24922
|
+
import { existsSync as existsSync13, readdirSync as readdirSync4, readFileSync as readFileSync11 } from "fs";
|
|
24981
24923
|
import { homedir as homedir5 } from "os";
|
|
24982
|
-
import { basename as basename3,
|
|
24924
|
+
import { basename as basename3, join as join13 } from "path";
|
|
24983
24925
|
import yaml3 from "js-yaml";
|
|
24984
24926
|
|
|
24927
|
+
// ../api/src/claude/skills.ts
|
|
24928
|
+
import { existsSync as existsSync12, readdirSync as readdirSync3, readFileSync as readFileSync10, statSync as statSync5 } from "fs";
|
|
24929
|
+
import { homedir as homedir4 } from "os";
|
|
24930
|
+
import { basename as basename2, dirname as dirname2, join as join12 } from "path";
|
|
24931
|
+
import yaml2 from "js-yaml";
|
|
24932
|
+
|
|
24985
24933
|
// ../api/src/claude/skill-files.ts
|
|
24986
24934
|
import {
|
|
24987
|
-
existsSync as
|
|
24935
|
+
existsSync as existsSync11,
|
|
24988
24936
|
mkdirSync as mkdirSync8,
|
|
24989
|
-
readFileSync as
|
|
24990
|
-
readdirSync as
|
|
24937
|
+
readFileSync as readFileSync9,
|
|
24938
|
+
readdirSync as readdirSync2,
|
|
24991
24939
|
rmSync as rmSync7,
|
|
24992
24940
|
statSync as statSync4,
|
|
24993
24941
|
writeFileSync as writeFileSync6
|
|
24994
24942
|
} from "fs";
|
|
24995
|
-
import { homedir as
|
|
24996
|
-
import { join as
|
|
24997
|
-
import
|
|
24943
|
+
import { homedir as homedir3 } from "os";
|
|
24944
|
+
import { join as join11, resolve as resolve5, sep as sep2 } from "path";
|
|
24945
|
+
import yaml from "js-yaml";
|
|
24998
24946
|
var MAX_SKILL_BYTES = 2 * 1024 * 1024;
|
|
24999
24947
|
var SKILL_NAME = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/;
|
|
25000
|
-
function
|
|
25001
|
-
if (p === "~") return
|
|
25002
|
-
if (p.startsWith("~/")) return
|
|
24948
|
+
function expandHome(p) {
|
|
24949
|
+
if (p === "~") return homedir3();
|
|
24950
|
+
if (p.startsWith("~/")) return join11(homedir3(), p.slice(2));
|
|
25003
24951
|
return p;
|
|
25004
24952
|
}
|
|
25005
24953
|
function workspaceSkillsDir(configDir) {
|
|
25006
|
-
return
|
|
24954
|
+
return join11(configDir ? expandHome(configDir) : join11(homedir3(), ".claude"), "skills");
|
|
25007
24955
|
}
|
|
25008
24956
|
function channelSkillsDir(cwd) {
|
|
25009
|
-
return
|
|
24957
|
+
return join11(cwd, ".claude", "skills");
|
|
25010
24958
|
}
|
|
25011
24959
|
function isValidSkillName(name) {
|
|
25012
24960
|
return SKILL_NAME.test(name);
|
|
@@ -25022,7 +24970,7 @@ function splitFrontmatter(raw) {
|
|
|
25022
24970
|
if (!match) return { fm: {}, body: raw };
|
|
25023
24971
|
let fm = {};
|
|
25024
24972
|
try {
|
|
25025
|
-
fm =
|
|
24973
|
+
fm = yaml.load(match[1]) ?? {};
|
|
25026
24974
|
} catch {
|
|
25027
24975
|
fm = {};
|
|
25028
24976
|
}
|
|
@@ -25031,7 +24979,7 @@ function splitFrontmatter(raw) {
|
|
|
25031
24979
|
function buildSkillFile(fm, body) {
|
|
25032
24980
|
const { name, description, ...rest } = fm;
|
|
25033
24981
|
const ordered = { name, description, ...rest };
|
|
25034
|
-
const front =
|
|
24982
|
+
const front = yaml.dump(ordered, { lineWidth: -1 }).trimEnd();
|
|
25035
24983
|
return `---
|
|
25036
24984
|
${front}
|
|
25037
24985
|
---
|
|
@@ -25041,7 +24989,7 @@ ${body.replace(/^\n+/, "").trimEnd()}
|
|
|
25041
24989
|
}
|
|
25042
24990
|
function readMeta(abs) {
|
|
25043
24991
|
try {
|
|
25044
|
-
const { fm } = splitFrontmatter(
|
|
24992
|
+
const { fm } = splitFrontmatter(readFileSync9(abs, "utf-8"));
|
|
25045
24993
|
return {
|
|
25046
24994
|
name: typeof fm["name"] === "string" ? fm["name"] : void 0,
|
|
25047
24995
|
description: typeof fm["description"] === "string" ? fm["description"] : void 0
|
|
@@ -25051,17 +24999,17 @@ function readMeta(abs) {
|
|
|
25051
24999
|
}
|
|
25052
25000
|
}
|
|
25053
25001
|
function listSkillFiles(dir) {
|
|
25054
|
-
if (!
|
|
25002
|
+
if (!existsSync11(dir)) return [];
|
|
25055
25003
|
let entries2;
|
|
25056
25004
|
try {
|
|
25057
|
-
entries2 =
|
|
25005
|
+
entries2 = readdirSync2(dir);
|
|
25058
25006
|
} catch {
|
|
25059
25007
|
return [];
|
|
25060
25008
|
}
|
|
25061
25009
|
const rows2 = [];
|
|
25062
25010
|
for (const entry of entries2) {
|
|
25063
25011
|
if (!isValidSkillName(entry)) continue;
|
|
25064
|
-
const abs =
|
|
25012
|
+
const abs = join11(dir, entry, "SKILL.md");
|
|
25065
25013
|
let stat;
|
|
25066
25014
|
try {
|
|
25067
25015
|
stat = statSync4(abs);
|
|
@@ -25090,7 +25038,7 @@ function readSkillFile(dir, name) {
|
|
|
25090
25038
|
return null;
|
|
25091
25039
|
}
|
|
25092
25040
|
if (!stat.isFile() || stat.size > MAX_SKILL_BYTES) return null;
|
|
25093
|
-
const { fm, body } = splitFrontmatter(
|
|
25041
|
+
const { fm, body } = splitFrontmatter(readFileSync9(abs, "utf-8"));
|
|
25094
25042
|
return {
|
|
25095
25043
|
name,
|
|
25096
25044
|
description: typeof fm["description"] === "string" ? fm["description"].trim() : "",
|
|
@@ -25112,7 +25060,7 @@ function writeSkillFile(dir, name, patch, baseMtime) {
|
|
|
25112
25060
|
if (baseMtime && stat.mtime.toISOString() !== baseMtime) {
|
|
25113
25061
|
return { status: "conflict", mtime: stat.mtime.toISOString() };
|
|
25114
25062
|
}
|
|
25115
|
-
const { fm } = splitFrontmatter(
|
|
25063
|
+
const { fm } = splitFrontmatter(readFileSync9(abs, "utf-8"));
|
|
25116
25064
|
const content = buildSkillFile({ ...fm, name, description: patch.description }, patch.body);
|
|
25117
25065
|
if (Buffer.byteLength(content, "utf8") > MAX_SKILL_BYTES) return { status: "too-large" };
|
|
25118
25066
|
writeFileSync6(abs, content, "utf8");
|
|
@@ -25121,8 +25069,8 @@ function writeSkillFile(dir, name, patch, baseMtime) {
|
|
|
25121
25069
|
function createSkillFile(dir, name, description) {
|
|
25122
25070
|
const abs = resolveSkillPath(dir, name);
|
|
25123
25071
|
if (!abs) return { status: "bad-name" };
|
|
25124
|
-
if (
|
|
25125
|
-
mkdirSync8(
|
|
25072
|
+
if (existsSync11(abs)) return { status: "exists" };
|
|
25073
|
+
mkdirSync8(join11(dir, name), { recursive: true });
|
|
25126
25074
|
writeFileSync6(
|
|
25127
25075
|
abs,
|
|
25128
25076
|
buildSkillFile(
|
|
@@ -25139,31 +25087,31 @@ Describe what this skill does and when to use it.
|
|
|
25139
25087
|
}
|
|
25140
25088
|
function deleteSkillFile(dir, name) {
|
|
25141
25089
|
const abs = resolveSkillPath(dir, name);
|
|
25142
|
-
if (!abs || !
|
|
25143
|
-
rmSync7(
|
|
25090
|
+
if (!abs || !existsSync11(abs)) return { status: "not-found" };
|
|
25091
|
+
rmSync7(join11(dir, name), { recursive: true, force: true });
|
|
25144
25092
|
return { status: "ok" };
|
|
25145
25093
|
}
|
|
25146
25094
|
|
|
25147
25095
|
// ../api/src/claude/skills.ts
|
|
25148
|
-
function
|
|
25149
|
-
return
|
|
25096
|
+
function defaultConfigDir() {
|
|
25097
|
+
return join12(homedir4(), ".claude");
|
|
25150
25098
|
}
|
|
25151
|
-
function
|
|
25152
|
-
if (p === "~") return
|
|
25153
|
-
if (p.startsWith("~/")) return
|
|
25099
|
+
function expandHome2(p) {
|
|
25100
|
+
if (p === "~") return homedir4();
|
|
25101
|
+
if (p.startsWith("~/")) return join12(homedir4(), p.slice(2));
|
|
25154
25102
|
return p;
|
|
25155
25103
|
}
|
|
25156
|
-
function
|
|
25104
|
+
function parseFrontmatter(file) {
|
|
25157
25105
|
let content;
|
|
25158
25106
|
try {
|
|
25159
|
-
content =
|
|
25107
|
+
content = readFileSync10(file, "utf-8");
|
|
25160
25108
|
} catch {
|
|
25161
25109
|
return {};
|
|
25162
25110
|
}
|
|
25163
25111
|
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
25164
25112
|
if (!match) return {};
|
|
25165
25113
|
try {
|
|
25166
|
-
const fm =
|
|
25114
|
+
const fm = yaml2.load(match[1]);
|
|
25167
25115
|
const name = typeof fm?.["name"] === "string" ? fm["name"] : void 0;
|
|
25168
25116
|
const description = typeof fm?.["description"] === "string" ? fm["description"] : void 0;
|
|
25169
25117
|
return { name, description };
|
|
@@ -25174,25 +25122,25 @@ function parseFrontmatter2(file) {
|
|
|
25174
25122
|
function isSymlinkedDir(root, entry) {
|
|
25175
25123
|
if (!entry.isSymbolicLink()) return false;
|
|
25176
25124
|
try {
|
|
25177
|
-
return statSync5(
|
|
25125
|
+
return statSync5(join12(root, entry.name)).isDirectory();
|
|
25178
25126
|
} catch {
|
|
25179
25127
|
return false;
|
|
25180
25128
|
}
|
|
25181
25129
|
}
|
|
25182
25130
|
function findSkillFiles(root, maxDepth, out) {
|
|
25183
|
-
if (maxDepth < 0 || !
|
|
25131
|
+
if (maxDepth < 0 || !existsSync12(root)) return;
|
|
25184
25132
|
let entries2;
|
|
25185
25133
|
try {
|
|
25186
|
-
entries2 =
|
|
25134
|
+
entries2 = readdirSync3(root, { withFileTypes: true });
|
|
25187
25135
|
} catch {
|
|
25188
25136
|
return;
|
|
25189
25137
|
}
|
|
25190
25138
|
for (const entry of entries2) {
|
|
25191
25139
|
if (entry.isFile()) {
|
|
25192
|
-
if (entry.name === "SKILL.md") out.push(
|
|
25140
|
+
if (entry.name === "SKILL.md") out.push(join12(root, entry.name));
|
|
25193
25141
|
} else if (entry.isDirectory() || isSymlinkedDir(root, entry)) {
|
|
25194
25142
|
if (entry.name === "node_modules" || entry.name.startsWith(".")) continue;
|
|
25195
|
-
findSkillFiles(
|
|
25143
|
+
findSkillFiles(join12(root, entry.name), maxDepth - 1, out);
|
|
25196
25144
|
}
|
|
25197
25145
|
}
|
|
25198
25146
|
}
|
|
@@ -25201,7 +25149,7 @@ function pluginNameFor(file, root) {
|
|
|
25201
25149
|
while (dir.startsWith(root) && dir !== dirname2(dir)) {
|
|
25202
25150
|
try {
|
|
25203
25151
|
const manifest = JSON.parse(
|
|
25204
|
-
|
|
25152
|
+
readFileSync10(join12(dir, ".claude-plugin", "plugin.json"), "utf-8")
|
|
25205
25153
|
);
|
|
25206
25154
|
if (typeof manifest.name === "string" && manifest.name.trim()) return manifest.name.trim();
|
|
25207
25155
|
} catch {
|
|
@@ -25210,12 +25158,73 @@ function pluginNameFor(file, root) {
|
|
|
25210
25158
|
}
|
|
25211
25159
|
return void 0;
|
|
25212
25160
|
}
|
|
25213
|
-
function
|
|
25161
|
+
function findPluginMarkdown(pluginsRoot, dirName, maxDepth = 8) {
|
|
25162
|
+
const out = [];
|
|
25163
|
+
const walk = (dir, depth) => {
|
|
25164
|
+
if (depth < 0) return;
|
|
25165
|
+
let entries2;
|
|
25166
|
+
try {
|
|
25167
|
+
entries2 = readdirSync3(dir, { withFileTypes: true });
|
|
25168
|
+
} catch {
|
|
25169
|
+
return;
|
|
25170
|
+
}
|
|
25171
|
+
for (const entry of entries2) {
|
|
25172
|
+
if (entry.name === "node_modules" || entry.name.startsWith(".")) continue;
|
|
25173
|
+
if (!entry.isDirectory() && !isSymlinkedDir(dir, entry)) continue;
|
|
25174
|
+
const child = join12(dir, entry.name);
|
|
25175
|
+
if (entry.name === dirName) {
|
|
25176
|
+
for (const f of readdirSafe(child)) {
|
|
25177
|
+
if (f.endsWith(".md")) out.push({ file: join12(child, f), plugin: pluginNameFor(join12(child, f), pluginsRoot) });
|
|
25178
|
+
}
|
|
25179
|
+
} else {
|
|
25180
|
+
walk(child, depth - 1);
|
|
25181
|
+
}
|
|
25182
|
+
}
|
|
25183
|
+
};
|
|
25184
|
+
if (existsSync12(pluginsRoot)) walk(pluginsRoot, maxDepth);
|
|
25185
|
+
return out;
|
|
25186
|
+
}
|
|
25187
|
+
function readdirSafe(dir) {
|
|
25188
|
+
try {
|
|
25189
|
+
return readdirSync3(dir);
|
|
25190
|
+
} catch {
|
|
25191
|
+
return [];
|
|
25192
|
+
}
|
|
25193
|
+
}
|
|
25194
|
+
function listCommands(configDir, cwd) {
|
|
25195
|
+
const base = configDir ? expandHome2(configDir) : defaultConfigDir();
|
|
25196
|
+
const local = (dir, source) => readdirSafe(dir).filter((f) => f.endsWith(".md")).map((f) => ({
|
|
25197
|
+
name: basename2(f, ".md"),
|
|
25198
|
+
description: (parseFrontmatter(join12(dir, f)).description ?? "").trim(),
|
|
25199
|
+
source,
|
|
25200
|
+
kind: "command"
|
|
25201
|
+
}));
|
|
25202
|
+
const collected = [
|
|
25203
|
+
...local(join12(cwd, ".claude", "commands"), "project"),
|
|
25204
|
+
...local(join12(base, "commands"), "user"),
|
|
25205
|
+
...findPluginMarkdown(join12(base, "plugins"), "commands").map(({ file, plugin }) => ({
|
|
25206
|
+
name: plugin ? `${plugin}:${basename2(file, ".md")}` : basename2(file, ".md"),
|
|
25207
|
+
description: (parseFrontmatter(file).description ?? "").trim(),
|
|
25208
|
+
source: "plugin",
|
|
25209
|
+
...plugin && { plugin },
|
|
25210
|
+
kind: "command"
|
|
25211
|
+
}))
|
|
25212
|
+
];
|
|
25213
|
+
const byName = /* @__PURE__ */ new Map();
|
|
25214
|
+
for (const c of collected) if (!byName.has(c.name)) byName.set(c.name, c);
|
|
25215
|
+
return [...byName.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
25216
|
+
}
|
|
25217
|
+
function listSlashItems(configDir, cwd) {
|
|
25218
|
+
const skills = listSkills(configDir, cwd);
|
|
25219
|
+
const taken = new Set(skills.map((s) => s.name));
|
|
25220
|
+
return [...skills, ...listCommands(configDir, cwd).filter((c) => !taken.has(c.name))];
|
|
25221
|
+
}
|
|
25222
|
+
function collectFrom(root, source, maxDepth, namePrefix) {
|
|
25214
25223
|
const files = [];
|
|
25215
25224
|
findSkillFiles(root, maxDepth, files);
|
|
25216
25225
|
return files.map((file) => {
|
|
25217
|
-
const fm =
|
|
25218
|
-
const name = fm.name?.trim() ||
|
|
25226
|
+
const fm = parseFrontmatter(file);
|
|
25227
|
+
const name = fm.name?.trim() || basename2(dirname2(file));
|
|
25219
25228
|
const plugin = source === "plugin" ? pluginNameFor(file, root) : void 0;
|
|
25220
25229
|
const prefix = namePrefix ?? plugin;
|
|
25221
25230
|
return {
|
|
@@ -25229,12 +25238,12 @@ function collectFrom2(root, source, maxDepth, namePrefix) {
|
|
|
25229
25238
|
});
|
|
25230
25239
|
}
|
|
25231
25240
|
function collectAll(configDir, cwd) {
|
|
25232
|
-
const base = configDir ?
|
|
25241
|
+
const base = configDir ? expandHome2(configDir) : defaultConfigDir();
|
|
25233
25242
|
const collected = [
|
|
25234
|
-
...
|
|
25235
|
-
...nestedProjectRoots(cwd).flatMap(({ dir, prefix }) =>
|
|
25236
|
-
...
|
|
25237
|
-
...
|
|
25243
|
+
...collectFrom(join12(cwd, ".claude", "skills"), "project", 2),
|
|
25244
|
+
...nestedProjectRoots(cwd).flatMap(({ dir, prefix }) => collectFrom(dir, "project", 2, prefix)),
|
|
25245
|
+
...collectFrom(join12(base, "skills"), "user", 2),
|
|
25246
|
+
...collectFrom(join12(base, "plugins"), "plugin", 8)
|
|
25238
25247
|
];
|
|
25239
25248
|
const byName = /* @__PURE__ */ new Map();
|
|
25240
25249
|
for (const skill of collected) {
|
|
@@ -25245,7 +25254,7 @@ function collectAll(configDir, cwd) {
|
|
|
25245
25254
|
function nestedProjectRoots(cwd) {
|
|
25246
25255
|
let entries2;
|
|
25247
25256
|
try {
|
|
25248
|
-
entries2 =
|
|
25257
|
+
entries2 = readdirSync3(cwd, { withFileTypes: true });
|
|
25249
25258
|
} catch {
|
|
25250
25259
|
return [];
|
|
25251
25260
|
}
|
|
@@ -25253,8 +25262,8 @@ function nestedProjectRoots(cwd) {
|
|
|
25253
25262
|
for (const entry of entries2) {
|
|
25254
25263
|
if (entry.name.startsWith(".") || entry.name === "node_modules") continue;
|
|
25255
25264
|
if (!entry.isDirectory() && !isSymlinkedDir(cwd, entry)) continue;
|
|
25256
|
-
const skillsDir =
|
|
25257
|
-
if (
|
|
25265
|
+
const skillsDir = join12(cwd, entry.name, ".claude", "skills");
|
|
25266
|
+
if (existsSync12(skillsDir)) roots.push({ dir: skillsDir, prefix: entry.name });
|
|
25258
25267
|
}
|
|
25259
25268
|
return roots;
|
|
25260
25269
|
}
|
|
@@ -25266,7 +25275,7 @@ function listPluginSkillDetails(configDir, cwd) {
|
|
|
25266
25275
|
for (const { file, ...skill } of collectAll(configDir, cwd)) {
|
|
25267
25276
|
if (skill.source !== "plugin") continue;
|
|
25268
25277
|
try {
|
|
25269
|
-
const { body } = splitFrontmatter(
|
|
25278
|
+
const { body } = splitFrontmatter(readFileSync10(file, "utf-8"));
|
|
25270
25279
|
details.push({ ...skill, body, path: file, mtime: statSync5(file).mtime.toISOString() });
|
|
25271
25280
|
} catch {
|
|
25272
25281
|
}
|
|
@@ -25274,25 +25283,25 @@ function listPluginSkillDetails(configDir, cwd) {
|
|
|
25274
25283
|
return details;
|
|
25275
25284
|
}
|
|
25276
25285
|
function findSkillDetail(configDir, cwd, name, sources) {
|
|
25277
|
-
const base = configDir ?
|
|
25286
|
+
const base = configDir ? expandHome2(configDir) : defaultConfigDir();
|
|
25278
25287
|
const roots = [
|
|
25279
|
-
[
|
|
25288
|
+
[join12(cwd, ".claude", "skills"), "project", 2],
|
|
25280
25289
|
...nestedProjectRoots(cwd).map(({ dir, prefix }) => [
|
|
25281
25290
|
dir,
|
|
25282
25291
|
"project",
|
|
25283
25292
|
2,
|
|
25284
25293
|
prefix
|
|
25285
25294
|
]),
|
|
25286
|
-
[
|
|
25287
|
-
[
|
|
25295
|
+
[join12(base, "skills"), "user", 2],
|
|
25296
|
+
[join12(base, "plugins"), "plugin", 8]
|
|
25288
25297
|
];
|
|
25289
25298
|
for (const [root, source, maxDepth, namePrefix] of roots) {
|
|
25290
25299
|
if (!sources.includes(source)) continue;
|
|
25291
25300
|
const files = [];
|
|
25292
25301
|
findSkillFiles(root, maxDepth, files);
|
|
25293
25302
|
for (const file of files) {
|
|
25294
|
-
const fm =
|
|
25295
|
-
const rawName = fm.name?.trim() ||
|
|
25303
|
+
const fm = parseFrontmatter(file);
|
|
25304
|
+
const rawName = fm.name?.trim() || basename2(dirname2(file));
|
|
25296
25305
|
const plugin = source === "plugin" ? pluginNameFor(file, root) : void 0;
|
|
25297
25306
|
const prefix = namePrefix ?? plugin;
|
|
25298
25307
|
const skillName = prefix ? `${prefix}:${rawName}` : rawName;
|
|
@@ -25300,7 +25309,7 @@ function findSkillDetail(configDir, cwd, name, sources) {
|
|
|
25300
25309
|
let raw;
|
|
25301
25310
|
let mtime;
|
|
25302
25311
|
try {
|
|
25303
|
-
raw =
|
|
25312
|
+
raw = readFileSync10(file, "utf-8");
|
|
25304
25313
|
mtime = statSync5(file).mtime.toISOString();
|
|
25305
25314
|
} catch {
|
|
25306
25315
|
continue;
|
|
@@ -25333,6 +25342,82 @@ ARGUMENTS: ${args}` : "");
|
|
|
25333
25342
|
${body.trim()}`;
|
|
25334
25343
|
}
|
|
25335
25344
|
|
|
25345
|
+
// src/claude/agents.ts
|
|
25346
|
+
function defaultConfigDir2() {
|
|
25347
|
+
return join13(homedir5(), ".claude");
|
|
25348
|
+
}
|
|
25349
|
+
function expandHome3(p) {
|
|
25350
|
+
if (p === "~") return homedir5();
|
|
25351
|
+
if (p.startsWith("~/")) return join13(homedir5(), p.slice(2));
|
|
25352
|
+
return p;
|
|
25353
|
+
}
|
|
25354
|
+
function parseFrontmatter2(file) {
|
|
25355
|
+
let content;
|
|
25356
|
+
try {
|
|
25357
|
+
content = readFileSync11(file, "utf-8");
|
|
25358
|
+
} catch {
|
|
25359
|
+
return {};
|
|
25360
|
+
}
|
|
25361
|
+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
25362
|
+
if (!match) return {};
|
|
25363
|
+
try {
|
|
25364
|
+
const fm = yaml3.load(match[1]);
|
|
25365
|
+
const name = typeof fm?.["name"] === "string" ? fm["name"] : void 0;
|
|
25366
|
+
const description = typeof fm?.["description"] === "string" ? fm["description"] : void 0;
|
|
25367
|
+
return { name, description };
|
|
25368
|
+
} catch {
|
|
25369
|
+
return {};
|
|
25370
|
+
}
|
|
25371
|
+
}
|
|
25372
|
+
function collectFrom2(root, source) {
|
|
25373
|
+
if (!existsSync13(root)) return [];
|
|
25374
|
+
let entries2;
|
|
25375
|
+
try {
|
|
25376
|
+
entries2 = readdirSync4(root).filter((f) => f.endsWith(".md"));
|
|
25377
|
+
} catch {
|
|
25378
|
+
return [];
|
|
25379
|
+
}
|
|
25380
|
+
return entries2.map((file) => {
|
|
25381
|
+
const path = join13(root, file);
|
|
25382
|
+
const fm = parseFrontmatter2(path);
|
|
25383
|
+
const name = fm.name?.trim() || basename3(file, ".md");
|
|
25384
|
+
return { name, description: (fm.description ?? "").trim(), source, path };
|
|
25385
|
+
});
|
|
25386
|
+
}
|
|
25387
|
+
function listAgents(configDir, cwd) {
|
|
25388
|
+
const base = configDir ? expandHome3(configDir) : defaultConfigDir2();
|
|
25389
|
+
const collected = [
|
|
25390
|
+
...collectFrom2(join13(cwd, ".claude", "agents"), "project"),
|
|
25391
|
+
...collectFrom2(join13(base, "agents"), "user"),
|
|
25392
|
+
// Plugin agents, namespaced `plugin:agent` the way the CLI lists them.
|
|
25393
|
+
...findPluginMarkdown(join13(base, "plugins"), "agents").map(({ file, plugin }) => {
|
|
25394
|
+
const fm = parseFrontmatter2(file);
|
|
25395
|
+
const name = fm.name?.trim() || basename3(file, ".md");
|
|
25396
|
+
return {
|
|
25397
|
+
name: plugin ? `${plugin}:${name}` : name,
|
|
25398
|
+
description: (fm.description ?? "").trim(),
|
|
25399
|
+
source: "plugin",
|
|
25400
|
+
path: file
|
|
25401
|
+
};
|
|
25402
|
+
})
|
|
25403
|
+
];
|
|
25404
|
+
const byName = /* @__PURE__ */ new Map();
|
|
25405
|
+
for (const agent of collected) {
|
|
25406
|
+
if (agent.name && !byName.has(agent.name)) byName.set(agent.name, agent);
|
|
25407
|
+
}
|
|
25408
|
+
return [...byName.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
25409
|
+
}
|
|
25410
|
+
function readAgentPersona(configDir, cwd, name) {
|
|
25411
|
+
const agent = listAgents(configDir, cwd).find((a) => a.name === name);
|
|
25412
|
+
if (!agent) return void 0;
|
|
25413
|
+
try {
|
|
25414
|
+
const content = readFileSync11(agent.path, "utf-8");
|
|
25415
|
+
return content.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/, "").trim();
|
|
25416
|
+
} catch {
|
|
25417
|
+
return void 0;
|
|
25418
|
+
}
|
|
25419
|
+
}
|
|
25420
|
+
|
|
25336
25421
|
// src/dashboard/memory-extraction-runner.ts
|
|
25337
25422
|
import { spawn as spawn4 } from "child_process";
|
|
25338
25423
|
import { existsSync as existsSync14, mkdtempSync as mkdtempSync4, readFileSync as readFileSync12, rmSync as rmSync8 } from "fs";
|
|
@@ -25396,6 +25481,7 @@ function resolveChannelConfig(channelId) {
|
|
|
25396
25481
|
runtime: channel?.runtime ?? "host",
|
|
25397
25482
|
mounts: channel?.mounts ?? [],
|
|
25398
25483
|
permissionMode: resolveChannelPermissionMode(channelId),
|
|
25484
|
+
ownPersona: resolveOwnPersona(channelId),
|
|
25399
25485
|
prompt: channel?.prompt?.trim() || void 0,
|
|
25400
25486
|
codexModel: profileEnv("CUSTIE_CODEX_MODEL")?.trim() || DEFAULT_CODEX_MODEL,
|
|
25401
25487
|
claudeConfigDir: profileClaudeConfigDir(),
|
|
@@ -29245,6 +29331,7 @@ ${content}`;
|
|
|
29245
29331
|
runtime: channelConfig.runtime,
|
|
29246
29332
|
mounts: channelConfig.mounts,
|
|
29247
29333
|
channelPrompt: resolveChannelPrompt(channelId),
|
|
29334
|
+
ownPersona: resolveOwnPersona(channelId),
|
|
29248
29335
|
usageContext: { source: "automation", channelId, label: "export-artifact" }
|
|
29249
29336
|
},
|
|
29250
29337
|
channelConfig.claudeConfigDir,
|
|
@@ -31674,6 +31761,7 @@ ${msg.body}` : expandSkillCommand(channelConfig.claudeConfigDir, channelConfig.c
|
|
|
31674
31761
|
maxBudgetUsd: this.config.maxBudgetUsd,
|
|
31675
31762
|
agentPersona,
|
|
31676
31763
|
channelPrompt: channelConfig.prompt,
|
|
31764
|
+
ownPersona: channelConfig.ownPersona,
|
|
31677
31765
|
slackBound: channelConfig.slackBound,
|
|
31678
31766
|
onActivity,
|
|
31679
31767
|
signal,
|
|
@@ -32619,6 +32707,7 @@ ${trimmedDetail.slice(0, 1500)}
|
|
|
32619
32707
|
// workspace prompt for this channel only — same source the dashboard
|
|
32620
32708
|
// chat path reads through resolveChannelConfig().
|
|
32621
32709
|
channelPrompt: resolveChannelPrompt(channelId),
|
|
32710
|
+
ownPersona: resolveOwnPersona(channelId),
|
|
32622
32711
|
// No prompt tool here: in `ask` mode a blocked call is just denied.
|
|
32623
32712
|
permissionMode: resolveChannelPermissionMode(channelId),
|
|
32624
32713
|
signal: abortController.signal,
|
|
@@ -34212,6 +34301,8 @@ export {
|
|
|
34212
34301
|
getWorkspacePermissionMode,
|
|
34213
34302
|
getWorkspaceAutoContinueLimit,
|
|
34214
34303
|
setWorkspaceAutoContinueLimit,
|
|
34304
|
+
getWorkspaceOwnPersona,
|
|
34305
|
+
setWorkspaceOwnPersona,
|
|
34215
34306
|
setWorkspacePermissionMode,
|
|
34216
34307
|
getAgentPaused,
|
|
34217
34308
|
setAgentPaused,
|
|
@@ -34327,7 +34418,6 @@ export {
|
|
|
34327
34418
|
handleShouldRespondResult,
|
|
34328
34419
|
LOCAL_DB_PATH,
|
|
34329
34420
|
createHostDbClient,
|
|
34330
|
-
listAgents,
|
|
34331
34421
|
workspaceSkillsDir,
|
|
34332
34422
|
channelSkillsDir,
|
|
34333
34423
|
isValidSkillName,
|
|
@@ -34336,9 +34426,11 @@ export {
|
|
|
34336
34426
|
writeSkillFile,
|
|
34337
34427
|
createSkillFile,
|
|
34338
34428
|
deleteSkillFile,
|
|
34429
|
+
listSlashItems,
|
|
34339
34430
|
listSkills,
|
|
34340
34431
|
listPluginSkillDetails,
|
|
34341
34432
|
findSkillDetail,
|
|
34433
|
+
listAgents,
|
|
34342
34434
|
setProfileConfigCache,
|
|
34343
34435
|
cachedProfileConfig,
|
|
34344
34436
|
profileEnv,
|
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,
|
|
@@ -147,6 +148,7 @@ import {
|
|
|
147
148
|
listPluginSkillDetails,
|
|
148
149
|
listSkillFiles,
|
|
149
150
|
listSkills,
|
|
151
|
+
listSlashItems,
|
|
150
152
|
listThreadMemoryEvents,
|
|
151
153
|
listWorkspaceSummaries,
|
|
152
154
|
listWorkspaces,
|
|
@@ -226,6 +228,7 @@ import {
|
|
|
226
228
|
setProfileConfigCache,
|
|
227
229
|
setWorkspaceArchived,
|
|
228
230
|
setWorkspaceAutoContinueLimit,
|
|
231
|
+
setWorkspaceOwnPersona,
|
|
229
232
|
setWorkspacePermissionMode,
|
|
230
233
|
setWorkspaceStripeSubscription,
|
|
231
234
|
slackConfigured,
|
|
@@ -259,7 +262,7 @@ import {
|
|
|
259
262
|
workspaceHostname,
|
|
260
263
|
workspaceSkillsDir,
|
|
261
264
|
writeSkillFile
|
|
262
|
-
} from "./chunk-
|
|
265
|
+
} from "./chunk-ZUYZL7Y3.js";
|
|
263
266
|
import {
|
|
264
267
|
canReadThread,
|
|
265
268
|
firstReplyBody,
|
|
@@ -269,7 +272,7 @@ import {
|
|
|
269
272
|
moveThreadFully,
|
|
270
273
|
resolveChannel,
|
|
271
274
|
resolveThreadOwner
|
|
272
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-44WHW7NK.js";
|
|
273
276
|
import {
|
|
274
277
|
AGENT_AUTHOR,
|
|
275
278
|
ChannelCwdError,
|
|
@@ -315,7 +318,7 @@ import {
|
|
|
315
318
|
updateChannelById,
|
|
316
319
|
updateChannelsMcpConnections,
|
|
317
320
|
warnOnBrokenChannelCwds
|
|
318
|
-
} from "./chunk-
|
|
321
|
+
} from "./chunk-XACRG7BO.js";
|
|
319
322
|
|
|
320
323
|
// ../core/src/logger.ts
|
|
321
324
|
var ALREADY_STAMPED = /^\[\d{4}-\d{2}-\d{2}T/;
|
|
@@ -2357,7 +2360,7 @@ function npmEnv(target) {
|
|
|
2357
2360
|
return nodeBin ? { ...process.env, PATH: `${nodeBin}:${process.env.PATH ?? ""}` } : process.env;
|
|
2358
2361
|
}
|
|
2359
2362
|
async function runUpgrade() {
|
|
2360
|
-
const current = "0.1.
|
|
2363
|
+
const current = "0.1.56";
|
|
2361
2364
|
console.log(`Current version: ${current}`);
|
|
2362
2365
|
console.log("Checking for updates...\n");
|
|
2363
2366
|
try {
|
|
@@ -6285,7 +6288,7 @@ async function runMcpCmd(args) {
|
|
|
6285
6288
|
useHostDbWithoutCredentials();
|
|
6286
6289
|
switch (server) {
|
|
6287
6290
|
case "threads": {
|
|
6288
|
-
const { startThreadsServer } = await import("./threads-
|
|
6291
|
+
const { startThreadsServer } = await import("./threads-I52LSA5X.js");
|
|
6289
6292
|
await startThreadsServer();
|
|
6290
6293
|
return;
|
|
6291
6294
|
}
|
|
@@ -12700,6 +12703,18 @@ function registerDataRoutes(api, agent = {}) {
|
|
|
12700
12703
|
await setWorkspacePermissionMode(auth.workspaceId, body.permissionMode);
|
|
12701
12704
|
return c.json({ permissionMode: body.permissionMode });
|
|
12702
12705
|
});
|
|
12706
|
+
api.get("/own-persona", async (c) => {
|
|
12707
|
+
const auth = c.get("auth");
|
|
12708
|
+
return c.json({ enabled: await getWorkspaceOwnPersona(auth.workspaceId) });
|
|
12709
|
+
});
|
|
12710
|
+
api.put("/own-persona", async (c) => {
|
|
12711
|
+
const auth = c.get("auth");
|
|
12712
|
+
if (auth.role !== "admin") return c.json({ error: "admin access required" }, 403);
|
|
12713
|
+
const body = await c.req.json().catch(() => ({}));
|
|
12714
|
+
if (typeof body.enabled !== "boolean") return c.json({ error: "enabled must be a boolean" }, 400);
|
|
12715
|
+
await setWorkspaceOwnPersona(auth.workspaceId, body.enabled);
|
|
12716
|
+
return c.json({ enabled: body.enabled });
|
|
12717
|
+
});
|
|
12703
12718
|
api.get("/auto-continue", async (c) => {
|
|
12704
12719
|
const auth = c.get("auth");
|
|
12705
12720
|
return c.json({ limit: await getWorkspaceAutoContinueLimit(auth.workspaceId) });
|
|
@@ -14087,7 +14102,7 @@ async function handleProviderLoginRequest(req) {
|
|
|
14087
14102
|
function registerHostRoutes(api) {
|
|
14088
14103
|
api.get("/channels/:id/skills", (c) => {
|
|
14089
14104
|
const { cwd, claudeConfigDir } = resolveChannelConfig(c.req.param("id"));
|
|
14090
|
-
return c.json({ skills:
|
|
14105
|
+
return c.json({ skills: listSlashItems(claudeConfigDir, cwd) });
|
|
14091
14106
|
});
|
|
14092
14107
|
api.get("/channels/:id/agents", (c) => {
|
|
14093
14108
|
const { cwd, claudeConfigDir } = resolveChannelConfig(c.req.param("id"));
|
|
@@ -14855,7 +14870,7 @@ function localAgentCallbacks(chatAgent) {
|
|
|
14855
14870
|
readDocShareBundle: (req) => readDocShareBundle(req.channelId ? { ...req, cwd: resolveChannelConfig(req.channelId).cwd } : req),
|
|
14856
14871
|
listChannelSkills: (args) => {
|
|
14857
14872
|
const { cwd, claudeConfigDir } = args.channelId ? resolveChannelConfig(args.channelId) : args;
|
|
14858
|
-
return
|
|
14873
|
+
return listSlashItems(claudeConfigDir, cwd);
|
|
14859
14874
|
},
|
|
14860
14875
|
listFlatDocs: (args) => flatDocs(args.channelId ? resolveChannelConfig(args.channelId).cwd : args.cwd, { query: args.query, sort: args.sort, showHidden: args.showHidden }),
|
|
14861
14876
|
getLocalDashboardSettings: () => loadDashboardSettings(),
|
|
@@ -15754,7 +15769,7 @@ async function main() {
|
|
|
15754
15769
|
break;
|
|
15755
15770
|
case "-v":
|
|
15756
15771
|
case "--version":
|
|
15757
|
-
printRaw("0.1.
|
|
15772
|
+
printRaw("0.1.56");
|
|
15758
15773
|
break;
|
|
15759
15774
|
case "-h":
|
|
15760
15775
|
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-ZUYZL7Y3.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";
|