Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dist/
.spacefast/
node_modules/
content/(reference)/cli/reference.md
content/(reference)/cli/commands/
content/(reference)/errors/
content/(reference)/changelog/
content/setup/
Expand Down
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ Assume every commit and every line of history will be public.
producer-owned snapshot. The exporter owns every file there, including the
manifest and ownership marker. Do not hand-edit them.
- `.blume/**` and `dist/**` are generated by Blume. Never edit or commit them.
- `content/(reference)/cli/reference.md`, `content/(reference)/errors/**`,
- `content/(reference)/cli/reference.md`, `content/(reference)/cli/commands/**`
(one page per top-level command, split from the same snapshot and served at
`/cli/reference/<command>`), `content/(reference)/errors/**`,
`content/(reference)/changelog/**`, `content/setup/**`, and
`public/_redirects` are ignored build overlays materialized from the verified
snapshot. Do not hand-edit them.
Expand Down
6 changes: 1 addition & 5 deletions blume.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ const icons = {
handshake: phosphor(
"M254.3,107.91,228.78,56.85a16,16,0,0,0-21.47-7.15L182.44,62.13,130.05,48.27a8.14,8.14,0,0,0-4.1,0L73.56,62.13,48.69,49.7a16,16,0,0,0-21.47,7.15L1.7,107.9a16,16,0,0,0,7.15,21.47l27,13.51,55.49,39.63a8.06,8.06,0,0,0,2.71,1.25l64,16a8,8,0,0,0,7.6-2.1l55.07-55.08,26.42-13.21a16,16,0,0,0,7.15-21.46Zm-54.89,33.37L165,113.72a8,8,0,0,0-10.68.61C136.51,132.27,116.66,130,104,122L147.24,80h31.81l27.21,54.41ZM41.53,64,62,74.22,36.43,125.27,16,115.06Zm116,119.13L99.42,168.61l-49.2-35.14,28-56L128,64.28l9.8,2.59-45,43.68-.08.09a16,16,0,0,0,2.72,24.81c20.56,13.13,45.37,11,64.91-5L188,152.66Zm62-57.87-25.52-51L214.47,64,240,115.06Zm-87.75,92.67a8,8,0,0,1-7.75,6.06,8.13,8.13,0,0,1-1.95-.24L80.41,213.33a7.89,7.89,0,0,1-2.71-1.25L51.35,193.26a8,8,0,0,1,9.3-13l25.11,17.94L126,208.24A8,8,0,0,1,131.82,217.94Z",
),
house: phosphor(
"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z",
),
rocket: phosphor(
"M223.85,47.12a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.41,27.07L132.69,64H74.36A15.91,15.91,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A15.91,15.91,0,0,0,192,181.64V123.31l4.77-4.77C223.45,91.86,224.6,59.71,223.85,47.12ZM74.36,80h42.33L77.16,119.52,40,114.34Zm74.41-9.45a76.65,76.65,0,0,1,59.11-22.47,76.46,76.46,0,0,1-22.42,59.16L128,164.68,91.32,128ZM176,181.64,141.67,216l-5.19-37.17L176,139.31Zm-74.16,9.5C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Z",
),
Expand All @@ -67,7 +64,7 @@ export default defineConfig({
// Plan values from scripts/pricing-next.mjs, the source Pricing & Limits renders.
...planVariables(),
},
description: "Build better and ship with Spacefast — skills, tools, database, Workers, domains, and infrastructure in one Space.",
description: "Build better and ship with Spacefast: skills, tools, database, Workers, domains, and infrastructure in one Space.",
// Two links (components/Logo.astro): the mark goes to the Website home at the
// origin root, outside the /docs base; "Docs" goes to the Docs home.
logo: { href: "/", image: { light: "/spacefast-wordmark.svg", alt: "Spacefast" }, text: "Docs" },
Expand Down Expand Up @@ -122,7 +119,6 @@ export default defineConfig({
navigation: {
cta: { href: "https://my.spacefast.com", label: "Dashboard" },
featured: [
{ label: "Spacefast", href: "https://spacefast.com", icon: icons.house },
{ label: "Agent setup", href: "/agents", icon: icons.robot },
],
repo: true,
Expand Down
14 changes: 14 additions & 0 deletions components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,17 @@ const route = tab && tab.path !== "/" ? tab.path : props.route;
---

<Header {...props} route={route} />

<script>
// Blume renders the drawer outside this header with its own prefix-based tab match.
function syncDrawerTab() {
const current = document.querySelector<HTMLAnchorElement>('[data-blume-header] > nav a[aria-current="page"]');
if (!current) return;
for (const link of document.querySelectorAll<HTMLAnchorElement>('#blume-nav-drawer nav[aria-label="Sections"] a')) {
if (link.href === current.href) link.setAttribute("aria-current", "page");
else link.removeAttribute("aria-current");
}
}
syncDrawerTab();
document.addEventListener("astro:page-load", syncDrawerTab);
</script>
22 changes: 22 additions & 0 deletions components/sections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type { NavNode, NavTab } from "blume/core/types.ts";
// Navigation routes are base-less; Blume adds the deployment base when it renders links.
export const referenceTabPath = "/reference";
export const agentsTabPath = "/agents";
const platformsTabPath = "/platforms";
const referenceGroupLabel = "Reference";
const agentRoots = ["/setup", "/connect"];

Expand Down Expand Up @@ -94,6 +95,26 @@ const referenceSidebar = (sidebar: NavNode[]): NavNode[] => {
});
};

/** Platforms tab sidebar: fold the Partner API reference into the Partner API group, as the Reference tab does for REST. */
const platformsSidebar = (nodes: NavNode[]): NavNode[] => {
const isApi = (node: NavNode) => node.kind === "group" && node.path === "/platforms/api";
const reference = nodes.flatMap((node) =>
node.kind === "group" && isApi(node)
? node.children.map((child) =>
child.kind === "group" && child.path === "/platforms/api/reference" ? { ...child, label: "API reference" } : child,
)
: [],
);
if (reference.length === 0) return nodes;
return nodes
.filter((node) => !isApi(node))
.map((node) =>
node.kind === "group" && node.path === "/platforms/partner-api"
? { ...node, children: [...node.children, ...reference] }
: node,
);
};

/** The sidebar for a route's tab. */
export const sectionSidebar = (
sidebar: NavNode[],
Expand All @@ -110,6 +131,7 @@ export const sectionSidebar = (
);
return [...agents, ...generated];
}
if (tab?.path === platformsTabPath) return platformsSidebar(sidebarForRoute(sidebar, tabs, route, root));
if (tab && tab.path !== "/") return sidebarForRoute(sidebar, tabs, route, root);
return sidebar.filter((node) => !outsideDocs(node, sidebar, tabs));
};
11 changes: 8 additions & 3 deletions content/(account)/(labs)/design-system.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: Design System
description: Save a team's design rules once, then reuse and check them across projects
sidebar:
badge: Labs
---

<Badge variant="warning">Labs</Badge>
Expand All @@ -11,10 +13,13 @@ For agent imports and updates, use a Spacefast plugin with the [Design System ta

## Start a Design System

Design System is a [Labs](/labs) feature. Join **Design System** in **Team settings → Labs**, then open the team and choose **Design System**. If you see **Set up team context**, follow the [shared context setup](/labs#shared-team-context-setup) first. Then choose how to start:
Design System is a [Labs](/labs) feature.

- **Import what you already have.** Choose **Copy prompt** and give it to an agent connected to [Spacefast MCP](/agents). Give the agent your brand guide, Figma file, or repository too. With `import-design-system` installed, the agent saves supported values, registers source files, and keeps other guidance in supporting [Team Memories](/team-memories). Ask for a report of conflicts and anything it could not import.
- **Start from a kit.** Choose **shadcn/ui**, **Tailwind CSS**, or **Spacefast default**. The kit saves editable colors, type, and layout values. Review them before applying them to a project.
1. Join **Design System** in [**Team settings → Labs**](https://my.spacefast.com/?to=/:team/settings/labs).
2. Open the team's [**Design System**](https://my.spacefast.com/?to=/:team/design-system) page. If you see **Set up team context**, follow the [shared context setup](/labs#shared-team-context-setup) first.
3. Choose how to start:
- **Import what you already have.** Choose **Copy prompt** and give it to an agent connected to [Spacefast MCP](/agents). Give the agent your brand guide, Figma file, or repository too. With `import-design-system` installed, the agent saves supported values, registers source files, and keeps other guidance in supporting [Team Memories](/team-memories). Ask for a report of conflicts and anything it could not import.
- **Start from a kit.** Choose **shadcn/ui**, **Tailwind CSS**, or **Spacefast default**. The kit saves editable colors, type, and layout values. Review them before applying them to a project.

You can also add the standards yourself in the dashboard. **Look & feel** holds named colors, typography for headings and body text, and layout dimensions. **Voice** holds a tone description and writing rules with optional examples.

Expand Down
4 changes: 2 additions & 2 deletions content/(account)/(labs)/labs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Three team-context features are available through Labs. They share one private s

## How joining works

Open your team and go to **Team settings → Labs** to see available features, how to join each one, and your team's current status.
Open [**Team settings → Labs**](https://my.spacefast.com/?to=/:team/settings/labs) to see available features, how to join each one, and your team's current status.

| How to join | What happens |
| --- | --- |
Expand Down Expand Up @@ -72,4 +72,4 @@ Use these keys in the API:

## Shared team context setup

Team Memories, Team Skills, and Design System store their records in one private context home per team. The first time you open **Memories**, **Skills**, or **Design System** in the dashboard, select **Set up team context** if prompted. Over the API, call [`ensureTeamContext`](/api/reference/teams/ensureteamcontext) (`POST /v1/teams/{teamId}/context`) with an empty request body and a credential that holds `spaces:write`. Repeated calls reuse the same storage home.
Team Memories, Team Skills, and Design System store their records in one private context home per team. The first time you open [**Memories**](https://my.spacefast.com/?to=/:team/memory), [**Skills**](https://my.spacefast.com/?to=/:team/skills), or [**Design System**](https://my.spacefast.com/?to=/:team/design-system) in the dashboard, select **Set up team context** if prompted. Over the API, call [`ensureTeamContext`](/api/reference/teams/ensureteamcontext) (`POST /v1/teams/{teamId}/context`) with an empty request body and a credential that holds `spaces:write`. Repeated calls reuse the same storage home.
6 changes: 4 additions & 2 deletions content/(account)/(labs)/team-memories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: Team Memories
description: Save lasting team and Space facts that connected agents read before they work
sidebar:
badge: Labs
---

<Badge variant="warning">Labs</Badge>
Expand All @@ -13,10 +15,10 @@ Memories share private context storage with [Team Skills](/team-skills) and [Des

<Steps>
<Step title="Enable Memories in Labs">
Join **Memories** in **Team settings → Labs**. See [Labs](/labs).
Join **Memories** in [**Team settings → Labs**](https://my.spacefast.com/?to=/:team/settings/labs). See [Labs](/labs).
</Step>
<Step title="Initialize context storage">
Open **Memories** in your team and select **Set up team context** if prompted. Owners, admins, and members with publishing access can run setup.
Open [**Memories**](https://my.spacefast.com/?to=/:team/memory) in your team and select **Set up team context** if prompted. Owners, admins, and members with publishing access can run setup.
</Step>
<Step title="Save your first memory">
Add facts your agents should remember across sessions, scoped either to the whole team or to one Space.
Expand Down
6 changes: 4 additions & 2 deletions content/(account)/(labs)/team-skills.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: Team Skills
description: Turn on preset practices like SEO, accessibility, and spam protection for every agent on your team
sidebar:
badge: Labs
---

<Badge variant="warning">Labs</Badge>
Expand All @@ -13,10 +15,10 @@ Team Skills share private context storage with [Team Memories](/team-memories) a

<Steps>
<Step title="Apply in Labs">
Apply for **Skills** in **Team settings → Labs** with a short note explaining how your team plans to use it. See [Labs](/labs).
Apply for **Skills** in [**Team settings → Labs**](https://my.spacefast.com/?to=/:team/settings/labs) with a short note explaining how your team plans to use it. See [Labs](/labs).
</Step>
<Step title="Initialize context storage">
Open **Skills** in your team and select **Set up team context** if prompted, or call [`ensureTeamContext`](/api/reference/teams/ensureteamcontext) (`POST /v1/teams/{teamId}/context`) with no request body.
Open [**Skills**](https://my.spacefast.com/?to=/:team/skills) in your team and select **Set up team context** if prompted, or call [`ensureTeamContext`](/api/reference/teams/ensureteamcontext) (`POST /v1/teams/{teamId}/context`) with no request body.
</Step>
<Step title="Choose active skills">
Turn on the presets you want every agent on the team to follow.
Expand Down
14 changes: 7 additions & 7 deletions content/(account)/api-keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Keys belong to a team, and only that team's owners and admins can mint them.

<Steps>
<Step title="Open the team's Agents page">
In the dashboard, go to your team and open **Agents**. Keys live in the **API keys** section. Older addresses like `/<team>/api-keys` redirect here.
Open your team's [**Agents**](https://my.spacefast.com/?to=/:team/api-keys) page. Keys live in the **API keys** section. Older addresses like `/<team>/api-keys` redirect here.
</Step>
<Step title="Fill in the form">
**Name** is what you will recognize it by later, for example `CLI on my laptop`. **Policy preset** bounds what the key can do. **Expires** is optional and blank means no expiry.
Expand Down Expand Up @@ -86,7 +86,7 @@ sf api-keys update key_0123456789abcdef --connection cxn_abc123 --connection cxn
sf api-keys update key_0123456789abcdef --all-connections
```

Over the API, pass `connectorAccess: { connectionIds: ["cxn_abc123"] }` on `POST /v1/api-keys` or `PATCH /v1/api-keys/{apiKeyId}`, or `connectorAccess: null` to remove the limit. For OAuth apps and CLI logins, choose specific connections under **Choose Connections** on the consent screen, or edit them later on **Connected apps**. See [Connectors](/connectors).
Over the API, pass `connectorAccess: { connectionIds: ["cxn_abc123"] }` on `POST /v1/api-keys` or `PATCH /v1/api-keys/{apiKeyId}`, or `connectorAccess: null` to remove the limit. For OAuth apps and CLI logins, choose specific connections under **Choose Connections** on the consent screen, or edit them later on [**Connected apps**](https://my.spacefast.com/account/connected-apps). See [Connectors](/connectors).

## What an agent grant cannot do

Expand All @@ -101,13 +101,13 @@ A credential that tries gets a `403` with `authorization_level_not_allowed`. Do

## Rotate a key

A secret is immutable, so rotation means a new key. In the dashboard, **Replace key…** mints a fresh key with the same policy. It then offers to revoke the old one once your integrations have moved over.
A secret is immutable, so rotation means a new key. On the team's [**Agents**](https://my.spacefast.com/?to=/:team/api-keys) page, **Replace key…** mints a fresh key with the same policy. It then offers to revoke the old one once your integrations have moved over.

Revoking is immediate. Anything using that key fails on its next request. The row stays in the list marked revoked, so the audit trail survives.

## Deploy tokens

For a CI pipeline or script that only needs one Space, mint a Space-scoped **deploy token** (`sfm_`) instead of a team-wide `sfa_` API key. Deploy tokens are Share entries (`audience: "token"`) managed through [`sf deploy-tokens`](/cli/reference#sf-deploy-tokens) and `/v1/spaces/{spaceId}/share/entries`:
For a CI pipeline or script that only needs one Space, mint a Space-scoped **deploy token** (`sfm_`) instead of a team-wide `sfa_` API key. Deploy tokens are Share entries (`audience: "token"`) managed through [`sf deploy-tokens`](/cli/reference/deploy-tokens#sf-deploy-tokens) and `/v1/spaces/{spaceId}/share/entries`:

```bash
# Preview-only deploy token (default)
Expand All @@ -120,16 +120,16 @@ sf deploy-tokens create --name ci-release --live --expires 90d --show-secret
sf deploy-tokens create --name docs-feed --view-only --path '/docs/**' --show-secret
```

Pass the returned `sfm_` token in `SPACEFAST_TOKEN` or `Authorization: Bearer sfm_...`. Manage tokens without recreating them using [`sf deploy-tokens list`](/cli/reference#sf-deploy-tokens-list), [`sf deploy-tokens update`](/cli/reference#sf-deploy-tokens-update-id), [`sf deploy-tokens rotate`](/cli/reference#sf-deploy-tokens-rotate-id), and [`sf deploy-tokens revoke`](/cli/reference#sf-deploy-tokens-revoke-id). See [Publish from CI](/ci) for GitHub Actions and GitLab CI examples.
Pass the returned `sfm_` token in `SPACEFAST_TOKEN` or `Authorization: Bearer sfm_...`. Manage tokens without recreating them using [`sf deploy-tokens list`](/cli/reference/deploy-tokens#sf-deploy-tokens-list), [`sf deploy-tokens update`](/cli/reference/deploy-tokens#sf-deploy-tokens-update-id), [`sf deploy-tokens rotate`](/cli/reference/deploy-tokens#sf-deploy-tokens-rotate-id), and [`sf deploy-tokens revoke`](/cli/reference/deploy-tokens#sf-deploy-tokens-revoke-id). See [Publish from CI](/ci) for GitHub Actions and GitLab CI examples.

## Every credential, by prefix

Spacefast puts a prefix on each credential so you always know what you are holding.

| Prefix | What it is | Where you get it |
|---|---|---|
| `sfa_` | API key. The credential for the CLI, CI, and server-to-server calls | The team's **Agents** page, `sf api-keys create`, or `sf login` |
| `sfm_` | Space machine or deploy token. Publishes one Space (preview-only or live) or reads a private Space's pages | [`sf deploy-tokens create`](/cli/reference#sf-deploy-tokens-create) or [`sf share token create`](/cli/reference#sf-share-token-create), shown once, rotatable |
| `sfa_` | API key. The credential for the CLI, CI, and server-to-server calls | The team's [**Agents**](https://my.spacefast.com/?to=/:team/api-keys) page, `sf api-keys create`, or `sf login` |
| `sfm_` | Space machine or deploy token. Publishes one Space (preview-only or live) or reads a private Space's pages | [`sf deploy-tokens create`](/cli/reference/deploy-tokens#sf-deploy-tokens-create) or [`sf share token create`](/cli/reference/share#sf-share-token-create), shown once, rotatable |
| `sfc_` | Space key. Proves you published an anonymous Space, keeps updating it, and claims it later | The publish receipt, and the fragment of the claim URL |
| `sfl_` | Share link token. Rides in the `?__=` query of a share URL | `sf share link create`, or the dashboard access panel |
| `sfp_` | Git push credential, embedded in the push remote URL | The dashboard, inside the `git remote add` line it gives you |
Expand Down
Loading
Loading