gemi 0.60.0 → 0.62.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.
- package/dist/ai/Agent.d.ts +533 -25
- package/dist/ai/Agent.d.ts.map +1 -1
- package/dist/ai/Agent.test-d.d.ts +2 -0
- package/dist/ai/Agent.test-d.d.ts.map +1 -0
- package/dist/ai/AgentController.d.ts +275 -6
- package/dist/ai/AgentController.d.ts.map +1 -1
- package/dist/ai/AgentProvider.d.ts +255 -0
- package/dist/ai/AgentProvider.d.ts.map +1 -0
- package/dist/ai/Schema.d.ts +125 -0
- package/dist/ai/Schema.d.ts.map +1 -0
- package/dist/ai/Schema.test-d.d.ts +2 -0
- package/dist/ai/Schema.test-d.d.ts.map +1 -0
- package/dist/ai/client/index.d.ts +24 -0
- package/dist/ai/client/index.d.ts.map +1 -0
- package/dist/ai/client/index.js +1053 -0
- package/dist/ai/client/index.js.map +1 -0
- package/dist/ai/client/reducer.d.ts +127 -0
- package/dist/ai/client/reducer.d.ts.map +1 -0
- package/dist/ai/client/reducer.test-d.d.ts +2 -0
- package/dist/ai/client/reducer.test-d.d.ts.map +1 -0
- package/dist/ai/client/sse.d.ts +54 -0
- package/dist/ai/client/sse.d.ts.map +1 -0
- package/dist/ai/example.d.ts +129 -0
- package/dist/ai/example.d.ts.map +1 -0
- package/dist/ai/index.d.ts +35 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +20 -0
- package/dist/ai/index.js.map +23 -0
- package/dist/ai/live/harness.d.ts +137 -0
- package/dist/ai/live/harness.d.ts.map +1 -0
- package/dist/ai/providers/call.d.ts +42 -0
- package/dist/ai/providers/call.d.ts.map +1 -0
- package/dist/ai/providers/capabilities.d.ts +50 -0
- package/dist/ai/providers/capabilities.d.ts.map +1 -0
- package/dist/ai/providers/errors.d.ts +37 -0
- package/dist/ai/providers/errors.d.ts.map +1 -0
- package/dist/ai/providers/fakeProvider.d.ts +35 -0
- package/dist/ai/providers/fakeProvider.d.ts.map +1 -0
- package/dist/ai/providers/http.d.ts +46 -0
- package/dist/ai/providers/http.d.ts.map +1 -0
- package/dist/ai/providers/request.d.ts +69 -0
- package/dist/ai/providers/request.d.ts.map +1 -0
- package/dist/ai/providers/stream.d.ts +42 -0
- package/dist/ai/providers/stream.d.ts.map +1 -0
- package/dist/ai/signing.d.ts +195 -0
- package/dist/ai/signing.d.ts.map +1 -0
- package/dist/ai/store/LiveRuns.d.ts +142 -0
- package/dist/ai/store/LiveRuns.d.ts.map +1 -0
- package/dist/ai/store/MemoryAgentStore.d.ts +61 -0
- package/dist/ai/store/MemoryAgentStore.d.ts.map +1 -0
- package/dist/ai/store/index.d.ts +4 -0
- package/dist/ai/store/index.d.ts.map +1 -0
- package/dist/ai/store/sse.d.ts +58 -0
- package/dist/ai/store/sse.d.ts.map +1 -0
- package/dist/ai/store/stubAgentRun.d.ts +56 -0
- package/dist/ai/store/stubAgentRun.d.ts.map +1 -0
- package/dist/ai/types.d.ts +443 -0
- package/dist/ai/types.d.ts.map +1 -0
- package/dist/ai/useChat.d.ts +253 -7
- package/dist/ai/useChat.d.ts.map +1 -1
- package/dist/chunk-1aqzcgfr.js +5 -0
- package/dist/chunk-1aqzcgfr.js.map +10 -0
- package/dist/{chunk-get4mkx8.js → chunk-1b7e9rj7.js} +2 -2
- package/dist/{chunk-get4mkx8.js.map → chunk-1b7e9rj7.js.map} +1 -1
- package/dist/{chunk-j06g4sqc.js → chunk-528n3vgy.js} +2 -2
- package/dist/{chunk-j06g4sqc.js.map → chunk-528n3vgy.js.map} +1 -1
- package/dist/{chunk-2khdxyjb.js → chunk-57a0nqfj.js} +1 -1
- package/dist/chunk-57a0nqfj.js.map +10 -0
- package/dist/chunk-5fj71djg.js +6 -0
- package/dist/{chunk-y3zz410b.js.map → chunk-5fj71djg.js.map} +2 -2
- package/dist/{chunk-c40n5r4v.js → chunk-5mhcwnyd.js} +2 -2
- package/dist/{chunk-c40n5r4v.js.map → chunk-5mhcwnyd.js.map} +1 -1
- package/dist/{chunk-gwchvzdp.js → chunk-71pk1mxx.js} +2 -2
- package/dist/{chunk-gwchvzdp.js.map → chunk-71pk1mxx.js.map} +1 -1
- package/dist/{chunk-spbgpndn.js → chunk-7t1hjs9f.js} +2 -2
- package/dist/{chunk-spbgpndn.js.map → chunk-7t1hjs9f.js.map} +1 -1
- package/dist/{chunk-9gsdcjt7.js → chunk-7xvaace2.js} +3 -3
- package/dist/{chunk-9gsdcjt7.js.map → chunk-7xvaace2.js.map} +1 -1
- package/dist/{chunk-fxy42w6n.js → chunk-8ag0da2s.js} +2 -2
- package/dist/{chunk-fxy42w6n.js.map → chunk-8ag0da2s.js.map} +1 -1
- package/dist/chunk-8r8epsef.js +5 -0
- package/dist/chunk-8r8epsef.js.map +11 -0
- package/dist/{chunk-0fm6jh9b.js → chunk-9nmvm20t.js} +2 -2
- package/dist/{chunk-0fm6jh9b.js.map → chunk-9nmvm20t.js.map} +1 -1
- package/dist/chunk-9penj44g.js +5 -0
- package/dist/{chunk-khf9xda6.js.map → chunk-9penj44g.js.map} +2 -2
- package/dist/{chunk-98a3k7bp.js → chunk-9xpa7dpy.js} +2 -2
- package/dist/{chunk-98a3k7bp.js.map → chunk-9xpa7dpy.js.map} +1 -1
- package/dist/{chunk-qva4841r.js → chunk-a1exbqcq.js} +3 -3
- package/dist/{chunk-qva4841r.js.map → chunk-a1exbqcq.js.map} +1 -1
- package/dist/{chunk-cw9y6k15.js → chunk-bb19bwg6.js} +2 -2
- package/dist/{chunk-cw9y6k15.js.map → chunk-bb19bwg6.js.map} +1 -1
- package/dist/{chunk-3gvjn3q4.js → chunk-cf7bvd12.js} +1 -1
- package/dist/{chunk-rkbv3df7.js → chunk-djp2xeqe.js} +2 -2
- package/dist/{chunk-rkbv3df7.js.map → chunk-djp2xeqe.js.map} +1 -1
- package/dist/chunk-ds44bqr9.js +4 -0
- package/dist/{chunk-4mcyyh1v.js.map → chunk-ds44bqr9.js.map} +4 -9
- package/dist/{chunk-wzvs3sym.js → chunk-exndjhza.js} +3 -3
- package/dist/{chunk-wzvs3sym.js.map → chunk-exndjhza.js.map} +1 -1
- package/dist/{chunk-f6dd4gd8.js → chunk-f233yzxf.js} +2 -2
- package/dist/{chunk-f6dd4gd8.js.map → chunk-f233yzxf.js.map} +1 -1
- package/dist/chunk-fz5g2z6h.js +4 -0
- package/dist/{chunk-fbvvqf9b.js.map → chunk-fz5g2z6h.js.map} +2 -2
- package/dist/{chunk-vj9538yn.js → chunk-gcszdwcb.js} +2 -2
- package/dist/{chunk-vj9538yn.js.map → chunk-gcszdwcb.js.map} +1 -1
- package/dist/{chunk-dgasxgsm.js → chunk-hk06nhxh.js} +4 -4
- package/dist/{chunk-dgasxgsm.js.map → chunk-hk06nhxh.js.map} +5 -5
- package/dist/{chunk-pkjq9833.js → chunk-htesx7ym.js} +4 -4
- package/dist/{chunk-pkjq9833.js.map → chunk-htesx7ym.js.map} +1 -1
- package/dist/{chunk-stq96kya.js → chunk-k2sjvt0c.js} +2 -2
- package/dist/{chunk-stq96kya.js.map → chunk-k2sjvt0c.js.map} +1 -1
- package/dist/{chunk-x8beq9c4.js → chunk-k4a2gzyc.js} +2 -2
- package/dist/{chunk-x8beq9c4.js.map → chunk-k4a2gzyc.js.map} +1 -1
- package/dist/{chunk-zhbrkpb3.js → chunk-k75phgj4.js} +4 -4
- package/dist/{chunk-zhbrkpb3.js.map → chunk-k75phgj4.js.map} +1 -1
- package/dist/{chunk-23h0dmx2.js → chunk-kac5vmvn.js} +2 -2
- package/dist/{chunk-23h0dmx2.js.map → chunk-kac5vmvn.js.map} +1 -1
- package/dist/{chunk-y64j80v9.js → chunk-m0tp7zjp.js} +2 -2
- package/dist/{chunk-y64j80v9.js.map → chunk-m0tp7zjp.js.map} +1 -1
- package/dist/{chunk-06j6rsew.js → chunk-m45j7p1y.js} +2 -2
- package/dist/{chunk-06j6rsew.js.map → chunk-m45j7p1y.js.map} +1 -1
- package/dist/chunk-mca9wsvs.js +5 -0
- package/dist/{chunk-z2tcxwyr.js.map → chunk-mca9wsvs.js.map} +3 -4
- package/dist/{chunk-tey1xayb.js → chunk-ms13evzp.js} +2 -2
- package/dist/{chunk-tey1xayb.js.map → chunk-ms13evzp.js.map} +1 -1
- package/dist/{chunk-bn1v4sfs.js → chunk-r962ae93.js} +2 -2
- package/dist/{chunk-bn1v4sfs.js.map → chunk-r962ae93.js.map} +1 -1
- package/dist/chunk-snb68dgr.js +4 -0
- package/dist/{chunk-hwhw98hc.js.map → chunk-snb68dgr.js.map} +1 -1
- package/dist/chunk-sz051605.js +5 -0
- package/dist/chunk-sz051605.js.map +14 -0
- package/dist/{chunk-2cwcfwg3.js → chunk-tr3cbx8k.js} +2 -2
- package/dist/{chunk-2cwcfwg3.js.map → chunk-tr3cbx8k.js.map} +2 -2
- package/dist/{chunk-zqsfanvk.js → chunk-wpb1xpdp.js} +2 -2
- package/dist/{chunk-zqsfanvk.js.map → chunk-wpb1xpdp.js.map} +1 -1
- package/dist/{chunk-z1e55w67.js → chunk-ybqss0jy.js} +2 -2
- package/dist/{chunk-z1e55w67.js.map → chunk-ybqss0jy.js.map} +1 -1
- package/dist/{chunk-cejf873g.js → chunk-yk5wqmyh.js} +2 -2
- package/dist/{chunk-cejf873g.js.map → chunk-yk5wqmyh.js.map} +1 -1
- package/dist/{chunk-8kj3zrm9.js → chunk-ywntv8yw.js} +4 -4
- package/dist/{chunk-8kj3zrm9.js.map → chunk-ywntv8yw.js.map} +1 -1
- package/dist/chunks/{ThemeProvider-ByU4BQdL.js → ThemeProvider-BZ2SsSZ3.js} +60 -39
- package/dist/chunks/ThemeProvider-BZ2SsSZ3.js.map +1 -0
- package/dist/chunks/useParams-BN3XXfmG.js +20 -0
- package/dist/chunks/useParams-BN3XXfmG.js.map +1 -0
- package/dist/client/index.js +3 -3
- package/dist/client/index.js.map +1 -1
- package/dist/client/useDictionary.d.ts.map +1 -1
- package/dist/database/index.js +1 -1
- package/dist/facades/Storage.d.ts +6 -2
- package/dist/facades/Storage.d.ts.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/http/ApiRouter.d.ts +30 -2
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/i18n/defineDictionary.d.ts +7 -4
- package/dist/i18n/defineDictionary.d.ts.map +1 -1
- package/dist/i18n/dictionaryRegistry.d.ts +38 -14
- package/dist/i18n/dictionaryRegistry.d.ts.map +1 -1
- package/dist/i18n/dictionaryRuntime.js +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +2 -2
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +2 -2
- package/dist/orm/index.js +2 -2
- package/dist/orm/index.js.map +2 -2
- package/dist/server/index.js +1 -1
- package/dist/services/file-storage/drivers/AzureBlobDriver.d.ts +3 -2
- package/dist/services/file-storage/drivers/AzureBlobDriver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/FileStorageDriver.d.ts +2 -2
- package/dist/services/file-storage/drivers/FileStorageDriver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/FileSystemDriver.d.ts +2 -2
- package/dist/services/file-storage/drivers/FileSystemDriver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/S3Driver.d.ts +2 -2
- package/dist/services/file-storage/drivers/S3Driver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/types.d.ts +9 -1
- package/dist/services/file-storage/drivers/types.d.ts.map +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +6 -6
- package/dist/services/index.js.map +4 -4
- package/dist/testing/index.js +2 -1
- package/dist/testing/index.js.map +1 -1
- package/package.json +3 -1
- package/dist/chunk-2khdxyjb.js.map +0 -10
- package/dist/chunk-4mcyyh1v.js +0 -4
- package/dist/chunk-fbvvqf9b.js +0 -4
- package/dist/chunk-hwhw98hc.js +0 -4
- package/dist/chunk-khf9xda6.js +0 -5
- package/dist/chunk-q0y0j3ne.js +0 -5
- package/dist/chunk-q0y0j3ne.js.map +0 -11
- package/dist/chunk-y3zz410b.js +0 -6
- package/dist/chunk-z2tcxwyr.js +0 -5
- package/dist/chunks/ThemeProvider-ByU4BQdL.js.map +0 -1
- /package/dist/{chunk-3gvjn3q4.js.map → chunk-cf7bvd12.js.map} +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The schema layer for tool inputs, tool outputs and structured final answers.
|
|
3
|
+
*
|
|
4
|
+
* Two things have to come out of one declaration: a TypeScript type, so
|
|
5
|
+
* `execute(input)` is typed at the call site and the result is typed in the
|
|
6
|
+
* browser, and a JSON Schema, because that is what the model is actually shown.
|
|
7
|
+
* A phantom `Schema<T>` gives the first and nothing of the second, and a
|
|
8
|
+
* hand-written JSON Schema next to a hand-written type gives both and lets them
|
|
9
|
+
* drift. So the builder below is the single source, and `Infer` reads the type
|
|
10
|
+
* back off it.
|
|
11
|
+
*
|
|
12
|
+
* Everything here is deliberately narrower than JSON Schema. OpenAI's strict
|
|
13
|
+
* structured output only accepts a subset — every property listed in
|
|
14
|
+
* `required`, `additionalProperties: false` on every object, no patterns, no
|
|
15
|
+
* `oneOf` at the root — and a builder that cannot express the rejected parts is
|
|
16
|
+
* better than one that lets you write a schema the API refuses at runtime.
|
|
17
|
+
*/
|
|
18
|
+
export type JSONSchema = {
|
|
19
|
+
type?: string | string[];
|
|
20
|
+
description?: string;
|
|
21
|
+
enum?: readonly (string | number)[];
|
|
22
|
+
const?: string | number | boolean;
|
|
23
|
+
properties?: Record<string, JSONSchema>;
|
|
24
|
+
required?: readonly string[];
|
|
25
|
+
additionalProperties?: false;
|
|
26
|
+
items?: JSONSchema;
|
|
27
|
+
anyOf?: readonly JSONSchema[];
|
|
28
|
+
};
|
|
29
|
+
declare const OUTPUT: unique symbol;
|
|
30
|
+
declare const OPTIONAL: unique symbol;
|
|
31
|
+
/**
|
|
32
|
+
* `T` is carried in a phantom property rather than a real one: it exists only
|
|
33
|
+
* for inference, and a real field would show up on the object the app writes.
|
|
34
|
+
*/
|
|
35
|
+
export interface Schema<T> {
|
|
36
|
+
readonly [OUTPUT]: T;
|
|
37
|
+
/** The JSON Schema handed to the provider. */
|
|
38
|
+
toJSONSchema(): JSONSchema;
|
|
39
|
+
/**
|
|
40
|
+
* Parses a value coming back from the model. Tool arguments arrive as a JSON
|
|
41
|
+
* string the model generated, so they are untrusted in exactly the way a
|
|
42
|
+
* request body is: shape-checked before `execute` ever sees them.
|
|
43
|
+
*/
|
|
44
|
+
parse(value: unknown): T;
|
|
45
|
+
safeParse(value: unknown): {
|
|
46
|
+
ok: true;
|
|
47
|
+
value: T;
|
|
48
|
+
} | {
|
|
49
|
+
ok: false;
|
|
50
|
+
errors: string[];
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A schema whose key may be left out of the object containing it.
|
|
55
|
+
*
|
|
56
|
+
* Marked with a property rather than detected from the output type, because
|
|
57
|
+
* `undefined extends T` — the obvious test — is true of *everything* when
|
|
58
|
+
* `strictNullChecks` is off, which is how this package and plenty of apps
|
|
59
|
+
* compile. That version made every field of every tool optional, and did it
|
|
60
|
+
* quietly: the JSON Schema was still right, so only the TypeScript types lied.
|
|
61
|
+
*/
|
|
62
|
+
export interface OptionalSchema<T> extends Schema<T | undefined> {
|
|
63
|
+
readonly [OPTIONAL]: true;
|
|
64
|
+
}
|
|
65
|
+
export type AnySchema = Schema<any>;
|
|
66
|
+
export type Infer<S> = S extends Schema<infer T> ? T : never;
|
|
67
|
+
/**
|
|
68
|
+
* Collapses a type into one flat object.
|
|
69
|
+
*
|
|
70
|
+
* `ShapeOutput` builds its result as an intersection of two mapped types, one
|
|
71
|
+
* required and one optional, and that intersection is what every hover, every
|
|
72
|
+
* error message and every type assertion would otherwise show. The difference
|
|
73
|
+
* is between an app reading `{ command: string; cwd?: string }` and reading two
|
|
74
|
+
* mapped types joined by an ampersand.
|
|
75
|
+
*
|
|
76
|
+
* It also drops `readonly`, which the mapped types copy from the shape literal
|
|
77
|
+
* — `s.object({ ... })` infers that literal as `const` to keep the keys, and a
|
|
78
|
+
* tool has no reason to receive an immutable input because of how its schema
|
|
79
|
+
* was written down.
|
|
80
|
+
*/
|
|
81
|
+
type Flatten<T> = {
|
|
82
|
+
-readonly [K in keyof T]: T[K];
|
|
83
|
+
};
|
|
84
|
+
type ShapeOutput<S extends Record<string, AnySchema>> = Flatten<{
|
|
85
|
+
[K in keyof S as S[K] extends OptionalSchema<any> ? never : K]: Infer<S[K]>;
|
|
86
|
+
} & {
|
|
87
|
+
[K in keyof S as S[K] extends OptionalSchema<any> ? K : never]?: Infer<S[K]>;
|
|
88
|
+
}>;
|
|
89
|
+
interface SchemaBuilder<T> extends Schema<T> {
|
|
90
|
+
/**
|
|
91
|
+
* The description is not documentation — it is the only prose the model gets
|
|
92
|
+
* about a field, and it is the difference between a tool that is called
|
|
93
|
+
* correctly and one that is not.
|
|
94
|
+
*/
|
|
95
|
+
describe(description: string): this;
|
|
96
|
+
/**
|
|
97
|
+
* Strict mode has no notion of an omitted key: every property must appear in
|
|
98
|
+
* `required`. So `optional()` emits a nullable union and the model is told to
|
|
99
|
+
* send `null`, while the TypeScript type says `| undefined` and the parsed
|
|
100
|
+
* value drops the key. The asymmetry is the point — it is what lets an app
|
|
101
|
+
* write ordinary optional fields against an API that forbids them.
|
|
102
|
+
*/
|
|
103
|
+
optional(): OptionalSchemaBuilder<T>;
|
|
104
|
+
nullable(): SchemaBuilder<T | null>;
|
|
105
|
+
}
|
|
106
|
+
interface OptionalSchemaBuilder<T> extends SchemaBuilder<T | undefined>, OptionalSchema<T> {
|
|
107
|
+
}
|
|
108
|
+
export declare const s: {
|
|
109
|
+
string(): SchemaBuilder<string>;
|
|
110
|
+
number(): SchemaBuilder<number>;
|
|
111
|
+
boolean(): SchemaBuilder<boolean>;
|
|
112
|
+
literal<const L extends string | number | boolean>(value: L): SchemaBuilder<L>;
|
|
113
|
+
/** Modelled as a JSON Schema `enum`, which strict mode does support. */
|
|
114
|
+
enum<const L extends readonly [string, ...string[]]>(values: L): SchemaBuilder<L[number]>;
|
|
115
|
+
object<const S extends Record<string, AnySchema>>(shape: S): SchemaBuilder<ShapeOutput<S>>;
|
|
116
|
+
array<const S extends AnySchema>(item: S): SchemaBuilder<Infer<S>[]>;
|
|
117
|
+
/**
|
|
118
|
+
* `anyOf` of object schemas, discriminated by a literal member. Left in
|
|
119
|
+
* because tool outputs are frequently a success/failure pair, and modelling
|
|
120
|
+
* that as one object with everything optional is worse for the model.
|
|
121
|
+
*/
|
|
122
|
+
union<const S extends readonly [AnySchema, AnySchema, ...AnySchema[]]>(members: S): SchemaBuilder<Infer<S[number]>>;
|
|
123
|
+
};
|
|
124
|
+
export {};
|
|
125
|
+
//# sourceMappingURL=Schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../ai/Schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;CAC/B,CAAC;AAEF,OAAO,CAAC,MAAM,MAAM,EAAE,OAAO,MAAM,CAA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;IAC3F,KAAK,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,EAAE,IAAI,EAAE,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACrE;;;;OAIG;IACH,KAAK,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAAC,EACnE,OAAO,EAAE,CAAC,GACT,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAwBpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Schema.test-d.d.ts","sourceRoot":"","sources":["../../ai/Schema.test-d.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `gemi/ai/client` — the browser half of the agent module.
|
|
3
|
+
*
|
|
4
|
+
* Separate from `gemi/ai` because that entry reaches the providers, the tool
|
|
5
|
+
* registry and `signing.ts`; the long form of the argument is at the top of
|
|
6
|
+
* `ai/index.ts`. The short form: a barrel is evaluated, not browsed, so the
|
|
7
|
+
* only reliable way to keep an API key and a tool's `execute` out of a client
|
|
8
|
+
* bundle is for the module the client imports to have no path to them.
|
|
9
|
+
*
|
|
10
|
+
* It does not, and nothing here is a compromise to keep it that way. Following
|
|
11
|
+
* every import from this file reaches `useChat.tsx`, the SSE decoder, the frame
|
|
12
|
+
* reducer, `ai/types.ts` (which imports nothing) and React. The agent's tool
|
|
13
|
+
* types still arrive fully typed, because they travel as *types* on the route's
|
|
14
|
+
* `RPC` entry rather than as a value this file would have to import.
|
|
15
|
+
*
|
|
16
|
+
* The sibling modules in this directory — `reducer.ts` and `sse.ts` — are
|
|
17
|
+
* `useChat`'s internals and stay unexported. They are pure functions over
|
|
18
|
+
* frames, which is why they are separately testable, but an app that reaches
|
|
19
|
+
* for `applyFrame` is reimplementing the hook.
|
|
20
|
+
*/
|
|
21
|
+
export { useChat } from "../useChat";
|
|
22
|
+
export type { AgentAttachBody, AgentRequestBody, AgentStopBody, ChatStatus, UseChatParams, UseChatResult, } from "../useChat";
|
|
23
|
+
export type { AgentContentPart, AgentError, AgentErrorCode, AgentMessage, AgentStreamEvent, AgentStreamFrame, ClientToolResult, ClientTurn, FilePart, FinishReason, NestedRun, OutputPart, PendingToolCall, ReasoningPart, TextPart, ToolCallPart, ToolResultPart, ToolShape, ToolShapes, Usage, } from "../types";
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ai/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,aAAa,EACb,aAAa,GACd,MAAM,YAAY,CAAC;AAMpB,YAAY,EACV,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,YAAY,EAGZ,SAAS,EACT,UAAU,EACV,eAAe,EACf,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,SAAS,EACT,UAAU,EACV,KAAK,GACN,MAAM,UAAU,CAAC"}
|