holycodex 0.13.8-dev.225.1 → 0.14.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.
Files changed (2) hide show
  1. package/dist/cli.js +202 -808
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -1751,62 +1751,6 @@ var $ZodUnion = /*@__PURE__*/ $constructor("$ZodUnion", (inst, def) => {
1751
1751
  });
1752
1752
  };
1753
1753
  });
1754
- var $ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
1755
- def.inclusive = false;
1756
- $ZodUnion.init(inst, def);
1757
- const _super = inst._zod.parse;
1758
- defineLazy(inst._zod, "propValues", () => {
1759
- const propValues = {};
1760
- for (const option of def.options) {
1761
- const pv = option._zod.propValues;
1762
- if (!pv || Object.keys(pv).length === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
1763
- for (const [k, v] of Object.entries(pv)) {
1764
- if (!propValues[k]) propValues[k] = /* @__PURE__ */ new Set();
1765
- for (const val of v) propValues[k].add(val);
1766
- }
1767
- }
1768
- return propValues;
1769
- });
1770
- const disc = cached(() => {
1771
- const opts = def.options;
1772
- const map = /* @__PURE__ */ new Map();
1773
- for (const o of opts) {
1774
- const values = o._zod.propValues?.[def.discriminator];
1775
- if (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
1776
- for (const v of values) {
1777
- if (map.has(v)) throw new Error(`Duplicate discriminator value "${String(v)}"`);
1778
- map.set(v, o);
1779
- }
1780
- }
1781
- return map;
1782
- });
1783
- inst._zod.parse = (payload, ctx) => {
1784
- const input = payload.value;
1785
- if (!isObject(input)) {
1786
- payload.issues.push({
1787
- code: "invalid_type",
1788
- expected: "object",
1789
- input,
1790
- inst
1791
- });
1792
- return payload;
1793
- }
1794
- const opt = disc.value.get(input?.[def.discriminator]);
1795
- if (opt) return opt._zod.run(payload, ctx);
1796
- if (def.unionFallback || ctx.direction === "backward") return _super(payload, ctx);
1797
- payload.issues.push({
1798
- code: "invalid_union",
1799
- errors: [],
1800
- note: "No matching discriminator",
1801
- discriminator: def.discriminator,
1802
- options: Array.from(disc.value.keys()),
1803
- input,
1804
- path: [def.discriminator],
1805
- inst
1806
- });
1807
- return payload;
1808
- };
1809
- });
1810
1754
  var $ZodIntersection = /*@__PURE__*/ $constructor("$ZodIntersection", (inst, def) => {
1811
1755
  $ZodType.init(inst, def);
1812
1756
  inst._zod.parse = (payload, ctx) => {
@@ -1998,115 +1942,6 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
1998
1942
  else break;
1999
1943
  return final;
2000
1944
  }
2001
- var $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
2002
- $ZodType.init(inst, def);
2003
- inst._zod.parse = (payload, ctx) => {
2004
- const input = payload.value;
2005
- if (!isPlainObject(input)) {
2006
- payload.issues.push({
2007
- expected: "record",
2008
- code: "invalid_type",
2009
- input,
2010
- inst
2011
- });
2012
- return payload;
2013
- }
2014
- const proms = [];
2015
- const values = def.keyType._zod.values;
2016
- if (values) {
2017
- payload.value = {};
2018
- const recordKeys = /* @__PURE__ */ new Set();
2019
- for (const key of values) if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
2020
- recordKeys.add(typeof key === "number" ? key.toString() : key);
2021
- const keyResult = def.keyType._zod.run({
2022
- value: key,
2023
- issues: []
2024
- }, ctx);
2025
- if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
2026
- if (keyResult.issues.length) {
2027
- payload.issues.push({
2028
- code: "invalid_key",
2029
- origin: "record",
2030
- issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
2031
- input: key,
2032
- path: [key],
2033
- inst
2034
- });
2035
- continue;
2036
- }
2037
- const outKey = keyResult.value;
2038
- const result = def.valueType._zod.run({
2039
- value: input[key],
2040
- issues: []
2041
- }, ctx);
2042
- if (result instanceof Promise) proms.push(result.then((result) => {
2043
- if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
2044
- payload.value[outKey] = result.value;
2045
- }));
2046
- else {
2047
- if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
2048
- payload.value[outKey] = result.value;
2049
- }
2050
- }
2051
- let unrecognized;
2052
- for (const key in input) if (!recordKeys.has(key)) {
2053
- unrecognized = unrecognized ?? [];
2054
- unrecognized.push(key);
2055
- }
2056
- if (unrecognized && unrecognized.length > 0) payload.issues.push({
2057
- code: "unrecognized_keys",
2058
- input,
2059
- inst,
2060
- keys: unrecognized
2061
- });
2062
- } else {
2063
- payload.value = {};
2064
- for (const key of Reflect.ownKeys(input)) {
2065
- if (key === "__proto__") continue;
2066
- if (!Object.prototype.propertyIsEnumerable.call(input, key)) continue;
2067
- let keyResult = def.keyType._zod.run({
2068
- value: key,
2069
- issues: []
2070
- }, ctx);
2071
- if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
2072
- if (typeof key === "string" && number$1.test(key) && keyResult.issues.length) {
2073
- const retryResult = def.keyType._zod.run({
2074
- value: Number(key),
2075
- issues: []
2076
- }, ctx);
2077
- if (retryResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
2078
- if (retryResult.issues.length === 0) keyResult = retryResult;
2079
- }
2080
- if (keyResult.issues.length) {
2081
- if (def.mode === "loose") payload.value[key] = input[key];
2082
- else payload.issues.push({
2083
- code: "invalid_key",
2084
- origin: "record",
2085
- issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
2086
- input: key,
2087
- path: [key],
2088
- inst
2089
- });
2090
- continue;
2091
- }
2092
- const result = def.valueType._zod.run({
2093
- value: input[key],
2094
- issues: []
2095
- }, ctx);
2096
- if (result instanceof Promise) proms.push(result.then((result) => {
2097
- if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
2098
- payload.value[keyResult.value] = result.value;
2099
- }));
2100
- else {
2101
- if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
2102
- payload.value[keyResult.value] = result.value;
2103
- }
2104
- }
2105
- }
2106
- if (proms.length) return Promise.all(proms).then(() => payload);
2107
- return payload;
2108
- };
2109
- });
2110
1945
  var $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
2111
1946
  $ZodType.init(inst, def);
2112
1947
  const values = getEnumValues(def.entries);
@@ -3410,39 +3245,6 @@ var tupleProcessor = (schema, ctx, _json, params) => {
3410
3245
  if (typeof minimum === "number") json.minItems = minimum;
3411
3246
  if (typeof maximum === "number") json.maxItems = maximum;
3412
3247
  };
3413
- var recordProcessor = (schema, ctx, _json, params) => {
3414
- const json = _json;
3415
- const def = schema._zod.def;
3416
- json.type = "object";
3417
- const keyType = def.keyType;
3418
- const patterns = keyType._zod.bag?.patterns;
3419
- if (def.mode === "loose" && patterns && patterns.size > 0) {
3420
- const valueSchema = process$2(def.valueType, ctx, {
3421
- ...params,
3422
- path: [
3423
- ...params.path,
3424
- "patternProperties",
3425
- "*"
3426
- ]
3427
- });
3428
- json.patternProperties = {};
3429
- for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
3430
- } else {
3431
- if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$2(def.keyType, ctx, {
3432
- ...params,
3433
- path: [...params.path, "propertyNames"]
3434
- });
3435
- json.additionalProperties = process$2(def.valueType, ctx, {
3436
- ...params,
3437
- path: [...params.path, "additionalProperties"]
3438
- });
3439
- }
3440
- const keyValues = keyType._zod.values;
3441
- if (keyValues) {
3442
- const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number");
3443
- if (validKeyValues.length > 0) json.required = validKeyValues;
3444
- }
3445
- };
3446
3248
  var nullableProcessor = (schema, ctx, json, params) => {
3447
3249
  const def = schema._zod.def;
3448
3250
  const inner = process$2(def.innerType, ctx, params);
@@ -4086,6 +3888,13 @@ var ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
4086
3888
  }
4087
3889
  });
4088
3890
  });
3891
+ function object(shape, params) {
3892
+ return new ZodObject({
3893
+ type: "object",
3894
+ shape: shape ?? {},
3895
+ ...normalizeParams(params)
3896
+ });
3897
+ }
4089
3898
  function strictObject(shape, params) {
4090
3899
  return new ZodObject({
4091
3900
  type: "object",
@@ -4107,18 +3916,6 @@ function union(options, params) {
4107
3916
  ...normalizeParams(params)
4108
3917
  });
4109
3918
  }
4110
- var ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("ZodDiscriminatedUnion", (inst, def) => {
4111
- ZodUnion.init(inst, def);
4112
- $ZodDiscriminatedUnion.init(inst, def);
4113
- });
4114
- function discriminatedUnion(discriminator, options, params) {
4115
- return new ZodDiscriminatedUnion({
4116
- type: "union",
4117
- options,
4118
- discriminator,
4119
- ...normalizeParams(params)
4120
- });
4121
- }
4122
3919
  var ZodIntersection = /*@__PURE__*/ $constructor("ZodIntersection", (inst, def) => {
4123
3920
  $ZodIntersection.init(inst, def);
4124
3921
  ZodType.init(inst, def);
@@ -4149,27 +3946,6 @@ function tuple(items, _paramsOrRest, _params) {
4149
3946
  ...normalizeParams(hasRest ? _params : _paramsOrRest)
4150
3947
  });
4151
3948
  }
4152
- var ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
4153
- $ZodRecord.init(inst, def);
4154
- ZodType.init(inst, def);
4155
- inst._zod.processJSONSchema = (ctx, json, params) => recordProcessor(inst, ctx, json, params);
4156
- inst.keyType = def.keyType;
4157
- inst.valueType = def.valueType;
4158
- });
4159
- function record(keyType, valueType, params) {
4160
- if (!valueType || !valueType._zod) return new ZodRecord({
4161
- type: "record",
4162
- keyType: string(),
4163
- valueType: keyType,
4164
- ...normalizeParams(valueType)
4165
- });
4166
- return new ZodRecord({
4167
- type: "record",
4168
- keyType,
4169
- valueType,
4170
- ...normalizeParams(params)
4171
- });
4172
- }
4173
3949
  var ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
4174
3950
  $ZodEnum.init(inst, def);
4175
3951
  ZodType.init(inst, def);
@@ -4391,7 +4167,7 @@ function superRefine(fn, params) {
4391
4167
  }
4392
4168
  //#endregion
4393
4169
  //#region packages/cli/src/catalog.ts
4394
- var VERSION = "0.13.8-dev.225.1";
4170
+ var VERSION = "0.14.0";
4395
4171
  var SKILLS = [
4396
4172
  "ast-grep",
4397
4173
  "babysit-ci",
@@ -4415,7 +4191,8 @@ var SKILLS = [
4415
4191
  var AGENTS = _enum([
4416
4192
  "explorer",
4417
4193
  "librarian",
4418
- "worker"
4194
+ "worker",
4195
+ "reviewer"
4419
4196
  ]).options;
4420
4197
  var PlanNameSchema = _enum([
4421
4198
  "go",
@@ -4438,64 +4215,59 @@ var FastModeSchema = _enum([
4438
4215
  "fast",
4439
4216
  "fast-all"
4440
4217
  ]);
4441
- var ModelRouteSchema = discriminatedUnion("model", [
4442
- strictObject({
4443
- model: literal("gpt-5.6-luna"),
4444
- reasoningEffort: ReasoningEffortSchema
4445
- }),
4446
- strictObject({
4447
- model: literal("gpt-5.6-terra"),
4448
- reasoningEffort: ReasoningEffortSchema
4449
- }),
4450
- strictObject({
4451
- model: literal("gpt-5.6-sol"),
4452
- reasoningEffort: ReasoningEffortSchema
4453
- })
4454
- ]);
4455
- var WORKFLOW_STAGES = [
4456
- "analysis",
4218
+ var ModelRouteSchema = strictObject({
4219
+ model: _enum(["gpt-5.6-luna", "gpt-5.6-sol"]),
4220
+ reasoningEffort: ReasoningEffortSchema
4221
+ });
4222
+ _enum([
4223
+ "lookup",
4224
+ "trace",
4457
4225
  "research",
4226
+ "mechanical",
4458
4227
  "implementation",
4459
- "verification"
4460
- ];
4461
- var WorkflowStageSchema = _enum(WORKFLOW_STAGES);
4462
- var WorkflowLimitsSchema = strictObject({
4463
- concurrency: number().int().positive(),
4464
- targetCalls: number().int().positive(),
4465
- maxCalls: number().int().positive(),
4466
- workflowDepth: number().int().positive(),
4467
- retries: number().int().nonnegative(),
4468
- loopIterations: number().int().positive(),
4469
- fanOut: number().int().positive()
4470
- });
4471
- var ProjectedUsageRangeSchema = strictObject({
4472
- minimum: number().positive(),
4473
- maximum: number().positive()
4228
+ "integration",
4229
+ "operations",
4230
+ "plan",
4231
+ "code",
4232
+ "artifact"
4233
+ ]);
4234
+ var TaskRouteTableSchema = object({
4235
+ explorer: object({
4236
+ lookup: ModelRouteSchema,
4237
+ trace: ModelRouteSchema
4238
+ }).strict(),
4239
+ librarian: object({
4240
+ lookup: ModelRouteSchema,
4241
+ research: ModelRouteSchema
4242
+ }).strict(),
4243
+ worker: object({
4244
+ mechanical: ModelRouteSchema,
4245
+ implementation: ModelRouteSchema,
4246
+ integration: ModelRouteSchema,
4247
+ operations: ModelRouteSchema
4248
+ }).strict(),
4249
+ reviewer: object({
4250
+ plan: ModelRouteSchema,
4251
+ code: ModelRouteSchema,
4252
+ artifact: ModelRouteSchema
4253
+ }).strict()
4474
4254
  });
4475
- var WorkflowPolicySchema = strictObject({
4476
- permittedRoutes: strictObject({
4477
- explorer: record(WorkflowStageSchema, array(ModelRouteSchema).min(1)),
4478
- librarian: record(WorkflowStageSchema, array(ModelRouteSchema).min(1)),
4479
- worker: record(WorkflowStageSchema, array(ModelRouteSchema).min(1))
4480
- }),
4481
- verbosity: literal("low"),
4255
+ var WorkflowPolicySchema = union([strictObject({ enabled: literal(false) }), strictObject({
4256
+ enabled: literal(true),
4257
+ costTarget: number().positive(),
4258
+ costMax: number().positive(),
4259
+ maxCalls: number().int().positive(),
4260
+ maxConcurrency: number().int().positive(),
4482
4261
  serviceTiers: tuple([literal("default"), literal("fast")]),
4483
- limits: WorkflowLimitsSchema,
4484
- projectedUsage: strictObject({
4485
- standard: ProjectedUsageRangeSchema,
4486
- fast: ProjectedUsageRangeSchema
4487
- }),
4488
- softSizeGuidance: strictObject({
4489
- maxInputTokens: number().int().positive(),
4490
- maxScriptBytes: number().int().positive()
4491
- })
4492
- });
4262
+ taskRoutes: TaskRouteTableSchema
4263
+ })]);
4493
4264
  var RoutingPresetSchema = strictObject({
4494
4265
  root: ModelRouteSchema,
4495
4266
  agents: strictObject({
4496
4267
  explorer: ModelRouteSchema,
4497
4268
  librarian: ModelRouteSchema,
4498
- worker: ModelRouteSchema
4269
+ worker: ModelRouteSchema,
4270
+ reviewer: ModelRouteSchema
4499
4271
  }),
4500
4272
  workflow: WorkflowPolicySchema
4501
4273
  });
@@ -4507,547 +4279,178 @@ var ModelRoutingPlansSchema = strictObject({
4507
4279
  "pro-5x": RoutingPresetSchema,
4508
4280
  "pro-20x": RoutingPresetSchema
4509
4281
  });
4510
- function workflowFor(permittedRoutes, limits, projectedUsage, maxInputTokens) {
4282
+ var LUNA = (reasoningEffort) => ({
4283
+ model: "gpt-5.6-luna",
4284
+ reasoningEffort
4285
+ });
4286
+ var SOL = (reasoningEffort) => ({
4287
+ model: "gpt-5.6-sol",
4288
+ reasoningEffort
4289
+ });
4290
+ function taskRoutes(explorer, librarian, worker, reviewer) {
4511
4291
  return {
4512
- permittedRoutes,
4513
- verbosity: "low",
4514
- serviceTiers: ["default", "fast"],
4515
- limits,
4516
- projectedUsage: {
4517
- standard: projectedUsage,
4518
- fast: {
4519
- minimum: projectedUsage.minimum * 2,
4520
- maximum: projectedUsage.maximum * 2
4521
- }
4292
+ explorer: {
4293
+ lookup: LUNA(explorer[0]),
4294
+ trace: LUNA(explorer[1])
4295
+ },
4296
+ librarian: {
4297
+ lookup: LUNA(librarian[0]),
4298
+ research: LUNA(librarian[1])
4299
+ },
4300
+ worker: {
4301
+ mechanical: LUNA(worker[0]),
4302
+ implementation: LUNA(worker[1]),
4303
+ integration: LUNA(worker[2]),
4304
+ operations: LUNA(worker[3])
4522
4305
  },
4523
- softSizeGuidance: {
4524
- maxInputTokens,
4525
- maxScriptBytes: Math.min(maxInputTokens, 4 * 1024 * 1024)
4306
+ reviewer: {
4307
+ plan: LUNA(reviewer[0]),
4308
+ code: LUNA(reviewer[1]),
4309
+ artifact: LUNA(reviewer[2])
4526
4310
  }
4527
4311
  };
4528
4312
  }
4529
- var DEFAULT_PLAN = "plus";
4530
- var LUNA_HIGH = {
4531
- model: "gpt-5.6-luna",
4532
- reasoningEffort: "high"
4533
- };
4534
- var LUNA_XHIGH = {
4535
- model: "gpt-5.6-luna",
4536
- reasoningEffort: "xhigh"
4537
- };
4538
- var LUNA_MAX = {
4539
- model: "gpt-5.6-luna",
4540
- reasoningEffort: "max"
4541
- };
4542
- var SOL_HIGH = {
4543
- model: "gpt-5.6-sol",
4544
- reasoningEffort: "high"
4545
- };
4546
- function uniformStageRoutes(...routes) {
4547
- return Object.fromEntries(WORKFLOW_STAGES.map((stage) => [stage, [...routes]]));
4313
+ function workflow(costTarget, costMax, maxCalls, maxConcurrency, routes) {
4314
+ return {
4315
+ enabled: true,
4316
+ costTarget,
4317
+ costMax,
4318
+ maxCalls,
4319
+ maxConcurrency,
4320
+ serviceTiers: ["default", "fast"],
4321
+ taskRoutes: routes
4322
+ };
4548
4323
  }
4324
+ var DEFAULT_PLAN = "plus";
4549
4325
  var MODEL_ROUTING_PLANS = ModelRoutingPlansSchema.parse({
4550
4326
  go: {
4551
- root: SOL_HIGH,
4327
+ root: SOL("high"),
4552
4328
  agents: {
4553
- explorer: LUNA_HIGH,
4554
- librarian: LUNA_HIGH,
4555
- worker: LUNA_HIGH
4329
+ explorer: LUNA("high"),
4330
+ librarian: LUNA("high"),
4331
+ worker: LUNA("high"),
4332
+ reviewer: LUNA("high")
4556
4333
  },
4557
- workflow: workflowFor({
4558
- explorer: uniformStageRoutes(LUNA_HIGH),
4559
- librarian: uniformStageRoutes(LUNA_HIGH),
4560
- worker: uniformStageRoutes(LUNA_HIGH)
4561
- }, {
4562
- concurrency: 1,
4563
- targetCalls: 2,
4564
- maxCalls: 4,
4565
- workflowDepth: 2,
4566
- retries: 0,
4567
- loopIterations: 1,
4568
- fanOut: 1
4569
- }, {
4570
- minimum: .2,
4571
- maximum: .35
4572
- }, 2e4)
4334
+ workflow: { enabled: false }
4573
4335
  },
4574
4336
  "plus-low": {
4575
- root: {
4576
- model: "gpt-5.6-sol",
4577
- reasoningEffort: "low"
4578
- },
4337
+ root: SOL("low"),
4579
4338
  agents: {
4580
- explorer: {
4581
- model: "gpt-5.6-luna",
4582
- reasoningEffort: "high"
4583
- },
4584
- librarian: {
4585
- model: "gpt-5.6-luna",
4586
- reasoningEffort: "high"
4587
- },
4588
- worker: {
4589
- model: "gpt-5.6-luna",
4590
- reasoningEffort: "high"
4591
- }
4339
+ explorer: LUNA("medium"),
4340
+ librarian: LUNA("medium"),
4341
+ worker: LUNA("high"),
4342
+ reviewer: LUNA("high")
4592
4343
  },
4593
- workflow: workflowFor({
4594
- explorer: uniformStageRoutes(LUNA_HIGH),
4595
- librarian: uniformStageRoutes(LUNA_HIGH),
4596
- worker: uniformStageRoutes(LUNA_HIGH)
4597
- }, {
4598
- concurrency: 3,
4599
- targetCalls: 4,
4600
- maxCalls: 12,
4601
- workflowDepth: 3,
4602
- retries: 1,
4603
- loopIterations: 2,
4604
- fanOut: 3
4605
- }, {
4606
- minimum: 1,
4607
- maximum: 1
4608
- }, 3e4)
4344
+ workflow: workflow(1, 1.5, 10, 3, taskRoutes(["medium", "high"], ["medium", "high"], [
4345
+ "high",
4346
+ "high",
4347
+ "xhigh",
4348
+ "high"
4349
+ ], [
4350
+ "high",
4351
+ "xhigh",
4352
+ "high"
4353
+ ]))
4609
4354
  },
4610
4355
  plus: {
4611
- root: {
4612
- model: "gpt-5.6-sol",
4613
- reasoningEffort: "medium"
4614
- },
4356
+ root: SOL("medium"),
4615
4357
  agents: {
4616
- explorer: {
4617
- model: "gpt-5.6-luna",
4618
- reasoningEffort: "high"
4619
- },
4620
- librarian: {
4621
- model: "gpt-5.6-luna",
4622
- reasoningEffort: "high"
4623
- },
4624
- worker: {
4625
- model: "gpt-5.6-luna",
4626
- reasoningEffort: "high"
4627
- }
4358
+ explorer: LUNA("high"),
4359
+ librarian: LUNA("high"),
4360
+ worker: LUNA("xhigh"),
4361
+ reviewer: LUNA("xhigh")
4628
4362
  },
4629
- workflow: workflowFor({
4630
- explorer: uniformStageRoutes(LUNA_HIGH),
4631
- librarian: uniformStageRoutes(LUNA_HIGH),
4632
- worker: {
4633
- analysis: [LUNA_HIGH, LUNA_XHIGH],
4634
- research: [LUNA_HIGH],
4635
- implementation: [LUNA_HIGH, LUNA_XHIGH],
4636
- verification: [LUNA_XHIGH]
4637
- }
4638
- }, {
4639
- concurrency: 3,
4640
- targetCalls: 6,
4641
- maxCalls: 16,
4642
- workflowDepth: 4,
4643
- retries: 2,
4644
- loopIterations: 3,
4645
- fanOut: 3
4646
- }, {
4647
- minimum: 1.4,
4648
- maximum: 1.7
4649
- }, 5e4)
4363
+ workflow: workflow(1.6, 2.5, 16, 3, taskRoutes(["medium", "high"], ["medium", "high"], [
4364
+ "high",
4365
+ "xhigh",
4366
+ "xhigh",
4367
+ "high"
4368
+ ], [
4369
+ "high",
4370
+ "xhigh",
4371
+ "high"
4372
+ ]))
4650
4373
  },
4651
4374
  "plus-high": {
4652
- root: {
4653
- model: "gpt-5.6-sol",
4654
- reasoningEffort: "high"
4655
- },
4375
+ root: SOL("high"),
4656
4376
  agents: {
4657
- explorer: {
4658
- model: "gpt-5.6-luna",
4659
- reasoningEffort: "high"
4660
- },
4661
- librarian: {
4662
- model: "gpt-5.6-luna",
4663
- reasoningEffort: "high"
4664
- },
4665
- worker: {
4666
- model: "gpt-5.6-luna",
4667
- reasoningEffort: "xhigh"
4668
- }
4377
+ explorer: LUNA("xhigh"),
4378
+ librarian: LUNA("xhigh"),
4379
+ worker: LUNA("xhigh"),
4380
+ reviewer: LUNA("xhigh")
4669
4381
  },
4670
- workflow: workflowFor({
4671
- explorer: uniformStageRoutes(LUNA_HIGH, LUNA_XHIGH),
4672
- librarian: uniformStageRoutes(LUNA_HIGH, LUNA_XHIGH),
4673
- worker: {
4674
- analysis: [LUNA_XHIGH],
4675
- research: [LUNA_XHIGH],
4676
- implementation: [LUNA_XHIGH, LUNA_MAX],
4677
- verification: [LUNA_MAX]
4678
- }
4679
- }, {
4680
- concurrency: 4,
4681
- targetCalls: 8,
4682
- maxCalls: 24,
4683
- workflowDepth: 5,
4684
- retries: 3,
4685
- loopIterations: 4,
4686
- fanOut: 4
4687
- }, {
4688
- minimum: 2.4,
4689
- maximum: 3.1
4690
- }, 7e4)
4382
+ workflow: workflow(3, 4.5, 24, 4, taskRoutes(["medium", "xhigh"], ["medium", "xhigh"], [
4383
+ "high",
4384
+ "xhigh",
4385
+ "max",
4386
+ "xhigh"
4387
+ ], [
4388
+ "xhigh",
4389
+ "max",
4390
+ "xhigh"
4391
+ ]))
4691
4392
  },
4692
4393
  "pro-5x": {
4693
- root: {
4694
- model: "gpt-5.6-sol",
4695
- reasoningEffort: "high"
4696
- },
4394
+ root: SOL("high"),
4697
4395
  agents: {
4698
- explorer: {
4699
- model: "gpt-5.6-luna",
4700
- reasoningEffort: "xhigh"
4701
- },
4702
- librarian: {
4703
- model: "gpt-5.6-luna",
4704
- reasoningEffort: "xhigh"
4705
- },
4706
- worker: {
4707
- model: "gpt-5.6-luna",
4708
- reasoningEffort: "xhigh"
4709
- }
4396
+ explorer: LUNA("xhigh"),
4397
+ librarian: LUNA("xhigh"),
4398
+ worker: LUNA("max"),
4399
+ reviewer: LUNA("max")
4710
4400
  },
4711
- workflow: workflowFor({
4712
- explorer: uniformStageRoutes(LUNA_XHIGH),
4713
- librarian: uniformStageRoutes(LUNA_XHIGH),
4714
- worker: {
4715
- analysis: [LUNA_XHIGH, LUNA_MAX],
4716
- research: [LUNA_XHIGH],
4717
- implementation: [LUNA_MAX],
4718
- verification: [LUNA_MAX]
4719
- }
4720
- }, {
4721
- concurrency: 6,
4722
- targetCalls: 12,
4723
- maxCalls: 40,
4724
- workflowDepth: 6,
4725
- retries: 3,
4726
- loopIterations: 5,
4727
- fanOut: 5
4728
- }, {
4729
- minimum: 4,
4730
- maximum: 5
4731
- }, 1e5)
4401
+ workflow: workflow(5, 7.5, 40, 6, taskRoutes(["high", "xhigh"], ["high", "xhigh"], [
4402
+ "high",
4403
+ "max",
4404
+ "max",
4405
+ "xhigh"
4406
+ ], [
4407
+ "xhigh",
4408
+ "max",
4409
+ "xhigh"
4410
+ ]))
4732
4411
  },
4733
4412
  "pro-20x": {
4734
- root: {
4735
- model: "gpt-5.6-sol",
4736
- reasoningEffort: "high"
4737
- },
4413
+ root: SOL("xhigh"),
4738
4414
  agents: {
4739
- explorer: {
4740
- model: "gpt-5.6-luna",
4741
- reasoningEffort: "xhigh"
4742
- },
4743
- librarian: {
4744
- model: "gpt-5.6-luna",
4745
- reasoningEffort: "xhigh"
4746
- },
4747
- worker: {
4748
- model: "gpt-5.6-luna",
4749
- reasoningEffort: "max"
4750
- }
4415
+ explorer: LUNA("xhigh"),
4416
+ librarian: LUNA("xhigh"),
4417
+ worker: LUNA("max"),
4418
+ reviewer: LUNA("max")
4751
4419
  },
4752
- workflow: workflowFor({
4753
- explorer: uniformStageRoutes(LUNA_XHIGH, LUNA_MAX),
4754
- librarian: uniformStageRoutes(LUNA_XHIGH, LUNA_MAX),
4755
- worker: uniformStageRoutes(LUNA_MAX)
4756
- }, {
4757
- concurrency: 8,
4758
- targetCalls: 20,
4759
- maxCalls: 80,
4760
- workflowDepth: 8,
4761
- retries: 4,
4762
- loopIterations: 8,
4763
- fanOut: 8
4764
- }, {
4765
- minimum: 8,
4766
- maximum: 12
4767
- }, 15e4)
4420
+ workflow: workflow(12, 20, 64, 8, taskRoutes(["high", "xhigh"], ["high", "max"], [
4421
+ "xhigh",
4422
+ "max",
4423
+ "max",
4424
+ "xhigh"
4425
+ ], [
4426
+ "max",
4427
+ "max",
4428
+ "max"
4429
+ ]))
4768
4430
  }
4769
4431
  });
4770
4432
  Object.fromEntries(PLAN_NAMES.map((plan) => [plan, MODEL_ROUTING_PLANS[plan].workflow]));
4771
- Object.fromEntries(PLAN_NAMES.map((plan) => [plan, MODEL_ROUTING_PLANS[plan].workflow.limits]));
4433
+ Object.fromEntries(PLAN_NAMES.map((plan) => {
4434
+ const workflow = MODEL_ROUTING_PLANS[plan].workflow;
4435
+ return [plan, workflow.enabled ? {
4436
+ maxCalls: workflow.maxCalls,
4437
+ maxConcurrency: workflow.maxConcurrency,
4438
+ maxRetries: 1,
4439
+ maxFanOut: workflow.maxConcurrency + workflow.maxCalls,
4440
+ workflowDepth: 8,
4441
+ maxMemoryBytes: 16 * 1024 * 1024,
4442
+ maxStackBytes: 1 * 1024 * 1024,
4443
+ maxScriptBytes: 64 * 1024
4444
+ } : {}];
4445
+ }));
4772
4446
  MODEL_ROUTING_PLANS[DEFAULT_PLAN].root;
4773
4447
  MODEL_ROUTING_PLANS[DEFAULT_PLAN].agents;
4774
- var LEGACY_MANAGED_AGENT_MODEL_HISTORY = {
4775
- go: {
4776
- explorer: [{
4777
- model: "gpt-5.6-luna",
4778
- reasoningEffort: "low"
4779
- }, {
4780
- model: "gpt-5.6-terra",
4781
- reasoningEffort: "low"
4782
- }],
4783
- librarian: [{
4784
- model: "gpt-5.6-luna",
4785
- reasoningEffort: "low"
4786
- }, {
4787
- model: "gpt-5.6-terra",
4788
- reasoningEffort: "low"
4789
- }],
4790
- worker: [
4791
- {
4792
- model: "gpt-5.6-luna",
4793
- reasoningEffort: "xhigh"
4794
- },
4795
- {
4796
- model: "gpt-5.6-terra",
4797
- reasoningEffort: "low"
4798
- },
4799
- {
4800
- model: "gpt-5.6-terra",
4801
- reasoningEffort: "medium"
4802
- }
4803
- ]
4804
- },
4805
- "plus-low": {
4806
- explorer: [{
4807
- model: "gpt-5.6-luna",
4808
- reasoningEffort: "low"
4809
- }],
4810
- librarian: [{
4811
- model: "gpt-5.6-luna",
4812
- reasoningEffort: "medium"
4813
- }],
4814
- worker: [{
4815
- model: "gpt-5.6-luna",
4816
- reasoningEffort: "xhigh"
4817
- }, {
4818
- model: "gpt-5.6-terra",
4819
- reasoningEffort: "medium"
4820
- }]
4821
- },
4822
- plus: {
4823
- explorer: [{
4824
- model: "gpt-5.6-luna",
4825
- reasoningEffort: "low"
4826
- }, {
4827
- model: "gpt-5.6-luna",
4828
- reasoningEffort: "medium"
4829
- }],
4830
- librarian: [
4831
- {
4832
- model: "gpt-5.6-luna",
4833
- reasoningEffort: "xhigh"
4834
- },
4835
- {
4836
- model: "gpt-5.6-luna",
4837
- reasoningEffort: "low"
4838
- },
4839
- {
4840
- model: "gpt-5.6-terra",
4841
- reasoningEffort: "low"
4842
- },
4843
- {
4844
- model: "gpt-5.6-terra",
4845
- reasoningEffort: "medium"
4846
- }
4847
- ],
4848
- worker: [{
4849
- model: "gpt-5.6-luna",
4850
- reasoningEffort: "xhigh"
4851
- }, {
4852
- model: "gpt-5.6-terra",
4853
- reasoningEffort: "high"
4854
- }]
4855
- },
4856
- "plus-high": {
4857
- explorer: [{
4858
- model: "gpt-5.6-luna",
4859
- reasoningEffort: "xhigh"
4860
- }, {
4861
- model: "gpt-5.6-terra",
4862
- reasoningEffort: "medium"
4863
- }],
4864
- librarian: [{
4865
- model: "gpt-5.6-luna",
4866
- reasoningEffort: "xhigh"
4867
- }, {
4868
- model: "gpt-5.6-terra",
4869
- reasoningEffort: "medium"
4870
- }],
4871
- worker: [
4872
- {
4873
- model: "gpt-5.6-luna",
4874
- reasoningEffort: "max"
4875
- },
4876
- {
4877
- model: "gpt-5.6-terra",
4878
- reasoningEffort: "high"
4879
- },
4880
- {
4881
- model: "gpt-5.6-sol",
4882
- reasoningEffort: "low"
4883
- }
4884
- ]
4885
- },
4886
- "pro-5x": {
4887
- explorer: [
4888
- {
4889
- model: "gpt-5.6-luna",
4890
- reasoningEffort: "high"
4891
- },
4892
- {
4893
- model: "gpt-5.6-luna",
4894
- reasoningEffort: "xhigh"
4895
- },
4896
- {
4897
- model: "gpt-5.6-terra",
4898
- reasoningEffort: "medium"
4899
- },
4900
- {
4901
- model: "gpt-5.6-terra",
4902
- reasoningEffort: "high"
4903
- }
4904
- ],
4905
- librarian: [
4906
- {
4907
- model: "gpt-5.6-luna",
4908
- reasoningEffort: "high"
4909
- },
4910
- {
4911
- model: "gpt-5.6-luna",
4912
- reasoningEffort: "xhigh"
4913
- },
4914
- {
4915
- model: "gpt-5.6-terra",
4916
- reasoningEffort: "high"
4917
- }
4918
- ],
4919
- worker: [
4920
- {
4921
- model: "gpt-5.6-luna",
4922
- reasoningEffort: "max"
4923
- },
4924
- {
4925
- model: "gpt-5.6-terra",
4926
- reasoningEffort: "high"
4927
- },
4928
- {
4929
- model: "gpt-5.6-sol",
4930
- reasoningEffort: "medium"
4931
- }
4932
- ]
4933
- },
4934
- "pro-20x": {
4935
- explorer: [
4936
- {
4937
- model: "gpt-5.6-luna",
4938
- reasoningEffort: "high"
4939
- },
4940
- {
4941
- model: "gpt-5.6-luna",
4942
- reasoningEffort: "max"
4943
- },
4944
- {
4945
- model: "gpt-5.6-sol",
4946
- reasoningEffort: "medium"
4947
- }
4948
- ],
4949
- librarian: [
4950
- {
4951
- model: "gpt-5.6-luna",
4952
- reasoningEffort: "high"
4953
- },
4954
- {
4955
- model: "gpt-5.6-luna",
4956
- reasoningEffort: "max"
4957
- },
4958
- {
4959
- model: "gpt-5.6-terra",
4960
- reasoningEffort: "high"
4961
- },
4962
- {
4963
- model: "gpt-5.6-sol",
4964
- reasoningEffort: "medium"
4965
- }
4966
- ],
4967
- worker: [
4968
- {
4969
- model: "gpt-5.6-terra",
4970
- reasoningEffort: "xhigh"
4971
- },
4972
- {
4973
- model: "gpt-5.6-terra",
4974
- reasoningEffort: "high"
4975
- },
4976
- {
4977
- model: "gpt-5.6-luna",
4978
- reasoningEffort: "medium"
4979
- },
4980
- {
4981
- model: "gpt-5.6-sol",
4982
- reasoningEffort: "high"
4983
- }
4984
- ]
4985
- }
4986
- };
4987
- function managedPlanAgentModels(plan) {
4988
- return {
4989
- explorer: [MODEL_ROUTING_PLANS[plan].agents.explorer, ...LEGACY_MANAGED_AGENT_MODEL_HISTORY[plan].explorer],
4990
- librarian: [MODEL_ROUTING_PLANS[plan].agents.librarian, ...LEGACY_MANAGED_AGENT_MODEL_HISTORY[plan].librarian],
4991
- worker: [MODEL_ROUTING_PLANS[plan].agents.worker, ...LEGACY_MANAGED_AGENT_MODEL_HISTORY[plan].worker]
4992
- };
4993
- }
4994
- var MANAGED_AGENT_MODEL_HISTORY_BY_PLAN = {
4995
- go: managedPlanAgentModels("go"),
4996
- "plus-low": managedPlanAgentModels("plus-low"),
4997
- plus: managedPlanAgentModels("plus"),
4998
- "plus-high": managedPlanAgentModels("plus-high"),
4999
- "pro-5x": managedPlanAgentModels("pro-5x"),
5000
- "pro-20x": managedPlanAgentModels("pro-20x")
5001
- };
5002
- function managedAgentModels(agent) {
5003
- return PLAN_NAMES.flatMap((plan) => MANAGED_AGENT_MODEL_HISTORY_BY_PLAN[plan][agent]);
4448
+ function currentAgentModels(plan) {
4449
+ return Object.fromEntries(AGENTS.map((agent) => [agent, [MODEL_ROUTING_PLANS[plan].agents[agent]]]));
5004
4450
  }
5005
- var MANAGED_AGENT_MODEL_HISTORY = {
5006
- explorer: managedAgentModels("explorer"),
5007
- librarian: managedAgentModels("librarian"),
5008
- worker: managedAgentModels("worker")
5009
- };
5010
- var LEGACY_MANAGED_ROOT_MODEL_HISTORY = {
5011
- go: [
5012
- {
5013
- model: "gpt-5.6-luna",
5014
- reasoningEffort: "xhigh"
5015
- },
5016
- {
5017
- model: "gpt-5.6-sol",
5018
- reasoningEffort: "low"
5019
- },
5020
- {
5021
- model: "gpt-5.6-terra",
5022
- reasoningEffort: "medium"
5023
- }
5024
- ],
5025
- "plus-low": [],
5026
- plus: [],
5027
- "plus-high": [{
5028
- model: "gpt-5.6-sol",
5029
- reasoningEffort: "medium"
5030
- }],
5031
- "pro-5x": [{
5032
- model: "gpt-5.6-sol",
5033
- reasoningEffort: "medium"
5034
- }],
5035
- "pro-20x": [{
5036
- model: "gpt-5.6-sol",
5037
- reasoningEffort: "xhigh"
5038
- }]
5039
- };
5040
- function managedPlanRootModels(plan) {
5041
- return [MODEL_ROUTING_PLANS[plan].root, ...LEGACY_MANAGED_ROOT_MODEL_HISTORY[plan]];
5042
- }
5043
- var MANAGED_ROOT_MODEL_HISTORY_BY_PLAN = {
5044
- go: managedPlanRootModels("go"),
5045
- "plus-low": managedPlanRootModels("plus-low"),
5046
- plus: managedPlanRootModels("plus"),
5047
- "plus-high": managedPlanRootModels("plus-high"),
5048
- "pro-5x": managedPlanRootModels("pro-5x"),
5049
- "pro-20x": managedPlanRootModels("pro-20x")
5050
- };
4451
+ var MANAGED_AGENT_MODEL_HISTORY_BY_PLAN = Object.fromEntries(PLAN_NAMES.map((plan) => [plan, currentAgentModels(plan)]));
4452
+ var MANAGED_AGENT_MODEL_HISTORY = Object.fromEntries(AGENTS.map((agent) => [agent, PLAN_NAMES.flatMap((plan) => MANAGED_AGENT_MODEL_HISTORY_BY_PLAN[plan][agent])]));
4453
+ var MANAGED_ROOT_MODEL_HISTORY_BY_PLAN = Object.fromEntries(PLAN_NAMES.map((plan) => [plan, [MODEL_ROUTING_PLANS[plan].root]]));
5051
4454
  var GENERATED_RUNTIMES = [
5052
4455
  "agent-capacity.js",
5053
4456
  "bootstrap.js",
@@ -5065,7 +4468,6 @@ var GENERATED_RUNTIMES = [
5065
4468
  var WINDOWS_SHELL_POLICY = "On native Windows, run every shell command through the bundled Git Bash launcher, including Git, package, build, test, script and POSIX commands. Never execute task commands through PowerShell or cmd. If Git Bash cannot be resolved, stop and report the blocker. On non-Windows, use the native shell normally.";
5066
4469
  var LITE_WRITING_POLICY = "Communicate grammatically and concisely. Omit filler, hedging, repetition, decoration, self-reference, style announcements and tool narration. Preserve exact technical terms, APIs, commands, paths, errors and commit keywords. Use fuller grammar for safety, ambiguity, clarification and ordered instructions. plus-low favors retained context, compact structured outcomes, Luna-local loops and synthesis, sufficient discovery, and genuine concurrency without budget changes. Apply this policy only to agent communication, never to literal authored or transformed content, UI or accessibility labels, help text, errors, logs, tests, fixtures, documentation, comments, commit or PR text, authored prompts, translations, quotations, generated content, public APIs, or existing repository and product voice.";
5067
4470
  var CONTEXT7_POLICY = "Within assigned scope, use the Context7 CLI skill first for current library, framework, SDK and API documentation. Use live web search for releases, dates, broader research, missing Context7 coverage and corroboration. Context7 does not authorize scope expansion.";
5068
- /** Returns packaged runtime files required on a platform. */
5069
4471
  function requiredPackageRuntimes(platform) {
5070
4472
  return platform === "win32" ? GENERATED_RUNTIMES : GENERATED_RUNTIMES.filter((file) => file !== "git-bash.js");
5071
4473
  }
@@ -6612,15 +6014,11 @@ function readManagedWorkflowPolicy(input) {
6612
6014
  if (typeof value !== "object" || value === null) return void 0;
6613
6015
  const record = value;
6614
6016
  const plan = PLAN_NAMES.find((name) => name === record.plan);
6615
- const limits = record.limits;
6616
- const usage = record.projectedUsage;
6617
- const size = record.softSizeGuidance;
6618
- if (plan === void 0 || typeof limits !== "object" || limits === null || typeof usage !== "object" || usage === null || typeof size !== "object" || size === null) return void 0;
6017
+ const workflow = record.workflow;
6018
+ if (plan === void 0 || typeof workflow !== "object" || workflow === null) return void 0;
6619
6019
  return {
6620
6020
  plan,
6621
- limits,
6622
- projectedUsage: usage,
6623
- softSizeGuidance: size
6021
+ workflow
6624
6022
  };
6625
6023
  } catch {
6626
6024
  return;
@@ -6743,9 +6141,7 @@ function installConfig(input, mode, _platform, requestedPlan, maxSubagents, fast
6743
6141
  const workflow = MODEL_ROUTING_PLANS[plan].workflow;
6744
6142
  const rootBlock = `${START}\n${PLAN_PREFIX}${plan}\n${FAST_MODE_PREFIX}${fastMode}\n${WORKFLOW_POLICY_PREFIX}${JSON.stringify({
6745
6143
  plan,
6746
- limits: workflow.limits,
6747
- projectedUsage: workflow.projectedUsage,
6748
- softSizeGuidance: workflow.softSizeGuidance
6144
+ workflow
6749
6145
  })}\n${AUTONOMY_METADATA_PREFIX}${effectiveAutonomy}\n${COMPUTER_USE_PREFIX}${effectiveComputerUse}\n${SPECIALIZATION_NAMES.map((name) => `${SPECIALIZATION_PREFIX}${name}: ${effectiveSpecializations[name]}`).join("\n")}\n${original}${originalPermissionMetadata(permissionLines)}${model}${effort}web_search = ${JSON.stringify(webSearch)}\nmodel_verbosity = "low"\nservice_tier = "${rootServiceTier}"\n${rootPermissionLines.join("\n")}\n${END}`;
6750
6146
  let configured = `${preservedRoot ? `${preservedRoot}\n` : ""}${rootBlock}${tables ? `\n\n${tables}` : ""}`;
6751
6147
  const legacyMultiAgentV2 = /\bmulti_agent_v2\s*=\s*(true|false)/.exec(configured)?.[1];
@@ -6754,7 +6150,7 @@ function installConfig(input, mode, _platform, requestedPlan, maxSubagents, fast
6754
6150
  ["multi_agent", "true"],
6755
6151
  ...legacyMultiAgentV2 === void 0 ? [] : [["multi_agent_v2", legacyMultiAgentV2]]
6756
6152
  ]);
6757
- configured = injectTableKeys(configured, "agents", [["max_concurrent_threads_per_session", String((maxSubagents ?? workflow.limits.concurrency) + 1)]]);
6153
+ configured = injectTableKeys(configured, "agents", [["max_concurrent_threads_per_session", String((maxSubagents ?? (workflow.enabled ? workflow.maxConcurrency : 0)) + 1)]]);
6758
6154
  configured = injectTableKeys(configured, "tui", [["status_line", statusLine]]);
6759
6155
  if (effectiveAutonomy !== "dangerous") configured = injectTableKeys(configured, "sandbox_workspace_write", [["network_access", "true"]]);
6760
6156
  configured = injectTableKeys(configured, "desktop", [["show-context-window-usage", "true"]]);
@@ -6854,10 +6250,10 @@ function formatInstalledRuntimeGuidance(pluginRoot) {
6854
6250
  return `Use the installed HolyCodex workflow runtime with an absolute path: node ${quotedPath}. For help, run node ${quotedPath} --help.`;
6855
6251
  }
6856
6252
  /** Shared HolyCodex root instructions. */
6857
- var CORE_INSTRUCTIONS = "HolyCodex: Root is user-facing. Before updates, classify intent and load required skills. Start with \"I detect [intent] intent - [action].\" Choose the accurate intent naturally; no fixed intent taxonomy applies. `plan` and `plan-review` own their exact heading and intent as the first visible block; other modes do not print a heading. Name each specialist type and its bounded outcome in concise updates. Root owns interaction, scope, architecture, product choices, ambiguity, integration, external state, and final judgment and verification. Root evaluates specialist evidence against user decisions, repository conventions, approved constraints, and proof, then integrates only accepted work. Before Root writes or reviews prompts, delegations, Worker briefs, handoffs, or workflows, load and apply `writing-for-agents`; delegation is instruction design. On every plan other than Go, use the CLI workflow for substantive discovery, implementation, verification, multi-file, risky, or architecture-sensitive work; genuinely small bounded operations may remain direct. Go works directly without specialists. Keep the active plan authoritative for routes, effort, verbosity, service tier, concurrency, target calls, hard maximum calls, depth, retries, loops, fan-out, and projected usage. Select only permitted Explorer, Librarian, and Worker capabilities. After code or manifest implementation, load `code-review` exactly once; that skill owns routine final audit mechanics while Root owns the final judgment. Classify unknowns as facts for specialists, material decisions for `request_user_input`, and safe reversible defaults. Use `request_user_input` immediately before commits, pushes, tags, builds, compiles, packages, publication, deployment, destructive changes, permission changes, financial actions, sending, reruns, or other externally visible actions. Explorer is repository-read-only, Librarian is research-only, and Worker cannot alter dashboards, accounts, permissions, or external state. Specialists do not delegate, broaden scope, or make final judgments.";
6253
+ var CORE_INSTRUCTIONS = "HolyCodex: Root is user-facing. Before updates, classify intent and load required skills. Start with \"I detect [intent] intent - [action].\" Choose the accurate intent naturally; no fixed intent taxonomy applies. `plan` and `plan-review` own their exact heading and intent as the first visible block; other modes do not print a heading. Root owns interaction, scope, architecture, product choices, ambiguity, integration, external state, and final judgment and verification. Root evaluates specialist evidence against user decisions, repository conventions, approved constraints, and proof, then integrates only accepted work. Before Root writes or reviews prompts, delegations, Worker briefs, handoffs, or workflows, load and apply `writing-for-agents`; delegation is instruction design. On every plan other than Go, use the CLI workflow for substantive discovery, implementation, verification, multi-file, risky, or architecture-sensitive work; genuinely small bounded operations may remain direct. Go works directly without specialists. Keep the active plan authoritative for cost target, hard cost maximum, maxCalls, maxConcurrency, and the plan × agent × broad task type route table. Choose only permitted Explorer, Librarian, Worker, and Reviewer capabilities and task types. After code or manifest implementation, load `code-review` exactly once; Reviewer owns routine adversarial review and bounded repair while Root owns architecture and final readiness. Classify unknowns as facts for specialists, material decisions for `request_user_input`, and safe reversible defaults. Use `request_user_input` immediately before commits, pushes, tags, builds, compiles, packages, publication, deployment, destructive changes, permission changes, financial actions, sending, reruns, or other externally visible actions. Explorer is repository-read-only, Librarian is research-only, Worker executes bounded implementation and operations after approval, and Reviewer performs bounded fixed-point review. Specialists do not delegate, broaden scope, or make final judgments. After an approved Worker/operations push or tag succeeds, Worker/operations immediately loads `babysit-ci` for terminal required-job evidence.";
6858
6254
  var NATIVE_IO_INSTRUCTIONS = "Use exact `plan` and `plan-review` headings only in those modes. Never delegate browser or computer control. For frontend creation, redesign, or visual verification, use installed Build Web Apps `frontend-app-builder` for concept, approval, implementation, and visual verification. For authorized security reviews, audits, scans, threat models, vulnerabilities, or attack paths, use matching installed Codex Security plugin skills. Use these capabilities instead of manual-click instructions, shell-as-GUI, or public research as a substitute for authenticated control. Use Codex native `apply_patch` for workspace file creation, updates, and deletion. Use native read or shell tools for file inspection and repository search. Do not reread files only to verify a successful `apply_patch` call.";
6859
6255
  var COMPUTER_USE_INSTRUCTIONS = "For native desktop tasks, use the available Computer Use capability.";
6860
- var ROOT_LUNA_POLICY = "Root is the judgment and control plane for interaction, scope, architecture, product, risk, workflow integration, ambiguity, external state, and final decisions. Sol derives each assignment from the final outcome, specialist contribution, evidence needed back, authority boundary, and completion criterion, so Luna can execute without re-deciding architecture. Luna is bounded execution: Explorer maps repository facts, Librarian verifies assigned current facts, and Worker implements, integrates, inspects diffs, runs checks, repairs bounded defects, retests, compresses evidence, and synthesizes only when asked. Root accepts successful mechanical evidence without rerunning routine mechanics, then inspects actual relevant final diff or hunks for qualifying work. Material architecture, product, scope, risk, or contradictory evidence returns to Root. Structured outcomes drive branching; retained context is reused only when its owner, scope, permissions, and task class remain valid. Root does not repeatedly narrate unchanged workflow or status snapshots. Escalate Luna effort only when evidence and the active plan permit it; no route creates a Sol specialist.";
6256
+ var ROOT_LUNA_POLICY = "Root is the judgment and control plane for interaction, scope, architecture, product, risk, workflow integration, ambiguity, external state, and final decisions. Sol derives each assignment from the final outcome, specialist contribution, evidence needed back, authority boundary, and completion criterion, so Luna can execute without re-deciding architecture. Luna is bounded execution: Explorer maps repository facts, Librarian verifies assigned current facts, Worker implements, integrates, owns approved operations, runs checks, repairs bounded defects, retests, compresses evidence, and synthesizes only when asked. Reviewer inspects and repairs reviewer-owned defects to a fixed point, then returns structured evidence. Root accepts successful mechanical evidence without rerunning routine mechanics, then inspects actual relevant final diff or hunks for qualifying work. Material architecture, product, scope, risk, or contradictory evidence returns to Root. Structured outcomes drive branching; retained context is reused only when its owner, scope, permissions, and task class remain valid. Root does not repeatedly narrate unchanged workflow or status snapshots. Escalate Luna effort only when evidence and the active plan permit it; no route creates a Sol specialist.";
6861
6257
  var ROOT_DESIGN_GATE_POLICY = "Use the existing shouldUseRootDesignGate decision for pre-work constraints and post-review final Root inspection. Qualifying work is architecture-sensitive, substantive, or meaningfully multi-file; trivial, one-off mechanical, and genuinely small single-file work remains exempt. Record owner and seam, data and control flow, stable interfaces, state and policy, exclusions, duplication seam, errors and recovery, tests, compatibility, and the preferred shape when real alternatives exist. After Luna routine review, Root inspects actual relevant final diff or hunks with minimal ownership or interface context and judges architecture, dependency direction, scope, cohesion, abstraction, repository-native taste, mergeability, and readiness. Root may direct at most one bounded Luna repair within active plan quotas followed by affected-diff reinspection. This is a compact constraint gate, not an unconditional model call, independent review, workflow restart, or second plan. Repository-native source, tests, configuration, commands, diff, and status are authoritative. Escalate conflicting evidence or constraints to Root.";
6862
6258
  var WORKER_BRIEF_POLICY = "Root gives Worker a literal assignment with objective and outcome, scope and exclusions, output and evidence, authority boundary, completion criterion, and the minimum seam-specific constraints needed for interfaces, flow, policy, recovery, compatibility, and proof. These boundaries keep execution reviewable and leave material choices with Root. Retained context may omit unchanged constraints; continuation or repair must identify changed constraints and the exact next action. Worker follows the assignment without rediscovering architecture or making material choices. Luna owns correctness, completeness, regression checks, diagnostics, compatibility, changed-file inspection, bounded repair, and compact structured evidence. Worker may make one warranted bounded diff-level taste/simplification pass for clarity, naming, duplication, or avoidable complexity in changed files only; it preserves behavior, interfaces, ownership, and scope, then stops. Material conflicts return `needs_root_decision` with exact evidence. Root retains final judgment and reports meaningful lifecycle changes only.";
6863
6259
  var CODE_REVIEW_ACTIVATION_POLICY = "After loading `code-review`, its first visible line is **CODE REVIEW MODE ACTIVATED**.";
@@ -6865,7 +6261,7 @@ var CODE_REVIEW_ACTIVATION_POLICY = "After loading `code-review`, its first visi
6865
6261
  function coreInstructions(platform, capacity, computerUseEnabled = false, pluginRoot, specializations = []) {
6866
6262
  const threads = capacity?.maxThreads;
6867
6263
  const depth = capacity?.maxDepth;
6868
- const capacityInstructions = threads === void 0 || depth === void 0 ? "Before delegation, use active collaboration tool instructions as the authoritative agent-capacity limit." : `Host agent capacity: agents.max_concurrent_threads_per_session=${threads} includes Root. The host nesting limit is ${depth}; the active plan's maxCalls is the hard workflow call ceiling and targetCalls is soft planning guidance. Its lower concurrency, depth, and fan-out limits remain authoritative. Substantive, multi-file, risky, and architecture-sensitive work uses a CLI workflow; genuinely small bounded operations may remain direct. Report a blocker when a required workflow runtime is unavailable. Go works directly without specialists.`;
6264
+ const capacityInstructions = threads === void 0 || depth === void 0 ? "Before delegation, use active collaboration tool instructions as the authoritative agent-capacity limit." : `Host agent capacity: agents.max_concurrent_threads_per_session=${threads} includes Root. The active plan's costMax is the hard spend ceiling, maxCalls is the structural call ceiling, and maxConcurrency is the specialist concurrency ceiling. Runtime depth, retry, memory, stack, source-size, and fan-out safety invariants are universal. Substantive, multi-file, risky, and architecture-sensitive work uses a CLI workflow; genuinely small bounded operations may remain direct. Report a blocker when a required workflow runtime is unavailable. Go works directly without specialists.`;
6869
6265
  const platformInstructions = platform === "win32" ? ` ${WINDOWS_SHELL_POLICY}` : "";
6870
6266
  const computerUseInstructions = computerUseEnabled ? ` ${COMPUTER_USE_INSTRUCTIONS}` : "";
6871
6267
  const specializationContext = specializationInstructions(specializations).join(" ");
@@ -6996,13 +6392,11 @@ async function doctor(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")
6996
6392
  const overrides = readPreservedRootOverrides(config);
6997
6393
  const fast = readManagedFastMode(config);
6998
6394
  const workflow = readManagedWorkflowPolicy(config);
6999
- checks.push(plan === void 0 ? check("routes", "error", "route-plan-missing", "Managed route plan metadata is missing.", "Reinstall HolyCodex.") : check("routes", "ok", "routes-ready", `${plan} workflow policy is active with permitted stage routes.`));
6395
+ checks.push(plan === void 0 ? check("routes", "error", "route-plan-missing", "Managed route plan metadata is missing.", "Reinstall HolyCodex.") : check("routes", "ok", "routes-ready", `${plan} workflow policy is active with task-type routes.`));
7000
6396
  checks.push(plan === void 0 || workflow === void 0 ? check("workflow", "error", "workflow-settings-missing", "Managed workflow settings are missing or invalid.", "Reinstall HolyCodex.") : JSON.stringify(workflow) === JSON.stringify({
7001
6397
  plan,
7002
- limits: MODEL_ROUTING_PLANS[plan].workflow.limits,
7003
- projectedUsage: MODEL_ROUTING_PLANS[plan].workflow.projectedUsage,
7004
- softSizeGuidance: MODEL_ROUTING_PLANS[plan].workflow.softSizeGuidance
7005
- }) ? check("workflow", "ok", "workflow-settings-ready", `${plan} workflow target and maximum limits, projected usage, and size guidance match the catalog.`) : check("workflow", "error", "workflow-settings-drift", `${plan} workflow settings do not match the authoritative catalog.`, "Reinstall HolyCodex."));
6398
+ workflow: MODEL_ROUTING_PLANS[plan].workflow
6399
+ }) ? check("workflow", "ok", "workflow-settings-ready", `${plan} workflow budgets and task-type routes match the catalog.`) : check("workflow", "error", "workflow-settings-drift", `${plan} workflow settings do not match the authoritative catalog.`, "Reinstall HolyCodex."));
7006
6400
  checks.push(missing.includes("runtime/workflow.js") ? check("workflow-runtime", "error", "workflow-runtime-missing", "The isolated workflow runtime is missing.", "Reinstall HolyCodex.") : check("workflow-runtime", "ok", "workflow-runtime-ready", "The isolated workflow runtime is present."));
7007
6401
  const manifest = await readFile(join(pluginRoot, ".codex-plugin", "plugin.json"), "utf8").catch(() => "");
7008
6402
  const mcpManifest = await access(join(pluginRoot, ".mcp.json")).then(() => true).catch(() => false);
@@ -7413,7 +6807,7 @@ function specializationFailure(name, flag, result) {
7413
6807
  }
7414
6808
  async function removeObsoleteVersionCaches(cacheRoot) {
7415
6809
  if (!await exists(cacheRoot)) return;
7416
- for (const entry of await readdir(cacheRoot)) if (entry !== "0.13.8-dev.225.1") await rm(join(cacheRoot, entry), {
6810
+ for (const entry of await readdir(cacheRoot)) if (entry !== "0.14.0") await rm(join(cacheRoot, entry), {
7417
6811
  recursive: true,
7418
6812
  force: true
7419
6813
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holycodex",
3
- "version": "0.13.8-dev.225.1",
3
+ "version": "0.14.0",
4
4
  "description": "HolyCodex installer, doctor, and cleanup CLI for durable Codex workflows",
5
5
  "keywords": [
6
6
  "agents",
@@ -42,7 +42,7 @@
42
42
  "prepack": "vp run --workspace-root build"
43
43
  },
44
44
  "dependencies": {
45
- "@holycodex/plugin": "0.13.8-dev.225.1",
45
+ "@holycodex/plugin": "0.14.0",
46
46
  "zod": "^4.4.3"
47
47
  },
48
48
  "devDependencies": {