@orcalang/orca-lang 0.1.18 → 0.1.21

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 (62) hide show
  1. package/dist/compiler/dt-compiler.d.ts +26 -0
  2. package/dist/compiler/dt-compiler.d.ts.map +1 -0
  3. package/dist/compiler/dt-compiler.js +387 -0
  4. package/dist/compiler/dt-compiler.js.map +1 -0
  5. package/dist/health-check.d.ts +3 -0
  6. package/dist/health-check.d.ts.map +1 -0
  7. package/dist/health-check.js +235 -0
  8. package/dist/health-check.js.map +1 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +5 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/parser/ast-to-markdown.d.ts.map +1 -1
  13. package/dist/parser/ast-to-markdown.js +3 -1
  14. package/dist/parser/ast-to-markdown.js.map +1 -1
  15. package/dist/parser/ast.d.ts +3 -0
  16. package/dist/parser/ast.d.ts.map +1 -1
  17. package/dist/parser/dt-ast.d.ts +43 -0
  18. package/dist/parser/dt-ast.d.ts.map +1 -0
  19. package/dist/parser/dt-ast.js +3 -0
  20. package/dist/parser/dt-ast.js.map +1 -0
  21. package/dist/parser/dt-parser.d.ts +40 -0
  22. package/dist/parser/dt-parser.d.ts.map +1 -0
  23. package/dist/parser/dt-parser.js +240 -0
  24. package/dist/parser/dt-parser.js.map +1 -0
  25. package/dist/parser/markdown-parser.d.ts.map +1 -1
  26. package/dist/parser/markdown-parser.js +43 -8
  27. package/dist/parser/markdown-parser.js.map +1 -1
  28. package/dist/skills.d.ts +50 -1
  29. package/dist/skills.d.ts.map +1 -1
  30. package/dist/skills.js +508 -21
  31. package/dist/skills.js.map +1 -1
  32. package/dist/tools.d.ts.map +1 -1
  33. package/dist/tools.js +49 -0
  34. package/dist/tools.js.map +1 -1
  35. package/dist/verifier/dt-verifier.d.ts +32 -0
  36. package/dist/verifier/dt-verifier.d.ts.map +1 -0
  37. package/dist/verifier/dt-verifier.js +830 -0
  38. package/dist/verifier/dt-verifier.js.map +1 -0
  39. package/dist/verifier/properties.d.ts +4 -0
  40. package/dist/verifier/properties.d.ts.map +1 -1
  41. package/dist/verifier/properties.js +56 -20
  42. package/dist/verifier/properties.js.map +1 -1
  43. package/dist/verifier/structural.d.ts.map +1 -1
  44. package/dist/verifier/structural.js +6 -1
  45. package/dist/verifier/structural.js.map +1 -1
  46. package/dist/verifier/types.d.ts +4 -0
  47. package/dist/verifier/types.d.ts.map +1 -1
  48. package/package.json +3 -2
  49. package/src/compiler/dt-compiler.ts +454 -0
  50. package/src/health-check.ts +273 -0
  51. package/src/index.ts +5 -1
  52. package/src/parser/ast-to-markdown.ts +2 -1
  53. package/src/parser/ast.ts +4 -0
  54. package/src/parser/dt-ast.ts +40 -0
  55. package/src/parser/dt-parser.ts +289 -0
  56. package/src/parser/markdown-parser.ts +43 -8
  57. package/src/skills.ts +591 -22
  58. package/src/tools.ts +53 -0
  59. package/src/verifier/dt-verifier.ts +928 -0
  60. package/src/verifier/properties.ts +78 -23
  61. package/src/verifier/structural.ts +5 -1
  62. package/src/verifier/types.ts +4 -0
package/src/tools.ts CHANGED
@@ -143,4 +143,57 @@ export const ORCA_TOOLS: ToolDef[] = [
143
143
  required: [],
144
144
  },
145
145
  },
146
+ {
147
+ name: 'parse_decision_table',
148
+ description:
149
+ 'Parse decision table from .orca.md source → JSON (conditions, actions, rules). Syntax: # decision_table Name, ## conditions table, ## actions table, ## rules table. Can be standalone or combined with machines in the same file.',
150
+ inputSchema: {
151
+ type: 'object',
152
+ properties: {
153
+ source: { type: 'string', description: 'Raw .orca.md content containing a # decision_table heading.' },
154
+ },
155
+ required: ['source'],
156
+ },
157
+ },
158
+ {
159
+ name: 'verify_decision_table',
160
+ description:
161
+ 'Verify decision table: checks completeness (all condition combinations covered), consistency (no contradictory rules), redundancy. Returns structured errors with codes and suggestions.',
162
+ inputSchema: {
163
+ type: 'object',
164
+ properties: {
165
+ source: { type: 'string', description: 'Raw .orca.md content containing a # decision_table heading.' },
166
+ },
167
+ required: ['source'],
168
+ },
169
+ },
170
+ {
171
+ name: 'compile_decision_table',
172
+ description:
173
+ 'Compile verified decision table to TypeScript evaluator function or portable JSON. Run verify_decision_table first. target: "typescript" (default) or "json".',
174
+ inputSchema: {
175
+ type: 'object',
176
+ properties: {
177
+ source: { type: 'string', description: 'Raw .orca.md content containing a # decision_table heading.' },
178
+ target: {
179
+ type: 'string',
180
+ enum: ['typescript', 'json'],
181
+ description: 'Compilation target (default: typescript)',
182
+ },
183
+ },
184
+ required: ['source'],
185
+ },
186
+ },
187
+ {
188
+ name: 'generate_decision_table',
189
+ description:
190
+ 'Generate a decision table in .orca.md format from a natural language spec. Always verify_decision_table next. Requires LLM API key.',
191
+ inputSchema: {
192
+ type: 'object',
193
+ properties: {
194
+ spec: { type: 'string', description: 'Natural language description of the decision logic' },
195
+ },
196
+ required: ['spec'],
197
+ },
198
+ },
146
199
  ];