ex-workflow 0.2.0-stage → 0.4.0-stage

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 (87) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +54 -12
  3. package/dist/adapters/index.cjs +1 -1
  4. package/dist/adapters/index.mjs +1 -1
  5. package/dist/chunk-36M6OVUJ.mjs +2 -0
  6. package/dist/chunk-36M6OVUJ.mjs.map +1 -0
  7. package/dist/{chunk-472WEDPJ.cjs → chunk-7KF5K3L7.cjs} +2 -2
  8. package/dist/{chunk-472WEDPJ.cjs.map → chunk-7KF5K3L7.cjs.map} +1 -1
  9. package/dist/chunk-CWBH7H52.cjs +2 -0
  10. package/dist/chunk-CWBH7H52.cjs.map +1 -0
  11. package/dist/chunk-DXC2RSN5.cjs +3 -0
  12. package/dist/chunk-DXC2RSN5.cjs.map +1 -0
  13. package/dist/{chunk-XSXHEEJX.mjs → chunk-GATJZYTB.mjs} +2 -2
  14. package/dist/{chunk-XSXHEEJX.mjs.map → chunk-GATJZYTB.mjs.map} +1 -1
  15. package/dist/chunk-GFH2FEZH.mjs +2 -0
  16. package/dist/chunk-GFH2FEZH.mjs.map +1 -0
  17. package/dist/{chunk-DBR24RTX.cjs → chunk-HHC5EZ54.cjs} +2 -2
  18. package/dist/{chunk-DBR24RTX.cjs.map → chunk-HHC5EZ54.cjs.map} +1 -1
  19. package/dist/chunk-KSKEFYY7.cjs +2 -0
  20. package/dist/chunk-KSKEFYY7.cjs.map +1 -0
  21. package/dist/chunk-KUUIAKEJ.cjs +2 -0
  22. package/dist/chunk-KUUIAKEJ.cjs.map +1 -0
  23. package/dist/{chunk-IBRC36PE.mjs → chunk-L2ZN6HEL.mjs} +2 -2
  24. package/dist/{chunk-IBRC36PE.mjs.map → chunk-L2ZN6HEL.mjs.map} +1 -1
  25. package/dist/chunk-NDORREWR.mjs +2 -0
  26. package/dist/chunk-NDORREWR.mjs.map +1 -0
  27. package/dist/{chunk-VN2UYV2O.mjs → chunk-NZ2DIDOD.mjs} +2 -2
  28. package/dist/{chunk-VN2UYV2O.mjs.map → chunk-NZ2DIDOD.mjs.map} +1 -1
  29. package/dist/chunk-OHSQ52DW.mjs +6 -0
  30. package/dist/chunk-OHSQ52DW.mjs.map +1 -0
  31. package/dist/chunk-RSKZVOYC.cjs +6 -0
  32. package/dist/chunk-RSKZVOYC.cjs.map +1 -0
  33. package/dist/chunk-S22CPYXJ.mjs +3 -0
  34. package/dist/chunk-S22CPYXJ.mjs.map +1 -0
  35. package/dist/chunk-SHAPFMVP.mjs +2 -0
  36. package/dist/chunk-SHAPFMVP.mjs.map +1 -0
  37. package/dist/chunk-SJRRQZ3R.cjs +2 -0
  38. package/dist/chunk-SJRRQZ3R.cjs.map +1 -0
  39. package/dist/{chunk-D4HNETUL.cjs → chunk-UM5X2JHB.cjs} +2 -2
  40. package/dist/{chunk-D4HNETUL.cjs.map → chunk-UM5X2JHB.cjs.map} +1 -1
  41. package/dist/cli/bin.cjs +1 -1
  42. package/dist/cli/bin.cjs.map +1 -1
  43. package/dist/cli/bin.mjs +1 -1
  44. package/dist/cli/bin.mjs.map +1 -1
  45. package/dist/cli/index.cjs +1 -1
  46. package/dist/cli/index.mjs +1 -1
  47. package/dist/index.cjs +1 -1
  48. package/dist/index.cjs.map +1 -1
  49. package/dist/index.d.cts +8 -8
  50. package/dist/index.d.ts +8 -8
  51. package/dist/index.mjs +1 -1
  52. package/dist/index.mjs.map +1 -1
  53. package/dist/kanban/index.cjs +1 -1
  54. package/dist/kanban/index.mjs +1 -1
  55. package/dist/schema/index.cjs +2 -0
  56. package/dist/schema/index.cjs.map +1 -0
  57. package/dist/schema/index.d.cts +57 -0
  58. package/dist/schema/index.d.ts +57 -0
  59. package/dist/schema/index.mjs +2 -0
  60. package/dist/schema/index.mjs.map +1 -0
  61. package/dist/scrum/index.cjs +1 -1
  62. package/dist/scrum/index.mjs +1 -1
  63. package/dist/types.d.cts +38 -2
  64. package/dist/types.d.ts +38 -2
  65. package/dist/waterfall/index.cjs +2 -0
  66. package/dist/waterfall/index.cjs.map +1 -0
  67. package/dist/waterfall/index.d.cts +148 -0
  68. package/dist/waterfall/index.d.ts +148 -0
  69. package/dist/waterfall/index.mjs +2 -0
  70. package/dist/waterfall/index.mjs.map +1 -0
  71. package/package.json +31 -2
  72. package/dist/chunk-6R3YFUUV.cjs +0 -6
  73. package/dist/chunk-6R3YFUUV.cjs.map +0 -1
  74. package/dist/chunk-JDVE7DQR.cjs +0 -2
  75. package/dist/chunk-JDVE7DQR.cjs.map +0 -1
  76. package/dist/chunk-NQU5TH3A.mjs +0 -2
  77. package/dist/chunk-NQU5TH3A.mjs.map +0 -1
  78. package/dist/chunk-NRAPI3GV.cjs +0 -2
  79. package/dist/chunk-NRAPI3GV.cjs.map +0 -1
  80. package/dist/chunk-PD5FBDN7.mjs +0 -2
  81. package/dist/chunk-PD5FBDN7.mjs.map +0 -1
  82. package/dist/chunk-QDT35LXB.cjs +0 -2
  83. package/dist/chunk-QDT35LXB.cjs.map +0 -1
  84. package/dist/chunk-VGD4V5BA.mjs +0 -6
  85. package/dist/chunk-VGD4V5BA.mjs.map +0 -1
  86. package/dist/chunk-YJNDBKIG.mjs +0 -2
  87. package/dist/chunk-YJNDBKIG.mjs.map +0 -1
package/dist/cli/bin.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';var chunkNRAPI3GV_cjs=require('../chunk-NRAPI3GV.cjs');require('../chunk-DBR24RTX.cjs'),require('../chunk-472WEDPJ.cjs'),require('../chunk-QDT35LXB.cjs'),require('../chunk-D4HNETUL.cjs'),require('../chunk-JDVE7DQR.cjs'),require('../chunk-6R3YFUUV.cjs'),require('../chunk-S3BXVHO7.cjs');chunkNRAPI3GV_cjs.c(process.argv.slice(2),process.cwd()).then(r=>{process.stdout.write(JSON.stringify(r.out,null,2)+`
2
+ 'use strict';var chunkKUUIAKEJ_cjs=require('../chunk-KUUIAKEJ.cjs');require('../chunk-HHC5EZ54.cjs'),require('../chunk-7KF5K3L7.cjs'),require('../chunk-UM5X2JHB.cjs'),require('../chunk-KSKEFYY7.cjs'),require('../chunk-CWBH7H52.cjs'),require('../chunk-SJRRQZ3R.cjs'),require('../chunk-RSKZVOYC.cjs'),require('../chunk-DXC2RSN5.cjs'),require('../chunk-S3BXVHO7.cjs');chunkKUUIAKEJ_cjs.c(process.argv.slice(2),process.cwd()).then(r=>{process.stdout.write(JSON.stringify(r.out,null,2)+`
3
3
  `),process.exitCode=r.exit;},r=>{process.stderr.write(`exwf crashed: ${r.stack??String(r)}
4
4
  `),process.exitCode=2;});//# sourceMappingURL=bin.cjs.map
5
5
  //# sourceMappingURL=bin.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/cli/bin.ts"],"names":["runCommand","e"],"mappings":";2SAGAA,mBAAAA,CAAW,OAAA,CAAQ,KAAK,KAAA,CAAM,CAAC,EAAG,OAAA,CAAQ,GAAA,EAAK,CAAA,CAAE,IAAA,CAC9C,GAAM,CACL,OAAA,CAAQ,OAAO,KAAA,CAAM,IAAA,CAAK,UAAU,CAAA,CAAE,GAAA,CAAK,IAAA,CAAM,CAAC,CAAA,CAAI;AAAA,CAAI,EAC1D,OAAA,CAAQ,QAAA,CAAW,CAAA,CAAE,KACvB,EACCC,CAAAA,EAAe,CACd,OAAA,CAAQ,MAAA,CAAO,MAAM,CAAA,cAAA,EAAkBA,CAAAA,CAAY,KAAA,EAAS,MAAA,CAAOA,CAAC,CAAC;AAAA,CAAI,CAAA,CACzE,OAAA,CAAQ,QAAA,CAAW,EACrB,CACF,CAAA","file":"bin.cjs","sourcesContent":["#!/usr/bin/env node\nimport { runCommand } from \"./commands.ts\";\n\nrunCommand(process.argv.slice(2), process.cwd()).then(\n (r) => {\n process.stdout.write(JSON.stringify(r.out, null, 2) + \"\\n\");\n process.exitCode = r.exit;\n },\n (e: unknown) => {\n process.stderr.write(`exwf crashed: ${(e as Error).stack ?? String(e)}\\n`);\n process.exitCode = 2;\n },\n);\n"]}
1
+ {"version":3,"sources":["../../src/cli/bin.ts"],"names":["runCommand","e"],"mappings":";6WAGAA,mBAAAA,CAAW,OAAA,CAAQ,KAAK,KAAA,CAAM,CAAC,EAAG,OAAA,CAAQ,GAAA,EAAK,CAAA,CAAE,IAAA,CAC9C,GAAM,CACL,OAAA,CAAQ,OAAO,KAAA,CAAM,IAAA,CAAK,UAAU,CAAA,CAAE,GAAA,CAAK,IAAA,CAAM,CAAC,CAAA,CAAI;AAAA,CAAI,EAC1D,OAAA,CAAQ,QAAA,CAAW,CAAA,CAAE,KACvB,EACCC,CAAAA,EAAe,CACd,OAAA,CAAQ,MAAA,CAAO,MAAM,CAAA,cAAA,EAAkBA,CAAAA,CAAY,KAAA,EAAS,MAAA,CAAOA,CAAC,CAAC;AAAA,CAAI,CAAA,CACzE,OAAA,CAAQ,QAAA,CAAW,EACrB,CACF,CAAA","file":"bin.cjs","sourcesContent":["#!/usr/bin/env node\nimport { runCommand } from \"./commands.ts\";\n\nrunCommand(process.argv.slice(2), process.cwd()).then(\n (r) => {\n process.stdout.write(JSON.stringify(r.out, null, 2) + \"\\n\");\n process.exitCode = r.exit;\n },\n (e: unknown) => {\n process.stderr.write(`exwf crashed: ${(e as Error).stack ?? String(e)}\\n`);\n process.exitCode = 2;\n },\n);\n"]}
package/dist/cli/bin.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import {c}from'../chunk-YJNDBKIG.mjs';import'../chunk-VN2UYV2O.mjs';import'../chunk-IBRC36PE.mjs';import'../chunk-PD5FBDN7.mjs';import'../chunk-XSXHEEJX.mjs';import'../chunk-NQU5TH3A.mjs';import'../chunk-VGD4V5BA.mjs';import'../chunk-2FRRD6A3.mjs';c(process.argv.slice(2),process.cwd()).then(r=>{process.stdout.write(JSON.stringify(r.out,null,2)+`
2
+ import {c}from'../chunk-36M6OVUJ.mjs';import'../chunk-NZ2DIDOD.mjs';import'../chunk-L2ZN6HEL.mjs';import'../chunk-GATJZYTB.mjs';import'../chunk-NDORREWR.mjs';import'../chunk-GFH2FEZH.mjs';import'../chunk-SHAPFMVP.mjs';import'../chunk-OHSQ52DW.mjs';import'../chunk-S22CPYXJ.mjs';import'../chunk-2FRRD6A3.mjs';c(process.argv.slice(2),process.cwd()).then(r=>{process.stdout.write(JSON.stringify(r.out,null,2)+`
3
3
  `),process.exitCode=r.exit;},r=>{process.stderr.write(`exwf crashed: ${r.stack??String(r)}
4
4
  `),process.exitCode=2;});//# sourceMappingURL=bin.mjs.map
5
5
  //# sourceMappingURL=bin.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/cli/bin.ts"],"names":["runCommand","e"],"mappings":";wPAGAA,CAAAA,CAAW,OAAA,CAAQ,KAAK,KAAA,CAAM,CAAC,EAAG,OAAA,CAAQ,GAAA,EAAK,CAAA,CAAE,IAAA,CAC9C,GAAM,CACL,OAAA,CAAQ,OAAO,KAAA,CAAM,IAAA,CAAK,UAAU,CAAA,CAAE,GAAA,CAAK,IAAA,CAAM,CAAC,CAAA,CAAI;AAAA,CAAI,EAC1D,OAAA,CAAQ,QAAA,CAAW,CAAA,CAAE,KACvB,EACCC,CAAAA,EAAe,CACd,OAAA,CAAQ,MAAA,CAAO,MAAM,CAAA,cAAA,EAAkBA,CAAAA,CAAY,KAAA,EAAS,MAAA,CAAOA,CAAC,CAAC;AAAA,CAAI,CAAA,CACzE,OAAA,CAAQ,QAAA,CAAW,EACrB,CACF,CAAA","file":"bin.mjs","sourcesContent":["#!/usr/bin/env node\nimport { runCommand } from \"./commands.ts\";\n\nrunCommand(process.argv.slice(2), process.cwd()).then(\n (r) => {\n process.stdout.write(JSON.stringify(r.out, null, 2) + \"\\n\");\n process.exitCode = r.exit;\n },\n (e: unknown) => {\n process.stderr.write(`exwf crashed: ${(e as Error).stack ?? String(e)}\\n`);\n process.exitCode = 2;\n },\n);\n"]}
1
+ {"version":3,"sources":["../../src/cli/bin.ts"],"names":["runCommand","e"],"mappings":";oTAGAA,CAAAA,CAAW,OAAA,CAAQ,KAAK,KAAA,CAAM,CAAC,EAAG,OAAA,CAAQ,GAAA,EAAK,CAAA,CAAE,IAAA,CAC9C,GAAM,CACL,OAAA,CAAQ,OAAO,KAAA,CAAM,IAAA,CAAK,UAAU,CAAA,CAAE,GAAA,CAAK,IAAA,CAAM,CAAC,CAAA,CAAI;AAAA,CAAI,EAC1D,OAAA,CAAQ,QAAA,CAAW,CAAA,CAAE,KACvB,EACCC,CAAAA,EAAe,CACd,OAAA,CAAQ,MAAA,CAAO,MAAM,CAAA,cAAA,EAAkBA,CAAAA,CAAY,KAAA,EAAS,MAAA,CAAOA,CAAC,CAAC;AAAA,CAAI,CAAA,CACzE,OAAA,CAAQ,QAAA,CAAW,EACrB,CACF,CAAA","file":"bin.mjs","sourcesContent":["#!/usr/bin/env node\nimport { runCommand } from \"./commands.ts\";\n\nrunCommand(process.argv.slice(2), process.cwd()).then(\n (r) => {\n process.stdout.write(JSON.stringify(r.out, null, 2) + \"\\n\");\n process.exitCode = r.exit;\n },\n (e: unknown) => {\n process.stderr.write(`exwf crashed: ${(e as Error).stack ?? String(e)}\\n`);\n process.exitCode = 2;\n },\n);\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkNRAPI3GV_cjs=require('../chunk-NRAPI3GV.cjs');require('../chunk-DBR24RTX.cjs'),require('../chunk-472WEDPJ.cjs'),require('../chunk-QDT35LXB.cjs'),require('../chunk-D4HNETUL.cjs'),require('../chunk-JDVE7DQR.cjs'),require('../chunk-6R3YFUUV.cjs'),require('../chunk-S3BXVHO7.cjs');Object.defineProperty(exports,"USAGE",{enumerable:true,get:function(){return chunkNRAPI3GV_cjs.a}});Object.defineProperty(exports,"parseArgs",{enumerable:true,get:function(){return chunkNRAPI3GV_cjs.b}});Object.defineProperty(exports,"runCommand",{enumerable:true,get:function(){return chunkNRAPI3GV_cjs.c}});//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var chunkKUUIAKEJ_cjs=require('../chunk-KUUIAKEJ.cjs');require('../chunk-HHC5EZ54.cjs'),require('../chunk-7KF5K3L7.cjs'),require('../chunk-UM5X2JHB.cjs'),require('../chunk-KSKEFYY7.cjs'),require('../chunk-CWBH7H52.cjs'),require('../chunk-SJRRQZ3R.cjs'),require('../chunk-RSKZVOYC.cjs'),require('../chunk-DXC2RSN5.cjs'),require('../chunk-S3BXVHO7.cjs');Object.defineProperty(exports,"USAGE",{enumerable:true,get:function(){return chunkKUUIAKEJ_cjs.a}});Object.defineProperty(exports,"parseArgs",{enumerable:true,get:function(){return chunkKUUIAKEJ_cjs.b}});Object.defineProperty(exports,"runCommand",{enumerable:true,get:function(){return chunkKUUIAKEJ_cjs.c}});//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,2 +1,2 @@
1
- export{a as USAGE,b as parseArgs,c as runCommand}from'../chunk-YJNDBKIG.mjs';import'../chunk-VN2UYV2O.mjs';import'../chunk-IBRC36PE.mjs';import'../chunk-PD5FBDN7.mjs';import'../chunk-XSXHEEJX.mjs';import'../chunk-NQU5TH3A.mjs';import'../chunk-VGD4V5BA.mjs';import'../chunk-2FRRD6A3.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{a as USAGE,b as parseArgs,c as runCommand}from'../chunk-36M6OVUJ.mjs';import'../chunk-NZ2DIDOD.mjs';import'../chunk-L2ZN6HEL.mjs';import'../chunk-GATJZYTB.mjs';import'../chunk-NDORREWR.mjs';import'../chunk-GFH2FEZH.mjs';import'../chunk-SHAPFMVP.mjs';import'../chunk-OHSQ52DW.mjs';import'../chunk-S22CPYXJ.mjs';import'../chunk-2FRRD6A3.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';require('./chunk-PO2SPQJP.cjs');var chunkDBR24RTX_cjs=require('./chunk-DBR24RTX.cjs'),chunkQDT35LXB_cjs=require('./chunk-QDT35LXB.cjs'),chunkJDVE7DQR_cjs=require('./chunk-JDVE7DQR.cjs'),chunkS3BXVHO7_cjs=require('./chunk-S3BXVHO7.cjs');var U="0.2.0-stage";Object.defineProperty(exports,"complete",{enumerable:true,get:function(){return chunkDBR24RTX_cjs.c}});Object.defineProperty(exports,"next",{enumerable:true,get:function(){return chunkDBR24RTX_cjs.b}});Object.defineProperty(exports,"synthesizeBrief",{enumerable:true,get:function(){return chunkDBR24RTX_cjs.a}});Object.defineProperty(exports,"ZERO_SPENT",{enumerable:true,get:function(){return chunkQDT35LXB_cjs.a}});Object.defineProperty(exports,"addSpent",{enumerable:true,get:function(){return chunkQDT35LXB_cjs.b}});Object.defineProperty(exports,"assignRole",{enumerable:true,get:function(){return chunkQDT35LXB_cjs.g}});Object.defineProperty(exports,"estimateTokens",{enumerable:true,get:function(){return chunkQDT35LXB_cjs.e}});Object.defineProperty(exports,"isExhausted",{enumerable:true,get:function(){return chunkQDT35LXB_cjs.d}});Object.defineProperty(exports,"openIteration",{enumerable:true,get:function(){return chunkQDT35LXB_cjs.f}});Object.defineProperty(exports,"plan",{enumerable:true,get:function(){return chunkQDT35LXB_cjs.j}});Object.defineProperty(exports,"remaining",{enumerable:true,get:function(){return chunkQDT35LXB_cjs.c}});Object.defineProperty(exports,"resourceCapsFor",{enumerable:true,get:function(){return chunkQDT35LXB_cjs.h}});Object.defineProperty(exports,"toExNodes",{enumerable:true,get:function(){return chunkQDT35LXB_cjs.i}});Object.defineProperty(exports,"addEvidence",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.y}});Object.defineProperty(exports,"addItem",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.v}});Object.defineProperty(exports,"appendEvent",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.c}});Object.defineProperty(exports,"applyAction",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.M}});Object.defineProperty(exports,"approversFor",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.k}});Object.defineProperty(exports,"assertPolicies",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.E}});Object.defineProperty(exports,"authorOf",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.G}});Object.defineProperty(exports,"canDo",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.n}});Object.defineProperty(exports,"checkGate",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.H}});Object.defineProperty(exports,"clearBlocker",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.A}});Object.defineProperty(exports,"coreRulesFor",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.K}});Object.defineProperty(exports,"createState",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.b}});Object.defineProperty(exports,"decide",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.J}});Object.defineProperty(exports,"editItem",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.w}});Object.defineProperty(exports,"evaluatePolicies",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.D}});Object.defineProperty(exports,"getItem",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.u}});Object.defineProperty(exports,"hasCapability",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.h}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.N}});Object.defineProperty(exports,"isTerminalStage",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.r}});Object.defineProperty(exports,"lastDispatchBefore",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.F}});Object.defineProperty(exports,"lastEvent",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.d}});Object.defineProperty(exports,"moveItem",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.x}});Object.defineProperty(exports,"nextStageOf",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.q}});Object.defineProperty(exports,"nowOf",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.a}});Object.defineProperty(exports,"raiseBlocker",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.z}});Object.defineProperty(exports,"raisePending",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.I}});Object.defineProperty(exports,"registerRole",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.f}});Object.defineProperty(exports,"requireCap",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.o}});Object.defineProperty(exports,"requireCapabilities",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.l}});Object.defineProperty(exports,"retireRole",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.g}});Object.defineProperty(exports,"rolesWith",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.i}});Object.defineProperty(exports,"separationLost",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.m}});Object.defineProperty(exports,"stageOf",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.p}});Object.defineProperty(exports,"validateAction",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.L}});Object.defineProperty(exports,"WorkflowError",{enumerable:true,get:function(){return chunkS3BXVHO7_cjs.a}});Object.defineProperty(exports,"assertId",{enumerable:true,get:function(){return chunkS3BXVHO7_cjs.c}});Object.defineProperty(exports,"fail",{enumerable:true,get:function(){return chunkS3BXVHO7_cjs.b}});exports.VERSION=U;//# sourceMappingURL=index.cjs.map
1
+ 'use strict';require('./chunk-PO2SPQJP.cjs');var chunkHHC5EZ54_cjs=require('./chunk-HHC5EZ54.cjs'),chunkCWBH7H52_cjs=require('./chunk-CWBH7H52.cjs'),chunkSJRRQZ3R_cjs=require('./chunk-SJRRQZ3R.cjs'),chunkS3BXVHO7_cjs=require('./chunk-S3BXVHO7.cjs');var U="0.4.0-stage";Object.defineProperty(exports,"complete",{enumerable:true,get:function(){return chunkHHC5EZ54_cjs.c}});Object.defineProperty(exports,"next",{enumerable:true,get:function(){return chunkHHC5EZ54_cjs.b}});Object.defineProperty(exports,"synthesizeBrief",{enumerable:true,get:function(){return chunkHHC5EZ54_cjs.a}});Object.defineProperty(exports,"ZERO_SPENT",{enumerable:true,get:function(){return chunkCWBH7H52_cjs.a}});Object.defineProperty(exports,"addSpent",{enumerable:true,get:function(){return chunkCWBH7H52_cjs.b}});Object.defineProperty(exports,"assignRole",{enumerable:true,get:function(){return chunkCWBH7H52_cjs.g}});Object.defineProperty(exports,"estimateTokens",{enumerable:true,get:function(){return chunkCWBH7H52_cjs.e}});Object.defineProperty(exports,"isExhausted",{enumerable:true,get:function(){return chunkCWBH7H52_cjs.d}});Object.defineProperty(exports,"openIteration",{enumerable:true,get:function(){return chunkCWBH7H52_cjs.f}});Object.defineProperty(exports,"plan",{enumerable:true,get:function(){return chunkCWBH7H52_cjs.j}});Object.defineProperty(exports,"remaining",{enumerable:true,get:function(){return chunkCWBH7H52_cjs.c}});Object.defineProperty(exports,"resourceCapsFor",{enumerable:true,get:function(){return chunkCWBH7H52_cjs.h}});Object.defineProperty(exports,"toExNodes",{enumerable:true,get:function(){return chunkCWBH7H52_cjs.i}});Object.defineProperty(exports,"addEvidence",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.y}});Object.defineProperty(exports,"addItem",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.v}});Object.defineProperty(exports,"appendEvent",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.c}});Object.defineProperty(exports,"applyAction",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.M}});Object.defineProperty(exports,"approversFor",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.k}});Object.defineProperty(exports,"assertPolicies",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.E}});Object.defineProperty(exports,"authorOf",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.G}});Object.defineProperty(exports,"canDo",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.n}});Object.defineProperty(exports,"checkGate",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.H}});Object.defineProperty(exports,"clearBlocker",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.A}});Object.defineProperty(exports,"coreRulesFor",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.K}});Object.defineProperty(exports,"createState",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.b}});Object.defineProperty(exports,"decide",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.J}});Object.defineProperty(exports,"editItem",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.w}});Object.defineProperty(exports,"evaluatePolicies",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.D}});Object.defineProperty(exports,"getItem",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.u}});Object.defineProperty(exports,"hasCapability",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.h}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.N}});Object.defineProperty(exports,"isTerminalStage",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.r}});Object.defineProperty(exports,"lastDispatchBefore",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.F}});Object.defineProperty(exports,"lastEvent",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.d}});Object.defineProperty(exports,"moveItem",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.x}});Object.defineProperty(exports,"nextStageOf",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.q}});Object.defineProperty(exports,"nowOf",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.a}});Object.defineProperty(exports,"raiseBlocker",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.z}});Object.defineProperty(exports,"raisePending",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.I}});Object.defineProperty(exports,"registerRole",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.f}});Object.defineProperty(exports,"requireCap",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.o}});Object.defineProperty(exports,"requireCapabilities",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.l}});Object.defineProperty(exports,"retireRole",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.g}});Object.defineProperty(exports,"rolesWith",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.i}});Object.defineProperty(exports,"separationLost",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.m}});Object.defineProperty(exports,"stageOf",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.p}});Object.defineProperty(exports,"validateAction",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.L}});Object.defineProperty(exports,"WorkflowError",{enumerable:true,get:function(){return chunkS3BXVHO7_cjs.a}});Object.defineProperty(exports,"assertId",{enumerable:true,get:function(){return chunkS3BXVHO7_cjs.c}});Object.defineProperty(exports,"fail",{enumerable:true,get:function(){return chunkS3BXVHO7_cjs.b}});exports.VERSION=U;//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"yPAAO,IAAMA,CAAAA,CAAU","file":"index.cjs","sourcesContent":["export const VERSION = \"0.2.0-stage\";\nexport * from \"./types.ts\";\nexport { WorkflowError, fail } from \"./errors.ts\";\nexport { createState, appendEvent, lastEvent, nowOf } from \"./state.ts\";\nexport {\n registerRole,\n retireRole,\n hasCapability,\n rolesWith,\n approversFor,\n requireCapabilities,\n separationLost,\n canDo,\n requireCap,\n} from \"./roles.ts\";\nexport {\n assertId,\n stageOf,\n nextStageOf,\n isTerminalStage,\n getItem,\n addItem,\n editItem,\n moveItem,\n addEvidence,\n raiseBlocker,\n clearBlocker,\n} from \"./items.ts\";\nexport type { ItemPatch } from \"./items.ts\";\nexport { evaluatePolicies, assertPolicies } from \"./policies.ts\";\nexport { checkGate, authorOf, lastDispatchBefore, raisePending, decide } from \"./gates.ts\";\nexport type { GateResult } from \"./gates.ts\";\nexport { ZERO_SPENT, addSpent, remaining, isExhausted, estimateTokens } from \"./budget.ts\";\nexport { plan, toExNodes, assignRole, resourceCapsFor, openIteration } from \"./planner.ts\";\nexport type { PlanOptions, PlanReason, PlanResult, Skipped } from \"./planner.ts\";\nexport { synthesizeBrief, next } from \"./brief.ts\";\nexport type { NextResult } from \"./brief.ts\";\nexport { complete } from \"./complete.ts\";\nexport { coreRulesFor } from \"./rules.ts\";\nexport { applyAction, validateAction, init } from \"./methodology.ts\";\nexport type { InitInput } from \"./methodology.ts\";\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"yPAAO,IAAMA,CAAAA,CAAU","file":"index.cjs","sourcesContent":["export const VERSION = \"0.4.0-stage\";\nexport * from \"./types.ts\";\nexport { WorkflowError, fail } from \"./errors.ts\";\nexport { createState, appendEvent, lastEvent, nowOf } from \"./state.ts\";\nexport {\n registerRole,\n retireRole,\n hasCapability,\n rolesWith,\n approversFor,\n requireCapabilities,\n separationLost,\n canDo,\n requireCap,\n} from \"./roles.ts\";\nexport {\n assertId,\n stageOf,\n nextStageOf,\n isTerminalStage,\n getItem,\n addItem,\n editItem,\n moveItem,\n addEvidence,\n raiseBlocker,\n clearBlocker,\n} from \"./items.ts\";\nexport type { ItemPatch } from \"./items.ts\";\nexport { evaluatePolicies, assertPolicies } from \"./policies.ts\";\nexport { checkGate, authorOf, lastDispatchBefore, raisePending, decide } from \"./gates.ts\";\nexport type { GateResult } from \"./gates.ts\";\nexport { ZERO_SPENT, addSpent, remaining, isExhausted, estimateTokens } from \"./budget.ts\";\nexport { plan, toExNodes, assignRole, resourceCapsFor, openIteration } from \"./planner.ts\";\nexport type { PlanOptions, PlanReason, PlanResult, Skipped } from \"./planner.ts\";\nexport { synthesizeBrief, next } from \"./brief.ts\";\nexport type { NextResult } from \"./brief.ts\";\nexport { complete } from \"./complete.ts\";\nexport { coreRulesFor } from \"./rules.ts\";\nexport { applyAction, validateAction, init } from \"./methodology.ts\";\nexport type { InitInput } from \"./methodology.ts\";\n"]}
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { ErrorCode, WorkflowState, MethodologyName, Stage, Role, Event, WorkItem, Evidence, NewItem, ItemStatus, Policy, Violation, Gate, Transition, PendingHuman, Budget, Accounting, Iteration, Methodology, Brief, Handoff, ApplyResult, Rule, Action } from './types.cjs';
2
- export { Baseline, Blocker, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, GateRequirement, ItemType, Lesson, LessonChange, ModelTier, Phase, PlannerOptions, Verdict } from './types.cjs';
1
+ import { ErrorCode, WorkflowState, MethodologyName, Stage, Role, Event, Evidence, NewItem, ItemPatch, WorkItem, ItemStatus, Policy, Violation, Gate, Methodology, Transition, PendingHuman, Budget, Accounting, Iteration, Brief, Handoff, ApplyResult, Rule, Action } from './types.cjs';
2
+ export { Baseline, Blocker, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, GateRequirement, ImpactAnalysis, ItemType, Lesson, LessonChange, ModelTier, Phase, PlannerOptions, Produced, Spent, Verdict } from './types.cjs';
3
3
  export { a as approversFor, c as canDo, h as hasCapability, r as registerRole, b as requireCap, d as requireCapabilities, e as retireRole, f as rolesWith, s as separationLost } from './roles-aneKYJ3Z.cjs';
4
4
  import { ExNode } from 'ex-flow';
5
5
 
@@ -42,7 +42,7 @@ declare function nextStageOf(state: WorkflowState, stageId: string): Stage | und
42
42
  declare function isTerminalStage(state: WorkflowState, stageId: string): boolean;
43
43
  declare function getItem(state: WorkflowState, id: string): WorkItem;
44
44
  declare function addItem(state: WorkflowState, input: NewItem, by: string, now?: string): WorkflowState;
45
- type ItemPatch = Partial<Omit<WorkItem, "id" | "stage" | "status" | "transitions" | "evidence" | "blockers">>;
45
+
46
46
  declare function editItem(state: WorkflowState, id: string, patch: ItemPatch, by: string, now?: string): WorkflowState;
47
47
  declare function moveItem(state: WorkflowState, id: string, to: {
48
48
  stage?: string;
@@ -69,7 +69,7 @@ declare function lastDispatchBefore(state: WorkflowState, item: WorkItem): Trans
69
69
  declare function authorOf(state: WorkflowState, item: WorkItem): string | undefined;
70
70
  declare function checkGate(state: WorkflowState, item: WorkItem, gate: Gate, by: string): GateResult;
71
71
  declare function raisePending(state: WorkflowState, pending: Omit<PendingHuman, "id" | "raisedAt">, now?: string): WorkflowState;
72
- declare function decide(state: WorkflowState, pendingId: string, decision: "approve" | "reject", by: string, note: string, now?: string): WorkflowState;
72
+ declare function decide(state: WorkflowState, pendingId: string, decision: "approve" | "reject", by: string, note: string, now?: string, methodology?: Methodology): WorkflowState;
73
73
 
74
74
  declare const ZERO_SPENT: Required<Budget>;
75
75
  declare function addSpent(spent: Required<Budget>, acc: Accounting): Required<Budget>;
@@ -81,9 +81,9 @@ type NodeData = {
81
81
  id: string;
82
82
  };
83
83
  declare function openIteration(state: WorkflowState): Iteration | undefined;
84
- declare function assignRole(state: WorkflowState, item: WorkItem): Role;
84
+ declare function assignRole(state: WorkflowState, item: WorkItem, roleFor?: (item: WorkItem) => string | undefined): Role;
85
85
  declare function resourceCapsFor(state: WorkflowState): Record<string, number>;
86
- declare function toExNodes(items: WorkItem[], state: WorkflowState, priorityOf?: (item: WorkItem) => number | undefined): ExNode<NodeData>[];
86
+ declare function toExNodes(items: WorkItem[], state: WorkflowState, priorityOf?: (item: WorkItem) => number | undefined, roleFor?: (item: WorkItem) => string | undefined): ExNode<NodeData>[];
87
87
  interface PlanOptions {
88
88
  max?: number;
89
89
  now?: string;
@@ -129,6 +129,6 @@ interface InitInput<C> {
129
129
  }
130
130
  declare function init<C>(input: InitInput<C>): ApplyResult;
131
131
 
132
- declare const VERSION = "0.2.0-stage";
132
+ declare const VERSION = "0.4.0-stage";
133
133
 
134
- export { Accounting, Action, ApplyResult, Brief, Budget, ErrorCode, Event, Evidence, Gate, type GateResult, Handoff, type InitInput, type ItemPatch, ItemStatus, Iteration, Methodology, MethodologyName, NewItem, type NextResult, PendingHuman, type PlanOptions, type PlanReason, type PlanResult, Policy, Role, Rule, type Skipped, Stage, Transition, VERSION, Violation, WorkItem, WorkflowError, WorkflowState, ZERO_SPENT, addEvidence, addItem, addSpent, appendEvent, applyAction, assertId, assertPolicies, assignRole, authorOf, checkGate, clearBlocker, complete, coreRulesFor, createState, decide, editItem, estimateTokens, evaluatePolicies, fail, getItem, init, isExhausted, isTerminalStage, lastDispatchBefore, lastEvent, moveItem, next, nextStageOf, nowOf, openIteration, plan, raiseBlocker, raisePending, remaining, resourceCapsFor, stageOf, synthesizeBrief, toExNodes, validateAction };
134
+ export { Accounting, Action, ApplyResult, Brief, Budget, ErrorCode, Event, Evidence, Gate, type GateResult, Handoff, type InitInput, ItemPatch, ItemStatus, Iteration, Methodology, MethodologyName, NewItem, type NextResult, PendingHuman, type PlanOptions, type PlanReason, type PlanResult, Policy, Role, Rule, type Skipped, Stage, Transition, VERSION, Violation, WorkItem, WorkflowError, WorkflowState, ZERO_SPENT, addEvidence, addItem, addSpent, appendEvent, applyAction, assertId, assertPolicies, assignRole, authorOf, checkGate, clearBlocker, complete, coreRulesFor, createState, decide, editItem, estimateTokens, evaluatePolicies, fail, getItem, init, isExhausted, isTerminalStage, lastDispatchBefore, lastEvent, moveItem, next, nextStageOf, nowOf, openIteration, plan, raiseBlocker, raisePending, remaining, resourceCapsFor, stageOf, synthesizeBrief, toExNodes, validateAction };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ErrorCode, WorkflowState, MethodologyName, Stage, Role, Event, WorkItem, Evidence, NewItem, ItemStatus, Policy, Violation, Gate, Transition, PendingHuman, Budget, Accounting, Iteration, Methodology, Brief, Handoff, ApplyResult, Rule, Action } from './types.js';
2
- export { Baseline, Blocker, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, GateRequirement, ItemType, Lesson, LessonChange, ModelTier, Phase, PlannerOptions, Verdict } from './types.js';
1
+ import { ErrorCode, WorkflowState, MethodologyName, Stage, Role, Event, Evidence, NewItem, ItemPatch, WorkItem, ItemStatus, Policy, Violation, Gate, Methodology, Transition, PendingHuman, Budget, Accounting, Iteration, Brief, Handoff, ApplyResult, Rule, Action } from './types.js';
2
+ export { Baseline, Blocker, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, GateRequirement, ImpactAnalysis, ItemType, Lesson, LessonChange, ModelTier, Phase, PlannerOptions, Produced, Spent, Verdict } from './types.js';
3
3
  export { a as approversFor, c as canDo, h as hasCapability, r as registerRole, b as requireCap, d as requireCapabilities, e as retireRole, f as rolesWith, s as separationLost } from './roles-BLBRKhUZ.js';
4
4
  import { ExNode } from 'ex-flow';
5
5
 
@@ -42,7 +42,7 @@ declare function nextStageOf(state: WorkflowState, stageId: string): Stage | und
42
42
  declare function isTerminalStage(state: WorkflowState, stageId: string): boolean;
43
43
  declare function getItem(state: WorkflowState, id: string): WorkItem;
44
44
  declare function addItem(state: WorkflowState, input: NewItem, by: string, now?: string): WorkflowState;
45
- type ItemPatch = Partial<Omit<WorkItem, "id" | "stage" | "status" | "transitions" | "evidence" | "blockers">>;
45
+
46
46
  declare function editItem(state: WorkflowState, id: string, patch: ItemPatch, by: string, now?: string): WorkflowState;
47
47
  declare function moveItem(state: WorkflowState, id: string, to: {
48
48
  stage?: string;
@@ -69,7 +69,7 @@ declare function lastDispatchBefore(state: WorkflowState, item: WorkItem): Trans
69
69
  declare function authorOf(state: WorkflowState, item: WorkItem): string | undefined;
70
70
  declare function checkGate(state: WorkflowState, item: WorkItem, gate: Gate, by: string): GateResult;
71
71
  declare function raisePending(state: WorkflowState, pending: Omit<PendingHuman, "id" | "raisedAt">, now?: string): WorkflowState;
72
- declare function decide(state: WorkflowState, pendingId: string, decision: "approve" | "reject", by: string, note: string, now?: string): WorkflowState;
72
+ declare function decide(state: WorkflowState, pendingId: string, decision: "approve" | "reject", by: string, note: string, now?: string, methodology?: Methodology): WorkflowState;
73
73
 
74
74
  declare const ZERO_SPENT: Required<Budget>;
75
75
  declare function addSpent(spent: Required<Budget>, acc: Accounting): Required<Budget>;
@@ -81,9 +81,9 @@ type NodeData = {
81
81
  id: string;
82
82
  };
83
83
  declare function openIteration(state: WorkflowState): Iteration | undefined;
84
- declare function assignRole(state: WorkflowState, item: WorkItem): Role;
84
+ declare function assignRole(state: WorkflowState, item: WorkItem, roleFor?: (item: WorkItem) => string | undefined): Role;
85
85
  declare function resourceCapsFor(state: WorkflowState): Record<string, number>;
86
- declare function toExNodes(items: WorkItem[], state: WorkflowState, priorityOf?: (item: WorkItem) => number | undefined): ExNode<NodeData>[];
86
+ declare function toExNodes(items: WorkItem[], state: WorkflowState, priorityOf?: (item: WorkItem) => number | undefined, roleFor?: (item: WorkItem) => string | undefined): ExNode<NodeData>[];
87
87
  interface PlanOptions {
88
88
  max?: number;
89
89
  now?: string;
@@ -129,6 +129,6 @@ interface InitInput<C> {
129
129
  }
130
130
  declare function init<C>(input: InitInput<C>): ApplyResult;
131
131
 
132
- declare const VERSION = "0.2.0-stage";
132
+ declare const VERSION = "0.4.0-stage";
133
133
 
134
- export { Accounting, Action, ApplyResult, Brief, Budget, ErrorCode, Event, Evidence, Gate, type GateResult, Handoff, type InitInput, type ItemPatch, ItemStatus, Iteration, Methodology, MethodologyName, NewItem, type NextResult, PendingHuman, type PlanOptions, type PlanReason, type PlanResult, Policy, Role, Rule, type Skipped, Stage, Transition, VERSION, Violation, WorkItem, WorkflowError, WorkflowState, ZERO_SPENT, addEvidence, addItem, addSpent, appendEvent, applyAction, assertId, assertPolicies, assignRole, authorOf, checkGate, clearBlocker, complete, coreRulesFor, createState, decide, editItem, estimateTokens, evaluatePolicies, fail, getItem, init, isExhausted, isTerminalStage, lastDispatchBefore, lastEvent, moveItem, next, nextStageOf, nowOf, openIteration, plan, raiseBlocker, raisePending, remaining, resourceCapsFor, stageOf, synthesizeBrief, toExNodes, validateAction };
134
+ export { Accounting, Action, ApplyResult, Brief, Budget, ErrorCode, Event, Evidence, Gate, type GateResult, Handoff, type InitInput, ItemPatch, ItemStatus, Iteration, Methodology, MethodologyName, NewItem, type NextResult, PendingHuman, type PlanOptions, type PlanReason, type PlanResult, Policy, Role, Rule, type Skipped, Stage, Transition, VERSION, Violation, WorkItem, WorkflowError, WorkflowState, ZERO_SPENT, addEvidence, addItem, addSpent, appendEvent, applyAction, assertId, assertPolicies, assignRole, authorOf, checkGate, clearBlocker, complete, coreRulesFor, createState, decide, editItem, estimateTokens, evaluatePolicies, fail, getItem, init, isExhausted, isTerminalStage, lastDispatchBefore, lastEvent, moveItem, next, nextStageOf, nowOf, openIteration, plan, raiseBlocker, raisePending, remaining, resourceCapsFor, stageOf, synthesizeBrief, toExNodes, validateAction };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import'./chunk-KIQOUUEZ.mjs';export{c as complete,b as next,a as synthesizeBrief}from'./chunk-VN2UYV2O.mjs';export{a as ZERO_SPENT,b as addSpent,g as assignRole,e as estimateTokens,d as isExhausted,f as openIteration,j as plan,c as remaining,h as resourceCapsFor,i as toExNodes}from'./chunk-PD5FBDN7.mjs';export{y as addEvidence,v as addItem,c as appendEvent,M as applyAction,k as approversFor,E as assertPolicies,G as authorOf,n as canDo,H as checkGate,A as clearBlocker,K as coreRulesFor,b as createState,J as decide,w as editItem,D as evaluatePolicies,u as getItem,h as hasCapability,N as init,r as isTerminalStage,F as lastDispatchBefore,d as lastEvent,x as moveItem,q as nextStageOf,a as nowOf,z as raiseBlocker,I as raisePending,f as registerRole,o as requireCap,l as requireCapabilities,g as retireRole,i as rolesWith,m as separationLost,p as stageOf,L as validateAction}from'./chunk-NQU5TH3A.mjs';export{a as WorkflowError,c as assertId,b as fail}from'./chunk-2FRRD6A3.mjs';var U="0.2.0-stage";export{U as VERSION};//# sourceMappingURL=index.mjs.map
1
+ import'./chunk-KIQOUUEZ.mjs';export{c as complete,b as next,a as synthesizeBrief}from'./chunk-NZ2DIDOD.mjs';export{a as ZERO_SPENT,b as addSpent,g as assignRole,e as estimateTokens,d as isExhausted,f as openIteration,j as plan,c as remaining,h as resourceCapsFor,i as toExNodes}from'./chunk-GFH2FEZH.mjs';export{y as addEvidence,v as addItem,c as appendEvent,M as applyAction,k as approversFor,E as assertPolicies,G as authorOf,n as canDo,H as checkGate,A as clearBlocker,K as coreRulesFor,b as createState,J as decide,w as editItem,D as evaluatePolicies,u as getItem,h as hasCapability,N as init,r as isTerminalStage,F as lastDispatchBefore,d as lastEvent,x as moveItem,q as nextStageOf,a as nowOf,z as raiseBlocker,I as raisePending,f as registerRole,o as requireCap,l as requireCapabilities,g as retireRole,i as rolesWith,m as separationLost,p as stageOf,L as validateAction}from'./chunk-SHAPFMVP.mjs';export{a as WorkflowError,c as assertId,b as fail}from'./chunk-2FRRD6A3.mjs';var U="0.4.0-stage";export{U as VERSION};//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"s9BAAO,IAAMA,CAAAA,CAAU","file":"index.mjs","sourcesContent":["export const VERSION = \"0.2.0-stage\";\nexport * from \"./types.ts\";\nexport { WorkflowError, fail } from \"./errors.ts\";\nexport { createState, appendEvent, lastEvent, nowOf } from \"./state.ts\";\nexport {\n registerRole,\n retireRole,\n hasCapability,\n rolesWith,\n approversFor,\n requireCapabilities,\n separationLost,\n canDo,\n requireCap,\n} from \"./roles.ts\";\nexport {\n assertId,\n stageOf,\n nextStageOf,\n isTerminalStage,\n getItem,\n addItem,\n editItem,\n moveItem,\n addEvidence,\n raiseBlocker,\n clearBlocker,\n} from \"./items.ts\";\nexport type { ItemPatch } from \"./items.ts\";\nexport { evaluatePolicies, assertPolicies } from \"./policies.ts\";\nexport { checkGate, authorOf, lastDispatchBefore, raisePending, decide } from \"./gates.ts\";\nexport type { GateResult } from \"./gates.ts\";\nexport { ZERO_SPENT, addSpent, remaining, isExhausted, estimateTokens } from \"./budget.ts\";\nexport { plan, toExNodes, assignRole, resourceCapsFor, openIteration } from \"./planner.ts\";\nexport type { PlanOptions, PlanReason, PlanResult, Skipped } from \"./planner.ts\";\nexport { synthesizeBrief, next } from \"./brief.ts\";\nexport type { NextResult } from \"./brief.ts\";\nexport { complete } from \"./complete.ts\";\nexport { coreRulesFor } from \"./rules.ts\";\nexport { applyAction, validateAction, init } from \"./methodology.ts\";\nexport type { InitInput } from \"./methodology.ts\";\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["VERSION"],"mappings":"s9BAAO,IAAMA,CAAAA,CAAU","file":"index.mjs","sourcesContent":["export const VERSION = \"0.4.0-stage\";\nexport * from \"./types.ts\";\nexport { WorkflowError, fail } from \"./errors.ts\";\nexport { createState, appendEvent, lastEvent, nowOf } from \"./state.ts\";\nexport {\n registerRole,\n retireRole,\n hasCapability,\n rolesWith,\n approversFor,\n requireCapabilities,\n separationLost,\n canDo,\n requireCap,\n} from \"./roles.ts\";\nexport {\n assertId,\n stageOf,\n nextStageOf,\n isTerminalStage,\n getItem,\n addItem,\n editItem,\n moveItem,\n addEvidence,\n raiseBlocker,\n clearBlocker,\n} from \"./items.ts\";\nexport type { ItemPatch } from \"./items.ts\";\nexport { evaluatePolicies, assertPolicies } from \"./policies.ts\";\nexport { checkGate, authorOf, lastDispatchBefore, raisePending, decide } from \"./gates.ts\";\nexport type { GateResult } from \"./gates.ts\";\nexport { ZERO_SPENT, addSpent, remaining, isExhausted, estimateTokens } from \"./budget.ts\";\nexport { plan, toExNodes, assignRole, resourceCapsFor, openIteration } from \"./planner.ts\";\nexport type { PlanOptions, PlanReason, PlanResult, Skipped } from \"./planner.ts\";\nexport { synthesizeBrief, next } from \"./brief.ts\";\nexport type { NextResult } from \"./brief.ts\";\nexport { complete } from \"./complete.ts\";\nexport { coreRulesFor } from \"./rules.ts\";\nexport { applyAction, validateAction, init } from \"./methodology.ts\";\nexport type { InitInput } from \"./methodology.ts\";\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkD4HNETUL_cjs=require('../chunk-D4HNETUL.cjs');require('../chunk-JDVE7DQR.cjs'),require('../chunk-S3BXVHO7.cjs');Object.defineProperty(exports,"ACTIVE",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.a}});Object.defineProperty(exports,"CADENCE_EVENT",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.s}});Object.defineProperty(exports,"CLASSES",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.k}});Object.defineProperty(exports,"DAY_MS",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.l}});Object.defineProperty(exports,"DEFAULT_COLUMNS",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.n}});Object.defineProperty(exports,"KANBAN_CADENCES",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.j}});Object.defineProperty(exports,"KANBAN_VOCABULARY",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.F}});Object.defineProperty(exports,"OPEN",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.b}});Object.defineProperty(exports,"activeExpedites",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.h}});Object.defineProperty(exports,"addedAt",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.p}});Object.defineProperty(exports,"board",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.r}});Object.defineProperty(exports,"byClassThenAge",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.H}});Object.defineProperty(exports,"cadencesDue",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.t}});Object.defineProperty(exports,"cardAge",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.q}});Object.defineProperty(exports,"columnIndex",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.f}});Object.defineProperty(exports,"columnStays",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.w}});Object.defineProperty(exports,"commitmentColumn",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.d}});Object.defineProperty(exports,"configOf",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.m}});Object.defineProperty(exports,"deliveryColumn",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.e}});Object.defineProperty(exports,"enteredStageAt",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.i}});Object.defineProperty(exports,"kanban",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.I}});Object.defineProperty(exports,"kanbanCeremonies",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.B}});Object.defineProperty(exports,"kanbanMetrics",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.x}});Object.defineProperty(exports,"kanbanRoles",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.C}});Object.defineProperty(exports,"kanbanRules",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.D}});Object.defineProperty(exports,"kanbanStages",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.E}});Object.defineProperty(exports,"onBoard",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.g}});Object.defineProperty(exports,"opsReport",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.y}});Object.defineProperty(exports,"optionsColumn",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.c}});Object.defineProperty(exports,"percentile",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.v}});Object.defineProperty(exports,"priorityByClass",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.G}});Object.defineProperty(exports,"replay",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.u}});Object.defineProperty(exports,"riskReport",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.z}});Object.defineProperty(exports,"validateKanbanConfig",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.o}});Object.defineProperty(exports,"wantItems",{enumerable:true,get:function(){return chunkD4HNETUL_cjs.A}});//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var chunkUM5X2JHB_cjs=require('../chunk-UM5X2JHB.cjs');require('../chunk-SJRRQZ3R.cjs'),require('../chunk-S3BXVHO7.cjs');Object.defineProperty(exports,"ACTIVE",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.a}});Object.defineProperty(exports,"CADENCE_EVENT",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.s}});Object.defineProperty(exports,"CLASSES",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.k}});Object.defineProperty(exports,"DAY_MS",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.l}});Object.defineProperty(exports,"DEFAULT_COLUMNS",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.n}});Object.defineProperty(exports,"KANBAN_CADENCES",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.j}});Object.defineProperty(exports,"KANBAN_VOCABULARY",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.F}});Object.defineProperty(exports,"OPEN",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.b}});Object.defineProperty(exports,"activeExpedites",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.h}});Object.defineProperty(exports,"addedAt",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.p}});Object.defineProperty(exports,"board",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.r}});Object.defineProperty(exports,"byClassThenAge",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.H}});Object.defineProperty(exports,"cadencesDue",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.t}});Object.defineProperty(exports,"cardAge",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.q}});Object.defineProperty(exports,"columnIndex",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.f}});Object.defineProperty(exports,"columnStays",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.w}});Object.defineProperty(exports,"commitmentColumn",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.d}});Object.defineProperty(exports,"configOf",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.m}});Object.defineProperty(exports,"deliveryColumn",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.e}});Object.defineProperty(exports,"enteredStageAt",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.i}});Object.defineProperty(exports,"kanban",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.I}});Object.defineProperty(exports,"kanbanCeremonies",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.B}});Object.defineProperty(exports,"kanbanMetrics",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.x}});Object.defineProperty(exports,"kanbanRoles",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.C}});Object.defineProperty(exports,"kanbanRules",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.D}});Object.defineProperty(exports,"kanbanStages",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.E}});Object.defineProperty(exports,"onBoard",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.g}});Object.defineProperty(exports,"opsReport",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.y}});Object.defineProperty(exports,"optionsColumn",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.c}});Object.defineProperty(exports,"percentile",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.v}});Object.defineProperty(exports,"priorityByClass",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.G}});Object.defineProperty(exports,"replay",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.u}});Object.defineProperty(exports,"riskReport",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.z}});Object.defineProperty(exports,"validateKanbanConfig",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.o}});Object.defineProperty(exports,"wantItems",{enumerable:true,get:function(){return chunkUM5X2JHB_cjs.A}});//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,2 +1,2 @@
1
- export{a as ACTIVE,s as CADENCE_EVENT,k as CLASSES,l as DAY_MS,n as DEFAULT_COLUMNS,j as KANBAN_CADENCES,F as KANBAN_VOCABULARY,b as OPEN,h as activeExpedites,p as addedAt,r as board,H as byClassThenAge,t as cadencesDue,q as cardAge,f as columnIndex,w as columnStays,d as commitmentColumn,m as configOf,e as deliveryColumn,i as enteredStageAt,I as kanban,B as kanbanCeremonies,x as kanbanMetrics,C as kanbanRoles,D as kanbanRules,E as kanbanStages,g as onBoard,y as opsReport,c as optionsColumn,v as percentile,G as priorityByClass,u as replay,z as riskReport,o as validateKanbanConfig,A as wantItems}from'../chunk-XSXHEEJX.mjs';import'../chunk-NQU5TH3A.mjs';import'../chunk-2FRRD6A3.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{a as ACTIVE,s as CADENCE_EVENT,k as CLASSES,l as DAY_MS,n as DEFAULT_COLUMNS,j as KANBAN_CADENCES,F as KANBAN_VOCABULARY,b as OPEN,h as activeExpedites,p as addedAt,r as board,H as byClassThenAge,t as cadencesDue,q as cardAge,f as columnIndex,w as columnStays,d as commitmentColumn,m as configOf,e as deliveryColumn,i as enteredStageAt,I as kanban,B as kanbanCeremonies,x as kanbanMetrics,C as kanbanRoles,D as kanbanRules,E as kanbanStages,g as onBoard,y as opsReport,c as optionsColumn,v as percentile,G as priorityByClass,u as replay,z as riskReport,o as validateKanbanConfig,A as wantItems}from'../chunk-GATJZYTB.mjs';import'../chunk-SHAPFMVP.mjs';import'../chunk-2FRRD6A3.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkDXC2RSN5_cjs=require('../chunk-DXC2RSN5.cjs');require('../chunk-S3BXVHO7.cjs');Object.defineProperty(exports,"DRAFT_07",{enumerable:true,get:function(){return chunkDXC2RSN5_cjs.c}});Object.defineProperty(exports,"assertValid",{enumerable:true,get:function(){return chunkDXC2RSN5_cjs.b}});Object.defineProperty(exports,"handoffSchema",{enumerable:true,get:function(){return chunkDXC2RSN5_cjs.h}});Object.defineProperty(exports,"itemPatchSchema",{enumerable:true,get:function(){return chunkDXC2RSN5_cjs.g}});Object.defineProperty(exports,"kanbanConfigSchema",{enumerable:true,get:function(){return chunkDXC2RSN5_cjs.j}});Object.defineProperty(exports,"newItemSchema",{enumerable:true,get:function(){return chunkDXC2RSN5_cjs.f}});Object.defineProperty(exports,"roleSchema",{enumerable:true,get:function(){return chunkDXC2RSN5_cjs.e}});Object.defineProperty(exports,"scrumConfigSchema",{enumerable:true,get:function(){return chunkDXC2RSN5_cjs.i}});Object.defineProperty(exports,"validate",{enumerable:true,get:function(){return chunkDXC2RSN5_cjs.a}});Object.defineProperty(exports,"waterfallConfigSchema",{enumerable:true,get:function(){return chunkDXC2RSN5_cjs.k}});Object.defineProperty(exports,"workflowStateSchema",{enumerable:true,get:function(){return chunkDXC2RSN5_cjs.d}});//# sourceMappingURL=index.cjs.map
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,57 @@
1
+ /** The JSON Schema (draft-07) subset ts-json-schema-generator emits for our types and the validator understands. */
2
+ interface JsonSchema {
3
+ $schema?: string;
4
+ $ref?: string;
5
+ definitions?: Record<string, JsonSchema>;
6
+ type?: string | string[];
7
+ const?: unknown;
8
+ enum?: unknown[];
9
+ properties?: Record<string, JsonSchema>;
10
+ required?: string[];
11
+ additionalProperties?: boolean | JsonSchema;
12
+ items?: JsonSchema;
13
+ anyOf?: JsonSchema[];
14
+ minimum?: number;
15
+ maximum?: number;
16
+ minLength?: number;
17
+ pattern?: string;
18
+ description?: string;
19
+ }
20
+ /** A self-contained document: the root points into its own definitions. */
21
+ interface JsonSchemaDocument extends JsonSchema {
22
+ $schema: string;
23
+ $ref: string;
24
+ definitions: Record<string, JsonSchema>;
25
+ }
26
+ interface SchemaError {
27
+ /** JSON pointer to the offending value ("/" for the root) */
28
+ path: string;
29
+ /** which keyword failed: type, const, enum, required, additionalProperties, minimum, maximum, minLength, pattern */
30
+ keyword: string;
31
+ message: string;
32
+ expected: string;
33
+ found: string;
34
+ }
35
+
36
+ /** Validate `value` against `schema` (a document: `$ref`s resolve against its `definitions`). Returns every error found. */
37
+ declare function validate(schema: JsonSchema, value: unknown): SchemaError[];
38
+ /** Throw WorkflowError("invalid-input") describing the first problem when `value` does not match `schema`. */
39
+ declare function assertValid(schema: JsonSchema, value: unknown, what: string): void;
40
+
41
+ declare const DRAFT_07 = "http://json-schema.org/draft-07/schema#";
42
+ /** `.workflow/state.json` */
43
+ declare const workflowStateSchema: JsonSchemaDocument;
44
+ /** a role manifest (`.workflow/roles/*.json`, `exwf role add`) */
45
+ declare const roleSchema: JsonSchemaDocument;
46
+ /** `exwf add <item.json>` */
47
+ declare const newItemSchema: JsonSchemaDocument;
48
+ /** `exwf edit <id> <patch.json>` */
49
+ declare const itemPatchSchema: JsonSchemaDocument;
50
+ /** `exwf complete <id> <handoff.json>` */
51
+ declare const handoffSchema: JsonSchemaDocument;
52
+ /** `exwf init scrum --config` / the scrum-master policy.json */
53
+ declare const scrumConfigSchema: JsonSchemaDocument;
54
+ declare const kanbanConfigSchema: JsonSchemaDocument;
55
+ declare const waterfallConfigSchema: JsonSchemaDocument;
56
+
57
+ export { DRAFT_07, type JsonSchema, type JsonSchemaDocument, type SchemaError, assertValid, handoffSchema, itemPatchSchema, kanbanConfigSchema, newItemSchema, roleSchema, scrumConfigSchema, validate, waterfallConfigSchema, workflowStateSchema };
@@ -0,0 +1,57 @@
1
+ /** The JSON Schema (draft-07) subset ts-json-schema-generator emits for our types and the validator understands. */
2
+ interface JsonSchema {
3
+ $schema?: string;
4
+ $ref?: string;
5
+ definitions?: Record<string, JsonSchema>;
6
+ type?: string | string[];
7
+ const?: unknown;
8
+ enum?: unknown[];
9
+ properties?: Record<string, JsonSchema>;
10
+ required?: string[];
11
+ additionalProperties?: boolean | JsonSchema;
12
+ items?: JsonSchema;
13
+ anyOf?: JsonSchema[];
14
+ minimum?: number;
15
+ maximum?: number;
16
+ minLength?: number;
17
+ pattern?: string;
18
+ description?: string;
19
+ }
20
+ /** A self-contained document: the root points into its own definitions. */
21
+ interface JsonSchemaDocument extends JsonSchema {
22
+ $schema: string;
23
+ $ref: string;
24
+ definitions: Record<string, JsonSchema>;
25
+ }
26
+ interface SchemaError {
27
+ /** JSON pointer to the offending value ("/" for the root) */
28
+ path: string;
29
+ /** which keyword failed: type, const, enum, required, additionalProperties, minimum, maximum, minLength, pattern */
30
+ keyword: string;
31
+ message: string;
32
+ expected: string;
33
+ found: string;
34
+ }
35
+
36
+ /** Validate `value` against `schema` (a document: `$ref`s resolve against its `definitions`). Returns every error found. */
37
+ declare function validate(schema: JsonSchema, value: unknown): SchemaError[];
38
+ /** Throw WorkflowError("invalid-input") describing the first problem when `value` does not match `schema`. */
39
+ declare function assertValid(schema: JsonSchema, value: unknown, what: string): void;
40
+
41
+ declare const DRAFT_07 = "http://json-schema.org/draft-07/schema#";
42
+ /** `.workflow/state.json` */
43
+ declare const workflowStateSchema: JsonSchemaDocument;
44
+ /** a role manifest (`.workflow/roles/*.json`, `exwf role add`) */
45
+ declare const roleSchema: JsonSchemaDocument;
46
+ /** `exwf add <item.json>` */
47
+ declare const newItemSchema: JsonSchemaDocument;
48
+ /** `exwf edit <id> <patch.json>` */
49
+ declare const itemPatchSchema: JsonSchemaDocument;
50
+ /** `exwf complete <id> <handoff.json>` */
51
+ declare const handoffSchema: JsonSchemaDocument;
52
+ /** `exwf init scrum --config` / the scrum-master policy.json */
53
+ declare const scrumConfigSchema: JsonSchemaDocument;
54
+ declare const kanbanConfigSchema: JsonSchemaDocument;
55
+ declare const waterfallConfigSchema: JsonSchemaDocument;
56
+
57
+ export { DRAFT_07, type JsonSchema, type JsonSchemaDocument, type SchemaError, assertValid, handoffSchema, itemPatchSchema, kanbanConfigSchema, newItemSchema, roleSchema, scrumConfigSchema, validate, waterfallConfigSchema, workflowStateSchema };
@@ -0,0 +1,2 @@
1
+ export{c as DRAFT_07,b as assertValid,h as handoffSchema,g as itemPatchSchema,j as kanbanConfigSchema,f as newItemSchema,e as roleSchema,i as scrumConfigSchema,a as validate,k as waterfallConfigSchema,d as workflowStateSchema}from'../chunk-S22CPYXJ.mjs';import'../chunk-2FRRD6A3.mjs';//# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunk472WEDPJ_cjs=require('../chunk-472WEDPJ.cjs');require('../chunk-QDT35LXB.cjs');var chunkJDVE7DQR_cjs=require('../chunk-JDVE7DQR.cjs');require('../chunk-S3BXVHO7.cjs');Object.defineProperty(exports,"SCRUM_VOCABULARY",{enumerable:true,get:function(){return chunk472WEDPJ_cjs.h}});Object.defineProperty(exports,"closeSprint",{enumerable:true,get:function(){return chunk472WEDPJ_cjs.j}});Object.defineProperty(exports,"configOf",{enumerable:true,get:function(){return chunk472WEDPJ_cjs.i}});Object.defineProperty(exports,"dailyReport",{enumerable:true,get:function(){return chunk472WEDPJ_cjs.a}});Object.defineProperty(exports,"scrum",{enumerable:true,get:function(){return chunk472WEDPJ_cjs.k}});Object.defineProperty(exports,"scrumCeremonies",{enumerable:true,get:function(){return chunk472WEDPJ_cjs.b}});Object.defineProperty(exports,"scrumMetrics",{enumerable:true,get:function(){return chunk472WEDPJ_cjs.d}});Object.defineProperty(exports,"scrumRoles",{enumerable:true,get:function(){return chunk472WEDPJ_cjs.e}});Object.defineProperty(exports,"scrumRules",{enumerable:true,get:function(){return chunk472WEDPJ_cjs.f}});Object.defineProperty(exports,"scrumStages",{enumerable:true,get:function(){return chunk472WEDPJ_cjs.g}});Object.defineProperty(exports,"validateScrumConfig",{enumerable:true,get:function(){return chunk472WEDPJ_cjs.c}});Object.defineProperty(exports,"canDo",{enumerable:true,get:function(){return chunkJDVE7DQR_cjs.n}});//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var chunk7KF5K3L7_cjs=require('../chunk-7KF5K3L7.cjs');require('../chunk-CWBH7H52.cjs');var chunkSJRRQZ3R_cjs=require('../chunk-SJRRQZ3R.cjs');require('../chunk-S3BXVHO7.cjs');Object.defineProperty(exports,"SCRUM_VOCABULARY",{enumerable:true,get:function(){return chunk7KF5K3L7_cjs.h}});Object.defineProperty(exports,"closeSprint",{enumerable:true,get:function(){return chunk7KF5K3L7_cjs.j}});Object.defineProperty(exports,"configOf",{enumerable:true,get:function(){return chunk7KF5K3L7_cjs.i}});Object.defineProperty(exports,"dailyReport",{enumerable:true,get:function(){return chunk7KF5K3L7_cjs.a}});Object.defineProperty(exports,"scrum",{enumerable:true,get:function(){return chunk7KF5K3L7_cjs.k}});Object.defineProperty(exports,"scrumCeremonies",{enumerable:true,get:function(){return chunk7KF5K3L7_cjs.b}});Object.defineProperty(exports,"scrumMetrics",{enumerable:true,get:function(){return chunk7KF5K3L7_cjs.d}});Object.defineProperty(exports,"scrumRoles",{enumerable:true,get:function(){return chunk7KF5K3L7_cjs.e}});Object.defineProperty(exports,"scrumRules",{enumerable:true,get:function(){return chunk7KF5K3L7_cjs.f}});Object.defineProperty(exports,"scrumStages",{enumerable:true,get:function(){return chunk7KF5K3L7_cjs.g}});Object.defineProperty(exports,"validateScrumConfig",{enumerable:true,get:function(){return chunk7KF5K3L7_cjs.c}});Object.defineProperty(exports,"canDo",{enumerable:true,get:function(){return chunkSJRRQZ3R_cjs.n}});//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,2 +1,2 @@
1
- export{h as SCRUM_VOCABULARY,j as closeSprint,i as configOf,a as dailyReport,k as scrum,b as scrumCeremonies,d as scrumMetrics,e as scrumRoles,f as scrumRules,g as scrumStages,c as validateScrumConfig}from'../chunk-IBRC36PE.mjs';import'../chunk-PD5FBDN7.mjs';export{n as canDo}from'../chunk-NQU5TH3A.mjs';import'../chunk-2FRRD6A3.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{h as SCRUM_VOCABULARY,j as closeSprint,i as configOf,a as dailyReport,k as scrum,b as scrumCeremonies,d as scrumMetrics,e as scrumRoles,f as scrumRules,g as scrumStages,c as validateScrumConfig}from'../chunk-L2ZN6HEL.mjs';import'../chunk-GFH2FEZH.mjs';export{n as canDo}from'../chunk-SHAPFMVP.mjs';import'../chunk-2FRRD6A3.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
package/dist/types.d.cts CHANGED
@@ -26,6 +26,14 @@ interface Transition {
26
26
  at: string;
27
27
  by: string;
28
28
  }
29
+ /** Change-request: what the change touches and what it costs (waterfall change control). */
30
+ interface ImpactAnalysis {
31
+ summary: string;
32
+ /** phase ids to reopen when the change is approved (each must be baselined or open) */
33
+ reopen: string[];
34
+ /** estimated rework weight (story points / size) */
35
+ weight: number;
36
+ }
29
37
  interface WorkItem {
30
38
  id: string;
31
39
  type: ItemType;
@@ -49,7 +57,13 @@ interface WorkItem {
49
57
  tags?: string[];
50
58
  /** bug / change-request: ids of items whose finished work this invalidates */
51
59
  affects?: string[];
60
+ /** waterfall: Phase.id this item belongs to; questions and follow-ups inherit their parent's */
61
+ phase?: string;
62
+ /** change-request: impact analysis required before the change control board decides */
63
+ impactAnalysis?: ImpactAnalysis;
52
64
  }
65
+ /** Fields `editItem` / `exwf edit` may change. */
66
+ type ItemPatch = Partial<Omit<WorkItem, "id" | "stage" | "status" | "transitions" | "evidence" | "blockers">>;
53
67
  /** Fields a caller supplies to addItem; the rest are defaulted. */
54
68
  type NewItem = Pick<WorkItem, "id" | "title"> & Partial<Omit<WorkItem, "id" | "title" | "stage" | "status" | "evidence" | "blockers" | "transitions">> & {
55
69
  stage?: string;
@@ -101,11 +115,16 @@ interface Budget {
101
115
  turns?: number;
102
116
  wallclockMs?: number;
103
117
  }
118
+ interface Spent {
119
+ tokens: number;
120
+ turns: number;
121
+ wallclockMs: number;
122
+ }
104
123
  interface Iteration {
105
124
  id: string;
106
125
  goal: string;
107
126
  budget: Budget;
108
- spent: Required<Budget>;
127
+ spent: Spent;
109
128
  startedAt: string;
110
129
  endedAt?: string;
111
130
  committed: string[];
@@ -197,12 +216,23 @@ interface Lesson {
197
216
  item?: string;
198
217
  suggestedChange?: LessonChange;
199
218
  }
219
+ /** A deliverable recorded on a phase (gateReview input or engine-generated). */
220
+ interface Produced {
221
+ kind: string;
222
+ ref: string;
223
+ by: string;
224
+ at: string;
225
+ }
200
226
  interface Phase {
201
227
  id: string;
202
228
  name: string;
203
229
  deliverables: string[];
204
230
  gate: Gate;
205
231
  status: "pending" | "open" | "baselined" | "reopened";
232
+ /** planned budget; spent is tracked on the Iteration kickoff opens for the phase */
233
+ budget?: Budget;
234
+ /** phase-level deliverables (item evidence counts too) */
235
+ produced?: Produced[];
206
236
  }
207
237
  interface Baseline {
208
238
  phase: string;
@@ -222,6 +252,8 @@ interface WorkflowState {
222
252
  iterations: Iteration[];
223
253
  phases?: Phase[];
224
254
  baseline?: Baseline;
255
+ /** waterfall: every baseline ever taken, oldest first; `baseline` is the last one */
256
+ baselines?: Baseline[];
225
257
  events: Event[];
226
258
  accounting: Accounting[];
227
259
  pending: PendingHuman[];
@@ -302,6 +334,8 @@ interface PlannerOptions {
302
334
  wipCounts?: ItemStatus[];
303
335
  /** Per-item replacement for the target stage's wipLimit (e.g. an expedite bypass); undefined = no limit. */
304
336
  wipLimitOf?(stage: Stage, item: WorkItem): number | undefined;
337
+ /** Role id to dispatch a todo item to (e.g. the phase's deliverer); undefined = default (item.role, then reviewer/deliverer by capability). */
338
+ roleFor?(item: WorkItem): string | undefined;
305
339
  }
306
340
  interface Methodology<C = unknown> {
307
341
  name: MethodologyName;
@@ -324,7 +358,9 @@ interface Methodology<C = unknown> {
324
358
  afterComplete?(state: WorkflowState, itemId: string, now: string): WorkflowState;
325
359
  /** Methodology-specific status for hosts (e.g. cadences due); printed by `exwf status`. */
326
360
  report?(state: WorkflowState): Record<string, unknown>;
361
+ /** Called by decide() after a pending entry is resolved; lets the methodology act on it (e.g. baseline a phase gate, apply a change-request decision). */
362
+ afterDecide?(state: WorkflowState, entry: PendingHuman, decision: "approve" | "reject", by: string, note: string, now: string): WorkflowState;
327
363
  }
328
364
  type ErrorCode = "unknown-item" | "duplicate-item" | "unknown-role" | "duplicate-role" | "unknown-stage" | "missing-capability" | "exclusive-capability" | "role-has-open-items" | "invalid-transition" | "policy-unmet" | "gate-unmet" | "conflict-of-interest" | "handoff-invalid" | "accounting-invalid" | "rule-violation" | "planner-error" | "no-op" | "unknown-pending" | "unknown-ceremony" | "state-version" | "config-invalid" | "budget-exhausted" | "invalid-input";
329
365
 
330
- export type { Accounting, Action, ApplyResult, Baseline, Blocker, Brief, Budget, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, ErrorCode, Event, Evidence, Gate, GateRequirement, Handoff, ItemStatus, ItemType, Iteration, Lesson, LessonChange, Methodology, MethodologyName, ModelTier, NewItem, PendingHuman, Phase, PlannerOptions, Policy, Role, Rule, Stage, Transition, Verdict, Violation, WorkItem, WorkflowState };
366
+ export type { Accounting, Action, ApplyResult, Baseline, Blocker, Brief, Budget, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, ErrorCode, Event, Evidence, Gate, GateRequirement, Handoff, ImpactAnalysis, ItemPatch, ItemStatus, ItemType, Iteration, Lesson, LessonChange, Methodology, MethodologyName, ModelTier, NewItem, PendingHuman, Phase, PlannerOptions, Policy, Produced, Role, Rule, Spent, Stage, Transition, Verdict, Violation, WorkItem, WorkflowState };
package/dist/types.d.ts CHANGED
@@ -26,6 +26,14 @@ interface Transition {
26
26
  at: string;
27
27
  by: string;
28
28
  }
29
+ /** Change-request: what the change touches and what it costs (waterfall change control). */
30
+ interface ImpactAnalysis {
31
+ summary: string;
32
+ /** phase ids to reopen when the change is approved (each must be baselined or open) */
33
+ reopen: string[];
34
+ /** estimated rework weight (story points / size) */
35
+ weight: number;
36
+ }
29
37
  interface WorkItem {
30
38
  id: string;
31
39
  type: ItemType;
@@ -49,7 +57,13 @@ interface WorkItem {
49
57
  tags?: string[];
50
58
  /** bug / change-request: ids of items whose finished work this invalidates */
51
59
  affects?: string[];
60
+ /** waterfall: Phase.id this item belongs to; questions and follow-ups inherit their parent's */
61
+ phase?: string;
62
+ /** change-request: impact analysis required before the change control board decides */
63
+ impactAnalysis?: ImpactAnalysis;
52
64
  }
65
+ /** Fields `editItem` / `exwf edit` may change. */
66
+ type ItemPatch = Partial<Omit<WorkItem, "id" | "stage" | "status" | "transitions" | "evidence" | "blockers">>;
53
67
  /** Fields a caller supplies to addItem; the rest are defaulted. */
54
68
  type NewItem = Pick<WorkItem, "id" | "title"> & Partial<Omit<WorkItem, "id" | "title" | "stage" | "status" | "evidence" | "blockers" | "transitions">> & {
55
69
  stage?: string;
@@ -101,11 +115,16 @@ interface Budget {
101
115
  turns?: number;
102
116
  wallclockMs?: number;
103
117
  }
118
+ interface Spent {
119
+ tokens: number;
120
+ turns: number;
121
+ wallclockMs: number;
122
+ }
104
123
  interface Iteration {
105
124
  id: string;
106
125
  goal: string;
107
126
  budget: Budget;
108
- spent: Required<Budget>;
127
+ spent: Spent;
109
128
  startedAt: string;
110
129
  endedAt?: string;
111
130
  committed: string[];
@@ -197,12 +216,23 @@ interface Lesson {
197
216
  item?: string;
198
217
  suggestedChange?: LessonChange;
199
218
  }
219
+ /** A deliverable recorded on a phase (gateReview input or engine-generated). */
220
+ interface Produced {
221
+ kind: string;
222
+ ref: string;
223
+ by: string;
224
+ at: string;
225
+ }
200
226
  interface Phase {
201
227
  id: string;
202
228
  name: string;
203
229
  deliverables: string[];
204
230
  gate: Gate;
205
231
  status: "pending" | "open" | "baselined" | "reopened";
232
+ /** planned budget; spent is tracked on the Iteration kickoff opens for the phase */
233
+ budget?: Budget;
234
+ /** phase-level deliverables (item evidence counts too) */
235
+ produced?: Produced[];
206
236
  }
207
237
  interface Baseline {
208
238
  phase: string;
@@ -222,6 +252,8 @@ interface WorkflowState {
222
252
  iterations: Iteration[];
223
253
  phases?: Phase[];
224
254
  baseline?: Baseline;
255
+ /** waterfall: every baseline ever taken, oldest first; `baseline` is the last one */
256
+ baselines?: Baseline[];
225
257
  events: Event[];
226
258
  accounting: Accounting[];
227
259
  pending: PendingHuman[];
@@ -302,6 +334,8 @@ interface PlannerOptions {
302
334
  wipCounts?: ItemStatus[];
303
335
  /** Per-item replacement for the target stage's wipLimit (e.g. an expedite bypass); undefined = no limit. */
304
336
  wipLimitOf?(stage: Stage, item: WorkItem): number | undefined;
337
+ /** Role id to dispatch a todo item to (e.g. the phase's deliverer); undefined = default (item.role, then reviewer/deliverer by capability). */
338
+ roleFor?(item: WorkItem): string | undefined;
305
339
  }
306
340
  interface Methodology<C = unknown> {
307
341
  name: MethodologyName;
@@ -324,7 +358,9 @@ interface Methodology<C = unknown> {
324
358
  afterComplete?(state: WorkflowState, itemId: string, now: string): WorkflowState;
325
359
  /** Methodology-specific status for hosts (e.g. cadences due); printed by `exwf status`. */
326
360
  report?(state: WorkflowState): Record<string, unknown>;
361
+ /** Called by decide() after a pending entry is resolved; lets the methodology act on it (e.g. baseline a phase gate, apply a change-request decision). */
362
+ afterDecide?(state: WorkflowState, entry: PendingHuman, decision: "approve" | "reject", by: string, note: string, now: string): WorkflowState;
327
363
  }
328
364
  type ErrorCode = "unknown-item" | "duplicate-item" | "unknown-role" | "duplicate-role" | "unknown-stage" | "missing-capability" | "exclusive-capability" | "role-has-open-items" | "invalid-transition" | "policy-unmet" | "gate-unmet" | "conflict-of-interest" | "handoff-invalid" | "accounting-invalid" | "rule-violation" | "planner-error" | "no-op" | "unknown-pending" | "unknown-ceremony" | "state-version" | "config-invalid" | "budget-exhausted" | "invalid-input";
329
365
 
330
- export type { Accounting, Action, ApplyResult, Baseline, Blocker, Brief, Budget, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, ErrorCode, Event, Evidence, Gate, GateRequirement, Handoff, ItemStatus, ItemType, Iteration, Lesson, LessonChange, Methodology, MethodologyName, ModelTier, NewItem, PendingHuman, Phase, PlannerOptions, Policy, Role, Rule, Stage, Transition, Verdict, Violation, WorkItem, WorkflowState };
366
+ export type { Accounting, Action, ApplyResult, Baseline, Blocker, Brief, Budget, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, ErrorCode, Event, Evidence, Gate, GateRequirement, Handoff, ImpactAnalysis, ItemPatch, ItemStatus, ItemType, Iteration, Lesson, LessonChange, Methodology, MethodologyName, ModelTier, NewItem, PendingHuman, Phase, PlannerOptions, Policy, Produced, Role, Rule, Spent, Stage, Transition, Verdict, Violation, WorkItem, WorkflowState };