@proposit/shared 0.7.2 → 0.9.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 (83) hide show
  1. package/dist/api-client/argument/batch.d.ts +46 -9
  2. package/dist/api-client/argument/batch.d.ts.map +1 -1
  3. package/dist/api-client/argument/claims.d.ts +192 -44
  4. package/dist/api-client/argument/claims.d.ts.map +1 -1
  5. package/dist/api-client/argument/index.d.ts +198 -50
  6. package/dist/api-client/argument/index.d.ts.map +1 -1
  7. package/dist/api-client/user/citations.d.ts +92 -18
  8. package/dist/api-client/user/citations.d.ts.map +1 -1
  9. package/dist/api-client/user/claims.d.ts +46 -9
  10. package/dist/api-client/user/claims.d.ts.map +1 -1
  11. package/dist/consts/axioms.d.ts +4 -0
  12. package/dist/consts/axioms.d.ts.map +1 -0
  13. package/dist/consts/axioms.js +17 -0
  14. package/dist/consts/axioms.js.map +1 -0
  15. package/dist/consts/index.d.ts +1 -0
  16. package/dist/consts/index.d.ts.map +1 -1
  17. package/dist/consts/index.js +1 -0
  18. package/dist/consts/index.js.map +1 -1
  19. package/dist/engine/derivation.d.ts +1 -2
  20. package/dist/engine/derivation.d.ts.map +1 -1
  21. package/dist/engine/derivation.js +35 -1
  22. package/dist/engine/derivation.js.map +1 -1
  23. package/dist/engine/engine.d.ts +24 -22
  24. package/dist/engine/engine.d.ts.map +1 -1
  25. package/dist/engine/engine.js +78 -86
  26. package/dist/engine/engine.js.map +1 -1
  27. package/dist/engine/library-adapters.d.ts +2 -2
  28. package/dist/engine/library-adapters.d.ts.map +1 -1
  29. package/dist/engine/library-adapters.js +2 -2
  30. package/dist/engine/library-adapters.js.map +1 -1
  31. package/dist/engine/mutations/expressions.d.ts.map +1 -1
  32. package/dist/engine/mutations/expressions.js +5 -3
  33. package/dist/engine/mutations/expressions.js.map +1 -1
  34. package/dist/engine/mutations/premises.d.ts +17 -2
  35. package/dist/engine/mutations/premises.d.ts.map +1 -1
  36. package/dist/engine/mutations/premises.js +86 -28
  37. package/dist/engine/mutations/premises.js.map +1 -1
  38. package/dist/engine/optimistic/verification.d.ts.map +1 -1
  39. package/dist/engine/optimistic/verification.js +9 -7
  40. package/dist/engine/optimistic/verification.js.map +1 -1
  41. package/dist/engine/review/review-engine.d.ts.map +1 -1
  42. package/dist/engine/review/review-engine.js +8 -1
  43. package/dist/engine/review/review-engine.js.map +1 -1
  44. package/dist/engine/text-tree.d.ts +2 -1
  45. package/dist/engine/text-tree.d.ts.map +1 -1
  46. package/dist/engine/text-tree.js +8 -3
  47. package/dist/engine/text-tree.js.map +1 -1
  48. package/dist/schemas/api/argument/batch/provision.d.ts +46 -9
  49. package/dist/schemas/api/argument/batch/provision.d.ts.map +1 -1
  50. package/dist/schemas/api/argument/claims.d.ts +147 -35
  51. package/dist/schemas/api/argument/claims.d.ts.map +1 -1
  52. package/dist/schemas/api/argument/index.d.ts +51 -14
  53. package/dist/schemas/api/argument/index.d.ts.map +1 -1
  54. package/dist/schemas/api/argument/index.js +1 -1
  55. package/dist/schemas/api/argument/index.js.map +1 -1
  56. package/dist/schemas/api/citations.d.ts +230 -45
  57. package/dist/schemas/api/citations.d.ts.map +1 -1
  58. package/dist/schemas/api/claims.d.ts +92 -18
  59. package/dist/schemas/api/claims.d.ts.map +1 -1
  60. package/dist/schemas/api/grammar-violations.d.ts +17 -0
  61. package/dist/schemas/api/grammar-violations.d.ts.map +1 -0
  62. package/dist/schemas/api/grammar-violations.js +18 -0
  63. package/dist/schemas/api/grammar-violations.js.map +1 -0
  64. package/dist/schemas/grammar/index.d.ts +3 -0
  65. package/dist/schemas/grammar/index.d.ts.map +1 -0
  66. package/dist/schemas/grammar/index.js +23 -0
  67. package/dist/schemas/grammar/index.js.map +1 -0
  68. package/dist/schemas/model/arguments.d.ts +147 -36
  69. package/dist/schemas/model/arguments.d.ts.map +1 -1
  70. package/dist/schemas/model/arguments.js +1 -1
  71. package/dist/schemas/model/arguments.js.map +1 -1
  72. package/dist/schemas/model/citations.d.ts +4 -4
  73. package/dist/schemas/model/citations.js +2 -2
  74. package/dist/schemas/model/citations.js.map +1 -1
  75. package/dist/schemas/model/claims.d.ts +127 -22
  76. package/dist/schemas/model/claims.d.ts.map +1 -1
  77. package/dist/schemas/model/claims.js +97 -24
  78. package/dist/schemas/model/claims.js.map +1 -1
  79. package/dist/schemas/review.d.ts +13 -13
  80. package/dist/schemas/review.d.ts.map +1 -1
  81. package/dist/schemas/review.js +10 -2
  82. package/dist/schemas/review.js.map +1 -1
  83. package/package.json +13 -3
@@ -4,9 +4,25 @@ export declare function getUserClaimsImpl(config: TApiClientConfig, argumentId?:
4
4
  errorMessage: import("typebox").TString;
5
5
  statusCode: import("typebox").TNumber;
6
6
  }>> | import("../../schemas/common.js").ParsedSuccess<import("typebox").TArray<import("typebox").TObject<{
7
- claim: import("typebox").TObject<{
7
+ claim: import("typebox").TUnion<[import("typebox").TObject<{
8
+ digest: import("typebox").TString;
9
+ id: import("typebox").TString;
10
+ argumentId: import("typebox").TString;
11
+ version: import("typebox").TNumber;
12
+ claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
13
+ creatorId: import("typebox").TString;
14
+ createdOn: import("../../schemas/common.js").TDateType;
15
+ parentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
8
16
  title: import("typebox").TString;
9
17
  body: import("typebox").TString;
18
+ titleContentHash: import("typebox").TString;
19
+ type: import("typebox").TLiteral<"normal">;
20
+ kind: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TLiteral<"definition">, import("typebox").TLiteral<"criterion">]>, import("typebox").TUnion<[import("typebox").TLiteral<"conclusion">, import("typebox").TLiteral<"claim">]>]>;
21
+ url: import("typebox").TNull;
22
+ citation: import("typebox").TNull;
23
+ citationContentHash: import("typebox").TNull;
24
+ axiom: import("typebox").TNull;
25
+ }>, import("typebox").TObject<{
10
26
  digest: import("typebox").TString;
11
27
  id: import("typebox").TString;
12
28
  argumentId: import("typebox").TString;
@@ -14,12 +30,14 @@ export declare function getUserClaimsImpl(config: TApiClientConfig, argumentId?:
14
30
  claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
15
31
  creatorId: import("typebox").TString;
16
32
  createdOn: import("../../schemas/common.js").TDateType;
17
- kind: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TLiteral<"definition">, import("typebox").TLiteral<"criterion">]>, import("typebox").TUnion<[import("typebox").TLiteral<"conclusion">, import("typebox").TLiteral<"claim">]>]>;
18
- type: import("typebox").TUnion<[import("typebox").TLiteral<"normal">, import("typebox").TLiteral<"citation">]>;
19
33
  parentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
20
- titleContentHash: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>>;
21
- url: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>>;
22
- citation: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TIntersect<[import("typebox").TObject<{
34
+ type: import("typebox").TLiteral<"citation">;
35
+ kind: import("typebox").TNull;
36
+ title: import("typebox").TNull;
37
+ body: import("typebox").TNull;
38
+ titleContentHash: import("typebox").TNull;
39
+ url: import("typebox").TString;
40
+ citation: import("typebox").TUnion<[import("typebox").TIntersect<[import("typebox").TObject<{
23
41
  type: import("typebox").TUnion<[import("typebox").TLiteral<"Book">, import("typebox").TLiteral<"Website">, import("typebox").TLiteral<"BookChapter">, import("typebox").TLiteral<"Handbook">, import("typebox").TLiteral<"TechnicalReport">, import("typebox").TLiteral<"Standard">, import("typebox").TLiteral<"Thesis">, import("typebox").TLiteral<"Patent">, import("typebox").TLiteral<"Dictionary">, import("typebox").TLiteral<"Encyclopedia">, import("typebox").TLiteral<"JournalArticle">, import("typebox").TLiteral<"MagazineArticle">, import("typebox").TLiteral<"NewspaperArticle">, import("typebox").TLiteral<"ConferencePaper">, import("typebox").TLiteral<"ConferenceProceedings">, import("typebox").TLiteral<"Dataset">, import("typebox").TLiteral<"Software">, import("typebox").TLiteral<"OnlineDocument">, import("typebox").TLiteral<"Blog">, import("typebox").TLiteral<"SocialMedia">, import("typebox").TLiteral<"Preprint">, import("typebox").TLiteral<"Video">, import("typebox").TLiteral<"Podcast">, import("typebox").TLiteral<"Course">, import("typebox").TLiteral<"Presentation">, import("typebox").TLiteral<"Interview">, import("typebox").TLiteral<"PersonalCommunication">, import("typebox").TLiteral<"Email">, import("typebox").TLiteral<"Law">, import("typebox").TLiteral<"CourtCase">, import("typebox").TLiteral<"GovernmentPublication">, import("typebox").TLiteral<"Datasheet">, import("typebox").TLiteral<"ProductManual">, import("typebox").TLiteral<"UnparsedURL">]>;
24
42
  }>, import("typebox").TObject<{
25
43
  type: import("typebox").TLiteral<"Book">;
@@ -447,9 +465,28 @@ export declare function getUserClaimsImpl(config: TApiClientConfig, argumentId?:
447
465
  type: import("typebox").TLiteral<"UnparsedURL">;
448
466
  url: import("typebox").TString;
449
467
  text: import("typebox").TOptional<import("typebox").TString>;
450
- }>]>]>, import("typebox").TNull]>>;
451
- citationContentHash: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>>;
452
- }>;
468
+ }>]>]>;
469
+ citationContentHash: import("typebox").TString;
470
+ axiom: import("typebox").TNull;
471
+ }>, import("typebox").TObject<{
472
+ digest: import("typebox").TString;
473
+ id: import("typebox").TString;
474
+ argumentId: import("typebox").TString;
475
+ version: import("typebox").TNumber;
476
+ claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
477
+ creatorId: import("typebox").TString;
478
+ createdOn: import("../../schemas/common.js").TDateType;
479
+ parentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
480
+ type: import("typebox").TLiteral<"axiomatic">;
481
+ kind: import("typebox").TNull;
482
+ title: import("typebox").TNull;
483
+ body: import("typebox").TNull;
484
+ titleContentHash: import("typebox").TNull;
485
+ url: import("typebox").TNull;
486
+ citation: import("typebox").TNull;
487
+ citationContentHash: import("typebox").TNull;
488
+ axiom: import("typebox").TUnion<[import("typebox").TLiteral<"definition">, import("typebox").TLiteral<"stipulation">, import("typebox").TLiteral<"logical-principle">, import("typebox").TLiteral<"mathematical-principle">, import("typebox").TLiteral<"domain-rule">, import("typebox").TLiteral<"background-assumption">]>;
489
+ }>]>;
453
490
  argument: import("typebox").TObject<{
454
491
  id: import("typebox").TString;
455
492
  title: import("typebox").TString;
@@ -1 +1 @@
1
- {"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../../src/api-client/user/claims.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGpD,wBAAsB,iBAAiB,CACnC,MAAM,EAAE,gBAAgB,EACxB,UAAU,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYtB"}
1
+ {"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../../src/api-client/user/claims.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGpD,wBAAsB,iBAAiB,CACnC,MAAM,EAAE,gBAAgB,EACxB,UAAU,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYtB"}
@@ -0,0 +1,4 @@
1
+ import type { TAxiomKind } from "../schemas/model/claims.js";
2
+ export declare const AXIOM_KIND_LABELS: Readonly<Record<TAxiomKind, string>>;
3
+ export declare const AXIOM_KIND_DESCRIPTIONS: Readonly<Record<TAxiomKind, string>>;
4
+ //# sourceMappingURL=axioms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"axioms.d.ts","sourceRoot":"","sources":["../../src/consts/axioms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAE5D,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAOzD,CAAA;AAEV,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAa/D,CAAA"}
@@ -0,0 +1,17 @@
1
+ export const AXIOM_KIND_LABELS = {
2
+ definition: "True by definition or meaning",
3
+ stipulation: "Assumed for this argument",
4
+ "logical-principle": "Basic logical principle",
5
+ "mathematical-principle": "Basic mathematical principle",
6
+ "domain-rule": "Rule or authority within a system",
7
+ "background-assumption": "General background assumption",
8
+ };
9
+ export const AXIOM_KIND_DESCRIPTIONS = {
10
+ definition: "Use when the claim is treated as true because of what the relevant words, categories, or concepts mean. Example: 'A bachelor is unmarried.'",
11
+ stipulation: "Use when the argument explicitly defines or assumes something for its own purposes. Example: 'For this argument, an active user means someone who logs in weekly.'",
12
+ "logical-principle": "Use for basic principles of valid reasoning. Example: 'If P implies Q, and P is true, then Q follows.'",
13
+ "mathematical-principle": "Use for basic mathematical identities, axioms, or quantitative rules. Example: 'For any number x, x + 0 = x.'",
14
+ "domain-rule": "Use for rules, standards, texts, contracts, doctrines, protocols, or authorities internal to a system. Example: 'Under this contract, payment is due within 30 days.'",
15
+ "background-assumption": "Use for a foundational assumption the argument relies on but does not prove. Example: 'Human well-being matters.'",
16
+ };
17
+ //# sourceMappingURL=axioms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"axioms.js","sourceRoot":"","sources":["../../src/consts/axioms.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAyC;IACnE,UAAU,EAAE,+BAA+B;IAC3C,WAAW,EAAE,2BAA2B;IACxC,mBAAmB,EAAE,yBAAyB;IAC9C,wBAAwB,EAAE,8BAA8B;IACxD,aAAa,EAAE,mCAAmC;IAClD,uBAAuB,EAAE,+BAA+B;CAClD,CAAA;AAEV,MAAM,CAAC,MAAM,uBAAuB,GAAyC;IACzE,UAAU,EACN,6IAA6I;IACjJ,WAAW,EACP,oKAAoK;IACxK,mBAAmB,EACf,wGAAwG;IAC5G,wBAAwB,EACpB,+GAA+G;IACnH,aAAa,EACT,uKAAuK;IAC3K,uBAAuB,EACnB,mHAAmH;CACjH,CAAA"}
@@ -3,4 +3,5 @@ export * from "./task-status.js";
3
3
  export * from "./roles.js";
4
4
  export * from "./argument.js";
5
5
  export * from "./identity.js";
6
+ export * from "./axioms.js";
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/consts/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/consts/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA"}
@@ -3,4 +3,5 @@ export * from "./task-status.js";
3
3
  export * from "./roles.js";
4
4
  export * from "./argument.js";
5
5
  export * from "./identity.js";
6
+ export * from "./axioms.js";
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/consts/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/consts/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA"}
@@ -1,3 +1,2 @@
1
- export { ManagedDerivationPremiseEngine, validateDerivationStructure, DERIVATION_STRUCTURE_INVALID, DERIVATION_STRUCTURE_INVALID_AT_EVALUATION, DERIVATION_ANTECEDENT_NON_EMPTY, LEGACY_PREMISE_MISSING_TYPE, CLAIM_NOT_FOUND, CLAIM_TYPE_IMMUTABLE, } from "@proposit/proposit-core";
2
- export type { TVariableMaterializer } from "@proposit/proposit-core";
1
+ export { validateDerivationStructure, DERIVATION_STRUCTURE_INVALID, LEGACY_PREMISE_MISSING_TYPE, CLAIM_NOT_FOUND, CLAIM_TYPE_IMMUTABLE, CREATE_DERIVATION_REQUIRES_DERIVED_CLAIM_ID, CREATE_DERIVATION_CLAIM_NOT_FOUND, } from "@proposit/proposit-core";
3
2
  //# sourceMappingURL=derivation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"derivation.d.ts","sourceRoot":"","sources":["../../src/engine/derivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,8BAA8B,EAC9B,2BAA2B,EAC3B,4BAA4B,EAC5B,0CAA0C,EAC1C,+BAA+B,EAC/B,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,GACvB,MAAM,yBAAyB,CAAA;AAEhC,YAAY,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA"}
1
+ {"version":3,"file":"derivation.d.ts","sourceRoot":"","sources":["../../src/engine/derivation.ts"],"names":[],"mappings":"AAkCA,OAAO,EACH,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,EACpB,2CAA2C,EAC3C,iCAAiC,GACpC,MAAM,yBAAyB,CAAA"}
@@ -1,2 +1,36 @@
1
- export { ManagedDerivationPremiseEngine, validateDerivationStructure, DERIVATION_STRUCTURE_INVALID, DERIVATION_STRUCTURE_INVALID_AT_EVALUATION, DERIVATION_ANTECEDENT_NON_EMPTY, LEGACY_PREMISE_MISSING_TYPE, CLAIM_NOT_FOUND, CLAIM_TYPE_IMMUTABLE, } from "@proposit/proposit-core";
1
+ // Re-exports of the derivation surface that survived core 1.0's D-tier
2
+ // rewrite. Server and mobile import these via
3
+ // `@proposit/shared/engine/derivation` for the ergonomic single-import
4
+ // path; the source of truth remains `@proposit/proposit-core`.
5
+ //
6
+ // Core 1.0 (Phase D of the grammar-tiers initiative) removed several
7
+ // derivation-related exports that the pre-1.0 surface had:
8
+ //
9
+ // - `ManagedDerivationPremiseEngine` (the dedicated subclass that
10
+ // enforced derivation invariants on every mutation) is deleted by
11
+ // core's D1 — derivation premises now go through the regular
12
+ // `PremiseEngine`, and the invariants surface via
13
+ // `engine.validate('derivable')` returning the D-1..D-6 violations
14
+ // rather than throwing at mutation time.
15
+ //
16
+ // - `DERIVATION_STRUCTURE_INVALID_AT_EVALUATION` (the pre-1.0
17
+ // evaluation-time throw on naked-Q derivation premises) is deleted
18
+ // by core's D4 — naked-Q derivation premises are now an evaluation
19
+ // no-op per spec §4.2, and broken-tree premises surface as the
20
+ // unchanged `DERIVATION_STRUCTURE_INVALID` engine-error code.
21
+ //
22
+ // - `DERIVATION_ANTECEDENT_NON_EMPTY` (a pre-1.0 mutation-time throw)
23
+ // is gone — `populateFromCitations` / `populateFromAxioms` return
24
+ // `{ kind: 'no-op' }` on already-populated premises rather than
25
+ // throwing, per core 1.0's no-changes-without-consent contract.
26
+ //
27
+ // - `TVariableMaterializer` (an MDPE-only interface) is deleted
28
+ // alongside MDPE.
29
+ //
30
+ // Consumers of the deleted surface should migrate to
31
+ // `engine.populateFromCitations(claimId, lookup)` /
32
+ // `engine.populateFromAxioms(claimId, lookup)` on `ArgumentEngine`, and
33
+ // `engine.validate('derivable')` for D-tier invariants. See spec
34
+ // 2026-05-13-grammar-tiers-design §10.1, §10.2, §12.
35
+ export { validateDerivationStructure, DERIVATION_STRUCTURE_INVALID, LEGACY_PREMISE_MISSING_TYPE, CLAIM_NOT_FOUND, CLAIM_TYPE_IMMUTABLE, CREATE_DERIVATION_REQUIRES_DERIVED_CLAIM_ID, CREATE_DERIVATION_CLAIM_NOT_FOUND, } from "@proposit/proposit-core";
2
36
  //# sourceMappingURL=derivation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"derivation.js","sourceRoot":"","sources":["../../src/engine/derivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,8BAA8B,EAC9B,2BAA2B,EAC3B,4BAA4B,EAC5B,0CAA0C,EAC1C,+BAA+B,EAC/B,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,GACvB,MAAM,yBAAyB,CAAA"}
1
+ {"version":3,"file":"derivation.js","sourceRoot":"","sources":["../../src/engine/derivation.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,8CAA8C;AAC9C,uEAAuE;AACvE,+DAA+D;AAC/D,EAAE;AACF,qEAAqE;AACrE,2DAA2D;AAC3D,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,iEAAiE;AACjE,sDAAsD;AACtD,uEAAuE;AACvE,6CAA6C;AAC7C,EAAE;AACF,gEAAgE;AAChE,uEAAuE;AACvE,uEAAuE;AACvE,mEAAmE;AACnE,kEAAkE;AAClE,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,oEAAoE;AACpE,oEAAoE;AACpE,EAAE;AACF,kEAAkE;AAClE,sBAAsB;AACtB,EAAE;AACF,qDAAqD;AACrD,oDAAoD;AACpD,wEAAwE;AACxE,iEAAiE;AACjE,qDAAqD;AACrD,OAAO,EACH,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,EACpB,2CAA2C,EAC3C,iCAAiC,GACpC,MAAM,yBAAyB,CAAA"}
@@ -6,17 +6,17 @@ import type { TClaimCitation } from "../schemas/model/citations.js";
6
6
  /** Project-parameterized snapshot type used to bridge TypeBox schemas and core engine. */
7
7
  export type TProjectSnapshot = TArgumentEngineSnapshot<TArgument, TPropositionalPremise, TPropositionalExpressionCombined, TPropositionalVariable>;
8
8
  /**
9
- * Extended reactive snapshot. Adds project-level claim and claim-citation
10
- * relation data and computed validation issues to core's reactive snapshot.
9
+ * Extended reactive snapshot. Adds project-level claim and citation edge
10
+ * data and computed validation issues to core's reactive snapshot.
11
11
  */
12
12
  export type TProjectReactiveSnapshot = TReactiveSnapshot<TArgument, TPropositionalPremise, TPropositionalExpressionCombined, TPropositionalVariable> & {
13
13
  claims: Record<string, TClaim>;
14
- claimCitations: Record<string, TClaimCitation[]>;
14
+ citations: Record<string, TClaimCitation[]>;
15
15
  validationIssues: TCoreValidationIssue[];
16
16
  };
17
17
  /**
18
18
  * Project-specific extension of ArgumentEngine that manages domain data
19
- * (claims and claim-citation edges) alongside the core
19
+ * (claims and citation edges) alongside the core
20
20
  * propositional logic state.
21
21
  *
22
22
  * Mutations to domain data trigger reactive notifications via the inherited
@@ -25,41 +25,43 @@ export type TProjectReactiveSnapshot = TReactiveSnapshot<TArgument, TProposition
25
25
  */
26
26
  export declare class PropositArgumentEngine extends ArgumentEngine<TArgument, TPropositionalPremise, TPropositionalExpressionCombined, TPropositionalVariable> {
27
27
  private claimsMap;
28
- private claimCitationsMap;
28
+ private citationsMap;
29
29
  private claimContext;
30
30
  constructor(...args: ConstructorParameters<typeof ArgumentEngine<TArgument, TPropositionalPremise, TPropositionalExpressionCombined, TPropositionalVariable>>);
31
31
  /**
32
32
  * Overrides base rollback() to temporarily enable permissive claim stubs
33
- * during the validate() call that rollback() performs internally.
33
+ * during the validateInvariants() call that rollback() performs internally.
34
34
  *
35
- * In proposit-core 0.8.0+, rollback() calls validate() which checks that
36
- * every claim-bound variable's (claimId, claimVersion) exists in the claim
37
- * library. When the engine is loaded from a server snapshot and the caller
38
- * does not supply the full claims array (common in tests), this would fail.
35
+ * In proposit-core 1.0.0+, rollback() calls validateInvariants() which
36
+ * checks that every claim-bound variable's (claimId, claimVersion) exists
37
+ * in the claim library. When the engine is loaded from a server snapshot
38
+ * and the caller does not supply the full claims array (common in tests),
39
+ * this would fail.
39
40
  *
40
- * Permissive stubs are ONLY active during rollback's validate() pass:
41
+ * Permissive stubs are ONLY active during rollback's validateInvariants()
42
+ * pass:
41
43
  * - addVariable() explicit check: claimContext.permissiveForRestore = false
42
44
  * (addVariable is not called inside rollbackInternal)
43
- * - validate() inside rollback(): permissiveForRestore = true
45
+ * - validateInvariants() inside rollback(): permissiveForRestore = true
44
46
  */
45
47
  rollback(snapshot: Parameters<InstanceType<typeof ArgumentEngine<TArgument, TPropositionalPremise, TPropositionalExpressionCombined, TPropositionalVariable>>["rollback"]>[0]): void;
46
48
  private claimsDirty;
47
- private claimCitationsDirty;
49
+ private citationsDirty;
48
50
  private cachedClaims;
49
- private cachedClaimCitations;
51
+ private cachedCitations;
50
52
  private cachedProjectSnapshot;
51
53
  private lastBaseSnapshot;
52
54
  private getClaimsRecord;
53
- private getClaimCitationsRecord;
55
+ private getCitationsRecord;
54
56
  getProjectSnapshot(): TProjectReactiveSnapshot;
55
- getClaim(id: string): TClaim | undefined;
57
+ getProjectClaim(id: string): TClaim | undefined;
56
58
  getClaims(): Record<string, TClaim>;
57
59
  setClaim(claim: TClaim): void;
58
60
  removeClaim(id: string): void;
59
- getSourceClaimsForCitingClaim(citingClaimId: string): TClaimCitation[];
60
- getClaimCitations(): Record<string, TClaimCitation[]>;
61
- addClaimCitation(cc: TClaimCitation): void;
62
- removeClaimCitation(edgeId: string): void;
61
+ getCitationsForClaim(claimId: string): TClaimCitation[];
62
+ getCitations(): Record<string, TClaimCitation[]>;
63
+ addCitation(cc: TClaimCitation): void;
64
+ removeCitation(edgeId: string): void;
63
65
  /**
64
66
  * Restricts forking to published arguments only.
65
67
  * Overrides the base class default which returns true unconditionally.
@@ -68,11 +70,11 @@ export declare class PropositArgumentEngine extends ArgumentEngine<TArgument, TP
68
70
  protected buildReactiveSnapshot(): TProjectReactiveSnapshot;
69
71
  /**
70
72
  * Creates a PropositArgumentEngine from server-provided data: an engine
71
- * snapshot (for logic state) plus arrays of claims and claim-citation
73
+ * snapshot (for logic state) plus arrays of claims and citation
72
74
  * edges.
73
75
  *
74
76
  * Does NOT trigger reactive notifications during initial data loading.
75
77
  */
76
- static fromServerData(snapshot: TProjectSnapshot, claims: TClaim[], claimCitations: TClaimCitation[]): PropositArgumentEngine;
78
+ static fromServerData(snapshot: TProjectSnapshot, claims: TClaim[], citations: TClaimCitation[]): PropositArgumentEngine;
77
79
  }
78
80
  //# sourceMappingURL=engine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/engine/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EAEd,KAAK,uBAAuB,EAG5B,KAAK,oBAAoB,EAEzB,KAAK,iBAAiB,EACzB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,KAAK,EACR,gCAAgC,EAChC,qBAAqB,EACrB,sBAAsB,EACzB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAqBnE,0FAA0F;AAC1F,MAAM,MAAM,gBAAgB,GAAG,uBAAuB,CAClD,SAAS,EACT,qBAAqB,EACrB,gCAAgC,EAChC,sBAAsB,CACzB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CACpD,SAAS,EACT,qBAAqB,EACrB,gCAAgC,EAChC,sBAAsB,CACzB,GAAG;IACA,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAA;IAChD,gBAAgB,EAAE,oBAAoB,EAAE,CAAA;CAC3C,CAAA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