@open-tomato/rafa 0.28.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.
- package/README.md +234 -18
- package/dist/bundled/skills/dev-planner/SKILL.md +4 -4
- package/dist/cli.js +35526 -25992
- package/dist/{describe-vbwqxj1f.js → describe-d31jy6dk.js} +3 -3
- package/dist/effort/store/index.js +4 -4
- package/dist/{index-em1vd7kd.js → index-22stnzde.js} +5384 -4755
- package/dist/{index-xwr54rzt.js → index-5tftj69y.js} +2 -2
- package/dist/{index-rv7y8y1j.js → index-9aph6ft9.js} +211 -31
- package/dist/{index-4j1e3h26.js → index-mt6hpsry.js} +1 -1
- package/dist/{index-p1265xgj.js → index-pbeyv281.js} +3 -3
- package/dist/{index-6jkj0dcx.js → index-qgayjcym.js} +15112 -8205
- package/dist/{index-sf2brh4w.js → index-rs79dq9e.js} +16 -71
- package/dist/{index-4rwvr6t4.js → index-wvm2s4pr.js} +1578 -100
- package/dist/index.js +17 -13
- package/dist/plan/index.js +3 -3
- package/package.json +1 -1
|
@@ -312,6 +312,8 @@ function messageOf(error) {
|
|
|
312
312
|
}
|
|
313
313
|
var CONFIG_VERSIONS = [1];
|
|
314
314
|
var STORE_BACKENDS = ["sqlite", "ndjson"];
|
|
315
|
+
var SYNC_STRATEGIES = ["local", "file", "git", "service", "p2p"];
|
|
316
|
+
var BOARD_RELATIONSHIP_MODES = ["labels", "native"];
|
|
315
317
|
var INJECT_MODES = ["full", "stage", "task"];
|
|
316
318
|
var OUTPUT_MODES = ["text", "json"];
|
|
317
319
|
var CLAUDE_SETTING_SOURCES = ["user", "project", "local"];
|
|
@@ -320,6 +322,8 @@ var RELEASE_AUTO = "auto";
|
|
|
320
322
|
var TIER_SWITCHES = ["on", "off"];
|
|
321
323
|
var SKILL_RESOLVERS = ["planner", "tag", "none"];
|
|
322
324
|
var LESSON_SWITCHES = ["on", "off"];
|
|
325
|
+
var CLAIMS_STALE_DISABLED = "disabled";
|
|
326
|
+
var CLAIMS_AHEAD = ["off", "allow"];
|
|
323
327
|
function accepted(value) {
|
|
324
328
|
return { value, problems: [], extras: [] };
|
|
325
329
|
}
|
|
@@ -376,6 +380,17 @@ var tierPin = (raw, at) => {
|
|
|
376
380
|
var routeTarget = (raw, at) => raw === false || typeof raw === "string" && raw.trim() !== "" ? accepted(raw) : refused(at, raw, "false or an agent name");
|
|
377
381
|
var skillResolverName = oneOf(SKILL_RESOLVERS);
|
|
378
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);
|
|
379
394
|
var GITHUB_LOGIN = /^[A-Za-z0-9][A-Za-z0-9-]*(?:\[bot\])?$/;
|
|
380
395
|
function isGitHubLogin(value) {
|
|
381
396
|
return typeof value === "string" && GITHUB_LOGIN.test(value);
|
|
@@ -409,75 +424,5 @@ function subsetOf(values) {
|
|
|
409
424
|
return accepted(Object.freeze(named));
|
|
410
425
|
};
|
|
411
426
|
}
|
|
412
|
-
var itemText = text("a non-empty string");
|
|
413
|
-
function readKeyedItem(shape, raw, at) {
|
|
414
|
-
const choices = shape.kinds.join(", ");
|
|
415
|
-
if (!isMapping(raw))
|
|
416
|
-
return refused(at, raw, `a mapping naming one of: ${choices}`);
|
|
417
|
-
const entries = Object.entries(raw);
|
|
418
|
-
const kinds = shape.kinds.filter((kind2) => entries.some(([name]) => name === kind2));
|
|
419
|
-
const [kind] = kinds;
|
|
420
|
-
if (kind === undefined)
|
|
421
|
-
return refusedWith([`${at.label} names none of: ${choices}`]);
|
|
422
|
-
if (kinds.length > 1) {
|
|
423
|
-
const named2 = kinds.join(" and ");
|
|
424
|
-
return refusedWith([`${at.label} names ${named2}, expected exactly one of: ${choices}`]);
|
|
425
|
-
}
|
|
426
|
-
const optionalKeys = shape.optionalFor(kind);
|
|
427
|
-
const problems = [];
|
|
428
|
-
const extras = [];
|
|
429
|
-
const optional = new Map;
|
|
430
|
-
let named;
|
|
431
|
-
for (const [name, value] of entries) {
|
|
432
|
-
if (name !== kind && !optionalKeys.includes(name)) {
|
|
433
|
-
extras.push({ key: `${at.key}.${name}`, value });
|
|
434
|
-
continue;
|
|
435
|
-
}
|
|
436
|
-
if (name !== kind && value === null)
|
|
437
|
-
continue;
|
|
438
|
-
const reading = itemText(value, below(at, `.${name}`));
|
|
439
|
-
problems.push(...reading.problems);
|
|
440
|
-
if (reading.value === undefined)
|
|
441
|
-
continue;
|
|
442
|
-
if (name === kind)
|
|
443
|
-
named = reading.value;
|
|
444
|
-
else
|
|
445
|
-
optional.set(name, reading.value);
|
|
446
|
-
}
|
|
447
|
-
return problems.length > 0 || named === undefined ? { value: undefined, problems, extras } : { value: { kind, named, optional }, problems, extras };
|
|
448
|
-
}
|
|
449
|
-
var PREREQUISITE_KINDS = ["tool", "env", "service", "lsp"];
|
|
450
|
-
var REQUIRED_ITEM_KEYS = [...PREREQUISITE_KINDS, "probe"];
|
|
451
|
-
var OPTIONAL_ITEM_KEYS = [...REQUIRED_ITEM_KEYS, "reason"];
|
|
452
|
-
var requiredPrerequisite = (raw, at) => {
|
|
453
|
-
const shape = { kinds: PREREQUISITE_KINDS, optionalFor: () => ["probe"] };
|
|
454
|
-
return mapReading(readKeyedItem(shape, raw, at), (item) => Object.freeze({
|
|
455
|
-
kind: item.kind,
|
|
456
|
-
name: item.named,
|
|
457
|
-
probe: item.optional.get("probe") ?? null
|
|
458
|
-
}));
|
|
459
|
-
};
|
|
460
|
-
var optionalPrerequisite = (raw, at) => {
|
|
461
|
-
const shape = { kinds: PREREQUISITE_KINDS, optionalFor: () => ["probe", "reason"] };
|
|
462
|
-
return mapReading(readKeyedItem(shape, raw, at), (item) => Object.freeze({
|
|
463
|
-
kind: item.kind,
|
|
464
|
-
name: item.named,
|
|
465
|
-
probe: item.optional.get("probe") ?? null,
|
|
466
|
-
reason: item.optional.get("reason") ?? null
|
|
467
|
-
}));
|
|
468
|
-
};
|
|
469
|
-
var MODULE_SOURCE_KINDS = ["npm", "github", "path"];
|
|
470
|
-
var MODULE_SOURCE_KEYS = [...MODULE_SOURCE_KINDS, "ref"];
|
|
471
|
-
var moduleSource = (raw, at) => {
|
|
472
|
-
const shape = {
|
|
473
|
-
kinds: MODULE_SOURCE_KINDS,
|
|
474
|
-
optionalFor: (kind) => kind === "github" ? ["ref"] : []
|
|
475
|
-
};
|
|
476
|
-
return mapReading(readKeyedItem(shape, raw, at), (item) => Object.freeze({
|
|
477
|
-
kind: item.kind,
|
|
478
|
-
location: item.named,
|
|
479
|
-
ref: item.optional.get("ref") ?? null
|
|
480
|
-
}));
|
|
481
|
-
};
|
|
482
427
|
|
|
483
|
-
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, 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,
|
|
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 };
|