@pinecall/protocol 0.6.0 → 0.6.1
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/generated/codec.d.ts +1 -1
- package/dist/generated/codec.js +1 -1
- package/dist/generated/defs.d.ts +2 -3
- package/dist/generated/defs.js +3 -3
- package/dist/generated/events.d.ts +0 -1
- package/dist/generated/registry.d.ts +0 -1
- package/dist/generated/rest.d.ts +93 -0
- package/dist/generated/rest.js +71 -0
- package/package.json +1 -1
|
@@ -46,7 +46,7 @@ export type Snake<T> = T extends readonly (infer Item)[] ? Snake<Item>[] : T ext
|
|
|
46
46
|
} : T;
|
|
47
47
|
/** The keys whose values belong to the app (its state, a tool's arguments, a map it named): never renamed below them. */
|
|
48
48
|
export declare const OPAQUE_KEYS: Set<string>;
|
|
49
|
-
export type OpaqueKey = "app_state" | "arguments" | "attributes" | "data" | "input" | "metadata" | "output" | "parameters" | "prompt" | "result" | "state";
|
|
49
|
+
export type OpaqueKey = "app_state" | "arguments" | "attributes" | "data" | "facts" | "input" | "metadata" | "output" | "parameters" | "prompt" | "result" | "state";
|
|
50
50
|
/** Rename every key from snake_case to camelCase, deep. Values are never touched. */
|
|
51
51
|
export declare function toCamel<T>(value: T): Camel<T>;
|
|
52
52
|
/** Rename every key from camelCase to snake_case, deep. Values are never touched. */
|
package/dist/generated/codec.js
CHANGED
|
@@ -37,7 +37,7 @@ export function isCommandType(type) {
|
|
|
37
37
|
return Object.hasOwn(COMMAND_SCHEMAS, type);
|
|
38
38
|
}
|
|
39
39
|
/** The keys whose values belong to the app (its state, a tool's arguments, a map it named): never renamed below them. */
|
|
40
|
-
export const OPAQUE_KEYS = new Set(["app_state", "arguments", "attributes", "data", "input", "metadata", "output", "parameters", "prompt", "result", "state"]);
|
|
40
|
+
export const OPAQUE_KEYS = new Set(["app_state", "arguments", "attributes", "data", "facts", "input", "metadata", "output", "parameters", "prompt", "result", "state"]);
|
|
41
41
|
/** Rename every key from snake_case to camelCase, deep. Values are never touched. */
|
|
42
42
|
export function toCamel(value) {
|
|
43
43
|
return renameKeys(value, camelCase);
|
package/dist/generated/defs.d.ts
CHANGED
|
@@ -30,8 +30,8 @@ export declare const EnvSchema: z.ZodEnum<{
|
|
|
30
30
|
export type Env = z.infer<typeof EnvSchema>;
|
|
31
31
|
/**
|
|
32
32
|
* What a console may ask of the process standing in the agent's directory, relayed by the gateway:
|
|
33
|
-
* a written call to the class mounted there (chat), a simulated caller
|
|
34
|
-
* goldens and a suite of them, its knowledge folder pushed or its golden asked, its memory
|
|
33
|
+
* a written call to the class mounted there (chat), a simulated caller put on the class it holds,
|
|
34
|
+
* its goldens and a suite of them, its knowledge folder pushed or its golden asked, its memory
|
|
35
35
|
* goldens, a call promoted to a candidate file, the drift of the last two windows, and the
|
|
36
36
|
* reproductions a broken run left on that disk. Everything else a console needs is a door of the
|
|
37
37
|
* gateway.
|
|
@@ -54,7 +54,6 @@ export declare const DevVerbSchema: z.ZodEnum<{
|
|
|
54
54
|
"promote.write": "promote.write";
|
|
55
55
|
"reproductions.read": "reproductions.read";
|
|
56
56
|
"reproductions.roster": "reproductions.roster";
|
|
57
|
-
"simulate.roster": "simulate.roster";
|
|
58
57
|
"simulate.start": "simulate.start";
|
|
59
58
|
}>;
|
|
60
59
|
export type DevVerb = z.infer<typeof DevVerbSchema>;
|
package/dist/generated/defs.js
CHANGED
|
@@ -18,13 +18,13 @@ export const DirectionSchema = z.enum(["inbound", "outbound"]);
|
|
|
18
18
|
export const EnvSchema = z.enum(["production", "sandbox"]);
|
|
19
19
|
/**
|
|
20
20
|
* What a console may ask of the process standing in the agent's directory, relayed by the gateway:
|
|
21
|
-
* a written call to the class mounted there (chat), a simulated caller
|
|
22
|
-
* goldens and a suite of them, its knowledge folder pushed or its golden asked, its memory
|
|
21
|
+
* a written call to the class mounted there (chat), a simulated caller put on the class it holds,
|
|
22
|
+
* its goldens and a suite of them, its knowledge folder pushed or its golden asked, its memory
|
|
23
23
|
* goldens, a call promoted to a candidate file, the drift of the last two windows, and the
|
|
24
24
|
* reproductions a broken run left on that disk. Everything else a console needs is a door of the
|
|
25
25
|
* gateway.
|
|
26
26
|
*/
|
|
27
|
-
export const DevVerbSchema = z.enum(["chat.roster", "chat.start", "chat.say", "chat.end", "simulate.
|
|
27
|
+
export const DevVerbSchema = z.enum(["chat.roster", "chat.start", "chat.say", "chat.end", "simulate.start", "goldens.roster", "goldens.run", "knowledge.roster", "knowledge.push", "knowledge.eval", "memory.roster", "memory.eval", "memory.extraction", "promote.roster", "promote.write", "drift.read", "reproductions.roster", "reproductions.read"]);
|
|
28
28
|
/**
|
|
29
29
|
* Why the call is over. Who hung up, what failed before anybody could, drained: the platform took
|
|
30
30
|
* the worker down (a deploy, a stop) with the call still on it, or app_detached: the app holding
|
|
@@ -465,7 +465,6 @@ export declare const DevRequestSchema: z.ZodObject<{
|
|
|
465
465
|
"promote.write": "promote.write";
|
|
466
466
|
"reproductions.read": "reproductions.read";
|
|
467
467
|
"reproductions.roster": "reproductions.roster";
|
|
468
|
-
"simulate.roster": "simulate.roster";
|
|
469
468
|
"simulate.start": "simulate.start";
|
|
470
469
|
}>;
|
|
471
470
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -352,7 +352,6 @@ export declare const EVENT_SCHEMAS: {
|
|
|
352
352
|
"promote.write": "promote.write";
|
|
353
353
|
"reproductions.read": "reproductions.read";
|
|
354
354
|
"reproductions.roster": "reproductions.roster";
|
|
355
|
-
"simulate.roster": "simulate.roster";
|
|
356
355
|
"simulate.start": "simulate.start";
|
|
357
356
|
}>;
|
|
358
357
|
data: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
package/dist/generated/rest.d.ts
CHANGED
|
@@ -2175,6 +2175,56 @@ export declare const CallTuningSchema: z.ZodObject<{
|
|
|
2175
2175
|
}, z.core.$strict>>;
|
|
2176
2176
|
}, z.core.$strict>;
|
|
2177
2177
|
export type CallTuning = z.infer<typeof CallTuningSchema>;
|
|
2178
|
+
/** One file of a base as the list draws it. */
|
|
2179
|
+
export declare const KnowledgeFileRowSchema: z.ZodObject<{
|
|
2180
|
+
path: z.ZodString;
|
|
2181
|
+
chars: z.ZodInt;
|
|
2182
|
+
chunks: z.ZodInt;
|
|
2183
|
+
pushed_at: z.ZodNumber;
|
|
2184
|
+
}, z.core.$strict>;
|
|
2185
|
+
export type KnowledgeFileRow = z.infer<typeof KnowledgeFileRowSchema>;
|
|
2186
|
+
/**
|
|
2187
|
+
* GET /v1/knowledge/{base}: every file of the base, by path, with its size and what it became.
|
|
2188
|
+
* Never the text: one file is read at a time.
|
|
2189
|
+
*/
|
|
2190
|
+
export declare const KnowledgeFilesSchema: z.ZodObject<{
|
|
2191
|
+
base: z.ZodString;
|
|
2192
|
+
kept: z.ZodBoolean;
|
|
2193
|
+
files: z.ZodArray<z.ZodObject<{
|
|
2194
|
+
path: z.ZodString;
|
|
2195
|
+
chars: z.ZodInt;
|
|
2196
|
+
chunks: z.ZodInt;
|
|
2197
|
+
pushed_at: z.ZodNumber;
|
|
2198
|
+
}, z.core.$strict>>;
|
|
2199
|
+
}, z.core.$strict>;
|
|
2200
|
+
export type KnowledgeFiles = z.infer<typeof KnowledgeFilesSchema>;
|
|
2201
|
+
/** GET /v1/knowledge/{base}/files/{path}: one file, text and all. */
|
|
2202
|
+
export declare const KnowledgeFileReadSchema: z.ZodObject<{
|
|
2203
|
+
path: z.ZodString;
|
|
2204
|
+
text: z.ZodString;
|
|
2205
|
+
chunks: z.ZodInt;
|
|
2206
|
+
pushed_at: z.ZodNumber;
|
|
2207
|
+
}, z.core.$strict>;
|
|
2208
|
+
export type KnowledgeFileRead = z.infer<typeof KnowledgeFileReadSchema>;
|
|
2209
|
+
/**
|
|
2210
|
+
* PUT /v1/knowledge/{base}/files/{path}, the body: the file's whole text. New under that path, or
|
|
2211
|
+
* replaced in place; the base is begun when there is none.
|
|
2212
|
+
*/
|
|
2213
|
+
export declare const KnowledgeFilePutSchema: z.ZodObject<{
|
|
2214
|
+
text: z.ZodString;
|
|
2215
|
+
}, z.core.$strict>;
|
|
2216
|
+
export type KnowledgeFilePut = z.infer<typeof KnowledgeFilePutSchema>;
|
|
2217
|
+
/**
|
|
2218
|
+
* PUT /v1/knowledge/{base}/files/{path}, the answer: which file, how many chunks it became, and
|
|
2219
|
+
* how long that took.
|
|
2220
|
+
*/
|
|
2221
|
+
export declare const KnowledgeFilePushedSchema: z.ZodObject<{
|
|
2222
|
+
base: z.ZodString;
|
|
2223
|
+
path: z.ZodString;
|
|
2224
|
+
chunks: z.ZodInt;
|
|
2225
|
+
took_ms: z.ZodNumber;
|
|
2226
|
+
}, z.core.$strict>;
|
|
2227
|
+
export type KnowledgeFilePushed = z.infer<typeof KnowledgeFilePushedSchema>;
|
|
2178
2228
|
/** One base and the agents whose settings attach it. */
|
|
2179
2229
|
export declare const KnowledgeUseSchema: z.ZodObject<{
|
|
2180
2230
|
base: z.ZodString;
|
|
@@ -2192,3 +2242,46 @@ export declare const KnowledgeUsesSchema: z.ZodObject<{
|
|
|
2192
2242
|
}, z.core.$strict>>;
|
|
2193
2243
|
}, z.core.$strict>;
|
|
2194
2244
|
export type KnowledgeUses = z.infer<typeof KnowledgeUsesSchema>;
|
|
2245
|
+
/**
|
|
2246
|
+
* One synthetic caller of an agent, kept by the gateway: what they want, how they talk, and what
|
|
2247
|
+
* they may state about themselves. A model plays them turn by turn — there is no script — for
|
|
2248
|
+
* `pinecall simulate` and the console's Simulations.
|
|
2249
|
+
*/
|
|
2250
|
+
export declare const PersonaSchema: z.ZodObject<{
|
|
2251
|
+
name: z.ZodString;
|
|
2252
|
+
about: z.ZodString;
|
|
2253
|
+
goal: z.ZodString;
|
|
2254
|
+
style: z.ZodString;
|
|
2255
|
+
facts: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2256
|
+
state: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2257
|
+
author: z.ZodString;
|
|
2258
|
+
set_at: z.ZodNumber;
|
|
2259
|
+
}, z.core.$strict>;
|
|
2260
|
+
export type Persona = z.infer<typeof PersonaSchema>;
|
|
2261
|
+
/** GET /v1/agents/{slug}/personas: every caller written for this agent, by name. */
|
|
2262
|
+
export declare const PersonaListSchema: z.ZodObject<{
|
|
2263
|
+
personas: z.ZodArray<z.ZodObject<{
|
|
2264
|
+
name: z.ZodString;
|
|
2265
|
+
about: z.ZodString;
|
|
2266
|
+
goal: z.ZodString;
|
|
2267
|
+
style: z.ZodString;
|
|
2268
|
+
facts: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2269
|
+
state: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2270
|
+
author: z.ZodString;
|
|
2271
|
+
set_at: z.ZodNumber;
|
|
2272
|
+
}, z.core.$strict>>;
|
|
2273
|
+
}, z.core.$strict>;
|
|
2274
|
+
export type PersonaList = z.infer<typeof PersonaListSchema>;
|
|
2275
|
+
/**
|
|
2276
|
+
* PUT /v1/agents/{slug}/personas/{name}, the body: the caller, written whole. A name that exists
|
|
2277
|
+
* is replaced; `was` renames the caller it names.
|
|
2278
|
+
*/
|
|
2279
|
+
export declare const PersonaPutSchema: z.ZodObject<{
|
|
2280
|
+
about: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2281
|
+
goal: z.ZodString;
|
|
2282
|
+
style: z.ZodString;
|
|
2283
|
+
facts: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
2284
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
2285
|
+
was: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2286
|
+
}, z.core.$strict>;
|
|
2287
|
+
export type PersonaPut = z.infer<typeof PersonaPutSchema>;
|
package/dist/generated/rest.js
CHANGED
|
@@ -779,6 +779,46 @@ export const CallTuningSchema = z.strictObject({
|
|
|
779
779
|
config: TuningRowSchema.nullable(),
|
|
780
780
|
lexicon: LexiconRowSchema.nullable(),
|
|
781
781
|
});
|
|
782
|
+
/** One file of a base as the list draws it. */
|
|
783
|
+
export const KnowledgeFileRowSchema = z.strictObject({
|
|
784
|
+
path: z.string(),
|
|
785
|
+
chars: z.int(),
|
|
786
|
+
chunks: z.int(),
|
|
787
|
+
pushed_at: z.number(),
|
|
788
|
+
});
|
|
789
|
+
/**
|
|
790
|
+
* GET /v1/knowledge/{base}: every file of the base, by path, with its size and what it became.
|
|
791
|
+
* Never the text: one file is read at a time.
|
|
792
|
+
*/
|
|
793
|
+
export const KnowledgeFilesSchema = z.strictObject({
|
|
794
|
+
base: z.string(),
|
|
795
|
+
kept: z.boolean(),
|
|
796
|
+
files: z.array(KnowledgeFileRowSchema),
|
|
797
|
+
});
|
|
798
|
+
/** GET /v1/knowledge/{base}/files/{path}: one file, text and all. */
|
|
799
|
+
export const KnowledgeFileReadSchema = z.strictObject({
|
|
800
|
+
path: z.string(),
|
|
801
|
+
text: z.string(),
|
|
802
|
+
chunks: z.int(),
|
|
803
|
+
pushed_at: z.number(),
|
|
804
|
+
});
|
|
805
|
+
/**
|
|
806
|
+
* PUT /v1/knowledge/{base}/files/{path}, the body: the file's whole text. New under that path, or
|
|
807
|
+
* replaced in place; the base is begun when there is none.
|
|
808
|
+
*/
|
|
809
|
+
export const KnowledgeFilePutSchema = z.strictObject({
|
|
810
|
+
text: z.string(),
|
|
811
|
+
});
|
|
812
|
+
/**
|
|
813
|
+
* PUT /v1/knowledge/{base}/files/{path}, the answer: which file, how many chunks it became, and
|
|
814
|
+
* how long that took.
|
|
815
|
+
*/
|
|
816
|
+
export const KnowledgeFilePushedSchema = z.strictObject({
|
|
817
|
+
base: z.string(),
|
|
818
|
+
path: z.string(),
|
|
819
|
+
chunks: z.int(),
|
|
820
|
+
took_ms: z.number(),
|
|
821
|
+
});
|
|
782
822
|
/** One base and the agents whose settings attach it. */
|
|
783
823
|
export const KnowledgeUseSchema = z.strictObject({
|
|
784
824
|
base: z.string(),
|
|
@@ -791,3 +831,34 @@ export const KnowledgeUseSchema = z.strictObject({
|
|
|
791
831
|
export const KnowledgeUsesSchema = z.strictObject({
|
|
792
832
|
bases: z.array(KnowledgeUseSchema),
|
|
793
833
|
});
|
|
834
|
+
/**
|
|
835
|
+
* One synthetic caller of an agent, kept by the gateway: what they want, how they talk, and what
|
|
836
|
+
* they may state about themselves. A model plays them turn by turn — there is no script — for
|
|
837
|
+
* `pinecall simulate` and the console's Simulations.
|
|
838
|
+
*/
|
|
839
|
+
export const PersonaSchema = z.strictObject({
|
|
840
|
+
name: z.string(),
|
|
841
|
+
about: z.string(),
|
|
842
|
+
goal: z.string(),
|
|
843
|
+
style: z.string(),
|
|
844
|
+
facts: z.record(z.string(), z.string()),
|
|
845
|
+
state: z.record(z.string(), z.unknown()),
|
|
846
|
+
author: z.string(),
|
|
847
|
+
set_at: z.number(),
|
|
848
|
+
});
|
|
849
|
+
/** GET /v1/agents/{slug}/personas: every caller written for this agent, by name. */
|
|
850
|
+
export const PersonaListSchema = z.strictObject({
|
|
851
|
+
personas: z.array(PersonaSchema),
|
|
852
|
+
});
|
|
853
|
+
/**
|
|
854
|
+
* PUT /v1/agents/{slug}/personas/{name}, the body: the caller, written whole. A name that exists
|
|
855
|
+
* is replaced; `was` renames the caller it names.
|
|
856
|
+
*/
|
|
857
|
+
export const PersonaPutSchema = z.strictObject({
|
|
858
|
+
about: z.string().nullish(),
|
|
859
|
+
goal: z.string(),
|
|
860
|
+
style: z.string(),
|
|
861
|
+
facts: z.record(z.string(), z.string()).nullish(),
|
|
862
|
+
state: z.record(z.string(), z.unknown()).nullish(),
|
|
863
|
+
was: z.string().nullish(),
|
|
864
|
+
});
|
package/package.json
CHANGED