@amykit/agent-kit 0.2.0 → 0.3.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/dist/ladder.d.ts +17 -0
- package/dist/ladder.d.ts.map +1 -1
- package/dist/ladder.js.map +1 -1
- package/dist/tiers.d.ts +2 -0
- package/dist/tiers.d.ts.map +1 -1
- package/dist/tiers.js +21 -2
- package/dist/tiers.js.map +1 -1
- package/package.json +3 -3
package/dist/ladder.d.ts
CHANGED
|
@@ -3,6 +3,23 @@ export interface Rung {
|
|
|
3
3
|
readonly name: string;
|
|
4
4
|
readonly harness: string;
|
|
5
5
|
readonly model: string;
|
|
6
|
+
/**
|
|
7
|
+
* This rung's runs arrive with a cost on them without the price table
|
|
8
|
+
* being consulted.
|
|
9
|
+
*
|
|
10
|
+
* Declared by the harness plugin, because only it knows how its CLI
|
|
11
|
+
* accounts: claude puts `total_cost_usd` in its envelope, and hermes
|
|
12
|
+
* writes `cost_status: "included"` for a model that ran locally, where
|
|
13
|
+
* zero is the right answer and no row in any price table would ever
|
|
14
|
+
* exist. codex has the table and nothing else.
|
|
15
|
+
*
|
|
16
|
+
* Read by whoever asks whether a ceiling in money could stop anything.
|
|
17
|
+
* Without it that question collapses into "is this model in the table",
|
|
18
|
+
* which is a different question with the same answer only for codex —
|
|
19
|
+
* and refusing an install whose costs arrive reported is the same failure
|
|
20
|
+
* as an inert ceiling, arrived at from the other side.
|
|
21
|
+
*/
|
|
22
|
+
readonly pricesItsOwnRuns?: boolean;
|
|
6
23
|
}
|
|
7
24
|
/**
|
|
8
25
|
* Where to go after a rung did not work out, or nowhere.
|
package/dist/ladder.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ladder.d.ts","sourceRoot":"","sources":["../src/ladder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ladder.d.ts","sourceRoot":"","sources":["../src/ladder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,SAAS,IAAI,EAAE,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,YAAY,GACpB,MAAM,GAAG,IAAI,CAaf"}
|
package/dist/ladder.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ladder.js","sourceRoot":"","sources":["../src/ladder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ladder.js","sourceRoot":"","sources":["../src/ladder.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAuB,EACvB,OAAe,EACf,OAAqB;IAErB,IAAI,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAEpE,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,KAAK,IAAI,KAAK,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAE,CAAC;QAC5B,IAAI,OAAO,KAAK,cAAc,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO;YAAE,SAAS;QAC1E,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/tiers.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export interface TierOptions {
|
|
|
10
10
|
*/
|
|
11
11
|
models: readonly string[];
|
|
12
12
|
make: (model: string) => Harness;
|
|
13
|
+
/** See `Rung.pricesItsOwnRuns`. Declared once per harness, not per tier. */
|
|
14
|
+
pricesItsOwnRuns?: boolean;
|
|
13
15
|
git: Git;
|
|
14
16
|
agent?: HarnessAgentConfig;
|
|
15
17
|
}
|
package/dist/tiers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiers.d.ts","sourceRoot":"","sources":["../src/tiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAwC,UAAU,EAAgB,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAgB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAErE,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACjC,GAAG,EAAE,GAAG,CAAC;IACT,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,GAAG,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"tiers.d.ts","sourceRoot":"","sources":["../src/tiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAwC,UAAU,EAAgB,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAgB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAErE,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACjC,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,GAAG,EAAE,GAAG,CAAC;IACT,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,GAAG,UAAU,EAAE,CAkCnF;AAED,gEAAgE;AAChE,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/D"}
|
package/dist/tiers.js
CHANGED
|
@@ -16,11 +16,30 @@ import { HarnessAgent } from "./HarnessAgent.js";
|
|
|
16
16
|
* level reads it.
|
|
17
17
|
*/
|
|
18
18
|
export function contributeTiers(registry, opts) {
|
|
19
|
-
|
|
19
|
+
// The union the config sent can name a model twice — `ladder` and a step's
|
|
20
|
+
// own both saying `claude:opus` is the shape `amy init` ships. A rung is a
|
|
21
|
+
// name in a collection here, and a second contribution under a name already
|
|
22
|
+
// present is refused at boot. Dedupe, keeping the first mention: a ladder
|
|
23
|
+
// is ordered, and the first mention is the one that means something.
|
|
24
|
+
const seen = new Set();
|
|
25
|
+
const models = opts.models.filter((model) => {
|
|
26
|
+
const key = `${model}`;
|
|
27
|
+
if (seen.has(key))
|
|
28
|
+
return false;
|
|
29
|
+
seen.add(key);
|
|
30
|
+
return true;
|
|
31
|
+
});
|
|
32
|
+
if (models.length === 0)
|
|
33
|
+
models.push("");
|
|
20
34
|
return models.map((model) => {
|
|
21
35
|
const cli = opts.make(model);
|
|
22
36
|
const agent = (skill) => new HarnessAgent(cli, opts.git, { ...(opts.agent ?? {}), skill });
|
|
23
|
-
const rung = {
|
|
37
|
+
const rung = {
|
|
38
|
+
name: tierName(opts.harness, model),
|
|
39
|
+
harness: opts.harness,
|
|
40
|
+
model,
|
|
41
|
+
pricesItsOwnRuns: opts.pricesItsOwnRuns ?? false,
|
|
42
|
+
};
|
|
24
43
|
const named = { ...rung, agent: agent(), using: (skill) => agent(skill) };
|
|
25
44
|
const bare = { ...rung, cli };
|
|
26
45
|
registry.contribute(AGENT_COLLECTION, named.name, named);
|
package/dist/tiers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiers.js","sourceRoot":"","sources":["../src/tiers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAA4B,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAE,YAAY,EAAsB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"tiers.js","sourceRoot":"","sources":["../src/tiers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAA4B,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAE,YAAY,EAAsB,MAAM,mBAAmB,CAAC;AAiBrE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,eAAe,CAAC,QAAkB,EAAE,IAAiB;IACnE,2EAA2E;IAC3E,2EAA2E;IAC3E,4EAA4E;IAC5E,0EAA0E;IAC1E,qEAAqE;IACrE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAA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C,CAAC;QAEzD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,QAAQ,CAAC,OAAe,EAAE,KAAa;IACrD,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;AACjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amykit/agent-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "What every agent does the same way: the prompts, the git dance, and the JSON.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@amykit/core": "^0.
|
|
32
|
-
"@amykit/workflow-ticket-to-qa": "^0.
|
|
31
|
+
"@amykit/core": "^0.3.0",
|
|
32
|
+
"@amykit/workflow-ticket-to-qa": "^0.3.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@amykit/test-fixtures": "^0.1.0"
|