@hotdocx/endash-kernel 0.1.0-preview.0 → 0.1.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 (74) hide show
  1. package/LICENSE +9 -1
  2. package/README.md +24 -2
  3. package/bin/endash-cli.cjs +4 -0
  4. package/bin/endash-mcp.cjs +7 -0
  5. package/browser.d.ts +44 -0
  6. package/endash-browser.js +698 -0
  7. package/index.cjs +704 -14
  8. package/index.d.ts +19 -11
  9. package/index.mjs +704 -14
  10. package/node.cjs +116606 -0
  11. package/node.d.ts +8 -0
  12. package/node.mjs +53 -0
  13. package/package.json +51 -7
  14. package/types/ast.d.ts +964 -0
  15. package/types/book/book_compiler.d.ts +57 -0
  16. package/types/book/html_renderer.d.ts +27 -0
  17. package/types/book/literate_en.d.ts +40 -0
  18. package/types/book/schema.d.ts +279 -0
  19. package/types/browser.d.ts +44 -0
  20. package/types/builders.d.ts +191 -0
  21. package/types/cache/core_snapshot.d.ts +259 -0
  22. package/types/cas/bar_hochschild.d.ts +106 -0
  23. package/types/cas/cotangent_deformation.d.ts +100 -0
  24. package/types/cas/cyclic_homology.d.ts +100 -0
  25. package/types/cas/derham_hkr.d.ts +117 -0
  26. package/types/cas/ext_algebra.d.ts +112 -0
  27. package/types/cas/groebner_syzygy.d.ts +43 -0
  28. package/types/cas/hilbert_proj_ag.d.ts +97 -0
  29. package/types/cas/hnf_snf.d.ts +49 -0
  30. package/types/cas/lefschetz_weil.d.ts +114 -0
  31. package/types/cas/localization_cech.d.ts +201 -0
  32. package/types/cas/matrix.d.ts +45 -0
  33. package/types/cas/modules_complexes.d.ts +141 -0
  34. package/types/cas/perm_coset_cgt.d.ts +166 -0
  35. package/types/cas/poly.d.ts +66 -0
  36. package/types/cas/reify_proofs.d.ts +104 -0
  37. package/types/cas/resolutions_spectral_seq.d.ts +193 -0
  38. package/types/cas/rings.d.ts +70 -0
  39. package/types/cas/smith_resultant_gauss.d.ts +164 -0
  40. package/types/cas/theta_stepanov.d.ts +182 -0
  41. package/types/check.d.ts +65 -0
  42. package/types/cli/endash_cli.d.ts +19 -0
  43. package/types/context.d.ts +110 -0
  44. package/types/duality.d.ts +76 -0
  45. package/types/elab/elab_ast.d.ts +274 -0
  46. package/types/elab/elaborate.d.ts +106 -0
  47. package/types/elab/env.d.ts +170 -0
  48. package/types/elab/match.d.ts +123 -0
  49. package/types/elab/pretty.d.ts +14 -0
  50. package/types/elab/structure.d.ts +46 -0
  51. package/types/elab/tactics.d.ts +238 -0
  52. package/types/elab/typeclass.d.ts +31 -0
  53. package/types/elab/unify.d.ts +166 -0
  54. package/types/eval.d.ts +28 -0
  55. package/types/index.d.ts +98 -0
  56. package/types/kernel_ops.d.ts +196 -0
  57. package/types/mcp/endash_mcp_server.d.ts +63 -0
  58. package/types/module/comparator.d.ts +86 -0
  59. package/types/module/desugar.d.ts +94 -0
  60. package/types/module/goal_inspector.d.ts +104 -0
  61. package/types/module/loader.d.ts +105 -0
  62. package/types/module/node_fs_provider.d.ts +26 -0
  63. package/types/module/package_builder.d.ts +83 -0
  64. package/types/module/proof_graph.d.ts +80 -0
  65. package/types/module/quasiquote.d.ts +37 -0
  66. package/types/module/stdlib_fresh_builders.d.ts +10 -0
  67. package/types/module/stdlib_tactic_hooks.d.ts +20 -0
  68. package/types/parser/lexer.d.ts +12 -0
  69. package/types/parser/parser.d.ts +78 -0
  70. package/types/parser/pratt.d.ts +17 -0
  71. package/types/parser/span.d.ts +26 -0
  72. package/types/parser/surface_ast.d.ts +501 -0
  73. package/types/stdlib_types.d.ts +113 -0
  74. package/types/value.d.ts +942 -0
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  ISC License
2
2
 
3
- Copyright (c) 2026 emdash contributors
3
+ Copyright (c) 2026 emdash and endash contributors (hotdocx)
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above
@@ -13,3 +13,11 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
13
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
14
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
15
  PERFORMANCE OF THIS SOFTWARE.
16
+
17
+ ---
18
+
19
+ Monograph Prose & Mathematical Expositions Notice:
20
+ The three-volume monograph prose under `books/` (`vol0-foundations`,
21
+ `vol1-higher-algebra`, and `vol2-algebraic-geometry`) is licensed under the
22
+ Creative Commons Attribution-ShareAlike 3.0 Unported License (`CC-BY-SA-3.0`);
23
+ see each volume's `LICENSE.md` and `CREDITS.md` for full provenance details.
package/README.md CHANGED
@@ -1,3 +1,25 @@
1
- # @hotdocx/endash-kernel
1
+ # `@hotdocx/endash-kernel`
2
2
 
3
- Create a verifier with a compatible serialized standard library, then provide a frozen statement and a proof. Both declaration comparison and standard-library hydration run through Endash.
3
+ Standalone direct Glued-NbE proof verifier, Lean-compatible `.en` parser/elaborator, live `line:col` tactic goal inspector, LCF-certified `BigInt` CAS, CLI (`endash`), JSON-RPC 2.0 STDIO MCP server (`endash-mcp`), and `< 190 KiB` gzipped browser prover for **Functorial Type Theory** (`0` runtime dependencies).
4
+
5
+ Pair with [`@hotdocx/endash-stdlib`](https://www.npmjs.com/package/@hotdocx/endash-stdlib) for the 7,721-declaration (`0`-axiom) plain-source `.en` & `.ts` mathematical library and verified snapshots.
6
+
7
+ ## Quickstart
8
+
9
+ ```bash
10
+ npm install @hotdocx/endash-kernel @hotdocx/endash-stdlib
11
+ npx endash check node_modules/@hotdocx/endash-stdlib/en/HigherAlgebraShowcase.en --strict-axioms
12
+ npx endash-mcp --workspace .
13
+ ```
14
+
15
+ ### Programmatic Proof Verification (Browser, Web Worker, or Node.js)
16
+
17
+ ```js
18
+ import { createVerifier } from '@hotdocx/endash-kernel';
19
+
20
+ const verify = createVerifier(stdlibSnapshotJson);
21
+ const report = verify(frozenChallengeEn, candidateProofEn);
22
+ console.log(report.ok, report.targetTheoremsVerified);
23
+ ```
24
+
25
+ Full documentation, `.en` language & tactic reference, and the Three-Volume Monograph PDFs: <https://github.com/hotdocx/endash>.
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ const { runEndashCli } = require('../node.cjs');
4
+ process.exitCode = runEndashCli(process.argv.slice(2));
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ const { startStdioMcpServer } = require('../node.cjs');
4
+ const args = process.argv.slice(2);
5
+ const wsIdx = args.indexOf("--workspace");
6
+ const wsRoot = wsIdx >= 0 && args[wsIdx + 1] ? args[wsIdx + 1] : process.cwd();
7
+ startStdioMcpServer(wsRoot);
package/browser.d.ts ADDED
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Zero-Backend Browser Entrypoint (`endash/src/browser.ts` -> `dist/endash-browser.js`).
3
+ *
4
+ * 100% pure TypeScript / ES2022 with ZERO Node.js built-ins (`node:*`, `fs`, `path`, `process`,
5
+ * `Buffer`, `child_process`), bundling:
6
+ * - Direct Functorial Type Theory NbE Kernel (`Grpd` + `StrictCat` + `GrayCat` + `Sheafify` +
7
+ * `Groupoidify` + `JoinCat` + `Pushout` + `Trunc0`)
8
+ * - Untrusted Elaborator, Pattern-Matcher, Tactics, `.en` Surface Parser, & VFS `ModuleLoader`
9
+ * - Live `line:col` Tactic Goal-State Inspector (`inspectGoalsAt`, `runTacticProbe`)
10
+ * - Zero-Dependency `BigInt` Typed CAS & LCF-Certified `P^1` Čech Cohomology / SNF Engine
11
+ * - All 10 `.en` Showcases (`BUILTIN_SHOWCASES`) spanning Ch. 1–32 & Higher Algebra B1–B3!
12
+ */
13
+ import { VerifiedEnEnsnapBundleCache, VerifiedStdlibBundleCache } from './cache/core_snapshot';
14
+ import { mkMatrix } from './cas/matrix';
15
+ import { F2FieldReifySpec, IntReifySpec, RatFieldReifySpec, certifySnfInKernel } from './cas/reify_proofs';
16
+ import { computeAndCertifyP1TwistingCohomologyF2, computeAndCertifyP1TwistingCohomologyQ } from './cas/localization_cech';
17
+ import { mkRat } from './cas/rings';
18
+ import { CursorGoalQueryResult, ModuleInspectionReport, TacticProbeOptions, TacticProbeResult, formatCursorGoalReport, inspectGoalsAt, inspectModuleSource, runTacticProbe } from './module/goal_inspector';
19
+ import { ALL_BUILTIN_STDLIB_MODULES, MemoryModuleProvider, ModuleLoader } from './module/loader';
20
+ import { BUILTIN_SHOWCASES, ShowcaseEntry } from './showcase_sources';
21
+ /**
22
+ * Explicitly register a serialized `endash-stdlib-bundle-v1` JSON snapshot in browser environments.
23
+ */
24
+ export declare function loadBrowserStdlibSnapshot(rawJson: string): VerifiedStdlibBundleCache;
25
+ export declare function loadBrowserEnEnsnapBundle(rawJson: string): VerifiedEnEnsnapBundleCache;
26
+ export { ALL_BUILTIN_STDLIB_MODULES, BUILTIN_SHOWCASES, CursorGoalQueryResult, F2FieldReifySpec, IntReifySpec, MemoryModuleProvider, ModuleInspectionReport, ModuleLoader, RatFieldReifySpec, ShowcaseEntry, TacticProbeOptions, TacticProbeResult, certifySnfInKernel, computeAndCertifyP1TwistingCohomologyF2, computeAndCertifyP1TwistingCohomologyQ, formatCursorGoalReport, inspectGoalsAt, inspectModuleSource, mkMatrix, mkRat, runTacticProbe, };
27
+ /**
28
+ * Shared in-memory `ModuleLoader` pre-populated with all 10 `.en` showcases so repeated
29
+ * browser checks and live cursor goal queries reuse verified stdlib modules in milliseconds!
30
+ */
31
+ export declare function getSharedBrowserLoader(): ModuleLoader;
32
+ export interface BrowserCheckResult extends ModuleInspectionReport {
33
+ readonly axiomFree: boolean;
34
+ }
35
+ /**
36
+ * Elaborate and kernel-verify `.en` source in the browser, returning diagnostics,
37
+ * `#check`/`#eval`/`#print axioms` outputs, tactic traces, and `0`-axiom status.
38
+ */
39
+ export declare function checkShowcaseOrSource(source: string, file?: string): BrowserCheckResult;
40
+ /**
41
+ * Query live tactic hypotheses, `goalsBefore`, and `goalsAfter` at 1-based `(line, column)`
42
+ * in the browser playground.
43
+ */
44
+ export declare function queryCursorGoals(source: string, line: number, column: number, file?: string): CursorGoalQueryResult;