@saluzi/saluzi-edu 0.2.32 → 0.2.34
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saluzi/saluzi-edu",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.34",
|
|
4
4
|
"description": "Saluzi CLI - interactive AI coding assistant in the terminal",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -58,6 +58,8 @@
|
|
|
58
58
|
"check:unused": "knip-bun",
|
|
59
59
|
"health": "bun run scripts/health-check.ts",
|
|
60
60
|
"docs:dev": "npx mintlify dev",
|
|
61
|
+
"build:guide": "vite build packages/guide-web && bun run scripts/build-guide.ts",
|
|
62
|
+
"dev:guide": "vite dev packages/guide-web",
|
|
61
63
|
"typecheck": "tsc --noEmit",
|
|
62
64
|
"precheck": "bun run typecheck && bun run check:fix && bun test --isolate",
|
|
63
65
|
"rcs": "bun run scripts/rcs.ts",
|
|
@@ -69,8 +69,15 @@ function toAcpAgentResponse(env: ReturnType<typeof storeGetEnvironment> & {}) {
|
|
|
69
69
|
* can't open them (ACP endpoints reject with 401 "unauthorized").
|
|
70
70
|
*/
|
|
71
71
|
function resolveWebUserToken(c: Context): string | null {
|
|
72
|
-
// Cookie (rcs_access) — primary Web UI auth path for WebSocket upgrades
|
|
73
|
-
|
|
72
|
+
// Cookie (rcs_access) — primary Web UI auth path for WebSocket upgrades.
|
|
73
|
+
// Wrapped because getCookie accesses c.req.raw.headers, which may not
|
|
74
|
+
// exist on mock contexts in unit tests.
|
|
75
|
+
let cookieToken: string | undefined
|
|
76
|
+
try {
|
|
77
|
+
cookieToken = getCookie(c, 'rcs_access')
|
|
78
|
+
} catch {
|
|
79
|
+
cookieToken = undefined
|
|
80
|
+
}
|
|
74
81
|
// Bearer — for REST calls from Web UI (Authorization header)
|
|
75
82
|
const bearerToken = extractBearerToken(c)
|
|
76
83
|
const token = cookieToken || bearerToken
|
|
@@ -115,8 +122,14 @@ export function hasAcpRelayAuth(c: Context): boolean {
|
|
|
115
122
|
}
|
|
116
123
|
// Cookie-based session token (rcs_access) — browser WebSocket upgrades
|
|
117
124
|
// automatically send cookies, so this works without client-side token
|
|
118
|
-
// injection.
|
|
119
|
-
|
|
125
|
+
// injection. Wrapped because getCookie accesses c.req.raw.headers,
|
|
126
|
+
// which may not exist on mock contexts in unit tests.
|
|
127
|
+
let cookieToken: string | undefined
|
|
128
|
+
try {
|
|
129
|
+
cookieToken = getCookie(c, 'rcs_access')
|
|
130
|
+
} catch {
|
|
131
|
+
cookieToken = undefined
|
|
132
|
+
}
|
|
120
133
|
if (cookieToken) {
|
|
121
134
|
if (resolveToken(cookieToken)) return true
|
|
122
135
|
try {
|