Compare commits

..

6 Commits

Author SHA1 Message Date
bbf425e255 fix: disable strict mode for enhancement JSON schema
strict: true requires all property names to be known upfront,
which is incompatible with the dynamic-key maps in slotFills.
Also replace type array with anyOf for nullable slot values.
2026-03-28 15:55:39 +00:00
21b7d299a6 fix: move tailscale setup to postStartCommand (#98)
Co-authored-by: Ona <no-reply@ona.com>
2026-03-24 22:59:03 +00:00
1596f2bedf fix: use http protocol for service ports (#97)
Co-authored-by: Ona <no-reply@ona.com>
2026-03-24 22:44:56 +00:00
b85109e2e2 feat: auto-login to tailscale in devcontainer (#96) 2026-03-24 22:20:34 +00:00
eb5149a500 fix: add --host to admin dashboard dev server (#95)
Bind Vite to all interfaces so port forwarding works in
Ona environments.

Co-authored-by: Ona <no-reply@ona.com>
2026-03-24 22:12:21 +00:00
02f519c29c dev: add service definitions for backend and dashboard (#94)
Co-authored-by: Ona <no-reply@ona.com>
2026-03-24 21:24:21 +00:00
6 changed files with 33 additions and 11 deletions

View File

@@ -11,7 +11,7 @@
"dockerfile": "Dockerfile"
},
"postCreateCommand": "bun install",
"postStartCommand": "./scripts/setup-git.sh && ./scripts/setup-nvim.sh",
"postStartCommand": "./scripts/setup-git.sh && ./scripts/setup-nvim.sh && ./scripts/setup-tailscale.sh",
// Features add additional features to your environment. See https://containers.dev/features
// Beware: features are not supported on all platforms and may have unintended side-effects.
"features": {

View File

@@ -25,7 +25,7 @@ services:
- manual
commands:
start: |
gitpod --context environment environment port open 3000 --name "Aelis Backend" --protocol https
gitpod --context environment environment port open 3000 --name "Aelis Backend" --protocol http
cd apps/aelis-backend && bun run dev
admin-dashboard:
@@ -35,5 +35,5 @@ services:
- manual
commands:
start: |
gitpod --context environment environment port open 5174 --name "Admin Dashboard" --protocol https
cd apps/admin-dashboard && bun run dev
gitpod --context environment environment port open 5174 --name "Admin Dashboard" --protocol http
cd apps/admin-dashboard && bun run dev --host

View File

@@ -46,7 +46,7 @@ export function createLlmClient(config: LlmClientConfig): LlmClient {
type: "json_schema" as const,
jsonSchema: {
name: "enhancement_result",
strict: true,
strict: false,
schema: enhancementResultJsonSchema,
},
},

View File

@@ -166,11 +166,12 @@ describe("schema sync", () => {
expect(parseEnhancementResult(JSON.stringify(bad))).toBeNull()
// JSON Schema only allows string or null for slot values
const slotValueTypes =
const slotValueSchema =
enhancementResultJsonSchema.properties.slotFills.additionalProperties
.additionalProperties.type
expect(slotValueTypes).toContain("string")
expect(slotValueTypes).toContain("null")
expect(slotValueTypes).not.toContain("number")
.additionalProperties
expect(slotValueSchema.anyOf).toEqual([
{ type: "string" },
{ type: "null" },
])
})
})

View File

@@ -31,7 +31,7 @@ export const enhancementResultJsonSchema = {
additionalProperties: {
type: "object",
additionalProperties: {
type: ["string", "null"],
anyOf: [{ type: "string" }, { type: "null" }],
},
},
},

21
scripts/setup-tailscale.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Tailscale setup script
# Authenticates with Tailscale if TS_AUTH_KEY is set and Tailscale is not already logged in
set -e
if [ -z "$TS_AUTH_KEY" ]; then
echo "TS_AUTH_KEY is not set, skipping Tailscale login."
exit 0
fi
STATUS=$(tailscale status 2>&1 || true)
if echo "$STATUS" | grep -qi "logged out\|stopped"; then
echo "Tailscale is not authenticated. Logging in..."
sudo tailscale up --accept-routes --auth-key="$TS_AUTH_KEY"
echo "Tailscale login complete."
else
echo "Tailscale is already authenticated, skipping."
fi