create-theokit 1.23.8 → 1.23.11
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/cli.js +55 -44
- package/dist/cli.js.map +1 -1
- package/package.json +2 -1
- package/templates/default/.env.example +1 -1
- package/templates/default/CLAUDE.md +9 -8
- package/templates/default/_gitignore +5 -2
- package/templates/default/_prettierignore +13 -0
- package/templates/default/agents/chat.ts +29 -1
- package/templates/default/app/components/ChatPanel.tsx +3 -2
- package/templates/default/app/hooks/use-transcript.ts +9 -3
- package/templates/default/app/layout.tsx +8 -1
- package/templates/default/app/lib/constants.ts +2 -1
- package/templates/default/app/lib/renderable.ts +78 -0
- package/templates/default/app/page.test.tsx +9 -3
- package/templates/default/docs/ARCHITECTURE.md +35 -29
- package/templates/default/docs/CUSTOMIZATION.md +10 -10
- package/templates/default/docs/ENVIRONMENT.md +4 -4
- package/templates/default/dot-claude/rules/theokit-conventions.md +2 -0
- package/templates/default/dot-claude/skills/theokit-agents/SKILL.md +12 -12
- package/templates/default/dot-claude/skills/theokit-config/SKILL.md +6 -6
- package/templates/default/dot-claude/skills/theokit-database/SKILL.md +15 -10
- package/templates/default/dot-claude/skills/theokit-frontend/SKILL.md +11 -11
- package/templates/default/dot-claude/skills/theokit-gateways/SKILL.md +71 -0
- package/templates/default/dot-claude/skills/theokit-routes/SKILL.md +28 -10
- package/templates/default/dot-claude/skills/theokit-ui/SKILL.md +26 -24
- package/templates/default/eslint.config.mjs +8 -1
- package/templates/default/package.json.tmpl +2 -8
- package/templates/default/pnpm-workspace.yaml +21 -0
- package/templates/default/server/routes/health.ts +3 -0
- package/templates/surfaces/desktop/sidecar/sidecar.ts +6 -2
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"dev": "theokit dev",
|
|
8
8
|
"build": "theokit build",
|
|
9
9
|
"start": "theokit start",
|
|
10
|
+
"preview": "theokit preview",
|
|
10
11
|
"test": "vitest run",
|
|
11
12
|
"lint": "eslint .",
|
|
12
13
|
"lint:fix": "eslint . --fix",
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
"typecheck": "tsc --noEmit"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"theokit": "^0.
|
|
19
|
+
"theokit": "^0.52.0",
|
|
19
20
|
"@theokit/agents": "^10.1.0",
|
|
20
21
|
"@theokit/sdk": "^4.52.1",
|
|
21
22
|
"@theokit/ui": "^1.1.0",
|
|
@@ -40,12 +41,5 @@
|
|
|
40
41
|
"typescript": "^5.5.0",
|
|
41
42
|
"typescript-eslint": "^8.0.0",
|
|
42
43
|
"vitest": "^3.0.0"
|
|
43
|
-
},
|
|
44
|
-
"pnpm": {
|
|
45
|
-
"onlyBuiltDependencies": [
|
|
46
|
-
"esbuild",
|
|
47
|
-
"better-sqlite3",
|
|
48
|
-
"workerd"
|
|
49
|
-
]
|
|
50
44
|
}
|
|
51
45
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Build scripts this project allows its dependencies to run.
|
|
2
|
+
#
|
|
3
|
+
# pnpm 10 refuses to run a dependency's install script unless it is approved here,
|
|
4
|
+
# and it stopped reading the `pnpm` field in package.json — where this list used to
|
|
5
|
+
# live, silently doing nothing while every install printed a warning about it
|
|
6
|
+
# (usetheokit/theokit#397). Without these entries, `pnpm install` ends in
|
|
7
|
+
# ERR_PNPM_IGNORED_BUILDS with esbuild and node-pty unbuilt.
|
|
8
|
+
#
|
|
9
|
+
# Each entry is a decision, not boilerplate: an install script runs arbitrary code
|
|
10
|
+
# on your machine. These are the ones this scaffold needs.
|
|
11
|
+
allowBuilds:
|
|
12
|
+
# The bundler behind `theokit dev` and `theokit build`; ships a platform binary.
|
|
13
|
+
esbuild: true
|
|
14
|
+
# A native terminal, reached through @theokit/agents. Compiles or downloads a
|
|
15
|
+
# prebuild on install. A web-only app never opens one — see usetheokit/theokit#25
|
|
16
|
+
# if you would rather not pay for it.
|
|
17
|
+
node-pty: true
|
|
18
|
+
# Present only if you add them; harmless entries otherwise, and here so the
|
|
19
|
+
# decision is already made the day you do.
|
|
20
|
+
better-sqlite3: true
|
|
21
|
+
workerd: true
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { route } from 'theokit/server/define'
|
|
2
2
|
|
|
3
3
|
export const GET = route()
|
|
4
|
+
// A liveness probe answers the same thing to everyone, so it is genuinely open.
|
|
5
|
+
// Every route declares this; `'public'` is the decision, not the absence of one.
|
|
6
|
+
.policy('public')
|
|
4
7
|
.handler(() => ({
|
|
5
8
|
status: 'ok',
|
|
6
9
|
timestamp: Date.now(),
|
|
@@ -41,10 +41,14 @@ const write = (line: string): void => {
|
|
|
41
41
|
process.stdout.write(line)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
await runTurnToJsonl(chatAgent, apiKey, message, write, ({ approvalId
|
|
44
|
+
await runTurnToJsonl(chatAgent, apiKey, message, write, ({ approvalId }) => {
|
|
45
|
+
// Register the resolver and write NOTHING. The approval frame is already on the wire:
|
|
46
|
+
// `runTurnToJsonl` writes every chunk the in-process turn produces, and a gated tool produces a
|
|
47
|
+
// `tool-approval-request` carrying the `toolCallId` readers key a tool part by. A second,
|
|
48
|
+
// hand-written line here was a duplicate the framework's own wire schema refuses
|
|
49
|
+
// (usetheokit/theokit#403).
|
|
45
50
|
return new Promise<boolean>((resolve) => {
|
|
46
51
|
pending.set(approvalId, resolve)
|
|
47
|
-
write(`${JSON.stringify({ type: 'tool-approval-request', approvalId, toolName })}\n`)
|
|
48
52
|
})
|
|
49
53
|
})
|
|
50
54
|
|