orbitx 0.3.4 → 0.3.6

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/docs/skills.md CHANGED
@@ -1,67 +1,67 @@
1
- # Skills
2
-
3
- A `Skill` bundles instructions with the tools those instructions depend on, so including the skill in an agent gets you both at once — the tools are auto-registered, and the instructions are folded into the system prompt under a `SKILLS:` block.
4
-
5
- ```ts
6
- class Skill {
7
- constructor(skill: {
8
- name: string;
9
- description: string;
10
- instructions: string;
11
- tools: MCPTool<any>[];
12
- });
13
- getSkill(): { name; description; instructions; tools };
14
- }
15
- ```
16
-
17
- `description` is shown alongside `instructions` in the system prompt (`${name} - ${description}` followed by the instructions text) — write it as a short "when to use this" pointer, since it's the model's first signal for whether the skill is relevant to the current task.
18
-
19
- ## Built-in skills
20
-
21
- | Skill | Purpose |
22
- |---|---|
23
- | `PlannerSkill` | Stands up a persistent, checkable todo list (via `TodoTools`) for any large/multi-step/vague job so progress survives long conversations and context resets. |
24
- | `BigTaskSkill` | Keeps the agent from stopping short on large or ambitious jobs — no declaring victory on a partial slice, no handing a big job back half-finished. |
25
- | `LongTaskEfficiencySkill` | Keeps a long job efficient — batching, avoiding redundant reads, checkpointing — without giving up on getting through the full scope. |
26
- | `NodeBackendSkill` | Building, running, and debugging Node.js backends: APIs, servers, CLIs, workers, schedulers, DB access layers. |
27
- | `ReactFrontendSkill` | Building, running, and debugging modern React (`.tsx`/`.jsx`) projects, typically Vite-scaffolded. |
28
- | `UiUxDesignSkill` | Visual and interaction design quality for user-facing UI — layout, hierarchy, feedback states, accessibility, responsiveness. |
29
- | `BackendSecuritySkill` | Hardening server-side code that touches auth, sessions, tokens, uploads, DB queries, payments, or any trust boundary. |
30
- | `CodeVerificationSkill` | Running the right type checker/build/lint/test suite before handing code back, and telling real bugs apart from sandbox artifacts. |
31
- | `WebEndToEndTestSkill` | Testing a live web app like a real user would (fill, click, navigate) and verifying via the rendered page, console, and network. |
32
- | `ResearchSkill` | Answering questions that need real, current information from the live web — cross-checks multiple sources. |
33
- | `PresentSkill` | Deciding how to hand back a job's output as files (individually or zipped) and cleaning build artifacts out first — pairs with `PresentTools`. |
34
- | `QuestionAnswerSkill` | Pausing to ask the user for missing information, a decision, or confirmation before continuing, instead of guessing — batches every pending question into one call and stops the turn immediately after asking (`QuestionAnswerTool` sets `stopIterationAfterUsingThisTool`). |
35
- | `QuestionAnswerSkill` | Wraps `QuestionAnswerTool` with instructions for when it's appropriate to stop and ask the human operator a clarifying question. |
36
-
37
- Each of these lives in its own file under `src/skills/` and is a plain factory function (`PlannerSkill()`), same convention as tools.
38
-
39
- ## Writing a custom skill
40
-
41
- ```ts
42
- import { Skill, FsReadFileTool, FsWriteFileTool } from "orbitx";
43
- import { SumTool } from "./sum-tool.js";
44
-
45
- export const MathHelperSkill = () => new Skill({
46
- name: "math-helper",
47
- description:
48
- "Use this skill whenever the user asks for arithmetic that should be computed exactly " +
49
- "rather than estimated from the model's own reasoning — sums, running totals, or " +
50
- "anything written to a file afterward.",
51
- instructions: `
52
- - Always use the math-sum tool for addition instead of computing it yourself.
53
- - If asked to save a result, write it to disk with fs-write-file and confirm the path back to the user.
54
- `,
55
- tools: [SumTool(), FsReadFileTool(), FsWriteFileTool()],
56
- });
57
- ```
58
-
59
- ```ts
60
- const agent = new SimpleAgent({
61
- aiProvider: provider,
62
- instruction: "You are a helpful assistant.",
63
- skills: [MathHelperSkill()],
64
- });
65
- ```
66
-
67
- If a tool is already passed in `tools` *and* included inside a skill, `SimpleAgent` de-duplicates it — you won't get it registered twice. If you're building on `BaseAgent` directly instead, remember `allowedTools` and each skill's `tools` are two separate lists that both need to reach the same `MCPServer` registration — `SimpleAgent`'s constructor is the reference implementation for getting this wiring right.
1
+ # Skills
2
+
3
+ A `Skill` bundles instructions with the tools those instructions depend on, so including the skill in an agent gets you both at once — the tools are auto-registered, and the instructions are folded into the system prompt under a `SKILLS:` block.
4
+
5
+ ```ts
6
+ class Skill {
7
+ constructor(skill: {
8
+ name: string;
9
+ description: string;
10
+ instructions: string;
11
+ tools: MCPTool<any>[];
12
+ });
13
+ getSkill(): { name; description; instructions; tools };
14
+ }
15
+ ```
16
+
17
+ `description` is shown alongside `instructions` in the system prompt (`${name} - ${description}` followed by the instructions text) — write it as a short "when to use this" pointer, since it's the model's first signal for whether the skill is relevant to the current task.
18
+
19
+ ## Built-in skills
20
+
21
+ | Skill | Purpose |
22
+ |---|---|
23
+ | `PlannerSkill` | Stands up a persistent, checkable todo list (via `TodoTools`) for any large/multi-step/vague job so progress survives long conversations and context resets. |
24
+ | `BigTaskSkill` | Keeps the agent from stopping short on large or ambitious jobs — no declaring victory on a partial slice, no handing a big job back half-finished. |
25
+ | `LongTaskEfficiencySkill` | Keeps a long job efficient — batching, avoiding redundant reads, checkpointing — without giving up on getting through the full scope. |
26
+ | `NodeBackendSkill` | Building, running, and debugging Node.js backends: APIs, servers, CLIs, workers, schedulers, DB access layers. |
27
+ | `ReactFrontendSkill` | Building, running, and debugging modern React (`.tsx`/`.jsx`) projects, typically Vite-scaffolded. |
28
+ | `UiUxDesignSkill` | Visual and interaction design quality for user-facing UI — layout, hierarchy, feedback states, accessibility, responsiveness. |
29
+ | `BackendSecuritySkill` | Hardening server-side code that touches auth, sessions, tokens, uploads, DB queries, payments, or any trust boundary. |
30
+ | `CodeVerificationSkill` | Running the right type checker/build/lint/test suite before handing code back, and telling real bugs apart from sandbox artifacts. |
31
+ | `WebEndToEndTestSkill` | Testing a live web app like a real user would (fill, click, navigate) and verifying via the rendered page, console, and network. |
32
+ | `ResearchSkill` | Answering questions that need real, current information from the live web — cross-checks multiple sources. |
33
+ | `PresentSkill` | Deciding how to hand back a job's output as files (individually or zipped) and cleaning build artifacts out first — pairs with `PresentTools`. |
34
+ | `QuestionAnswerSkill` | Pausing to ask the user for missing information, a decision, or confirmation before continuing, instead of guessing — batches every pending question into one call and stops the turn immediately after asking (`QuestionAnswerTool` sets `stopIterationAfterUsingThisTool`). |
35
+ | `QuestionAnswerSkill` | Wraps `QuestionAnswerTool` with instructions for when it's appropriate to stop and ask the human operator a clarifying question. |
36
+
37
+ Each of these lives in its own file under `src/skills/` and is a plain factory function (`PlannerSkill()`), same convention as tools.
38
+
39
+ ## Writing a custom skill
40
+
41
+ ```ts
42
+ import { Skill, FsReadFileTool, FsWriteFileTool } from "orbitx";
43
+ import { SumTool } from "./sum-tool.js";
44
+
45
+ export const MathHelperSkill = () => new Skill({
46
+ name: "math-helper",
47
+ description:
48
+ "Use this skill whenever the user asks for arithmetic that should be computed exactly " +
49
+ "rather than estimated from the model's own reasoning — sums, running totals, or " +
50
+ "anything written to a file afterward.",
51
+ instructions: `
52
+ - Always use the math-sum tool for addition instead of computing it yourself.
53
+ - If asked to save a result, write it to disk with fs-write-file and confirm the path back to the user.
54
+ `,
55
+ tools: [SumTool(), FsReadFileTool(), FsWriteFileTool()],
56
+ });
57
+ ```
58
+
59
+ ```ts
60
+ const agent = new SimpleAgent({
61
+ aiProvider: provider,
62
+ instruction: "You are a helpful assistant.",
63
+ skills: [MathHelperSkill()],
64
+ });
65
+ ```
66
+
67
+ If a tool is already passed in `tools` *and* included inside a skill, `SimpleAgent` de-duplicates it — you won't get it registered twice. If you're building on `BaseAgent` directly instead, remember `allowedTools` and each skill's `tools` are two separate lists that both need to reach the same `MCPServer` registration — `SimpleAgent`'s constructor is the reference implementation for getting this wiring right.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbitx",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "An AI SDK providing agents, swarms, planners, skills, MCP tools, workflows, and multi-provider AI integrations.",
5
5
  "repository": {
6
6
  "type": "git",