@spacefast/common 0.0.6 → 0.0.7
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/brand-assets/spacefast-favicon.svg +16 -0
- package/brand-assets/spacefast-sf-full-bleed.svg +13 -0
- package/brand-assets/spacefast-wordmark.svg +5 -0
- package/dist/agents/connect-targets.d.ts +6 -1
- package/dist/agents/connect-targets.js +19 -0
- package/dist/brand-assets-build.d.ts +26 -0
- package/dist/brand-assets-build.js +81 -0
- package/dist/brand-assets.d.ts +42 -0
- package/dist/brand-assets.js +30 -0
- package/dist/contracts/access.d.ts +143 -0
- package/dist/contracts/access.js +33 -0
- package/dist/contracts/api-keys.d.ts +123 -0
- package/dist/contracts/api-keys.js +65 -0
- package/dist/contracts/builds.d.ts +40 -0
- package/dist/contracts/builds.js +17 -0
- package/dist/contracts/enums.js +5 -4
- package/dist/contracts/error-code-meta.d.ts +116 -4
- package/dist/contracts/error-code-meta.js +29 -1
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +28 -0
- package/dist/contracts/feature-lifecycle-core.d.ts +36 -0
- package/dist/contracts/feature-lifecycle-core.js +220 -0
- package/dist/contracts/feature-lifecycle.d.ts +7 -0
- package/dist/contracts/feature-lifecycle.js +31 -0
- package/dist/contracts/generated-feature-launch-entries.d.ts +2 -0
- package/dist/contracts/generated-feature-launch-entries.js +518 -0
- package/dist/contracts/ids.d.ts +4 -0
- package/dist/contracts/ids.js +8 -0
- package/dist/contracts/operations.d.ts +161 -1
- package/dist/contracts/operations.js +49 -1
- package/dist/contracts/platform.d.ts +6 -0
- package/dist/contracts/platform.js +6 -0
- package/dist/contracts/publishes.d.ts +130 -0
- package/dist/contracts/publishes.js +145 -0
- package/dist/contracts/repository-connections.d.ts +3 -0
- package/dist/contracts/repository-connections.js +13 -0
- package/dist/contracts/resources.d.ts +2 -0
- package/dist/contracts/resources.js +10 -2
- package/dist/contracts/runtime-api.d.ts +2 -0
- package/dist/contracts/runtime-api.js +1 -0
- package/dist/contracts/sf-config-v1.d.ts +75 -0
- package/dist/contracts/sf-config-v1.js +6 -0
- package/dist/contracts/spaces.d.ts +12 -3
- package/dist/contracts/spaces.js +22 -2
- package/dist/contracts/superadmin-spaces.d.ts +2 -0
- package/dist/contracts/superadmin-tenants.d.ts +6 -6
- package/dist/contracts/superadmin-tenants.js +6 -11
- package/dist/contracts/teams.d.ts +8 -11
- package/dist/contracts/teams.js +11 -16
- package/dist/docs/agent-setup.d.ts +51 -0
- package/dist/docs/agent-setup.js +168 -3
- package/dist/docs/error-docs.js +113 -1
- package/dist/slug-policy/blocklist.d.ts +4 -0
- package/dist/slug-policy/blocklist.js +122 -0
- package/dist/slug-policy/index.d.ts +17 -0
- package/dist/slug-policy/index.js +86 -0
- package/dist/utils/concurrency.d.ts +1 -0
- package/dist/utils/concurrency.js +22 -0
- package/dist/utils/email.d.ts +1 -0
- package/dist/utils/email.js +3 -0
- package/dist/utils/query-keys.d.ts +1 -0
- package/dist/utils/query-keys.js +4 -0
- package/dist/utils/sf-config-v1.d.ts +2 -0
- package/dist/utils/sf-config-v1.js +542 -0
- package/package.json +20 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 160" role="img" aria-label="Spacefast">
|
|
2
|
+
<style>
|
|
3
|
+
.sf-favicon-primary { fill: #141419; }
|
|
4
|
+
@media (prefers-color-scheme: dark) { .sf-favicon-primary { fill: #fbf8f1; } }
|
|
5
|
+
</style>
|
|
6
|
+
<g transform="rotate(-1 80 80)">
|
|
7
|
+
<g transform="translate(22.5 48) scale(2.15)" fill="#ff4217">
|
|
8
|
+
<path d="M0 0h24v7H7v7h17v20H0v-7h17v-7H0V0Z"/>
|
|
9
|
+
<path d="M0 0h25v7H7v6h15v7H7v14H0V0Z" transform="translate(31 0)"/>
|
|
10
|
+
</g>
|
|
11
|
+
<g class="sf-favicon-primary" transform="translate(17.5 43) scale(2.15)" fill="#141419">
|
|
12
|
+
<path d="M0 0h24v7H7v7h17v20H0v-7h17v-7H0V0Z"/>
|
|
13
|
+
<path d="M0 0h25v7H7v6h15v7H7v14H0V0Z" transform="translate(31 0)"/>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 160" role="img" aria-label="Spacefast">
|
|
2
|
+
<rect width="160" height="160" fill="#141419"/>
|
|
3
|
+
<g transform="rotate(-1 80 80)">
|
|
4
|
+
<g transform="translate(39.75 55.5) scale(1.5)" fill="#ff4217">
|
|
5
|
+
<path d="M0 0h24v7H7v7h17v20H0v-7h17v-7H0V0Z"/>
|
|
6
|
+
<path d="M0 0h25v7H7v6h15v7H7v14H0V0Z" transform="translate(31 0)"/>
|
|
7
|
+
</g>
|
|
8
|
+
<g transform="translate(34.75 50.5) scale(1.5)" fill="#fbf8f1">
|
|
9
|
+
<path d="M0 0h24v7H7v7h17v20H0v-7h17v-7H0V0Z"/>
|
|
10
|
+
<path d="M0 0h25v7H7v6h15v7H7v14H0V0Z" transform="translate(31 0)"/>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 326 62" role="img" aria-label="Spacefast">
|
|
2
|
+
<rect x="14" y="12" width="306" height="48" fill="#ff4217"/>
|
|
3
|
+
<rect x="10" y="8" width="306" height="48" fill="#141419" stroke="#141419" stroke-width="1"/>
|
|
4
|
+
<path fill="#fbf8f1" d="M20 15h24v7H27v7h17v20H20v-7h17v-7H20V15ZM51 15h24v18H58v16h-7V15Zm7 11h10v-4H58v4ZM83 15h24l9 34h-8l-2-8H84l-2 8h-8l9-34Zm3 19h18l-4-12H90l-4 12ZM145 22h-19v20h19v7h-26V15h26v7ZM152 15h26v7h-19v6h15v7h-15v7h19v7h-26V15ZM185 15h25v7h-18v6h15v7h-15v14h-7V15ZM215 15h24l9 34h-8l-2-8h-22l-2 8h-8l9-34Zm3 19h18l-4-12h-10l-4 12ZM250 15h24v7h-17v7h17v20h-24v-7h17v-7h-17V15ZM279 15h27v7h-10v27h-7V22h-10v-7Z"/>
|
|
5
|
+
</svg>
|
|
@@ -108,8 +108,10 @@ export type ConnectDownload = Readonly<{
|
|
|
108
108
|
* a copy of the command/endpoint that wires it), plus an optional secondary
|
|
109
109
|
* "copy the client config file" affordance.
|
|
110
110
|
*/
|
|
111
|
+
export declare const CONNECT_TARGET_IDS: readonly ["claude-code", "cursor", "vscode", "codex", "claude", "chatgpt"];
|
|
112
|
+
export type ConnectTargetId = (typeof CONNECT_TARGET_IDS)[number];
|
|
111
113
|
export type ConnectTarget = Readonly<{
|
|
112
|
-
id:
|
|
114
|
+
id: ConnectTargetId;
|
|
113
115
|
name: string;
|
|
114
116
|
/** One short line on how this agent connects. */
|
|
115
117
|
blurb: string;
|
|
@@ -131,3 +133,6 @@ export type ConnectTarget = Readonly<{
|
|
|
131
133
|
export declare function buildConnectTargets({ mcpEndpoint }: {
|
|
132
134
|
mcpEndpoint: string;
|
|
133
135
|
}): ConnectTarget[];
|
|
136
|
+
export declare function getConnectTarget(id: ConnectTargetId, options: {
|
|
137
|
+
mcpEndpoint: string;
|
|
138
|
+
}): ConnectTarget;
|
|
@@ -146,6 +146,19 @@ export function buildClaudeMcpAddCommand(mcpEndpoint) {
|
|
|
146
146
|
export function buildCodexMcpAddCommand(mcpEndpoint) {
|
|
147
147
|
return `codex mcp add ${LOCAL_MCP_PACKAGE} --url ${mcpEndpoint} && codex mcp login ${LOCAL_MCP_PACKAGE}`;
|
|
148
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* A single connect card: one agent, one primary action (a one-click deeplink or
|
|
151
|
+
* a copy of the command/endpoint that wires it), plus an optional secondary
|
|
152
|
+
* "copy the client config file" affordance.
|
|
153
|
+
*/
|
|
154
|
+
export const CONNECT_TARGET_IDS = [
|
|
155
|
+
"claude-code",
|
|
156
|
+
"cursor",
|
|
157
|
+
"vscode",
|
|
158
|
+
"codex",
|
|
159
|
+
"claude",
|
|
160
|
+
"chatgpt",
|
|
161
|
+
];
|
|
149
162
|
/**
|
|
150
163
|
* The per-agent connect catalog, parameterized by the hosted MCP endpoint.
|
|
151
164
|
* Every one-click and copy-config path carries the hosted endpoint (OAuth,
|
|
@@ -222,3 +235,9 @@ export function buildConnectTargets({ mcpEndpoint }) {
|
|
|
222
235
|
},
|
|
223
236
|
];
|
|
224
237
|
}
|
|
238
|
+
export function getConnectTarget(id, options) {
|
|
239
|
+
const target = buildConnectTargets(options).find((entry) => entry.id === id);
|
|
240
|
+
if (!target)
|
|
241
|
+
throw new TypeError(`Unknown agent target: ${id}`);
|
|
242
|
+
return target;
|
|
243
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build-only SVG serialization for the canonical Spacefast brand geometry.
|
|
3
|
+
*
|
|
4
|
+
* Browser and application modules must import `@spacefast/common/brand-assets`
|
|
5
|
+
* and render ordinary SVG markup from its constants. Only asset generators,
|
|
6
|
+
* plugin packaging, and other build steps may import this module.
|
|
7
|
+
*/
|
|
8
|
+
import { type SpacefastBrandColors } from "./brand-assets.js";
|
|
9
|
+
export type WordmarkSvgOptions = {
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
colors?: Partial<SpacefastBrandColors>;
|
|
12
|
+
height?: number;
|
|
13
|
+
width?: number;
|
|
14
|
+
};
|
|
15
|
+
export type IconSvgOptions = {
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
colors?: Partial<SpacefastBrandColors>;
|
|
18
|
+
size?: number;
|
|
19
|
+
};
|
|
20
|
+
export type FaviconSvgOptions = {
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
theme?: "adaptive" | "dark" | "light";
|
|
23
|
+
};
|
|
24
|
+
export declare function spacefastWordmarkSvg(options?: WordmarkSvgOptions): string;
|
|
25
|
+
export declare function spacefastIconSvg(options?: IconSvgOptions): string;
|
|
26
|
+
export declare function spacefastFaviconSvg(options?: FaviconSvgOptions): string;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build-only SVG serialization for the canonical Spacefast brand geometry.
|
|
3
|
+
*
|
|
4
|
+
* Browser and application modules must import `@spacefast/common/brand-assets`
|
|
5
|
+
* and render ordinary SVG markup from its constants. Only asset generators,
|
|
6
|
+
* plugin packaging, and other build steps may import this module.
|
|
7
|
+
*/
|
|
8
|
+
import { SPACEFAST_BRAND_COLORS, SPACEFAST_ICON_F_OFFSET_X, SPACEFAST_ICON_F_PATH, SPACEFAST_ICON_LETTER_ORIGIN, SPACEFAST_ICON_LETTER_SCALE, SPACEFAST_ICON_S_PATH, SPACEFAST_ICON_SHADOW_OFFSET, SPACEFAST_ICON_VIEW_BOX, SPACEFAST_WORDMARK_PATH, SPACEFAST_WORDMARK_PLATE, SPACEFAST_WORDMARK_SHADOW_OFFSET, SPACEFAST_WORDMARK_VIEW_BOX, } from "./brand-assets.js";
|
|
9
|
+
function resolvedColors(colors) {
|
|
10
|
+
return { ...SPACEFAST_BRAND_COLORS, ...colors };
|
|
11
|
+
}
|
|
12
|
+
function svgAttribute(value) {
|
|
13
|
+
return value
|
|
14
|
+
.replaceAll("&", "&")
|
|
15
|
+
.replaceAll('"', """)
|
|
16
|
+
.replaceAll("<", "<")
|
|
17
|
+
.replaceAll(">", ">");
|
|
18
|
+
}
|
|
19
|
+
function numericAttribute(name, value) {
|
|
20
|
+
if (value === undefined)
|
|
21
|
+
return "";
|
|
22
|
+
if (!Number.isFinite(value) || value <= 0) {
|
|
23
|
+
throw new RangeError(`${name} must be a positive finite number`);
|
|
24
|
+
}
|
|
25
|
+
return ` ${name}="${value}"`;
|
|
26
|
+
}
|
|
27
|
+
export function spacefastWordmarkSvg(options = {}) {
|
|
28
|
+
const colors = resolvedColors(options.colors);
|
|
29
|
+
const plate = SPACEFAST_WORDMARK_PLATE;
|
|
30
|
+
const shadow = SPACEFAST_WORDMARK_SHADOW_OFFSET;
|
|
31
|
+
const label = svgAttribute(options.ariaLabel ?? "Spacefast");
|
|
32
|
+
return `<svg xmlns="http://www.w3.org/2000/svg"${numericAttribute("width", options.width)}${numericAttribute("height", options.height)} viewBox="${SPACEFAST_WORDMARK_VIEW_BOX}" role="img" aria-label="${label}">
|
|
33
|
+
<rect x="${plate.x + shadow.x}" y="${plate.y + shadow.y}" width="${plate.width}" height="${plate.height}" fill="${svgAttribute(colors.shadow)}"/>
|
|
34
|
+
<rect x="${plate.x}" y="${plate.y}" width="${plate.width}" height="${plate.height}" fill="${svgAttribute(colors.plate)}" stroke="${svgAttribute(colors.plate)}" stroke-width="1"/>
|
|
35
|
+
<path fill="${svgAttribute(colors.paper)}" d="${SPACEFAST_WORDMARK_PATH}"/>
|
|
36
|
+
</svg>
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
function iconLetters(fill, x, y, scale = SPACEFAST_ICON_LETTER_SCALE, className) {
|
|
40
|
+
const classAttribute = className ? ` class="${svgAttribute(className)}"` : "";
|
|
41
|
+
return `<g${classAttribute} transform="translate(${x} ${y}) scale(${scale})" fill="${svgAttribute(fill)}">
|
|
42
|
+
<path d="${SPACEFAST_ICON_S_PATH}"/>
|
|
43
|
+
<path d="${SPACEFAST_ICON_F_PATH}" transform="translate(${SPACEFAST_ICON_F_OFFSET_X} 0)"/>
|
|
44
|
+
</g>`;
|
|
45
|
+
}
|
|
46
|
+
export function spacefastIconSvg(options = {}) {
|
|
47
|
+
const colors = resolvedColors(options.colors);
|
|
48
|
+
const origin = SPACEFAST_ICON_LETTER_ORIGIN;
|
|
49
|
+
const shadow = SPACEFAST_ICON_SHADOW_OFFSET;
|
|
50
|
+
const label = svgAttribute(options.ariaLabel ?? "Spacefast");
|
|
51
|
+
const size = numericAttribute("width", options.size) + numericAttribute("height", options.size);
|
|
52
|
+
return `<svg xmlns="http://www.w3.org/2000/svg"${size} viewBox="${SPACEFAST_ICON_VIEW_BOX}" role="img" aria-label="${label}">
|
|
53
|
+
<rect width="160" height="160" fill="${svgAttribute(colors.plate)}"/>
|
|
54
|
+
<g transform="rotate(-1 80 80)">
|
|
55
|
+
${iconLetters(colors.shadow, origin.x + shadow.x, origin.y + shadow.y)}
|
|
56
|
+
${iconLetters(colors.paper, origin.x, origin.y)}
|
|
57
|
+
</g>
|
|
58
|
+
</svg>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
export function spacefastFaviconSvg(options = {}) {
|
|
62
|
+
const theme = options.theme ?? "adaptive";
|
|
63
|
+
const label = svgAttribute(options.ariaLabel ?? "Spacefast");
|
|
64
|
+
const primary = theme === "dark" ? SPACEFAST_BRAND_COLORS.paper : SPACEFAST_BRAND_COLORS.plate;
|
|
65
|
+
const adaptiveStyles = theme === "adaptive"
|
|
66
|
+
? `
|
|
67
|
+
<style>
|
|
68
|
+
.sf-favicon-primary { fill: ${SPACEFAST_BRAND_COLORS.plate}; }
|
|
69
|
+
@media (prefers-color-scheme: dark) { .sf-favicon-primary { fill: ${SPACEFAST_BRAND_COLORS.paper}; } }
|
|
70
|
+
</style>`
|
|
71
|
+
: "";
|
|
72
|
+
const origin = { x: 17.5, y: 43 };
|
|
73
|
+
const scale = 2.15;
|
|
74
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${SPACEFAST_ICON_VIEW_BOX}" role="img" aria-label="${label}">${adaptiveStyles}
|
|
75
|
+
<g transform="rotate(-1 80 80)">
|
|
76
|
+
${iconLetters(SPACEFAST_BRAND_COLORS.shadow, origin.x + 5, origin.y + 5, scale)}
|
|
77
|
+
${iconLetters(primary, origin.x, origin.y, scale, "sf-favicon-primary")}
|
|
78
|
+
</g>
|
|
79
|
+
</svg>
|
|
80
|
+
`;
|
|
81
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical Spacefast visual geometry.
|
|
3
|
+
*
|
|
4
|
+
* Keep this module dependency-free: React, Astro, build scripts, social-card
|
|
5
|
+
* renderers, and plugin generators all consume it. Generated SVG/PNG files are
|
|
6
|
+
* build outputs of these constants, never independent sources of truth.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SPACEFAST_BRAND_COLORS: {
|
|
9
|
+
readonly shadow: "#ff4217";
|
|
10
|
+
readonly plate: "#141419";
|
|
11
|
+
readonly paper: "#fbf8f1";
|
|
12
|
+
};
|
|
13
|
+
export type SpacefastBrandColors = {
|
|
14
|
+
shadow: string;
|
|
15
|
+
plate: string;
|
|
16
|
+
paper: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const SPACEFAST_WORDMARK_VIEW_BOX = "0 0 326 62";
|
|
19
|
+
export declare const SPACEFAST_WORDMARK_PLATE: {
|
|
20
|
+
readonly x: 10;
|
|
21
|
+
readonly y: 8;
|
|
22
|
+
readonly width: 306;
|
|
23
|
+
readonly height: 48;
|
|
24
|
+
};
|
|
25
|
+
export declare const SPACEFAST_WORDMARK_SHADOW_OFFSET: {
|
|
26
|
+
readonly x: 4;
|
|
27
|
+
readonly y: 4;
|
|
28
|
+
};
|
|
29
|
+
export declare const SPACEFAST_WORDMARK_PATH = "M20 15h24v7H27v7h17v20H20v-7h17v-7H20V15ZM51 15h24v18H58v16h-7V15Zm7 11h10v-4H58v4ZM83 15h24l9 34h-8l-2-8H84l-2 8h-8l9-34Zm3 19h18l-4-12H90l-4 12ZM145 22h-19v20h19v7h-26V15h26v7ZM152 15h26v7h-19v6h15v7h-15v7h19v7h-26V15ZM185 15h25v7h-18v6h15v7h-15v14h-7V15ZM215 15h24l9 34h-8l-2-8h-22l-2 8h-8l9-34Zm3 19h18l-4-12h-10l-4 12ZM250 15h24v7h-17v7h17v20h-24v-7h17v-7h-17V15ZM279 15h27v7h-10v27h-7V22h-10v-7Z";
|
|
30
|
+
export declare const SPACEFAST_ICON_VIEW_BOX = "0 0 160 160";
|
|
31
|
+
export declare const SPACEFAST_ICON_S_PATH = "M0 0h24v7H7v7h17v20H0v-7h17v-7H0V0Z";
|
|
32
|
+
export declare const SPACEFAST_ICON_F_PATH = "M0 0h25v7H7v6h15v7H7v14H0V0Z";
|
|
33
|
+
export declare const SPACEFAST_ICON_LETTER_ORIGIN: {
|
|
34
|
+
readonly x: 34.75;
|
|
35
|
+
readonly y: 50.5;
|
|
36
|
+
};
|
|
37
|
+
export declare const SPACEFAST_ICON_LETTER_SCALE = 1.5;
|
|
38
|
+
export declare const SPACEFAST_ICON_F_OFFSET_X = 31;
|
|
39
|
+
export declare const SPACEFAST_ICON_SHADOW_OFFSET: {
|
|
40
|
+
readonly x: 5;
|
|
41
|
+
readonly y: 5;
|
|
42
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical Spacefast visual geometry.
|
|
3
|
+
*
|
|
4
|
+
* Keep this module dependency-free: React, Astro, build scripts, social-card
|
|
5
|
+
* renderers, and plugin generators all consume it. Generated SVG/PNG files are
|
|
6
|
+
* build outputs of these constants, never independent sources of truth.
|
|
7
|
+
*/
|
|
8
|
+
export const SPACEFAST_BRAND_COLORS = {
|
|
9
|
+
shadow: "#ff4217",
|
|
10
|
+
plate: "#141419",
|
|
11
|
+
paper: "#fbf8f1",
|
|
12
|
+
};
|
|
13
|
+
export const SPACEFAST_WORDMARK_VIEW_BOX = "0 0 326 62";
|
|
14
|
+
export const SPACEFAST_WORDMARK_PLATE = {
|
|
15
|
+
x: 10,
|
|
16
|
+
y: 8,
|
|
17
|
+
width: 306,
|
|
18
|
+
height: 48,
|
|
19
|
+
};
|
|
20
|
+
export const SPACEFAST_WORDMARK_SHADOW_OFFSET = { x: 4, y: 4 };
|
|
21
|
+
// Re-kerned and vertically centered on the plate. This is a literal so browser
|
|
22
|
+
// consumers render ordinary SVG markup without assembling path text at runtime.
|
|
23
|
+
export const SPACEFAST_WORDMARK_PATH = "M20 15h24v7H27v7h17v20H20v-7h17v-7H20V15ZM51 15h24v18H58v16h-7V15Zm7 11h10v-4H58v4ZM83 15h24l9 34h-8l-2-8H84l-2 8h-8l9-34Zm3 19h18l-4-12H90l-4 12ZM145 22h-19v20h19v7h-26V15h26v7ZM152 15h26v7h-19v6h15v7h-15v7h19v7h-26V15ZM185 15h25v7h-18v6h15v7h-15v14h-7V15ZM215 15h24l9 34h-8l-2-8h-22l-2 8h-8l9-34Zm3 19h18l-4-12h-10l-4 12ZM250 15h24v7h-17v7h17v20h-24v-7h17v-7h-17V15ZM279 15h27v7h-10v27h-7V22h-10v-7Z";
|
|
24
|
+
export const SPACEFAST_ICON_VIEW_BOX = "0 0 160 160";
|
|
25
|
+
export const SPACEFAST_ICON_S_PATH = "M0 0h24v7H7v7h17v20H0v-7h17v-7H0V0Z";
|
|
26
|
+
export const SPACEFAST_ICON_F_PATH = "M0 0h25v7H7v6h15v7H7v14H0V0Z";
|
|
27
|
+
export const SPACEFAST_ICON_LETTER_ORIGIN = { x: 34.75, y: 50.5 };
|
|
28
|
+
export const SPACEFAST_ICON_LETTER_SCALE = 1.5;
|
|
29
|
+
export const SPACEFAST_ICON_F_OFFSET_X = 31;
|
|
30
|
+
export const SPACEFAST_ICON_SHADOW_OFFSET = { x: 5, y: 5 };
|
|
@@ -898,6 +898,149 @@ export declare const spacePolicySchema: z.ZodObject<{
|
|
|
898
898
|
version: z.ZodDefault<z.ZodNumber>;
|
|
899
899
|
}, z.core.$strip>;
|
|
900
900
|
export type SpacePolicy = z.infer<typeof spacePolicySchema>;
|
|
901
|
+
export declare const spaceAccessRulesWriteSchema: z.ZodObject<{
|
|
902
|
+
rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
903
|
+
id: z.ZodOptional<z.ZodString>;
|
|
904
|
+
match: z.ZodDefault<z.ZodObject<{
|
|
905
|
+
host: z.ZodOptional<z.ZodString>;
|
|
906
|
+
hostPattern: z.ZodOptional<z.ZodString>;
|
|
907
|
+
hostTemplate: z.ZodOptional<z.ZodString>;
|
|
908
|
+
pathPattern: z.ZodOptional<z.ZodString>;
|
|
909
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
910
|
+
ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
911
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
912
|
+
country: z.ZodOptional<z.ZodString>;
|
|
913
|
+
header: z.ZodOptional<z.ZodObject<{
|
|
914
|
+
name: z.ZodString;
|
|
915
|
+
value: z.ZodString;
|
|
916
|
+
}, z.core.$strip>>;
|
|
917
|
+
}, z.core.$strip>>;
|
|
918
|
+
effect: z.ZodEnum<{
|
|
919
|
+
allow: "allow";
|
|
920
|
+
deny: "deny";
|
|
921
|
+
challenge: "challenge";
|
|
922
|
+
}>;
|
|
923
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
924
|
+
requiredGrants: z.ZodArray<z.ZodString>;
|
|
925
|
+
issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
926
|
+
kid: z.ZodString;
|
|
927
|
+
alg: z.ZodLiteral<"EdDSA">;
|
|
928
|
+
publicKey: z.ZodString;
|
|
929
|
+
grantNamespaces: z.ZodArray<z.ZodString>;
|
|
930
|
+
}, z.core.$strip>>>;
|
|
931
|
+
acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
932
|
+
type: z.ZodLiteral<"password">;
|
|
933
|
+
ref: z.ZodString;
|
|
934
|
+
transport: z.ZodEnum<{
|
|
935
|
+
basic: "basic";
|
|
936
|
+
form: "form";
|
|
937
|
+
}>;
|
|
938
|
+
username: z.ZodOptional<z.ZodString>;
|
|
939
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
940
|
+
type: z.ZodLiteral<"login">;
|
|
941
|
+
url: z.ZodString;
|
|
942
|
+
label: z.ZodOptional<z.ZodString>;
|
|
943
|
+
}, z.core.$strip>], "type">>>;
|
|
944
|
+
}, z.core.$strip>>;
|
|
945
|
+
managedBy: z.ZodOptional<z.ZodEnum<{
|
|
946
|
+
sharing: "sharing";
|
|
947
|
+
firewall: "firewall";
|
|
948
|
+
file_share: "file_share";
|
|
949
|
+
cast_reviewer: "cast_reviewer";
|
|
950
|
+
team_default: "team_default";
|
|
951
|
+
}>>;
|
|
952
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
953
|
+
reasonCode: z.ZodOptional<z.ZodString>;
|
|
954
|
+
message: z.ZodOptional<z.ZodString>;
|
|
955
|
+
}, z.core.$strip>>>;
|
|
956
|
+
expectedVersion: z.ZodOptional<z.ZodNumber>;
|
|
957
|
+
}, z.core.$strip>;
|
|
958
|
+
export type SpaceAccessRulesWrite = z.infer<typeof spaceAccessRulesWriteSchema>;
|
|
959
|
+
export declare const spaceAccessRulesReadSchema: z.ZodObject<{
|
|
960
|
+
rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
961
|
+
id: z.ZodOptional<z.ZodString>;
|
|
962
|
+
match: z.ZodDefault<z.ZodObject<{
|
|
963
|
+
host: z.ZodOptional<z.ZodString>;
|
|
964
|
+
hostPattern: z.ZodOptional<z.ZodString>;
|
|
965
|
+
hostTemplate: z.ZodOptional<z.ZodString>;
|
|
966
|
+
pathPattern: z.ZodOptional<z.ZodString>;
|
|
967
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
968
|
+
ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
969
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
970
|
+
country: z.ZodOptional<z.ZodString>;
|
|
971
|
+
header: z.ZodOptional<z.ZodObject<{
|
|
972
|
+
name: z.ZodString;
|
|
973
|
+
value: z.ZodString;
|
|
974
|
+
}, z.core.$strip>>;
|
|
975
|
+
}, z.core.$strip>>;
|
|
976
|
+
effect: z.ZodEnum<{
|
|
977
|
+
allow: "allow";
|
|
978
|
+
deny: "deny";
|
|
979
|
+
challenge: "challenge";
|
|
980
|
+
}>;
|
|
981
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
982
|
+
requiredGrants: z.ZodArray<z.ZodString>;
|
|
983
|
+
issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
984
|
+
kid: z.ZodString;
|
|
985
|
+
alg: z.ZodLiteral<"EdDSA">;
|
|
986
|
+
publicKey: z.ZodString;
|
|
987
|
+
grantNamespaces: z.ZodArray<z.ZodString>;
|
|
988
|
+
}, z.core.$strip>>>;
|
|
989
|
+
acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
990
|
+
type: z.ZodLiteral<"password">;
|
|
991
|
+
ref: z.ZodString;
|
|
992
|
+
transport: z.ZodEnum<{
|
|
993
|
+
basic: "basic";
|
|
994
|
+
form: "form";
|
|
995
|
+
}>;
|
|
996
|
+
username: z.ZodOptional<z.ZodString>;
|
|
997
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
998
|
+
type: z.ZodLiteral<"login">;
|
|
999
|
+
url: z.ZodString;
|
|
1000
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1001
|
+
}, z.core.$strip>], "type">>>;
|
|
1002
|
+
}, z.core.$strip>>;
|
|
1003
|
+
managedBy: z.ZodOptional<z.ZodEnum<{
|
|
1004
|
+
sharing: "sharing";
|
|
1005
|
+
firewall: "firewall";
|
|
1006
|
+
file_share: "file_share";
|
|
1007
|
+
cast_reviewer: "cast_reviewer";
|
|
1008
|
+
team_default: "team_default";
|
|
1009
|
+
}>>;
|
|
1010
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
1011
|
+
reasonCode: z.ZodOptional<z.ZodString>;
|
|
1012
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1013
|
+
}, z.core.$strip>>>;
|
|
1014
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
1015
|
+
accessExceedsPlan: z.ZodDefault<z.ZodBoolean>;
|
|
1016
|
+
}, z.core.$strip>;
|
|
1017
|
+
export type SpaceAccessRulesRead = z.infer<typeof spaceAccessRulesReadSchema>;
|
|
1018
|
+
export declare const quickShareSchema: z.ZodObject<{
|
|
1019
|
+
kind: z.ZodLiteral<"quick_share">;
|
|
1020
|
+
url: z.ZodString;
|
|
1021
|
+
expiresAt: z.ZodString;
|
|
1022
|
+
outcome: z.ZodEnum<{
|
|
1023
|
+
created: "created";
|
|
1024
|
+
reused: "reused";
|
|
1025
|
+
}>;
|
|
1026
|
+
}, z.core.$strip>;
|
|
1027
|
+
export type QuickShare = z.infer<typeof quickShareSchema>;
|
|
1028
|
+
export declare const quickShareDeleteSchema: z.ZodObject<{
|
|
1029
|
+
outcome: z.ZodEnum<{
|
|
1030
|
+
deleted: "deleted";
|
|
1031
|
+
unchanged: "unchanged";
|
|
1032
|
+
}>;
|
|
1033
|
+
}, z.core.$strip>;
|
|
1034
|
+
export type QuickShareDelete = z.infer<typeof quickShareDeleteSchema>;
|
|
1035
|
+
export declare const enhancementsSchema: z.ZodObject<{
|
|
1036
|
+
enabled: z.ZodBoolean;
|
|
1037
|
+
active: z.ZodArray<z.ZodString>;
|
|
1038
|
+
}, z.core.$strip>;
|
|
1039
|
+
export type Enhancements = z.infer<typeof enhancementsSchema>;
|
|
1040
|
+
export declare const enhancementsWriteSchema: z.ZodObject<{
|
|
1041
|
+
enabled: z.ZodBoolean;
|
|
1042
|
+
}, z.core.$strip>;
|
|
1043
|
+
export type EnhancementsWrite = z.infer<typeof enhancementsWriteSchema>;
|
|
901
1044
|
export declare const ruleSourceSchema: z.ZodEnum<{
|
|
902
1045
|
cloud: "cloud";
|
|
903
1046
|
file: "file";
|
package/dist/contracts/access.js
CHANGED
|
@@ -956,6 +956,39 @@ export const spacePolicySchema = z.object({
|
|
|
956
956
|
// for rollback to a prior lane revision.
|
|
957
957
|
version: z.number().int().nonnegative().default(0),
|
|
958
958
|
});
|
|
959
|
+
// GET/PUT /v1/spaces/:id/access-rules wire schemas — the ordered, always-latest
|
|
960
|
+
// access policy pair. Shared by the still-mounted /access route family and the
|
|
961
|
+
// detached /access-rules core adapter so activation has exactly one schema to
|
|
962
|
+
// retire, not two to reconcile.
|
|
963
|
+
export const spaceAccessRulesWriteSchema = z.object({
|
|
964
|
+
rules: z.array(runtimeRuleSchema).default([]),
|
|
965
|
+
expectedVersion: z.number().int().nonnegative().optional(),
|
|
966
|
+
});
|
|
967
|
+
// The lane read plus the plan-downgrade marker (access-plan X-23): plan-gated
|
|
968
|
+
// rules keep enforcing after a downgrade; this flag is the notice surface.
|
|
969
|
+
export const spaceAccessRulesReadSchema = spacePolicySchema.extend({
|
|
970
|
+
accessExceedsPlan: z.boolean().default(false),
|
|
971
|
+
});
|
|
972
|
+
// PUT/DELETE /v1/spaces/:id/quick-share wire schemas — the one active
|
|
973
|
+
// whole-space guest link (§5.2).
|
|
974
|
+
export const quickShareSchema = z.object({
|
|
975
|
+
kind: z.literal("quick_share"),
|
|
976
|
+
url: z.string().url(),
|
|
977
|
+
expiresAt: z.string().min(1),
|
|
978
|
+
outcome: z.enum(["created", "reused"]),
|
|
979
|
+
});
|
|
980
|
+
export const quickShareDeleteSchema = z.object({
|
|
981
|
+
outcome: z.enum(["deleted", "unchanged"]),
|
|
982
|
+
});
|
|
983
|
+
// GET/PUT /v1/spaces/:id/enhancements wire schemas — whole-space page
|
|
984
|
+
// enhancements (analytics, tag manager, custom scripts) on/off. `active` is
|
|
985
|
+
// reserved and currently always empty (see the composition delta on
|
|
986
|
+
// spaces/enhancements-service.ts).
|
|
987
|
+
export const enhancementsSchema = z.object({
|
|
988
|
+
enabled: z.boolean(),
|
|
989
|
+
active: z.array(z.string()),
|
|
990
|
+
});
|
|
991
|
+
export const enhancementsWriteSchema = z.object({ enabled: z.boolean() });
|
|
959
992
|
// Where an effective rule came from. `platform` = composed by the cloud from
|
|
960
993
|
// platform state (plan window, abuse/ban/billing) and PREPENDED above every
|
|
961
994
|
// user-authored rule so a platform decision always wins first-match-wins; the
|
|
@@ -511,6 +511,129 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
|
|
|
511
511
|
}, z.core.$strict>>;
|
|
512
512
|
}, z.core.$strict>>;
|
|
513
513
|
}, z.core.$strip>;
|
|
514
|
+
export declare const ApiKeyScopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
515
|
+
kind: z.ZodLiteral<"team">;
|
|
516
|
+
teamId: z.ZodString;
|
|
517
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
518
|
+
kind: z.ZodLiteral<"space">;
|
|
519
|
+
spaceId: z.ZodString;
|
|
520
|
+
}, z.core.$strict>], "kind">;
|
|
521
|
+
export type ApiKeyScope = z.infer<typeof ApiKeyScopeSchema>;
|
|
522
|
+
export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
|
|
523
|
+
name: z.ZodOptional<z.ZodString>;
|
|
524
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
525
|
+
kind: z.ZodLiteral<"team">;
|
|
526
|
+
teamId: z.ZodString;
|
|
527
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
528
|
+
kind: z.ZodLiteral<"space">;
|
|
529
|
+
spaceId: z.ZodString;
|
|
530
|
+
}, z.core.$strict>], "kind">;
|
|
531
|
+
permissions: z.ZodArray<z.ZodEnum<{
|
|
532
|
+
"*": "*";
|
|
533
|
+
"sites:read": "sites:read";
|
|
534
|
+
"sites:create": "sites:create";
|
|
535
|
+
"sites:write": "sites:write";
|
|
536
|
+
"sites:delete": "sites:delete";
|
|
537
|
+
"sites:policy.write": "sites:policy.write";
|
|
538
|
+
"spaces:read": "spaces:read";
|
|
539
|
+
"spaces:create": "spaces:create";
|
|
540
|
+
"spaces:write": "spaces:write";
|
|
541
|
+
"spaces:delete": "spaces:delete";
|
|
542
|
+
"spaces:publish": "spaces:publish";
|
|
543
|
+
"spaces:transfer": "spaces:transfer";
|
|
544
|
+
"spaces:export": "spaces:export";
|
|
545
|
+
"spaces:import": "spaces:import";
|
|
546
|
+
"versions:read": "versions:read";
|
|
547
|
+
"versions:promote": "versions:promote";
|
|
548
|
+
"versions:delete": "versions:delete";
|
|
549
|
+
"versions:download": "versions:download";
|
|
550
|
+
"domains:read": "domains:read";
|
|
551
|
+
"domains:create": "domains:create";
|
|
552
|
+
"domains:verify": "domains:verify";
|
|
553
|
+
"domains:assign": "domains:assign";
|
|
554
|
+
"domains:bind": "domains:bind";
|
|
555
|
+
"domains:delete": "domains:delete";
|
|
556
|
+
"domains:dns.write": "domains:dns.write";
|
|
557
|
+
"domains:dns.credentials.write": "domains:dns.credentials.write";
|
|
558
|
+
"domains:purchase": "domains:purchase";
|
|
559
|
+
"webhooks:read": "webhooks:read";
|
|
560
|
+
"webhooks:write": "webhooks:write";
|
|
561
|
+
"builds:read": "builds:read";
|
|
562
|
+
"builds:create": "builds:create";
|
|
563
|
+
"teams:read": "teams:read";
|
|
564
|
+
"teams:write": "teams:write";
|
|
565
|
+
"teams:members.write": "teams:members.write";
|
|
566
|
+
"billing:read": "billing:read";
|
|
567
|
+
"billing:write": "billing:write";
|
|
568
|
+
"tokens:read": "tokens:read";
|
|
569
|
+
"tokens:create": "tokens:create";
|
|
570
|
+
"tokens:revoke": "tokens:revoke";
|
|
571
|
+
"mcp:tools": "mcp:tools";
|
|
572
|
+
"runtime:manage": "runtime:manage";
|
|
573
|
+
}>>;
|
|
574
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
575
|
+
ipAllowlist: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
576
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
577
|
+
notBefore: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
578
|
+
}, z.core.$strict>;
|
|
579
|
+
export type ApiKeyScopedCreateRequest = z.infer<typeof ApiKeyScopedCreateRequestSchema>;
|
|
580
|
+
export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
|
|
581
|
+
scope: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
582
|
+
kind: z.ZodLiteral<"team">;
|
|
583
|
+
teamId: z.ZodString;
|
|
584
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
585
|
+
kind: z.ZodLiteral<"space">;
|
|
586
|
+
spaceId: z.ZodString;
|
|
587
|
+
}, z.core.$strict>], "kind">>;
|
|
588
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
589
|
+
"*": "*";
|
|
590
|
+
"sites:read": "sites:read";
|
|
591
|
+
"sites:create": "sites:create";
|
|
592
|
+
"sites:write": "sites:write";
|
|
593
|
+
"sites:delete": "sites:delete";
|
|
594
|
+
"sites:policy.write": "sites:policy.write";
|
|
595
|
+
"spaces:read": "spaces:read";
|
|
596
|
+
"spaces:create": "spaces:create";
|
|
597
|
+
"spaces:write": "spaces:write";
|
|
598
|
+
"spaces:delete": "spaces:delete";
|
|
599
|
+
"spaces:publish": "spaces:publish";
|
|
600
|
+
"spaces:transfer": "spaces:transfer";
|
|
601
|
+
"spaces:export": "spaces:export";
|
|
602
|
+
"spaces:import": "spaces:import";
|
|
603
|
+
"versions:read": "versions:read";
|
|
604
|
+
"versions:promote": "versions:promote";
|
|
605
|
+
"versions:delete": "versions:delete";
|
|
606
|
+
"versions:download": "versions:download";
|
|
607
|
+
"domains:read": "domains:read";
|
|
608
|
+
"domains:create": "domains:create";
|
|
609
|
+
"domains:verify": "domains:verify";
|
|
610
|
+
"domains:assign": "domains:assign";
|
|
611
|
+
"domains:bind": "domains:bind";
|
|
612
|
+
"domains:delete": "domains:delete";
|
|
613
|
+
"domains:dns.write": "domains:dns.write";
|
|
614
|
+
"domains:dns.credentials.write": "domains:dns.credentials.write";
|
|
615
|
+
"domains:purchase": "domains:purchase";
|
|
616
|
+
"webhooks:read": "webhooks:read";
|
|
617
|
+
"webhooks:write": "webhooks:write";
|
|
618
|
+
"builds:read": "builds:read";
|
|
619
|
+
"builds:create": "builds:create";
|
|
620
|
+
"teams:read": "teams:read";
|
|
621
|
+
"teams:write": "teams:write";
|
|
622
|
+
"teams:members.write": "teams:members.write";
|
|
623
|
+
"billing:read": "billing:read";
|
|
624
|
+
"billing:write": "billing:write";
|
|
625
|
+
"tokens:read": "tokens:read";
|
|
626
|
+
"tokens:create": "tokens:create";
|
|
627
|
+
"tokens:revoke": "tokens:revoke";
|
|
628
|
+
"mcp:tools": "mcp:tools";
|
|
629
|
+
"runtime:manage": "runtime:manage";
|
|
630
|
+
}>>>;
|
|
631
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
632
|
+
ipAllowlist: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
633
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
634
|
+
notBefore: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
635
|
+
}, z.core.$strict>;
|
|
636
|
+
export type ApiKeyScopedPatchRequest = z.infer<typeof ApiKeyScopedPatchRequestSchema>;
|
|
514
637
|
export declare const ApiKeyParamsSchema: z.ZodObject<{
|
|
515
638
|
apiKeyId: z.ZodString;
|
|
516
639
|
}, z.core.$strip>;
|