@spacefast/common 0.0.3 → 0.0.6
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/agents/connect-targets.d.ts +133 -0
- package/dist/agents/connect-targets.js +224 -0
- package/dist/brand.d.ts +1 -0
- package/dist/brand.js +5 -0
- package/dist/config/domains.d.ts +12 -6
- package/dist/config/domains.js +30 -38
- package/dist/contracts/access.d.ts +829 -129
- package/dist/contracts/access.js +771 -148
- package/dist/contracts/activity.d.ts +5 -5
- package/dist/contracts/activity.js +28 -2
- package/dist/contracts/annotations.d.ts +3 -5
- package/dist/contracts/api-keys.d.ts +9 -10
- package/dist/contracts/api-keys.js +9 -6
- package/dist/contracts/archives.d.ts +22 -16
- package/dist/contracts/archives.js +11 -4
- package/dist/contracts/billing.d.ts +21 -30
- package/dist/contracts/builds.d.ts +21 -17
- package/dist/contracts/builds.js +12 -0
- package/dist/contracts/channels.d.ts +2 -2
- package/dist/contracts/common.d.ts +7 -5
- package/dist/contracts/common.js +4 -0
- package/dist/contracts/continuation.d.ts +63 -0
- package/dist/contracts/continuation.js +91 -0
- package/dist/contracts/countries.d.ts +2 -0
- package/dist/contracts/countries.js +261 -0
- package/dist/contracts/deployments.d.ts +34 -34
- package/dist/contracts/device-auth.d.ts +4 -11
- package/dist/contracts/device-auth.js +4 -0
- package/dist/contracts/docs.d.ts +119 -0
- package/dist/contracts/docs.js +51 -0
- package/dist/contracts/domains.d.ts +295 -253
- package/dist/contracts/domains.js +26 -4
- package/dist/contracts/enums.d.ts +17 -18
- package/dist/contracts/enums.js +25 -14
- package/dist/contracts/error-code-meta.d.ts +84 -0
- package/dist/contracts/error-code-meta.js +99 -10
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +17 -0
- package/dist/contracts/events.d.ts +13 -13
- package/dist/contracts/features.d.ts +93 -23
- package/dist/contracts/features.js +178 -13
- package/dist/contracts/git.d.ts +3 -9
- package/dist/contracts/ids.d.ts +5 -0
- package/dist/contracts/ids.js +5 -0
- package/dist/contracts/internal.d.ts +3 -3
- package/dist/contracts/mcp.d.ts +34 -36
- package/dist/contracts/me.d.ts +8 -8
- package/dist/contracts/me.js +1 -1
- package/dist/contracts/oauth-resources.d.ts +19 -8
- package/dist/contracts/oauth-resources.js +44 -13
- package/dist/contracts/operations.d.ts +2 -2
- package/dist/contracts/plan-policy.d.ts +4 -4
- package/dist/contracts/platform.d.ts +3 -105
- package/dist/contracts/platform.js +0 -50
- package/dist/contracts/push-new.d.ts +4 -4
- package/dist/contracts/quotas.d.ts +2 -0
- package/dist/contracts/quotas.js +8 -0
- package/dist/contracts/repository-connections.d.ts +1 -3
- package/dist/contracts/resources.d.ts +112 -28
- package/dist/contracts/resources.js +26 -2
- package/dist/contracts/routes.d.ts +0 -2
- package/dist/contracts/runtime-api.d.ts +365 -43
- package/dist/contracts/runtime-api.js +275 -6
- package/dist/contracts/sites.d.ts +45 -28
- package/dist/contracts/sites.js +21 -0
- package/dist/contracts/space-config.d.ts +201 -2
- package/dist/contracts/space-config.js +135 -5
- package/dist/contracts/spaces.d.ts +423 -162
- package/dist/contracts/spaces.js +94 -8
- package/dist/contracts/superadmin-emails.d.ts +7 -5
- package/dist/contracts/superadmin-emails.js +8 -0
- package/dist/contracts/superadmin-queues.d.ts +32 -32
- package/dist/contracts/superadmin-spaces.d.ts +418 -24
- package/dist/contracts/superadmin-spaces.js +24 -0
- package/dist/contracts/superadmin-tenants.d.ts +8 -8
- package/dist/contracts/superadmin.d.ts +17 -104
- package/dist/contracts/superadmin.js +6 -14
- package/dist/contracts/tags.d.ts +42 -41
- package/dist/contracts/tags.js +2 -1
- package/dist/contracts/teams.d.ts +40 -23
- package/dist/contracts/teams.js +20 -1
- package/dist/contracts/theme-json.d.ts +30 -0
- package/dist/contracts/theme-json.js +48 -0
- package/dist/contracts/transfers.d.ts +9 -9
- package/dist/contracts/variables.d.ts +14 -16
- package/dist/contracts/variables.js +0 -5
- package/dist/contracts/webhooks.d.ts +6 -4
- package/dist/contracts/webhooks.js +1 -1
- package/dist/contracts/zero.d.ts +13 -18
- package/dist/docs/agent-prose.d.ts +43 -3
- package/dist/docs/agent-prose.js +153 -10
- package/dist/docs/agent-setup.js +48 -15
- package/dist/docs/agent-solutions.d.ts +5 -5
- package/dist/docs/agent-solutions.js +2 -2
- package/dist/docs/catalog.d.ts +650 -0
- package/dist/docs/catalog.js +758 -0
- package/dist/docs/error-docs.d.ts +0 -2
- package/dist/docs/error-docs.js +89 -35
- package/dist/docs/index-build.d.ts +17 -0
- package/dist/docs/index-build.js +24 -0
- package/dist/docs/search.d.ts +54 -0
- package/dist/docs/search.js +96 -0
- package/dist/docs/skill-distribution.d.ts +5 -3
- package/dist/docs/skill-distribution.js +8 -8
- package/dist/utils/access-match.d.ts +39 -0
- package/dist/utils/access-match.js +296 -0
- package/dist/utils/auth-redirect.d.ts +3 -1
- package/dist/utils/auth-redirect.js +21 -1
- package/dist/utils/build-settings.d.ts +6 -0
- package/dist/utils/build-settings.js +429 -46
- package/dist/utils/claim-token.d.ts +8 -0
- package/dist/utils/claim-token.js +23 -2
- package/dist/utils/content-type.d.ts +1 -0
- package/dist/utils/content-type.js +1 -1
- package/dist/utils/credential-policy.d.ts +54 -0
- package/dist/utils/{access-policy.js → credential-policy.js} +28 -2
- package/dist/utils/gate-theme.d.ts +61 -0
- package/dist/utils/gate-theme.js +217 -0
- package/dist/utils/git-repository.d.ts +0 -1
- package/dist/utils/git-repository.js +0 -3
- package/dist/utils/id-hints.d.ts +8 -0
- package/dist/utils/id-hints.js +61 -0
- package/dist/utils/local-space-state.d.ts +91 -0
- package/dist/utils/local-space-state.js +251 -0
- package/dist/utils/oauth-signed-query.d.ts +8 -0
- package/dist/utils/oauth-signed-query.js +26 -0
- package/dist/utils/publish-detection.d.ts +0 -8
- package/dist/utils/publish-detection.js +0 -93
- package/dist/utils/publish-policy.d.ts +6 -5
- package/dist/utils/publish-policy.js +71 -7
- package/dist/utils/query-keys.d.ts +17 -6
- package/dist/utils/query-keys.js +27 -4
- package/dist/utils/runtime-paths.d.ts +0 -1
- package/dist/utils/runtime-paths.js +0 -1
- package/dist/utils/runtime-upload-batch.d.ts +18 -0
- package/dist/utils/runtime-upload-batch.js +90 -0
- package/dist/utils/runtime-upload.d.ts +2 -0
- package/dist/utils/runtime-upload.js +5 -0
- package/dist/utils/space-config.d.ts +4 -0
- package/dist/utils/space-config.js +10 -1
- package/dist/utils/space-theme.d.ts +2 -0
- package/dist/utils/space-theme.js +9 -0
- package/dist/utils/static-runtime-policy.d.ts +1 -1
- package/dist/utils/static-runtime-policy.js +47 -15
- package/dist/utils/upload-session.d.ts +1 -1
- package/dist/utils/wpcom-auth-redirects.d.ts +32 -2
- package/dist/utils/wpcom-auth-redirects.js +26 -10
- package/dist/vocabulary.d.ts +130 -30
- package/dist/vocabulary.js +77 -36
- package/package.json +16 -1
- package/dist/contracts/account.d.ts +0 -28
- package/dist/contracts/account.js +0 -54
- package/dist/contracts/intercom.d.ts +0 -6
- package/dist/contracts/intercom.js +0 -5
- package/dist/contracts/telemetry.d.ts +0 -2
- package/dist/contracts/telemetry.js +0 -1
- package/dist/utils/access-policy.d.ts +0 -39
- package/dist/utils/error-display.d.ts +0 -7
- package/dist/utils/error-display.js +0 -42
package/dist/contracts/zero.d.ts
CHANGED
|
@@ -183,9 +183,9 @@ export type ZeroMigrationOperation = z.infer<typeof zeroMigrationOperationSchema
|
|
|
183
183
|
export declare const zeroMigrationPlanSchema: z.ZodObject<{
|
|
184
184
|
format: z.ZodLiteral<"stattic.zero.migrations.v1">;
|
|
185
185
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
186
|
+
safe: "safe";
|
|
186
187
|
drop: "drop";
|
|
187
188
|
rename: "rename";
|
|
188
|
-
safe: "safe";
|
|
189
189
|
}>>;
|
|
190
190
|
schemaHash: z.ZodString;
|
|
191
191
|
operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -245,8 +245,8 @@ export declare const zeroRuntimePublicRealtimeModeSchema: z.ZodEnum<{
|
|
|
245
245
|
"local-websocket": "local-websocket";
|
|
246
246
|
}>;
|
|
247
247
|
export declare const zeroInspectPolicySchema: z.ZodEnum<{
|
|
248
|
-
private: "private";
|
|
249
248
|
public: "public";
|
|
249
|
+
private: "private";
|
|
250
250
|
}>;
|
|
251
251
|
export declare const zeroRuntimePublicAuthConfigSchema: z.ZodObject<{
|
|
252
252
|
provider: z.ZodDefault<z.ZodLiteral<"wpcom">>;
|
|
@@ -256,7 +256,6 @@ export declare const zeroRuntimePublicAuthConfigSchema: z.ZodObject<{
|
|
|
256
256
|
signOutUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
257
257
|
returnToParam: z.ZodDefault<z.ZodString>;
|
|
258
258
|
}, z.core.$strict>;
|
|
259
|
-
export type ZeroRuntimePublicAuthConfig = z.infer<typeof zeroRuntimePublicAuthConfigSchema>;
|
|
260
259
|
export declare const zeroRuntimePublicRealtimeConfigSchema: z.ZodObject<{
|
|
261
260
|
mode: z.ZodEnum<{
|
|
262
261
|
"stattic-central": "stattic-central";
|
|
@@ -275,7 +274,6 @@ export declare const zeroRuntimePublicRealtimeConfigSchema: z.ZodObject<{
|
|
|
275
274
|
spaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
276
275
|
versionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
277
276
|
}, z.core.$strict>;
|
|
278
|
-
export type ZeroRuntimePublicRealtimeConfig = z.infer<typeof zeroRuntimePublicRealtimeConfigSchema>;
|
|
279
277
|
export declare const zeroRuntimeClientConfigSchema: z.ZodObject<{
|
|
280
278
|
runtimeKind: z.ZodLiteral<"zero">;
|
|
281
279
|
basePath: z.ZodOptional<z.ZodString>;
|
|
@@ -480,8 +478,8 @@ export declare const zeroCapsuleArtifactSchema: z.ZodObject<{
|
|
|
480
478
|
}, z.core.$strict>;
|
|
481
479
|
limits: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
482
480
|
futureCapabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
483
|
-
blob: "blob";
|
|
484
481
|
ai: "ai";
|
|
482
|
+
blob: "blob";
|
|
485
483
|
"generalized-js": "generalized-js";
|
|
486
484
|
}>>>;
|
|
487
485
|
sourceManifest: z.ZodObject<{
|
|
@@ -641,8 +639,8 @@ export declare const zeroRuntimeFinalizePayloadSchema: z.ZodObject<{
|
|
|
641
639
|
}, z.core.$strict>;
|
|
642
640
|
limits: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
643
641
|
futureCapabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
644
|
-
blob: "blob";
|
|
645
642
|
ai: "ai";
|
|
643
|
+
blob: "blob";
|
|
646
644
|
"generalized-js": "generalized-js";
|
|
647
645
|
}>>>;
|
|
648
646
|
sourceManifest: z.ZodObject<{
|
|
@@ -705,9 +703,9 @@ export declare const zeroRuntimeFinalizePayloadSchema: z.ZodObject<{
|
|
|
705
703
|
migrations: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
706
704
|
format: z.ZodLiteral<"stattic.zero.migrations.v1">;
|
|
707
705
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
706
|
+
safe: "safe";
|
|
708
707
|
drop: "drop";
|
|
709
708
|
rename: "rename";
|
|
710
|
-
safe: "safe";
|
|
711
709
|
}>>;
|
|
712
710
|
schemaHash: z.ZodString;
|
|
713
711
|
operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -782,8 +780,8 @@ export declare const zeroRuntimeFinalizePayloadSchema: z.ZodObject<{
|
|
|
782
780
|
}, z.core.$strict>>;
|
|
783
781
|
inspect: z.ZodDefault<z.ZodObject<{
|
|
784
782
|
policy: z.ZodDefault<z.ZodEnum<{
|
|
785
|
-
private: "private";
|
|
786
783
|
public: "public";
|
|
784
|
+
private: "private";
|
|
787
785
|
}>>;
|
|
788
786
|
}, z.core.$strict>>;
|
|
789
787
|
}, z.core.$strict>;
|
|
@@ -916,8 +914,8 @@ export declare const zeroDeployMetadataSchema: z.ZodObject<{
|
|
|
916
914
|
}, z.core.$strict>;
|
|
917
915
|
limits: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
918
916
|
futureCapabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
919
|
-
blob: "blob";
|
|
920
917
|
ai: "ai";
|
|
918
|
+
blob: "blob";
|
|
921
919
|
"generalized-js": "generalized-js";
|
|
922
920
|
}>>>;
|
|
923
921
|
sourceManifest: z.ZodObject<{
|
|
@@ -980,9 +978,9 @@ export declare const zeroDeployMetadataSchema: z.ZodObject<{
|
|
|
980
978
|
migrations: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
981
979
|
format: z.ZodLiteral<"stattic.zero.migrations.v1">;
|
|
982
980
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
981
|
+
safe: "safe";
|
|
983
982
|
drop: "drop";
|
|
984
983
|
rename: "rename";
|
|
985
|
-
safe: "safe";
|
|
986
984
|
}>>;
|
|
987
985
|
schemaHash: z.ZodString;
|
|
988
986
|
operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1057,8 +1055,8 @@ export declare const zeroDeployMetadataSchema: z.ZodObject<{
|
|
|
1057
1055
|
}, z.core.$strict>>;
|
|
1058
1056
|
inspect: z.ZodDefault<z.ZodObject<{
|
|
1059
1057
|
policy: z.ZodDefault<z.ZodEnum<{
|
|
1060
|
-
private: "private";
|
|
1061
1058
|
public: "public";
|
|
1059
|
+
private: "private";
|
|
1062
1060
|
}>>;
|
|
1063
1061
|
}, z.core.$strict>>;
|
|
1064
1062
|
}, z.core.$strict>;
|
|
@@ -1073,8 +1071,8 @@ export declare const zeroInspectResponseSchema: z.ZodObject<{
|
|
|
1073
1071
|
serverRuntime: z.ZodLiteral<"quickjs-rust">;
|
|
1074
1072
|
inspect: z.ZodObject<{
|
|
1075
1073
|
policy: z.ZodEnum<{
|
|
1076
|
-
private: "private";
|
|
1077
1074
|
public: "public";
|
|
1075
|
+
private: "private";
|
|
1078
1076
|
}>;
|
|
1079
1077
|
}, z.core.$strict>;
|
|
1080
1078
|
install: z.ZodObject<{
|
|
@@ -1156,8 +1154,8 @@ export declare const zeroInspectPublicResponseSchema: z.ZodObject<{
|
|
|
1156
1154
|
serverRuntime: z.ZodLiteral<"quickjs-rust">;
|
|
1157
1155
|
inspect: z.ZodObject<{
|
|
1158
1156
|
policy: z.ZodEnum<{
|
|
1159
|
-
private: "private";
|
|
1160
1157
|
public: "public";
|
|
1158
|
+
private: "private";
|
|
1161
1159
|
}>;
|
|
1162
1160
|
}, z.core.$strict>;
|
|
1163
1161
|
install: z.ZodObject<{
|
|
@@ -1234,9 +1232,9 @@ export declare const zeroDbInspectResponseSchema: z.ZodObject<{
|
|
|
1234
1232
|
artifactId: z.ZodNullable<z.ZodString>;
|
|
1235
1233
|
backend: z.ZodNullable<z.ZodLiteral<"wpcloud-mysql">>;
|
|
1236
1234
|
migrationMode: z.ZodNullable<z.ZodEnum<{
|
|
1235
|
+
safe: "safe";
|
|
1237
1236
|
drop: "drop";
|
|
1238
1237
|
rename: "rename";
|
|
1239
|
-
safe: "safe";
|
|
1240
1238
|
}>>;
|
|
1241
1239
|
schemaHash: z.ZodNullable<z.ZodString>;
|
|
1242
1240
|
tables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1304,9 +1302,9 @@ export declare const zeroDbInspectPublicResponseSchema: z.ZodObject<{
|
|
|
1304
1302
|
artifactId: z.ZodNullable<z.ZodString>;
|
|
1305
1303
|
backend: z.ZodNullable<z.ZodLiteral<"wpcloud-mysql">>;
|
|
1306
1304
|
migrationMode: z.ZodNullable<z.ZodEnum<{
|
|
1305
|
+
safe: "safe";
|
|
1307
1306
|
drop: "drop";
|
|
1308
1307
|
rename: "rename";
|
|
1309
|
-
safe: "safe";
|
|
1310
1308
|
}>>;
|
|
1311
1309
|
schemaHash: z.ZodNullable<z.ZodString>;
|
|
1312
1310
|
tables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1372,7 +1370,6 @@ export declare const zeroDbDumpQuerySchema: z.ZodObject<{
|
|
|
1372
1370
|
table: z.ZodOptional<z.ZodString>;
|
|
1373
1371
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
1374
1372
|
}, z.core.$strict>;
|
|
1375
|
-
export type ZeroDbDumpQuery = z.infer<typeof zeroDbDumpQuerySchema>;
|
|
1376
1373
|
export declare const zeroDbDumpTableSchema: z.ZodObject<{
|
|
1377
1374
|
name: z.ZodString;
|
|
1378
1375
|
rows: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
@@ -1447,12 +1444,10 @@ export declare const zeroRealtimeEventIntakeResponseSchema: z.ZodObject<{
|
|
|
1447
1444
|
delivered: z.ZodDefault<z.ZodNumber>;
|
|
1448
1445
|
duplicate: z.ZodDefault<z.ZodBoolean>;
|
|
1449
1446
|
}, z.core.$strict>;
|
|
1450
|
-
export type ZeroRealtimeEventIntakeResponse = z.infer<typeof zeroRealtimeEventIntakeResponseSchema>;
|
|
1451
1447
|
export declare const zeroRealtimeEventListQuerySchema: z.ZodObject<{
|
|
1452
1448
|
afterEventId: z.ZodOptional<z.ZodString>;
|
|
1453
1449
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
1454
1450
|
}, z.core.$strict>;
|
|
1455
|
-
export type ZeroRealtimeEventListQuery = z.infer<typeof zeroRealtimeEventListQuerySchema>;
|
|
1456
1451
|
export declare const zeroRealtimeEventListResponseSchema: z.ZodObject<{
|
|
1457
1452
|
data: z.ZodArray<z.ZodObject<{
|
|
1458
1453
|
eventId: z.ZodString;
|
|
@@ -1,9 +1,37 @@
|
|
|
1
|
-
export declare const ARCHIVE_SECRET_GLOBS: readonly [".env*", ".npmrc", ".netrc", "*/.git/*", "*/.
|
|
1
|
+
export declare const ARCHIVE_SECRET_GLOBS: readonly [".env*", ".npmrc", ".netrc", "*/.git/*", "*/.spacefast/*", "*/.ssh/*", "*/.aws/*", "*/.kube/*", "*/.docker/*", "credentials.json", "*.pem", "*.key", "*.p12", "*.pfx", "*.crt", "*id_rsa*"];
|
|
2
2
|
/**
|
|
3
3
|
* The credential rules every surface must repeat. Treat tokens as secrets, keep
|
|
4
4
|
* them out of logs and transcripts, and never echo them back.
|
|
5
5
|
*/
|
|
6
6
|
export declare const SECRET_RULES_PROSE: string;
|
|
7
|
+
export declare const POSITIONING_PROSE: string;
|
|
8
|
+
export declare const EXPLAIN_TO_USER_PROSE: string;
|
|
9
|
+
export declare const FAILURE_CONDUCT_PROSE: string;
|
|
10
|
+
export declare const LANE_PICKER_PROSE: string;
|
|
11
|
+
export declare const HOW_TO_RESEARCH_PROSE: string;
|
|
12
|
+
export declare const ENV_NOTES_PROSE: string;
|
|
13
|
+
/**
|
|
14
|
+
* The CHECK verb: before ever creating a space, look for the one the project
|
|
15
|
+
* already has. This is what keeps a returning agent from pushing a duplicate
|
|
16
|
+
* anonymous space instead of a new version.
|
|
17
|
+
*/
|
|
18
|
+
export declare const CHECK_BEFORE_PUBLISH_PROSE: string;
|
|
19
|
+
/**
|
|
20
|
+
* The SAVE verb: persist the space id and credential after a first publish so
|
|
21
|
+
* every later publish targets the same space. The CLI and On-Device MCP write
|
|
22
|
+
* this state automatically; curl-only agents write the same files themselves.
|
|
23
|
+
*/
|
|
24
|
+
export declare const SAVE_STATE_PROSE: string;
|
|
25
|
+
/**
|
|
26
|
+
* The UPDATE verb: a new version to the SAME space. Never re-run the
|
|
27
|
+
* first-publish recipe when saved state exists.
|
|
28
|
+
*/
|
|
29
|
+
export declare const UPDATE_SPACE_PROSE: string;
|
|
30
|
+
/**
|
|
31
|
+
* The CLAIM / CONTINUE verb: show the claim link, and after the user claims,
|
|
32
|
+
* self-correct by exchanging the claim token once for a durable credential.
|
|
33
|
+
*/
|
|
34
|
+
export declare const CONTINUE_AFTER_CLAIM_PROSE: string;
|
|
7
35
|
/**
|
|
8
36
|
* The zero-install publish sequence: one curl for a file, a secret-preflighted
|
|
9
37
|
* zip for a folder. This is the load-bearing rung 0 — an agent that stops here
|
|
@@ -21,15 +49,27 @@ export declare const RECEIPT_SHAPE_PROSE: string;
|
|
|
21
49
|
*/
|
|
22
50
|
export declare const SIGNED_UPLOAD_PROSE: string;
|
|
23
51
|
/**
|
|
24
|
-
* Named fragments for the skill-template generator. The
|
|
52
|
+
* Named fragments for the skill-template generator. The templates carry
|
|
25
53
|
* `{{prose.secretRules}}`, `{{prose.publishSequence}}`,
|
|
26
|
-
* `{{prose.receiptShape}}`,
|
|
54
|
+
* `{{prose.receiptShape}}`, `{{prose.signedUpload}}`,
|
|
55
|
+
* `{{prose.checkBeforePublish}}`, `{{prose.saveState}}`,
|
|
56
|
+
* `{{prose.updateSpace}}`, and `{{prose.continueAfterClaim}}` placeholders;
|
|
27
57
|
* generate-skill.mjs substitutes these.
|
|
28
58
|
*/
|
|
29
59
|
export declare const AGENT_PROSE: {
|
|
60
|
+
readonly positioning: string;
|
|
30
61
|
readonly secretRules: string;
|
|
62
|
+
readonly explainToUser: string;
|
|
63
|
+
readonly failureConduct: string;
|
|
31
64
|
readonly publishSequence: string;
|
|
32
65
|
readonly receiptShape: string;
|
|
33
66
|
readonly signedUpload: string;
|
|
67
|
+
readonly checkBeforePublish: string;
|
|
68
|
+
readonly saveState: string;
|
|
69
|
+
readonly updateSpace: string;
|
|
70
|
+
readonly continueAfterClaim: string;
|
|
71
|
+
readonly lanePicker: string;
|
|
72
|
+
readonly howToResearch: string;
|
|
73
|
+
readonly envNotes: string;
|
|
34
74
|
};
|
|
35
75
|
export type AgentProseKey = keyof typeof AGENT_PROSE;
|
package/dist/docs/agent-prose.js
CHANGED
|
@@ -16,6 +16,7 @@ import { BRAND } from "../brand.js";
|
|
|
16
16
|
// the receipt shape or secret handling changes, change it here once.
|
|
17
17
|
const API_ORIGIN = BRAND.apiOrigin;
|
|
18
18
|
const PUBLISH_ENDPOINT = `${API_ORIGIN}/v1/publish`;
|
|
19
|
+
const EXCHANGE_ENDPOINT = `${API_ORIGIN}/v1/anonymous-claim/exchange`;
|
|
19
20
|
// Centralized secret/credential patterns excluded from a publish archive. The
|
|
20
21
|
// `find` preflight and the `zip -x` exclusions are derived from the same list so
|
|
21
22
|
// they can never disagree, and the no-install / skill copies stay identical.
|
|
@@ -24,7 +25,7 @@ export const ARCHIVE_SECRET_GLOBS = [
|
|
|
24
25
|
".npmrc",
|
|
25
26
|
".netrc",
|
|
26
27
|
"*/.git/*",
|
|
27
|
-
"*/.
|
|
28
|
+
"*/.spacefast/*",
|
|
28
29
|
"*/.ssh/*",
|
|
29
30
|
"*/.aws/*",
|
|
30
31
|
"*/.kube/*",
|
|
@@ -43,9 +44,18 @@ function findExpr(globs) {
|
|
|
43
44
|
.join(" -o ");
|
|
44
45
|
}
|
|
45
46
|
function zipExcludeExpr(globs) {
|
|
46
|
-
// zip
|
|
47
|
-
//
|
|
48
|
-
|
|
47
|
+
// zip -x patterns need both the archive-root form and an any-depth form:
|
|
48
|
+
// ".spacefast/*" excludes only at the root, while "*/.spacefast/*" catches
|
|
49
|
+
// nested copies.
|
|
50
|
+
return globs
|
|
51
|
+
.flatMap((glob) => {
|
|
52
|
+
if (glob.startsWith("*/")) {
|
|
53
|
+
return [glob.slice(2), glob];
|
|
54
|
+
}
|
|
55
|
+
return [glob, `*/${glob}`];
|
|
56
|
+
})
|
|
57
|
+
.map((glob) => `"${glob}"`)
|
|
58
|
+
.join(" ");
|
|
49
59
|
}
|
|
50
60
|
/**
|
|
51
61
|
* The credential rules every surface must repeat. Treat tokens as secrets, keep
|
|
@@ -58,6 +68,121 @@ export const SECRET_RULES_PROSE = [
|
|
|
58
68
|
"present. On shared hosts, prefer one-off environment variables or restrictive temporary files,",
|
|
59
69
|
"clear them after use, and avoid durable auth unless the user explicitly asks.",
|
|
60
70
|
].join("\n");
|
|
71
|
+
export const POSITIONING_PROSE = [
|
|
72
|
+
"Spacefast is a static host for AI-made web artifacts: permanent live URLs, immutable version",
|
|
73
|
+
"URLs, anonymous publish with a claim link, and agent continuation after claim. It serves",
|
|
74
|
+
"static files. It does not execute server code, run databases, or build-on-push on the",
|
|
75
|
+
"anonymous lane.",
|
|
76
|
+
"",
|
|
77
|
+
"Honest comparisons an agent can relay: Vercel and Netlify are broader app platforms;",
|
|
78
|
+
"Cloudflare Pages is edge-first static hosting; GitHub Pages is repository-native. Spacefast",
|
|
79
|
+
"optimizes for agent-safe one-shot publish, claim, versioning, rollback, and continuation.",
|
|
80
|
+
].join("\n");
|
|
81
|
+
export const EXPLAIN_TO_USER_PROSE = [
|
|
82
|
+
"Relay `data.shareBlurb` verbatim when present. State anonymous expiry in user terms:",
|
|
83
|
+
"the space expires unless claimed by `data.claim.expiresAt`. After claim, the agent key is",
|
|
84
|
+
"named and revocable in the dashboard.",
|
|
85
|
+
].join("\n");
|
|
86
|
+
export const FAILURE_CONDUCT_PROSE = [
|
|
87
|
+
"On failure, surface `error.code`, `error.docsUrl`, and `error.requestId`, then stop.",
|
|
88
|
+
"Do not invent undocumented endpoints. Do not read credentials out of auth files. Do not",
|
|
89
|
+
"retry a one-shot operation without reusing its `Idempotency-Key`.",
|
|
90
|
+
].join("\n");
|
|
91
|
+
export const LANE_PICKER_PROSE = [
|
|
92
|
+
"Pick the lane by environment: filesystem plus repeat work means CLI or On-Device MCP; no",
|
|
93
|
+
"filesystem means hosted MCP; one-off publish means curl; CI means an agent account. After",
|
|
94
|
+
"success, recommend the best next-time setup for the user's client.",
|
|
95
|
+
].join("\n");
|
|
96
|
+
export const HOW_TO_RESEARCH_PROSE = [
|
|
97
|
+
"For an error, fetch `error.docsUrl`. For capability questions, use `search_docs` or append",
|
|
98
|
+
"`.md` to website docs URLs. For contracts, read `publish-spec.json` or OpenAPI. Never guess",
|
|
99
|
+
"limits: publish, then read diagnostics.",
|
|
100
|
+
].join("\n");
|
|
101
|
+
export const ENV_NOTES_PROSE = [
|
|
102
|
+
"claude.ai: allow `api.spacefast.com` in egress settings. Codex sandbox: escalate only the",
|
|
103
|
+
"network call. Terminal agents: use the CLI when filesystem access matters.",
|
|
104
|
+
].join("\n");
|
|
105
|
+
/**
|
|
106
|
+
* The CHECK verb: before ever creating a space, look for the one the project
|
|
107
|
+
* already has. This is what keeps a returning agent from pushing a duplicate
|
|
108
|
+
* anonymous space instead of a new version.
|
|
109
|
+
*/
|
|
110
|
+
export const CHECK_BEFORE_PUBLISH_PROSE = [
|
|
111
|
+
"Before creating a space, check whether this project already has one:",
|
|
112
|
+
"",
|
|
113
|
+
"- Look for `.spacefast/space.json` or `.spacefast/state.json`, walking up from the working",
|
|
114
|
+
" directory toward the filesystem root.",
|
|
115
|
+
"- Look for a publish receipt earlier in this conversation.",
|
|
116
|
+
"- When authenticated, list existing spaces (`sf spaces list`, or the `spaces_list` MCP tool).",
|
|
117
|
+
"",
|
|
118
|
+
"If any of these finds a space, publish a new version to that `spaceId` (see the update",
|
|
119
|
+
"instructions) instead of creating another space. Only create a new space when none exists",
|
|
120
|
+
"and the user wants a new site.",
|
|
121
|
+
].join("\n");
|
|
122
|
+
/**
|
|
123
|
+
* The SAVE verb: persist the space id and credential after a first publish so
|
|
124
|
+
* every later publish targets the same space. The CLI and On-Device MCP write
|
|
125
|
+
* this state automatically; curl-only agents write the same files themselves.
|
|
126
|
+
*/
|
|
127
|
+
export const SAVE_STATE_PROSE = [
|
|
128
|
+
"After the first publish, persist the space id and credential so every later publish updates",
|
|
129
|
+
"the same space instead of creating a new one. The CLI and On-Device MCP do this automatically",
|
|
130
|
+
"in `.spacefast/`; when publishing with curl, write the files yourself from the receipt:",
|
|
131
|
+
"",
|
|
132
|
+
"```bash",
|
|
133
|
+
"mkdir -p .spacefast",
|
|
134
|
+
"# non-secret, committable:",
|
|
135
|
+
`printf '{"space":"<spc_id>"}' > .spacefast/space.json`,
|
|
136
|
+
"# secret — never publish, never print:",
|
|
137
|
+
`printf '{"spaceId":"<spc_id>","claimToken":"<token>","apiUrl":"${API_ORIGIN}"}' > .spacefast/state.json`,
|
|
138
|
+
"grep -qx '.spacefast/state.json' .gitignore 2>/dev/null || echo '.spacefast/state.json' >> .gitignore",
|
|
139
|
+
"```",
|
|
140
|
+
"",
|
|
141
|
+
"`<spc_id>` is `data.space.id` and `<token>` is `data.claim.token` from the receipt. Keep",
|
|
142
|
+
"`.spacefast/state.json` out of publish archives, commits, logs, and chat.",
|
|
143
|
+
].join("\n");
|
|
144
|
+
/**
|
|
145
|
+
* The UPDATE verb: a new version to the SAME space. Never re-run the
|
|
146
|
+
* first-publish recipe when saved state exists.
|
|
147
|
+
*/
|
|
148
|
+
export const UPDATE_SPACE_PROSE = [
|
|
149
|
+
"To publish a new version of an existing space, send the same `spaceId` with bearer auth —",
|
|
150
|
+
"never re-run the first-publish recipe when saved state exists:",
|
|
151
|
+
"",
|
|
152
|
+
"```bash",
|
|
153
|
+
'curl -sS -H "Authorization: Bearer <claim-token-or-access-token>" \\',
|
|
154
|
+
" -F 'spaceId=<spc_id>' \\",
|
|
155
|
+
' -F "files=@index.html" \\',
|
|
156
|
+
` ${PUBLISH_ENDPOINT}`,
|
|
157
|
+
"```",
|
|
158
|
+
"",
|
|
159
|
+
"Use the saved claim token for an unclaimed anonymous space, or an access token for owned",
|
|
160
|
+
"spaces. Send a folder as `-F archive=@site.zip` exactly like a first publish; the receipt",
|
|
161
|
+
"shape is identical.",
|
|
162
|
+
].join("\n");
|
|
163
|
+
/**
|
|
164
|
+
* The CLAIM / CONTINUE verb: show the claim link, and after the user claims,
|
|
165
|
+
* self-correct by exchanging the claim token once for a durable credential.
|
|
166
|
+
*/
|
|
167
|
+
export const CONTINUE_AFTER_CLAIM_PROSE = [
|
|
168
|
+
"Always show the user the claim link (`data.claim.url`) and its expiry (`data.claim.expiresAt`).",
|
|
169
|
+
'If the user says "claimed", check claim status and exchange the saved claim token; do not wait',
|
|
170
|
+
"for a publish failure before continuing.",
|
|
171
|
+
"After the user claims the space in the browser, the saved claim token stops authorizing",
|
|
172
|
+
"publishes: the next publish fails with error code `space_claimed_credential_available`. That",
|
|
173
|
+
"failure is the signal to upgrade your credential — call the exchange endpoint exactly once:",
|
|
174
|
+
"",
|
|
175
|
+
"```bash",
|
|
176
|
+
'curl -sS -X POST -H "Authorization: Bearer <claim-token>" \\',
|
|
177
|
+
` ${EXCHANGE_ENDPOINT}`,
|
|
178
|
+
"```",
|
|
179
|
+
"",
|
|
180
|
+
'It returns `{ "data": { "space": {...}, "credential": { "accessToken": "...", "label": "..." } } }`.',
|
|
181
|
+
"Save `data.credential.accessToken` into `.spacefast/state.json` (replace the `claimToken`",
|
|
182
|
+
'field with `"accessToken"`), then retry the publish with the new bearer. The exchange works',
|
|
183
|
+
"exactly once; if it returns `continuation_used` or `continuation_unavailable`, ask the user",
|
|
184
|
+
"to mint an access token in the dashboard (Account → Access tokens).",
|
|
185
|
+
].join("\n");
|
|
61
186
|
/**
|
|
62
187
|
* The zero-install publish sequence: one curl for a file, a secret-preflighted
|
|
63
188
|
* zip for a folder. This is the load-bearing rung 0 — an agent that stops here
|
|
@@ -91,16 +216,22 @@ export const RECEIPT_SHAPE_PROSE = [
|
|
|
91
216
|
"The JSON receipt is the source of truth:",
|
|
92
217
|
"",
|
|
93
218
|
"- `data.space.liveUrl` — the live URL.",
|
|
94
|
-
"- `data.version.immutableUrl` — the permanent, frozen version URL
|
|
219
|
+
"- `data.version.immutableUrl` — the permanent, frozen version URL; share it for reviews.",
|
|
220
|
+
" It is reserved in the initial receipt. If the publish is still finalizing, poll `data.links.status`",
|
|
221
|
+
" with the claim token until the status is `ready`.",
|
|
95
222
|
"- `data.shareBlurb` — a paste-ready one-liner with the URL and claim nudge; relay it verbatim when present.",
|
|
96
223
|
"- `data.upload` — signed upload instructions for manifest publishes when file bytes were not sent",
|
|
97
224
|
" with the request. Send each `data.upload.targets[]` instruction exactly as returned, treat",
|
|
98
225
|
" authorization headers and upload tokens as secrets, then finalize.",
|
|
99
226
|
"- `data.claim.url` and `data.claim.expiresAt` — the space is anonymous and expires unless claimed;",
|
|
100
227
|
" always show the user the claim link and the deadline so the space becomes theirs.",
|
|
101
|
-
"- `data.claim.token` — a secret capability.
|
|
102
|
-
" `Authorization: Bearer <claim-token>`
|
|
103
|
-
"
|
|
228
|
+
"- `data.claim.token` — a secret capability. For anonymous spaces, use it as",
|
|
229
|
+
" `Authorization: Bearer <claim-token>` when polling `data.links.status`, finalizing uploads,",
|
|
230
|
+
" or updating the same `spaceId`. Save it to `.spacefast/state.json` so the next publish",
|
|
231
|
+
" updates this space. After the user claims the space, exchange it once at",
|
|
232
|
+
` \`POST ${EXCHANGE_ENDPOINT}\` for a durable credential.`,
|
|
233
|
+
" Never print it back to the user.",
|
|
234
|
+
"- `data.links.status`, `resume`, `finalize`, and `promote` — follow-up API paths.",
|
|
104
235
|
"- `error.code`, `error.docsUrl`, and `error.hint` — stable error code plus exact recovery docs and a next step.",
|
|
105
236
|
"",
|
|
106
237
|
"If no files changed, the API may omit `upload`; report the receipt and diagnostics rather than",
|
|
@@ -140,14 +271,26 @@ export const SIGNED_UPLOAD_PROSE = [
|
|
|
140
271
|
"Do not base64 large archives into chat or MCP tool arguments.",
|
|
141
272
|
].join("\n");
|
|
142
273
|
/**
|
|
143
|
-
* Named fragments for the skill-template generator. The
|
|
274
|
+
* Named fragments for the skill-template generator. The templates carry
|
|
144
275
|
* `{{prose.secretRules}}`, `{{prose.publishSequence}}`,
|
|
145
|
-
* `{{prose.receiptShape}}`,
|
|
276
|
+
* `{{prose.receiptShape}}`, `{{prose.signedUpload}}`,
|
|
277
|
+
* `{{prose.checkBeforePublish}}`, `{{prose.saveState}}`,
|
|
278
|
+
* `{{prose.updateSpace}}`, and `{{prose.continueAfterClaim}}` placeholders;
|
|
146
279
|
* generate-skill.mjs substitutes these.
|
|
147
280
|
*/
|
|
148
281
|
export const AGENT_PROSE = {
|
|
282
|
+
positioning: POSITIONING_PROSE,
|
|
149
283
|
secretRules: SECRET_RULES_PROSE,
|
|
284
|
+
explainToUser: EXPLAIN_TO_USER_PROSE,
|
|
285
|
+
failureConduct: FAILURE_CONDUCT_PROSE,
|
|
150
286
|
publishSequence: PUBLISH_SEQUENCE_PROSE,
|
|
151
287
|
receiptShape: RECEIPT_SHAPE_PROSE,
|
|
152
288
|
signedUpload: SIGNED_UPLOAD_PROSE,
|
|
289
|
+
checkBeforePublish: CHECK_BEFORE_PUBLISH_PROSE,
|
|
290
|
+
saveState: SAVE_STATE_PROSE,
|
|
291
|
+
updateSpace: UPDATE_SPACE_PROSE,
|
|
292
|
+
continueAfterClaim: CONTINUE_AFTER_CLAIM_PROSE,
|
|
293
|
+
lanePicker: LANE_PICKER_PROSE,
|
|
294
|
+
howToResearch: HOW_TO_RESEARCH_PROSE,
|
|
295
|
+
envNotes: ENV_NOTES_PROSE,
|
|
153
296
|
};
|
package/dist/docs/agent-setup.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BRAND } from "@spacefast/common/brand";
|
|
2
|
-
import { PUBLISH_SEQUENCE_PROSE, RECEIPT_SHAPE_PROSE, SECRET_RULES_PROSE, SIGNED_UPLOAD_PROSE, } from "@spacefast/common/docs/agent-prose";
|
|
3
|
-
import { spacefastInstallCurlCommand, spacefastInstallPowerShellCommand, spacefastSkillInstallCommand, spacefastSkillUrl, } from "@spacefast/common/docs/skill-distribution";
|
|
2
|
+
import { CHECK_BEFORE_PUBLISH_PROSE, CONTINUE_AFTER_CLAIM_PROSE, ENV_NOTES_PROSE, FAILURE_CONDUCT_PROSE, HOW_TO_RESEARCH_PROSE, LANE_PICKER_PROSE, POSITIONING_PROSE, PUBLISH_SEQUENCE_PROSE, RECEIPT_SHAPE_PROSE, SAVE_STATE_PROSE, SECRET_RULES_PROSE, SIGNED_UPLOAD_PROSE, UPDATE_SPACE_PROSE, } from "@spacefast/common/docs/agent-prose";
|
|
3
|
+
import { spacefastInstallCurlCommand, spacefastInstallPowerShellCommand, spacefastSkillFetchCommand, spacefastSkillInstallCommand, spacefastSkillUrl, } from "@spacefast/common/docs/skill-distribution";
|
|
4
4
|
export const agentSetupUrl = `${BRAND.agentSetupOrigin}/ai`;
|
|
5
5
|
export const agentSetupTextUrl = `${BRAND.agentSetupOrigin}/ai.txt`;
|
|
6
6
|
const agentSetupParsedUrl = new URL(agentSetupUrl);
|
|
7
7
|
export const agentSetupHostLabel = agentSetupParsedUrl.host + agentSetupParsedUrl.pathname;
|
|
8
|
-
export const agentSetupPrompt = `Fetch ${agentSetupUrl} and follow
|
|
8
|
+
export const agentSetupPrompt = `Fetch ${agentSetupUrl} and follow it to publish this project — or update it if it's already on ${BRAND.productName}. Ask me what I want to publish if it isn't obvious.`;
|
|
9
9
|
export function renderAgentSetupTemplate(value) {
|
|
10
10
|
return value
|
|
11
11
|
.replaceAll("{{AGENT_SETUP_URL}}", agentSetupUrl)
|
|
@@ -19,9 +19,13 @@ export function aiInstructionsText() {
|
|
|
19
19
|
return [
|
|
20
20
|
`# ${BRAND.productName} for AI agents`,
|
|
21
21
|
"",
|
|
22
|
-
`Official instructions for AI agents publishing to ${BRAND.productName}
|
|
23
|
-
"
|
|
24
|
-
|
|
22
|
+
`Official instructions for AI agents publishing to ${BRAND.productName}.`,
|
|
23
|
+
"",
|
|
24
|
+
POSITIONING_PROSE,
|
|
25
|
+
"",
|
|
26
|
+
"## Before you publish (check for an existing space)",
|
|
27
|
+
"",
|
|
28
|
+
CHECK_BEFORE_PUBLISH_PROSE,
|
|
25
29
|
"",
|
|
26
30
|
"## Publish with curl (no install, no account)",
|
|
27
31
|
"",
|
|
@@ -29,6 +33,14 @@ export function aiInstructionsText() {
|
|
|
29
33
|
"",
|
|
30
34
|
RECEIPT_SHAPE_PROSE,
|
|
31
35
|
"",
|
|
36
|
+
"## Save your state",
|
|
37
|
+
"",
|
|
38
|
+
SAVE_STATE_PROSE,
|
|
39
|
+
"",
|
|
40
|
+
"## Update a space",
|
|
41
|
+
"",
|
|
42
|
+
UPDATE_SPACE_PROSE,
|
|
43
|
+
"",
|
|
32
44
|
"## Big files and cloud agents",
|
|
33
45
|
"",
|
|
34
46
|
SIGNED_UPLOAD_PROSE,
|
|
@@ -37,6 +49,14 @@ export function aiInstructionsText() {
|
|
|
37
49
|
"",
|
|
38
50
|
SECRET_RULES_PROSE,
|
|
39
51
|
"",
|
|
52
|
+
"## Failure conduct",
|
|
53
|
+
"",
|
|
54
|
+
FAILURE_CONDUCT_PROSE,
|
|
55
|
+
"",
|
|
56
|
+
"## How to research",
|
|
57
|
+
"",
|
|
58
|
+
HOW_TO_RESEARCH_PROSE,
|
|
59
|
+
"",
|
|
40
60
|
'Add a bearer access token with `-H "Authorization: Bearer ..."` to publish into the user\'s',
|
|
41
61
|
"team instead of anonymously. Agent clients should prefer OAuth client credentials. Errors come back as JSON with stable `code` values and a",
|
|
42
62
|
"`docsUrl`; fetch the `docsUrl` when you need recovery steps.",
|
|
@@ -69,15 +89,17 @@ export function aiInstructionsText() {
|
|
|
69
89
|
"```",
|
|
70
90
|
"",
|
|
71
91
|
"Use `--json` on any command when the output will be parsed. Publishing the same",
|
|
72
|
-
"directory again updates the space saved in `.
|
|
92
|
+
"directory again updates the space saved in `.spacefast/state.json`.",
|
|
73
93
|
"",
|
|
74
94
|
"## MCP for agent clients",
|
|
75
95
|
"",
|
|
96
|
+
LANE_PICKER_PROSE,
|
|
97
|
+
"",
|
|
76
98
|
"Hosted MCP is the no-download cloud lane for ChatGPT, Codex, Claude, Cursor, and browser",
|
|
77
99
|
"clients that can authenticate with OAuth/API bearer credentials:",
|
|
78
100
|
"",
|
|
79
101
|
"```text",
|
|
80
|
-
"https://mcp.spacefast.com
|
|
102
|
+
"https://mcp.spacefast.com",
|
|
81
103
|
"```",
|
|
82
104
|
"",
|
|
83
105
|
"Request `mcp:tools` plus the API scopes the tools need: `teams:read` for team context,",
|
|
@@ -98,8 +120,8 @@ export function aiInstructionsText() {
|
|
|
98
120
|
"`spacefast://account/current`, `spacefast://teams/current`, `spacefast://spaces/recent`,",
|
|
99
121
|
"`spacefast://spaces/{spaceId}`, and `spacefast://policy/current` for bounded read-only",
|
|
100
122
|
"context.",
|
|
101
|
-
"`
|
|
102
|
-
"`approval_required` and continue through `
|
|
123
|
+
"`execute` is dry-run-first; mutating multi-step workflows can return",
|
|
124
|
+
"`approval_required` and continue through `resume` after the user approves.",
|
|
103
125
|
"",
|
|
104
126
|
"Use On-Device MCP when the agent needs the user's checkout, path-based publish, or file edits:",
|
|
105
127
|
"",
|
|
@@ -115,14 +137,19 @@ export function aiInstructionsText() {
|
|
|
115
137
|
"`SPACEFAST_AGENT_CONFIG` with private_key_jwt when available; otherwise use one-job",
|
|
116
138
|
"`SPACEFAST_TOKEN` secrets and mask logs. Do not persist personal auth in ephemeral runners.",
|
|
117
139
|
"",
|
|
118
|
-
"If your environment supports skill import,
|
|
119
|
-
|
|
140
|
+
"If your environment supports skill import, install the official skill:",
|
|
141
|
+
`\`${spacefastSkillInstallCommand}\`. Raw markdown source: \`${spacefastSkillFetchCommand}\` (${spacefastSkillUrl}).`,
|
|
120
142
|
"",
|
|
121
143
|
"## After publishing",
|
|
122
144
|
"",
|
|
123
|
-
"- Share the live URL, the immutable version URL, and — for anonymous spaces —
|
|
124
|
-
" claim link with its expiry.",
|
|
125
|
-
"
|
|
145
|
+
"- Share the live URL, the immutable version URL when ready, and — for anonymous spaces —",
|
|
146
|
+
" the claim link with its expiry. If the receipt's immutable URL is null, poll the",
|
|
147
|
+
" operation and version links with the claim token as bearer auth until the version is ready.",
|
|
148
|
+
"- Never print access tokens, claim tokens, auth files, or `.spacefast/state.json`.",
|
|
149
|
+
"",
|
|
150
|
+
"## After the user claims",
|
|
151
|
+
"",
|
|
152
|
+
CONTINUE_AFTER_CLAIM_PROSE,
|
|
126
153
|
"",
|
|
127
154
|
"## Space conventions",
|
|
128
155
|
"",
|
|
@@ -151,14 +178,20 @@ export function aiInstructionsText() {
|
|
|
151
178
|
"## Going deeper",
|
|
152
179
|
"",
|
|
153
180
|
"- Docs index for agents: https://spacefast.com/llms.txt",
|
|
181
|
+
"- One-click connect (Claude Code, Claude, Codex, Cursor, VS Code): https://spacefast.com/agents",
|
|
154
182
|
"- Agent guide: https://spacefast.com/docs/agents",
|
|
155
183
|
"- CLI reference: https://spacefast.com/docs/cli",
|
|
156
184
|
"- REST API + OpenAPI: https://spacefast.com/docs/api",
|
|
157
185
|
"- Publish contract (machine-readable): https://spacefast.com/publish-spec.json",
|
|
186
|
+
"- Connectors-directory manifest (hosted MCP listing): https://spacefast.com/.well-known/connector.json",
|
|
158
187
|
"- Every error code: https://spacefast.com/docs/errors",
|
|
159
188
|
"",
|
|
160
189
|
"Append `.md` to any docs URL for Markdown, or just fetch — agent user agents get",
|
|
161
190
|
"Markdown automatically.",
|
|
162
191
|
"",
|
|
192
|
+
"## Environment notes",
|
|
193
|
+
"",
|
|
194
|
+
ENV_NOTES_PROSE,
|
|
195
|
+
"",
|
|
163
196
|
].join("\n");
|
|
164
197
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const hostedMcpEndpointUrl = "https://mcp.spacefast.com
|
|
1
|
+
export declare const hostedMcpEndpointUrl = "https://mcp.spacefast.com";
|
|
2
2
|
export type AgentSolutionLane = "plugin" | "hosted-mcp" | "local-mcp" | "cli" | "prompt";
|
|
3
3
|
export type AgentSolutionId = "codex" | "claude-code" | "claude-cowork" | "chatgpt" | "claude-ai" | "raycast" | "cursor" | "terminal" | "generic";
|
|
4
4
|
export type AgentSolution = {
|
|
@@ -20,7 +20,7 @@ export declare const agentSolutions: readonly [{
|
|
|
20
20
|
readonly lane: "plugin";
|
|
21
21
|
readonly summary: "Recommended: Codex plugin.";
|
|
22
22
|
readonly description: "Install the Spacefast skill/plugin so Codex can publish, update, and inspect spaces from the same setup path.";
|
|
23
|
-
readonly commands: readonly ["npx skills add spacefast/plugins --skill spacefast -g"];
|
|
23
|
+
readonly commands: readonly ["npx -y skills add spacefast/plugins --skill spacefast -g -a codex -y"];
|
|
24
24
|
readonly guideUrl: `${string}/for-codex`;
|
|
25
25
|
readonly detailGuideUrl: `${string}/guides/how-to-use-with-codex`;
|
|
26
26
|
readonly setupText: string;
|
|
@@ -53,7 +53,7 @@ export declare const agentSolutions: readonly [{
|
|
|
53
53
|
readonly lane: "hosted-mcp";
|
|
54
54
|
readonly summary: "Recommended: direct hosted MCP.";
|
|
55
55
|
readonly description: "Connect ChatGPT-style cloud agents to Spacefast through hosted MCP; use the virtual workspace or signed uploads instead of local paths.";
|
|
56
|
-
readonly commands: readonly ["https://mcp.spacefast.com
|
|
56
|
+
readonly commands: readonly ["https://mcp.spacefast.com"];
|
|
57
57
|
readonly guideUrl: `${string}/docs/agents`;
|
|
58
58
|
readonly setupText: string;
|
|
59
59
|
}, {
|
|
@@ -63,7 +63,7 @@ export declare const agentSolutions: readonly [{
|
|
|
63
63
|
readonly lane: "hosted-mcp";
|
|
64
64
|
readonly summary: "Recommended: direct hosted MCP.";
|
|
65
65
|
readonly description: "Connect the web Claude app to Spacefast through hosted MCP when it cannot read your local checkout.";
|
|
66
|
-
readonly commands: readonly ["https://mcp.spacefast.com
|
|
66
|
+
readonly commands: readonly ["https://mcp.spacefast.com"];
|
|
67
67
|
readonly guideUrl: `${string}/docs/agents`;
|
|
68
68
|
readonly setupText: string;
|
|
69
69
|
}, {
|
|
@@ -73,7 +73,7 @@ export declare const agentSolutions: readonly [{
|
|
|
73
73
|
readonly lane: "hosted-mcp";
|
|
74
74
|
readonly summary: "Recommended: direct hosted MCP.";
|
|
75
75
|
readonly description: "Use hosted MCP for Raycast and similar clients that can connect to a remote MCP server but should not need a local Spacefast install.";
|
|
76
|
-
readonly commands: readonly ["https://mcp.spacefast.com
|
|
76
|
+
readonly commands: readonly ["https://mcp.spacefast.com"];
|
|
77
77
|
readonly guideUrl: `${string}/docs/agents`;
|
|
78
78
|
readonly setupText: string;
|
|
79
79
|
}, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BRAND } from "../brand.js";
|
|
2
2
|
import { agentSetupPrompt, agentSetupTextUrl, agentSetupUrl } from "./agent-setup.js";
|
|
3
3
|
import { spacefastClaudePluginAddCommand, spacefastClaudePluginInstallCommand, spacefastCodexSkillInstallCommand, spacefastInstallCurlCommand, } from "./skill-distribution.js";
|
|
4
|
-
export const hostedMcpEndpointUrl = "https://mcp.spacefast.com
|
|
4
|
+
export const hostedMcpEndpointUrl = "https://mcp.spacefast.com";
|
|
5
5
|
function pluginText(label, commands, guideUrl) {
|
|
6
6
|
return [
|
|
7
7
|
`Set up ${BRAND.productName} for ${label}.`,
|
|
@@ -20,7 +20,7 @@ function hostedMcpText(label, guideUrl) {
|
|
|
20
20
|
"",
|
|
21
21
|
`MCP endpoint: ${hostedMcpEndpointUrl}`,
|
|
22
22
|
"Transport: Streamable HTTP",
|
|
23
|
-
"Resource: https://
|
|
23
|
+
"Resource: https://mcp.spacefast.com",
|
|
24
24
|
"Minimum scope: mcp:tools",
|
|
25
25
|
"Common scopes: teams:read spaces:read spaces:write publish:write domains:read domains:write",
|
|
26
26
|
"",
|