pinecall 0.6.0 → 0.8.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/README.md +17 -9
- package/dist/agent/agent.d.ts +9 -38
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.js +17 -18
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/knowledge.d.ts +9 -0
- package/dist/agent/knowledge.d.ts.map +1 -0
- package/dist/agent/knowledge.js +3 -0
- package/dist/agent/knowledge.js.map +1 -0
- package/dist/agent/searching.d.ts +8 -0
- package/dist/agent/searching.d.ts.map +1 -0
- package/dist/agent/searching.js +38 -0
- package/dist/agent/searching.js.map +1 -0
- package/dist/call/call.d.ts +20 -1
- package/dist/call/call.d.ts.map +1 -1
- package/dist/call/call.js +15 -1
- package/dist/call/call.js.map +1 -1
- package/dist/cli/agent-knowledge.d.ts +19 -0
- package/dist/cli/agent-knowledge.d.ts.map +1 -0
- package/dist/cli/agent-knowledge.js +79 -0
- package/dist/cli/agent-knowledge.js.map +1 -0
- package/dist/cli/agent-lines.d.ts +5 -1
- package/dist/cli/agent-lines.d.ts.map +1 -1
- package/dist/cli/agent-lines.js +24 -3
- package/dist/cli/agent-lines.js.map +1 -1
- package/dist/cli/agent-processes.js +1 -1
- package/dist/cli/agent-processes.js.map +1 -1
- package/dist/cli/agent.d.ts +3 -0
- package/dist/cli/agent.d.ts.map +1 -1
- package/dist/cli/agent.js +15 -6
- package/dist/cli/agent.js.map +1 -1
- package/dist/cli/docs-attach.d.ts +23 -0
- package/dist/cli/docs-attach.d.ts.map +1 -0
- package/dist/cli/docs-attach.js +90 -0
- package/dist/cli/docs-attach.js.map +1 -0
- package/dist/cli/{knowledge.d.ts → docs.d.ts} +2 -4
- package/dist/cli/docs.d.ts.map +1 -0
- package/dist/cli/{knowledge.js → docs.js} +69 -36
- package/dist/cli/docs.js.map +1 -0
- package/dist/cli/groups.js +1 -1
- package/dist/cli/groups.js.map +1 -1
- package/dist/cli/home.d.ts +23 -18
- package/dist/cli/home.d.ts.map +1 -1
- package/dist/cli/home.js +21 -30
- package/dist/cli/home.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +9 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/lexicon.js +1 -1
- package/dist/cli/lexicon.js.map +1 -1
- package/dist/cli/load.d.ts +5 -5
- package/dist/cli/load.d.ts.map +1 -1
- package/dist/cli/load.js +19 -26
- package/dist/cli/load.js.map +1 -1
- package/dist/cli/memory-policy.js +1 -1
- package/dist/cli/memory-policy.js.map +1 -1
- package/dist/cli/memory.d.ts +0 -1
- package/dist/cli/memory.d.ts.map +1 -1
- package/dist/cli/memory.js +1 -4
- package/dist/cli/memory.js.map +1 -1
- package/dist/cli/pipeline.d.ts +3 -13
- package/dist/cli/pipeline.d.ts.map +1 -1
- package/dist/cli/pipeline.js +10 -16
- package/dist/cli/pipeline.js.map +1 -1
- package/dist/cli/remember.d.ts +2 -2
- package/dist/cli/remember.d.ts.map +1 -1
- package/dist/cli/remember.js +1 -1
- package/dist/cli/remember.js.map +1 -1
- package/dist/cli/start.d.ts.map +1 -1
- package/dist/cli/start.js +3 -6
- package/dist/cli/start.js.map +1 -1
- package/dist/cli/test.js +1 -1
- package/dist/cli/test.js.map +1 -1
- package/dist/cli/testing/goldens.d.ts.map +1 -1
- package/dist/cli/testing/goldens.js +7 -1
- package/dist/cli/testing/goldens.js.map +1 -1
- package/dist/cli/testing/models.d.ts +5 -0
- package/dist/cli/testing/models.d.ts.map +1 -0
- package/dist/cli/testing/models.js +18 -0
- package/dist/cli/testing/models.js.map +1 -0
- package/dist/cli/ui/console/assets/index-CD-PwWV5.css +1 -0
- package/dist/cli/ui/console/assets/{index-aGyMCQUH.js → index-D-Om2adY.js} +25 -14
- package/dist/cli/ui/console/index.html +2 -2
- package/dist/cli/ui/knowing.d.ts +3 -3
- package/dist/cli/ui/knowing.d.ts.map +1 -1
- package/dist/cli/ui/knowing.js +8 -12
- package/dist/cli/ui/knowing.js.map +1 -1
- package/dist/cli/ui/remembering.d.ts +1 -1
- package/dist/cli/ui/remembering.d.ts.map +1 -1
- package/dist/cli/ui/remembering.js +5 -5
- package/dist/cli/ui/remembering.js.map +1 -1
- package/dist/cli/ui/testing.d.ts +1 -1
- package/dist/cli/ui/testing.d.ts.map +1 -1
- package/dist/cli/ui/testing.js +1 -1
- package/dist/cli/ui/testing.js.map +1 -1
- package/dist/cli/world.d.ts +12 -6
- package/dist/cli/world.d.ts.map +1 -1
- package/dist/cli/world.js +14 -12
- package/dist/cli/world.js.map +1 -1
- package/dist/client/client.d.ts +13 -1
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +29 -0
- package/dist/client/client.js.map +1 -1
- package/dist/client/endpoints.d.ts +2 -0
- package/dist/client/endpoints.d.ts.map +1 -1
- package/dist/client/endpoints.js +5 -1
- package/dist/client/endpoints.js.map +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/testing/gateway.d.ts +16 -0
- package/dist/client/testing/gateway.d.ts.map +1 -1
- package/dist/client/testing/gateway.js +43 -9
- package/dist/client/testing/gateway.js.map +1 -1
- package/dist/client/testing/index.d.ts +1 -1
- package/dist/client/testing/index.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/runtime/connect.d.ts +8 -9
- package/dist/runtime/connect.d.ts.map +1 -1
- package/dist/runtime/connect.js +19 -122
- package/dist/runtime/connect.js.map +1 -1
- package/dist/runtime/environment.d.ts +7 -0
- package/dist/runtime/environment.d.ts.map +1 -0
- package/dist/runtime/environment.js +30 -0
- package/dist/runtime/environment.js.map +1 -0
- package/dist/views/layout.d.ts.map +1 -1
- package/dist/views/layout.js +4 -5
- package/dist/views/layout.js.map +1 -1
- package/package.json +2 -2
- package/dist/cli/knowledge.d.ts.map +0 -1
- package/dist/cli/knowledge.js.map +0 -1
- package/dist/cli/tuned.d.ts +0 -8
- package/dist/cli/tuned.d.ts.map +0 -1
- package/dist/cli/tuned.js +0 -66
- package/dist/cli/tuned.js.map +0 -1
- package/dist/cli/ui/console/assets/index-DmN15Axn.css +0 -1
- package/dist/runtime/grounding.d.ts +0 -15
- package/dist/runtime/grounding.d.ts.map +0 -1
- package/dist/runtime/grounding.js +0 -72
- package/dist/runtime/grounding.js.map +0 -1
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ npm i pinecall # or as a dependency, to write an agent in your own pro
|
|
|
50
50
|
|
|
51
51
|
You need a gateway for the CLI to talk to — `pip install pinecall` is that, and
|
|
52
52
|
[from-zero](https://github.com/pinecall/runtime/blob/main/docs/from-zero.md) walks both halves up
|
|
53
|
-
on a laptop in one sitting. To read this code or run the
|
|
53
|
+
on a laptop in one sitting. To read this code or run the example, clone instead:
|
|
54
54
|
|
|
55
55
|
## Five minutes
|
|
56
56
|
|
|
@@ -59,11 +59,13 @@ pnpm install nothing to build: the checkout runs from its
|
|
|
59
59
|
cd examples/clinica-norte
|
|
60
60
|
pnpm exec pinecall link sign in through a browser, pick the org: your key, in ./.env
|
|
61
61
|
pnpm exec pinecall chat the agent in this terminal, and a prompt against it
|
|
62
|
-
pnpm exec pinecall prompt --state test/prompts/states.json the exact prompt a state produces
|
|
62
|
+
pnpm exec pinecall prompt --state test/clinica-norte/prompts/states.json the exact prompt a state produces
|
|
63
63
|
pnpm exec pinecall start the app: the process you deploy
|
|
64
64
|
pnpm exec pinecall start --serve the same, and its console on http://localhost:4100
|
|
65
65
|
pnpm exec pinecall serve that console alone: your sandbox, on this machine
|
|
66
|
-
pnpm exec pinecall
|
|
66
|
+
pnpm exec pinecall docs push docs/clinica-norte/ to the gateway, as the base the agent searches
|
|
67
|
+
pnpm exec pinecall docs attach clinica-norte --k 4 the agent reads that base, in your corner
|
|
68
|
+
pnpm exec pinecall agent knowledge edit what it knows by heart, in $EDITOR, as a setting
|
|
67
69
|
pnpm exec pinecall test ring 1: the goldens, through the app in this process
|
|
68
70
|
```
|
|
69
71
|
|
|
@@ -76,11 +78,17 @@ Every verb reads `PINECALL_KEY` (and `PINECALL_URL`, when the gateway is not the
|
|
|
76
78
|
environment, else from the project's `.env`, which `pinecall link` wrote; each is the sandbox until
|
|
77
79
|
`--prod` says production, for a person whose org lets them act there. On a server the agent runs
|
|
78
80
|
on a server's token from the console's Tokens screen, as `pinecall start --prod` or mounted inside
|
|
79
|
-
your own Node app — [docs/production.md](docs/production.md).
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
your own Node app — [docs/production.md](docs/production.md). `pinecall agent list --prod` says
|
|
82
|
+
which process holds each agent, on which machine, since when, and `pinecall agent stop <app>` stops
|
|
83
|
+
one.
|
|
84
|
+
|
|
85
|
+
A tenant that installed `pinecall` from npm has it on the PATH and writes `pinecall start`. One
|
|
86
|
+
layout, one agent or five: the class in `agents/<name>/agent.tsx`, what it searches in
|
|
87
|
+
`docs/<name>/`, its goldens, personas and memory cases under `test/<name>/`, and one `pinecall
|
|
88
|
+
start` at the root holds them all — [docs/the-cli.md](docs/the-cli.md#the-project). The class is
|
|
89
|
+
the contract — doors, language, state, tools, `render()` — and what it runs on is the world's:
|
|
90
|
+
voice, model, opening, what it knows by heart and which base it searches are settings, per world
|
|
91
|
+
and versioned, never fields of the class.
|
|
84
92
|
|
|
85
93
|
Working on the framework itself:
|
|
86
94
|
|
|
@@ -114,7 +122,7 @@ Beside it:
|
|
|
114
122
|
|
|
115
123
|
| | |
|
|
116
124
|
|---|---|
|
|
117
|
-
| `examples/` | `clinica-norte
|
|
125
|
+
| `examples/` | `clinica-norte`: one tenant, written as a customer writes one |
|
|
118
126
|
| `test/` | mirrors `src/`, plus the three that pin the shape: the tree, the imports, the surface |
|
|
119
127
|
|
|
120
128
|
## The three doors out of this package
|
package/dist/agent/agent.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/** The Agent base class: its fields are the state, and every assignment is a change with an author. */
|
|
2
|
-
import type { DocsMode } from "@pinecall/protocol";
|
|
3
2
|
import { type ToolSpec } from "./tools.js";
|
|
4
3
|
import type { Child } from "../views/jsx-runtime.js";
|
|
5
4
|
import type { CallWorld } from "../call/call.js";
|
|
5
|
+
import type { Knowledge } from "./knowledge.js";
|
|
6
6
|
import type { EventDeclarations, EventMeta } from "./accepts.js";
|
|
7
7
|
import { type Visibility } from "./visibility.js";
|
|
8
8
|
import type { Call, MemoryOp } from "./lifecycle.js";
|
|
9
9
|
import { type LastCall, type Snapshot } from "./state.js";
|
|
10
|
-
export declare const CONFIG_FIELDS: readonly ["phone", "whatsapp", "web", "
|
|
10
|
+
export declare const CONFIG_FIELDS: readonly ["phone", "whatsapp", "web", "language"];
|
|
11
11
|
/** One field assignment, as the log and the console read it. */
|
|
12
12
|
export interface Change {
|
|
13
13
|
seq: number;
|
|
@@ -33,42 +33,6 @@ export interface EventHeard {
|
|
|
33
33
|
meta: EventMeta;
|
|
34
34
|
}
|
|
35
35
|
export type EventListener = (heard: EventHeard) => void;
|
|
36
|
-
/**
|
|
37
|
-
* What `docs` says: the knowledge base the agent answers from, by the name it was pushed under
|
|
38
|
-
* (`pinecall knowledge push --base <name>`), and how its chunks reach the model. The bare string
|
|
39
|
-
* form `docs = "clinica-norte"` is the base alone, with every other setting the runtime's.
|
|
40
|
-
*/
|
|
41
|
-
export interface DocsDeclaration {
|
|
42
|
-
base: string;
|
|
43
|
-
mode?: DocsMode;
|
|
44
|
-
k?: number;
|
|
45
|
-
minScore?: number;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* What `greeting` says: how the agent opens a call, before the caller has said anything. Exactly
|
|
49
|
-
* one of the two, because there are only two ways to open one — `say` are the words themselves,
|
|
50
|
-
* read out as written, and `reply` is what the model is told before it finds its own. The bare
|
|
51
|
-
* string form `greeting = "Clínica Norte, buenos días."` is the words. A class that declares
|
|
52
|
-
* nothing waits for the caller.
|
|
53
|
-
*/
|
|
54
|
-
export interface GreetingDeclaration {
|
|
55
|
-
say?: string;
|
|
56
|
-
reply?: string;
|
|
57
|
-
allowInterruptions?: boolean;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* What `hangup` says: that the model may end the call itself, and when, in your own words. A class
|
|
61
|
-
* that declares nothing cannot hang up — only the caller and a supervisor end a call. The tool is
|
|
62
|
-
* livekit's own `end_call`, and it is hidden while the agent is greeting.
|
|
63
|
-
*/
|
|
64
|
-
export interface HangupDeclaration {
|
|
65
|
-
when?: string;
|
|
66
|
-
}
|
|
67
|
-
/** What `memory` says: what to keep about a contact across calls, in the tenant's words, and what never to. */
|
|
68
|
-
export interface MemoryDeclaration {
|
|
69
|
-
remember?: string[];
|
|
70
|
-
forget?: string[];
|
|
71
|
-
}
|
|
72
36
|
/** Everything the framework knows about one live agent, kept off the instance's own fields. */
|
|
73
37
|
export interface Internals {
|
|
74
38
|
changes: Change[];
|
|
@@ -94,6 +58,13 @@ export declare class Agent {
|
|
|
94
58
|
constructor();
|
|
95
59
|
/** The class docstring, when the app prefers to say it out loud instead of in a JSDoc. */
|
|
96
60
|
static doc?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The knowledge bases this agent reads, searched from inside a tool: `await
|
|
63
|
+
* this.knowledge.search("horarios", { k: 3 })`. Which bases is the world's to say — attached to
|
|
64
|
+
* the agent in its settings, `pinecall docs attach` — and a world that attaches none refuses
|
|
65
|
+
* the class at registration. The gateway runs the search and logs what it found.
|
|
66
|
+
*/
|
|
67
|
+
get knowledge(): Knowledge;
|
|
97
68
|
/** The outside facts this class accepts, and from whom: `static events = {...}`. */
|
|
98
69
|
static events?: EventDeclarations;
|
|
99
70
|
/** Who may see a field, for a class that would rather write a map than a `@state`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent/agent.ts"],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AAED,iFAAiF;AACjF,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAEhE"}
|
package/dist/agent/agent.js
CHANGED
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
/** The Agent base class: its fields are the state, and every assignment is a change with an author. */
|
|
2
|
+
// tools.ts imports this module back; the cycle is fine because both sides only reach across at
|
|
3
|
+
// call time, and both exports are hoisted function declarations.
|
|
2
4
|
import { currentAuthor, UnauthoredWrite } from "./authors.js";
|
|
3
5
|
import { docOf, toolsOf, visibleToolsOf } from "./tools.js";
|
|
4
6
|
import { declaredStateOf } from "./visibility.js";
|
|
5
7
|
import { collapse, restore, snapshot } from "./state.js";
|
|
6
8
|
// The names an app uses to configure the agent rather than to remember something about the
|
|
7
|
-
// caller. They live on the instance like any other field, but they
|
|
8
|
-
// change during a call, they are not diffed, and no snapshot carries
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"web",
|
|
13
|
-
"voice",
|
|
14
|
-
"greeting",
|
|
15
|
-
"says",
|
|
16
|
-
"hears",
|
|
17
|
-
"llm",
|
|
18
|
-
"stt",
|
|
19
|
-
"language",
|
|
20
|
-
"knowledge",
|
|
21
|
-
"docs",
|
|
22
|
-
"memory",
|
|
23
|
-
"hangup",
|
|
24
|
-
];
|
|
9
|
+
// caller: its doors, and its language. They live on the instance like any other field, but they
|
|
10
|
+
// are never state: they do not change during a call, they are not diffed, and no snapshot carries
|
|
11
|
+
// them. Everything else the class used to configure — a voice, the models, an opening, what it
|
|
12
|
+
// remembers, what it reads — is the world's (runtime/environment.ts), and refused at load.
|
|
13
|
+
export const CONFIG_FIELDS = ["phone", "whatsapp", "web", "language"];
|
|
25
14
|
// The list is the array; the Set is how this module asks about it on every assignment. state.ts
|
|
26
15
|
// derives `ConfigName` from the same array, so a name added here is a name the snapshot drops.
|
|
27
16
|
const CONFIG = new Set(CONFIG_FIELDS);
|
|
@@ -80,6 +69,16 @@ export class Agent {
|
|
|
80
69
|
}
|
|
81
70
|
/** The class docstring, when the app prefers to say it out loud instead of in a JSDoc. */
|
|
82
71
|
static doc;
|
|
72
|
+
/**
|
|
73
|
+
* The knowledge bases this agent reads, searched from inside a tool: `await
|
|
74
|
+
* this.knowledge.search("horarios", { k: 3 })`. Which bases is the world's to say — attached to
|
|
75
|
+
* the agent in its settings, `pinecall docs attach` — and a world that attaches none refuses
|
|
76
|
+
* the class at registration. The gateway runs the search and logs what it found.
|
|
77
|
+
*/
|
|
78
|
+
get knowledge() {
|
|
79
|
+
// Async, so an instance nobody is serving refuses through the promise and not by throwing.
|
|
80
|
+
return { search: async (query, options) => await this.call.search(query, options) };
|
|
81
|
+
}
|
|
83
82
|
/** The outside facts this class accepts, and from whom: `static events = {...}`. */
|
|
84
83
|
static events;
|
|
85
84
|
/** Who may see a field, for a class that would rather write a map than a `@state`. */
|
package/dist/agent/agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/agent/agent.ts"],"names":[],"mappings":"AAAA,uGAAuG;
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/agent/agent.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAEvG,+FAA+F;AAC/F,iEAAiE;AACjE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAiB,MAAM,YAAY,CAAC;AAK3E,OAAO,EAAE,eAAe,EAAmB,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAgC,MAAM,YAAY,CAAC;AAEvF,2FAA2F;AAC3F,gGAAgG;AAChG,kGAAkG;AAClG,+FAA+F;AAC/F,2FAA2F;AAC3F,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,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,CAAC,WAAW,EAAE,CAAC;QACxC,IAAI,KAAK,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,KAAiB;IACxD,KAAK,MAAM,QAAQ,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,cAAc;QAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** What a class reaches its bases through: `this.knowledge.search`, one verb the gateway answers for the call in hand. */
|
|
2
|
+
import type { Found } from "../call/call.js";
|
|
3
|
+
/** The search: the best chunks of the bases the world attached, for these words, `k` of them. */
|
|
4
|
+
export interface Knowledge {
|
|
5
|
+
search(query: string, options?: {
|
|
6
|
+
k?: number;
|
|
7
|
+
}): Promise<Found[]>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=knowledge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../../src/agent/knowledge.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAE1H,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7C,iGAAiG;AACjG,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;CACnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge.js","sourceRoot":"","sources":["../../src/agent/knowledge.ts"],"names":[],"mappings":"AAAA,0HAA0H"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Whether a class searches the knowledge base itself: its source, read by oxc's parser for `this.knowledge`. */
|
|
2
|
+
/**
|
|
3
|
+
* Whether this source reaches `this.knowledge`. The gateway is told so at registration
|
|
4
|
+
* (`uses_knowledge`), and refuses a world that attaches the class no base — at boot, not in a call
|
|
5
|
+
* where the search would find nothing.
|
|
6
|
+
*/
|
|
7
|
+
export declare function searchesKnowledge(source: string, file?: string): boolean;
|
|
8
|
+
//# sourceMappingURL=searching.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searching.d.ts","sourceRoot":"","sources":["../../src/agent/searching.ts"],"names":[],"mappings":"AAAA,iHAAiH;AAgBjH;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,SAAc,GAAG,OAAO,CAG7E"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Whether a class searches the knowledge base itself: its source, read by oxc's parser for `this.knowledge`. */
|
|
2
|
+
import { parseSync } from "oxc-parser";
|
|
3
|
+
// Why the parser and not a regex: `this.knowledge` inside a string, a comment or a template is not
|
|
4
|
+
// a search, and a regex cannot tell. The AST can. What is looked for is one shape — a member
|
|
5
|
+
// expression whose object is `this` and whose property is the word — anywhere in the file, so a
|
|
6
|
+
// helper method that searches on the class's behalf counts as much as a tool that does.
|
|
7
|
+
const THE_WORD = "knowledge";
|
|
8
|
+
/**
|
|
9
|
+
* Whether this source reaches `this.knowledge`. The gateway is told so at registration
|
|
10
|
+
* (`uses_knowledge`), and refuses a world that attaches the class no base — at boot, not in a call
|
|
11
|
+
* where the search would find nothing.
|
|
12
|
+
*/
|
|
13
|
+
export function searchesKnowledge(source, file = "agent.tsx") {
|
|
14
|
+
const parsed = parseSync(file, source, { sourceType: "module" });
|
|
15
|
+
return reaches(parsed.program);
|
|
16
|
+
}
|
|
17
|
+
function reaches(node) {
|
|
18
|
+
if (node.type === "MemberExpression") {
|
|
19
|
+
const object = node["object"];
|
|
20
|
+
const property = node["property"];
|
|
21
|
+
if (object.type === "ThisExpression" && property.type === "Identifier" && property["name"] === THE_WORD)
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
for (const child of Object.values(node)) {
|
|
25
|
+
if (Array.isArray(child)) {
|
|
26
|
+
if (child.some((one) => isNode(one) && reaches(one)))
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
else if (isNode(child) && reaches(child)) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
function isNode(value) {
|
|
36
|
+
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=searching.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searching.js","sourceRoot":"","sources":["../../src/agent/searching.ts"],"names":[],"mappings":"AAAA,iHAAiH;AAEjH,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,mGAAmG;AACnG,6FAA6F;AAC7F,gGAAgG;AAChG,wFAAwF;AACxF,MAAM,QAAQ,GAAG,WAAW,CAAC;AAQ7B;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,IAAI,GAAG,WAAW;IAClE,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC;IACjE,OAAO,OAAO,CAAC,MAAM,CAAC,OAA0B,CAAC,CAAC;AACpD,CAAC;AAED,SAAS,OAAO,CAAC,IAAU;IACzB,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QACrC,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAS,CAAC;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAS,CAAC;QAC1C,IAAI,MAAM,CAAC,IAAI,KAAK,gBAAgB,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,IAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;IACvH,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;gBAAE,OAAO,IAAI,CAAC;QACpE,CAAC;aAAM,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3C,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,MAAM,CAAC,KAAc;IAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,OAAQ,KAAc,CAAC,IAAI,KAAK,QAAQ,CAAC;AACjG,CAAC"}
|
package/dist/call/call.d.ts
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
import type { Call as HookCall } from "../agent/lifecycle.js";
|
|
3
3
|
import { History } from "./history.js";
|
|
4
4
|
import { ParticipantHandle, Room, type Commander } from "./room.js";
|
|
5
|
+
/** One chunk a search found, as the model reads it: where it came from, and its text. */
|
|
6
|
+
export interface Found {
|
|
7
|
+
path: string;
|
|
8
|
+
heading: string | null;
|
|
9
|
+
text: string;
|
|
10
|
+
}
|
|
11
|
+
/** What runs a search for this call: the gateway, through the client that holds the call. */
|
|
12
|
+
export type Searching = (query: string, k?: number) => Promise<Found[]>;
|
|
13
|
+
/** A search asked of a call nobody is serving through a gateway: a prompt printed offline, a test. */
|
|
14
|
+
export declare const NO_GATEWAY_TO_SEARCH = "this call cannot search: no gateway is serving it";
|
|
5
15
|
/** What the call world needs to know about the line, beyond what the room's entries tell it. */
|
|
6
16
|
export interface CallLine extends HookCall {
|
|
7
17
|
today?: string;
|
|
@@ -14,6 +24,7 @@ export interface CallLine extends HookCall {
|
|
|
14
24
|
export declare class CallWorld implements HookCall {
|
|
15
25
|
#private;
|
|
16
26
|
private readonly out;
|
|
27
|
+
private readonly searching;
|
|
17
28
|
private readonly ackMs;
|
|
18
29
|
readonly id: string;
|
|
19
30
|
readonly contact: string;
|
|
@@ -28,7 +39,7 @@ export declare class CallWorld implements HookCall {
|
|
|
28
39
|
name: string;
|
|
29
40
|
seq: number;
|
|
30
41
|
} | null;
|
|
31
|
-
constructor(line: CallLine, out: Commander, ackMs?: number);
|
|
42
|
+
constructor(line: CallLine, out: Commander, searching?: Searching | null, ackMs?: number);
|
|
32
43
|
/** The next outside fact's place in this call's own stream of them; the wire's seq is not on it. */
|
|
33
44
|
numbered(): number;
|
|
34
45
|
/** One participant, and what may be done to them: `call.participant(id).mute()`. */
|
|
@@ -45,6 +56,14 @@ export declare class CallWorld implements HookCall {
|
|
|
45
56
|
reply(instructions: string, options?: {
|
|
46
57
|
allowInterruptions?: boolean;
|
|
47
58
|
}): Promise<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* The best chunks of the bases this agent reads, for these words. The gateway searches — the
|
|
61
|
+
* bases are the world's, attached to the agent in its settings — and writes what it found on
|
|
62
|
+
* the call's log, so the grounded judge weighs it. `k` is how many; each base's own when unsaid.
|
|
63
|
+
*/
|
|
64
|
+
search(query: string, options?: {
|
|
65
|
+
k?: number;
|
|
66
|
+
}): Promise<Found[]>;
|
|
48
67
|
/** Invite somebody into the room: the room's own verb, reachable from the call for symmetry. */
|
|
49
68
|
invite(to: string, options: {
|
|
50
69
|
kind: "sip" | "participant";
|
package/dist/call/call.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../src/call/call.ts"],"names":[],"mappings":"AAAA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C,OAAO,CAAC,CAG5F;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,CAAC,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAGpE;IAED,gGAAgG;IAChG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,IAAI,EAAE,KAAK,GAAG,aAAa,CAAA;KAAE,GAAG,IAAI,CAEjE;IAED,iGAAiG;IACjG,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAuBlE;CAmBF"}
|
package/dist/call/call.js
CHANGED
|
@@ -3,6 +3,8 @@ import { History } from "./history.js";
|
|
|
3
3
|
import { ParticipantHandle, Room } from "./room.js";
|
|
4
4
|
/** How long a say or a reply waits for the turn it lands as before it gives up saying so. */
|
|
5
5
|
const ACK_MS = 30_000;
|
|
6
|
+
/** A search asked of a call nobody is serving through a gateway: a prompt printed offline, a test. */
|
|
7
|
+
export const NO_GATEWAY_TO_SEARCH = "this call cannot search: no gateway is serving it";
|
|
6
8
|
/**
|
|
7
9
|
* One live call, as the class holds it. Everything on it was reduced from entries the runtime
|
|
8
10
|
* already receives, and every verb is one command on the wire — there is no LiveKit here and no
|
|
@@ -10,6 +12,7 @@ const ACK_MS = 30_000;
|
|
|
10
12
|
*/
|
|
11
13
|
export class CallWorld {
|
|
12
14
|
out;
|
|
15
|
+
searching;
|
|
13
16
|
ackMs;
|
|
14
17
|
id;
|
|
15
18
|
contact;
|
|
@@ -26,8 +29,9 @@ export class CallWorld {
|
|
|
26
29
|
/** The event being dispatched right now, so a write inside onEvent can name its cause. */
|
|
27
30
|
cause = null;
|
|
28
31
|
#events = 0;
|
|
29
|
-
constructor(line, out, ackMs = ACK_MS) {
|
|
32
|
+
constructor(line, out, searching = null, ackMs = ACK_MS) {
|
|
30
33
|
this.out = out;
|
|
34
|
+
this.searching = searching;
|
|
31
35
|
this.ackMs = ackMs;
|
|
32
36
|
this.id = line.id;
|
|
33
37
|
this.contact = line.contact;
|
|
@@ -61,6 +65,16 @@ export class CallWorld {
|
|
|
61
65
|
this.out("agent.reply", { instructions, ...options });
|
|
62
66
|
return this.#spoken();
|
|
63
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* The best chunks of the bases this agent reads, for these words. The gateway searches — the
|
|
70
|
+
* bases are the world's, attached to the agent in its settings — and writes what it found on
|
|
71
|
+
* the call's log, so the grounded judge weighs it. `k` is how many; each base's own when unsaid.
|
|
72
|
+
*/
|
|
73
|
+
search(query, options = {}) {
|
|
74
|
+
if (this.searching === null)
|
|
75
|
+
return Promise.reject(new Error(NO_GATEWAY_TO_SEARCH));
|
|
76
|
+
return this.searching(query, options.k);
|
|
77
|
+
}
|
|
64
78
|
/** Invite somebody into the room: the room's own verb, reachable from the call for symmetry. */
|
|
65
79
|
invite(to, options) {
|
|
66
80
|
this.room.invite(to, options);
|
package/dist/call/call.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../src/call/call.ts"],"names":[],"mappings":"AAAA,qGAAqG;AAGrG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAwC,MAAM,WAAW,CAAC;AAE1F,6FAA6F;AAC7F,MAAM,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../src/call/call.ts"],"names":[],"mappings":"AAAA,qGAAqG;AAGrG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAwC,MAAM,WAAW,CAAC;AAE1F,6FAA6F;AAC7F,MAAM,MAAM,GAAG,MAAM,CAAC;AAYtB,sGAAsG;AACtG,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AU,CAAC,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;gBACpL,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC5B;gBACE,OAAO;QACX,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO,IAAI,OAAO,CAAU,CAAC,OAAO,EAAE,EAAE;YACtC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC7B,4FAA4F;YAC5F,4FAA4F;YAC5F,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;gBACzE,OAAO,CAAC,KAAK,CAAC,CAAC;YACjB,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,CAAC,MAAe;QACrB,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,KAAK,MAAM,OAAO,IAAI,OAAO;YAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** `pinecall agent knowledge [edit]`: what the agent knows by heart, printed, or opened in $EDITOR and kept as the next version. */
|
|
2
|
+
import type { TuningRow } from "@pinecall/protocol";
|
|
3
|
+
import { type Door } from "./testing/gateway.js";
|
|
4
|
+
/** What opens the text for a person and hands back what they left: $EDITOR, or a test's answer. */
|
|
5
|
+
export type Editor = (text: string) => Promise<string>;
|
|
6
|
+
/** Flags the two verbs read off `pinecall agent`'s own table. */
|
|
7
|
+
interface Flags {
|
|
8
|
+
team?: boolean | undefined;
|
|
9
|
+
note?: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const NOTHING_KNOWN: (agent: string, corner: string) => string;
|
|
12
|
+
export declare const NO_EDITOR = "no editor: set $EDITOR (or $VISUAL) to the one that opens Markdown for you";
|
|
13
|
+
export declare const UNCHANGED = "nothing changed: no version written";
|
|
14
|
+
/** The corner's text printed, or opened in the editor and kept. */
|
|
15
|
+
export declare function knowledgeRun(door: Door, agent: string, verb: string | undefined, flags: Flags, out: NodeJS.WritableStream, err: NodeJS.WritableStream, editor?: Editor): Promise<number>;
|
|
16
|
+
/** Whether a corner's row sets the text: the page that draws a row asks. */
|
|
17
|
+
export declare function knows(row: TuningRow | null): boolean;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=agent-knowledge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-knowledge.d.ts","sourceRoot":"","sources":["../../src/cli/agent-knowledge.ts"],"names":[],"mappings":"AAAA,oIAAoI;AAOpI,OAAO,KAAK,EAA4B,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG9E,OAAO,EAAS,KAAK,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAExD,mGAAmG;AACnG,MAAM,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAEvD,iEAAiE;AACjE,UAAU,KAAK;IACb,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,aAAa,UAAW,MAAM,UAAU,MAAM,KAAG,MAC+B,CAAC;AAC9F,eAAO,MAAM,SAAS,+EAA+E,CAAC;AACtG,eAAO,MAAM,SAAS,wCAAwC,CAAC;AAE/D,mEAAmE;AACnE,wBAAsB,YAAY,CAChC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,MAAM,CAAC,cAAc,EAC1B,GAAG,EAAE,MAAM,CAAC,cAAc,EAC1B,MAAM,GAAE,MAAoB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAgCjB;AAUD,4EAA4E;AAC5E,wBAAgB,KAAK,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,GAAG,OAAO,CAEpD"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/** `pinecall agent knowledge [edit]`: what the agent knows by heart, printed, or opened in $EDITOR and kept as the next version. */
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { tmpdir } from "node:os";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { readSettings, settingsPath, theCornerCalled, theCornerWritten } from "./agent-lines.js";
|
|
7
|
+
import { asked } from "./testing/gateway.js";
|
|
8
|
+
export const NOTHING_KNOWN = (agent, corner) => `${agent} knows nothing by heart in ${corner}: \`pinecall agent knowledge edit\` writes it`;
|
|
9
|
+
export const NO_EDITOR = "no editor: set $EDITOR (or $VISUAL) to the one that opens Markdown for you";
|
|
10
|
+
export const UNCHANGED = "nothing changed: no version written";
|
|
11
|
+
/** The corner's text printed, or opened in the editor and kept. */
|
|
12
|
+
export async function knowledgeRun(door, agent, verb, flags, out, err, editor = inTheEditor) {
|
|
13
|
+
const team = flags.team === true;
|
|
14
|
+
const standing = await readSettings(door, agent);
|
|
15
|
+
const row = team ? standing.team : (standing.yours ?? standing.team);
|
|
16
|
+
const corner = theCornerCalled(standing, team);
|
|
17
|
+
const text = row?.config.knowledge ?? undefined;
|
|
18
|
+
if (verb === undefined) {
|
|
19
|
+
if (text === undefined) {
|
|
20
|
+
out.write(`${NOTHING_KNOWN(agent, corner)}\n`);
|
|
21
|
+
return 0;
|
|
22
|
+
}
|
|
23
|
+
out.write(text.endsWith("\n") ? text : `${text}\n`);
|
|
24
|
+
return 0;
|
|
25
|
+
}
|
|
26
|
+
if (verb !== "edit") {
|
|
27
|
+
err.write("usage: pinecall agent knowledge [edit] [--team] [--note '…']\n");
|
|
28
|
+
return 2;
|
|
29
|
+
}
|
|
30
|
+
const written = await editor(text ?? "");
|
|
31
|
+
if (written === (text ?? "")) {
|
|
32
|
+
out.write(`${UNCHANGED}\n`);
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
const own = theCornerWritten(standing, team);
|
|
36
|
+
const config = kept(own?.config ?? {}, written);
|
|
37
|
+
const answer = await asked(door, settingsPath(agent), {
|
|
38
|
+
method: "PUT",
|
|
39
|
+
body: { config, if_version: own?.version ?? null, note: flags.note ?? "knowledge", team },
|
|
40
|
+
});
|
|
41
|
+
const now = theCornerWritten(answer, team);
|
|
42
|
+
out.write(`${agent} · knowledge ${written.trim() === "" ? "taken out" : `${written.length.toLocaleString("en-US")} chars`} · ${corner} v${now?.version ?? "?"}\n`);
|
|
43
|
+
return 0;
|
|
44
|
+
}
|
|
45
|
+
// The whole set travels, as every settings write does: the corner's row with one field changed.
|
|
46
|
+
// An empty file takes the field out — there is no blank value, the door refuses one — so what
|
|
47
|
+
// the runtime's default is stands for it again.
|
|
48
|
+
function kept(config, written) {
|
|
49
|
+
const { knowledge: _was, ...rest } = config;
|
|
50
|
+
return written.trim() === "" ? rest : { ...rest, knowledge: written };
|
|
51
|
+
}
|
|
52
|
+
/** Whether a corner's row sets the text: the page that draws a row asks. */
|
|
53
|
+
export function knows(row) {
|
|
54
|
+
return row !== null && typeof row.config.knowledge === "string";
|
|
55
|
+
}
|
|
56
|
+
// The one way a person writes a page of Markdown from a terminal that is not typing it into a
|
|
57
|
+
// flag: their own editor, on a file, the way `git commit` and `crontab -e` do it. The file lives
|
|
58
|
+
// a moment in a temp directory of its own and is gone before this returns.
|
|
59
|
+
async function inTheEditor(text) {
|
|
60
|
+
const editor = process.env["VISUAL"] ?? process.env["EDITOR"];
|
|
61
|
+
if (editor === undefined || editor === "")
|
|
62
|
+
throw new Error(NO_EDITOR);
|
|
63
|
+
const folder = mkdtempSync(join(tmpdir(), "pinecall-knowledge-"));
|
|
64
|
+
const file = join(folder, "knowledge.md");
|
|
65
|
+
try {
|
|
66
|
+
writeFileSync(file, text);
|
|
67
|
+
// One command line, not a command and an argument: `$EDITOR` is a LINE a person wrote — `code
|
|
68
|
+
// -w`, `emacsclient -nw` — and a shell is what reads it. The path is quoted here because the
|
|
69
|
+
// shell would otherwise split a temp directory with a space in it.
|
|
70
|
+
const opened = spawnSync(`${editor} '${file.replaceAll("'", "'\\''")}'`, { stdio: "inherit", shell: true });
|
|
71
|
+
if (opened.status !== 0)
|
|
72
|
+
throw new Error(`${editor} exited with ${opened.status}: nothing written`);
|
|
73
|
+
return readFileSync(file, "utf8");
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
rmSync(folder, { recursive: true, force: true });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=agent-knowledge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-knowledge.js","sourceRoot":"","sources":["../../src/cli/agent-knowledge.ts"],"names":[],"mappings":"AAAA,oIAAoI;AAEpI,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACjG,OAAO,EAAE,KAAK,EAAa,MAAM,sBAAsB,CAAC;AAWxD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,MAAc,EAAU,EAAE,CACrE,GAAG,KA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AC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;AACH,CAAC"}
|
|
@@ -5,8 +5,12 @@ import { type Door } from "./testing/gateway.js";
|
|
|
5
5
|
export declare function settingsPath(agent: string): string;
|
|
6
6
|
/** The three corners as this key sees them: its own, the team's, production's. */
|
|
7
7
|
export declare function readSettings(door: Door, agent: string): Promise<TuningAnswer>;
|
|
8
|
+
/** The row a write lands on: the team's when asked for it or when this key has no corner. */
|
|
9
|
+
export declare function theCornerWritten(standing: TuningAnswer, team: boolean): TuningRow | null;
|
|
10
|
+
/** What to call the corner a write lands on, so the line a person reads is the corner written. */
|
|
11
|
+
export declare function theCornerCalled(standing: TuningAnswer, team: boolean): string;
|
|
8
12
|
/** The fields on the page, in the order a person reads them, under the names a person types. */
|
|
9
|
-
export declare const FIELDS: readonly ["voice", "tts", "tts-model", "stt", "llm", "greeting", "hangup", "turn", "memory", "knowledge"];
|
|
13
|
+
export declare const FIELDS: readonly ["voice", "tts", "tts-model", "stt", "llm", "greeting", "hangup", "turn", "memory", "knowledge", "bases"];
|
|
10
14
|
export type Field = (typeof FIELDS)[number];
|
|
11
15
|
/** The name a person types, as the wire spells it. */
|
|
12
16
|
export declare const WIRE: Record<Field, keyof TuningBody>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-lines.d.ts","sourceRoot":"","sources":["../../src/cli/agent-lines.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG9E,OAAO,EAAS,KAAK,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAExD,qFAAqF;AACrF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,kFAAkF;AAClF,wBAAsB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EA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