Skip to content

Feat/plan tools#2

Merged
angelocavallo merged 4 commits into
mainfrom
feat/plan-tools
Jun 24, 2026
Merged

Feat/plan tools#2
angelocavallo merged 4 commits into
mainfrom
feat/plan-tools

Conversation

@angelocavallo

Copy link
Copy Markdown
Contributor

No description provided.

Angelo and others added 4 commits June 23, 2026 01:55
Add a `forgewisp.plans` localStorage-backed scratchpad with seven read-tier
tools (listPlans, getPlan, createPlan, addPlanItem, updatePlanItem,
removePlanItem, deletePlan) so the agent can lay out and track its own job
without onConfirmRequired prompts. The store is an internal helper
(`plan-store.ts`, not re-exported as a value, mirroring `eval-math.ts`);
reads never throw on corrupt state, mutations surface as function_errored.

Extend `JSONSchemaProperty` with minItems/maxItems/additionalProperties so
the plan tool schemas can bound arrays and close objects.

Ship `apps/planning-demo`, a vanilla-TS + Vite showcase exercising the
planning tools with a plan board UI, DOMPurify-sanitized sinks, and
tests (a11y, plan-board, sanitize, submit).

Co-Authored-By: Claude <noreply@anthropic.com>
Introduce a named, ordered group of tools (`ToolSet`) that registers in a
single call. `tools` is typed `readonly FunctionDefinition<never>[]` so a
heterogeneous tuple of `FunctionDefinition<SpecificArgs>` tools is accepted
without an `as unknown as` cast — the handler is contravariant in `TArgs`
and `never` is the bottom type. Registration delegates to `registerFunction`
per tool, preserving the write/destructive tier invariant (throws at
registration time if `onConfirmRequired` is unset).

- core: `ToolSet` type, `defineToolSet` helper, `registerToolSet` on the agent
- bundled-tools: export `PLANNING_TOOLS` (the 7 plan-management tools as a
  ready-to-register set), keeping a types-only relationship with core
- planning-demo: register sets instead of looping a cast tuple; compose the
  sidebar list from `PLANNING_TOOLS.tools` + a `planning-extras` set

Co-Authored-By: Claude <noreply@anthropic.com>
Lockstep minor bump for the planning tools and ToolSet/defineToolSet
feature additions.

Co-Authored-By: Claude <noreply@anthropic.com>
Fix CI format:check failure.

Co-Authored-By: Claude <noreply@anthropic.com>
@angelocavallo angelocavallo merged commit 8ee2a36 into main Jun 24, 2026
1 check passed
@angelocavallo angelocavallo deleted the feat/plan-tools branch June 25, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant