@dxos/deus 0.0.0-stage → 0.0.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 (201) hide show
  1. package/LICENSE +105 -0
  2. package/README.md +24 -2
  3. package/bin/deus.ts +42 -0
  4. package/dist/lib/chunk-blocks.mjs +151 -0
  5. package/dist/lib/chunk-blocks.mjs.map +1 -0
  6. package/dist/lib/chunk-check.mjs +452 -0
  7. package/dist/lib/chunk-check.mjs.map +1 -0
  8. package/dist/lib/chunk-completion.mjs +112 -0
  9. package/dist/lib/chunk-completion.mjs.map +1 -0
  10. package/dist/lib/chunk-extension.mjs +396 -0
  11. package/dist/lib/chunk-extension.mjs.map +1 -0
  12. package/dist/lib/chunk-parse.mjs +21 -0
  13. package/dist/lib/chunk-parse.mjs.map +1 -0
  14. package/dist/lib/cli.mjs +946 -0
  15. package/dist/lib/cli.mjs.map +1 -0
  16. package/dist/lib/extension.mjs +4 -0
  17. package/dist/lib/index.mjs +6 -0
  18. package/dist/lib/parse.mjs +4 -0
  19. package/dist/lib/review.mjs +260 -0
  20. package/dist/lib/review.mjs.map +1 -0
  21. package/dist/lib/spec-index.mjs +28 -0
  22. package/dist/lib/spec-index.mjs.map +1 -0
  23. package/dist/types/bin/deus.d.ts +3 -0
  24. package/dist/types/bin/deus.d.ts.map +1 -0
  25. package/dist/types/src/cli/__fixtures__/review/plugin-deps/dx.config.d.ts +8 -0
  26. package/dist/types/src/cli/__fixtures__/review/plugin-deps/dx.config.d.ts.map +1 -0
  27. package/dist/types/src/cli/__fixtures__/review/plugin-deps-diverged/dx.config.d.ts +8 -0
  28. package/dist/types/src/cli/__fixtures__/review/plugin-deps-diverged/dx.config.d.ts.map +1 -0
  29. package/dist/types/src/cli/__fixtures__/review/plugin-deps-empty/dx.config.d.ts +7 -0
  30. package/dist/types/src/cli/__fixtures__/review/plugin-deps-empty/dx.config.d.ts.map +1 -0
  31. package/dist/types/src/cli/__fixtures__/review/plugin-deps-mismatch/dx.config.d.ts +8 -0
  32. package/dist/types/src/cli/__fixtures__/review/plugin-deps-mismatch/dx.config.d.ts.map +1 -0
  33. package/dist/types/src/cli/__fixtures__/review/plugin-deps-noplugin/dx.config.d.ts +5 -0
  34. package/dist/types/src/cli/__fixtures__/review/plugin-deps-noplugin/dx.config.d.ts.map +1 -0
  35. package/dist/types/src/cli/changelog.d.ts +25 -0
  36. package/dist/types/src/cli/changelog.d.ts.map +1 -0
  37. package/dist/types/src/cli/cli.test.d.ts +2 -0
  38. package/dist/types/src/cli/cli.test.d.ts.map +1 -0
  39. package/dist/types/src/cli/errors.d.ts +183 -0
  40. package/dist/types/src/cli/errors.d.ts.map +1 -0
  41. package/dist/types/src/cli/features.d.ts +58 -0
  42. package/dist/types/src/cli/features.d.ts.map +1 -0
  43. package/dist/types/src/cli/git.d.ts +8 -0
  44. package/dist/types/src/cli/git.d.ts.map +1 -0
  45. package/dist/types/src/cli/index.d.ts +12 -0
  46. package/dist/types/src/cli/index.d.ts.map +1 -0
  47. package/dist/types/src/cli/lint.d.ts +17 -0
  48. package/dist/types/src/cli/lint.d.ts.map +1 -0
  49. package/dist/types/src/cli/qa-lint.d.ts +40 -0
  50. package/dist/types/src/cli/qa-lint.d.ts.map +1 -0
  51. package/dist/types/src/cli/qa.d.ts +86 -0
  52. package/dist/types/src/cli/qa.d.ts.map +1 -0
  53. package/dist/types/src/cli/review.d.ts +38 -0
  54. package/dist/types/src/cli/review.d.ts.map +1 -0
  55. package/dist/types/src/cli/spec-index.d.ts +17 -0
  56. package/dist/types/src/cli/spec-index.d.ts.map +1 -0
  57. package/dist/types/src/extension/blocks.d.ts +65 -0
  58. package/dist/types/src/extension/blocks.d.ts.map +1 -0
  59. package/dist/types/src/extension/check.d.ts +99 -0
  60. package/dist/types/src/extension/check.d.ts.map +1 -0
  61. package/dist/types/src/extension/check.test.d.ts +2 -0
  62. package/dist/types/src/extension/check.test.d.ts.map +1 -0
  63. package/dist/types/src/extension/code.d.ts +7 -0
  64. package/dist/types/src/extension/code.d.ts.map +1 -0
  65. package/dist/types/src/extension/complete.d.ts +6 -0
  66. package/dist/types/src/extension/complete.d.ts.map +1 -0
  67. package/dist/types/src/extension/completion.d.ts +10 -0
  68. package/dist/types/src/extension/completion.d.ts.map +1 -0
  69. package/dist/types/src/extension/constants.d.ts +6 -0
  70. package/dist/types/src/extension/constants.d.ts.map +1 -0
  71. package/dist/types/src/extension/fences.d.ts +10 -0
  72. package/dist/types/src/extension/fences.d.ts.map +1 -0
  73. package/dist/types/src/extension/gen/mdl.d.ts +3 -0
  74. package/dist/types/src/extension/gen/mdl.d.ts.map +1 -0
  75. package/dist/types/src/extension/gen/mdl.terms.d.ts +2 -0
  76. package/dist/types/src/extension/gen/mdl.terms.d.ts.map +1 -0
  77. package/dist/types/src/extension/index.d.ts +8 -0
  78. package/dist/types/src/extension/index.d.ts.map +1 -0
  79. package/dist/types/src/extension/language.d.ts +20 -0
  80. package/dist/types/src/extension/language.d.ts.map +1 -0
  81. package/dist/types/src/extension/lint.d.ts +8 -0
  82. package/dist/types/src/extension/lint.d.ts.map +1 -0
  83. package/dist/types/src/extension/parse.d.ts +6 -0
  84. package/dist/types/src/extension/parse.d.ts.map +1 -0
  85. package/dist/types/src/extension/parser.test.d.ts +2 -0
  86. package/dist/types/src/extension/parser.test.d.ts.map +1 -0
  87. package/dist/types/src/extension/refs.d.ts +32 -0
  88. package/dist/types/src/extension/refs.d.ts.map +1 -0
  89. package/dist/types/src/extension/refs.test.d.ts +2 -0
  90. package/dist/types/src/extension/refs.test.d.ts.map +1 -0
  91. package/dist/types/src/extension/syntax.d.ts +12 -0
  92. package/dist/types/src/extension/syntax.d.ts.map +1 -0
  93. package/dist/types/src/index.d.ts +3 -0
  94. package/dist/types/src/index.d.ts.map +1 -0
  95. package/dist/types/src/review/fields.d.ts +9 -0
  96. package/dist/types/src/review/fields.d.ts.map +1 -0
  97. package/dist/types/src/review/index.d.ts +5 -0
  98. package/dist/types/src/review/index.d.ts.map +1 -0
  99. package/dist/types/src/review/review.d.ts +70 -0
  100. package/dist/types/src/review/review.d.ts.map +1 -0
  101. package/dist/types/src/review/review.test.d.ts +2 -0
  102. package/dist/types/src/review/review.test.d.ts.map +1 -0
  103. package/dist/types/src/review/source-key.d.ts +35 -0
  104. package/dist/types/src/review/source-key.d.ts.map +1 -0
  105. package/dist/types/src/review/symbol.d.ts +17 -0
  106. package/dist/types/src/review/symbol.d.ts.map +1 -0
  107. package/dist/types/src/review/symbol.test.d.ts +2 -0
  108. package/dist/types/src/review/symbol.test.d.ts.map +1 -0
  109. package/dist/types/src/spec-index/index.d.ts +3 -0
  110. package/dist/types/src/spec-index/index.d.ts.map +1 -0
  111. package/dist/types/src/spec-index/parse.d.ts +11 -0
  112. package/dist/types/src/spec-index/parse.d.ts.map +1 -0
  113. package/dist/types/src/spec-index/spec-index.d.ts +21 -0
  114. package/dist/types/src/spec-index/spec-index.d.ts.map +1 -0
  115. package/dist/types/src/spec-index/spec-index.test.d.ts +2 -0
  116. package/dist/types/src/spec-index/spec-index.test.d.ts.map +1 -0
  117. package/dist/types/tsconfig.tsbuildinfo +1 -0
  118. package/docs/DESIGN.md +561 -0
  119. package/docs/IDIOMS.md +265 -0
  120. package/lang/PLUGIN-.template.mdl +115 -0
  121. package/lang/app.mdl +200 -0
  122. package/lang/changelog.mdl +184 -0
  123. package/lang/core.mdl +203 -0
  124. package/lang/examples/chess-1.mdl +149 -0
  125. package/lang/examples/chess-2.mdl +203 -0
  126. package/lang/examples/chess-3.mdl +231 -0
  127. package/lang/features.mdl +92 -0
  128. package/lang/plugin.mdl +59 -0
  129. package/lang/qa.mdl +383 -0
  130. package/lang/review.mdl +103 -0
  131. package/lang/sql.mdl +72 -0
  132. package/package.json +74 -3
  133. package/src/cli/__fixtures__/bad-decision.mdl +13 -0
  134. package/src/cli/__fixtures__/features/CYCLE.mdl +25 -0
  135. package/src/cli/__fixtures__/features/FEATURES.mdl +47 -0
  136. package/src/cli/__fixtures__/features/SPEC.mdl +22 -0
  137. package/src/cli/__fixtures__/features/SPEC.review.mdl +32 -0
  138. package/src/cli/__fixtures__/features/TASKS.md +5 -0
  139. package/src/cli/__fixtures__/lint-refs/SPEC.mdl +7 -0
  140. package/src/cli/__fixtures__/lint-refs/SPEC.review.mdl +7 -0
  141. package/src/cli/__fixtures__/qa-lint/packages/plugins/plugin-risky/PLUGIN.mdl +29 -0
  142. package/src/cli/__fixtures__/qa-list/plugin-sample/spec/PLUGIN.mdl +51 -0
  143. package/src/cli/__fixtures__/review/SPEC.mdl +23 -0
  144. package/src/cli/__fixtures__/review/SPEC.review.mdl +26 -0
  145. package/src/cli/__fixtures__/review/plugin-deps/PLUGIN.mdl +9 -0
  146. package/src/cli/__fixtures__/review/plugin-deps/PLUGIN.review.mdl +13 -0
  147. package/src/cli/__fixtures__/review/plugin-deps/dx.config.ts +10 -0
  148. package/src/cli/__fixtures__/review/plugin-deps-diverged/PLUGIN.mdl +9 -0
  149. package/src/cli/__fixtures__/review/plugin-deps-diverged/PLUGIN.review.mdl +14 -0
  150. package/src/cli/__fixtures__/review/plugin-deps-diverged/dx.config.ts +10 -0
  151. package/src/cli/__fixtures__/review/plugin-deps-empty/PLUGIN.mdl +9 -0
  152. package/src/cli/__fixtures__/review/plugin-deps-empty/PLUGIN.review.mdl +13 -0
  153. package/src/cli/__fixtures__/review/plugin-deps-empty/dx.config.ts +9 -0
  154. package/src/cli/__fixtures__/review/plugin-deps-mismatch/PLUGIN.mdl +9 -0
  155. package/src/cli/__fixtures__/review/plugin-deps-mismatch/PLUGIN.review.mdl +13 -0
  156. package/src/cli/__fixtures__/review/plugin-deps-mismatch/dx.config.ts +10 -0
  157. package/src/cli/__fixtures__/review/plugin-deps-noplugin/PLUGIN.mdl +9 -0
  158. package/src/cli/__fixtures__/review/plugin-deps-noplugin/PLUGIN.review.mdl +13 -0
  159. package/src/cli/__fixtures__/review/plugin-deps-noplugin/dx.config.ts +7 -0
  160. package/src/cli/changelog.ts +122 -0
  161. package/src/cli/cli.test.ts +359 -0
  162. package/src/cli/errors.ts +23 -0
  163. package/src/cli/features.ts +320 -0
  164. package/src/cli/git.ts +35 -0
  165. package/src/cli/index.ts +27 -0
  166. package/src/cli/lint.ts +75 -0
  167. package/src/cli/qa-lint.ts +206 -0
  168. package/src/cli/qa.ts +300 -0
  169. package/src/cli/review.ts +359 -0
  170. package/src/cli/spec-index.ts +54 -0
  171. package/src/extension/blocks.ts +169 -0
  172. package/src/extension/check.test.ts +629 -0
  173. package/src/extension/check.ts +552 -0
  174. package/src/extension/code.ts +99 -0
  175. package/src/extension/complete.ts +34 -0
  176. package/src/extension/completion.ts +64 -0
  177. package/src/extension/constants.ts +28 -0
  178. package/src/extension/fences.ts +270 -0
  179. package/src/extension/gen/mdl.terms.ts +16 -0
  180. package/src/extension/gen/mdl.ts +16 -0
  181. package/src/extension/index.ts +25 -0
  182. package/src/extension/language.ts +33 -0
  183. package/src/extension/lint.ts +19 -0
  184. package/src/extension/mdl.grammar +60 -0
  185. package/src/extension/parse.ts +31 -0
  186. package/src/extension/parser.test.ts +248 -0
  187. package/src/extension/refs.test.ts +95 -0
  188. package/src/extension/refs.ts +94 -0
  189. package/src/extension/syntax.ts +25 -0
  190. package/src/index.ts +6 -0
  191. package/src/review/fields.ts +31 -0
  192. package/src/review/index.ts +8 -0
  193. package/src/review/review.test.ts +111 -0
  194. package/src/review/review.ts +184 -0
  195. package/src/review/source-key.ts +63 -0
  196. package/src/review/symbol.test.ts +47 -0
  197. package/src/review/symbol.ts +96 -0
  198. package/src/spec-index/index.ts +6 -0
  199. package/src/spec-index/parse.ts +22 -0
  200. package/src/spec-index/spec-index.test.ts +56 -0
  201. package/src/spec-index/spec-index.ts +49 -0
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ plugin: {
3
+ id: string;
4
+ dependsOn: string[];
5
+ };
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=dx.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dx.config.d.ts","sourceRoot":"","sources":["../../../../../../../src/cli/__fixtures__/review/plugin-deps/dx.config.ts"],"names":[],"mappings":";IAKE,MAAM;QACJ,EAAE;QACF,SAAS"}
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ plugin: {
3
+ id: string;
4
+ dependsOn: string[];
5
+ };
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=dx.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dx.config.d.ts","sourceRoot":"","sources":["../../../../../../../src/cli/__fixtures__/review/plugin-deps-diverged/dx.config.ts"],"names":[],"mappings":";IAKE,MAAM;QACJ,EAAE;QACF,SAAS"}
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ plugin: {
3
+ id: string;
4
+ };
5
+ };
6
+ export default _default;
7
+ //# sourceMappingURL=dx.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dx.config.d.ts","sourceRoot":"","sources":["../../../../../../../src/cli/__fixtures__/review/plugin-deps-empty/dx.config.ts"],"names":[],"mappings":";IAKE,MAAM;QACJ,EAAE"}
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ plugin: {
3
+ id: string;
4
+ dependsOn: string[];
5
+ };
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=dx.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dx.config.d.ts","sourceRoot":"","sources":["../../../../../../../src/cli/__fixtures__/review/plugin-deps-mismatch/dx.config.ts"],"names":[],"mappings":";IAKE,MAAM;QACJ,EAAE;QACF,SAAS"}
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ name: string;
3
+ };
4
+ export default _default;
5
+ //# sourceMappingURL=dx.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dx.config.d.ts","sourceRoot":"","sources":["../../../../../../../src/cli/__fixtures__/review/plugin-deps-noplugin/dx.config.ts"],"names":[],"mappings":";IAKE,IAAI"}
@@ -0,0 +1,25 @@
1
+ import * as Command from 'effect/cli/Command';
2
+ import * as Config from 'effect/Config';
3
+ import * as Effect from 'effect/Effect';
4
+ import * as FileSystem from 'effect/FileSystem';
5
+ import * as Path from 'effect/Path';
6
+ import { ChangelogCheckError } from './errors.ts';
7
+ /** A commit trailer that waives the missing-decision rule for a bulk mechanical edit; append-only rules still apply. */
8
+ export declare const WAIVER = "Spec-Changelog-Skip";
9
+ export declare const DEFAULT_BASE_REF = "origin/main";
10
+ export type ChangelogCheckOptions = {
11
+ /** Ref whose merge base with HEAD the working tree is compared against. */
12
+ base: string;
13
+ /** Repository directory; any path inside the work tree. */
14
+ cwd: string;
15
+ /** `GITHUB_EVENT_NAME`; the check runs only for pull requests or outside CI. */
16
+ event: string;
17
+ };
18
+ /**
19
+ * Fails when a changed .mdl spec has no new `## Changelog` decision, or edits the log in place (lang/changelog.mdl).
20
+ * Whitespace and small typo fixes need no decision; a `Spec-Changelog-Skip: <reason>` commit trailer waives the rule.
21
+ * Compares the working tree with the merge base of `base`, so a local run also covers uncommitted edits.
22
+ */
23
+ export declare const checkChangelog: (args_0: ChangelogCheckOptions) => Effect.Effect<undefined, ChangelogCheckError | import("./errors.ts").GitError | import("effect/PlatformError").PlatformError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | Path.Path>;
24
+ export declare const changelog: Command.Command<"changelog", {}, {}, ChangelogCheckError | Config.ConfigError | import("./errors.ts").GitError | import("effect/PlatformError").PlatformError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | Path.Path>;
25
+ //# sourceMappingURL=changelog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../../src/cli/changelog.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAE9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAGpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD,wHAAwH;AACxH,eAAO,MAAM,MAAM,wBAAwB,CAAC;AAK5C,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C,MAAM,MAAM,qBAAqB,GAAG;IAClC,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,wQA2DzB,CAAC;AAqBH,eAAO,MAAM,SAAS,sQAGrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cli.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.test.d.ts","sourceRoot":"","sources":["../../../../src/cli/cli.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,183 @@
1
+ import { BaseError } from '@dxos/errors';
2
+ declare const GitError_base: {
3
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
4
+ cause?: unknown;
5
+ stack?: string;
6
+ name: "DeusGitError";
7
+ context: Record<string, unknown>;
8
+ readonly message: string;
9
+ readonly _tag: "DeusGitError";
10
+ };
11
+ isError(error: unknown): error is Error;
12
+ name: "DeusGitError";
13
+ is(error: unknown): error is BaseError;
14
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
15
+ ifTypeDiffers?: boolean;
16
+ }): (error: unknown) => {
17
+ cause?: unknown;
18
+ stack?: string;
19
+ name: "DeusGitError";
20
+ context: Record<string, unknown>;
21
+ readonly message: string;
22
+ readonly _tag: "DeusGitError";
23
+ };
24
+ extend<Name extends string = string>(name: Name, message?: string): any;
25
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
26
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
27
+ stackTraceLimit: number;
28
+ };
29
+ /** A git command failed or exited non-zero. */
30
+ export declare class GitError extends GitError_base {
31
+ }
32
+ declare const ChangelogCheckError_base: {
33
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
34
+ cause?: unknown;
35
+ stack?: string;
36
+ name: "DeusChangelogCheckError";
37
+ context: Record<string, unknown>;
38
+ readonly message: string;
39
+ readonly _tag: "DeusChangelogCheckError";
40
+ };
41
+ isError(error: unknown): error is Error;
42
+ name: "DeusChangelogCheckError";
43
+ is(error: unknown): error is BaseError;
44
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
45
+ ifTypeDiffers?: boolean;
46
+ }): (error: unknown) => {
47
+ cause?: unknown;
48
+ stack?: string;
49
+ name: "DeusChangelogCheckError";
50
+ context: Record<string, unknown>;
51
+ readonly message: string;
52
+ readonly _tag: "DeusChangelogCheckError";
53
+ };
54
+ extend<Name extends string = string>(name: Name, message?: string): any;
55
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
56
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
57
+ stackTraceLimit: number;
58
+ };
59
+ /** One or more changed specs break the changelog rules. */
60
+ export declare class ChangelogCheckError extends ChangelogCheckError_base {
61
+ }
62
+ declare const QaLintError_base: {
63
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
64
+ cause?: unknown;
65
+ stack?: string;
66
+ name: "DeusQaLintError";
67
+ context: Record<string, unknown>;
68
+ readonly message: string;
69
+ readonly _tag: "DeusQaLintError";
70
+ };
71
+ isError(error: unknown): error is Error;
72
+ name: "DeusQaLintError";
73
+ is(error: unknown): error is BaseError;
74
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
75
+ ifTypeDiffers?: boolean;
76
+ }): (error: unknown) => {
77
+ cause?: unknown;
78
+ stack?: string;
79
+ name: "DeusQaLintError";
80
+ context: Record<string, unknown>;
81
+ readonly message: string;
82
+ readonly _tag: "DeusQaLintError";
83
+ };
84
+ extend<Name extends string = string>(name: Name, message?: string): any;
85
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
86
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
87
+ stackTraceLimit: number;
88
+ };
89
+ /** A QA lint reported findings in the plugin specs. */
90
+ export declare class QaLintError extends QaLintError_base {
91
+ }
92
+ declare const ReviewCheckError_base: {
93
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
94
+ cause?: unknown;
95
+ stack?: string;
96
+ name: "DeusReviewCheckError";
97
+ context: Record<string, unknown>;
98
+ readonly message: string;
99
+ readonly _tag: "DeusReviewCheckError";
100
+ };
101
+ isError(error: unknown): error is Error;
102
+ name: "DeusReviewCheckError";
103
+ is(error: unknown): error is BaseError;
104
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
105
+ ifTypeDiffers?: boolean;
106
+ }): (error: unknown) => {
107
+ cause?: unknown;
108
+ stack?: string;
109
+ name: "DeusReviewCheckError";
110
+ context: Record<string, unknown>;
111
+ readonly message: string;
112
+ readonly _tag: "DeusReviewCheckError";
113
+ };
114
+ extend<Name extends string = string>(name: Name, message?: string): any;
115
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
116
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
117
+ stackTraceLimit: number;
118
+ };
119
+ /** A spec review breaks the review rules. */
120
+ export declare class ReviewCheckError extends ReviewCheckError_base {
121
+ }
122
+ declare const LintError_base: {
123
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
124
+ cause?: unknown;
125
+ stack?: string;
126
+ name: "DeusLintError";
127
+ context: Record<string, unknown>;
128
+ readonly message: string;
129
+ readonly _tag: "DeusLintError";
130
+ };
131
+ isError(error: unknown): error is Error;
132
+ name: "DeusLintError";
133
+ is(error: unknown): error is BaseError;
134
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
135
+ ifTypeDiffers?: boolean;
136
+ }): (error: unknown) => {
137
+ cause?: unknown;
138
+ stack?: string;
139
+ name: "DeusLintError";
140
+ context: Record<string, unknown>;
141
+ readonly message: string;
142
+ readonly _tag: "DeusLintError";
143
+ };
144
+ extend<Name extends string = string>(name: Name, message?: string): any;
145
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
146
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
147
+ stackTraceLimit: number;
148
+ };
149
+ /** One or more `.mdl` files have lint errors. */
150
+ export declare class LintError extends LintError_base {
151
+ }
152
+ declare const FeatureCheckError_base: {
153
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
154
+ cause?: unknown;
155
+ stack?: string;
156
+ name: "DeusFeatureCheckError";
157
+ context: Record<string, unknown>;
158
+ readonly message: string;
159
+ readonly _tag: "DeusFeatureCheckError";
160
+ };
161
+ isError(error: unknown): error is Error;
162
+ name: "DeusFeatureCheckError";
163
+ is(error: unknown): error is BaseError;
164
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
165
+ ifTypeDiffers?: boolean;
166
+ }): (error: unknown) => {
167
+ cause?: unknown;
168
+ stack?: string;
169
+ name: "DeusFeatureCheckError";
170
+ context: Record<string, unknown>;
171
+ readonly message: string;
172
+ readonly _tag: "DeusFeatureCheckError";
173
+ };
174
+ extend<Name extends string = string>(name: Name, message?: string): any;
175
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
176
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
177
+ stackTraceLimit: number;
178
+ };
179
+ /** The feature map has errors: a bad status, a spec reference that resolves to nothing, or a dependency cycle. */
180
+ export declare class FeatureCheckError extends FeatureCheckError_base {
181
+ }
182
+ export {};
183
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/cli/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,+CAA+C;AAC/C,qBAAa,QAAS,SAAQ,aAAyD;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1F,2DAA2D;AAC3D,qBAAa,mBAAoB,SAAQ,wBAA2E;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvH,uDAAuD;AACvD,qBAAa,WAAY,SAAQ,gBAAsE;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1G,6CAA6C;AAC7C,qBAAa,gBAAiB,SAAQ,qBAAuE;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhH,iDAAiD;AACjD,qBAAa,SAAU,SAAQ,cAAqE;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvG,kHAAkH;AAClH,qBAAa,iBAAkB,SAAQ,sBAAwE;CAAG"}
@@ -0,0 +1,58 @@
1
+ import * as Command from 'effect/cli/Command';
2
+ import * as Effect from 'effect/Effect';
3
+ import * as FileSystem from 'effect/FileSystem';
4
+ import * as Path from 'effect/Path';
5
+ import { FeatureCheckError } from './errors.ts';
6
+ import { type ReviewItem } from './review.ts';
7
+ /** The authored statuses of `lang/features.mdl`, in the order a feature normally moves through them. */
8
+ export declare const FEATURE_STATUSES: readonly ['planned', 'in-progress', 'prototype', 'operational', 'failing'];
9
+ export type FeatureStatus = (typeof FEATURE_STATUSES)[number];
10
+ /** What the reviews of a feature's spec items say, or `unreviewed` when an item has no verdict. */
11
+ export type DerivedStatus = Exclude<FeatureStatus, 'failing'> | 'unreviewed';
12
+ export type Feature = {
13
+ id: string;
14
+ title: string;
15
+ line: number;
16
+ status?: string;
17
+ /** Repo-relative spec paths, each optionally `#<item id>`. */
18
+ specs: string[];
19
+ depends: string[];
20
+ };
21
+ /** Every `feature` block of a feature map. */
22
+ export declare const parseFeatureMap: (text: string) => Feature[];
23
+ /**
24
+ * The status the reviews support: every item done is operational, done or untested is a prototype, every item
25
+ * missing is planned, and anything between is in progress.
26
+ */
27
+ export declare const deriveStatus: (statuses: ReadonlyArray<string | undefined>) => DerivedStatus;
28
+ /** One spec item a feature cites, with the verdict its review gives it. */
29
+ export type FeatureItem = ReviewItem & {
30
+ spec: string;
31
+ status?: string;
32
+ note?: string;
33
+ };
34
+ export type FeatureReport = {
35
+ feature: Feature;
36
+ derived: DerivedStatus;
37
+ items: FeatureItem[];
38
+ };
39
+ export type FeatureMapReport = {
40
+ reports: FeatureReport[];
41
+ errors: string[];
42
+ warnings: string[];
43
+ };
44
+ /**
45
+ * Resolves every spec reference of a feature map against the checkout and its reviews, derives each feature's status,
46
+ * and collects what is wrong (errors) or out of step (warnings).
47
+ */
48
+ export declare const analyzeFeatureMap: (mapPath: string) => Effect.Effect<{
49
+ reports: FeatureReport[];
50
+ errors: string[];
51
+ warnings: string[];
52
+ }, import("./errors.ts").GitError | import("effect/PlatformError").PlatformError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | Path.Path>;
53
+ /** Prints one row per feature, then every warning and error; fails when there is an error. */
54
+ export declare const checkFeatures: (mapPath: string) => Effect.Effect<undefined, FeatureCheckError | import("./errors.ts").GitError | import("effect/PlatformError").PlatformError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | Path.Path>;
55
+ /** Prints the open work of one feature as a TASKS.md section: one task per spec item not yet done. */
56
+ export declare const featureTasks: (mapPath: string, id: string) => Effect.Effect<undefined, FeatureCheckError | import("./errors.ts").GitError | import("effect/PlatformError").PlatformError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | Path.Path>;
57
+ export declare const features: Command.Command<"features", {}, {}, FeatureCheckError | import("./errors.ts").GitError | import("effect/PlatformError").PlatformError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | Path.Path>;
58
+ //# sourceMappingURL=features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../../../src/cli/features.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAG9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAIpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,KAAK,UAAU,EAAgE,MAAM,aAAa,CAAC;AAE5G,wGAAwG;AACxG,eAAO,MAAM,gBAAgB,YAAI,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,CAAU,CAAC;AAE3G,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,mGAAmG;AACnG,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG,YAAY,CAAC;AAE7E,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,OAAO,EAU/C,CAAC;AAER;;;GAGG;AACH,eAAO,MAAM,YAAY,aAAc,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,KAAG,aAc1E,CAAC;AAEF,2EAA2E;AAC3E,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAiCF;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;uLA6H5B,CAAC;AAiBH,8FAA8F;AAC9F,eAAO,MAAM,aAAa,wPAgBxB,CAAC;AAMH,sGAAsG;AACtG,eAAO,MAAM,YAAY,oQAgBvB,CAAC;AAcH,eAAO,MAAM,QAAQ,8OAGpB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import * as ChildProcessSpawner from 'effect/process/ChildProcessSpawner';
3
+ import { GitError } from './errors.ts';
4
+ /** Runs `git <args>` in `cwd` and returns trimmed stdout; a non-zero exit fails with {@link GitError}. */
5
+ export declare const git: (cwd: string, ...args: string[]) => Effect.Effect<string, GitError, ChildProcessSpawner.ChildProcessSpawner>;
6
+ /** Splits command output into its non-empty lines. */
7
+ export declare const lines: (text: string) => string[];
8
+ //# sourceMappingURL=git.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../../src/cli/git.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,mBAAmB,MAAM,oCAAoC,CAAC;AAG1E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,0GAA0G;AAC1G,eAAO,MAAM,GAAG,8GAmBd,CAAC;AAEH,sDAAsD;AACtD,eAAO,MAAM,KAAK,SAAU,MAAM,KAAG,MAAM,EAAsC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import * as Command from 'effect/cli/Command';
2
+ export * from './changelog.ts';
3
+ export * from './errors.ts';
4
+ export * from './features.ts';
5
+ export * from './lint.ts';
6
+ export * from './qa.ts';
7
+ export * from './qa-lint.ts';
8
+ export * from './review.ts';
9
+ export * from './spec-index.ts';
10
+ /** The `deus` command tree: run standalone by `bin/deus.ts` and mounted by the `dx` CLI as `dx deus`. */
11
+ export declare const deus: Command.Command<"deus", {}, {}, import("./errors.ts").ChangelogCheckError | import("effect/Config").ConfigError | import("./errors.ts").FeatureCheckError | import("./errors.ts").GitError | import("./errors.ts").LintError | import("effect/PlatformError").PlatformError | import("./errors.ts").QaLintError | import("./errors.ts").ReviewCheckError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAS9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAEhC,yGAAyG;AACzG,eAAO,MAAM,IAAI,meAGhB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import * as Command from 'effect/cli/Command';
2
+ import * as Effect from 'effect/Effect';
3
+ import * as FileSystem from 'effect/FileSystem';
4
+ import * as Option from 'effect/Option';
5
+ import { LintError } from './errors.ts';
6
+ export type LintOptions = {
7
+ files: readonly string[];
8
+ /** Keep one check, e.g. `mdl/decision`; the block-type check still knows only the built-in types. */
9
+ only: Option.Option<string>;
10
+ };
11
+ /** Lints .mdl files with the checks the editor runs; fails when any diagnostic is an error. */
12
+ export declare const lintFiles: (args_0: LintOptions) => Effect.Effect<undefined, import("./errors.ts").GitError | LintError | import("effect/PlatformError").PlatformError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | import("effect/Path").Path>;
13
+ export declare const lint: Command.Command<"lint", {
14
+ readonly only: Option.Option<string>;
15
+ readonly files: readonly string[];
16
+ }, {}, import("./errors.ts").GitError | LintError | import("effect/PlatformError").PlatformError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | import("effect/Path").Path>;
17
+ //# sourceMappingURL=lint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../../src/cli/lint.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAG9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAMxC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,qGAAqG;IACrG,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CAC7B,CAAC;AAEF,+FAA+F;AAC/F,eAAO,MAAM,SAAS,qQAoCpB,CAAC;AAEH,eAAO,MAAM,IAAI;;;wNAUkE,CAAC"}
@@ -0,0 +1,40 @@
1
+ import * as Command from 'effect/cli/Command';
2
+ import * as Effect from 'effect/Effect';
3
+ import * as FileSystem from 'effect/FileSystem';
4
+ import * as Option from 'effect/Option';
5
+ import * as Path from 'effect/Path';
6
+ import { QaLintError } from './errors.ts';
7
+ export type UnboundReport = {
8
+ file: string;
9
+ test: string;
10
+ unbound: [name: string, line: number][];
11
+ };
12
+ /** `test QA-n` blocks whose steps reference a `$given.x` or `$x` the test never binds. */
13
+ export declare const findUnboundReferences: (file: string, text: string) => UnboundReport[];
14
+ export type TeardownReport = {
15
+ file: string;
16
+ test: string;
17
+ line: number;
18
+ reason: string;
19
+ };
20
+ /**
21
+ * `after:` steps that could remove an object the run did not create.
22
+ *
23
+ * A teardown is safe when it removes something the test bound itself (a `capture:` or a named `given:`), or resolves
24
+ * by a name the test's `given` guarantees is absent — constrained to the subject's own type, and throwing when nothing
25
+ * matches. Resolving by type-and-index deletes whatever the space happens to hold first; resolving by name across
26
+ * `Filter.everything()` deletes any object carrying that name, which the `given` precondition does not exclude.
27
+ */
28
+ export declare const findUnsafeTeardowns: (file: string, text: string) => TeardownReport[];
29
+ export type QaCheck = 'unbound' | 'teardown';
30
+ export declare const QA_CHECKS: readonly QaCheck[];
31
+ /** Runs the QA lints over every plugin spec under `root`; fails when any reports a finding. */
32
+ export declare const lintQa: (args_0: {
33
+ root: string;
34
+ checks: readonly QaCheck[];
35
+ }) => Effect.Effect<undefined, import("effect/PlatformError").PlatformError | QaLintError, FileSystem.FileSystem | Path.Path>;
36
+ export declare const qaLint: Command.Command<"lint", {
37
+ readonly check: Option.Option<QaCheck>;
38
+ readonly root: string;
39
+ }, {}, import("effect/PlatformError").PlatformError | QaLintError, FileSystem.FileSystem | Path.Path>;
40
+ //# sourceMappingURL=qa-lint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qa-lint.d.ts","sourceRoot":"","sources":["../../../../src/cli/qa-lint.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAG9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1C,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,CAAA;CAAE,CAAC;AAEpG,0FAA0F;AAC1F,eAAO,MAAM,qBAAqB,SAAU,MAAM,QAAQ,MAAM,KAAG,aAAa,EAoD/E,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1F;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,SAAU,MAAM,QAAQ,MAAM,KAAG,cAAc,EAgD9E,CAAC;AAkBF,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAE7C,eAAO,MAAM,SAAS,EAAE,SAAS,OAAO,EAA4B,CAAC;AAErE,+FAA+F;AAC/F,eAAO,MAAM,MAAM;UAA0D,MAAM;YAAU,SAAS,OAAO,EAAE;6HA8B7G,CAAC;AAEH,eAAO,MAAM,MAAM;;;qGAkBlB,CAAC"}
@@ -0,0 +1,86 @@
1
+ import * as Command from 'effect/cli/Command';
2
+ import * as Context from 'effect/Context';
3
+ import * as Effect from 'effect/Effect';
4
+ import * as FileSystem from 'effect/FileSystem';
5
+ import * as Option from 'effect/Option';
6
+ import * as Path from 'effect/Path';
7
+ /**
8
+ * Whether a host CLI asked for JSON output. `dx` declares `--json` as a shared root flag, which consumes it before
9
+ * `dx deus qa list` sees its own, so `dx` provides this instead.
10
+ */
11
+ export declare const JsonOutput: Context.Reference<boolean>;
12
+ declare const STAGES: readonly ['before', 'steps', 'after'];
13
+ type Stage = (typeof STAGES)[number];
14
+ export type StageCounts = Record<Stage, number>;
15
+ export type QaTest = {
16
+ file: string;
17
+ plugin: string;
18
+ id: string;
19
+ title: string;
20
+ status: string;
21
+ actors: string;
22
+ /** Per stage, so a partial run's size is visible; `steps` is the test, the other two are fixture. */
23
+ stages: StageCounts;
24
+ covers: string;
25
+ tags: string[];
26
+ };
27
+ export type TestRef = {
28
+ plugin: string;
29
+ id: string;
30
+ };
31
+ export type QaSuite = {
32
+ file: string;
33
+ plugin: string;
34
+ id: string;
35
+ title: string;
36
+ tags: string[];
37
+ tests: TestRef[];
38
+ };
39
+ export type QaDocument = {
40
+ file: string;
41
+ text: string;
42
+ };
43
+ /** The short name a test or suite is addressed by: `markdown` for plugin-markdown, `app` for APP.mdl. */
44
+ export declare const shortName: (file: string) => string;
45
+ export declare const parseTests: (text: string, file: string) => QaTest[];
46
+ export declare const parseSuites: (text: string, file: string) => QaSuite[];
47
+ /**
48
+ * A dialect definition (`org.dxos.spec.*`) carries example tests to document its own syntax; those are illustrations,
49
+ * not plans, and listing them as runnable is a trap.
50
+ */
51
+ export declare const isDialect: (text: string) => boolean;
52
+ export type QaQuery = {
53
+ /** `[<plugin> <testId>]` resolves exactly; a single value is a substring filter over path, id and title. */
54
+ query: readonly string[];
55
+ tag: Option.Option<string>;
56
+ suite: Option.Option<string>;
57
+ suites: boolean;
58
+ };
59
+ export type QaSelection = {
60
+ kind: 'tests';
61
+ rows: QaTest[];
62
+ } | {
63
+ kind: 'suites';
64
+ rows: QaSuite[];
65
+ };
66
+ /** Selects the tests (or suites) a query names from the parsed documents. */
67
+ export declare const selectQa: (documents: readonly QaDocument[], { query, tag, suite, suites: listSuites }: QaQuery) => {
68
+ selection: {
69
+ kind: "suites";
70
+ rows: QaSuite[];
71
+ };
72
+ description: string | undefined;
73
+ } | {
74
+ selection: {
75
+ kind: "tests";
76
+ rows: QaTest[];
77
+ };
78
+ description: string | undefined;
79
+ };
80
+ /** The numbered table `/dxos:qa` renders; row numbers are the addressing scheme. */
81
+ export declare const formatSelection: (selection: QaSelection, description: string | undefined) => string[];
82
+ /** Every `.mdl` file under `root`, sorted, with paths relative to it; broken symlinks are skipped. */
83
+ export declare const readDocuments: (root: string) => Effect.Effect<QaDocument[], import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
84
+ export declare const qa: Command.Command<"qa", {}, {}, import("effect/PlatformError").PlatformError | import("./errors.ts").QaLintError, FileSystem.FileSystem | Path.Path>;
85
+ export {};
86
+ //# sourceMappingURL=qa.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qa.d.ts","sourceRoot":"","sources":["../../../../src/cli/qa.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAI9C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAIpC;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,SAAS,CAAC,OAAO,CAEhD,CAAC;AASH,QAAA,MAAM,MAAM,YAAI,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAErD,KAAK,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAEhD,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,qGAAqG;IACrG,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAqBxD,yGAAyG;AACzG,eAAO,MAAM,SAAS,SAAU,MAAM,KAAG,MACgE,CAAC;AAqB1G,eAAO,MAAM,UAAU,SAAU,MAAM,QAAQ,MAAM,KAAG,MAAM,EAQzD,CAAC;AAEN,eAAO,MAAM,WAAW,SAAU,MAAM,QAAQ,MAAM,KAAG,OAAO,EAS3D,CAAC;AAEN;;;GAGG;AACH,eAAO,MAAM,SAAS,SAAU,MAAM,KAAG,OAAuE,CAAC;AAEjH,MAAM,MAAM,OAAO,GAAG;IACpB,4GAA4G;IAC5G,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,OAAO,EAAE,CAAA;CAAE,CAAC;AAmBlG,6EAA6E;AAC7E,eAAO,MAAM,QAAQ,cAAe,SAAS,UAAU,EAAE,6CAA6C,OAAO;;;;;;;;;;;;CA4C5G,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,eAAe,cAAe,WAAW,eAAe,MAAM,GAAG,SAAS,KAAG,MAAM,EAsB/F,CAAC;AAEF,sGAAsG;AACtG,eAAO,MAAM,aAAa,gIA8BxB,CAAC;AAiCH,eAAO,MAAM,EAAE,oJAGd,CAAC"}
@@ -0,0 +1,38 @@
1
+ import * as Command from 'effect/cli/Command';
2
+ import * as Effect from 'effect/Effect';
3
+ import * as FileSystem from 'effect/FileSystem';
4
+ import * as Path from 'effect/Path';
5
+ import { ReviewCheckError } from './errors.ts';
6
+ /** A key list written inline (`[a, b]`), wrapped over lines, or as `- a` items, as `parseReview` reads it. */
7
+ export declare const keyList: (value: string | undefined) => string[];
8
+ export type ReviewItem = {
9
+ id: string;
10
+ kind: string;
11
+ line: number;
12
+ title: string;
13
+ };
14
+ /** Top-level blocks, plus `req` items nested in a `feat`; a feat with reqs is judged through them. */
15
+ export declare const reviewItems: (text: string) => ReviewItem[];
16
+ /** A block field at two spaces of indent; a `|` value continues on lines indented four or more. */
17
+ export declare const blockField: (body: string, name: string) => string | undefined;
18
+ /**
19
+ * The items a reference to `id` covers: a block's reqs (or the block itself when it has none), or one nested req.
20
+ */
21
+ export declare const itemsUnder: (text: string, id: string) => ReviewItem[];
22
+ /** Each verdict's status and note, by item id. */
23
+ export declare const reviewVerdicts: (text: string) => Map<string, {
24
+ status?: string;
25
+ note?: string;
26
+ }>;
27
+ /**
28
+ * The `dependsOn` array of the `plugin` object in a `dx.config.ts`, empty when the object has none; undefined when
29
+ * there is no `plugin` object or `dependsOn` is not a literal array of strings. Comments are stripped first so a commented-out entry does not count.
30
+ */
31
+ export declare const configDependsOn: (configText: string) => string[] | undefined;
32
+ /**
33
+ * Validates a `.review.mdl` against its spec and the checkout: frontmatter, statuses, notes, coverage of every item,
34
+ * and that each evidence key names an existing file and symbol.
35
+ */
36
+ export declare const checkReview: (reviewPath: string) => Effect.Effect<undefined, import("./errors.ts").GitError | import("effect/PlatformError").PlatformError | ReviewCheckError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | Path.Path>;
37
+ export declare const review: Command.Command<"review", {}, {}, import("./errors.ts").GitError | import("effect/PlatformError").PlatformError | ReviewCheckError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | Path.Path>;
38
+ //# sourceMappingURL=review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../../src/cli/review.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAE9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAKpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA2B/C,8GAA8G;AAC9G,eAAO,MAAM,OAAO,UAAW,MAAM,GAAG,SAAS,KAAG,MAAM,EAItC,CAAC;AAErB,MAAM,MAAM,UAAU,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAQnF,sGAAsG;AACtG,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,UAAU,EASjD,CAAC;AAEL,mGAAmG;AACnG,eAAO,MAAM,UAAU,SAAU,MAAM,QAAQ,MAAM,KAAG,MAAM,GAAG,SAGhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,MAAM,MAAM,MAAM,KAAG,UAAU,EAO/D,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,cAAc,SAAU,MAAM,KAAG,GAAG,CAAC,MAAM,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAMzF,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,eAAe,eAAgB,MAAM,KAAG,MAAM,EAAE,GAAG,SA+B/D,CAAC;AAiBF;;;GAGG;AACH,eAAO,MAAM,WAAW,0PAwLtB,CAAC;AAmBH,eAAO,MAAM,MAAM,2OAGlB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import * as Command from 'effect/cli/Command';
2
+ import * as Effect from 'effect/Effect';
3
+ import * as FileSystem from 'effect/FileSystem';
4
+ import * as Option from 'effect/Option';
5
+ import * as Path from 'effect/Path';
6
+ /** Indexes every tracked `.mdl` spec under `root`, leaving out what {@link isIndexedSpec} excludes. */
7
+ export declare const buildSpecIndex: (root: string) => Effect.Effect<import("../index.ts").SpecIndex, import("./errors.ts").GitError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | Path.Path>;
8
+ export type IndexOptions = {
9
+ /** File to write instead of printing. */
10
+ out: Option.Option<string>;
11
+ };
12
+ /** Indexes every spec of the checkout by id and prints the JSON, or writes it to `out`. */
13
+ export declare const printIndex: (args_0: IndexOptions) => Effect.Effect<void, import("./errors.ts").GitError | import("effect/PlatformError").PlatformError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | Path.Path>;
14
+ export declare const index: Command.Command<"index", {
15
+ readonly out: Option.Option<string>;
16
+ }, {}, import("./errors.ts").GitError | import("effect/PlatformError").PlatformError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | FileSystem.FileSystem | Path.Path>;
17
+ //# sourceMappingURL=spec-index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-index.d.ts","sourceRoot":"","sources":["../../../../src/cli/spec-index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAG9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAKpC,uGAAuG;AACvG,eAAO,MAAM,cAAc,wMAczB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG;IACzB,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CAC5B,CAAC;AAEF,2FAA2F;AAC3F,eAAO,MAAM,UAAU,oOASrB,CAAC;AAEH,eAAO,MAAM,KAAK;;2LAI6E,CAAC"}