@slatesvideo/shared 0.7.8 → 0.7.10
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/clients/desktop.js +6 -1
- package/dist/manual/content.d.ts +1 -1
- package/dist/manual/content.js +1 -1
- package/dist/operations/index.d.ts +199 -74
- package/dist/operations/index.js +221 -17
- package/dist/operations/surface.js +32 -1
- package/dist/prompts/generation-policy.d.ts +1 -1
- package/dist/skills/brain-check.js +5 -3
- package/dist/skills/served.d.ts +6 -2
- package/dist/skills/served.js +36 -6
- package/package.json +1 -1
package/dist/clients/desktop.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
1
2
|
import { requireDesktop } from '../auth.js';
|
|
3
|
+
// One agent session per process (an MCP server's connection, or one CLI run): the desktop counts
|
|
4
|
+
// what it spends against the person's per-session spend limit (`slates_get_spend_limits`).
|
|
5
|
+
const AGENT_SESSION = randomUUID();
|
|
2
6
|
// Friendly message for the by-far-most-common failure: the desktop app
|
|
3
7
|
// isn't running (or the connection file holds a stale port). A raw
|
|
4
8
|
// "fetch failed" tells the agent nothing actionable.
|
|
@@ -94,7 +98,7 @@ export class SlatesDesktopClient {
|
|
|
94
98
|
}
|
|
95
99
|
}
|
|
96
100
|
const res = await this.fetchOrFriendly(url.toString(), {
|
|
97
|
-
headers: { Authorization: `Bearer ${this.token}
|
|
101
|
+
headers: { Authorization: `Bearer ${this.token}`, 'X-Slates-Session': AGENT_SESSION },
|
|
98
102
|
});
|
|
99
103
|
return this.handle(path, res);
|
|
100
104
|
}
|
|
@@ -104,6 +108,7 @@ export class SlatesDesktopClient {
|
|
|
104
108
|
headers: {
|
|
105
109
|
'Content-Type': 'application/json',
|
|
106
110
|
Authorization: `Bearer ${this.token}`,
|
|
111
|
+
'X-Slates-Session': AGENT_SESSION,
|
|
107
112
|
},
|
|
108
113
|
body: JSON.stringify(body),
|
|
109
114
|
});
|