@duetso/agent 0.1.190 → 0.1.192
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 +27 -0
- package/dist/package.json +2 -2
- package/dist/src/cli/help.d.ts +1 -0
- package/dist/src/cli/help.d.ts.map +1 -1
- package/dist/src/cli/help.js +65 -0
- package/dist/src/cli/help.js.map +1 -1
- package/dist/src/cli/memory-db.d.ts +21 -1
- package/dist/src/cli/memory-db.d.ts.map +1 -1
- package/dist/src/cli/memory-db.js +54 -1
- package/dist/src/cli/memory-db.js.map +1 -1
- package/dist/src/cli/memory-reflect.js +1 -1
- package/dist/src/cli/memory-reflect.js.map +1 -1
- package/dist/src/cli/train.d.ts +31 -0
- package/dist/src/cli/train.d.ts.map +1 -0
- package/dist/src/cli/train.js +565 -0
- package/dist/src/cli/train.js.map +1 -0
- package/dist/src/cli.d.ts +1 -0
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +6 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/memory/context-pack.d.ts.map +1 -1
- package/dist/src/memory/context-pack.js +1 -0
- package/dist/src/memory/context-pack.js.map +1 -1
- package/dist/src/memory/loader.d.ts +4 -1
- package/dist/src/memory/loader.d.ts.map +1 -1
- package/dist/src/memory/loader.js +7 -3
- package/dist/src/memory/loader.js.map +1 -1
- package/dist/src/memory/observational.d.ts +3 -0
- package/dist/src/memory/observational.d.ts.map +1 -1
- package/dist/src/memory/observational.js +16 -0
- package/dist/src/memory/observational.js.map +1 -1
- package/dist/src/train/archive.d.ts +26 -0
- package/dist/src/train/archive.d.ts.map +1 -0
- package/dist/src/train/archive.js +98 -0
- package/dist/src/train/archive.js.map +1 -0
- package/dist/src/train/tags.d.ts +17 -0
- package/dist/src/train/tags.d.ts.map +1 -0
- package/dist/src/train/tags.js +24 -0
- package/dist/src/train/tags.js.map +1 -0
- package/dist/src/train/types.d.ts +62 -0
- package/dist/src/train/types.d.ts.map +1 -0
- package/dist/src/train/types.js +2 -0
- package/dist/src/train/types.js.map +1 -0
- package/dist/src/types/memory.d.ts +25 -9
- package/dist/src/types/memory.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/train/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;sEACsE;AACtE,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC;CAClE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/train/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/** Relative importance used for recall ordering and prompt rendering. */
|
|
2
2
|
export type ObservationPriority = "high" | "medium" | "low";
|
|
3
3
|
/**
|
|
4
|
-
* Whether a row is a raw observation
|
|
5
|
-
* reflector. Reflections rank higher
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Whether a row is a raw observation, a reflection synthesized by the
|
|
5
|
+
* reflector, or a manually curated row. Reflections rank higher than raw
|
|
6
|
+
* observations by default (see `reflectionBias`) because they are condensed
|
|
7
|
+
* cross-observation summaries that survived a curation pass; the loader
|
|
8
|
+
* prefers them when the global budget tightens.
|
|
9
|
+
*
|
|
10
|
+
* `manual` rows are ones a user deliberately curated (e.g. `duet train`
|
|
11
|
+
* corpus syntheses), distinct from raw `observation` rows and
|
|
12
|
+
* auto-synthesized `reflection` rows. They rank above both via `manualBias`
|
|
13
|
+
* and are never compacted by the reflect prune.
|
|
8
14
|
*/
|
|
9
|
-
export type ObservationKind = "observation" | "reflection";
|
|
15
|
+
export type ObservationKind = "observation" | "reflection" | "manual";
|
|
10
16
|
/**
|
|
11
17
|
* Where an observation came from. Used for auditability and downstream
|
|
12
18
|
* filtering. Tool provenance is captured as `tool:<name>` in `tags`
|
|
@@ -47,10 +53,11 @@ export interface Observation {
|
|
|
47
53
|
*/
|
|
48
54
|
sessionId?: string;
|
|
49
55
|
/**
|
|
50
|
-
* Whether this row is a raw observation
|
|
51
|
-
* replaces a batch of observations with a
|
|
52
|
-
* downstream ranking gives reflections a
|
|
53
|
-
*
|
|
56
|
+
* Whether this row is a raw observation, a reflection, or a manually
|
|
57
|
+
* curated row. The reflector replaces a batch of observations with a
|
|
58
|
+
* single condensed reflection; downstream ranking gives reflections a
|
|
59
|
+
* multiplier (`reflectionBias`) and manual rows a larger one
|
|
60
|
+
* (`manualBias`) to match their higher signal-per-token.
|
|
54
61
|
*/
|
|
55
62
|
kind: ObservationKind;
|
|
56
63
|
/** Calendar date the observation is anchored to, usually the day it was observed. */
|
|
@@ -207,6 +214,13 @@ export interface ObservationalMemorySettings {
|
|
|
207
214
|
* observations out of the global pack.
|
|
208
215
|
*/
|
|
209
216
|
reflectionBias: number;
|
|
217
|
+
/**
|
|
218
|
+
* Multiplier applied to a row's score when `kind === 'manual'`,
|
|
219
|
+
* analogous to `reflectionBias`. Default 100 (see DEFAULT_MANUAL_BIAS)
|
|
220
|
+
* so curated rows sit at the top of the global pack — `ln(100) ≈ 4.6`,
|
|
221
|
+
* about 32 days of recency head start at the default half-life.
|
|
222
|
+
*/
|
|
223
|
+
manualBias: number;
|
|
210
224
|
/** Whether the recall_memory tool and embedding backfill are enabled. */
|
|
211
225
|
retrieval: boolean;
|
|
212
226
|
}
|
|
@@ -230,6 +244,8 @@ export interface ObservationalMemorySettingsInput {
|
|
|
230
244
|
recencyHalfLifeMs?: number;
|
|
231
245
|
/** Reflection-vs-observation score multiplier; see `ObservationalMemorySettings.reflectionBias`. */
|
|
232
246
|
reflectionBias?: number;
|
|
247
|
+
/** Manual-row score multiplier; see `ObservationalMemorySettings.manualBias`. */
|
|
248
|
+
manualBias?: number;
|
|
233
249
|
/** Whether the recall_memory tool and embedding backfill are enabled. */
|
|
234
250
|
retrieval?: boolean;
|
|
235
251
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/types/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;;;;;;;OASG;IACH,wBAAwB,EAAE,MAAM,CAAC;IACjC;;;;;;;;;;;OAWG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAC/C,WAAW,CAAC,EAAE;QACZ,sEAAsE;QACtE,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,qEAAqE;QACrE,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IACF,UAAU,CAAC,EAAE;QACX,uEAAuE;QACvE,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,yGAAyG;IACzG,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oGAAoG;IACpG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duetso/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.192",
|
|
4
4
|
"description": "An opinionated full-stack agent turn runner with native memories, interrupts, and multi-agent orchestration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"check-types": "tsc --noEmit",
|
|
44
44
|
"cli": "bun src/cli.ts",
|
|
45
45
|
"dev": "tsc --watch",
|
|
46
|
-
"eval": "docker run --rm -v \"$PWD:/src:ro\" -w /work -e HOME=/tmp/home -e DUET_TEST_IN_DOCKER=1 oven/bun:1.3.11 sh -lc 'cp -R /src/. /work && bun install --frozen-lockfile && bun test ./evals/*.eval.ts'",
|
|
46
|
+
"eval": "docker run --rm -v \"$PWD:/src:ro\" -w /work -e HOME=/tmp/home -e DUET_TEST_IN_DOCKER=1 -e DUET_API_KEY -e ANTHROPIC_API_KEY -e OPENAI_API_KEY -e EVAL_MODEL -e JUDGE_MODEL -e COVERAGE_THRESHOLD oven/bun:1.3.11 sh -lc 'cp -R /src/. /work && bun install --frozen-lockfile && bun test ./evals/*.eval.ts'",
|
|
47
47
|
"format": "oxfmt --write --no-error-on-unmatched-pattern",
|
|
48
48
|
"format:check": "oxfmt --check --no-error-on-unmatched-pattern",
|
|
49
49
|
"lint": "oxlint src/",
|