@x12i/mdreports-docs 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 x12i
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # `@x12i/mdreports-docs`
2
+
3
+ Knowledge SDK for **Markdown Reports Studio**. Install as a **devDependency** only.
4
+
5
+ ```bash
6
+ npm i -D @x12i/mdreports-docs
7
+ ```
8
+
9
+ ```ts
10
+ import { mdreportsDocs } from "@x12i/mdreports-docs";
11
+
12
+ mdreportsDocs.listUseCases();
13
+ mdreportsDocs.getUseCaseMarkdown("render-with-sdk");
14
+ mdreportsDocs.getBookMarkdown("03-sdk", "developers");
15
+ ```
16
+
17
+ CLI:
18
+
19
+ ```bash
20
+ npx mdreports-docs list-use-cases
21
+ npx mdreports-docs use-case pick-a-surface
22
+ npx mdreports-docs book 07-templates builders
23
+ ```
24
+
25
+ Content and human site live in `mdreports-docs/` in the monorepo. Preview: `pnpm docs` from the repo root.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import("../dist/cli.js");
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ import { mdreportsDocs } from "./index.js";
3
+ const [cmd, id, audience] = process.argv.slice(2);
4
+ function usage() {
5
+ console.error(`Usage:
6
+ mdreports-docs use-case <id> Print assembled use-case markdown
7
+ mdreports-docs book <id> <audience> Print book markdown
8
+ mdreports-docs list-use-cases List use case ids
9
+ mdreports-docs list-books List book ids
10
+ `);
11
+ }
12
+ if (!cmd || cmd === "help" || cmd === "--help") {
13
+ usage();
14
+ process.exit(cmd ? 0 : 1);
15
+ }
16
+ if (cmd === "list-use-cases") {
17
+ for (const uc of mdreportsDocs.listUseCases()) {
18
+ console.log(`${uc.id}\t${uc.title}`);
19
+ }
20
+ process.exit(0);
21
+ }
22
+ if (cmd === "list-books") {
23
+ for (const b of mdreportsDocs.listBooks()) {
24
+ console.log(`${b.id}\t${b.title}\t${b.audiences.join(",")}`);
25
+ }
26
+ process.exit(0);
27
+ }
28
+ if (cmd === "use-case") {
29
+ if (!id) {
30
+ usage();
31
+ process.exit(1);
32
+ }
33
+ const md = mdreportsDocs.getUseCaseMarkdown(id);
34
+ if (!md) {
35
+ console.error(`Unknown use case: ${id}`);
36
+ process.exit(1);
37
+ }
38
+ process.stdout.write(md);
39
+ process.exit(0);
40
+ }
41
+ if (cmd === "book") {
42
+ if (!id || !audience) {
43
+ usage();
44
+ process.exit(1);
45
+ }
46
+ const md = mdreportsDocs.getBookMarkdown(id, audience);
47
+ if (!md) {
48
+ console.error(`Unknown book/audience: ${id} ${audience}`);
49
+ process.exit(1);
50
+ }
51
+ process.stdout.write(md);
52
+ process.exit(0);
53
+ }
54
+ usage();
55
+ process.exit(1);
56
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,CAAC,GAAG,EAAE,EAAE,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAElD,SAAS,KAAK;IACZ,OAAO,CAAC,KAAK,CAAC;;;;;CAKf,CAAC,CAAC;AACH,CAAC;AAED,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;IAC/C,KAAK,EAAE,CAAC;IACR,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC;AAED,IAAI,GAAG,KAAK,gBAAgB,EAAE,CAAC;IAC7B,KAAK,MAAM,EAAE,IAAI,aAAa,CAAC,YAAY,EAAE,EAAE,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,GAAG,KAAK,YAAY,EAAE,CAAC;IACzB,KAAK,MAAM,CAAC,IAAI,aAAa,CAAC,SAAS,EAAE,EAAE,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,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AC,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { AgentManifest, Catalog, SiteConfig, UseCasesFile } from "@x12i/docify-core";
2
+ export declare const catalog: Catalog;
3
+ export declare const useCases: UseCasesFile;
4
+ export declare const site: SiteConfig;
5
+ export declare const manifest: AgentManifest;
6
+ export declare const files: Record<string, string>;
7
+ //# sourceMappingURL=bundle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/generated/bundle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1F,eAAO,MAAM,OAAO,EAkLf,OAAO,CAAC;AAEb,eAAO,MAAM,QAAQ,EA+QhB,YAAY,CAAC;AAElB,eAAO,MAAM,IAAI,EAkDZ,UAAU,CAAC;AAEhB,eAAO,MAAM,QAAQ,EA4UhB,aAAa,CAAC;AAEnB,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoGxC,CAAC"}