@assistant-ui/x-generative-compiler 0.0.2 → 0.0.4
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/README.md +7 -5
- package/dist/compile.d.ts +1 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +542 -51
- package/dist/compile.js.map +1 -1
- package/dist/package.js +6 -0
- package/dist/package.js.map +1 -0
- package/package.json +10 -8
- package/src/compile.test.ts +841 -6
- package/src/compile.ts +957 -77
package/README.md
CHANGED
|
@@ -8,14 +8,16 @@ colocates a tool's schema, its server-only `execute`, and its client-only
|
|
|
8
8
|
`render`, and rewrites it for a single build target:
|
|
9
9
|
|
|
10
10
|
- **client** — keeps `render` and any `"use client"` `execute` (frontend tools),
|
|
11
|
-
drops backend `execute` and `
|
|
12
|
-
`type`.
|
|
11
|
+
drops backend `execute` and `humanTool()` sentinels, and stamps each tool's
|
|
12
|
+
inferred `type`.
|
|
13
13
|
- **server** — keeps the backend `execute` (importing `server-only`), drops
|
|
14
|
-
`render
|
|
14
|
+
`render`, and omits externally-defined backend tools marked with
|
|
15
|
+
`externalTool()`.
|
|
15
16
|
|
|
16
17
|
The marker functions a `"use generative"` file imports — `defineToolkit` and
|
|
17
|
-
`
|
|
18
|
-
This package only recognizes them by name and strips them
|
|
18
|
+
`humanTool` — live in `@assistant-ui/core/react` (re-exported from
|
|
19
|
+
`@assistant-ui/react`). This package only recognizes them by name and strips them
|
|
20
|
+
at build time.
|
|
19
21
|
|
|
20
22
|
## API
|
|
21
23
|
|
package/dist/compile.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Target } from "./constants.js";
|
|
2
2
|
|
|
3
3
|
//#region src/compile.d.ts
|
|
4
|
-
type ToolType = "frontend" | "backend" | "human";
|
|
4
|
+
type ToolType = "frontend" | "backend" | "human" | "provider";
|
|
5
5
|
interface CompileOptions {
|
|
6
6
|
/** Which build target to emit. */
|
|
7
7
|
target: Target;
|
package/dist/compile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","names":[],"sources":["../src/compile.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"compile.d.ts","names":[],"sources":["../src/compile.ts"],"mappings":";;;KAoBY,QAAA;AAAA,UAkCK,cAAA;EAlCL;EAoCV,MAAA,EAAQ,MAAM;;EAEd,QAAA;EAtCkB;EAwClB,UAAA;EAN6B;;;;;;;;EAe7B,gBAAA;AAAA;AAAA,UAGe,aAAA;EACf,IAAA;EACA,GAAG;AAAA;AAAA;AAAA,cAIQ,sBAAA,SAA+B,KAAK;cACnC,OAAA,UAAiB,QAAA;AAAA;;iBAOf,kBAAA,CAAmB,IAAY;;;;;iBA4B/B,iBAAA,CACd,IAAA,UACA,OAAA,EAAS,cAAA,GACR,aAAa"}
|