pinecall 0.4.0 → 0.6.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 +14 -6
- package/dist/cli/agent-files.d.ts +6 -0
- package/dist/cli/agent-files.d.ts.map +1 -0
- package/dist/cli/agent-files.js +40 -0
- package/dist/cli/agent-files.js.map +1 -0
- package/dist/cli/agent-lines.d.ts +23 -0
- package/dist/cli/agent-lines.d.ts.map +1 -0
- package/dist/cli/agent-lines.js +109 -0
- package/dist/cli/agent-lines.js.map +1 -0
- package/dist/cli/agent-processes.d.ts +13 -0
- package/dist/cli/agent-processes.d.ts.map +1 -0
- package/dist/cli/agent-processes.js +34 -0
- package/dist/cli/agent-processes.js.map +1 -0
- package/dist/cli/agent-versions.d.ts +12 -0
- package/dist/cli/agent-versions.d.ts.map +1 -0
- package/dist/cli/agent-versions.js +70 -0
- package/dist/cli/agent-versions.js.map +1 -0
- package/dist/cli/agent.d.ts +77 -0
- package/dist/cli/agent.d.ts.map +1 -0
- package/dist/cli/agent.js +186 -0
- package/dist/cli/agent.js.map +1 -0
- package/dist/cli/chat.d.ts +2 -2
- package/dist/cli/chat.d.ts.map +1 -1
- package/dist/cli/chat.js +12 -24
- package/dist/cli/chat.js.map +1 -1
- package/dist/cli/client-for.d.ts +6 -0
- package/dist/cli/client-for.d.ts.map +1 -0
- package/dist/cli/client-for.js +7 -0
- package/dist/cli/client-for.js.map +1 -0
- package/dist/cli/connected.d.ts +4 -4
- package/dist/cli/connected.d.ts.map +1 -1
- package/dist/cli/connected.js +2 -2
- package/dist/cli/connected.js.map +1 -1
- package/dist/cli/dotenv.d.ts +24 -0
- package/dist/cli/dotenv.d.ts.map +1 -0
- package/dist/cli/dotenv.js +69 -0
- package/dist/cli/dotenv.js.map +1 -0
- package/dist/cli/env.d.ts +21 -37
- package/dist/cli/env.d.ts.map +1 -1
- package/dist/cli/env.js +35 -68
- package/dist/cli/env.js.map +1 -1
- package/dist/cli/eval.d.ts +2 -1
- package/dist/cli/eval.d.ts.map +1 -1
- package/dist/cli/eval.js +5 -4
- package/dist/cli/eval.js.map +1 -1
- package/dist/cli/groups.d.ts.map +1 -1
- package/dist/cli/groups.js +0 -1
- package/dist/cli/groups.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +25 -30
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/lexicon.d.ts +14 -0
- package/dist/cli/lexicon.d.ts.map +1 -0
- package/dist/cli/lexicon.js +123 -0
- package/dist/cli/lexicon.js.map +1 -0
- package/dist/cli/line.js +6 -6
- package/dist/cli/line.js.map +1 -1
- package/dist/cli/linking.d.ts +13 -0
- package/dist/cli/linking.d.ts.map +1 -0
- package/dist/cli/linking.js +103 -0
- package/dist/cli/linking.js.map +1 -0
- package/dist/cli/load.js +1 -1
- package/dist/cli/load.js.map +1 -1
- package/dist/cli/login.d.ts +5 -11
- package/dist/cli/login.d.ts.map +1 -1
- package/dist/cli/login.js +31 -140
- package/dist/cli/login.js.map +1 -1
- package/dist/cli/memory-policy.d.ts +9 -0
- package/dist/cli/memory-policy.d.ts.map +1 -0
- package/dist/cli/memory-policy.js +79 -0
- package/dist/cli/memory-policy.js.map +1 -0
- package/dist/cli/memory.d.ts.map +1 -1
- package/dist/cli/memory.js +9 -1
- package/dist/cli/memory.js.map +1 -1
- package/dist/cli/pipeline.d.ts +2 -0
- package/dist/cli/pipeline.d.ts.map +1 -1
- package/dist/cli/pipeline.js +18 -76
- package/dist/cli/pipeline.js.map +1 -1
- package/dist/cli/serve/server.d.ts +1 -1
- package/dist/cli/serve/server.d.ts.map +1 -1
- package/dist/cli/serve/server.js +3 -2
- package/dist/cli/serve/server.js.map +1 -1
- package/dist/cli/serve/sidecar.js +1 -1
- package/dist/cli/serve/sidecar.js.map +1 -1
- package/dist/cli/serve.d.ts +1 -1
- package/dist/cli/serve.d.ts.map +1 -1
- package/dist/cli/serve.js +5 -5
- package/dist/cli/serve.js.map +1 -1
- package/dist/cli/signed-in.d.ts +36 -0
- package/dist/cli/signed-in.d.ts.map +1 -0
- package/dist/cli/signed-in.js +60 -0
- package/dist/cli/signed-in.js.map +1 -0
- package/dist/cli/simulate.d.ts.map +1 -1
- package/dist/cli/simulate.js +7 -6
- package/dist/cli/simulate.js.map +1 -1
- package/dist/cli/{run-console.d.ts → start-console.d.ts} +2 -2
- package/dist/cli/start-console.d.ts.map +1 -0
- package/dist/cli/{run-console.js → start-console.js} +3 -3
- package/dist/cli/start-console.js.map +1 -0
- package/dist/cli/{run-screens.d.ts → start-screens.d.ts} +2 -2
- package/dist/cli/start-screens.d.ts.map +1 -0
- package/dist/cli/{run-screens.js → start-screens.js} +24 -5
- package/dist/cli/start-screens.js.map +1 -0
- package/dist/cli/{run.d.ts → start.d.ts} +3 -3
- package/dist/cli/start.d.ts.map +1 -0
- package/dist/cli/{run.js → start.js} +31 -35
- package/dist/cli/start.js.map +1 -0
- package/dist/cli/supervise.d.ts +1 -1
- package/dist/cli/supervise.d.ts.map +1 -1
- package/dist/cli/supervise.js +1 -1
- package/dist/cli/supervise.js.map +1 -1
- package/dist/cli/testing/gateway.d.ts +3 -0
- package/dist/cli/testing/gateway.d.ts.map +1 -1
- package/dist/cli/testing/gateway.js +2 -4
- package/dist/cli/testing/gateway.js.map +1 -1
- package/dist/cli/tuned.d.ts +8 -0
- package/dist/cli/tuned.d.ts.map +1 -0
- package/dist/cli/tuned.js +66 -0
- package/dist/cli/tuned.js.map +1 -0
- package/dist/cli/ui/chatting.d.ts +1 -1
- package/dist/cli/ui/chatting.d.ts.map +1 -1
- package/dist/cli/ui/chatting.js +11 -10
- package/dist/cli/ui/chatting.js.map +1 -1
- package/dist/cli/ui/console/assets/index-DmN15Axn.css +1 -0
- package/dist/cli/ui/console/assets/index-aGyMCQUH.js +106 -0
- package/dist/cli/ui/console/index.html +2 -2
- package/dist/cli/ui/doors.d.ts +2 -2
- package/dist/cli/ui/doors.d.ts.map +1 -1
- package/dist/cli/ui/doors.js +2 -2
- package/dist/cli/ui/doors.js.map +1 -1
- package/dist/cli/ui/drifting.d.ts +1 -1
- package/dist/cli/ui/drifting.js +1 -1
- package/dist/cli/ui/knowing.d.ts +1 -1
- package/dist/cli/ui/knowing.js +3 -3
- package/dist/cli/ui/knowing.js.map +1 -1
- package/dist/cli/ui/promoting.d.ts +1 -1
- package/dist/cli/ui/promoting.js +1 -1
- package/dist/cli/ui/remembering.d.ts +1 -1
- package/dist/cli/ui/remembering.js +3 -3
- package/dist/cli/ui/remembering.js.map +1 -1
- package/dist/cli/ui/reproducing.d.ts +1 -1
- package/dist/cli/ui/reproducing.js +1 -1
- package/dist/cli/ui/simulating.d.ts +1 -1
- package/dist/cli/ui/simulating.js +4 -4
- package/dist/cli/ui/simulating.js.map +1 -1
- package/dist/cli/ui/testing.d.ts +1 -1
- package/dist/cli/ui/testing.js +3 -3
- package/dist/cli/ui/testing.js.map +1 -1
- package/dist/cli/whoami.d.ts +6 -2
- package/dist/cli/whoami.d.ts.map +1 -1
- package/dist/cli/whoami.js +6 -5
- package/dist/cli/whoami.js.map +1 -1
- package/dist/cli/world.d.ts +14 -24
- package/dist/cli/world.d.ts.map +1 -1
- package/dist/cli/world.js +21 -36
- package/dist/cli/world.js.map +1 -1
- package/dist/client/agent.d.ts +2 -1
- package/dist/client/agent.d.ts.map +1 -1
- package/dist/client/agent.js +3 -2
- package/dist/client/agent.js.map +1 -1
- package/dist/client/client.d.ts +17 -2
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +44 -2
- package/dist/client/client.js.map +1 -1
- package/dist/client/connection.d.ts +3 -0
- package/dist/client/connection.d.ts.map +1 -1
- package/dist/client/connection.js +2 -1
- package/dist/client/connection.js.map +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/observe.d.ts +3 -0
- package/dist/client/observe.d.ts.map +1 -1
- package/dist/client/observe.js +2 -1
- package/dist/client/observe.js.map +1 -1
- package/dist/client/signed.d.ts +15 -0
- package/dist/client/signed.d.ts.map +1 -0
- package/dist/client/signed.js +19 -0
- package/dist/client/signed.js.map +1 -0
- package/dist/client/testing/gateway.d.ts +5 -0
- package/dist/client/testing/gateway.d.ts.map +1 -1
- package/dist/client/testing/gateway.js +10 -0
- package/dist/client/testing/gateway.js.map +1 -1
- package/dist/views/render.d.ts +1 -1
- package/dist/views/render.js +1 -1
- package/package.json +2 -2
- package/dist/cli/config.d.ts +0 -16
- package/dist/cli/config.d.ts.map +0 -1
- package/dist/cli/config.js +0 -125
- package/dist/cli/config.js.map +0 -1
- package/dist/cli/credentials.d.ts +0 -41
- package/dist/cli/credentials.d.ts.map +0 -1
- package/dist/cli/credentials.js +0 -98
- package/dist/cli/credentials.js.map +0 -1
- package/dist/cli/gateway.d.ts +0 -12
- package/dist/cli/gateway.d.ts.map +0 -1
- package/dist/cli/gateway.js +0 -67
- package/dist/cli/gateway.js.map +0 -1
- package/dist/cli/keys.d.ts +0 -28
- package/dist/cli/keys.d.ts.map +0 -1
- package/dist/cli/keys.js +0 -137
- package/dist/cli/keys.js.map +0 -1
- package/dist/cli/profiles.d.ts +0 -122
- package/dist/cli/profiles.d.ts.map +0 -1
- package/dist/cli/profiles.js +0 -312
- package/dist/cli/profiles.js.map +0 -1
- package/dist/cli/run-console.d.ts.map +0 -1
- package/dist/cli/run-console.js.map +0 -1
- package/dist/cli/run-screens.d.ts.map +0 -1
- package/dist/cli/run-screens.js.map +0 -1
- package/dist/cli/run.d.ts.map +0 -1
- package/dist/cli/run.js.map +0 -1
- package/dist/cli/ui/console/assets/index-DhcpHPdk.js +0 -102
- package/dist/cli/ui/console/assets/index-iylvEP0_.css +0 -1
package/dist/cli/env.d.ts
CHANGED
|
@@ -1,56 +1,40 @@
|
|
|
1
1
|
/** Where the CLI is pointed and what opens the door: the one place that decides both, for every verb. */
|
|
2
|
-
import
|
|
3
|
-
/** Pinecall's own cloud: where every verb goes
|
|
2
|
+
import type { World } from "../client/signed.js";
|
|
3
|
+
/** Pinecall's own cloud: where every verb goes when nothing names another gateway. */
|
|
4
4
|
export declare const CLOUD_URL = "https://box.pinecall.io";
|
|
5
|
-
/** The
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/** What the resolution found: the gateway, the key if there is one, and where the key came from. */
|
|
5
|
+
/** The key a verb knocks with and the gateway it knocks at: the project's, as any app reads its own. */
|
|
6
|
+
export declare const KEY_VARIABLE = "PINECALL_KEY";
|
|
7
|
+
export declare const URL_VARIABLE = "PINECALL_URL";
|
|
8
|
+
/** What the resolution found: the gateway, the key if there is one, where it was read, the world asked. */
|
|
10
9
|
export interface Found {
|
|
11
10
|
url: string;
|
|
12
11
|
apiKey: string | undefined;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/** The profile's name, when a project chose it. */
|
|
17
|
-
profile?: string;
|
|
18
|
-
/** `production` when `--prod` asked for that world's key for this one command. */
|
|
12
|
+
/** Where the key was read: `the environment`, or the `.env` it came from, as a path from here. */
|
|
13
|
+
source: string;
|
|
14
|
+
/** `production` when `--prod` named that world for this one command. */
|
|
19
15
|
world?: World;
|
|
20
16
|
}
|
|
21
17
|
/** A gateway with the key in hand: what a verb holds after `theDoor` answered. */
|
|
22
18
|
export interface Open {
|
|
23
19
|
url: string;
|
|
24
20
|
apiKey: string;
|
|
25
|
-
source:
|
|
26
|
-
project?: ProjectOrg;
|
|
27
|
-
profile?: string;
|
|
21
|
+
source: string;
|
|
28
22
|
world?: World;
|
|
29
23
|
}
|
|
30
24
|
/**
|
|
31
|
-
* Which gateway and which key:
|
|
25
|
+
* Which gateway and which key: the project's, the way every app reads its own secrets.
|
|
32
26
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* another
|
|
37
|
-
*
|
|
38
|
-
* Now: the profile `--profile` names; else, inside a project whose package.json says
|
|
39
|
-
* `"pinecall": { "org": "<slug>" }`, that org's profile; else the active one. `pinecall config`
|
|
40
|
-
* prints which. A
|
|
41
|
-
* machine with no browser writes one off stdin — `pinecall login --key-stdin` — so a key is never
|
|
42
|
-
* in an environment every child process and every `ps` can read. `PINECALL_HOME` says where the
|
|
43
|
-
* file is, and that is the only variable this file knows about.
|
|
27
|
+
* `PINECALL_KEY` and `PINECALL_URL` from the process's environment — a server's secrets, a CI job's
|
|
28
|
+
* — else from the nearest `.env` up from where the verb runs, which `pinecall link` wrote: each
|
|
29
|
+
* project folder is the org it was linked to, and nothing is switched. The gateway is the cloud's
|
|
30
|
+
* unless one of the two names another. v1's `PINECALL_API_KEY` is never read: a name another CLI on
|
|
31
|
+
* the same machine exports was how a key of the wrong org was once handed over in silence.
|
|
44
32
|
*/
|
|
45
|
-
export declare function doorFrom(env?: NodeJS.ProcessEnv,
|
|
33
|
+
export declare function doorFrom(env?: NodeJS.ProcessEnv, from?: string, world?: World | undefined): Found;
|
|
46
34
|
/** The gateway a verb knocks at, or nothing once it has said why it cannot: every verb's first act. */
|
|
47
|
-
export declare function theDoor(env?: NodeJS.ProcessEnv, err?: NodeJS.WritableStream): Open | undefined;
|
|
48
|
-
/** What to say when
|
|
49
|
-
export declare
|
|
50
|
-
/**
|
|
51
|
-
export declare function notThisOrg(project: ProjectOrg): string;
|
|
52
|
-
/** What to say when `--prod` asked a profile for a production key it does not hold. */
|
|
53
|
-
export declare function noProductionKey(profile: string): string;
|
|
54
|
-
/** The first line a verb that connects prints: which gateway, and where its key was found. */
|
|
35
|
+
export declare function theDoor(env?: NodeJS.ProcessEnv, err?: NodeJS.WritableStream, from?: string): Open | undefined;
|
|
36
|
+
/** What to say when there is no key here: the verb that writes one. */
|
|
37
|
+
export declare const NO_KEY = "no PINECALL_KEY here: `pinecall link` in the project's folder writes it to .env (a server keeps it in its secrets)";
|
|
38
|
+
/** The first line a verb that connects prints: which gateway, where its key was read, and the world asked. */
|
|
55
39
|
export declare function doorLine(door: Open): string;
|
|
56
40
|
//# sourceMappingURL=env.d.ts.map
|
package/dist/cli/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/cli/env.ts"],"names":[],"mappings":"AAAA,yGAAyG;
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/cli/env.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAIzG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAIjD,sFAAsF;AACtF,eAAO,MAAM,SAAS,4BAA4B,CAAC;AAEnD,wGAAwG;AACxG,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C,2GAA2G;AAC3G,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,kGAAkG;IAClG,MAAM,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,kFAAkF;AAClF,MAAM,WAAW,IAAI;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACtB,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,IAAI,GAAE,MAAsB,EAC5B,KAAK,GAAE,KAAK,GAAG,SAA4B,GAC1C,KAAK,CAgBP;AAED,uGAAuG;AACvG,wBAAgB,OAAO,CACrB,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,GAAG,GAAE,MAAM,CAAC,cAA+B,EAC3C,IAAI,GAAE,MAAsB,GAC3B,IAAI,GAAG,SAAS,CAQlB;AAED,uEAAuE;AACvE,eAAO,MAAM,MAAM,uHACmG,CAAC;AAEvH,8GAA8G;AAC9G,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAG3C"}
|
package/dist/cli/env.js
CHANGED
|
@@ -1,87 +1,54 @@
|
|
|
1
1
|
/** Where the CLI is pointed and what opens the door: the one place that decides both, for every verb. */
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { relative } from "node:path";
|
|
3
|
+
import { nearestDotenv, readDotenv } from "./dotenv.js";
|
|
4
|
+
import { theChosenWorld } from "./world.js";
|
|
5
|
+
/** Pinecall's own cloud: where every verb goes when nothing names another gateway. */
|
|
5
6
|
export const CLOUD_URL = "https://box.pinecall.io";
|
|
6
|
-
/** The
|
|
7
|
-
export const
|
|
7
|
+
/** The key a verb knocks with and the gateway it knocks at: the project's, as any app reads its own. */
|
|
8
|
+
export const KEY_VARIABLE = "PINECALL_KEY";
|
|
9
|
+
export const URL_VARIABLE = "PINECALL_URL";
|
|
8
10
|
/**
|
|
9
|
-
* Which gateway and which key:
|
|
11
|
+
* Which gateway and which key: the project's, the way every app reads its own secrets.
|
|
10
12
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* another
|
|
15
|
-
*
|
|
16
|
-
* Now: the profile `--profile` names; else, inside a project whose package.json says
|
|
17
|
-
* `"pinecall": { "org": "<slug>" }`, that org's profile; else the active one. `pinecall config`
|
|
18
|
-
* prints which. A
|
|
19
|
-
* machine with no browser writes one off stdin — `pinecall login --key-stdin` — so a key is never
|
|
20
|
-
* in an environment every child process and every `ps` can read. `PINECALL_HOME` says where the
|
|
21
|
-
* file is, and that is the only variable this file knows about.
|
|
13
|
+
* `PINECALL_KEY` and `PINECALL_URL` from the process's environment — a server's secrets, a CI job's
|
|
14
|
+
* — else from the nearest `.env` up from where the verb runs, which `pinecall link` wrote: each
|
|
15
|
+
* project folder is the org it was linked to, and nothing is switched. The gateway is the cloud's
|
|
16
|
+
* unless one of the two names another. v1's `PINECALL_API_KEY` is never read: a name another CLI on
|
|
17
|
+
* the same machine exports was how a key of the wrong org was once handed over in silence.
|
|
22
18
|
*/
|
|
23
|
-
export function doorFrom(env = process.env,
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// only: the profile's key in hand is not touched, so the next command is in the sandbox again.
|
|
29
|
-
const chosen = held === undefined || world === undefined ? held : { ...held, key: keyIn(held, world) };
|
|
30
|
-
// A project that names an org this machine holds no profile of is refused, never handed the
|
|
31
|
-
// active profile: that one is another org's, and running there is the accident this prevents.
|
|
32
|
-
if (chosen === undefined && choice.project !== undefined) {
|
|
33
|
-
return { url: chosenGateway(home) ?? CLOUD_URL, apiKey: undefined, source: "none", project: choice.project };
|
|
34
|
-
}
|
|
35
|
-
// No profile yet: the gateway is whichever this machine was pointed at, and the cloud until
|
|
36
|
-
// somebody points it elsewhere. A localhost default sent every first verb at a box that is not
|
|
37
|
-
// running, and the refusal read as the CLI being broken.
|
|
38
|
-
if (chosen === undefined)
|
|
39
|
-
return { url: chosenGateway(home) ?? CLOUD_URL, apiKey: undefined, source: "none" };
|
|
40
|
-
const asked = world === undefined ? {} : { world, profile: choice.name };
|
|
41
|
-
if (choice.project !== undefined) {
|
|
42
|
-
return { url: chosen.url, apiKey: chosen.key, source: "profile", project: choice.project, ...asked, profile: choice.name };
|
|
19
|
+
export function doorFrom(env = process.env, from = process.cwd(), world = theChosenWorld()) {
|
|
20
|
+
const asked = world === undefined ? {} : { world };
|
|
21
|
+
const exported = env[KEY_VARIABLE];
|
|
22
|
+
if (exported !== undefined && exported !== "") {
|
|
23
|
+
return { url: env[URL_VARIABLE] ?? CLOUD_URL, apiKey: exported, source: "the environment", ...asked };
|
|
43
24
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
25
|
+
const file = nearestDotenv(from);
|
|
26
|
+
if (file === undefined)
|
|
27
|
+
return { url: env[URL_VARIABLE] ?? CLOUD_URL, apiKey: undefined, source: "nowhere", ...asked };
|
|
28
|
+
const values = readDotenv(file);
|
|
29
|
+
const key = values[KEY_VARIABLE];
|
|
30
|
+
return {
|
|
31
|
+
url: env[URL_VARIABLE] ?? values[URL_VARIABLE] ?? CLOUD_URL,
|
|
32
|
+
apiKey: key === "" ? undefined : key,
|
|
33
|
+
source: relative(from, file) || file,
|
|
34
|
+
...asked,
|
|
35
|
+
};
|
|
49
36
|
}
|
|
50
37
|
/** The gateway a verb knocks at, or nothing once it has said why it cannot: every verb's first act. */
|
|
51
|
-
export function theDoor(env = process.env, err = process.stderr) {
|
|
52
|
-
const found = doorFrom(env);
|
|
38
|
+
export function theDoor(env = process.env, err = process.stderr, from = process.cwd()) {
|
|
39
|
+
const found = doorFrom(env, from);
|
|
53
40
|
if (found.apiKey === undefined) {
|
|
54
|
-
err.write(`${
|
|
55
|
-
return undefined;
|
|
56
|
-
}
|
|
57
|
-
if (found.apiKey === "") {
|
|
58
|
-
err.write(`${noProductionKey(found.profile ?? "this profile")}\n`);
|
|
41
|
+
err.write(`${NO_KEY}\n`);
|
|
59
42
|
return undefined;
|
|
60
43
|
}
|
|
61
44
|
const { apiKey, ...rest } = found;
|
|
62
45
|
return { ...rest, apiKey };
|
|
63
46
|
}
|
|
64
|
-
/** What to say when
|
|
65
|
-
export
|
|
66
|
-
|
|
67
|
-
+ " or `pinecall use <profile>` for one already kept (`pinecall config` lists them)");
|
|
68
|
-
}
|
|
69
|
-
/** What to say when the project names an org this machine holds no profile of. */
|
|
70
|
-
export function notThisOrg(project) {
|
|
71
|
-
return (`this project is org ${project.org} (${project.file}), and this machine holds no profile of it:`
|
|
72
|
-
+ ` \`pinecall login\` as a member of ${project.org}, or \`--profile <name>\` for one already kept`
|
|
73
|
-
+ " (`pinecall config` lists them)");
|
|
74
|
-
}
|
|
75
|
-
/** What to say when `--prod` asked a profile for a production key it does not hold. */
|
|
76
|
-
export function noProductionKey(profile) {
|
|
77
|
-
return `--prod asks for ${profile}'s production key, and it holds none: \`pinecall login\` again keeps both worlds' keys`;
|
|
78
|
-
}
|
|
79
|
-
/** The first line a verb that connects prints: which gateway, and where its key was found. */
|
|
47
|
+
/** What to say when there is no key here: the verb that writes one. */
|
|
48
|
+
export const NO_KEY = "no PINECALL_KEY here: `pinecall link` in the project's folder writes it to .env (a server keeps it in its secrets)";
|
|
49
|
+
/** The first line a verb that connects prints: which gateway, where its key was read, and the world asked. */
|
|
80
50
|
export function doorLine(door) {
|
|
81
51
|
const world = door.world === undefined ? "" : ` · ${door.world} (--prod)`;
|
|
82
|
-
if (door.project !== undefined) {
|
|
83
|
-
return `gateway ${door.url} · key from profile ${door.profile ?? door.project.org} · org ${door.project.org} from ${door.project.file}${world}`;
|
|
84
|
-
}
|
|
85
52
|
return `gateway ${door.url} · key from ${door.source}${world}`;
|
|
86
53
|
}
|
|
87
54
|
//# sourceMappingURL=env.js.map
|
package/dist/cli/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/cli/env.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAEzG,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/cli/env.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAEzG,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,sFAAsF;AACtF,MAAM,CAAC,MAAM,SAAS,GAAG,yBAAyB,CAAC;AAEnD,wGAAwG;AACxG,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAC3C,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAoB3C;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CACtB,GAAG,GAAsB,OAAO,CAAC,GAAG,EACpC,IAAI,GAAW,OAAO,CAAC,GAAG,EAAE,EAC5B,KAAK,GAAsB,cA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E,IAAI,CAAC,CAAC;IAClC,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC/B,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,IAAI,CAAC,CAAC;QACzB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAClC,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC;AAED,uEAAuE;AACvE,MAAM,CAAC,MAAM,MAAM,GACjB,oHAAoH,CAAC;AAEvH,8GAA8G;AAC9G,MAAM,UAAU,QAAQ,CAAC,IAAU;IACjC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,WAAW,CAAC;IAC1E,OAAO,WAAW,IAAI,CAAC,GAAG,eAAe,IAAI,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;AACjE,CAAC"}
|
package/dist/cli/eval.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** `pinecall eval <call-id>`: ring 3 — one real call, re-evaluated by the runtime's code checks. */
|
|
2
2
|
import type { Group } from "./groups.js";
|
|
3
|
+
import type { Door } from "./testing/gateway.js";
|
|
3
4
|
/** One check's answer, as `POST /v1/evals/replay/{call}` writes it: three strings, no nesting. */
|
|
4
5
|
export interface Verdict {
|
|
5
6
|
check: string;
|
|
@@ -29,7 +30,7 @@ export declare function run(argv: string[], out?: NodeJS.WritableStream): Promis
|
|
|
29
30
|
* every turn, which is why the request lives here rather than inside this verb's own argument
|
|
30
31
|
* parsing: one door, one sentence when it refuses.
|
|
31
32
|
*/
|
|
32
|
-
export declare function replayed(
|
|
33
|
+
export declare function replayed(door: Door, call: string, said: Case): Promise<Answer>;
|
|
33
34
|
/** The door this verb knocks at: the gateway's HTTP address and the call, nothing in a query. */
|
|
34
35
|
export declare function replayUrl(base: string, call: string): string;
|
|
35
36
|
/** The case as a person reads it: the call on top, then a line per check, aligned by name. */
|
package/dist/cli/eval.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval.d.ts","sourceRoot":"","sources":["../../src/cli/eval.ts"],"names":[],"mappings":"AAAA,oGAAoG;
|
|
1
|
+
{"version":3,"file":"eval.d.ts","sourceRoot":"","sources":["../../src/cli/eval.ts"],"names":[],"mappings":"AAAA,oGAAoG;AAOpG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAEjD,kGAAkG;AAClG,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,4FAA4F;AAC5F,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,8FAA8F;AAC9F,MAAM,WAAW,IAAI;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,KAAK,EAAE,KAanB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,GAAE,MAAM,CAAC,cAA+B,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBtG;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CASpF;AAED,iGAAiG;AACjG,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,8FAA8F;AAC9F,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAQhD"}
|
package/dist/cli/eval.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** `pinecall eval <call-id>`: ring 3 — one real call, re-evaluated by the runtime's code checks. */
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { parseArgs } from "node:util";
|
|
4
|
+
import { signed } from "../client/signed.js";
|
|
4
5
|
import { theDoor } from "./env.js";
|
|
5
6
|
export const group = {
|
|
6
7
|
purpose: "ring 3: one real call, re-evaluated",
|
|
@@ -36,7 +37,7 @@ export async function run(argv, out = process.stdout) {
|
|
|
36
37
|
return 2;
|
|
37
38
|
let answer;
|
|
38
39
|
try {
|
|
39
|
-
answer = await replayed(door
|
|
40
|
+
answer = await replayed(door, call, await theCase(values.policy));
|
|
40
41
|
}
|
|
41
42
|
catch (refused) {
|
|
42
43
|
process.stderr.write(`${refused instanceof Error ? refused.message : String(refused)}\n`);
|
|
@@ -50,10 +51,10 @@ export async function run(argv, out = process.stdout) {
|
|
|
50
51
|
* every turn, which is why the request lives here rather than inside this verb's own argument
|
|
51
52
|
* parsing: one door, one sentence when it refuses.
|
|
52
53
|
*/
|
|
53
|
-
export async function replayed(
|
|
54
|
-
const answered = await fetch(replayUrl(
|
|
54
|
+
export async function replayed(door, call, said) {
|
|
55
|
+
const answered = await fetch(replayUrl(door.url, call), {
|
|
55
56
|
method: "POST",
|
|
56
|
-
headers: {
|
|
57
|
+
headers: { ...signed(door.apiKey, door.world), "content-type": "application/json" },
|
|
57
58
|
body: JSON.stringify(said),
|
|
58
59
|
});
|
|
59
60
|
const body = await answered.text();
|
package/dist/cli/eval.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval.js","sourceRoot":"","sources":["../../src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":["../../src/cli/groups.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,2FAA2F;AAC3F,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC/C;AAED,2FAA2F;AAC3F,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAI1D;AAMD,8FAA8F;AAC9F,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/cli/groups.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,2FAA2F;AAC3F,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC/C;AAED,2FAA2F;AAC3F,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAI1D;AAMD,8FAA8F;AAC9F,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQ1C,CAAC;AAEF,gGAAgG;AAChG,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,cAAc,GAAG,KAAK,CAQ7F"}
|
package/dist/cli/groups.js
CHANGED
|
@@ -18,7 +18,6 @@ export const PLANNED = {
|
|
|
18
18
|
costs: "what the calls cost, by agent, model or channel",
|
|
19
19
|
call: "the agent dials a number, for real",
|
|
20
20
|
tokens: "mint a browser token for a web call",
|
|
21
|
-
agents: "list | show the agents this org has registered",
|
|
22
21
|
deploy: "put this app on a box and keep it there",
|
|
23
22
|
};
|
|
24
23
|
/** The line a planned group prints instead of doing anything: the verb, and what it will be. */
|
package/dist/cli/groups.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../src/cli/groups.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAUnG,2FAA2F;AAC3F,MAAM,UAAU,OAAO,CAAC,IAAY,EAAE,KAAY;IAChD,MAAM,IAAI,GAAG,CAAC,YAAY,IAAI,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACrD,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACpE,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AAChC,CAAC;AAED,iGAAiG;AACjG,+FAA+F;AAC/F,gGAAgG;AAChG,oEAAoE;AACpE,8FAA8F;AAC9F,MAAM,CAAC,MAAM,OAAO,GAA2B;IAC7C,GAAG,EAAE,wDAAwD;IAC7D,CAAC,EAAE,8DAA8D;IACjE,OAAO,EAAE,uDAAuD;IAChE,KAAK,EAAE,iDAAiD;IACxD,IAAI,EAAE,oCAAoC;IAC1C,MAAM,EAAE,qCAAqC;IAC7C,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../src/cli/groups.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAUnG,2FAA2F;AAC3F,MAAM,UAAU,OAAO,CAAC,IAAY,EAAE,KAAY;IAChD,MAAM,IAAI,GAAG,CAAC,YAAY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,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAErC;AAED;;;GAGG;AACH,wBAAsB,IAAI,CACxB,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,GAAE,MAAM,CAAC,cAA+B,EAC3C,GAAG,GAAE,MAAM,CAAC,cAA+B,GAC1C,OAAO,CAAC,MAAM,CAAC,CA6BjB;AAID,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,cAA+B,GAAG,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,gGAAgG;AAKhG,OAAO,EAAkC,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAQzE,gGAAgG;AAChG,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAErC;AAED,4FAA4F;AAC5F,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAErC;AAED;;;GAGG;AACH,wBAAsB,IAAI,CACxB,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,GAAE,MAAM,CAAC,cAA+B,EAC3C,GAAG,GAAE,MAAM,CAAC,cAA+B,GAC1C,OAAO,CAAC,MAAM,CAAC,CA6BjB;AAID,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,cAA+B,GAAG,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CA2BpH;AAED,qGAAqG;AACrG,wBAAgB,KAAK,IAAI,MAAM,CAoC9B"}
|
package/dist/cli/index.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import { helpFor, PLANNED, plannedGroup } from "./groups.js";
|
|
6
|
-
import {
|
|
7
|
-
// The order this table is written is the order the help prints:
|
|
8
|
-
// they are what a person types on the first day, and the planned groups after, in the
|
|
9
|
-
// order.
|
|
10
|
-
const BUILT = ["
|
|
6
|
+
import { withoutTheWorldFlag } from "./world.js";
|
|
7
|
+
// The order this table is written is the order the help prints: link, start and chat first,
|
|
8
|
+
// because they are what a person types on the first day, and the planned groups after, in the
|
|
9
|
+
// design's order. start is rails server and chat is rails console — see docs/decisions/tenant-cli.md.
|
|
10
|
+
const BUILT = ["link", "start", "serve", "chat", "prompt", "test", "simulate", "eval", "sessions", "runs", "agent", "lexicon", "pipeline", "line", "numbers", "personas", "knowledge", "memory", "remember", "supervise", "providers", "callbacks", "login", "whoami"];
|
|
11
11
|
/** Everything `pinecall` answers to, built and planned alike, in the order help prints them. */
|
|
12
12
|
export function groupNames() {
|
|
13
13
|
return [...BUILT, ...Object.keys(PLANNED)];
|
|
@@ -21,9 +21,9 @@ export function builtNames() {
|
|
|
21
21
|
* so a new group is one import and one line, never a branch inside a growing parser.
|
|
22
22
|
*/
|
|
23
23
|
export async function main(argv, out = process.stdout, err = process.stderr) {
|
|
24
|
-
// `--
|
|
25
|
-
//
|
|
26
|
-
const [name, ...rest] =
|
|
24
|
+
// `--prod` belongs to no group: it says which world this one command runs in, and every group
|
|
25
|
+
// would otherwise have to parse it. Out of argv here, before anybody sees it.
|
|
26
|
+
const [name, ...rest] = withoutTheWorldFlag(argv);
|
|
27
27
|
if (name === undefined || name === "--help" || name === "-h" || name === "help") {
|
|
28
28
|
out.write(usage());
|
|
29
29
|
return name === undefined ? 2 : 0;
|
|
@@ -52,10 +52,12 @@ export async function main(argv, out = process.stdout, err = process.stderr) {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
// A built group is imported only when it is asked for: `pinecall prompt` must not pay for the
|
|
55
|
-
// websocket client that `
|
|
55
|
+
// websocket client that `start` needs, and a stub must not pay for anything at all.
|
|
56
56
|
export async function groupFor(name, out = process.stdout) {
|
|
57
|
-
if (name === "
|
|
58
|
-
return (await import("./
|
|
57
|
+
if (name === "link")
|
|
58
|
+
return (await import("./linking.js")).group;
|
|
59
|
+
if (name === "start")
|
|
60
|
+
return (await import("./start.js")).group;
|
|
59
61
|
if (name === "serve")
|
|
60
62
|
return (await import("./serve.js")).group;
|
|
61
63
|
if (name === "chat")
|
|
@@ -70,6 +72,10 @@ export async function groupFor(name, out = process.stdout) {
|
|
|
70
72
|
return (await import("./eval.js")).group;
|
|
71
73
|
if (name === "runs")
|
|
72
74
|
return (await import("./runs/index.js")).group;
|
|
75
|
+
if (name === "agent")
|
|
76
|
+
return (await import("./agent.js")).group;
|
|
77
|
+
if (name === "lexicon")
|
|
78
|
+
return (await import("./lexicon.js")).group;
|
|
73
79
|
if (name === "pipeline")
|
|
74
80
|
return (await import("./pipeline.js")).group;
|
|
75
81
|
if (name === "line")
|
|
@@ -86,8 +92,6 @@ export async function groupFor(name, out = process.stdout) {
|
|
|
86
92
|
return (await import("./supervise.js")).group;
|
|
87
93
|
if (name === "sessions")
|
|
88
94
|
return (await import("./sessions.js")).group;
|
|
89
|
-
if (name === "keys")
|
|
90
|
-
return (await import("./keys.js")).group;
|
|
91
95
|
if (name === "numbers")
|
|
92
96
|
return (await import("./numbers.js")).group;
|
|
93
97
|
if (name === "providers")
|
|
@@ -96,18 +100,8 @@ export async function groupFor(name, out = process.stdout) {
|
|
|
96
100
|
return (await import("./callbacks.js")).group;
|
|
97
101
|
if (name === "login")
|
|
98
102
|
return (await import("./login.js")).group;
|
|
99
|
-
if (name === "gateway")
|
|
100
|
-
return (await import("./gateway.js")).group;
|
|
101
103
|
if (name === "whoami")
|
|
102
104
|
return (await import("./whoami.js")).group;
|
|
103
|
-
if (name === "config")
|
|
104
|
-
return (await import("./config.js")).group;
|
|
105
|
-
// The same module under the word a person reaches for. `use` is `config <name>` and nothing
|
|
106
|
-
// else — two verbs would be two places deciding what a profile is.
|
|
107
|
-
if (name === "use") {
|
|
108
|
-
const config = await import("./config.js");
|
|
109
|
-
return { ...config.group, run: config.use };
|
|
110
|
-
}
|
|
111
105
|
const planned = PLANNED[name];
|
|
112
106
|
return planned === undefined ? undefined : plannedGroup(name, planned, out);
|
|
113
107
|
}
|
|
@@ -116,7 +110,8 @@ export function usage() {
|
|
|
116
110
|
const lines = [
|
|
117
111
|
"usage: pinecall <group> [args]",
|
|
118
112
|
"",
|
|
119
|
-
"
|
|
113
|
+
" link this project's folder to one of your orgs: your key, in its .env",
|
|
114
|
+
" start the app and its doors: the process you deploy (--prod for production)",
|
|
120
115
|
" serve the sandbox's console on this machine: your copies, http://localhost:4100",
|
|
121
116
|
" chat the app in this terminal's own process, and a prompt against it",
|
|
122
117
|
" prompt the exact prompt a state would produce, offline",
|
|
@@ -125,6 +120,8 @@ export function usage() {
|
|
|
125
120
|
" eval ring 3: one real call, re-evaluated by the runtime's code checks",
|
|
126
121
|
" sessions list | show a call's log, with what it cost and how it was judged",
|
|
127
122
|
" runs list | show | diff the suites, promote a call, and watch the drift",
|
|
123
|
+
" agent what the org set over the class — yours, the team's, production's — set, history, rollback",
|
|
124
|
+
" lexicon the org's words: how the voice says them and what the ears must know",
|
|
128
125
|
" pipeline what the agent hears, decides and speaks with, and the knobs over it",
|
|
129
126
|
" line which phone is yours, and whose terminal anybody else's call rings in",
|
|
130
127
|
" numbers list | import | move | drop the numbers the org answers at",
|
|
@@ -133,14 +130,12 @@ export function usage() {
|
|
|
133
130
|
" memory what memory kept about a contact, forget it, and hold recall to a golden",
|
|
134
131
|
" remember the goldens memory.remember is held to: what a call teaches, and what it never keeps",
|
|
135
132
|
" supervise listen in on a live call: whisper, say, take the line, give it back, end",
|
|
136
|
-
" keys issue | list | revoke the API keys this org's machines run on",
|
|
137
133
|
" providers add | rm | list the provider keys this org brought of its own",
|
|
138
134
|
" callbacks the numbers people left when every seat was taken: who to call back",
|
|
139
|
-
" login sign in
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
" whoami which gateway, which org, which world, and where this terminal's key came from",
|
|
135
|
+
" login sign this machine in through a browser; `link` asks for it when it is needed",
|
|
136
|
+
" whoami which gateway, which org, whether you act in production, and where the key came from",
|
|
137
|
+
"",
|
|
138
|
+
" --prod on any verb runs it in production, if your org lets you act there.",
|
|
144
139
|
"",
|
|
145
140
|
];
|
|
146
141
|
for (const [name, purpose] of Object.entries(PLANNED)) {
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,gGAAgG;AAEhG,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,gGAAgG;AAEhG,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,4FAA4F;AAC5F,8FAA8F;AAC9F,sGAAsG;AACtG,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAEhR,gGAAgG;AAChG,MAAM,UAAU,UAAU;IACxB,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG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AI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,OAAO,kBAAkB,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC;AAED;;;;;GAKG;AACH,SAAS,OAAO;IACd,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACtC,IAAI,CAAC;QACH,OAAO,OAAO,IAAI,CAAC,GAAG,KAAK,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IACrE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,+FAA+F;AAC/F,IAAI,OAAO,EAAE,EAAE,CAAC;IACd,OAAO,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** `pinecall lexicon`: the org's words — how the voice says them, what the ears must know — versioned. */
|
|
2
|
+
import type { LexiconAnswer } from "@pinecall/protocol";
|
|
3
|
+
import type { Group } from "./groups.js";
|
|
4
|
+
export declare const group: Group;
|
|
5
|
+
/** What the verb can be told besides the argv: where to print, and which environment. Tests only. */
|
|
6
|
+
export interface Wording {
|
|
7
|
+
out?: NodeJS.WritableStream;
|
|
8
|
+
err?: NodeJS.WritableStream;
|
|
9
|
+
env?: NodeJS.ProcessEnv;
|
|
10
|
+
}
|
|
11
|
+
export declare function run(argv: string[], how?: Wording): Promise<number>;
|
|
12
|
+
/** The page: what the corner reads, then which version each corner is at. */
|
|
13
|
+
export declare function linesOf(answer: LexiconAnswer): string[];
|
|
14
|
+
//# sourceMappingURL=lexicon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lexicon.d.ts","sourceRoot":"","sources":["../../src/cli/lexicon.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAI1G,OAAO,KAAK,EAAE,aAAa,EAA2C,MAAM,oBAAoB,CAAC;AAGjG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAezC,eAAO,MAAM,KAAK,EAAE,KAcnB,CAAC;AAEF,qGAAqG;AACrG,MAAM,WAAW,OAAO;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,GAAE,OAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CA0C5E;AA6CD,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,EAAE,CAavD"}
|