@owlmeans/llm-common 0.1.18-rc.37 → 0.1.18-rc.38
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 +2 -2
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/llm-common/SKILL.md +1 -1
- package/build/delegate/consts.d.ts +25 -0
- package/build/delegate/consts.d.ts.map +1 -0
- package/build/delegate/consts.js +28 -0
- package/build/delegate/consts.js.map +1 -0
- package/build/delegate/index.d.ts +1 -0
- package/build/delegate/index.d.ts.map +1 -1
- package/build/delegate/index.js +1 -0
- package/build/delegate/index.js.map +1 -1
- package/build/delegate/types.d.ts +1 -24
- package/build/delegate/types.d.ts.map +1 -1
- package/build/delegate/types.js +1 -27
- package/build/delegate/types.js.map +1 -1
- package/build/results/consts.local.d.ts +3 -0
- package/build/results/consts.local.d.ts.map +1 -0
- package/build/results/consts.local.js +3 -0
- package/build/results/consts.local.js.map +1 -0
- package/build/results/utils.d.ts.map +1 -1
- package/build/results/utils.js +1 -2
- package/build/results/utils.js.map +1 -1
- package/package.json +2 -2
- package/src/delegate/consts.ts +26 -0
- package/src/delegate/index.ts +1 -0
- package/src/delegate/types.ts +1 -26
- package/src/results/consts.local.ts +2 -0
- package/src/results/utils.ts +1 -3
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ extends these; `@owlmeans/llm` implements against them.
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
bun add @owlmeans/llm-common@^0.1.18-rc.
|
|
23
|
+
bun add @owlmeans/llm-common@^0.1.18-rc.38
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
## Usage
|
|
@@ -96,7 +96,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
96
96
|
your project's skill store (`.agents/skills/`):
|
|
97
97
|
|
|
98
98
|
```sh
|
|
99
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
99
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.48
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/llm-common",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-
|
|
4
|
+
"version": "0.1.18-rc.38",
|
|
5
|
+
"generatedAt": "2026-10-05T08:32:19.123Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/llm-common
|
|
9
9
|
|
|
10
10
|
**Layer:** Core
|
|
11
|
-
**Install:** `"@owlmeans/llm-common": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/llm-common": "^0.1.18-rc.38"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
The contracts half of the LLM stack. **No `@langchain/*` runtime dependency** — importable
|
|
14
14
|
from a browser bundle, a queue worker, or any package that must not pull an inference SDK.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** What the answer must be. */
|
|
2
|
+
export declare enum DelegatedMode {
|
|
3
|
+
/** Prose or code. */
|
|
4
|
+
Text = "text",
|
|
5
|
+
/** Exactly one JSON object satisfying `outputSchema`. */
|
|
6
|
+
Json = "json",
|
|
7
|
+
/** A list of calls chosen from `tools`. */
|
|
8
|
+
Tools = "tools"
|
|
9
|
+
}
|
|
10
|
+
/** Who a message came from. Deliberately the four roles every chat API agrees on. */
|
|
11
|
+
export declare enum DelegatedRole {
|
|
12
|
+
System = "system",
|
|
13
|
+
User = "user",
|
|
14
|
+
Assistant = "assistant",
|
|
15
|
+
Tool = "tool"
|
|
16
|
+
}
|
|
17
|
+
/** What shape an answer came back in. */
|
|
18
|
+
export declare enum DelegatedResultKind {
|
|
19
|
+
Text = "text",
|
|
20
|
+
Json = "json",
|
|
21
|
+
ToolCalls = "tool-calls",
|
|
22
|
+
/** The performer could not answer. Treated as a malformed answer: asked again, with the reason. */
|
|
23
|
+
Error = "error"
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/delegate/consts.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,oBAAY,aAAa;IACvB,qBAAqB;IACrB,IAAI,SAAS;IACb,yDAAyD;IACzD,IAAI,SAAS;IACb,2CAA2C;IAC3C,KAAK,UAAU;CAChB;AAED,qFAAqF;AACrF,oBAAY,aAAa;IACvB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,IAAI,SAAS;CACd;AAED,yCAAyC;AACzC,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,SAAS,eAAe;IACxB,mGAAmG;IACnG,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** What the answer must be. */
|
|
2
|
+
export var DelegatedMode;
|
|
3
|
+
(function (DelegatedMode) {
|
|
4
|
+
/** Prose or code. */
|
|
5
|
+
DelegatedMode["Text"] = "text";
|
|
6
|
+
/** Exactly one JSON object satisfying `outputSchema`. */
|
|
7
|
+
DelegatedMode["Json"] = "json";
|
|
8
|
+
/** A list of calls chosen from `tools`. */
|
|
9
|
+
DelegatedMode["Tools"] = "tools";
|
|
10
|
+
})(DelegatedMode || (DelegatedMode = {}));
|
|
11
|
+
/** Who a message came from. Deliberately the four roles every chat API agrees on. */
|
|
12
|
+
export var DelegatedRole;
|
|
13
|
+
(function (DelegatedRole) {
|
|
14
|
+
DelegatedRole["System"] = "system";
|
|
15
|
+
DelegatedRole["User"] = "user";
|
|
16
|
+
DelegatedRole["Assistant"] = "assistant";
|
|
17
|
+
DelegatedRole["Tool"] = "tool";
|
|
18
|
+
})(DelegatedRole || (DelegatedRole = {}));
|
|
19
|
+
/** What shape an answer came back in. */
|
|
20
|
+
export var DelegatedResultKind;
|
|
21
|
+
(function (DelegatedResultKind) {
|
|
22
|
+
DelegatedResultKind["Text"] = "text";
|
|
23
|
+
DelegatedResultKind["Json"] = "json";
|
|
24
|
+
DelegatedResultKind["ToolCalls"] = "tool-calls";
|
|
25
|
+
/** The performer could not answer. Treated as a malformed answer: asked again, with the reason. */
|
|
26
|
+
DelegatedResultKind["Error"] = "error";
|
|
27
|
+
})(DelegatedResultKind || (DelegatedResultKind = {}));
|
|
28
|
+
//# sourceMappingURL=consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/delegate/consts.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,qBAAqB;IACrB,8BAAa,CAAA;IACb,yDAAyD;IACzD,8BAAa,CAAA;IACb,2CAA2C;IAC3C,gCAAe,CAAA;AACjB,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAED,qFAAqF;AACrF,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,8BAAa,CAAA;IACb,wCAAuB,CAAA;IACvB,8BAAa,CAAA;AACf,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,yCAAyC;AACzC,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,oCAAa,CAAA;IACb,+CAAwB,CAAA;IACxB,mGAAmG;IACnG,sCAAe,CAAA;AACjB,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/delegate/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/delegate/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA"}
|
package/build/delegate/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/delegate/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/delegate/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA"}
|
|
@@ -9,30 +9,7 @@
|
|
|
9
9
|
* There is no vocabulary here from whatever pipeline asked. A `role` and a `tier` travel because
|
|
10
10
|
* the performer has to choose a model; nothing else about the caller does.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
export declare enum DelegatedMode {
|
|
14
|
-
/** Prose or code. */
|
|
15
|
-
Text = "text",
|
|
16
|
-
/** Exactly one JSON object satisfying `outputSchema`. */
|
|
17
|
-
Json = "json",
|
|
18
|
-
/** A list of calls chosen from `tools`. */
|
|
19
|
-
Tools = "tools"
|
|
20
|
-
}
|
|
21
|
-
/** Who a message came from. Deliberately the four roles every chat API agrees on. */
|
|
22
|
-
export declare enum DelegatedRole {
|
|
23
|
-
System = "system",
|
|
24
|
-
User = "user",
|
|
25
|
-
Assistant = "assistant",
|
|
26
|
-
Tool = "tool"
|
|
27
|
-
}
|
|
28
|
-
/** What shape an answer came back in. */
|
|
29
|
-
export declare enum DelegatedResultKind {
|
|
30
|
-
Text = "text",
|
|
31
|
-
Json = "json",
|
|
32
|
-
ToolCalls = "tool-calls",
|
|
33
|
-
/** The performer could not answer. Treated as a malformed answer: asked again, with the reason. */
|
|
34
|
-
Error = "error"
|
|
35
|
-
}
|
|
12
|
+
import { DelegatedMode, DelegatedResultKind, DelegatedRole } from './consts.js';
|
|
36
13
|
export interface DelegatedToolCall {
|
|
37
14
|
id?: string;
|
|
38
15
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/delegate/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/delegate/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE/E,MAAM,WAAW,iBAAiB;IAChC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,aAAa,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,yCAAyC;IACzC,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC/B,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oCAAoC;IACpC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpE,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,0FAA0F;IAC1F,QAAQ,EAAE,MAAM,CAAA;IAChB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,aAAa,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,gBAAgB,EAAE,CAAA;IAC5B,KAAK,CAAC,EAAE,aAAa,EAAE,CAAA;IACvB,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,mBAAmB,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4EAA4E;IAC5E,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA;CAClF"}
|
package/build/delegate/types.js
CHANGED
|
@@ -9,31 +9,5 @@
|
|
|
9
9
|
* There is no vocabulary here from whatever pipeline asked. A `role` and a `tier` travel because
|
|
10
10
|
* the performer has to choose a model; nothing else about the caller does.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
export var DelegatedMode;
|
|
14
|
-
(function (DelegatedMode) {
|
|
15
|
-
/** Prose or code. */
|
|
16
|
-
DelegatedMode["Text"] = "text";
|
|
17
|
-
/** Exactly one JSON object satisfying `outputSchema`. */
|
|
18
|
-
DelegatedMode["Json"] = "json";
|
|
19
|
-
/** A list of calls chosen from `tools`. */
|
|
20
|
-
DelegatedMode["Tools"] = "tools";
|
|
21
|
-
})(DelegatedMode || (DelegatedMode = {}));
|
|
22
|
-
/** Who a message came from. Deliberately the four roles every chat API agrees on. */
|
|
23
|
-
export var DelegatedRole;
|
|
24
|
-
(function (DelegatedRole) {
|
|
25
|
-
DelegatedRole["System"] = "system";
|
|
26
|
-
DelegatedRole["User"] = "user";
|
|
27
|
-
DelegatedRole["Assistant"] = "assistant";
|
|
28
|
-
DelegatedRole["Tool"] = "tool";
|
|
29
|
-
})(DelegatedRole || (DelegatedRole = {}));
|
|
30
|
-
/** What shape an answer came back in. */
|
|
31
|
-
export var DelegatedResultKind;
|
|
32
|
-
(function (DelegatedResultKind) {
|
|
33
|
-
DelegatedResultKind["Text"] = "text";
|
|
34
|
-
DelegatedResultKind["Json"] = "json";
|
|
35
|
-
DelegatedResultKind["ToolCalls"] = "tool-calls";
|
|
36
|
-
/** The performer could not answer. Treated as a malformed answer: asked again, with the reason. */
|
|
37
|
-
DelegatedResultKind["Error"] = "error";
|
|
38
|
-
})(DelegatedResultKind || (DelegatedResultKind = {}));
|
|
12
|
+
export {};
|
|
39
13
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/delegate/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/delegate/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/results/consts.local.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,eAAO,MAAM,SAAS,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/results/consts.local.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/results/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/results/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAGnD;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,SAAU,iBAAiB,GAAG,IAAI,GAAG,SAAS,KAAG,MAmBpF,CAAA"}
|
package/build/results/utils.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CUMULATIVE_RESULTS_OMITTED_LEAD, CUMULATIVE_RESULTS_OMITTED_TAIL, CUMULATIVE_RESULTS_PREAMBLE, } from './consts.js';
|
|
2
|
-
|
|
3
|
-
const SEPARATOR = '\n\n';
|
|
2
|
+
import { SEPARATOR } from './consts.local.js';
|
|
4
3
|
/**
|
|
5
4
|
* A {@link CumulativeResults} view as prompt text, or `''` when there is nothing to say.
|
|
6
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/results/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAAE,+BAA+B,EAAE,2BAA2B,GAC9F,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/results/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAAE,+BAA+B,EAAE,2BAA2B,GAC9F,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE7C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAA0C,EAAU,EAAE;IAC5F,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,OAAO,EAAE,CAAA;IACX,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAA;IAC9F,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;IAC/D,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClD,OAAO,EAAE,CAAA;IACX,CAAC;IAED,MAAM,KAAK,GAAG,CAAC,2BAA2B,EAAE,GAAG,QAAQ,CAAC,CAAA;IACxD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CACR,GAAG,+BAA+B,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;cACrF,+BAA+B,CAClC,CAAA;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC9B,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/llm-common",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.38",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@langchain/core": "^1.2.
|
|
25
|
+
"@langchain/core": "^1.2.14",
|
|
26
26
|
"@owlmeans/dep-config": "workspace:*",
|
|
27
27
|
"nodemon": "^3.1.14",
|
|
28
28
|
"typescript": "^7.0.2"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** What the answer must be. */
|
|
2
|
+
export enum DelegatedMode {
|
|
3
|
+
/** Prose or code. */
|
|
4
|
+
Text = 'text',
|
|
5
|
+
/** Exactly one JSON object satisfying `outputSchema`. */
|
|
6
|
+
Json = 'json',
|
|
7
|
+
/** A list of calls chosen from `tools`. */
|
|
8
|
+
Tools = 'tools',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Who a message came from. Deliberately the four roles every chat API agrees on. */
|
|
12
|
+
export enum DelegatedRole {
|
|
13
|
+
System = 'system',
|
|
14
|
+
User = 'user',
|
|
15
|
+
Assistant = 'assistant',
|
|
16
|
+
Tool = 'tool',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** What shape an answer came back in. */
|
|
20
|
+
export enum DelegatedResultKind {
|
|
21
|
+
Text = 'text',
|
|
22
|
+
Json = 'json',
|
|
23
|
+
ToolCalls = 'tool-calls',
|
|
24
|
+
/** The performer could not answer. Treated as a malformed answer: asked again, with the reason. */
|
|
25
|
+
Error = 'error',
|
|
26
|
+
}
|
package/src/delegate/index.ts
CHANGED
package/src/delegate/types.ts
CHANGED
|
@@ -10,32 +10,7 @@
|
|
|
10
10
|
* the performer has to choose a model; nothing else about the caller does.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
export enum DelegatedMode {
|
|
15
|
-
/** Prose or code. */
|
|
16
|
-
Text = 'text',
|
|
17
|
-
/** Exactly one JSON object satisfying `outputSchema`. */
|
|
18
|
-
Json = 'json',
|
|
19
|
-
/** A list of calls chosen from `tools`. */
|
|
20
|
-
Tools = 'tools',
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/** Who a message came from. Deliberately the four roles every chat API agrees on. */
|
|
24
|
-
export enum DelegatedRole {
|
|
25
|
-
System = 'system',
|
|
26
|
-
User = 'user',
|
|
27
|
-
Assistant = 'assistant',
|
|
28
|
-
Tool = 'tool',
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/** What shape an answer came back in. */
|
|
32
|
-
export enum DelegatedResultKind {
|
|
33
|
-
Text = 'text',
|
|
34
|
-
Json = 'json',
|
|
35
|
-
ToolCalls = 'tool-calls',
|
|
36
|
-
/** The performer could not answer. Treated as a malformed answer: asked again, with the reason. */
|
|
37
|
-
Error = 'error',
|
|
38
|
-
}
|
|
13
|
+
import { DelegatedMode, DelegatedResultKind, DelegatedRole } from './consts.js'
|
|
39
14
|
|
|
40
15
|
export interface DelegatedToolCall {
|
|
41
16
|
id?: string
|
package/src/results/utils.ts
CHANGED
|
@@ -2,9 +2,7 @@ import {
|
|
|
2
2
|
CUMULATIVE_RESULTS_OMITTED_LEAD, CUMULATIVE_RESULTS_OMITTED_TAIL, CUMULATIVE_RESULTS_PREAMBLE,
|
|
3
3
|
} from './consts.js'
|
|
4
4
|
import type { CumulativeResults } from './types.js'
|
|
5
|
-
|
|
6
|
-
/** Separator between sections — the same two newlines every other prompt join uses. */
|
|
7
|
-
const SEPARATOR = '\n\n'
|
|
5
|
+
import { SEPARATOR } from './consts.local.js'
|
|
8
6
|
|
|
9
7
|
/**
|
|
10
8
|
* A {@link CumulativeResults} view as prompt text, or `''` when there is nothing to say.
|