@open-tomato/rafa 0.19.0 → 0.21.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.
@@ -19,6 +19,7 @@ import {
19
19
  isMapping,
20
20
  isSkillTier,
21
21
  issueNumber,
22
+ lessonSwitch,
22
23
  listOf,
23
24
  mergeMethod,
24
25
  messageOf,
@@ -29,16 +30,50 @@ import {
29
30
  releaseEnabled,
30
31
  requiredPrerequisite,
31
32
  routeTarget,
33
+ skillResolverName,
32
34
  subsetOf,
33
35
  text,
34
36
  tierPin,
35
37
  tierSwitch,
36
38
  usdAmount
37
- } from "./index-cedghpva.js";
39
+ } from "./index-pmkgvtfe.js";
38
40
 
39
41
  // src/config-schema.ts
40
42
  import { join } from "path";
41
43
 
44
+ // src/config-readers.ts
45
+ function mapOf(value, expected) {
46
+ return (raw, at) => {
47
+ if (!isMapping(raw)) {
48
+ const problem = `${at.label} is ${describeValue(raw)}, expected a mapping of names to ${expected}`;
49
+ return { value: undefined, problems: [problem], extras: [] };
50
+ }
51
+ const readings = Object.entries(raw).map(([name, entry]) => [
52
+ name,
53
+ name.trim() === "" ? {
54
+ value: undefined,
55
+ problems: [`${at.label} names ${JSON.stringify(name)}, expected a non-empty name`],
56
+ extras: []
57
+ } : value(entry, { label: `${at.label}.${name}`, key: `${at.key}.${name}` })
58
+ ]);
59
+ const problems = readings.flatMap(([, reading]) => reading.problems);
60
+ const extras = readings.flatMap(([, reading]) => reading.extras);
61
+ if (problems.length > 0)
62
+ return { value: undefined, problems, extras };
63
+ const read = new Map;
64
+ for (const [name, reading] of readings) {
65
+ if (reading.value !== undefined)
66
+ read.set(name, reading.value);
67
+ }
68
+ return { value: read, problems, extras };
69
+ };
70
+ }
71
+ var directory = text("a directory path");
72
+ var trackerKind = text("a tracker kind name");
73
+ var releaseFile = text("a file path");
74
+ var tierPins = mapOf(tierPin, "false or a tier");
75
+ var routeTable = mapOf(routeTarget, "false or an agent name");
76
+
42
77
  // src/tiers/resolve.ts
43
78
  import { readFileSync } from "fs";
44
79
  var VENDORED_HEADER = /^<!-- vendored by rafa from .* on \d{4}-\d{2}-\d{2} -->$/;
@@ -205,32 +240,6 @@ var DEFAULT_ROUTING = new Map(DEFAULT_ROUTES);
205
240
 
206
241
  // src/config-schema.ts
207
242
  var CONFIG_FILE = join(".rafa", "config.yaml");
208
- function mapOf(value, expected) {
209
- return (raw, at) => {
210
- if (!isMapping(raw)) {
211
- const problem = `${at.label} is ${describeValue(raw)}, expected a mapping of names to ${expected}`;
212
- return { value: undefined, problems: [problem], extras: [] };
213
- }
214
- const readings = Object.entries(raw).map(([name, entry]) => [
215
- name,
216
- name.trim() === "" ? {
217
- value: undefined,
218
- problems: [`${at.label} names ${JSON.stringify(name)}, expected a non-empty name`],
219
- extras: []
220
- } : value(entry, { label: `${at.label}.${name}`, key: `${at.key}.${name}` })
221
- ]);
222
- const problems = readings.flatMap(([, reading]) => reading.problems);
223
- const extras = readings.flatMap(([, reading]) => reading.extras);
224
- if (problems.length > 0)
225
- return { value: undefined, problems, extras };
226
- const read = new Map;
227
- for (const [name, reading] of readings) {
228
- if (reading.value !== undefined)
229
- read.set(name, reading.value);
230
- }
231
- return { value: read, problems, extras };
232
- };
233
- }
234
243
  var CONFIG_DEFAULTS = Object.freeze({
235
244
  version: 1,
236
245
  store: "sqlite",
@@ -270,12 +279,10 @@ var CONFIG_DEFAULTS = Object.freeze({
270
279
  tiersRafa: "on",
271
280
  tiersSkills: new Map,
272
281
  tiersAgents: new Map,
273
- routing: DEFAULT_ROUTING
282
+ routing: DEFAULT_ROUTING,
283
+ taskSkills: "planner",
284
+ taskLessons: "on"
274
285
  });
275
- var directory = text("a directory path");
276
- var trackerKind = text("a tracker kind name");
277
- var releaseFile = text("a file path");
278
- var tierPins = mapOf(tierPin, "false or a tier");
279
286
  var SETTINGS = {
280
287
  version: { key: "version", read: oneOf(CONFIG_VERSIONS), cli: false },
281
288
  store: { key: "store", read: oneOf(STORE_BACKENDS), cli: true },
@@ -370,11 +377,9 @@ var SETTINGS = {
370
377
  tiersRafa: { key: "tiers.rafa", read: tierSwitch, cli: false },
371
378
  tiersSkills: { key: "tiers.skills", read: tierPins, cli: false },
372
379
  tiersAgents: { key: "tiers.agents", read: tierPins, cli: false },
373
- routing: {
374
- key: "routing",
375
- read: mapOf(routeTarget, "false or an agent name"),
376
- cli: false
377
- }
380
+ routing: { key: "routing", read: routeTable, cli: false },
381
+ taskSkills: { key: "task.skills", read: skillResolverName, cli: true },
382
+ taskLessons: { key: "task.lessons", read: lessonSwitch, cli: false }
378
383
  };
379
384
  var SETTING_NAMES = Object.keys(SETTINGS);
380
385
  var SETTING_BY_KEY = new Map(SETTING_NAMES.map((setting) => [
@@ -480,7 +485,9 @@ function readLayer(rawOf, atOf) {
480
485
  tiersRafa: read("tiersRafa"),
481
486
  tiersSkills: read("tiersSkills"),
482
487
  tiersAgents: read("tiersAgents"),
483
- routing: read("routing")
488
+ routing: read("routing"),
489
+ taskSkills: read("taskSkills"),
490
+ taskLessons: read("taskLessons")
484
491
  };
485
492
  return { layer, problems, extras };
486
493
  }
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  start,
21
21
  usage,
22
22
  validateManifest
23
- } from "./index-ca0fccvr.js";
23
+ } from "./index-pzpk59ma.js";
24
24
  import {
25
25
  PLAN_BLOCK_KINDS,
26
26
  PLAN_HEADER_FIELDS,
@@ -34,7 +34,7 @@ import {
34
34
  renderInjection,
35
35
  runPreflight,
36
36
  runShellProbe
37
- } from "./index-09p41s0n.js";
37
+ } from "./index-21qkxk63.js";
38
38
  import {
39
39
  CORE_ADAPTER_REGISTRY,
40
40
  EFFORT_KEY_PROJECTIONS,
@@ -43,7 +43,7 @@ import {
43
43
  openNdjsonStore,
44
44
  openSqliteStore,
45
45
  selectEffortStore
46
- } from "./index-gb51x34c.js";
46
+ } from "./index-am92b8qp.js";
47
47
  import {
48
48
  CONFIG_DEFAULTS,
49
49
  CONFIG_FILE,
@@ -58,10 +58,10 @@ import {
58
58
  parseReport,
59
59
  readRafaBlocks,
60
60
  resolveConfig
61
- } from "./index-pqrpcfaz.js";
61
+ } from "./index-twbp38kz.js";
62
62
  import"./index-d6d0942q.js";
63
- import"./index-c5cecsga.js";
64
- import"./index-vg7ycs94.js";
63
+ import"./index-4a45ffqh.js";
64
+ import"./index-28jzpyks.js";
65
65
  import {
66
66
  CLAUDE_SETTING_SOURCES,
67
67
  CONFIG_VERSIONS,
@@ -72,7 +72,7 @@ import {
72
72
  PR_PROVIDERS,
73
73
  RELEASE_AUTO,
74
74
  STORE_BACKENDS
75
- } from "./index-cedghpva.js";
75
+ } from "./index-pmkgvtfe.js";
76
76
  import"./index-wp8c28fd.js";
77
77
  export {
78
78
  validateManifest,
@@ -12,7 +12,7 @@ import {
12
12
  renderInjection,
13
13
  runPreflight,
14
14
  runShellProbe
15
- } from "../index-09p41s0n.js";
15
+ } from "../index-21qkxk63.js";
16
16
  import {
17
17
  FINDING_KINDS,
18
18
  FINDING_SIGNALS,
@@ -21,10 +21,10 @@ import {
21
21
  isRafaBlockKind,
22
22
  parseReport,
23
23
  readRafaBlocks
24
- } from "../index-pqrpcfaz.js";
24
+ } from "../index-twbp38kz.js";
25
25
  import {
26
26
  INJECT_MODES
27
- } from "../index-cedghpva.js";
27
+ } from "../index-pmkgvtfe.js";
28
28
  import"../index-wp8c28fd.js";
29
29
  export {
30
30
  runShellProbe,
@@ -75,6 +75,8 @@ criteria — **do not execute the plan**.
75
75
 
76
76
  {ROUTING}
77
77
 
78
+ {SKILL_INDEX}
79
+
78
80
  ## Spec
79
81
 
80
82
  {SPEC_CONTENT}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tomato/rafa",
3
- "version": "0.19.0",
3
+ "version": "0.21.0",
4
4
  "description": "Alpha. Runs a plan through the ralph loop: one Claude Code session per task, one commit per task, then a pull request and a CI wait.",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -57,7 +57,7 @@
57
57
  "snapshot": "bun scripts/snapshot-runtime.ts"
58
58
  },
59
59
  "devDependencies": {
60
- "@eslint/js": "^10.0.1",
60
+ "@eslint/js": "^9.39.4",
61
61
  "@eslint/markdown": "^8.0.3",
62
62
  "@stylistic/eslint-plugin": "^5.10.0",
63
63
  "@types/bun": "^1.4.0",