@open-tomato/rafa 0.31.0 → 0.32.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.
@@ -313,6 +313,7 @@ function messageOf(error) {
313
313
  var CONFIG_VERSIONS = [1];
314
314
  var STORE_BACKENDS = ["sqlite", "ndjson"];
315
315
  var SYNC_STRATEGIES = ["local", "file", "git", "service", "p2p"];
316
+ var BOARD_RELATIONSHIP_MODES = ["labels", "native"];
316
317
  var INJECT_MODES = ["full", "stage", "task"];
317
318
  var OUTPUT_MODES = ["text", "json"];
318
319
  var CLAUDE_SETTING_SOURCES = ["user", "project", "local"];
@@ -321,6 +322,8 @@ var RELEASE_AUTO = "auto";
321
322
  var TIER_SWITCHES = ["on", "off"];
322
323
  var SKILL_RESOLVERS = ["planner", "tag", "none"];
323
324
  var LESSON_SWITCHES = ["on", "off"];
325
+ var CLAIMS_STALE_DISABLED = "disabled";
326
+ var CLAIMS_AHEAD = ["off", "allow"];
324
327
  function accepted(value) {
325
328
  return { value, problems: [], extras: [] };
326
329
  }
@@ -377,6 +380,17 @@ var tierPin = (raw, at) => {
377
380
  var routeTarget = (raw, at) => raw === false || typeof raw === "string" && raw.trim() !== "" ? accepted(raw) : refused(at, raw, "false or an agent name");
378
381
  var skillResolverName = oneOf(SKILL_RESOLVERS);
379
382
  var lessonSwitch = oneOf(LESSON_SWITCHES);
383
+ var CLAIM_DURATION = /^(\d+)([hd])$/;
384
+ var HOURS_PER_DAY = 24;
385
+ function claimDurationHours(raw) {
386
+ const match = typeof raw === "string" ? CLAIM_DURATION.exec(raw) : null;
387
+ if (match === null)
388
+ return null;
389
+ const hours = Number(match[1]) * (match[2] === "d" ? HOURS_PER_DAY : 1);
390
+ return Number.isSafeInteger(hours) && hours > 0 ? hours : null;
391
+ }
392
+ var claimsStaleAfter = (raw, at) => raw === CLAIMS_STALE_DISABLED || claimDurationHours(raw) !== null ? accepted(raw) : refused(at, raw, `a duration of whole hours or days above zero, such as 36h or 3d, or ${CLAIMS_STALE_DISABLED}`);
393
+ var claimsAhead = oneOf(CLAIMS_AHEAD);
380
394
  var GITHUB_LOGIN = /^[A-Za-z0-9][A-Za-z0-9-]*(?:\[bot\])?$/;
381
395
  function isGitHubLogin(value) {
382
396
  return typeof value === "string" && GITHUB_LOGIN.test(value);
@@ -410,75 +424,5 @@ function subsetOf(values) {
410
424
  return accepted(Object.freeze(named));
411
425
  };
412
426
  }
413
- var itemText = text("a non-empty string");
414
- function readKeyedItem(shape, raw, at) {
415
- const choices = shape.kinds.join(", ");
416
- if (!isMapping(raw))
417
- return refused(at, raw, `a mapping naming one of: ${choices}`);
418
- const entries = Object.entries(raw);
419
- const kinds = shape.kinds.filter((kind2) => entries.some(([name]) => name === kind2));
420
- const [kind] = kinds;
421
- if (kind === undefined)
422
- return refusedWith([`${at.label} names none of: ${choices}`]);
423
- if (kinds.length > 1) {
424
- const named2 = kinds.join(" and ");
425
- return refusedWith([`${at.label} names ${named2}, expected exactly one of: ${choices}`]);
426
- }
427
- const optionalKeys = shape.optionalFor(kind);
428
- const problems = [];
429
- const extras = [];
430
- const optional = new Map;
431
- let named;
432
- for (const [name, value] of entries) {
433
- if (name !== kind && !optionalKeys.includes(name)) {
434
- extras.push({ key: `${at.key}.${name}`, value });
435
- continue;
436
- }
437
- if (name !== kind && value === null)
438
- continue;
439
- const reading = itemText(value, below(at, `.${name}`));
440
- problems.push(...reading.problems);
441
- if (reading.value === undefined)
442
- continue;
443
- if (name === kind)
444
- named = reading.value;
445
- else
446
- optional.set(name, reading.value);
447
- }
448
- return problems.length > 0 || named === undefined ? { value: undefined, problems, extras } : { value: { kind, named, optional }, problems, extras };
449
- }
450
- var PREREQUISITE_KINDS = ["tool", "env", "service", "lsp"];
451
- var REQUIRED_ITEM_KEYS = [...PREREQUISITE_KINDS, "probe"];
452
- var OPTIONAL_ITEM_KEYS = [...REQUIRED_ITEM_KEYS, "reason"];
453
- var requiredPrerequisite = (raw, at) => {
454
- const shape = { kinds: PREREQUISITE_KINDS, optionalFor: () => ["probe"] };
455
- return mapReading(readKeyedItem(shape, raw, at), (item) => Object.freeze({
456
- kind: item.kind,
457
- name: item.named,
458
- probe: item.optional.get("probe") ?? null
459
- }));
460
- };
461
- var optionalPrerequisite = (raw, at) => {
462
- const shape = { kinds: PREREQUISITE_KINDS, optionalFor: () => ["probe", "reason"] };
463
- return mapReading(readKeyedItem(shape, raw, at), (item) => Object.freeze({
464
- kind: item.kind,
465
- name: item.named,
466
- probe: item.optional.get("probe") ?? null,
467
- reason: item.optional.get("reason") ?? null
468
- }));
469
- };
470
- var MODULE_SOURCE_KINDS = ["npm", "github", "path"];
471
- var MODULE_SOURCE_KEYS = [...MODULE_SOURCE_KINDS, "ref"];
472
- var moduleSource = (raw, at) => {
473
- const shape = {
474
- kinds: MODULE_SOURCE_KINDS,
475
- optionalFor: (kind) => kind === "github" ? ["ref"] : []
476
- };
477
- return mapReading(readKeyedItem(shape, raw, at), (item) => Object.freeze({
478
- kind: item.kind,
479
- location: item.named,
480
- ref: item.optional.get("ref") ?? null
481
- }));
482
- };
483
427
 
484
- export { MERGE_METHODS, isMergeMethod, SKILL_TIERS, RAFA_INSTINCTS_PATH, BUNDLED_SKILLS_DIR, isSkillTier, realEntry, bundledBinDirectory, skillTierDirectory, resolveSkillTiers, resolveInstinctScopes, tierExists, isAgentName, BUDGET_FLAG, parseBudgetUsd, parseTaskDeclaration, stripTaskDeclaration, resolveDeclarationFlags, isMapping, describeValue, messageOf, CONFIG_VERSIONS, STORE_BACKENDS, SYNC_STRATEGIES, INJECT_MODES, OUTPUT_MODES, CLAUDE_SETTING_SOURCES, PR_PROVIDERS, RELEASE_AUTO, SKILL_RESOLVERS, oneOf, text, flag, mergeMethod, usdAmount, issueNumber, dayCount, BUSY_TIMEOUT_MIN_MS, BUSY_TIMEOUT_MAX_MS, isBusyTimeoutMs, busyTimeoutMs, confidence, recurrenceCount, releaseEnabled, tierSwitch, tierPin, routeTarget, skillResolverName, lessonSwitch, isGitHubLogin, githubLogin, listOf, subsetOf, PREREQUISITE_KINDS, REQUIRED_ITEM_KEYS, OPTIONAL_ITEM_KEYS, requiredPrerequisite, optionalPrerequisite, MODULE_SOURCE_KINDS, MODULE_SOURCE_KEYS, moduleSource };
428
+ export { MERGE_METHODS, isMergeMethod, SKILL_TIERS, RAFA_INSTINCTS_PATH, BUNDLED_SKILLS_DIR, isSkillTier, realEntry, bundledBinDirectory, skillTierDirectory, resolveSkillTiers, resolveInstinctScopes, tierExists, isAgentName, BUDGET_FLAG, parseBudgetUsd, parseTaskDeclaration, stripTaskDeclaration, resolveDeclarationFlags, isMapping, describeValue, messageOf, CONFIG_VERSIONS, STORE_BACKENDS, SYNC_STRATEGIES, BOARD_RELATIONSHIP_MODES, INJECT_MODES, OUTPUT_MODES, CLAUDE_SETTING_SOURCES, PR_PROVIDERS, RELEASE_AUTO, SKILL_RESOLVERS, CLAIMS_STALE_DISABLED, refused, refusedWith, mapReading, below, oneOf, text, flag, mergeMethod, usdAmount, issueNumber, dayCount, BUSY_TIMEOUT_MIN_MS, BUSY_TIMEOUT_MAX_MS, isBusyTimeoutMs, busyTimeoutMs, confidence, recurrenceCount, releaseEnabled, tierSwitch, tierPin, routeTarget, skillResolverName, lessonSwitch, claimDurationHours, claimsStaleAfter, claimsAhead, isGitHubLogin, githubLogin, listOf, subsetOf };
@@ -14,7 +14,7 @@ import {
14
14
  parseConfigText,
15
15
  readRafaBlocks,
16
16
  resolveConfig
17
- } from "./index-t6q4k1tq.js";
17
+ } from "./index-9aph6ft9.js";
18
18
  import {
19
19
  bless,
20
20
  merge
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  CommandExit,
24
24
  commandSpelling
25
- } from "./index-e10rwa4g.js";
25
+ } from "./index-mt6hpsry.js";
26
26
  import {
27
27
  BUSY_TIMEOUT_MAX_MS,
28
28
  BUSY_TIMEOUT_MIN_MS,
@@ -36,7 +36,7 @@ import {
36
36
  messageOf,
37
37
  resolveInstinctScopes,
38
38
  tierExists
39
- } from "./index-dnwcx1cs.js";
39
+ } from "./index-rs79dq9e.js";
40
40
  import {
41
41
  actionHash,
42
42
  triggerKey
@@ -249,7 +249,7 @@ import { Database } from "bun:sqlite";
249
249
 
250
250
  // package.json
251
251
  var name = "@open-tomato/rafa";
252
- var version = "0.31.0";
252
+ var version = "0.32.0";
253
253
 
254
254
  // src/cli/version.ts
255
255
  var RAFA_VERSION = version;
@@ -5596,4 +5596,4 @@ function selectEffortStore(repoRoot, config) {
5596
5596
  return adapter.create({ repoRoot });
5597
5597
  }
5598
5598
 
5599
- export { EFFORT_STORE_DIR, effortStoreFileName, EFFORT_DIR_VARIABLE, effortStoreDir, guardTestProcess, EFFORT_KEY_PROJECTIONS, openNdjsonStore, name, version, RAFA_VERSION, versionLine, createGitRunner, gitSaid, NOT_A_REPOSITORY, mainCheckoutOf, SCOPE_DIR, INIT_COMMAND, DISK_FILE_SYSTEM, ScopeError, scopeAt, initHint, selfAndAncestors, resolveScope, POSITION_FILE, positionFilePath, readPositionFile, writePositionFile, positionAt, rehome, hop, goHome, HOP_FILE, hopFilePath, readHopRecord, writeHopRecord, staleAgainst, SessionRecordError, SessionConflictError, SessionStateError, isSessionId, runsDir, sessionFilePath, errorCode, isPidAlive, readSessions, readSession, beginSession, updateSession, DEVELOPMENT_NEXT_STEP, DEVELOPMENT_MARK, DevelopmentBuildRefusedError, refuseUnownedDevelopmentWrite, LEGACY_GATE_OPEN, LEGACY_GATE_CLOSED, SQLITE_MIGRATIONS, sqliteCatalogue, planSchema, SchemaRefusedError, readStoreSchema, writeNames, ACROSS_STORES_ORDER, STAMPED_COLUMNS, stampedValues, activeStoreSettings, normalizeRemote, gitRemoteUrl, SQLITE_STORE_FILE_NAME, sqliteStorePath, LONE_SURROGATE, withSqliteStore, writeSqliteStore, openSqliteStore, RebuildRefusal, readConfigFile, loadConfig, plansDirAt, requireProject, resolvePlansDir, resolveProjectConfig, countTasks, formatCounts, checkbox, planFileName, stubOfPlanFile, isFile, issueLine, plural, expectNoArgument, expectOneArgument, expectAtMostOneArgument, readSwitch, fileStamp, fix_schema_default, EffortCopyRefusal, EffortCopyFailure, copyEffortStore, minutesBetween, readCommitLog, UnionSchemaMismatch, migrateStore, MOVE_TO_SQLITE, MergeRefusal, mergeStore, createFileSync, SyncModuleMissing, selectSync, SKILL_FILE, MARKDOWN_EXTENSION, scanLayout, declaredNameIssue, readFrontmatterDocument, readFrontmatter, renderFrontmatter, mergeFrontmatter, writeFrontmatter, ACTION_HEADING, CAUSE_HEADING, parseInstinct, writeInstinct, readScopes, allRecords, findRecords, instinctProject, toHeldRecords, sessionSpawnEnv, getClaudeUsagePercent, checkUsage, CLAUDE_BIN, claudeArgs, interruptClaudeSessions, spawnClaude, runClaude, spawnClaudeCaptured, runClaudeCaptured, planFilePath, ClaudePlannerError, ISSUE_TYPES, ISSUE_PRIORITIES, ISSUE_STATES, GITHUB_LABELS, createGhRunner, typeOfLabels, moduleOfLabels, createLocalTracker, PORT_VERSIONS, createAdapterRegistry, CORE_ADAPTER_REGISTRY, selectEffortStore };
5599
+ export { EFFORT_STORE_DIR, effortStoreFileName, EFFORT_DIR_VARIABLE, effortStoreDir, guardTestProcess, EFFORT_KEY_PROJECTIONS, openNdjsonStore, name, version, RAFA_VERSION, versionLine, createGitRunner, gitSaid, NOT_A_REPOSITORY, mainCheckoutOf, SCOPE_DIR, INIT_COMMAND, DISK_FILE_SYSTEM, ScopeError, scopeAt, initHint, selfAndAncestors, resolveScope, POSITION_FILE, positionFilePath, readPositionFile, writePositionFile, positionAt, rehome, hop, goHome, HOP_FILE, hopFilePath, readHopRecord, writeHopRecord, staleAgainst, SessionRecordError, SessionConflictError, SessionStateError, isSessionId, runsDir, sessionFilePath, errorCode, isPidAlive, readSessions, readSession, beginSession, updateSession, DEVELOPMENT_NEXT_STEP, DEVELOPMENT_MARK, DevelopmentBuildRefusedError, refuseUnownedDevelopmentWrite, LEGACY_GATE_OPEN, LEGACY_GATE_CLOSED, SQLITE_MIGRATIONS, sqliteCatalogue, planSchema, SchemaRefusedError, readStoreSchema, writeNames, ACROSS_STORES_ORDER, STAMPED_COLUMNS, stampedValues, activeStoreSettings, normalizeRemote, gitRemoteUrl, readStoreMeta, SQLITE_STORE_FILE_NAME, sqliteStorePath, LONE_SURROGATE, withSqliteStore, writeSqliteStore, openSqliteStore, RebuildRefusal, readConfigFile, loadConfig, plansDirAt, requireProject, resolvePlansDir, resolveProjectConfig, countTasks, formatCounts, checkbox, planFileName, stubOfPlanFile, isFile, issueLine, plural, expectNoArgument, expectOneArgument, expectAtMostOneArgument, readSwitch, fileStamp, fix_schema_default, EffortCopyRefusal, EffortCopyFailure, copyEffortStore, minutesBetween, readCommitLog, UnionSchemaMismatch, migrateStore, MOVE_TO_SQLITE, MergeRefusal, mergeStore, createFileSync, SyncModuleMissing, selectSync, SKILL_FILE, MARKDOWN_EXTENSION, scanLayout, declaredNameIssue, readFrontmatterDocument, readFrontmatter, renderFrontmatter, mergeFrontmatter, writeFrontmatter, ACTION_HEADING, CAUSE_HEADING, parseInstinct, writeInstinct, readScopes, allRecords, findRecords, instinctProject, toHeldRecords, sessionSpawnEnv, getClaudeUsagePercent, checkUsage, CLAUDE_BIN, claudeArgs, interruptClaudeSessions, spawnClaude, runClaude, spawnClaudeCaptured, runClaudeCaptured, planFilePath, ClaudePlannerError, ISSUE_TYPES, ISSUE_PRIORITIES, ISSUE_STATES, GITHUB_LABELS, createGhRunner, typeOfLabels, moduleOfLabels, createLocalTracker, PORT_VERSIONS, createAdapterRegistry, CORE_ADAPTER_REGISTRY, selectEffortStore };
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  start,
11
11
  usage,
12
12
  validateManifest
13
- } from "./index-szgyrz6j.js";
13
+ } from "./index-qgayjcym.js";
14
14
  import {
15
15
  PLAN_BLOCK_KINDS,
16
16
  PLAN_HEADER_FIELDS,
@@ -24,7 +24,7 @@ import {
24
24
  renderInjection,
25
25
  runPreflight,
26
26
  runShellProbe
27
- } from "./index-89j1m0f6.js";
27
+ } from "./index-pbeyv281.js";
28
28
  import {
29
29
  CORE_ADAPTER_REGISTRY,
30
30
  DISK_FILE_SYSTEM,
@@ -43,13 +43,15 @@ import {
43
43
  scopeAt,
44
44
  selectEffortStore,
45
45
  selfAndAncestors
46
- } from "./index-13wzpgc1.js";
46
+ } from "./index-wvm2s4pr.js";
47
47
  import {
48
48
  CONFIG_DEFAULTS,
49
49
  CONFIG_FILE,
50
50
  ConfigError,
51
51
  FINDING_KINDS,
52
52
  FINDING_SIGNALS,
53
+ MODULE_SOURCE_KINDS,
54
+ PREREQUISITE_KINDS,
53
55
  RAFA_BLOCK_KINDS,
54
56
  REPORT_STATUSES,
55
57
  configFilePath,
@@ -58,22 +60,21 @@ import {
58
60
  parseReport,
59
61
  readRafaBlocks,
60
62
  resolveConfig
61
- } from "./index-t6q4k1tq.js";
63
+ } from "./index-9aph6ft9.js";
62
64
  import"./index-d6d0942q.js";
63
- import"./index-p0njjkjj.js";
64
- import"./index-e10rwa4g.js";
65
+ import"./index-5tftj69y.js";
66
+ import"./index-mt6hpsry.js";
65
67
  import {
68
+ BOARD_RELATIONSHIP_MODES,
66
69
  CLAUDE_SETTING_SOURCES,
67
70
  CONFIG_VERSIONS,
68
71
  INJECT_MODES,
69
- MODULE_SOURCE_KINDS,
70
72
  OUTPUT_MODES,
71
- PREREQUISITE_KINDS,
72
73
  PR_PROVIDERS,
73
74
  RELEASE_AUTO,
74
75
  STORE_BACKENDS,
75
76
  SYNC_STRATEGIES
76
- } from "./index-dnwcx1cs.js";
77
+ } from "./index-rs79dq9e.js";
77
78
  import"./index-wp8c28fd.js";
78
79
  export {
79
80
  validateManifest,
@@ -137,5 +138,6 @@ export {
137
138
  CONFIG_VERSIONS,
138
139
  CONFIG_FILE,
139
140
  CONFIG_DEFAULTS,
140
- CLAUDE_SETTING_SOURCES
141
+ CLAUDE_SETTING_SOURCES,
142
+ BOARD_RELATIONSHIP_MODES
141
143
  };
@@ -12,7 +12,7 @@ import {
12
12
  renderInjection,
13
13
  runPreflight,
14
14
  runShellProbe
15
- } from "../index-89j1m0f6.js";
15
+ } from "../index-pbeyv281.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-t6q4k1tq.js";
24
+ } from "../index-9aph6ft9.js";
25
25
  import {
26
26
  INJECT_MODES
27
- } from "../index-dnwcx1cs.js";
27
+ } from "../index-rs79dq9e.js";
28
28
  import"../index-wp8c28fd.js";
29
29
  export {
30
30
  runShellProbe,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tomato/rafa",
3
- "version": "0.31.0",
3
+ "version": "0.32.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": {