yaml-flow 5.4.0 → 6.0.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/board-live-cards-cli.js +2 -2
- package/board-livecards-server-runtime.js +488 -551
- package/browser/asset-integrity.json +10 -0
- package/browser/board-livecards-runtime-client.js +0 -6
- package/browser/board-livegraph-engine.js +2 -1676
- package/browser/board-livegraph-engine.js.map +1 -1
- package/browser/live-cards.js +347 -26
- package/browser/live-cards.schema.json +418 -132
- package/card-store.js +37 -0
- package/dist/batch/index.cjs +1 -108
- package/dist/batch/index.cjs.map +1 -1
- package/dist/batch/index.js +1 -106
- package/dist/batch/index.js.map +1 -1
- package/dist/board-live-cards-lib-Bg6EvCo5.d.cts +136 -0
- package/dist/board-live-cards-lib-jM2uYG1v.d.ts +136 -0
- package/dist/board-live-cards-public-CltXYgaY.d.cts +314 -0
- package/dist/board-live-cards-public-f-E-FAyp.d.ts +314 -0
- package/dist/board-livegraph-runtime/index.cjs +2 -1671
- package/dist/board-livegraph-runtime/index.cjs.map +1 -1
- package/dist/board-livegraph-runtime/index.d.cts +1 -2
- package/dist/board-livegraph-runtime/index.d.ts +1 -2
- package/dist/board-livegraph-runtime/index.js +2 -1662
- package/dist/board-livegraph-runtime/index.js.map +1 -1
- package/dist/board-livegraph-runtime/jsonata-sync.cjs +7587 -0
- package/dist/card-compute/index.cjs +9 -7159
- package/dist/card-compute/index.cjs.map +1 -1
- package/dist/card-compute/index.d.cts +22 -0
- package/dist/card-compute/index.d.ts +22 -0
- package/dist/card-compute/index.js +9 -7145
- package/dist/card-compute/index.js.map +1 -1
- package/dist/card-compute/jsonata-sync.cjs +7587 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.cjs +2 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.cjs.map +1 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.d.cts +24 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.d.ts +24 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.js +2 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.js.map +1 -0
- package/dist/cli/browser-api/card-store-browser-api.cjs +2 -0
- package/dist/cli/browser-api/card-store-browser-api.cjs.map +1 -0
- package/dist/cli/browser-api/card-store-browser-api.d.cts +26 -0
- package/dist/cli/browser-api/card-store-browser-api.d.ts +26 -0
- package/dist/cli/browser-api/card-store-browser-api.js +2 -0
- package/dist/cli/browser-api/card-store-browser-api.js.map +1 -0
- package/dist/cli/browser-api/jsonata-sync.cjs +7587 -0
- package/dist/cli/node/artifacts-store-cli.cjs +11 -0
- package/dist/cli/node/artifacts-store-cli.cjs.map +1 -0
- package/dist/cli/node/artifacts-store-cli.d.cts +8 -0
- package/dist/cli/node/artifacts-store-cli.d.ts +8 -0
- package/dist/cli/node/artifacts-store-cli.js +11 -0
- package/dist/cli/node/artifacts-store-cli.js.map +1 -0
- package/dist/cli/node/board-live-cards-cli.cjs +15 -0
- package/dist/cli/node/board-live-cards-cli.cjs.map +1 -0
- package/dist/cli/node/board-live-cards-cli.d.cts +20 -0
- package/dist/cli/node/board-live-cards-cli.d.ts +20 -0
- package/dist/cli/node/board-live-cards-cli.js +15 -0
- package/dist/cli/node/board-live-cards-cli.js.map +1 -0
- package/dist/cli/node/card-store-cli.cjs +8 -0
- package/dist/cli/node/card-store-cli.cjs.map +1 -0
- package/dist/cli/node/card-store-cli.d.cts +15 -0
- package/dist/cli/node/card-store-cli.d.ts +15 -0
- package/dist/cli/node/card-store-cli.js +8 -0
- package/dist/cli/node/card-store-cli.js.map +1 -0
- package/dist/cli/node/fs-board-adapter.cjs +14 -0
- package/dist/cli/node/fs-board-adapter.cjs.map +1 -0
- package/dist/cli/node/fs-board-adapter.d.cts +204 -0
- package/dist/cli/node/fs-board-adapter.d.ts +204 -0
- package/dist/cli/node/fs-board-adapter.js +14 -0
- package/dist/cli/node/fs-board-adapter.js.map +1 -0
- package/dist/cli/node/jsonata-sync.cjs +7587 -0
- package/dist/cli/node/source-cli-task-executor.cjs +11 -0
- package/dist/cli/node/source-cli-task-executor.cjs.map +1 -0
- package/dist/cli/node/source-cli-task-executor.d.cts +1 -0
- package/dist/cli/node/source-cli-task-executor.d.ts +1 -0
- package/dist/cli/node/source-cli-task-executor.js +11 -0
- package/dist/cli/node/source-cli-task-executor.js.map +1 -0
- package/dist/config/index.cjs +1 -79
- package/dist/config/index.cjs.map +1 -1
- package/dist/config/index.js +1 -76
- package/dist/config/index.js.map +1 -1
- package/dist/continuous-event-graph/index.cjs +2 -2129
- package/dist/continuous-event-graph/index.cjs.map +1 -1
- package/dist/continuous-event-graph/index.d.cts +81 -5
- package/dist/continuous-event-graph/index.d.ts +81 -5
- package/dist/continuous-event-graph/index.js +2 -2088
- package/dist/continuous-event-graph/index.js.map +1 -1
- package/dist/continuous-event-graph/jsonata-sync.cjs +7587 -0
- package/dist/event-graph/index.cjs +22 -8292
- package/dist/event-graph/index.cjs.map +1 -1
- package/dist/event-graph/index.js +22 -8237
- package/dist/event-graph/index.js.map +1 -1
- package/dist/execution-refs.cjs +2 -0
- package/dist/execution-refs.cjs.map +1 -0
- package/dist/execution-refs.d.cts +222 -0
- package/dist/execution-refs.d.ts +222 -0
- package/dist/execution-refs.js +2 -0
- package/dist/execution-refs.js.map +1 -0
- package/dist/index.cjs +29 -13221
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +29 -13112
- package/dist/index.js.map +1 -1
- package/dist/inference/index.cjs +5 -617
- package/dist/inference/index.cjs.map +1 -1
- package/dist/inference/index.js +5 -610
- package/dist/inference/index.js.map +1 -1
- package/dist/jsonata-sync.cjs +7587 -0
- package/dist/{live-cards-bridge-x5XREkXm.d.cts → live-cards-bridge-BXbVTsna.d.cts} +27 -4
- package/dist/{live-cards-bridge-EQjytzI_.d.ts → live-cards-bridge-Ds28XR15.d.ts} +27 -4
- package/dist/pycli/quickjs-board-runtime.global.js +9 -0
- package/dist/pycli/quickjs-board-runtime.global.js.map +1 -0
- package/dist/pycli/quickjs-step-machine-runtime.global.js +5 -0
- package/dist/pycli/quickjs-step-machine-runtime.global.js.map +1 -0
- package/dist/step-machine/index.cjs +11 -7129
- package/dist/step-machine/index.cjs.map +1 -1
- package/dist/step-machine/index.js +11 -7113
- package/dist/step-machine/index.js.map +1 -1
- package/dist/storage-refs.cjs +10 -0
- package/dist/storage-refs.cjs.map +1 -0
- package/dist/storage-refs.d.cts +92 -0
- package/dist/storage-refs.d.ts +92 -0
- package/dist/storage-refs.js +10 -0
- package/dist/storage-refs.js.map +1 -0
- package/dist/stores/file.cjs +1 -114
- package/dist/stores/file.cjs.map +1 -1
- package/dist/stores/file.js +1 -112
- package/dist/stores/file.js.map +1 -1
- package/dist/stores/index.cjs +1 -231
- package/dist/stores/index.cjs.map +1 -1
- package/dist/stores/index.js +1 -227
- package/dist/stores/index.js.map +1 -1
- package/dist/stores/localStorage.cjs +1 -76
- package/dist/stores/localStorage.cjs.map +1 -1
- package/dist/stores/localStorage.js +1 -74
- package/dist/stores/localStorage.js.map +1 -1
- package/dist/stores/memory.cjs +1 -47
- package/dist/stores/memory.cjs.map +1 -1
- package/dist/stores/memory.js +1 -45
- package/dist/stores/memory.js.map +1 -1
- package/examples/browser/boards/portfolio-tracker/portfolio-t4.js +292 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-fetch-prices.js +218 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-fetch-prices.py +201 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-inference-adapter.js +25 -16
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-public.js +553 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker.py +365 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/--base-ref/.runtime-out +1 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/--base-ref/board-graph.json +32 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/_board-cli.js +53 -1
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/add-cards-cli.js +15 -6
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/init-board-cli.js +6 -1
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/poll-status-cli.js +57 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/retrigger-cli.js +1 -1
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/status-cli.js +1 -1
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/update-holdings-cli.js +7 -2
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/wait-completed-cli.js +6 -2
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/_board_pycli.py +97 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/add-cards.py +50 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/init-board.py +44 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/poll-status.py +70 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/reset-board-dir.py +36 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/inline-python-demo.flow.yaml +26 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/inline-python-handlers.py +39 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker-pycli.flow.yaml +80 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml +25 -172
- package/examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.input.json +40 -34
- package/examples/cli/step-machine-cli/portfolio-tracker/run-inline-python-demo-pycli.py +46 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/run-portfolio-tracker-pycli.py +77 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/run-portfolio-tracker.bat +1 -2
- package/examples/example-board/agent-instructions.md +11 -5
- package/examples/example-board/demo-chat-handler.js +14 -4
- package/examples/example-board/demo-server-config.json +1 -0
- package/examples/example-board/demo-server.js +19 -34
- package/examples/example-board/demo-shell-browser.html +5 -4
- package/examples/example-board/demo-shell-with-server.html +10 -6
- package/examples/example-board/demo-task-executor.js +81 -35
- package/examples/index.html +0 -14
- package/examples/step-machine-cli/portfolio-tracker/handlers/_board-cli.js +0 -1
- package/examples/step-machine-cli/portfolio-tracker/run-portfolio-tracker.bat +1 -2
- package/package.json +39 -3
- package/schema/live-cards.schema.json +418 -132
- package/dist/cli/board-live-cards-cli.cjs +0 -10644
- package/dist/cli/board-live-cards-cli.cjs.map +0 -1
- package/dist/cli/board-live-cards-cli.d.cts +0 -179
- package/dist/cli/board-live-cards-cli.d.ts +0 -179
- package/dist/cli/board-live-cards-cli.js +0 -10592
- package/dist/cli/board-live-cards-cli.js.map +0 -1
- package/dist/journal-9HEgs7dU.d.ts +0 -28
- package/dist/journal-B-JCfQnh.d.cts +0 -28
- package/dist/schedule-Cszq9LYY.d.ts +0 -21
- package/dist/schedule-qWNL0RQh.d.cts +0 -21
- package/examples/browser/boards/portfolio-tracker/cards/holdings-table.json +0 -22
- package/examples/browser/boards/portfolio-tracker/cards/portfolio-form.json +0 -16
- package/examples/browser/boards/portfolio-tracker/cards/portfolio-risk-assessment.json +0 -28
- package/examples/browser/boards/portfolio-tracker/cards/portfolio-value.json +0 -15
- package/examples/browser/boards/portfolio-tracker/cards/price-fetch.json +0 -15
- package/examples/browser/boards/portfolio-tracker/cards/rebalancing-strategy.json +0 -28
- package/examples/browser/boards/portfolio-tracker/fetch-prices.js +0 -43
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-task-executor.cjs +0 -96
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker.bat +0 -7
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker.js +0 -351
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { C as CommandInput, a as CommandResult, b as BlobStorage, K as KindValueRef, c as BoardNonCorePlatformAdapter, B as BoardPlatformAdapter } from '../../board-live-cards-public-CltXYgaY.cjs';
|
|
2
|
+
export { d as BoardLiveCardsNonCorePublic, e as BoardLiveCardsPublic, f as createBoardLiveCardsNonCorePublic, g as createBoardLiveCardsPublic, p as parseRef, s as serializeRef } from '../../board-live-cards-public-CltXYgaY.cjs';
|
|
3
|
+
import { C as CardAdminStore, L as LiveCard } from '../../board-live-cards-lib-Bg6EvCo5.cjs';
|
|
4
|
+
export { a as BOARD_GRAPH_KEY, E as EMPTY_CONFIG, S as SNAPSHOT_SCHEMA_VERSION_V1, c as createCardStore } from '../../board-live-cards-lib-Bg6EvCo5.cjs';
|
|
5
|
+
import '../../execution-refs.cjs';
|
|
6
|
+
import '../../types-BBhqYGhE.cjs';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* card-store-lib-public.ts
|
|
10
|
+
*
|
|
11
|
+
* Platform-free public API for card store read/write operations.
|
|
12
|
+
*
|
|
13
|
+
* Follows the same CommandInput / CommandResult convention as
|
|
14
|
+
* board-live-cards-public.ts. No platform code here — inject a
|
|
15
|
+
* CardAdminStore built from your platform adapter.
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* import { createCardStorePublic } from './card-store-lib-public.js';
|
|
19
|
+
* import { createCardStore } from './board-live-cards-lib.js';
|
|
20
|
+
* import { createFsCardStorageAdapter } from '../node/storage-fs-adapters.js';
|
|
21
|
+
*
|
|
22
|
+
* const store = createCardStorePublic(
|
|
23
|
+
* createCardStore(createFsCardStorageAdapter(dir))
|
|
24
|
+
* );
|
|
25
|
+
* const result = store.set({ body: card }); // write one card
|
|
26
|
+
* const result = store.set({ body: [c1, c2] }); // write many
|
|
27
|
+
* const result = store.get({ params: { id: 'x' } });
|
|
28
|
+
* const result = store.del({ body: { ids: ['x', 'y'] } });
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
interface CardStorePublic {
|
|
32
|
+
/** Read one card (params.id) or all cards. */
|
|
33
|
+
get(input: CommandInput): CommandResult<{
|
|
34
|
+
cards: LiveCard[];
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Write cards into the store.
|
|
38
|
+
* body: single card object { id, ... } or an array of card objects.
|
|
39
|
+
*/
|
|
40
|
+
set(input: CommandInput): CommandResult<{
|
|
41
|
+
count: number;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Delete cards by ID.
|
|
45
|
+
* body.ids: string[] — delete several cards at once
|
|
46
|
+
* params.id: string — delete a single card (alternative, can combine with body.ids)
|
|
47
|
+
*/
|
|
48
|
+
del(input: CommandInput): CommandResult<{
|
|
49
|
+
count: number;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Patch one card using dot-path assignment.
|
|
53
|
+
* params.id: string
|
|
54
|
+
* params.path: dot path (e.g. "card_data.form.name")
|
|
55
|
+
* body.value: value to assign (or body itself if value is omitted)
|
|
56
|
+
*/
|
|
57
|
+
patch(input: CommandInput): CommandResult<{
|
|
58
|
+
count: number;
|
|
59
|
+
}>;
|
|
60
|
+
}
|
|
61
|
+
declare function createCardStorePublic(store: CardAdminStore): CardStorePublic;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* artifacts-store-lib.ts
|
|
65
|
+
*
|
|
66
|
+
* Backend-neutral artifact store built on BlobStorage.
|
|
67
|
+
* Supports text + binary content, CRUD, listing, and lightweight metadata.
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
interface ArtifactInfo {
|
|
71
|
+
key: string;
|
|
72
|
+
size?: number;
|
|
73
|
+
updatedAt?: string;
|
|
74
|
+
contentType?: string;
|
|
75
|
+
}
|
|
76
|
+
interface ArtifactsStore {
|
|
77
|
+
exists(key: string): boolean;
|
|
78
|
+
putText(key: string, content: string, contentType?: string): ArtifactInfo;
|
|
79
|
+
putBytes(key: string, content: Uint8Array, contentType?: string): ArtifactInfo;
|
|
80
|
+
getText(key: string): string | null;
|
|
81
|
+
getBytes(key: string): Uint8Array | null;
|
|
82
|
+
head(key: string): ArtifactInfo | null;
|
|
83
|
+
list(prefix?: string): ArtifactInfo[];
|
|
84
|
+
remove(key: string): void;
|
|
85
|
+
}
|
|
86
|
+
interface ChatIndexRecord {
|
|
87
|
+
serial: number;
|
|
88
|
+
role: string;
|
|
89
|
+
stored_name: string;
|
|
90
|
+
path: string;
|
|
91
|
+
updated_at?: string | null;
|
|
92
|
+
}
|
|
93
|
+
interface ChatRecord extends ChatIndexRecord {
|
|
94
|
+
text: string;
|
|
95
|
+
}
|
|
96
|
+
interface ChatSignal {
|
|
97
|
+
count: number;
|
|
98
|
+
latest_mtime_ms: number;
|
|
99
|
+
processing: boolean;
|
|
100
|
+
}
|
|
101
|
+
interface ChatArtifactsStore {
|
|
102
|
+
indexKey(cardPrefix: string): string;
|
|
103
|
+
loadIndex(cardPrefix: string): ChatIndexRecord[];
|
|
104
|
+
saveIndex(cardPrefix: string, records: ChatIndexRecord[]): void;
|
|
105
|
+
nextSerial(cardPrefix: string): number;
|
|
106
|
+
appendIndexRecord(cardPrefix: string, record: ChatIndexRecord): void;
|
|
107
|
+
readRecords(cardPrefix: string): ChatRecord[];
|
|
108
|
+
clear(cardPrefix: string): void;
|
|
109
|
+
readSignal(cardPrefix: string): ChatSignal;
|
|
110
|
+
}
|
|
111
|
+
interface FileArtifactsStore {
|
|
112
|
+
nextSerial(cardPrefix: string, seedNames?: string[]): number;
|
|
113
|
+
buildStoredName(displayName: string, serial: number, opts?: {
|
|
114
|
+
maxLen?: number;
|
|
115
|
+
}): string;
|
|
116
|
+
allocateStoredName(cardPrefix: string, displayName: string, opts?: {
|
|
117
|
+
seedNames?: string[];
|
|
118
|
+
maxLen?: number;
|
|
119
|
+
}): string;
|
|
120
|
+
}
|
|
121
|
+
interface CardFileMetadata {
|
|
122
|
+
name: string;
|
|
123
|
+
stored_name: string;
|
|
124
|
+
size: number | null;
|
|
125
|
+
mime_type: string | null;
|
|
126
|
+
path: string | null;
|
|
127
|
+
uploaded_at: string | null;
|
|
128
|
+
}
|
|
129
|
+
type CardFileLookupResult = {
|
|
130
|
+
ok: true;
|
|
131
|
+
file: CardFileMetadata;
|
|
132
|
+
} | {
|
|
133
|
+
ok: false;
|
|
134
|
+
reason: 'index_out_of_range' | 'missing_stored_name' | 'stale_reference';
|
|
135
|
+
};
|
|
136
|
+
interface CardFileMetadataStore {
|
|
137
|
+
read(cardData: unknown): CardFileMetadata[];
|
|
138
|
+
normalizeIncoming(payloadFiles: unknown, defaultUploadedAt?: string): CardFileMetadata[];
|
|
139
|
+
merge(cardData: Record<string, unknown>, incoming: CardFileMetadata[]): CardFileMetadata[];
|
|
140
|
+
resolve(cardData: unknown, index: number, expectedStoredName?: string | null): CardFileLookupResult;
|
|
141
|
+
}
|
|
142
|
+
declare function createArtifactsStore(blob: BlobStorage): ArtifactsStore;
|
|
143
|
+
declare function createChatArtifactsStore(store: ArtifactsStore, opts?: {
|
|
144
|
+
indexFileName?: string;
|
|
145
|
+
}): ChatArtifactsStore;
|
|
146
|
+
declare function createFileArtifactsStore(store: ArtifactsStore): FileArtifactsStore;
|
|
147
|
+
declare function createCardFileMetadataStore(): CardFileMetadataStore;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* artifacts-store-lib-public.ts
|
|
151
|
+
*
|
|
152
|
+
* Public API wrapper for ArtifactsStore, following CommandInput/CommandResult.
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
interface ArtifactsStorePublic {
|
|
156
|
+
list(input: CommandInput): CommandResult<{
|
|
157
|
+
artifacts: ArtifactInfo[];
|
|
158
|
+
}>;
|
|
159
|
+
head(input: CommandInput): CommandResult<{
|
|
160
|
+
artifact: ArtifactInfo | null;
|
|
161
|
+
}>;
|
|
162
|
+
put(input: CommandInput): CommandResult<{
|
|
163
|
+
artifact: ArtifactInfo;
|
|
164
|
+
}>;
|
|
165
|
+
get(input: CommandInput): CommandResult<{
|
|
166
|
+
key: string;
|
|
167
|
+
contentType?: string;
|
|
168
|
+
size?: number;
|
|
169
|
+
text?: string;
|
|
170
|
+
bytes?: number[];
|
|
171
|
+
}>;
|
|
172
|
+
del(input: CommandInput): CommandResult<{
|
|
173
|
+
ok: true;
|
|
174
|
+
}>;
|
|
175
|
+
}
|
|
176
|
+
declare function createArtifactsStorePublic(store: ArtifactsStore): ArtifactsStorePublic;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* fs-board-adapter.ts
|
|
180
|
+
*
|
|
181
|
+
* Wires Node.js / FS platform adapters into BoardPlatformAdapter and
|
|
182
|
+
* BoardNonCorePlatformAdapter, and provides FS-specific board utility functions.
|
|
183
|
+
*
|
|
184
|
+
* Everything in the board-live-cards system that is platform-free lives in
|
|
185
|
+
* src/cli/common/. All FS / Node.js / process concerns live here.
|
|
186
|
+
*
|
|
187
|
+
* Re-exports the full public API so consumers only need to import from this file.
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
declare function createFsBoardPlatformAdapter(baseRef: KindValueRef, cliDir: string, opts?: {
|
|
191
|
+
onWarn?: (msg: string) => void;
|
|
192
|
+
suppressSpawn?: boolean;
|
|
193
|
+
notifyChannel?: string;
|
|
194
|
+
}): BoardPlatformAdapter;
|
|
195
|
+
declare function createFsBoardNonCorePlatformAdapter(baseRef: KindValueRef, cliDir: string, opts?: {
|
|
196
|
+
onWarn?: (msg: string) => void;
|
|
197
|
+
}): BoardNonCorePlatformAdapter;
|
|
198
|
+
/**
|
|
199
|
+
* Extract the serialized board ref from a source token (which has a `br` field).
|
|
200
|
+
* Returns null for callback tokens (which don't carry a board ref).
|
|
201
|
+
*/
|
|
202
|
+
declare function decodeBoardRefFromToken(token: string): string | null;
|
|
203
|
+
|
|
204
|
+
export { BoardNonCorePlatformAdapter, BoardPlatformAdapter, CommandInput, CommandResult, KindValueRef, LiveCard, createArtifactsStore, createArtifactsStorePublic, createCardFileMetadataStore, createCardStorePublic, createChatArtifactsStore, createFileArtifactsStore, createFsBoardNonCorePlatformAdapter, createFsBoardPlatformAdapter, decodeBoardRefFromToken };
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { C as CommandInput, a as CommandResult, b as BlobStorage, K as KindValueRef, c as BoardNonCorePlatformAdapter, B as BoardPlatformAdapter } from '../../board-live-cards-public-f-E-FAyp.js';
|
|
2
|
+
export { d as BoardLiveCardsNonCorePublic, e as BoardLiveCardsPublic, f as createBoardLiveCardsNonCorePublic, g as createBoardLiveCardsPublic, p as parseRef, s as serializeRef } from '../../board-live-cards-public-f-E-FAyp.js';
|
|
3
|
+
import { C as CardAdminStore, L as LiveCard } from '../../board-live-cards-lib-jM2uYG1v.js';
|
|
4
|
+
export { a as BOARD_GRAPH_KEY, E as EMPTY_CONFIG, S as SNAPSHOT_SCHEMA_VERSION_V1, c as createCardStore } from '../../board-live-cards-lib-jM2uYG1v.js';
|
|
5
|
+
import '../../execution-refs.js';
|
|
6
|
+
import '../../types-BBhqYGhE.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* card-store-lib-public.ts
|
|
10
|
+
*
|
|
11
|
+
* Platform-free public API for card store read/write operations.
|
|
12
|
+
*
|
|
13
|
+
* Follows the same CommandInput / CommandResult convention as
|
|
14
|
+
* board-live-cards-public.ts. No platform code here — inject a
|
|
15
|
+
* CardAdminStore built from your platform adapter.
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* import { createCardStorePublic } from './card-store-lib-public.js';
|
|
19
|
+
* import { createCardStore } from './board-live-cards-lib.js';
|
|
20
|
+
* import { createFsCardStorageAdapter } from '../node/storage-fs-adapters.js';
|
|
21
|
+
*
|
|
22
|
+
* const store = createCardStorePublic(
|
|
23
|
+
* createCardStore(createFsCardStorageAdapter(dir))
|
|
24
|
+
* );
|
|
25
|
+
* const result = store.set({ body: card }); // write one card
|
|
26
|
+
* const result = store.set({ body: [c1, c2] }); // write many
|
|
27
|
+
* const result = store.get({ params: { id: 'x' } });
|
|
28
|
+
* const result = store.del({ body: { ids: ['x', 'y'] } });
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
interface CardStorePublic {
|
|
32
|
+
/** Read one card (params.id) or all cards. */
|
|
33
|
+
get(input: CommandInput): CommandResult<{
|
|
34
|
+
cards: LiveCard[];
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Write cards into the store.
|
|
38
|
+
* body: single card object { id, ... } or an array of card objects.
|
|
39
|
+
*/
|
|
40
|
+
set(input: CommandInput): CommandResult<{
|
|
41
|
+
count: number;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Delete cards by ID.
|
|
45
|
+
* body.ids: string[] — delete several cards at once
|
|
46
|
+
* params.id: string — delete a single card (alternative, can combine with body.ids)
|
|
47
|
+
*/
|
|
48
|
+
del(input: CommandInput): CommandResult<{
|
|
49
|
+
count: number;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Patch one card using dot-path assignment.
|
|
53
|
+
* params.id: string
|
|
54
|
+
* params.path: dot path (e.g. "card_data.form.name")
|
|
55
|
+
* body.value: value to assign (or body itself if value is omitted)
|
|
56
|
+
*/
|
|
57
|
+
patch(input: CommandInput): CommandResult<{
|
|
58
|
+
count: number;
|
|
59
|
+
}>;
|
|
60
|
+
}
|
|
61
|
+
declare function createCardStorePublic(store: CardAdminStore): CardStorePublic;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* artifacts-store-lib.ts
|
|
65
|
+
*
|
|
66
|
+
* Backend-neutral artifact store built on BlobStorage.
|
|
67
|
+
* Supports text + binary content, CRUD, listing, and lightweight metadata.
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
interface ArtifactInfo {
|
|
71
|
+
key: string;
|
|
72
|
+
size?: number;
|
|
73
|
+
updatedAt?: string;
|
|
74
|
+
contentType?: string;
|
|
75
|
+
}
|
|
76
|
+
interface ArtifactsStore {
|
|
77
|
+
exists(key: string): boolean;
|
|
78
|
+
putText(key: string, content: string, contentType?: string): ArtifactInfo;
|
|
79
|
+
putBytes(key: string, content: Uint8Array, contentType?: string): ArtifactInfo;
|
|
80
|
+
getText(key: string): string | null;
|
|
81
|
+
getBytes(key: string): Uint8Array | null;
|
|
82
|
+
head(key: string): ArtifactInfo | null;
|
|
83
|
+
list(prefix?: string): ArtifactInfo[];
|
|
84
|
+
remove(key: string): void;
|
|
85
|
+
}
|
|
86
|
+
interface ChatIndexRecord {
|
|
87
|
+
serial: number;
|
|
88
|
+
role: string;
|
|
89
|
+
stored_name: string;
|
|
90
|
+
path: string;
|
|
91
|
+
updated_at?: string | null;
|
|
92
|
+
}
|
|
93
|
+
interface ChatRecord extends ChatIndexRecord {
|
|
94
|
+
text: string;
|
|
95
|
+
}
|
|
96
|
+
interface ChatSignal {
|
|
97
|
+
count: number;
|
|
98
|
+
latest_mtime_ms: number;
|
|
99
|
+
processing: boolean;
|
|
100
|
+
}
|
|
101
|
+
interface ChatArtifactsStore {
|
|
102
|
+
indexKey(cardPrefix: string): string;
|
|
103
|
+
loadIndex(cardPrefix: string): ChatIndexRecord[];
|
|
104
|
+
saveIndex(cardPrefix: string, records: ChatIndexRecord[]): void;
|
|
105
|
+
nextSerial(cardPrefix: string): number;
|
|
106
|
+
appendIndexRecord(cardPrefix: string, record: ChatIndexRecord): void;
|
|
107
|
+
readRecords(cardPrefix: string): ChatRecord[];
|
|
108
|
+
clear(cardPrefix: string): void;
|
|
109
|
+
readSignal(cardPrefix: string): ChatSignal;
|
|
110
|
+
}
|
|
111
|
+
interface FileArtifactsStore {
|
|
112
|
+
nextSerial(cardPrefix: string, seedNames?: string[]): number;
|
|
113
|
+
buildStoredName(displayName: string, serial: number, opts?: {
|
|
114
|
+
maxLen?: number;
|
|
115
|
+
}): string;
|
|
116
|
+
allocateStoredName(cardPrefix: string, displayName: string, opts?: {
|
|
117
|
+
seedNames?: string[];
|
|
118
|
+
maxLen?: number;
|
|
119
|
+
}): string;
|
|
120
|
+
}
|
|
121
|
+
interface CardFileMetadata {
|
|
122
|
+
name: string;
|
|
123
|
+
stored_name: string;
|
|
124
|
+
size: number | null;
|
|
125
|
+
mime_type: string | null;
|
|
126
|
+
path: string | null;
|
|
127
|
+
uploaded_at: string | null;
|
|
128
|
+
}
|
|
129
|
+
type CardFileLookupResult = {
|
|
130
|
+
ok: true;
|
|
131
|
+
file: CardFileMetadata;
|
|
132
|
+
} | {
|
|
133
|
+
ok: false;
|
|
134
|
+
reason: 'index_out_of_range' | 'missing_stored_name' | 'stale_reference';
|
|
135
|
+
};
|
|
136
|
+
interface CardFileMetadataStore {
|
|
137
|
+
read(cardData: unknown): CardFileMetadata[];
|
|
138
|
+
normalizeIncoming(payloadFiles: unknown, defaultUploadedAt?: string): CardFileMetadata[];
|
|
139
|
+
merge(cardData: Record<string, unknown>, incoming: CardFileMetadata[]): CardFileMetadata[];
|
|
140
|
+
resolve(cardData: unknown, index: number, expectedStoredName?: string | null): CardFileLookupResult;
|
|
141
|
+
}
|
|
142
|
+
declare function createArtifactsStore(blob: BlobStorage): ArtifactsStore;
|
|
143
|
+
declare function createChatArtifactsStore(store: ArtifactsStore, opts?: {
|
|
144
|
+
indexFileName?: string;
|
|
145
|
+
}): ChatArtifactsStore;
|
|
146
|
+
declare function createFileArtifactsStore(store: ArtifactsStore): FileArtifactsStore;
|
|
147
|
+
declare function createCardFileMetadataStore(): CardFileMetadataStore;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* artifacts-store-lib-public.ts
|
|
151
|
+
*
|
|
152
|
+
* Public API wrapper for ArtifactsStore, following CommandInput/CommandResult.
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
interface ArtifactsStorePublic {
|
|
156
|
+
list(input: CommandInput): CommandResult<{
|
|
157
|
+
artifacts: ArtifactInfo[];
|
|
158
|
+
}>;
|
|
159
|
+
head(input: CommandInput): CommandResult<{
|
|
160
|
+
artifact: ArtifactInfo | null;
|
|
161
|
+
}>;
|
|
162
|
+
put(input: CommandInput): CommandResult<{
|
|
163
|
+
artifact: ArtifactInfo;
|
|
164
|
+
}>;
|
|
165
|
+
get(input: CommandInput): CommandResult<{
|
|
166
|
+
key: string;
|
|
167
|
+
contentType?: string;
|
|
168
|
+
size?: number;
|
|
169
|
+
text?: string;
|
|
170
|
+
bytes?: number[];
|
|
171
|
+
}>;
|
|
172
|
+
del(input: CommandInput): CommandResult<{
|
|
173
|
+
ok: true;
|
|
174
|
+
}>;
|
|
175
|
+
}
|
|
176
|
+
declare function createArtifactsStorePublic(store: ArtifactsStore): ArtifactsStorePublic;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* fs-board-adapter.ts
|
|
180
|
+
*
|
|
181
|
+
* Wires Node.js / FS platform adapters into BoardPlatformAdapter and
|
|
182
|
+
* BoardNonCorePlatformAdapter, and provides FS-specific board utility functions.
|
|
183
|
+
*
|
|
184
|
+
* Everything in the board-live-cards system that is platform-free lives in
|
|
185
|
+
* src/cli/common/. All FS / Node.js / process concerns live here.
|
|
186
|
+
*
|
|
187
|
+
* Re-exports the full public API so consumers only need to import from this file.
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
declare function createFsBoardPlatformAdapter(baseRef: KindValueRef, cliDir: string, opts?: {
|
|
191
|
+
onWarn?: (msg: string) => void;
|
|
192
|
+
suppressSpawn?: boolean;
|
|
193
|
+
notifyChannel?: string;
|
|
194
|
+
}): BoardPlatformAdapter;
|
|
195
|
+
declare function createFsBoardNonCorePlatformAdapter(baseRef: KindValueRef, cliDir: string, opts?: {
|
|
196
|
+
onWarn?: (msg: string) => void;
|
|
197
|
+
}): BoardNonCorePlatformAdapter;
|
|
198
|
+
/**
|
|
199
|
+
* Extract the serialized board ref from a source token (which has a `br` field).
|
|
200
|
+
* Returns null for callback tokens (which don't carry a board ref).
|
|
201
|
+
*/
|
|
202
|
+
declare function decodeBoardRefFromToken(token: string): string | null;
|
|
203
|
+
|
|
204
|
+
export { BoardNonCorePlatformAdapter, BoardPlatformAdapter, CommandInput, CommandResult, KindValueRef, LiveCard, createArtifactsStore, createArtifactsStorePublic, createCardFileMetadataStore, createCardStorePublic, createChatArtifactsStore, createFileArtifactsStore, createFsBoardNonCorePlatformAdapter, createFsBoardPlatformAdapter, decodeBoardRefFromToken };
|