mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(ai,agent,coding-agent): validate tool arguments with pi-schema, drop TypeBox
pi-schema: opt-in coercion, compile(schema, { coerce: true }) with coerce() and
parse(), the superset of TypeBox's Value.Convert rules and pi-ai's old coercion;
unresolvedRefs option; url and json-pointer-uri-fragment formats.
pi-ai: Tool takes any JSON Schema; validation through pi-schema; Type, Static
and TSchema are no longer exported (breaking). pi-agent-core and pi-durable:
tools on pi-schema, no TypeBox dependency. Coding agent: extensions keep Type,
Static, TSchema and StringEnum through an extension view of pi-ai; built-in
tools stay on TypeBox.
This commit is contained in:
parent
2c8d1feb14
commit
6536f80129
139 changed files with 5115 additions and 1305 deletions
180
packages/coding-agent/examples/tsconfig.json
Normal file
180
packages/coding-agent/examples/tsconfig.json
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
// Type-checks the example extensions against the modules extensions see at run time (core/extensions/virtual-modules.ts):
|
||||
// "@earendil-works/pi-ai" is the extension view, which adds TypeBox's Type, Static and TSchema to the compat entry (the
|
||||
// view imports "@earendil-works/pi-ai/compat", so that path stays the package's own).
|
||||
// The other paths repeat the root tsconfig.json; keep them in sync.
|
||||
// Also the test that imports the subagent example: it type-checks only against the extension view.
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"@earendil-works/chord": [
|
||||
"../../../packages/chord/src/index.ts"
|
||||
],
|
||||
"@earendil-works/chord/context": [
|
||||
"../../../packages/chord/src/context/index.ts"
|
||||
],
|
||||
"@earendil-works/chord/delta": [
|
||||
"../../../packages/chord/src/delta/index.ts"
|
||||
],
|
||||
"@earendil-works/chord/next": [
|
||||
"../../../packages/chord/src/next/index.ts"
|
||||
],
|
||||
"@earendil-works/chord/next/plugins": [
|
||||
"../../../packages/chord/src/next-node/plugins/index.ts"
|
||||
],
|
||||
"@earendil-works/chord/next/plugins/runtime": [
|
||||
"../../../packages/chord/src/next-node/plugins/runtime.ts"
|
||||
],
|
||||
"@test/contracts/*": [
|
||||
"../../../packages/chord/test/next-node/fixtures/plugins/contracts/*.ts"
|
||||
],
|
||||
"@example/contracts/*": [
|
||||
"../../../packages/chord/test/next/examples/35-plugins/plugins/contracts/*.ts"
|
||||
],
|
||||
"@example/weather/*": [
|
||||
"../../../packages/chord/test/next/examples/36-plugin-failures/plugins/weather/*.ts"
|
||||
],
|
||||
"@example/prices/*": [
|
||||
"../../../packages/chord/test/next/examples/36-plugin-failures/plugins/prices/*.ts"
|
||||
],
|
||||
"@example/shapes/*": [
|
||||
"../../../packages/chord/test/next/examples/37-plugin-imports/plugins/shapes/*.ts"
|
||||
],
|
||||
"@example/shared/*": [
|
||||
"../../../packages/chord/test/next/examples/38-watch-and-rollout/plugins/contracts/*.ts"
|
||||
],
|
||||
"@earendil-works/chord/next/http": [
|
||||
"../../../packages/chord/src/next-node/http/index.ts"
|
||||
],
|
||||
"@earendil-works/chord/next/workers": [
|
||||
"../../../packages/chord/src/next-node/workers/index.ts"
|
||||
],
|
||||
"@earendil-works/chord/node": [
|
||||
"../../../packages/chord/src/node.ts"
|
||||
],
|
||||
"@earendil-works/chord/output": [
|
||||
"../../../packages/chord/src/output.ts"
|
||||
],
|
||||
"@earendil-works/chord/telemetry-sqlite": [
|
||||
"../../../packages/chord/src/telemetry-sqlite/index.ts"
|
||||
],
|
||||
"@earendil-works/chord/sqlite": [
|
||||
"../../../packages/chord/src/sqlite/index.ts"
|
||||
],
|
||||
"@earendil-works/chord/sqlite/node": [
|
||||
"../../../packages/chord/src/sqlite/node.ts"
|
||||
],
|
||||
"@earendil-works/chord/sqlite/cloudflare": [
|
||||
"../../../packages/chord/src/sqlite/cloudflare.ts"
|
||||
],
|
||||
"@earendil-works/pi-telemetry": [
|
||||
"../../../packages/telemetry/src/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-telemetry/testing": [
|
||||
"../../../packages/telemetry/src/testing/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-telemetry/render": [
|
||||
"../../../packages/telemetry/src/render.ts"
|
||||
],
|
||||
"@earendil-works/pi-codemode": [
|
||||
"../../../packages/codemode/src/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-codemode/cloudflare": [
|
||||
"../../../packages/codemode/src/cloudflare.ts"
|
||||
],
|
||||
"@earendil-works/pi-codemode/declarations": [
|
||||
"../../../packages/codemode/src/declarations.ts"
|
||||
],
|
||||
"@earendil-works/pi-codemode/portable": [
|
||||
"../../../packages/codemode/src/portable.ts"
|
||||
],
|
||||
"@earendil-works/pi-codemode/source": [
|
||||
"../../../packages/codemode/src/source.ts"
|
||||
],
|
||||
"@earendil-works/pi-codemode/worker": [
|
||||
"../../../packages/codemode/src/runtime/worker.ts"
|
||||
],
|
||||
"@earendil-works/pi-schema": [
|
||||
"../../../packages/schema/src/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-schema/formats": [
|
||||
"../../../packages/schema/src/formats/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-mcp": [
|
||||
"../../../packages/mcp/src/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-mcp/oauth": [
|
||||
"../../../packages/mcp/src/oauth/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-mcp/testing": [
|
||||
"../../../packages/mcp/src/testing/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-ai": [
|
||||
"../../../packages/coding-agent/src/core/extensions/pi-ai-extension-view.ts"
|
||||
],
|
||||
"@earendil-works/pi-ai/oauth": [
|
||||
"../../../packages/ai/src/oauth.ts"
|
||||
],
|
||||
"@earendil-works/pi-ai/*": [
|
||||
"../../../packages/ai/src/*.ts",
|
||||
"../../../packages/ai/src/providers/*.ts"
|
||||
],
|
||||
"@earendil-works/pi-ai/dist/*": [
|
||||
"../../../packages/ai/src/*"
|
||||
],
|
||||
"@earendil-works/pi-durable": [
|
||||
"../../../packages/durable/src/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-durable/testing": [
|
||||
"../../../packages/durable/src/testing/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-durable/*": [
|
||||
"../../../packages/durable/src/*.ts",
|
||||
"../../../packages/durable/src/*/index.ts",
|
||||
"../../../packages/durable/src/*"
|
||||
],
|
||||
"@earendil-works/pi-env": [
|
||||
"../../../packages/env/src/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-agent-core": [
|
||||
"../../../packages/agent/src/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-coding-agent": [
|
||||
"../../../packages/coding-agent/src/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-coding-agent/hooks": [
|
||||
"../../../packages/coding-agent/src/core/hooks/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-coding-agent/*": [
|
||||
"../../../packages/coding-agent/src/*"
|
||||
],
|
||||
"typebox": [
|
||||
"../../../node_modules/typebox"
|
||||
],
|
||||
"@earendil-works/pi-tui": [
|
||||
"../../../packages/tui/src/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-tui/*": [
|
||||
"../../../packages/tui/src/*"
|
||||
],
|
||||
"@earendil-works/pi-agent-old": [
|
||||
"../../../packages/agent-old/src/index.ts"
|
||||
],
|
||||
"@earendil-works/pi-agent-old/*": [
|
||||
"../../../packages/agent-old/src/*"
|
||||
],
|
||||
"@mariozechner/pi-ai": [
|
||||
"../../../packages/coding-agent/src/core/extensions/pi-ai-extension-view.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"./extensions/**/*",
|
||||
"../../*/src/**/*.d.ts",
|
||||
"../test/suite/regressions/8261-subagent-project-trust.test.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**",
|
||||
"./extensions/gondolin/**"
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue