create-theokit 1.6.0 → 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,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,10 +24,9 @@ export default agent()
|
|
|
25
24
|
.system(BASE_INSTRUCTIONS)
|
|
26
25
|
.tool(weatherTool)
|
|
27
26
|
.tool(currentTimeTool)
|
|
28
|
-
// `.skills([...])`
|
|
29
|
-
// `<skills>` block
|
|
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.
|
|
30
31
|
.skills([dailyBriefingSkill])
|
|
31
|
-
// `defineSkillReadTool` then gives the model a `skill_read` tool to load the full body on demand —
|
|
32
|
-
// so a long procedure only enters the prompt when the model actually needs it.
|
|
33
|
-
.tool(defineSkillReadTool([dailyBriefingSkill]))
|
|
34
32
|
.build()
|
|
@@ -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
|
-
*
|
|
8
|
-
*
|
|
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.
|
|
19
|
-
"@theokit/agents": "^0.
|
|
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",
|