flyspace-cli 0.1.44 → 0.1.46
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-IWB2S3CJ.js → chunk-5MCLO4QM.js} +4 -1
- package/dist/cli.js +31 -28
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/system.capabilities.md +1 -0
|
@@ -1151,6 +1151,9 @@ function resolveModelAlias(model) {
|
|
|
1151
1151
|
// ../api/src/utils/mise-env.ts
|
|
1152
1152
|
import { execFileSync as execFileSync3 } from "child_process";
|
|
1153
1153
|
function resolveMiseEnv(cwd) {
|
|
1154
|
+
return { ...readMiseEnv(cwd), FLYSPACE_WORKSPACE: getProfile() };
|
|
1155
|
+
}
|
|
1156
|
+
function readMiseEnv(cwd) {
|
|
1154
1157
|
try {
|
|
1155
1158
|
const miseJson = execFileSync3("mise", ["env", "--json"], {
|
|
1156
1159
|
cwd,
|
|
@@ -1161,7 +1164,7 @@ function resolveMiseEnv(cwd) {
|
|
|
1161
1164
|
const miseEnv = JSON.parse(miseJson);
|
|
1162
1165
|
return { ...process.env, ...miseEnv };
|
|
1163
1166
|
} catch {
|
|
1164
|
-
return process.env;
|
|
1167
|
+
return { ...process.env };
|
|
1165
1168
|
}
|
|
1166
1169
|
}
|
|
1167
1170
|
|
package/dist/cli.js
CHANGED
|
@@ -191,7 +191,7 @@ import {
|
|
|
191
191
|
warnOnBrokenChannelCwds,
|
|
192
192
|
workspaceSkillsDir,
|
|
193
193
|
writeSkillFile
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-5MCLO4QM.js";
|
|
195
195
|
import {
|
|
196
196
|
firstReplyBody,
|
|
197
197
|
getThread,
|
|
@@ -19492,7 +19492,7 @@ async function runAuthCmd(args) {
|
|
|
19492
19492
|
|
|
19493
19493
|
// ../api/src/version.ts
|
|
19494
19494
|
import { readFileSync as readFileSync8 } from "fs";
|
|
19495
|
-
var CLI_VERSION = true ? "0.1.
|
|
19495
|
+
var CLI_VERSION = true ? "0.1.46" : devVersion();
|
|
19496
19496
|
function isOlderVersion(a, b) {
|
|
19497
19497
|
const parse = (v) => v.replace(/^v/, "").split("-")[0].split(".").map(Number);
|
|
19498
19498
|
const [pa, pb] = [parse(a), parse(b)];
|
|
@@ -20120,7 +20120,7 @@ function npmEnv(target) {
|
|
|
20120
20120
|
return nodeBin ? { ...process.env, PATH: `${nodeBin}:${process.env.PATH ?? ""}` } : process.env;
|
|
20121
20121
|
}
|
|
20122
20122
|
async function runUpgrade() {
|
|
20123
|
-
const current = "0.1.
|
|
20123
|
+
const current = "0.1.46";
|
|
20124
20124
|
console.log(`Current version: ${current}`);
|
|
20125
20125
|
console.log("Checking for updates...\n");
|
|
20126
20126
|
try {
|
|
@@ -27530,6 +27530,27 @@ async function ensureGreetingThread(workspaceId, channelId, ownerName) {
|
|
|
27530
27530
|
return error2?.code === "23505" ? (await existing()).data?.id ?? null : null;
|
|
27531
27531
|
}
|
|
27532
27532
|
|
|
27533
|
+
// ../api/src/dashboard/admin-middleware.ts
|
|
27534
|
+
function platformAdminEmails() {
|
|
27535
|
+
const raw = process.env["PLATFORM_ADMIN_EMAILS"] ?? "";
|
|
27536
|
+
return new Set(
|
|
27537
|
+
raw.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean)
|
|
27538
|
+
);
|
|
27539
|
+
}
|
|
27540
|
+
var requirePlatformOperator = async (c, next) => {
|
|
27541
|
+
const supabase = createRequestSupabaseClient(c);
|
|
27542
|
+
const {
|
|
27543
|
+
data: { user }
|
|
27544
|
+
} = await supabase.auth.getUser();
|
|
27545
|
+
if (!user?.email) return c.json({ error: "not signed in" }, 401);
|
|
27546
|
+
const email = user.email.trim().toLowerCase();
|
|
27547
|
+
if (!platformAdminEmails().has(email)) {
|
|
27548
|
+
return c.json({ error: "platform operator access required" }, 403);
|
|
27549
|
+
}
|
|
27550
|
+
c.set("platformOperator", { userId: user.id, email });
|
|
27551
|
+
return next();
|
|
27552
|
+
};
|
|
27553
|
+
|
|
27533
27554
|
// ../api/src/dashboard/auth-routes.ts
|
|
27534
27555
|
function createAuthRouter() {
|
|
27535
27556
|
const auth = new Hono9();
|
|
@@ -27543,10 +27564,15 @@ function createAuthRouter() {
|
|
|
27543
27564
|
const workspace = await getWorkspaceBySlug(getProfile());
|
|
27544
27565
|
if (!workspace) return c.json({ error: "unknown workspace" }, 404);
|
|
27545
27566
|
const membership = await getMembershipByEmail(workspace.id, email);
|
|
27546
|
-
|
|
27567
|
+
const operator = !membership && platformAdminEmails().has(email);
|
|
27568
|
+
if (!membership && !operator) {
|
|
27547
27569
|
return c.json({ error: "no access \u2014 ask an admin to invite you" }, 403);
|
|
27548
27570
|
}
|
|
27549
27571
|
try {
|
|
27572
|
+
if (operator) {
|
|
27573
|
+
const { error: error2 } = await getSupabaseClient().auth.admin.createUser({ email, email_confirm: true });
|
|
27574
|
+
if (error2 && error2.code !== "email_exists") throw new Error(error2.message);
|
|
27575
|
+
}
|
|
27550
27576
|
await deliver(email, callbackUrl(c));
|
|
27551
27577
|
} catch (err) {
|
|
27552
27578
|
return c.json({ error: err instanceof Error ? err.message : "could not send" }, 500);
|
|
@@ -27767,29 +27793,6 @@ function createBillingRouter() {
|
|
|
27767
27793
|
|
|
27768
27794
|
// ../api/src/dashboard/admin-routes.ts
|
|
27769
27795
|
import { Hono as Hono11 } from "hono";
|
|
27770
|
-
|
|
27771
|
-
// ../api/src/dashboard/admin-middleware.ts
|
|
27772
|
-
function platformAdminEmails() {
|
|
27773
|
-
const raw = process.env["PLATFORM_ADMIN_EMAILS"] ?? "";
|
|
27774
|
-
return new Set(
|
|
27775
|
-
raw.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean)
|
|
27776
|
-
);
|
|
27777
|
-
}
|
|
27778
|
-
var requirePlatformOperator = async (c, next) => {
|
|
27779
|
-
const supabase = createRequestSupabaseClient(c);
|
|
27780
|
-
const {
|
|
27781
|
-
data: { user }
|
|
27782
|
-
} = await supabase.auth.getUser();
|
|
27783
|
-
if (!user?.email) return c.json({ error: "not signed in" }, 401);
|
|
27784
|
-
const email = user.email.trim().toLowerCase();
|
|
27785
|
-
if (!platformAdminEmails().has(email)) {
|
|
27786
|
-
return c.json({ error: "platform operator access required" }, 403);
|
|
27787
|
-
}
|
|
27788
|
-
c.set("platformOperator", { userId: user.id, email });
|
|
27789
|
-
return next();
|
|
27790
|
-
};
|
|
27791
|
-
|
|
27792
|
-
// ../api/src/dashboard/admin-routes.ts
|
|
27793
27796
|
var EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
27794
27797
|
function createAdminRouter() {
|
|
27795
27798
|
const admin = new Hono11();
|
|
@@ -39069,7 +39072,7 @@ async function main() {
|
|
|
39069
39072
|
break;
|
|
39070
39073
|
case "-v":
|
|
39071
39074
|
case "--version":
|
|
39072
|
-
printRaw("0.1.
|
|
39075
|
+
printRaw("0.1.46");
|
|
39073
39076
|
break;
|
|
39074
39077
|
case "-h":
|
|
39075
39078
|
case "--help":
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire as __flyspaceCreateRequire } from 'node:module';
|
|
|
3
3
|
const require = __flyspaceCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
startServer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5MCLO4QM.js";
|
|
7
7
|
import "./chunk-F5CXKDZV.js";
|
|
8
8
|
export {
|
|
9
9
|
startServer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flyspace-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.46",
|
|
4
4
|
"description": "AI-native headless community OS",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"private": false,
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"build:cli": "FLYSPACE_PUBLIC_BUILD=1 tsup",
|
|
30
30
|
"start": "node dist/cli.js start",
|
|
31
31
|
"prepublishOnly": "pnpm run build:cli",
|
|
32
|
-
"release": "
|
|
32
|
+
"release": "../../scripts/release.sh"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@anthropic-ai/sandbox-runtime": "0.0.77",
|
package/system.capabilities.md
CHANGED
|
@@ -33,6 +33,7 @@ If your prompt is prefixed with `[automation: schedule=<name>...]`, you are runn
|
|
|
33
33
|
- **Your response text IS the Slack message.** Custie's runner posts it automatically to the schedule's configured channel. You don't need to know which channel.
|
|
34
34
|
- **Do NOT call** `flyspace slack post`, `flyspace slack channels`, `flyspace slack channel-info`, or any other Slack tooling to figure out where to send the output. The channel is already decided.
|
|
35
35
|
- **Do NOT add preamble or meta-commentary** like "I'll post this to X channel" or "The bot is only a member of Y, so...". Start your response with the requested content directly.
|
|
36
|
+
- **No progress updates.** Nobody is watching a scheduled run, so ignore any reminder that the user has not heard from you and never write status lines like "Data collected, now summarising". Your final response is posted verbatim and its first line becomes the thread title, so it must contain only the finished content.
|
|
36
37
|
- **Exception (silent mode)**: if the prefix includes `silent=true`, the runner will NOT post your response. The prompt itself will instruct you on how to deliver output (typically via a script or `flyspace slack post`). Follow the prompt's instructions.
|
|
37
38
|
|
|
38
39
|
If there is no `[automation: ...]` prefix, you are responding to a user message in Slack — use the commands below normally.
|