create-theokit 1.5.1 → 1.7.0

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": "create-theokit",
3
- "version": "1.5.1",
3
+ "version": "1.7.0",
4
4
  "type": "module",
5
5
  "description": "Scaffold a new TheoKit project",
6
6
  "license": "Apache-2.0",
@@ -1,5 +1,4 @@
1
1
  import { agent } from '@theokit/agents'
2
- import { defineSkillReadTool } from '@theokit/sdk'
3
2
  import { z } from 'zod'
4
3
 
5
4
  import { BASE_INSTRUCTIONS } from './prompts/instructions.js'
@@ -25,7 +24,9 @@ export default agent()
25
24
  .system(BASE_INSTRUCTIONS)
26
25
  .tool(weatherTool)
27
26
  .tool(currentTimeTool)
28
- // `defineSkillReadTool` exposes the skills to the model as an on-demand `skill_read` tool the model
29
- // sees each skill's name + description and loads the full body only when it needs it.
30
- .tool(defineSkillReadTool([dailyBriefingSkill]))
27
+ // `.skills([...])` wires the code-defined skill in ONE call: the SDK lists its name + description in a
28
+ // `<skills>` block every turn (cheap, so the model KNOWS it exists) AND auto-provisions a `skill_read`
29
+ // tool the model calls to load the full body on demand (so a long procedure only enters the prompt
30
+ // when needed). Pass a filesystem skill NAME (a string) here too; mix strings + createSkill freely.
31
+ .skills([dailyBriefingSkill])
31
32
  .build()
@@ -16,6 +16,6 @@ export const BASE_INSTRUCTIONS = `You are a helpful assistant living inside a Th
16
16
  what failed and what you need (e.g. a valid city or IANA timezone).
17
17
 
18
18
  ## Skills
19
- - You have a \`skill_read\` tool that lists documented procedures (skills). When a request matches a
20
- skill's description e.g. the user asks for a "briefing" / "morning update" / "what's my day looking
21
- like" (the **daily-briefing** skill) call \`skill_read\` to load its steps, then follow them.`
19
+ - The \`<skills>\` block above lists documented procedures (skills) by name + description. When a request
20
+ matches a skill's description, call the \`skill_read\` tool with that skill's name to load its full
21
+ steps, then follow them. Don't guess a procedure a skill already documents.`
@@ -4,8 +4,8 @@ import { createSkill } from '@theokit/sdk'
4
4
  * A real, code-defined skill (`createSkill`) — a documented procedure the MODEL can pull in on demand.
5
5
  *
6
6
  * Unlike a loose Markdown note, this is wired into the agent: `agents/chat.ts` passes it to
7
- * `defineSkillReadTool([...])`, which gives the model a `skill_read` tool. The model sees the skill's
8
- * name + description in every turn (cheap) and calls `skill_read('daily-briefing')` to load the full
7
+ * `.skills([dailyBriefingSkill])`. That one call lists the skill's name + description in a `<skills>`
8
+ * block every turn (cheap) AND provisions a `skill_read` tool the model calls to load the full
9
9
  * `instructions` only when it actually needs them — so long procedures don't bloat every prompt.
10
10
  *
11
11
  * Lives in `agents/skills/` — a semantic folder the route scanner skips, so it never becomes an endpoint.
@@ -15,8 +15,8 @@
15
15
  "typecheck": "tsc --noEmit"
16
16
  },
17
17
  "dependencies": {
18
- "theokit": "^0.31.0",
19
- "@theokit/agents": "^0.35.2",
18
+ "theokit": "^0.36.0",
19
+ "@theokit/agents": "^0.38.0",
20
20
  "@theokit/sdk": "^2.25.0",
21
21
  "@theokit/ui": "^1.0.0",
22
22
  "@usetheo/ui": "^0.14.0",