@slatesvideo/shared 0.7.10 → 0.7.12
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/auth.d.ts +11 -0
- package/dist/auth.js +31 -0
- package/dist/clients/desktop.d.ts +1 -0
- package/dist/clients/desktop.js +16 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/manual/content.d.ts +1 -1
- package/dist/manual/content.js +1 -1
- package/dist/operations/index.d.ts +352 -59
- package/dist/operations/index.js +438 -36
- package/dist/operations/surface.js +6 -0
- package/dist/skills/content.js +9 -4
- package/dist/skills/hyperframes-content.js +11 -11
- package/dist/skills/hyperframes.d.ts +3 -1
- package/dist/skills/hyperframes.js +127 -4
- package/package.json +1 -1
- package/skills/hyperframes/NOTICE +24 -0
- package/skills/hyperframes/SLATES-MAPPING.md +5 -4
- package/skills/hyperframes/faceless-explainer/references/motion-language.md +13 -17
- package/skills/hyperframes/faceless-explainer/references/visual-design.md +10 -10
- package/skills/hyperframes/hyperframes/references/frame-worker-core.md +1 -1
- package/skills/hyperframes/hyperframes-animation/adapters/gsap-easing-and-stagger.md +20 -24
- package/skills/hyperframes/hyperframes-animation/rules/sine-wave-loop.md +1 -1
- package/skills/hyperframes/hyperframes-animation/rules/spring-pop-entrance.md +18 -25
- package/skills/hyperframes/pr-to-video/references/motion-language.md +13 -17
- package/skills/hyperframes/pr-to-video/references/visual-design.md +8 -8
- package/skills/hyperframes/product-launch-video/references/motion-language.md +13 -17
- package/skills/hyperframes/product-launch-video/references/visual-design.md +10 -10
- package/skills/slates-start-here.md +20 -14
package/dist/auth.d.ts
CHANGED
|
@@ -42,4 +42,15 @@ export declare function requireDesktop(): {
|
|
|
42
42
|
port: number;
|
|
43
43
|
token: string;
|
|
44
44
|
};
|
|
45
|
+
export declare const MCP_LAUNCHER_FILE: string;
|
|
46
|
+
export interface McpLauncher {
|
|
47
|
+
/** The bundled server's package version. */
|
|
48
|
+
version: string;
|
|
49
|
+
command: string;
|
|
50
|
+
args: string[];
|
|
51
|
+
env: Record<string, string>;
|
|
52
|
+
}
|
|
53
|
+
/** The desktop's bundled server, or null when there is none on this computer (no app, an old app,
|
|
54
|
+
* an uninstalled one whose file was left behind, or a file this version cannot read). */
|
|
55
|
+
export declare function readMcpLauncher(file?: string): McpLauncher | null;
|
|
45
56
|
//# sourceMappingURL=auth.d.ts.map
|
package/dist/auth.js
CHANGED
|
@@ -86,4 +86,35 @@ export function requireDesktop() {
|
|
|
86
86
|
}
|
|
87
87
|
return { port: c.desktop.port, token: c.desktop.token };
|
|
88
88
|
}
|
|
89
|
+
// ~/.slates/mcp-server.json — how to start the Slates server the desktop app carries inside itself
|
|
90
|
+
// (`slate/src/main/agent/mcpLauncher.ts` writes it on every start of a packaged app; nothing here
|
|
91
|
+
// writes it). Its own file, not a field of the connection file, because a CLI older than this one
|
|
92
|
+
// rewrites the connection file with only the fields it knows and would drop it.
|
|
93
|
+
//
|
|
94
|
+
// Why it exists (2026-10-31): a customer's Claude Code ran an old copy of this package that lacked
|
|
95
|
+
// the transition tools while his app had them. A server started from this file is the app's own
|
|
96
|
+
// copy, so it is always the version that matches the app, and updates when the app does.
|
|
97
|
+
export const MCP_LAUNCHER_FILE = join(AGENT_DIR, 'mcp-server.json');
|
|
98
|
+
/** The desktop's bundled server, or null when there is none on this computer (no app, an old app,
|
|
99
|
+
* an uninstalled one whose file was left behind, or a file this version cannot read). */
|
|
100
|
+
export function readMcpLauncher(file = MCP_LAUNCHER_FILE) {
|
|
101
|
+
try {
|
|
102
|
+
const raw = JSON.parse(readFileSync(file, 'utf-8'));
|
|
103
|
+
const env = raw.env ?? {};
|
|
104
|
+
if (typeof raw.version !== 'string' ||
|
|
105
|
+
typeof raw.command !== 'string' ||
|
|
106
|
+
!Array.isArray(raw.args) ||
|
|
107
|
+
!raw.args.every((a) => typeof a === 'string') ||
|
|
108
|
+
typeof env !== 'object' ||
|
|
109
|
+
!Object.values(env).every((v) => typeof v === 'string'))
|
|
110
|
+
return null;
|
|
111
|
+
// The app was moved or uninstalled since it wrote the file: nothing to start.
|
|
112
|
+
if (!existsSync(raw.command) || (raw.args[0] && !existsSync(raw.args[0])))
|
|
113
|
+
return null;
|
|
114
|
+
return { version: raw.version, command: raw.command, args: raw.args, env };
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
89
120
|
//# sourceMappingURL=auth.js.map
|
package/dist/clients/desktop.js
CHANGED
|
@@ -3,6 +3,20 @@ import { requireDesktop } from '../auth.js';
|
|
|
3
3
|
// One agent session per process (an MCP server's connection, or one CLI run): the desktop counts
|
|
4
4
|
// what it spends against the person's per-session spend limit (`slates_get_spend_limits`).
|
|
5
5
|
const AGENT_SESSION = randomUUID();
|
|
6
|
+
// Which program is calling, as `name/version` (`mcp-server/0.6.7`, `mcp-server/0.6.7 bundled`), sent as
|
|
7
|
+
// `X-Slates-Client` on every call so the desktop can tell a client running an older Slates server than
|
|
8
|
+
// its own and say so in Settings → AI tools. Set once at startup by the entry point; a caller that
|
|
9
|
+
// never sets it (the in-app Studio Agent) sends no header, and the desktop reads an outside call
|
|
10
|
+
// without one as a server from before 0.6.7.
|
|
11
|
+
let clientIdentity = null;
|
|
12
|
+
export function setDesktopClientIdentity(identity) {
|
|
13
|
+
clientIdentity = identity;
|
|
14
|
+
}
|
|
15
|
+
function sessionHeaders() {
|
|
16
|
+
return clientIdentity
|
|
17
|
+
? { 'X-Slates-Session': AGENT_SESSION, 'X-Slates-Client': clientIdentity }
|
|
18
|
+
: { 'X-Slates-Session': AGENT_SESSION };
|
|
19
|
+
}
|
|
6
20
|
// Friendly message for the by-far-most-common failure: the desktop app
|
|
7
21
|
// isn't running (or the connection file holds a stale port). A raw
|
|
8
22
|
// "fetch failed" tells the agent nothing actionable.
|
|
@@ -98,7 +112,7 @@ export class SlatesDesktopClient {
|
|
|
98
112
|
}
|
|
99
113
|
}
|
|
100
114
|
const res = await this.fetchOrFriendly(url.toString(), {
|
|
101
|
-
headers: { Authorization: `Bearer ${this.token}`,
|
|
115
|
+
headers: { Authorization: `Bearer ${this.token}`, ...sessionHeaders() },
|
|
102
116
|
});
|
|
103
117
|
return this.handle(path, res);
|
|
104
118
|
}
|
|
@@ -108,7 +122,7 @@ export class SlatesDesktopClient {
|
|
|
108
122
|
headers: {
|
|
109
123
|
'Content-Type': 'application/json',
|
|
110
124
|
Authorization: `Bearer ${this.token}`,
|
|
111
|
-
|
|
125
|
+
...sessionHeaders(),
|
|
112
126
|
},
|
|
113
127
|
body: JSON.stringify(body),
|
|
114
128
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './auth.js';
|
|
2
2
|
export { SlatesCloudClient, type SlatesUserInfo, type CreditsBalance, type ModelRegistryResponse } from './clients/cloud.js';
|
|
3
|
-
export { SlatesDesktopClient, type DesktopHealth } from './clients/desktop.js';
|
|
3
|
+
export { SlatesDesktopClient, setDesktopClientIdentity, type DesktopHealth } from './clients/desktop.js';
|
|
4
4
|
export { BRAIN_SHAPE, SKILLS } from './skills/content.js';
|
|
5
5
|
export { BRAIN_CACHE, brainFiles, clearServedBrain, refreshServedBrain, servedBrain, useBrainSource, type LockedGuide, type ServedBrain } from './skills/served.js';
|
|
6
6
|
export { myBrainProblems, type BrainShape, type MyBrainProblem } from './skills/brain-check.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './auth.js';
|
|
2
2
|
export { SlatesCloudClient } from './clients/cloud.js';
|
|
3
|
-
export { SlatesDesktopClient } from './clients/desktop.js';
|
|
3
|
+
export { SlatesDesktopClient, setDesktopClientIdentity } from './clients/desktop.js';
|
|
4
4
|
export { BRAIN_SHAPE, SKILLS } from './skills/content.js';
|
|
5
5
|
export { BRAIN_CACHE, brainFiles, clearServedBrain, refreshServedBrain, servedBrain, useBrainSource } from './skills/served.js';
|
|
6
6
|
export { myBrainProblems } from './skills/brain-check.js';
|