pinecall 0.8.9 → 0.8.11
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/cli/eval.d.ts +1 -1
- package/dist/cli/eval.d.ts.map +1 -1
- package/dist/cli/eval.js +11 -5
- package/dist/cli/eval.js.map +1 -1
- package/dist/cli/groups.d.ts +3 -0
- package/dist/cli/groups.d.ts.map +1 -1
- package/dist/cli/groups.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +22 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/memory.js +1 -1
- package/dist/cli/named-file.d.ts +10 -0
- package/dist/cli/named-file.d.ts.map +1 -0
- package/dist/cli/named-file.js +29 -0
- package/dist/cli/named-file.js.map +1 -0
- package/dist/cli/numbers.d.ts.map +1 -1
- package/dist/cli/numbers.js +7 -2
- package/dist/cli/numbers.js.map +1 -1
- package/dist/cli/personas.d.ts +2 -0
- package/dist/cli/personas.d.ts.map +1 -1
- package/dist/cli/personas.js +8 -3
- package/dist/cli/personas.js.map +1 -1
- package/dist/cli/prompt.d.ts.map +1 -1
- package/dist/cli/prompt.js +6 -5
- package/dist/cli/prompt.js.map +1 -1
- package/dist/cli/runs/candidate.d.ts +1 -1
- package/dist/cli/runs/candidate.d.ts.map +1 -1
- package/dist/cli/runs/candidate.js +2 -2
- package/dist/cli/runs/candidate.js.map +1 -1
- package/dist/cli/runs/drift.d.ts +1 -1
- package/dist/cli/runs/drift.d.ts.map +1 -1
- package/dist/cli/runs/drift.js +2 -2
- package/dist/cli/runs/drift.js.map +1 -1
- package/dist/cli/runs/index.d.ts.map +1 -1
- package/dist/cli/runs/index.js +6 -5
- package/dist/cli/runs/index.js.map +1 -1
- package/dist/cli/runs/suites.d.ts +10 -2
- package/dist/cli/runs/suites.d.ts.map +1 -1
- package/dist/cli/runs/suites.js +42 -6
- package/dist/cli/runs/suites.js.map +1 -1
- package/dist/cli/sessions.d.ts.map +1 -1
- package/dist/cli/sessions.js +20 -2
- package/dist/cli/sessions.js.map +1 -1
- package/dist/cli/simulate.d.ts.map +1 -1
- package/dist/cli/simulate.js +1 -0
- package/dist/cli/simulate.js.map +1 -1
- package/dist/cli/supervise.d.ts +2 -0
- package/dist/cli/supervise.d.ts.map +1 -1
- package/dist/cli/supervise.js +11 -0
- package/dist/cli/supervise.js.map +1 -1
- package/dist/cli/testing/gateway.d.ts +8 -0
- package/dist/cli/testing/gateway.d.ts.map +1 -1
- package/dist/cli/testing/gateway.js +27 -1
- package/dist/cli/testing/gateway.js.map +1 -1
- package/dist/cli/the-call.d.ts +19 -0
- package/dist/cli/the-call.d.ts.map +1 -0
- package/dist/cli/the-call.js +24 -0
- package/dist/cli/the-call.js.map +1 -0
- package/dist/cli/whoami.d.ts +1 -1
- package/dist/cli/whoami.d.ts.map +1 -1
- package/dist/cli/whoami.js +8 -17
- package/dist/cli/whoami.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Whether a call a person typed exists on this gateway at all, and whether it is still running. */
|
|
2
|
+
import { type Door } from "./testing/gateway.js";
|
|
3
|
+
/** What the gateway knows about one call, in the two facts a verb decides on. */
|
|
4
|
+
export interface Standing {
|
|
5
|
+
/** Whether the call is happening right now: a desk moves this one, a reader reads either. */
|
|
6
|
+
live: boolean;
|
|
7
|
+
/** The last entry's seq — how much log there is to read. */
|
|
8
|
+
lastSeq: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The call's standing, or a refusal naming it. `GET /v1/calls/{call}/state` is the only door that
|
|
12
|
+
* answers 404 for a call nobody here has written, and asking it first is the difference between
|
|
13
|
+
* `pinecall sessions show CA_typo` printing "score not judged" with a zero (production,
|
|
14
|
+
* 2026-09-20) and saying that no such call exists.
|
|
15
|
+
*/
|
|
16
|
+
export declare function standingOf(door: Door, call: string): Promise<Standing>;
|
|
17
|
+
/** What a call nobody wrote reads as: the id typed back, so a typo is visible in the sentence. */
|
|
18
|
+
export declare const NO_SUCH_CALL: (call: string) => string;
|
|
19
|
+
//# sourceMappingURL=the-call.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"the-call.d.ts","sourceRoot":"","sources":["../../src/cli/the-call.ts"],"names":[],"mappings":"AAAA,oGAAoG;AAGpG,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAEjE,iFAAiF;AACjF,MAAM,WAAW,QAAQ;IACvB,6FAA6F;IAC7F,IAAI,EAAE,OAAO,CAAC;IACd,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAS5E;AAED,kGAAkG;AAClG,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,MAC4C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Whether a call a person typed exists on this gateway at all, and whether it is still running. */
|
|
2
|
+
import { cannotRun } from "./cannot-run.js";
|
|
3
|
+
import { asked, Refused } from "./testing/gateway.js";
|
|
4
|
+
/**
|
|
5
|
+
* The call's standing, or a refusal naming it. `GET /v1/calls/{call}/state` is the only door that
|
|
6
|
+
* answers 404 for a call nobody here has written, and asking it first is the difference between
|
|
7
|
+
* `pinecall sessions show CA_typo` printing "score not judged" with a zero (production,
|
|
8
|
+
* 2026-09-20) and saying that no such call exists.
|
|
9
|
+
*/
|
|
10
|
+
export async function standingOf(door, call) {
|
|
11
|
+
let said;
|
|
12
|
+
try {
|
|
13
|
+
said = await asked(door, `/v1/calls/${encodeURIComponent(call)}/state`);
|
|
14
|
+
}
|
|
15
|
+
catch (refused) {
|
|
16
|
+
if (refused instanceof Refused && refused.status === 404)
|
|
17
|
+
throw cannotRun(NO_SUCH_CALL(call));
|
|
18
|
+
throw refused;
|
|
19
|
+
}
|
|
20
|
+
return { live: said.live === true, lastSeq: said.last_seq ?? 0 };
|
|
21
|
+
}
|
|
22
|
+
/** What a call nobody wrote reads as: the id typed back, so a typo is visible in the sentence. */
|
|
23
|
+
export const NO_SUCH_CALL = (call) => `no call ${call} on this gateway: \`pinecall sessions list\` names the ones there are`;
|
|
24
|
+
//# sourceMappingURL=the-call.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"the-call.js","sourceRoot":"","sources":["../../src/cli/the-call.ts"],"names":[],"mappings":"AAAA,oGAAoG;AAEpG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAa,MAAM,sBAAsB,CAAC;AAUjE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAU,EAAE,IAAY;IACvD,IAAI,IAA2C,CAAC;IAChD,IAAI,CAAC;QACH,IAAI,GAAG,MAAM,KAAK,CAAwC,IAAI,EAAE,aAAa,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjH,CAAC;IAAC,OAAO,OAAO,EAAE,CAAC;QACjB,IAAI,OAAO,YAAY,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,GAAG;YAAE,MAAM,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9F,MAAM,OAAO,CAAC;IAChB,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC;AACnE,CAAC;AAED,kGAAkG;AAClG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAU,EAAE,CACnD,WAAW,IAAI,uEAAuE,CAAC"}
|
package/dist/cli/whoami.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface Who {
|
|
|
18
18
|
}
|
|
19
19
|
export declare const group: Group;
|
|
20
20
|
/** Resolve the door, ask it who is knocking, and print the two lines. */
|
|
21
|
-
export declare function run(
|
|
21
|
+
export declare function run(argv: string[], out?: NodeJS.WritableStream, err?: NodeJS.WritableStream, env?: NodeJS.ProcessEnv): Promise<number>;
|
|
22
22
|
/** Who the gateway says is knocking with this key. */
|
|
23
23
|
export declare function whoIs(door: Door): Promise<Who>;
|
|
24
24
|
/**
|
package/dist/cli/whoami.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../src/cli/whoami.ts"],"names":[],"mappings":"AAAA,0GAA0G;
|
|
1
|
+
{"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../src/cli/whoami.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAK1G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAS,KAAK,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAMxD,6FAA6F;AAC7F,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ;oGACgG;IAChG,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,yGAAyG;IACzG,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,4GAA4G;IAC5G,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,KAAK,EAAE,KASnB,CAAC;AAEF,yEAAyE;AACzE,wBAAsB,GAAG,CACvB,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,GAAE,MAAM,CAAC,cAA+B,EAC3C,GAAG,GAAE,MAAM,CAAC,cAA+B,EAC3C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED,sDAAsD;AACtD,wBAAsB,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAEtC;AAED,+FAA+F;AAC/F,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAK3C;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAE/C"}
|
package/dist/cli/whoami.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** `pinecall whoami`: which gateway this terminal talks to, whose key it holds, and where it found it. */
|
|
2
|
+
import { parseArgs } from "node:util";
|
|
2
3
|
import { doorLine, theDoor } from "./env.js";
|
|
3
|
-
import { asked
|
|
4
|
+
import { asked } from "./testing/gateway.js";
|
|
4
5
|
// The door that answers who is knocking, written once: `login` proves a key at this same path,
|
|
5
6
|
// through whoIs() below, so neither verb spells it.
|
|
6
7
|
const WHOAMI = "/v1/whoami";
|
|
@@ -15,7 +16,11 @@ export const group = {
|
|
|
15
16
|
run,
|
|
16
17
|
};
|
|
17
18
|
/** Resolve the door, ask it who is knocking, and print the two lines. */
|
|
18
|
-
export async function run(
|
|
19
|
+
export async function run(argv, out = process.stdout, err = process.stderr, env = process.env) {
|
|
20
|
+
// This verb takes no flag at all, and a parser that reads none is how it says so: `whoami
|
|
21
|
+
// --json` was taken and answered with the same two lines, which reads as JSON having been
|
|
22
|
+
// refused rather than never offered (2026-09-20).
|
|
23
|
+
parseArgs({ args: argv, options: {} });
|
|
19
24
|
const door = theDoor(env, err);
|
|
20
25
|
if (door === undefined)
|
|
21
26
|
return 2;
|
|
@@ -60,20 +65,6 @@ export function describing(who) {
|
|
|
60
65
|
* "this door takes an API key" is the whole answer, and `{"detail": …}` around it is noise.
|
|
61
66
|
*/
|
|
62
67
|
export function refusal(failed) {
|
|
63
|
-
|
|
64
|
-
return failed instanceof Error ? failed.message : String(failed);
|
|
65
|
-
const said = detailOf(failed.text);
|
|
66
|
-
return said === undefined ? failed.message : `the gateway answered ${failed.status}: ${said}`;
|
|
67
|
-
}
|
|
68
|
-
// FastAPI puts a refusal's sentence under `detail`; anything else is printed as it arrived.
|
|
69
|
-
function detailOf(text) {
|
|
70
|
-
try {
|
|
71
|
-
const body = JSON.parse(text);
|
|
72
|
-
const said = body.detail;
|
|
73
|
-
return typeof said === "string" ? said : undefined;
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
return undefined;
|
|
77
|
-
}
|
|
68
|
+
return failed instanceof Error ? failed.message : String(failed);
|
|
78
69
|
}
|
|
79
70
|
//# sourceMappingURL=whoami.js.map
|
package/dist/cli/whoami.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../src/cli/whoami.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAE1G,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../src/cli/whoami.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAE1G,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,KAAK,EAAa,MAAM,sBAAsB,CAAC;AAExD,+FAA+F;AAC/F,oDAAoD;AACpD,MAAM,MAAM,GAAG,YAAY,CAAC;AAkB5B,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,OAAO,EAAE,kDAAkD;IAC3D,KAAK,EAAE;;;;;+EAKsE;IAC7E,GAAG;CACJ,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,KAAK,UAAU,GAAG,CACvB,IAAc,EACd,GAAG,GAA0B,OAAO,CAAC,MAAM,EAC3C,GAAG,GAA0B,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,KAAK,IAAI;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC7C,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,MAAe;IACrC,OAAO,MAAM,YAAY,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACnE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinecall",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.11",
|
|
4
4
|
"description": "Write an agent as a class: its fields are the state, its @tool methods are the model's verbs, and its docstrings are the prompt",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Pinecall <hello@pinecall.io>",
|