@proposit/proposit-core 0.9.0 → 0.10.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/README.md +59 -26
- package/dist/cli/commands/arguments.d.ts.map +1 -1
- package/dist/cli/commands/arguments.js +8 -16
- package/dist/cli/commands/arguments.js.map +1 -1
- package/dist/cli/commands/citations.d.ts +3 -0
- package/dist/cli/commands/citations.d.ts.map +1 -0
- package/dist/cli/commands/citations.js +89 -0
- package/dist/cli/commands/citations.js.map +1 -0
- package/dist/cli/commands/claims.d.ts.map +1 -1
- package/dist/cli/commands/claims.js +10 -2
- package/dist/cli/commands/claims.js.map +1 -1
- package/dist/cli/commands/parse.d.ts.map +1 -1
- package/dist/cli/commands/parse.js +9 -17
- package/dist/cli/commands/parse.js.map +1 -1
- package/dist/cli/commands/render.d.ts.map +1 -1
- package/dist/cli/commands/render.js +44 -18
- package/dist/cli/commands/render.js.map +1 -1
- package/dist/cli/commands/variables.d.ts.map +1 -1
- package/dist/cli/commands/variables.js +1 -0
- package/dist/cli/commands/variables.js.map +1 -1
- package/dist/cli/engine.d.ts.map +1 -1
- package/dist/cli/engine.js +12 -9
- package/dist/cli/engine.js.map +1 -1
- package/dist/cli/import.d.ts +2 -4
- package/dist/cli/import.d.ts.map +1 -1
- package/dist/cli/import.js +8 -7
- package/dist/cli/import.js.map +1 -1
- package/dist/cli/router.js +1 -1
- package/dist/cli/router.js.map +1 -1
- package/dist/cli/storage/libraries.d.ts +4 -7
- package/dist/cli/storage/libraries.d.ts.map +1 -1
- package/dist/cli/storage/libraries.js +9 -28
- package/dist/cli/storage/libraries.js.map +1 -1
- package/dist/cli/storage/migrate-v0.10.d.ts +10 -0
- package/dist/cli/storage/migrate-v0.10.d.ts.map +1 -0
- package/dist/cli/storage/migrate-v0.10.js +213 -0
- package/dist/cli/storage/migrate-v0.10.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/extensions/basics/argument-parser.d.ts +1 -2
- package/dist/extensions/basics/argument-parser.d.ts.map +1 -1
- package/dist/extensions/basics/argument-parser.js.map +1 -1
- package/dist/extensions/basics/schemata.d.ts +1 -0
- package/dist/extensions/basics/schemata.d.ts.map +1 -1
- package/dist/extensions/ieee/{source.d.ts → citation-claim.d.ts} +5 -3
- package/dist/extensions/ieee/citation-claim.d.ts.map +1 -0
- package/dist/extensions/ieee/{source.js → citation-claim.js} +5 -4
- package/dist/extensions/ieee/citation-claim.js.map +1 -0
- package/dist/extensions/ieee/index.d.ts +1 -1
- package/dist/extensions/ieee/index.d.ts.map +1 -1
- package/dist/extensions/ieee/index.js +1 -1
- package/dist/extensions/ieee/index.js.map +1 -1
- package/dist/lib/consts.d.ts.map +1 -1
- package/dist/lib/consts.js +9 -13
- package/dist/lib/consts.js.map +1 -1
- package/dist/lib/core/argument-engine.d.ts +8 -8
- package/dist/lib/core/argument-engine.d.ts.map +1 -1
- package/dist/lib/core/argument-engine.js +7 -9
- package/dist/lib/core/argument-engine.js.map +1 -1
- package/dist/lib/core/argument-library.d.ts +13 -15
- package/dist/lib/core/argument-library.d.ts.map +1 -1
- package/dist/lib/core/argument-library.js +23 -9
- package/dist/lib/core/argument-library.js.map +1 -1
- package/dist/lib/core/claim-citation-library.d.ts +44 -0
- package/dist/lib/core/claim-citation-library.d.ts.map +1 -0
- package/dist/lib/core/claim-citation-library.js +336 -0
- package/dist/lib/core/claim-citation-library.js.map +1 -0
- package/dist/lib/core/claim-library.d.ts +33 -1
- package/dist/lib/core/claim-library.d.ts.map +1 -1
- package/dist/lib/core/claim-library.js +71 -3
- package/dist/lib/core/claim-library.js.map +1 -1
- package/dist/lib/core/fork-library.d.ts +19 -10
- package/dist/lib/core/fork-library.d.ts.map +1 -1
- package/dist/lib/core/fork-library.js +16 -13
- package/dist/lib/core/fork-library.js.map +1 -1
- package/dist/lib/core/fork.d.ts +6 -7
- package/dist/lib/core/fork.d.ts.map +1 -1
- package/dist/lib/core/fork.js +8 -3
- package/dist/lib/core/fork.js.map +1 -1
- package/dist/lib/core/interfaces/index.d.ts +1 -1
- package/dist/lib/core/interfaces/index.d.ts.map +1 -1
- package/dist/lib/core/interfaces/library.interfaces.d.ts +66 -160
- package/dist/lib/core/interfaces/library.interfaces.d.ts.map +1 -1
- package/dist/lib/core/proposit-core.d.ts +30 -32
- package/dist/lib/core/proposit-core.d.ts.map +1 -1
- package/dist/lib/core/proposit-core.js +68 -89
- package/dist/lib/core/proposit-core.js.map +1 -1
- package/dist/lib/index.d.ts +2 -3
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +2 -3
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/parsing/argument-parser.d.ts +9 -12
- package/dist/lib/parsing/argument-parser.d.ts.map +1 -1
- package/dist/lib/parsing/argument-parser.js +27 -45
- package/dist/lib/parsing/argument-parser.js.map +1 -1
- package/dist/lib/parsing/index.d.ts +2 -2
- package/dist/lib/parsing/index.d.ts.map +1 -1
- package/dist/lib/parsing/index.js +1 -1
- package/dist/lib/parsing/index.js.map +1 -1
- package/dist/lib/parsing/prompt-builder.d.ts.map +1 -1
- package/dist/lib/parsing/prompt-builder.js +31 -24
- package/dist/lib/parsing/prompt-builder.js.map +1 -1
- package/dist/lib/parsing/schemata.d.ts +7 -19
- package/dist/lib/parsing/schemata.d.ts.map +1 -1
- package/dist/lib/parsing/schemata.js +7 -14
- package/dist/lib/parsing/schemata.js.map +1 -1
- package/dist/lib/parsing/types.d.ts +1 -2
- package/dist/lib/parsing/types.d.ts.map +1 -1
- package/dist/lib/schemata/claim-citation.d.ts +11 -0
- package/dist/lib/schemata/claim-citation.d.ts.map +1 -0
- package/dist/lib/schemata/claim-citation.js +25 -0
- package/dist/lib/schemata/claim-citation.js.map +1 -0
- package/dist/lib/schemata/claim.d.ts +1 -0
- package/dist/lib/schemata/claim.d.ts.map +1 -1
- package/dist/lib/schemata/claim.js +3 -0
- package/dist/lib/schemata/claim.js.map +1 -1
- package/dist/lib/schemata/fork.d.ts +0 -11
- package/dist/lib/schemata/fork.d.ts.map +1 -1
- package/dist/lib/schemata/fork.js +0 -10
- package/dist/lib/schemata/fork.js.map +1 -1
- package/dist/lib/schemata/index.d.ts +1 -1
- package/dist/lib/schemata/index.d.ts.map +1 -1
- package/dist/lib/schemata/index.js +1 -1
- package/dist/lib/schemata/index.js.map +1 -1
- package/dist/lib/types/checksum.d.ts +3 -5
- package/dist/lib/types/checksum.d.ts.map +1 -1
- package/dist/lib/types/validation.d.ts +9 -7
- package/dist/lib/types/validation.d.ts.map +1 -1
- package/dist/lib/types/validation.js +10 -8
- package/dist/lib/types/validation.js.map +1 -1
- package/dist/lib/utils/lookup.d.ts +7 -15
- package/dist/lib/utils/lookup.d.ts.map +1 -1
- package/dist/lib/utils/lookup.js +8 -18
- package/dist/lib/utils/lookup.js.map +1 -1
- package/package.json +7 -4
- package/dist/cli/commands/sources.d.ts +0 -3
- package/dist/cli/commands/sources.d.ts.map +0 -1
- package/dist/cli/commands/sources.js +0 -103
- package/dist/cli/commands/sources.js.map +0 -1
- package/dist/extensions/ieee/source.d.ts.map +0 -1
- package/dist/extensions/ieee/source.js.map +0 -1
- package/dist/lib/core/claim-source-library.d.ts +0 -32
- package/dist/lib/core/claim-source-library.d.ts.map +0 -1
- package/dist/lib/core/claim-source-library.js +0 -193
- package/dist/lib/core/claim-source-library.js.map +0 -1
- package/dist/lib/core/source-library.d.ts +0 -23
- package/dist/lib/core/source-library.d.ts.map +0 -1
- package/dist/lib/core/source-library.js +0 -21
- package/dist/lib/core/source-library.js.map +0 -1
- package/dist/lib/schemata/source.d.ts +0 -18
- package/dist/lib/schemata/source.d.ts.map +0 -1
- package/dist/lib/schemata/source.js +0 -35
- package/dist/lib/schemata/source.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fork-library.js","sourceRoot":"","sources":["../../../src/lib/core/fork-library.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fork-library.js","source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C,MAAM,CAAC,CAAA;QAChC,CAAC;QACD,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACrC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAC/B,CAAC;QACD,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC;YACxC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAClC,CAAC;QACD,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC;YACtC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAChC,CAAC;QACD,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;YACnC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAC7B,CAAC;QAED,OAAO,GAAG,CAAA;IACd,CAAC;IAED,qEAAqE;IAC9D,QAAQ;QACX,MAAM,aAAa,GAAG;YAClB,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,UAAU;YACvC,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,UAAU;YACtC,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,UAAU;YACzC,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,UAAU;YACvC,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,UAAU;SACvC,CAAA;QACD,OAAO,EAAE,EAAE,EAAE,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,CAAA;IACxE,CAAC;CACJ"}
|
package/dist/lib/core/fork.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TCoreArgument, TCorePremise, TCorePropositionalExpression, TCorePropositionalVariable } from "../schemata/index.js";
|
|
2
2
|
import type { TCoreClaim } from "../schemata/claim.js";
|
|
3
|
-
import type {
|
|
4
|
-
import type { TClaimLookup,
|
|
3
|
+
import type { TCoreClaimCitation } from "../schemata/claim-citation.js";
|
|
4
|
+
import type { TClaimLookup, TClaimCitationLookup } from "./interfaces/library.interfaces.js";
|
|
5
5
|
import type { TForkArgumentOptions, TForkRemapTable } from "../types/fork.js";
|
|
6
6
|
import { ArgumentEngine } from "./argument-engine.js";
|
|
7
7
|
/**
|
|
@@ -15,16 +15,15 @@ import { ArgumentEngine } from "./argument-engine.js";
|
|
|
15
15
|
*
|
|
16
16
|
* @param engine - The source engine to fork.
|
|
17
17
|
* @param newArgumentId - The ID for the forked argument.
|
|
18
|
-
* @param libraries - Claim
|
|
18
|
+
* @param libraries - Claim and claim-citation libraries for the new engine.
|
|
19
19
|
* @param options - Optional ID generator, checksum/position/grammar config overrides.
|
|
20
20
|
* @returns The forked engine and a remap table mapping original to new entity IDs.
|
|
21
21
|
*/
|
|
22
|
-
export declare function forkArgumentEngine<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable,
|
|
22
|
+
export declare function forkArgumentEngine<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable, TClaim extends TCoreClaim = TCoreClaim, TCitation extends TCoreClaimCitation = TCoreClaimCitation>(engine: ArgumentEngine<TArg, TPremise, TExpr, TVar>, newArgumentId: string, libraries: {
|
|
23
23
|
claimLibrary: TClaimLookup<TClaim>;
|
|
24
|
-
|
|
25
|
-
claimSourceLibrary: TClaimSourceLookup<TAssoc>;
|
|
24
|
+
claimCitationLibrary: TClaimCitationLookup<TCitation>;
|
|
26
25
|
}, options?: TForkArgumentOptions): {
|
|
27
|
-
engine: ArgumentEngine<TArg, TPremise, TExpr, TVar
|
|
26
|
+
engine: ArgumentEngine<TArg, TPremise, TExpr, TVar>;
|
|
28
27
|
remapTable: TForkRemapTable;
|
|
29
28
|
};
|
|
30
29
|
//# sourceMappingURL=fork.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fork.d.ts","sourceRoot":"","sources":["../../../src/lib/core/fork.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,aAAa,EACb,YAAY,EACZ,4BAA4B,EAC5B,0BAA0B,EAE7B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"fork.d.ts","sourceRoot":"","sources":["../../../src/lib/core/fork.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,aAAa,EACb,YAAY,EACZ,4BAA4B,EAC5B,0BAA0B,EAE7B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,KAAK,EACR,YAAY,EACZ,oBAAoB,EACvB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAE7E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAIrD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAC9B,IAAI,SAAS,aAAa,GAAG,aAAa,EAC1C,QAAQ,SAAS,YAAY,GAAG,YAAY,EAC5C,KAAK,SAAS,4BAA4B,GAAG,4BAA4B,EACzE,IAAI,SAAS,0BAA0B,GAAG,0BAA0B,EACpE,MAAM,SAAS,UAAU,GAAG,UAAU,EACtC,SAAS,SAAS,kBAAkB,GAAG,kBAAkB,EAGzD,MAAM,EAAE,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,EACnD,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE;IACP,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAA;IAClC,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAA;CACxD,EACD,OAAO,CAAC,EAAE,oBAAoB,GAC/B;IAEC,MAAM,EAAE,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAA;IACnD,UAAU,EAAE,eAAe,CAAA;CAC9B,CAwJA"}
|
package/dist/lib/core/fork.js
CHANGED
|
@@ -13,11 +13,13 @@ import { isPremiseBound } from "../schemata/propositional.js";
|
|
|
13
13
|
*
|
|
14
14
|
* @param engine - The source engine to fork.
|
|
15
15
|
* @param newArgumentId - The ID for the forked argument.
|
|
16
|
-
* @param libraries - Claim
|
|
16
|
+
* @param libraries - Claim and claim-citation libraries for the new engine.
|
|
17
17
|
* @param options - Optional ID generator, checksum/position/grammar config overrides.
|
|
18
18
|
* @returns The forked engine and a remap table mapping original to new entity IDs.
|
|
19
19
|
*/
|
|
20
|
-
export function forkArgumentEngine(
|
|
20
|
+
export function forkArgumentEngine(
|
|
21
|
+
// TODO Phase 7: drop TSource/TAssoc generics from ArgumentEngine.
|
|
22
|
+
engine, newArgumentId, libraries, options) {
|
|
21
23
|
const generateId = options?.generateId ?? defaultGenerateId;
|
|
22
24
|
// Snapshot includes config from the source engine
|
|
23
25
|
const snap = engine.snapshot();
|
|
@@ -119,7 +121,10 @@ export function forkArgumentEngine(engine, newArgumentId, libraries, options) {
|
|
|
119
121
|
}
|
|
120
122
|
const grammarConfig = options?.grammarConfig ?? snap.config?.grammarConfig;
|
|
121
123
|
// Construct new engine
|
|
122
|
-
|
|
124
|
+
// TODO Phase 7: ArgumentEngine.fromSnapshot will take
|
|
125
|
+
// (snapshot, claimLibrary, claimCitationLibrary, ...) once its generics
|
|
126
|
+
// are reduced to drop TSource/TAssoc.
|
|
127
|
+
const forkedEngine = ArgumentEngine.fromSnapshot(snap, libraries.claimLibrary, libraries.claimCitationLibrary, grammarConfig, "ignore", generateId);
|
|
123
128
|
return { engine: forkedEngine, remapTable };
|
|
124
129
|
}
|
|
125
130
|
//# sourceMappingURL=fork.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fork.js","sourceRoot":"","sources":["../../../src/lib/core/fork.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"fork.js","sourceRoot":"","sources":["../../../src/lib/core/fork.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAgBxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAE7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,kBAAkB;AAQ9B,kEAAkE;AAClE,MAAmD,EACnD,aAAqB,EACrB,SAGC,EACD,OAA8B;IAM9B,MAAM,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,iBAAiB,CAAA;IAE3D,kDAAkD;IAClD,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAA;IAE9B,MAAM,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA;IAE3C,uCAAuC;IACvC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAA;IAC9C,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAA;IACjD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAA;IAE/C,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC7B,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,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AE,YAAY,EAAE,UAAU,EAAE,CAAA;AAC/C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { TDisplayable, THierarchicalChecksummable, } from "./shared.interfaces.js";
|
|
2
2
|
export type { TPremiseCrud, TVariableManagement, TArgumentExpressionQueries, TArgumentRoleState, TArgumentEvaluation, TArgumentLifecycle, TArgumentIdentity, } from "./argument-engine.interfaces.js";
|
|
3
3
|
export type { TFormulaTreeVisitor, TFormulaTreeWalking, TExpressionMutations, TExpressionQueries, TVariableReferences, TPremiseClassification, TPremiseEvaluation, TPremiseLifecycle, TPremiseIdentity, } from "./premise-engine.interfaces.js";
|
|
4
|
-
export type { TClaimLookup, TClaimLibraryManagement,
|
|
4
|
+
export type { TClaimLookup, TClaimLibraryManagement, TClaimLibrarySnapshot, TClaimCitationLookup, TClaimCitationLibraryManagement, TClaimCitationLibrarySnapshot, TForkLibrarySnapshot, TArgumentLibrarySnapshot, TPropositCoreSnapshot, TPropositCoreConfig, } from "./library.interfaces.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,YAAY,EACZ,0BAA0B,GAC7B,MAAM,wBAAwB,CAAA;AAE/B,YAAY,EACR,YAAY,EACZ,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GACpB,MAAM,iCAAiC,CAAA;AAExC,YAAY,EACR,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACnB,MAAM,gCAAgC,CAAA;AAEvC,YAAY,EACR,YAAY,EACZ,uBAAuB,EACvB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,YAAY,EACZ,0BAA0B,GAC7B,MAAM,wBAAwB,CAAA;AAE/B,YAAY,EACR,YAAY,EACZ,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GACpB,MAAM,iCAAiC,CAAA;AAExC,YAAY,EACR,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACnB,MAAM,gCAAgC,CAAA;AAEvC,YAAY,EACR,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,+BAA+B,EAC/B,6BAA6B,EAC7B,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,GACtB,MAAM,yBAAyB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TCoreClaim } from "../../schemata/claim.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type { TCoreArgumentForkRecord, TCorePremiseForkRecord, TCoreExpressionForkRecord, TCoreVariableForkRecord, TCoreClaimForkRecord
|
|
2
|
+
import type { TCoreClaimCitation } from "../../schemata/claim-citation.js";
|
|
3
|
+
import type { TCoreArgumentForkRecord, TCorePremiseForkRecord, TCoreExpressionForkRecord, TCoreVariableForkRecord, TCoreClaimForkRecord } from "../../schemata/fork.js";
|
|
4
4
|
import type { TInvariantValidationResult } from "../../types/validation.js";
|
|
5
5
|
import type { TCoreArgument, TCorePremise, TCorePropositionalExpression, TCorePropositionalVariable } from "../../schemata/index.js";
|
|
6
6
|
import type { TArgumentEngineSnapshot } from "../argument-engine.js";
|
|
@@ -22,21 +22,6 @@ export interface TClaimLookup<TClaim extends TCoreClaim = TCoreClaim> {
|
|
|
22
22
|
*/
|
|
23
23
|
get(id: string, version: number): TClaim | undefined;
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Narrow read-only interface for source lookups. Used by `ArgumentEngine` for
|
|
27
|
-
* validation — callers that only need to verify source existence should depend
|
|
28
|
-
* on this rather than the full `SourceLibrary`.
|
|
29
|
-
*/
|
|
30
|
-
export interface TSourceLookup<TSource extends TCoreSource = TCoreSource> {
|
|
31
|
-
/**
|
|
32
|
-
* Returns a source by ID and version, or `undefined` if not found.
|
|
33
|
-
*
|
|
34
|
-
* @param id - The source ID.
|
|
35
|
-
* @param version - The source version number.
|
|
36
|
-
* @returns The source entity, or `undefined`.
|
|
37
|
-
*/
|
|
38
|
-
get(id: string, version: number): TSource | undefined;
|
|
39
|
-
}
|
|
40
25
|
/**
|
|
41
26
|
* Full management interface for a versioned claim library. Extends
|
|
42
27
|
* `TClaimLookup` with mutation, query, and snapshot methods.
|
|
@@ -44,13 +29,18 @@ export interface TSourceLookup<TSource extends TCoreSource = TCoreSource> {
|
|
|
44
29
|
export interface TClaimLibraryManagement<TClaim extends TCoreClaim = TCoreClaim> extends TClaimLookup<TClaim> {
|
|
45
30
|
/**
|
|
46
31
|
* Creates a new claim at version 0. The `version`, `frozen`, and
|
|
47
|
-
* `checksum` fields are assigned automatically.
|
|
32
|
+
* `checksum` fields are assigned automatically. The `id` field is
|
|
33
|
+
* auto-generated when omitted. The `type` field is required and is
|
|
34
|
+
* immutable across the claim's lifetime.
|
|
48
35
|
*
|
|
49
|
-
* @param claim - The claim data without system-managed fields.
|
|
36
|
+
* @param claim - The claim data without system-managed fields. `id` is
|
|
37
|
+
* optional (auto-generated when omitted) and `type` is required.
|
|
50
38
|
* @returns The created claim entity with all fields populated.
|
|
51
39
|
* @throws If a claim with the same ID already exists.
|
|
52
40
|
*/
|
|
53
|
-
create(claim: Omit<TClaim, "version" | "frozen" | "checksum">
|
|
41
|
+
create(claim: Omit<TClaim, "version" | "frozen" | "checksum"> | (Omit<TClaim, "id" | "version" | "frozen" | "checksum"> & {
|
|
42
|
+
id?: string;
|
|
43
|
+
})): TClaim;
|
|
54
44
|
/**
|
|
55
45
|
* Updates mutable fields on the current (latest, unfrozen) version of a
|
|
56
46
|
* claim. System-managed fields (`id`, `version`, `frozen`, `checksum`)
|
|
@@ -112,152 +102,81 @@ export interface TClaimLibraryManagement<TClaim extends TCoreClaim = TCoreClaim>
|
|
|
112
102
|
validate(): TInvariantValidationResult;
|
|
113
103
|
}
|
|
114
104
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*/
|
|
118
|
-
export interface TSourceLibraryManagement<TSource extends TCoreSource = TCoreSource> extends TSourceLookup<TSource> {
|
|
119
|
-
/**
|
|
120
|
-
* Creates a new source at version 0. The `version`, `frozen`, and
|
|
121
|
-
* `checksum` fields are assigned automatically.
|
|
122
|
-
*
|
|
123
|
-
* @param source - The source data without system-managed fields.
|
|
124
|
-
* @returns The created source entity with all fields populated.
|
|
125
|
-
* @throws If a source with the same ID already exists.
|
|
126
|
-
*/
|
|
127
|
-
create(source: Omit<TSource, "version" | "frozen" | "checksum">): TSource;
|
|
128
|
-
/**
|
|
129
|
-
* Updates mutable fields on the current (latest, unfrozen) version of a
|
|
130
|
-
* source. System-managed fields (`id`, `version`, `frozen`, `checksum`)
|
|
131
|
-
* cannot be updated.
|
|
132
|
-
*
|
|
133
|
-
* @param id - The source ID.
|
|
134
|
-
* @param updates - The fields to update.
|
|
135
|
-
* @returns The updated source entity.
|
|
136
|
-
* @throws If the source does not exist.
|
|
137
|
-
* @throws If the current version is frozen.
|
|
138
|
-
*/
|
|
139
|
-
update(id: string, updates: Partial<Omit<TSource, "id" | "version" | "frozen" | "checksum">>): TSource;
|
|
140
|
-
/**
|
|
141
|
-
* Freezes the current version of a source (marking it immutable) and
|
|
142
|
-
* creates a new mutable version at `version + 1`.
|
|
143
|
-
*
|
|
144
|
-
* @param id - The source ID.
|
|
145
|
-
* @returns An object containing the `frozen` version and the new
|
|
146
|
-
* `current` (mutable) version.
|
|
147
|
-
* @throws If the source does not exist.
|
|
148
|
-
* @throws If the current version is already frozen.
|
|
149
|
-
*/
|
|
150
|
-
freeze(id: string): {
|
|
151
|
-
frozen: TSource;
|
|
152
|
-
current: TSource;
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* Returns the latest version of a source, or `undefined` if not found.
|
|
156
|
-
*
|
|
157
|
-
* @param id - The source ID.
|
|
158
|
-
* @returns The latest source entity, or `undefined`.
|
|
159
|
-
*/
|
|
160
|
-
getCurrent(id: string): TSource | undefined;
|
|
161
|
-
/**
|
|
162
|
-
* Returns all source entities across all IDs and versions.
|
|
163
|
-
*
|
|
164
|
-
* @returns An array of all source entities.
|
|
165
|
-
*/
|
|
166
|
-
getAll(): TSource[];
|
|
167
|
-
/**
|
|
168
|
-
* Returns all versions of a source sorted by version number ascending.
|
|
169
|
-
*
|
|
170
|
-
* @param id - The source ID.
|
|
171
|
-
* @returns An array of source entities, or an empty array if the ID does
|
|
172
|
-
* not exist.
|
|
173
|
-
*/
|
|
174
|
-
getVersions(id: string): TSource[];
|
|
175
|
-
/**
|
|
176
|
-
* Returns a serializable snapshot of all sources in the library.
|
|
177
|
-
*
|
|
178
|
-
* @returns The source library snapshot.
|
|
179
|
-
*/
|
|
180
|
-
snapshot(): TSourceLibrarySnapshot<TSource>;
|
|
181
|
-
/**
|
|
182
|
-
* Run invariant validation on the source library.
|
|
183
|
-
*
|
|
184
|
-
* @returns The invariant validation result.
|
|
185
|
-
*/
|
|
186
|
-
validate(): TInvariantValidationResult;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Narrow read-only interface for claim-source association lookups.
|
|
190
|
-
* Implemented by `ClaimSourceLibrary`. Passed to `ArgumentEngine` as the
|
|
191
|
-
* fourth constructor parameter.
|
|
105
|
+
* Narrow read-only interface for claim-citation lookups.
|
|
106
|
+
* Implemented by `ClaimCitationLibrary`.
|
|
192
107
|
*/
|
|
193
|
-
export interface
|
|
108
|
+
export interface TClaimCitationLookup<TCitation extends TCoreClaimCitation = TCoreClaimCitation> {
|
|
194
109
|
/**
|
|
195
|
-
* Returns all
|
|
110
|
+
* Returns all citations where the given claim is the citing-side endpoint.
|
|
196
111
|
*
|
|
197
|
-
* @param
|
|
198
|
-
* @returns An array of matching
|
|
112
|
+
* @param citingClaimId - The citing claim ID to filter by.
|
|
113
|
+
* @returns An array of matching citations.
|
|
199
114
|
*/
|
|
200
|
-
|
|
115
|
+
getCitationsForCitingClaim(citingClaimId: string): TCitation[];
|
|
201
116
|
/**
|
|
202
|
-
* Returns all
|
|
117
|
+
* Returns all citations where the given claim is the source-side endpoint.
|
|
203
118
|
*
|
|
204
|
-
* @param
|
|
205
|
-
* @returns An array of matching
|
|
119
|
+
* @param sourceClaimId - The source claim ID to filter by.
|
|
120
|
+
* @returns An array of matching citations.
|
|
206
121
|
*/
|
|
207
|
-
|
|
122
|
+
getCitationsForSourceClaim(sourceClaimId: string): TCitation[];
|
|
208
123
|
/**
|
|
209
|
-
* Returns
|
|
124
|
+
* Returns a citation by ID, or `undefined` if not found.
|
|
210
125
|
*
|
|
211
|
-
* @param id - The
|
|
212
|
-
* @returns The
|
|
126
|
+
* @param id - The citation ID.
|
|
127
|
+
* @returns The citation entity, or `undefined`.
|
|
213
128
|
*/
|
|
214
|
-
get(id: string):
|
|
129
|
+
get(id: string): TCitation | undefined;
|
|
215
130
|
}
|
|
216
131
|
/**
|
|
217
|
-
* Full management interface for a claim-
|
|
218
|
-
* `
|
|
219
|
-
*
|
|
132
|
+
* Full management interface for a claim-citation library. Extends
|
|
133
|
+
* `TClaimCitationLookup` with mutation, query, and snapshot methods.
|
|
134
|
+
* Citations are create-or-delete only — no update path.
|
|
220
135
|
*/
|
|
221
|
-
export interface
|
|
136
|
+
export interface TClaimCitationLibraryManagement<TCitation extends TCoreClaimCitation = TCoreClaimCitation> extends TClaimCitationLookup<TCitation> {
|
|
222
137
|
/**
|
|
223
|
-
* Creates a claim
|
|
224
|
-
*
|
|
138
|
+
* Creates a claim citation. Validates that both the citing and source
|
|
139
|
+
* claims exist in the claim library, that the source-side claim has
|
|
140
|
+
* type='citation', and that the new edge does not introduce a cycle in
|
|
141
|
+
* the global claim-citation graph.
|
|
225
142
|
*
|
|
226
|
-
* @param
|
|
227
|
-
* @returns The created
|
|
228
|
-
* @throws If
|
|
229
|
-
* @throws If the referenced
|
|
143
|
+
* @param citation - The citation data without the `checksum` field.
|
|
144
|
+
* @returns The created citation with checksum populated.
|
|
145
|
+
* @throws If a citation with the same ID already exists.
|
|
146
|
+
* @throws If the referenced citing or source claim does not exist.
|
|
147
|
+
* @throws If the source-side claim has type !== 'citation'.
|
|
148
|
+
* @throws If the citation would create a cycle.
|
|
230
149
|
*/
|
|
231
|
-
add(
|
|
150
|
+
add(citation: Omit<TCitation, "checksum">): TCitation;
|
|
232
151
|
/**
|
|
233
|
-
* Removes a claim
|
|
152
|
+
* Removes a claim citation by ID.
|
|
234
153
|
*
|
|
235
|
-
* @param id - The
|
|
236
|
-
* @returns The removed
|
|
237
|
-
* @throws If the
|
|
154
|
+
* @param id - The citation ID to remove.
|
|
155
|
+
* @returns The removed citation entity.
|
|
156
|
+
* @throws If the citation does not exist.
|
|
238
157
|
*/
|
|
239
|
-
remove(id: string):
|
|
158
|
+
remove(id: string): TCitation;
|
|
240
159
|
/**
|
|
241
|
-
* Returns all
|
|
160
|
+
* Returns all citations in the library.
|
|
242
161
|
*
|
|
243
|
-
* @returns An array of all
|
|
162
|
+
* @returns An array of all citation entities.
|
|
244
163
|
*/
|
|
245
|
-
getAll():
|
|
164
|
+
getAll(): TCitation[];
|
|
246
165
|
/**
|
|
247
|
-
* Returns all
|
|
166
|
+
* Returns all citations matching the predicate.
|
|
248
167
|
*
|
|
249
|
-
* @param predicate - A filter function applied to each
|
|
250
|
-
* @returns An array of matching
|
|
168
|
+
* @param predicate - A filter function applied to each citation.
|
|
169
|
+
* @returns An array of matching citations.
|
|
251
170
|
*/
|
|
252
|
-
filter(predicate: (
|
|
171
|
+
filter(predicate: (c: TCitation) => boolean): TCitation[];
|
|
253
172
|
/**
|
|
254
|
-
* Returns a serializable snapshot of all
|
|
173
|
+
* Returns a serializable snapshot of all citations in the library.
|
|
255
174
|
*
|
|
256
|
-
* @returns The claim-
|
|
175
|
+
* @returns The claim-citation library snapshot.
|
|
257
176
|
*/
|
|
258
|
-
snapshot():
|
|
177
|
+
snapshot(): TClaimCitationLibrarySnapshot<TCitation>;
|
|
259
178
|
/**
|
|
260
|
-
* Run invariant validation on the claim-
|
|
179
|
+
* Run invariant validation on the claim-citation library.
|
|
261
180
|
*
|
|
262
181
|
* @returns The invariant validation result.
|
|
263
182
|
*/
|
|
@@ -272,26 +191,18 @@ export type TClaimLibrarySnapshot<TClaim extends TCoreClaim = TCoreClaim> = {
|
|
|
272
191
|
claims: TClaim[];
|
|
273
192
|
};
|
|
274
193
|
/**
|
|
275
|
-
* Serializable snapshot of a `
|
|
276
|
-
* across all IDs and versions.
|
|
277
|
-
*/
|
|
278
|
-
export type TSourceLibrarySnapshot<TSource extends TCoreSource = TCoreSource> = {
|
|
279
|
-
/** All source entities in the library. */
|
|
280
|
-
sources: TSource[];
|
|
281
|
-
};
|
|
282
|
-
/**
|
|
283
|
-
* Serializable snapshot of a `ClaimSourceLibrary`. Contains all association
|
|
194
|
+
* Serializable snapshot of a `ClaimCitationLibrary`. Contains all citation
|
|
284
195
|
* entities.
|
|
285
196
|
*/
|
|
286
|
-
export type
|
|
287
|
-
/** All claim
|
|
288
|
-
|
|
197
|
+
export type TClaimCitationLibrarySnapshot<TCitation extends TCoreClaimCitation = TCoreClaimCitation> = {
|
|
198
|
+
/** All claim citation entities in the library. */
|
|
199
|
+
claimCitations: TCitation[];
|
|
289
200
|
};
|
|
290
201
|
/**
|
|
291
202
|
* Serializable snapshot of a `ForkLibrary`. Contains arrays of fork records
|
|
292
203
|
* for each entity type.
|
|
293
204
|
*/
|
|
294
|
-
export type TForkLibrarySnapshot<TArgFork extends TCoreArgumentForkRecord = TCoreArgumentForkRecord, TPremiseFork extends TCorePremiseForkRecord = TCorePremiseForkRecord, TExprFork extends TCoreExpressionForkRecord = TCoreExpressionForkRecord, TVarFork extends TCoreVariableForkRecord = TCoreVariableForkRecord, TClaimFork extends TCoreClaimForkRecord = TCoreClaimForkRecord
|
|
205
|
+
export type TForkLibrarySnapshot<TArgFork extends TCoreArgumentForkRecord = TCoreArgumentForkRecord, TPremiseFork extends TCorePremiseForkRecord = TCorePremiseForkRecord, TExprFork extends TCoreExpressionForkRecord = TCoreExpressionForkRecord, TVarFork extends TCoreVariableForkRecord = TCoreVariableForkRecord, TClaimFork extends TCoreClaimForkRecord = TCoreClaimForkRecord> = {
|
|
295
206
|
/** All argument fork records. */
|
|
296
207
|
arguments: TArgFork[];
|
|
297
208
|
/** All premise fork records. */
|
|
@@ -302,8 +213,6 @@ export type TForkLibrarySnapshot<TArgFork extends TCoreArgumentForkRecord = TCor
|
|
|
302
213
|
variables: TVarFork[];
|
|
303
214
|
/** All claim fork records. */
|
|
304
215
|
claims: TClaimFork[];
|
|
305
|
-
/** All source fork records. */
|
|
306
|
-
sources: TSourceFork[];
|
|
307
216
|
};
|
|
308
217
|
/**
|
|
309
218
|
* Serializable snapshot of an `ArgumentLibrary`. Contains snapshots of all
|
|
@@ -315,20 +224,17 @@ export type TArgumentLibrarySnapshot<TArg extends TCoreArgument = TCoreArgument,
|
|
|
315
224
|
};
|
|
316
225
|
/**
|
|
317
226
|
* Serializable snapshot of a `PropositCore` instance. Contains snapshots of
|
|
318
|
-
* all managed libraries: arguments, claims,
|
|
319
|
-
* and fork records.
|
|
227
|
+
* all managed libraries: arguments, claims, claim citations, and fork records.
|
|
320
228
|
*/
|
|
321
|
-
export type TPropositCoreSnapshot<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable,
|
|
229
|
+
export type TPropositCoreSnapshot<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable, TClaim extends TCoreClaim = TCoreClaim, TCitation extends TCoreClaimCitation = TCoreClaimCitation, TArgFork extends TCoreArgumentForkRecord = TCoreArgumentForkRecord, TPremiseFork extends TCorePremiseForkRecord = TCorePremiseForkRecord, TExprFork extends TCoreExpressionForkRecord = TCoreExpressionForkRecord, TVarFork extends TCoreVariableForkRecord = TCoreVariableForkRecord, TClaimFork extends TCoreClaimForkRecord = TCoreClaimForkRecord> = {
|
|
322
230
|
/** Snapshot of all argument engines. */
|
|
323
231
|
arguments: TArgumentLibrarySnapshot<TArg, TPremise, TExpr, TVar>;
|
|
324
232
|
/** Snapshot of the claim library. */
|
|
325
233
|
claims: TClaimLibrarySnapshot<TClaim>;
|
|
326
|
-
/** Snapshot of the
|
|
327
|
-
|
|
328
|
-
/** Snapshot of the claim-source association library. */
|
|
329
|
-
claimSources: TClaimSourceLibrarySnapshot<TAssoc>;
|
|
234
|
+
/** Snapshot of the claim-citation library. */
|
|
235
|
+
claimCitations: TClaimCitationLibrarySnapshot<TCitation>;
|
|
330
236
|
/** Snapshot of the fork library. */
|
|
331
|
-
forks: TForkLibrarySnapshot<TArgFork, TPremiseFork, TExprFork, TVarFork, TClaimFork
|
|
237
|
+
forks: TForkLibrarySnapshot<TArgFork, TPremiseFork, TExprFork, TVarFork, TClaimFork>;
|
|
332
238
|
};
|
|
333
239
|
/**
|
|
334
240
|
* Shared configuration options for `PropositCore`. These config values are
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.interfaces.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/library.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"library.interfaces.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/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2C;IAC3C,aAAa,CAAC,EAAE,cAAc,CAAA;IAC9B,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,MAAM,CAAA;CAC5B,CAAA"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { TCoreArgument, TCorePremise, TCorePropositionalExpression, TCorePropositionalVariable } from "../schemata/index.js";
|
|
2
2
|
import type { TCoreClaim } from "../schemata/claim.js";
|
|
3
|
-
import type {
|
|
4
|
-
import type { TCoreArgumentForkRecord, TCorePremiseForkRecord, TCoreExpressionForkRecord, TCoreVariableForkRecord, TCoreClaimForkRecord
|
|
3
|
+
import type { TCoreClaimCitation } from "../schemata/claim-citation.js";
|
|
4
|
+
import type { TCoreArgumentForkRecord, TCorePremiseForkRecord, TCoreExpressionForkRecord, TCoreVariableForkRecord, TCoreClaimForkRecord } from "../schemata/fork.js";
|
|
5
5
|
import type { TPropositCoreSnapshot, TPropositCoreConfig } from "./interfaces/library.interfaces.js";
|
|
6
6
|
import type { TInvariantValidationResult } from "../types/validation.js";
|
|
7
7
|
import type { TForkArgumentOptions, TForkRemapTable } from "../types/fork.js";
|
|
8
8
|
import type { TCoreArgumentDiff, TCoreDiffOptions } from "../types/diff.js";
|
|
9
9
|
import { ClaimLibrary } from "./claim-library.js";
|
|
10
|
-
import {
|
|
11
|
-
import { ClaimSourceLibrary } from "./claim-source-library.js";
|
|
10
|
+
import { ClaimCitationLibrary } from "./claim-citation-library.js";
|
|
12
11
|
import { ArgumentLibrary } from "./argument-library.js";
|
|
13
12
|
import { ArgumentEngine } from "./argument-engine.js";
|
|
14
13
|
import { ForkLibrary } from "./fork-library.js";
|
|
@@ -18,49 +17,50 @@ import { ForkLibrary } from "./fork-library.js";
|
|
|
18
17
|
* library instance is provided, it is used directly; otherwise a new one
|
|
19
18
|
* is constructed using the shared config.
|
|
20
19
|
*/
|
|
21
|
-
export type TPropositCoreOptions<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable,
|
|
20
|
+
export type TPropositCoreOptions<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable, TClaim extends TCoreClaim = TCoreClaim, TCitation extends TCoreClaimCitation = TCoreClaimCitation, TArgFork extends TCoreArgumentForkRecord = TCoreArgumentForkRecord, TPremiseFork extends TCorePremiseForkRecord = TCorePremiseForkRecord, TExprFork extends TCoreExpressionForkRecord = TCoreExpressionForkRecord, TVarFork extends TCoreVariableForkRecord = TCoreVariableForkRecord, TClaimFork extends TCoreClaimForkRecord = TCoreClaimForkRecord> = TPropositCoreConfig & {
|
|
22
21
|
/** Pre-constructed claim library instance. */
|
|
23
22
|
claimLibrary?: ClaimLibrary<TClaim>;
|
|
24
|
-
/** Pre-constructed
|
|
25
|
-
|
|
26
|
-
/** Pre-constructed claim-source association library instance. */
|
|
27
|
-
claimSourceLibrary?: ClaimSourceLibrary<TAssoc>;
|
|
23
|
+
/** Pre-constructed claim-citation library instance. */
|
|
24
|
+
claimCitationLibrary?: ClaimCitationLibrary<TCitation>;
|
|
28
25
|
/** Pre-constructed fork library instance. */
|
|
29
|
-
forkLibrary?: ForkLibrary<TArgFork, TPremiseFork, TExprFork, TVarFork, TClaimFork
|
|
26
|
+
forkLibrary?: ForkLibrary<TArgFork, TPremiseFork, TExprFork, TVarFork, TClaimFork>;
|
|
30
27
|
/** Pre-constructed argument library instance. */
|
|
31
|
-
argumentLibrary?: ArgumentLibrary<TArg, TPremise, TExpr, TVar,
|
|
28
|
+
argumentLibrary?: ArgumentLibrary<TArg, TPremise, TExpr, TVar, TClaim, TCitation>;
|
|
32
29
|
};
|
|
33
30
|
/**
|
|
34
|
-
* Top-level orchestrator for the proposit-core system. Owns all
|
|
35
|
-
* libraries (claims,
|
|
36
|
-
*
|
|
31
|
+
* Top-level orchestrator for the proposit-core system. Owns all four
|
|
32
|
+
* libraries (claims, claim citations, forks, arguments) and provides
|
|
33
|
+
* unified snapshot/restore and validation.
|
|
37
34
|
*
|
|
38
35
|
* Construction order follows dependency order:
|
|
39
|
-
* claims ->
|
|
36
|
+
* claims -> claimCitations -> forks -> arguments.
|
|
37
|
+
*
|
|
38
|
+
* As of v0.10.0 the legacy `sources` and `claimSources` libraries have been
|
|
39
|
+
* folded into `claims` and `claimCitations` respectively — sources are now
|
|
40
|
+
* claims with `type: "citation"`.
|
|
40
41
|
*/
|
|
41
|
-
export declare class PropositCore<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable,
|
|
42
|
+
export declare class PropositCore<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable, TClaim extends TCoreClaim = TCoreClaim, TCitation extends TCoreClaimCitation = TCoreClaimCitation, TArgFork extends TCoreArgumentForkRecord = TCoreArgumentForkRecord, TPremiseFork extends TCorePremiseForkRecord = TCorePremiseForkRecord, TExprFork extends TCoreExpressionForkRecord = TCoreExpressionForkRecord, TVarFork extends TCoreVariableForkRecord = TCoreVariableForkRecord, TClaimFork extends TCoreClaimForkRecord = TCoreClaimForkRecord> {
|
|
42
43
|
readonly claims: ClaimLibrary<TClaim>;
|
|
43
|
-
readonly
|
|
44
|
-
readonly
|
|
45
|
-
readonly
|
|
46
|
-
readonly arguments: ArgumentLibrary<TArg, TPremise, TExpr, TVar, TSource, TClaim, TAssoc>;
|
|
44
|
+
readonly claimCitations: ClaimCitationLibrary<TCitation>;
|
|
45
|
+
readonly forks: ForkLibrary<TArgFork, TPremiseFork, TExprFork, TVarFork, TClaimFork>;
|
|
46
|
+
readonly arguments: ArgumentLibrary<TArg, TPremise, TExpr, TVar, TClaim, TCitation>;
|
|
47
47
|
protected generateId: () => string;
|
|
48
|
-
constructor(options?: TPropositCoreOptions<TArg, TPremise, TExpr, TVar,
|
|
48
|
+
constructor(options?: TPropositCoreOptions<TArg, TPremise, TExpr, TVar, TClaim, TCitation, TArgFork, TPremiseFork, TExprFork, TVarFork, TClaimFork>);
|
|
49
49
|
/**
|
|
50
50
|
* Returns a serializable snapshot of the entire PropositCore state,
|
|
51
51
|
* including all libraries.
|
|
52
52
|
*/
|
|
53
|
-
snapshot(): TPropositCoreSnapshot<TArg, TPremise, TExpr, TVar,
|
|
53
|
+
snapshot(): TPropositCoreSnapshot<TArg, TPremise, TExpr, TVar, TClaim, TCitation, TArgFork, TPremiseFork, TExprFork, TVarFork, TClaimFork>;
|
|
54
54
|
/**
|
|
55
55
|
* Restores a `PropositCore` instance from a snapshot. Libraries are
|
|
56
|
-
* restored in dependency order: claims ->
|
|
57
|
-
*
|
|
56
|
+
* restored in dependency order: claims -> claimCitations -> forks ->
|
|
57
|
+
* arguments.
|
|
58
58
|
*
|
|
59
59
|
* @param snapshot - The serialized PropositCore snapshot.
|
|
60
60
|
* @param config - Optional shared configuration for the restored instance.
|
|
61
61
|
* @returns A fully restored `PropositCore` instance.
|
|
62
62
|
*/
|
|
63
|
-
static fromSnapshot<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable,
|
|
63
|
+
static fromSnapshot<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable, TClaim extends TCoreClaim = TCoreClaim, TCitation extends TCoreClaimCitation = TCoreClaimCitation, TArgFork extends TCoreArgumentForkRecord = TCoreArgumentForkRecord, TPremiseFork extends TCorePremiseForkRecord = TCorePremiseForkRecord, TExprFork extends TCoreExpressionForkRecord = TCoreExpressionForkRecord, TVarFork extends TCoreVariableForkRecord = TCoreVariableForkRecord, TClaimFork extends TCoreClaimForkRecord = TCoreClaimForkRecord>(snapshot: TPropositCoreSnapshot<TArg, TPremise, TExpr, TVar, TClaim, TCitation, TArgFork, TPremiseFork, TExprFork, TVarFork, TClaimFork>, config?: TPropositCoreConfig): PropositCore<TArg, TPremise, TExpr, TVar, TClaim, TCitation, TArgFork, TPremiseFork, TExprFork, TVarFork, TClaimFork>;
|
|
64
64
|
/**
|
|
65
65
|
* Runs invariant validation across all managed libraries and merges
|
|
66
66
|
* the results.
|
|
@@ -69,10 +69,10 @@ export declare class PropositCore<TArg extends TCoreArgument = TCoreArgument, TP
|
|
|
69
69
|
*/
|
|
70
70
|
validate(): TInvariantValidationResult;
|
|
71
71
|
/**
|
|
72
|
-
* Forks an argument, cloning its referenced claims
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* namespaces.
|
|
72
|
+
* Forks an argument, cloning its referenced claims (including any
|
|
73
|
+
* citation-typed claims reachable via citations) and the citation edges
|
|
74
|
+
* between them, then remaps variable claim references to point at the
|
|
75
|
+
* cloned claims. Creates fork records in all five namespaces.
|
|
76
76
|
*
|
|
77
77
|
* @param argumentId - The ID of the argument to fork.
|
|
78
78
|
* @param newArgumentId - The ID for the forked argument. Defaults to `this.generateId()`.
|
|
@@ -86,12 +86,10 @@ export declare class PropositCore<TArg extends TCoreArgument = TCoreArgument, TP
|
|
|
86
86
|
expressionForkExtras?: Partial<Omit<TExprFork, keyof TCoreExpressionForkRecord>>;
|
|
87
87
|
variableForkExtras?: Partial<Omit<TVarFork, keyof TCoreVariableForkRecord>>;
|
|
88
88
|
claimForkExtras?: Partial<Omit<TClaimFork, keyof TCoreClaimForkRecord>>;
|
|
89
|
-
sourceForkExtras?: Partial<Omit<TSourceFork, keyof TCoreSourceForkRecord>>;
|
|
90
89
|
}): {
|
|
91
|
-
engine: ArgumentEngine<TArg, TPremise, TExpr, TVar
|
|
90
|
+
engine: ArgumentEngine<TArg, TPremise, TExpr, TVar>;
|
|
92
91
|
remapTable: TForkRemapTable;
|
|
93
92
|
claimRemap: Map<string, string>;
|
|
94
|
-
sourceRemap: Map<string, string>;
|
|
95
93
|
argumentFork: TArgFork;
|
|
96
94
|
};
|
|
97
95
|
/**
|