@proposit/proposit-core 1.5.1 → 1.6.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 (50) hide show
  1. package/dist/extensions/argument-ingestion/shared/resolve-llm-stage-options.d.ts.map +1 -1
  2. package/dist/extensions/argument-ingestion/shared/resolve-llm-stage-options.js +6 -0
  3. package/dist/extensions/argument-ingestion/shared/resolve-llm-stage-options.js.map +1 -1
  4. package/dist/extensions/argument-ingestion/shared/types.d.ts +18 -7
  5. package/dist/extensions/argument-ingestion/shared/types.d.ts.map +1 -1
  6. package/dist/extensions/argument-ingestion/stages/axiom-indicator-detection.d.ts.map +1 -1
  7. package/dist/extensions/argument-ingestion/stages/axiom-indicator-detection.js +4 -2
  8. package/dist/extensions/argument-ingestion/stages/axiom-indicator-detection.js.map +1 -1
  9. package/dist/extensions/argument-ingestion/stages/citation-source-detection.d.ts.map +1 -1
  10. package/dist/extensions/argument-ingestion/stages/citation-source-detection.js +4 -2
  11. package/dist/extensions/argument-ingestion/stages/citation-source-detection.js.map +1 -1
  12. package/dist/extensions/argument-ingestion/stages/claim-canonicalization.d.ts.map +1 -1
  13. package/dist/extensions/argument-ingestion/stages/claim-canonicalization.js +2 -1
  14. package/dist/extensions/argument-ingestion/stages/claim-canonicalization.js.map +1 -1
  15. package/dist/extensions/argument-ingestion/stages/claim-mention-extraction.d.ts.map +1 -1
  16. package/dist/extensions/argument-ingestion/stages/claim-mention-extraction.js +4 -2
  17. package/dist/extensions/argument-ingestion/stages/claim-mention-extraction.js.map +1 -1
  18. package/dist/extensions/argument-ingestion/stages/claim-type-classification.d.ts.map +1 -1
  19. package/dist/extensions/argument-ingestion/stages/claim-type-classification.js +4 -2
  20. package/dist/extensions/argument-ingestion/stages/claim-type-classification.js.map +1 -1
  21. package/dist/extensions/argument-ingestion/stages/conclusion-selection.d.ts.map +1 -1
  22. package/dist/extensions/argument-ingestion/stages/conclusion-selection.js +2 -1
  23. package/dist/extensions/argument-ingestion/stages/conclusion-selection.js.map +1 -1
  24. package/dist/extensions/argument-ingestion/stages/relation-extraction.d.ts.map +1 -1
  25. package/dist/extensions/argument-ingestion/stages/relation-extraction.js +2 -1
  26. package/dist/extensions/argument-ingestion/stages/relation-extraction.js.map +1 -1
  27. package/dist/extensions/argument-ingestion/stages/segmentation.d.ts.map +1 -1
  28. package/dist/extensions/argument-ingestion/stages/segmentation.js +2 -1
  29. package/dist/extensions/argument-ingestion/stages/segmentation.js.map +1 -1
  30. package/dist/extensions/ollama/errors.d.ts +70 -0
  31. package/dist/extensions/ollama/errors.d.ts.map +1 -0
  32. package/dist/extensions/ollama/errors.js +210 -0
  33. package/dist/extensions/ollama/errors.js.map +1 -0
  34. package/dist/extensions/ollama/index.d.ts +6 -0
  35. package/dist/extensions/ollama/index.d.ts.map +1 -0
  36. package/dist/extensions/ollama/index.js +17 -0
  37. package/dist/extensions/ollama/index.js.map +1 -0
  38. package/dist/extensions/ollama/provider.d.ts +19 -0
  39. package/dist/extensions/ollama/provider.d.ts.map +1 -0
  40. package/dist/extensions/ollama/provider.js +285 -0
  41. package/dist/extensions/ollama/provider.js.map +1 -0
  42. package/dist/extensions/ollama/structured-output.d.ts +18 -0
  43. package/dist/extensions/ollama/structured-output.d.ts.map +1 -0
  44. package/dist/extensions/ollama/structured-output.js +164 -0
  45. package/dist/extensions/ollama/structured-output.js.map +1 -0
  46. package/dist/extensions/ollama/types.d.ts +101 -0
  47. package/dist/extensions/ollama/types.d.ts.map +1 -0
  48. package/dist/extensions/ollama/types.js +7 -0
  49. package/dist/extensions/ollama/types.js.map +1 -0
  50. package/package.json +11 -1
@@ -0,0 +1,164 @@
1
+ // TypeBox → standard JSON Schema converter for the Ollama provider.
2
+ //
3
+ // Ollama's `format` parameter accepts a *standard* JSON Schema (the
4
+ // same shape `zodToJsonSchema` would emit). This converter deliberately
5
+ // does NOT apply the OpenAI Responses-API strict-mode folds that
6
+ // `typeboxToOpenAiSchema` (`../openai/structured-output.ts`) applies:
7
+ //
8
+ // * No forced `additionalProperties: false` on objects.
9
+ // * `Type.Optional(T)` → the key is simply OMITTED from `required`
10
+ // (standard JSON-schema optionality), NOT widened to
11
+ // `{ anyOf: [T, { type: "null" }] }` and kept in `required`.
12
+ //
13
+ // Those strict folds are correct for OpenAI strict mode and harmful for
14
+ // a standard `format` consumer, so the Ollama provider gets its own
15
+ // converter rather than reusing/renaming the OpenAI one.
16
+ //
17
+ // Supported TypeBox subset (same primitives the OpenAI converter
18
+ // covers): Object, Array, String, Number, Integer, Boolean, Literal,
19
+ // Union (including Union-of-Literals → enum shorthand, and Union
20
+ // containing Null for the Nullable pattern), Optional (modifier),
21
+ // Record, Null. Unsupported primitives throw a clear
22
+ // `UnsupportedSchemaError` at conversion time.
23
+ //
24
+ // The converter ignores TypeBox `$id` / `description` / other metadata
25
+ // on inner types — only structural fields are projected.
26
+ class UnsupportedSchemaError extends Error {
27
+ constructor(kind) {
28
+ super(`TypeBox primitive "${kind}" is not supported by the Ollama structured-output converter. ` +
29
+ `Supported subset: Object, Array, String, Number, Integer, Boolean, Literal, Union, Optional, Record, Null.`);
30
+ this.name = "UnsupportedSchemaError";
31
+ }
32
+ }
33
+ function kindOf(schema) {
34
+ return schema["~kind"];
35
+ }
36
+ function isOptional(schema) {
37
+ // eslint-disable-next-line @typescript-eslint/naming-convention
38
+ return schema["~optional"] === true;
39
+ }
40
+ /**
41
+ * Convert a TypeBox schema into a standard JSON Schema document
42
+ * suitable for Ollama's `format` parameter.
43
+ *
44
+ * Throws `UnsupportedSchemaError` when the source schema contains a
45
+ * TypeBox primitive outside the supported subset.
46
+ */
47
+ export function typeboxToJsonSchema(schema) {
48
+ const kind = kindOf(schema);
49
+ switch (kind) {
50
+ case "String":
51
+ return { type: "string" };
52
+ case "Number":
53
+ return { type: "number" };
54
+ case "Integer":
55
+ return { type: "integer" };
56
+ case "Boolean":
57
+ return { type: "boolean" };
58
+ case "Null":
59
+ return { type: "null" };
60
+ case "Literal":
61
+ return convertLiteral(schema);
62
+ case "Union":
63
+ return convertUnion(schema);
64
+ case "Array":
65
+ return convertArray(schema);
66
+ case "Object":
67
+ return convertObject(schema);
68
+ case "Record":
69
+ return convertRecord(schema);
70
+ default:
71
+ throw new UnsupportedSchemaError(kind ?? "(unknown)");
72
+ }
73
+ }
74
+ function convertLiteral(schema) {
75
+ const literal = schema;
76
+ const value = literal.const;
77
+ const jsType = literal.type ?? jsonSchemaTypeOf(value);
78
+ return { type: jsType, enum: [value] };
79
+ }
80
+ function jsonSchemaTypeOf(value) {
81
+ if (value === null)
82
+ return "null";
83
+ switch (typeof value) {
84
+ case "string":
85
+ return "string";
86
+ case "number":
87
+ return "number";
88
+ case "bigint":
89
+ return "integer";
90
+ case "boolean":
91
+ return "boolean";
92
+ default:
93
+ throw new Error(`Literal value of type "${typeof value}" cannot be converted to a JSON Schema primitive type.`);
94
+ }
95
+ }
96
+ function convertUnion(schema) {
97
+ const union = schema;
98
+ const branches = union.anyOf;
99
+ if (branches.length === 0) {
100
+ throw new Error("Cannot convert an empty Type.Union.");
101
+ }
102
+ // Shorthand: collapse a union of same-typed literals into a single
103
+ // `enum`. Mixed-type literal unions still convert correctly via the
104
+ // general anyOf branch — we only collapse when every literal shares
105
+ // the same JSON Schema type.
106
+ if (branches.every(isLiteralKind)) {
107
+ const literalTypes = new Set(branches.map((b) => b.type));
108
+ if (literalTypes.size === 1) {
109
+ const literalType = [...literalTypes][0] ?? "string";
110
+ return {
111
+ type: literalType,
112
+ enum: branches.map((b) => b.const),
113
+ };
114
+ }
115
+ }
116
+ return { anyOf: branches.map((b) => typeboxToJsonSchema(b)) };
117
+ }
118
+ function isLiteralKind(schema) {
119
+ return kindOf(schema) === "Literal";
120
+ }
121
+ function convertArray(schema) {
122
+ const array = schema;
123
+ return {
124
+ type: "array",
125
+ items: typeboxToJsonSchema(array.items),
126
+ };
127
+ }
128
+ function convertObject(schema) {
129
+ const object = schema;
130
+ const properties = {};
131
+ const required = [];
132
+ for (const [key, propSchema] of Object.entries(object.properties)) {
133
+ // Standard JSON-schema optionality: an `Type.Optional(T)`
134
+ // property is converted as its inner `T` and simply OMITTED
135
+ // from `required`. No null-widening, no forced
136
+ // `additionalProperties: false` — that is the OpenAI-strict
137
+ // fold the Ollama `format` consumer does not want.
138
+ properties[key] = typeboxToJsonSchema(propSchema);
139
+ if (!isOptional(propSchema)) {
140
+ required.push(key);
141
+ }
142
+ }
143
+ return {
144
+ type: "object",
145
+ properties,
146
+ required,
147
+ };
148
+ }
149
+ function convertRecord(schema) {
150
+ const record = schema;
151
+ // TypeBox encodes Record(Type.String(), V) as
152
+ // { patternProperties: { "^.*$": V } }. We collapse this to the
153
+ // canonical `additionalProperties: <V>` shape.
154
+ const patterns = Object.values(record.patternProperties);
155
+ if (patterns.length !== 1) {
156
+ throw new Error("Type.Record with multiple pattern keys is not supported by the converter.");
157
+ }
158
+ const valueSchema = patterns[0];
159
+ return {
160
+ type: "object",
161
+ additionalProperties: typeboxToJsonSchema(valueSchema),
162
+ };
163
+ }
164
+ //# sourceMappingURL=structured-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structured-output.js","sourceRoot":"","sources":["../../../src/extensions/ollama/structured-output.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAAE;AACF,oEAAoE;AACpE,wEAAwE;AACxE,iEAAiE;AACjE,sEAAsE;AACtE,EAAE;AACF,0DAA0D;AAC1D,qEAAqE;AACrE,yDAAyD;AACzD,iEAAiE;AACjE,EAAE;AACF,wEAAwE;AACxE,oEAAoE;AACpE,yDAAyD;AACzD,EAAE;AACF,iEAAiE;AACjE,qEAAqE;AACrE,iEAAiE;AACjE,kEAAkE;AAClE,qDAAqD;AACrD,+CAA+C;AAC/C,EAAE;AACF,uEAAuE;AACvE,yDAAyD;AAazD,MAAM,sBAAuB,SAAQ,KAAK;IACtC,YAAY,IAAY;QACpB,KAAK,CACD,sBAAsB,IAAI,gEAAgE;YACtF,4GAA4G,CACnH,CAAA;QACD,IA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,8CAA8C;IAC9C,gEAAgE;IAChE,+CAA+C;IAC/C,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACxD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CACX,2EAA2E,CAC9E,CAAA;IACL,CAAC;IACD,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IAC/B,OAAO;QACH,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,mBAAmB,CAAC,WAAW,CAAC;KACzD,CAAA;AACL,CAAC"}
@@ -0,0 +1,101 @@
1
+ import type { TOllamaJsonSchema } from "./structured-output.js";
2
+ /**
3
+ * The minimal subset of the `ollama` SDK's `chat()` response we read.
4
+ * We model only the fields the provider touches so a mock client (and
5
+ * a real `ChatResponse`) both satisfy it without importing the SDK type
6
+ * (which would force the optional peer into the type graph).
7
+ */
8
+ export type TOllamaChatToolCall = {
9
+ function: {
10
+ name: string;
11
+ arguments: Record<string, unknown>;
12
+ };
13
+ };
14
+ export type TOllamaChatMessage = {
15
+ role: string;
16
+ content: string;
17
+ tool_calls?: TOllamaChatToolCall[];
18
+ };
19
+ export type TOllamaChatResponse = {
20
+ message: TOllamaChatMessage;
21
+ prompt_eval_count?: number;
22
+ eval_count?: number;
23
+ };
24
+ /** Tool spec in the `ollama` SDK's `chat({ tools })` wire shape. */
25
+ export type TOllamaToolWire = {
26
+ type: "function";
27
+ function: {
28
+ name: string;
29
+ description: string;
30
+ parameters: TOllamaJsonSchema;
31
+ };
32
+ };
33
+ /** The `chat()` request body subset the provider builds. */
34
+ export type TOllamaChatRequest = {
35
+ model: string;
36
+ messages: TOllamaChatMessage[];
37
+ format?: string | object;
38
+ tools?: TOllamaToolWire[];
39
+ stream?: false;
40
+ options?: {
41
+ temperature?: number;
42
+ num_predict?: number;
43
+ num_ctx?: number;
44
+ };
45
+ };
46
+ /**
47
+ * The slice of the `ollama` SDK client surface the provider depends on:
48
+ * a single `chat()` method and an `abort()` to honor `AbortSignal`.
49
+ * Modeling it as a structural type (rather than importing `Ollama`)
50
+ * keeps the optional peer out of the type graph and gives tests a clean
51
+ * injection seam.
52
+ */
53
+ export type TOllamaClient = {
54
+ chat(request: TOllamaChatRequest): Promise<TOllamaChatResponse>;
55
+ abort(): void;
56
+ };
57
+ /**
58
+ * The shape of the dynamically-imported `ollama` module. `Ollama` is
59
+ * the SDK's exported class-constructor name (an external symbol), so it
60
+ * is exempt from the in-repo camelCase property-naming rule.
61
+ */
62
+ export type TOllamaModule = {
63
+ Ollama: new (config: {
64
+ host: string;
65
+ }) => TOllamaClient;
66
+ };
67
+ export type TOllamaProviderConfig = {
68
+ /** Daemon base URL. Defaults to `http://localhost:11434`. */
69
+ baseUrl?: string;
70
+ /**
71
+ * Pre-built SDK client. Primarily a test seam (inject a mock). When
72
+ * omitted, the provider dynamically imports the `ollama` package and
73
+ * constructs an `Ollama({ host: baseUrl })`; a missing package
74
+ * surfaces as an actionable error at construction time.
75
+ */
76
+ client?: TOllamaClient;
77
+ /**
78
+ * Context-window size sent as Ollama's `options.num_ctx`. Defaults
79
+ * to a generous **32768**.
80
+ *
81
+ * **Why this is set, and set generously.** Ollama's per-model
82
+ * default `num_ctx` is small (often ~4096) and Ollama **silently
83
+ * truncates** any prompt longer than `num_ctx` — no error is raised;
84
+ * the model dutifully emits schema-valid JSON from a truncated
85
+ * prompt, which then passes the framework's `Value.Check` and yields
86
+ * a quietly-wrong parse. A real v2 ingestion prompt (segmenting a
87
+ * multi-KB argument) easily exceeds 4096 tokens, so without a
88
+ * generous default the stated goal — running the *whole* pipeline
89
+ * locally on real text — would silently misbehave. Raise this
90
+ * further for very large inputs; lower it only if VRAM-constrained
91
+ * and inputs are known to be small.
92
+ */
93
+ numCtx?: number;
94
+ /**
95
+ * Cap on function-tool agent-loop round-trips before throwing
96
+ * `ToolLoopExhaustedError`. Defaults to 6, mirroring the OpenAI
97
+ * provider. No ingestion stage uses tools, so this is secondary.
98
+ */
99
+ maxToolCallRounds?: number;
100
+ };
101
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/extensions/ollama/types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D;;;;;GAKG;AAEH,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KACrC,CAAA;CACJ,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAC9B,OAAO,EAAE,kBAAkB,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,oEAAoE;AACpE,MAAM,MAAM,eAAe,GAAG;IAC1B,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,MAAM,CAAA;QACnB,UAAU,EAAE,iBAAiB,CAAA;KAChC,CAAA;CACJ,CAAA;AAED,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,kBAAkB,EAAE,CAAA;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,eAAe,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,OAAO,CAAC,EAAE;QACN,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,OAAO,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;CACJ,CAAA;AAGD;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB,IAAI,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;IAC/D,KAAK,IAAI,IAAI,CAAA;CAChB,CAAA;AAED;;;;GAIG;AAEH,MAAM,MAAM,aAAa,GAAG;IACxB,MAAM,EAAE,KAAK,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,aAAa,CAAA;CAC1D,CAAA;AAGD,MAAM,MAAM,qBAAqB,GAAG;IAChC,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAA"}
@@ -0,0 +1,7 @@
1
+ // Extension-internal types for the Ollama provider.
2
+ //
3
+ // Property names on the SDK request/response shapes are *wire* names
4
+ // dictated by the Ollama HTTP API (snake_case); the in-repo brain-style
5
+ // camelCase rule does not apply to external wire formats.
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/extensions/ollama/types.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,EAAE;AACF,qEAAqE;AACrE,wEAAwE;AACxE,0DAA0D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proposit/proposit-core",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "description": "Core engine for building and manipulating propositional logic arguments.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -37,6 +37,11 @@
37
37
  "types": "./dist/extensions/openai/index.d.ts",
38
38
  "import": "./dist/extensions/openai/index.js",
39
39
  "default": "./dist/extensions/openai/index.js"
40
+ },
41
+ "./extensions/ollama": {
42
+ "types": "./dist/extensions/ollama/index.d.ts",
43
+ "import": "./dist/extensions/ollama/index.js",
44
+ "default": "./dist/extensions/ollama/index.js"
40
45
  }
41
46
  },
42
47
  "bin": {
@@ -59,6 +64,7 @@
59
64
  "eslint-plugin-check-file": "^3.3.1",
60
65
  "eslint-plugin-n": "^17.24.0",
61
66
  "globals": "^17.4.0",
67
+ "ollama": "^0.6.3",
62
68
  "peggy": "^5.1.0",
63
69
  "prettier": "^3.8.1",
64
70
  "typedoc": "^0.28.18",
@@ -72,9 +78,13 @@
72
78
  "yaml": "^2.8.3"
73
79
  },
74
80
  "peerDependencies": {
81
+ "ollama": ">=0.5.0",
75
82
  "openai": ">=4.0.0"
76
83
  },
77
84
  "peerDependenciesMeta": {
85
+ "ollama": {
86
+ "optional": true
87
+ },
78
88
  "openai": {
79
89
  "optional": true
80
90
  }