@ai-matrx/alchemy 0.13.0 → 0.15.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/CHANGELOG.md +47 -0
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.d.cts +18 -23
- package/dist/actions.d.ts +18 -23
- package/dist/actions.js.map +1 -1
- package/dist/checks.d.cts +2 -0
- package/dist/checks.d.ts +2 -0
- package/dist/core.cjs +9 -4
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +24 -58
- package/dist/core.d.ts +24 -58
- package/dist/core.js +9 -4
- package/dist/core.js.map +1 -1
- package/dist/declare/schema.json +3 -0
- package/dist/declare.cjs +1 -1
- package/dist/declare.cjs.map +1 -1
- package/dist/declare.d.cts +26 -1
- package/dist/declare.d.ts +26 -1
- package/dist/declare.js +1 -1
- package/dist/declare.js.map +1 -1
- package/dist/index.cjs +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -58
- package/dist/index.d.ts +24 -58
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/menu.d.cts +16 -21
- package/dist/menu.d.ts +16 -21
- package/dist/operate-document.cjs +2 -2
- package/dist/operate-document.cjs.map +1 -1
- package/dist/operate-document.d.cts +4 -42
- package/dist/operate-document.d.ts +4 -42
- package/dist/operate-document.js +2 -2
- package/dist/operate-document.js.map +1 -1
- package/dist/operate-rich-html.cjs +1 -1
- package/dist/operate-rich-html.cjs.map +1 -1
- package/dist/operate-rich-html.d.cts +3 -42
- package/dist/operate-rich-html.d.ts +3 -42
- package/dist/operate-rich-html.js +1 -1
- package/dist/operate-rich-html.js.map +1 -1
- package/dist/operate-server.cjs +1 -1
- package/dist/operate-server.cjs.map +1 -1
- package/dist/operate-server.d.cts +8 -46
- package/dist/operate-server.d.ts +8 -46
- package/dist/operate-server.js +1 -1
- package/dist/operate-server.js.map +1 -1
- package/dist/operate-xlsx.cjs +2 -2
- package/dist/operate-xlsx.cjs.map +1 -1
- package/dist/operate-xlsx.d.cts +4 -42
- package/dist/operate-xlsx.d.ts +4 -42
- package/dist/operate-xlsx.js +2 -2
- package/dist/operate-xlsx.js.map +1 -1
- package/dist/operate.cjs +9 -4
- package/dist/operate.cjs.map +1 -1
- package/dist/operate.d.cts +24 -58
- package/dist/operate.d.ts +24 -58
- package/dist/operate.js +9 -4
- package/dist/operate.js.map +1 -1
- package/dist/ports.d.cts +11 -15
- package/dist/ports.d.ts +11 -15
- package/dist/react-bar.d.cts +2 -0
- package/dist/react-bar.d.ts +2 -0
- package/dist/react-host.d.cts +16 -21
- package/dist/react-host.d.ts +16 -21
- package/dist/react-menu.d.cts +2 -0
- package/dist/react-menu.d.ts +2 -0
- package/dist/react-overflow.d.cts +16 -21
- package/dist/react-overflow.d.ts +16 -21
- package/dist/react-palette.d.cts +2 -0
- package/dist/react-palette.d.ts +2 -0
- package/dist/react-selection.d.cts +2 -0
- package/dist/react-selection.d.ts +2 -0
- package/dist/react-sheet.d.cts +2 -0
- package/dist/react-sheet.d.ts +2 -0
- package/dist/react-workspace.cjs +2 -2
- package/dist/react-workspace.cjs.map +1 -1
- package/dist/react-workspace.d.cts +30 -1
- package/dist/react-workspace.d.ts +30 -1
- package/dist/react-workspace.js +1 -1
- package/dist/react-workspace.js.map +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.cjs.map +1 -1
- package/dist/surface.d.cts +222 -16
- package/dist/surface.d.ts +222 -16
- package/dist/surface.js +1 -1
- package/dist/surface.js.map +1 -1
- package/package.json +4 -4
package/dist/operate.d.cts
CHANGED
|
@@ -1,48 +1,11 @@
|
|
|
1
|
+
import { Payload, Json as Json$2, Column, ContentTransferError } from '@ai-matrx/kit/transfer-json';
|
|
2
|
+
export { Column, ContentTransferError, Json, NormalizeTransferJsonOptions, Payload, normalizeTransferJson } from '@ai-matrx/kit/transfer-json';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Framework-neutral transfer contracts (Alchemy Operate, CONTRACT §2.3). All data crossing this boundary is JSON.
|
|
3
|
-
* Moved
|
|
6
|
+
* Moved in ALC-16; `Json`/`Payload`/`Column` now live in `@ai-matrx/kit/transfer-json`; the format-adapter contract lives in `./contract`.
|
|
4
7
|
*/
|
|
5
|
-
|
|
6
|
-
[key: string]: Json$2;
|
|
7
|
-
};
|
|
8
|
-
type Payload =
|
|
9
|
-
/** A text payload may name its language (code blocks): downloads take its extension, Markdown fences it. */
|
|
10
|
-
{
|
|
11
|
-
kind: "text";
|
|
12
|
-
text: string;
|
|
13
|
-
language?: string;
|
|
14
|
-
} | {
|
|
15
|
-
kind: "markdown";
|
|
16
|
-
text: string;
|
|
17
|
-
} | {
|
|
18
|
-
kind: "json";
|
|
19
|
-
value: Json$2;
|
|
20
|
-
} | {
|
|
21
|
-
kind: "rows";
|
|
22
|
-
rows: Record<string, Json$2>[];
|
|
23
|
-
columns: Column[];
|
|
24
|
-
} | {
|
|
25
|
-
kind: "registered";
|
|
26
|
-
format: string;
|
|
27
|
-
value: Json$2;
|
|
28
|
-
};
|
|
29
|
-
type Column = {
|
|
30
|
-
id: string;
|
|
31
|
-
label: string;
|
|
32
|
-
path: string;
|
|
33
|
-
visible: boolean;
|
|
34
|
-
exportable?: boolean;
|
|
35
|
-
classification?: "ordinary" | "secret" | "credential";
|
|
36
|
-
/** Declared field shape suitable for a projected table-schema export. */
|
|
37
|
-
schema?: {
|
|
38
|
-
dataType?: string;
|
|
39
|
-
order?: number;
|
|
40
|
-
required?: boolean;
|
|
41
|
-
defaultValue?: Json$2;
|
|
42
|
-
validation?: Json$2;
|
|
43
|
-
metadata?: Json$2;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
8
|
+
|
|
46
9
|
type ExportProjection = {
|
|
47
10
|
rules: {
|
|
48
11
|
target: "payload" | "row";
|
|
@@ -315,17 +278,6 @@ declare function assembleAgentPayload(input: AgentPayloadInput, environment?: Ag
|
|
|
315
278
|
bodyOffset: number;
|
|
316
279
|
};
|
|
317
280
|
|
|
318
|
-
declare class ContentTransferError extends Error {
|
|
319
|
-
readonly code: string;
|
|
320
|
-
readonly path: string | undefined;
|
|
321
|
-
constructor(code: string, message: string, path?: string);
|
|
322
|
-
/**
|
|
323
|
-
* One error class across every loaded copy: while `@ai-matrx/kit/content-transfer`
|
|
324
|
-
* still bundles this module for its not-yet-repointed consumers (ALC-16), an
|
|
325
|
-
* error raised by one copy is `instanceof` the other.
|
|
326
|
-
*/
|
|
327
|
-
static [Symbol.hasInstance](value: unknown): boolean;
|
|
328
|
-
}
|
|
329
281
|
/** A realm-wide brand (Symbol.for), so a binding made by one loaded copy is recognised by another. */
|
|
330
282
|
declare const bound: unique symbol;
|
|
331
283
|
type BoundAllMatching = {
|
|
@@ -335,10 +287,6 @@ type BoundAllMatching = {
|
|
|
335
287
|
readonly columns: readonly Column[];
|
|
336
288
|
readonly limits?: TransferLimits;
|
|
337
289
|
};
|
|
338
|
-
type NormalizeTransferJsonOptions = {
|
|
339
|
-
omitUndefinedObjectProperties?: boolean;
|
|
340
|
-
};
|
|
341
|
-
declare function normalizeTransferJson(value: unknown, options?: NormalizeTransferJsonOptions): Json$2;
|
|
342
290
|
/** Column ids are identities, never an alternative data address. */
|
|
343
291
|
declare function readTransferCell(row: Record<string, Json$2>, column: Column): Json$2 | undefined;
|
|
344
292
|
declare function projectSnapshot(raw: RawSnapshot, projection: ExportProjection): Snapshot;
|
|
@@ -571,6 +519,8 @@ interface SurfaceDeclaration {
|
|
|
571
519
|
configNamespaces?: readonly ConfigNamespaceDeclaration[];
|
|
572
520
|
evidenceSources?: readonly EvidenceSourceDeclaration[];
|
|
573
521
|
skipBaselineValues?: boolean;
|
|
522
|
+
/** Opt out of the host's baseline item types (`baselineItemTypes`, e.g. `TABLE_ROW_ITEM_TYPE`). */
|
|
523
|
+
skipBaselineItemTypes?: boolean;
|
|
574
524
|
}
|
|
575
525
|
type ValueProvenance = {
|
|
576
526
|
kind: "own";
|
|
@@ -1347,6 +1297,22 @@ interface Delivery {
|
|
|
1347
1297
|
send(artifact: SealedArtifact, to: WriteTargetRef, via: "destination"): Promise<Receipt>;
|
|
1348
1298
|
}
|
|
1349
1299
|
|
|
1300
|
+
/**
|
|
1301
|
+
* Reasoning ("thinking") blocks in model output. A copy of an answer leaves them out by default;
|
|
1302
|
+
* the menu's "Copy including thinking" variant puts them back (`stripThinking` prop of
|
|
1303
|
+
* `MatrxCopyMenu`). Pure and tiny: no engine is loaded.
|
|
1304
|
+
*
|
|
1305
|
+
* Same contract as print's `removeThinkingContent` — `thinking.test.ts` runs both over one corpus
|
|
1306
|
+
* so the two cannot drift apart.
|
|
1307
|
+
*/
|
|
1308
|
+
/** Does this content carry any reasoning block? */
|
|
1309
|
+
declare function hasThinking(text: string): boolean;
|
|
1310
|
+
/**
|
|
1311
|
+
* The content without its reasoning blocks. A block between blank lines (its own paragraph) leaves two
|
|
1312
|
+
* paragraphs; a block inside a paragraph collapses to one line break; three or more newlines collapse to two.
|
|
1313
|
+
*/
|
|
1314
|
+
declare function stripThinking(text: string): string;
|
|
1315
|
+
|
|
1350
1316
|
/**
|
|
1351
1317
|
* Operate formats — one adapter per format, stable ids, synchronous eligibility, lazy engines
|
|
1352
1318
|
* (Matrx Alchemy CONTRACT §1.9 / §2.3, ALC-16).
|
|
@@ -1591,4 +1557,4 @@ declare function setPersonDefaultRecipe(ports: Pick<AlchemyHostPorts, "persisten
|
|
|
1591
1557
|
[key: string]: Json;
|
|
1592
1558
|
} | null): Promise<void>;
|
|
1593
1559
|
|
|
1594
|
-
export { type AgentPayloadEnvironment, type AgentPayloadInput, type AiPreparation, type Artifact, type BoundAllMatching, type BuiltInFormatId, type CannotApply, type CapturedAllMatching, type CapturedSource, type
|
|
1560
|
+
export { type AgentPayloadEnvironment, type AgentPayloadInput, type AiPreparation, type Artifact, type BoundAllMatching, type BuiltInFormatId, type CannotApply, type CapturedAllMatching, type CapturedSource, type Coverage, type Delivery, type DeliveryOutcome, type Draft, DuplicateWriteHandlerError, EMPTY_STRUCTURE, type ExportPage, type ExportProjection, FORMAT_ADAPTERS, type FormatAdapter, type FormatEngine, type FormatOptions, type NodeLimit, type Notice, type Omission, type OutputSpan, type PageAction, type PreparationOptions, type PreparationSession, type QuerySnapshot, type RawSnapshot, type Receipt, type RecipeOrigin, type ResolvedRecipe, type SealedArtifact, type Section, type SectionLayout, type ServerOperation, type Snapshot, type Source, type SpanMap, type StructureRecipe, type SurfaceHandle, TRANSFER_DEFAULT_RECIPE_SETTING, type TransferLimits, type TransferOperation, type TransferOutcome, type TransferPreferenceOverrides, type TransferPreferences, type TransferScope, type TransferSurfaceDeclaration, type TransferTarget, type Transform, type Transport, type WriteApplyRequest, type WriteCaller, type WriteDoor, type WriteDoorDeclarations, type WriteDoorPorts, type WriteHandler, type WriteHandlerResult, type WriteOp, type WriteRefusalReason, type WriteRequest, type WriteReviewPort, type WriteTargetRef, agentPayloadWithSpans, applyJsonStructure, applySectionSelection, applySectionStructure, applyStructureToJson, applyTransferLimits, assembleAgentPayload, buildAgentPayload, capture, collectAllMatching, concretePointers, createBrowserTransport, createDelivery, createDraft, createSurfaceTransferHandle, createWriteDoor, deriveDraft, directSource, displayPath, editDraft, eligibleFormats, exportedColumns, extensionForLanguage, fenceJsonBlock, formatAdapter, hasThinking, isProseSection, isSealed, joinPointer, jsonSize, jsonTextSpans, nodeChars, offsetSpans, openPreparation, outputPointer, patternBelow, patternCovers, patternMatches, pointerSegments, projectSnapshot, readTransferCell, recipeKey, reduceJson, refreshDraft, resetDraft, resolveDefaultRecipe, resolveTransferPreferences, resolveTransferRegistry, sealArtifact, sealDraft, sealTransferArtifact, sectionLayout, serialize, setPersonDefaultRecipe, sourceChanged, spanMap, stripThinking, stubText, transformRows, undoDraft };
|
package/dist/operate.d.ts
CHANGED
|
@@ -1,48 +1,11 @@
|
|
|
1
|
+
import { Payload, Json as Json$2, Column, ContentTransferError } from '@ai-matrx/kit/transfer-json';
|
|
2
|
+
export { Column, ContentTransferError, Json, NormalizeTransferJsonOptions, Payload, normalizeTransferJson } from '@ai-matrx/kit/transfer-json';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Framework-neutral transfer contracts (Alchemy Operate, CONTRACT §2.3). All data crossing this boundary is JSON.
|
|
3
|
-
* Moved
|
|
6
|
+
* Moved in ALC-16; `Json`/`Payload`/`Column` now live in `@ai-matrx/kit/transfer-json`; the format-adapter contract lives in `./contract`.
|
|
4
7
|
*/
|
|
5
|
-
|
|
6
|
-
[key: string]: Json$2;
|
|
7
|
-
};
|
|
8
|
-
type Payload =
|
|
9
|
-
/** A text payload may name its language (code blocks): downloads take its extension, Markdown fences it. */
|
|
10
|
-
{
|
|
11
|
-
kind: "text";
|
|
12
|
-
text: string;
|
|
13
|
-
language?: string;
|
|
14
|
-
} | {
|
|
15
|
-
kind: "markdown";
|
|
16
|
-
text: string;
|
|
17
|
-
} | {
|
|
18
|
-
kind: "json";
|
|
19
|
-
value: Json$2;
|
|
20
|
-
} | {
|
|
21
|
-
kind: "rows";
|
|
22
|
-
rows: Record<string, Json$2>[];
|
|
23
|
-
columns: Column[];
|
|
24
|
-
} | {
|
|
25
|
-
kind: "registered";
|
|
26
|
-
format: string;
|
|
27
|
-
value: Json$2;
|
|
28
|
-
};
|
|
29
|
-
type Column = {
|
|
30
|
-
id: string;
|
|
31
|
-
label: string;
|
|
32
|
-
path: string;
|
|
33
|
-
visible: boolean;
|
|
34
|
-
exportable?: boolean;
|
|
35
|
-
classification?: "ordinary" | "secret" | "credential";
|
|
36
|
-
/** Declared field shape suitable for a projected table-schema export. */
|
|
37
|
-
schema?: {
|
|
38
|
-
dataType?: string;
|
|
39
|
-
order?: number;
|
|
40
|
-
required?: boolean;
|
|
41
|
-
defaultValue?: Json$2;
|
|
42
|
-
validation?: Json$2;
|
|
43
|
-
metadata?: Json$2;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
8
|
+
|
|
46
9
|
type ExportProjection = {
|
|
47
10
|
rules: {
|
|
48
11
|
target: "payload" | "row";
|
|
@@ -315,17 +278,6 @@ declare function assembleAgentPayload(input: AgentPayloadInput, environment?: Ag
|
|
|
315
278
|
bodyOffset: number;
|
|
316
279
|
};
|
|
317
280
|
|
|
318
|
-
declare class ContentTransferError extends Error {
|
|
319
|
-
readonly code: string;
|
|
320
|
-
readonly path: string | undefined;
|
|
321
|
-
constructor(code: string, message: string, path?: string);
|
|
322
|
-
/**
|
|
323
|
-
* One error class across every loaded copy: while `@ai-matrx/kit/content-transfer`
|
|
324
|
-
* still bundles this module for its not-yet-repointed consumers (ALC-16), an
|
|
325
|
-
* error raised by one copy is `instanceof` the other.
|
|
326
|
-
*/
|
|
327
|
-
static [Symbol.hasInstance](value: unknown): boolean;
|
|
328
|
-
}
|
|
329
281
|
/** A realm-wide brand (Symbol.for), so a binding made by one loaded copy is recognised by another. */
|
|
330
282
|
declare const bound: unique symbol;
|
|
331
283
|
type BoundAllMatching = {
|
|
@@ -335,10 +287,6 @@ type BoundAllMatching = {
|
|
|
335
287
|
readonly columns: readonly Column[];
|
|
336
288
|
readonly limits?: TransferLimits;
|
|
337
289
|
};
|
|
338
|
-
type NormalizeTransferJsonOptions = {
|
|
339
|
-
omitUndefinedObjectProperties?: boolean;
|
|
340
|
-
};
|
|
341
|
-
declare function normalizeTransferJson(value: unknown, options?: NormalizeTransferJsonOptions): Json$2;
|
|
342
290
|
/** Column ids are identities, never an alternative data address. */
|
|
343
291
|
declare function readTransferCell(row: Record<string, Json$2>, column: Column): Json$2 | undefined;
|
|
344
292
|
declare function projectSnapshot(raw: RawSnapshot, projection: ExportProjection): Snapshot;
|
|
@@ -571,6 +519,8 @@ interface SurfaceDeclaration {
|
|
|
571
519
|
configNamespaces?: readonly ConfigNamespaceDeclaration[];
|
|
572
520
|
evidenceSources?: readonly EvidenceSourceDeclaration[];
|
|
573
521
|
skipBaselineValues?: boolean;
|
|
522
|
+
/** Opt out of the host's baseline item types (`baselineItemTypes`, e.g. `TABLE_ROW_ITEM_TYPE`). */
|
|
523
|
+
skipBaselineItemTypes?: boolean;
|
|
574
524
|
}
|
|
575
525
|
type ValueProvenance = {
|
|
576
526
|
kind: "own";
|
|
@@ -1347,6 +1297,22 @@ interface Delivery {
|
|
|
1347
1297
|
send(artifact: SealedArtifact, to: WriteTargetRef, via: "destination"): Promise<Receipt>;
|
|
1348
1298
|
}
|
|
1349
1299
|
|
|
1300
|
+
/**
|
|
1301
|
+
* Reasoning ("thinking") blocks in model output. A copy of an answer leaves them out by default;
|
|
1302
|
+
* the menu's "Copy including thinking" variant puts them back (`stripThinking` prop of
|
|
1303
|
+
* `MatrxCopyMenu`). Pure and tiny: no engine is loaded.
|
|
1304
|
+
*
|
|
1305
|
+
* Same contract as print's `removeThinkingContent` — `thinking.test.ts` runs both over one corpus
|
|
1306
|
+
* so the two cannot drift apart.
|
|
1307
|
+
*/
|
|
1308
|
+
/** Does this content carry any reasoning block? */
|
|
1309
|
+
declare function hasThinking(text: string): boolean;
|
|
1310
|
+
/**
|
|
1311
|
+
* The content without its reasoning blocks. A block between blank lines (its own paragraph) leaves two
|
|
1312
|
+
* paragraphs; a block inside a paragraph collapses to one line break; three or more newlines collapse to two.
|
|
1313
|
+
*/
|
|
1314
|
+
declare function stripThinking(text: string): string;
|
|
1315
|
+
|
|
1350
1316
|
/**
|
|
1351
1317
|
* Operate formats — one adapter per format, stable ids, synchronous eligibility, lazy engines
|
|
1352
1318
|
* (Matrx Alchemy CONTRACT §1.9 / §2.3, ALC-16).
|
|
@@ -1591,4 +1557,4 @@ declare function setPersonDefaultRecipe(ports: Pick<AlchemyHostPorts, "persisten
|
|
|
1591
1557
|
[key: string]: Json;
|
|
1592
1558
|
} | null): Promise<void>;
|
|
1593
1559
|
|
|
1594
|
-
export { type AgentPayloadEnvironment, type AgentPayloadInput, type AiPreparation, type Artifact, type BoundAllMatching, type BuiltInFormatId, type CannotApply, type CapturedAllMatching, type CapturedSource, type
|
|
1560
|
+
export { type AgentPayloadEnvironment, type AgentPayloadInput, type AiPreparation, type Artifact, type BoundAllMatching, type BuiltInFormatId, type CannotApply, type CapturedAllMatching, type CapturedSource, type Coverage, type Delivery, type DeliveryOutcome, type Draft, DuplicateWriteHandlerError, EMPTY_STRUCTURE, type ExportPage, type ExportProjection, FORMAT_ADAPTERS, type FormatAdapter, type FormatEngine, type FormatOptions, type NodeLimit, type Notice, type Omission, type OutputSpan, type PageAction, type PreparationOptions, type PreparationSession, type QuerySnapshot, type RawSnapshot, type Receipt, type RecipeOrigin, type ResolvedRecipe, type SealedArtifact, type Section, type SectionLayout, type ServerOperation, type Snapshot, type Source, type SpanMap, type StructureRecipe, type SurfaceHandle, TRANSFER_DEFAULT_RECIPE_SETTING, type TransferLimits, type TransferOperation, type TransferOutcome, type TransferPreferenceOverrides, type TransferPreferences, type TransferScope, type TransferSurfaceDeclaration, type TransferTarget, type Transform, type Transport, type WriteApplyRequest, type WriteCaller, type WriteDoor, type WriteDoorDeclarations, type WriteDoorPorts, type WriteHandler, type WriteHandlerResult, type WriteOp, type WriteRefusalReason, type WriteRequest, type WriteReviewPort, type WriteTargetRef, agentPayloadWithSpans, applyJsonStructure, applySectionSelection, applySectionStructure, applyStructureToJson, applyTransferLimits, assembleAgentPayload, buildAgentPayload, capture, collectAllMatching, concretePointers, createBrowserTransport, createDelivery, createDraft, createSurfaceTransferHandle, createWriteDoor, deriveDraft, directSource, displayPath, editDraft, eligibleFormats, exportedColumns, extensionForLanguage, fenceJsonBlock, formatAdapter, hasThinking, isProseSection, isSealed, joinPointer, jsonSize, jsonTextSpans, nodeChars, offsetSpans, openPreparation, outputPointer, patternBelow, patternCovers, patternMatches, pointerSegments, projectSnapshot, readTransferCell, recipeKey, reduceJson, refreshDraft, resetDraft, resolveDefaultRecipe, resolveTransferPreferences, resolveTransferRegistry, sealArtifact, sealDraft, sealTransferArtifact, sectionLayout, serialize, setPersonDefaultRecipe, sourceChanged, spanMap, stripThinking, stubText, transformRows, undoDraft };
|