create-curb 0.0.0 → 1.16.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.
@@ -0,0 +1,36 @@
1
+ import { Instruction, Text, type SkillMeta } from "curb";
2
+ import { useAssistant } from "../agent.js";
3
+
4
+ export const meta: SkillMeta = {
5
+ title: "How this works",
6
+ description: "Use FIRST when the user asks how this demo, this agent, or the framework works.",
7
+ };
8
+
9
+ /**
10
+ * The demo explains itself. Loading this skill IS the demo of skill routing: the model
11
+ * read these instructions on demand because the user asked how things work.
12
+ */
13
+ export default function HowThisWorks() {
14
+ const tasks = useAssistant((s) => s.tasks);
15
+ const notes = useAssistant((s) => s.notes);
16
+
17
+ return (
18
+ <>
19
+ <Instruction>{`
20
+ Explain how this agent is built, in plain spoken language, a couple of sentences at a time.
21
+ Invite the user to watch the preview's context inspector change while they talk.
22
+ `}</Instruction>
23
+
24
+ <Text>{`
25
+ How this project works:
26
+ - The agent is a React tree that renders context and tools for a language model instead of HTML.
27
+ - src/agent/agent.tsx is where every conversation starts: Juno's prompt, her task list and its tools are in her context from the first turn.
28
+ - Each folder under src/agent/ is a skill: instructions and tools the model reads on demand. Reading this skill is how this answer came about.
29
+ - The user's profile is the markdown file context/about-you.md, read by a Text component.
30
+ - Tasks and remembered notes are shared React state: a tool call updates the store, the tree re-renders, and the model's context changes. Tasks on the list right now: ${tasks.length}. Remembered notes: ${notes.length}.
31
+ - Wrapping up the day is gated structurally: the wrap_up_day tool does not exist in the model's context until a task is done.
32
+ - Everything editable lives in src/agent/ and context/, and changes hot-reload into the running conversation.
33
+ `}</Text>
34
+ </>
35
+ );
36
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["ES2022", "DOM"],
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "jsx": "react-jsx",
8
+ "strict": true,
9
+ "noEmit": true,
10
+ "skipLibCheck": true
11
+ },
12
+ "include": ["src"]
13
+ }