@open-artifact/data-core 0.14.0 → 0.14.1
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/package.json +3 -3
- package/src/addresses.d.ts +1 -1
- package/src/answers.d.ts +2 -2
- package/src/check-page.d.ts +1 -1
- package/src/connector-types.d.ts +1 -1
- package/src/connectors.d.ts +2 -2
- package/src/drafts.d.ts +3 -3
- package/src/fill.d.ts +2 -2
- package/src/imports.d.ts +1 -1
- package/src/index.d.ts +26 -26
- package/src/limiter.d.ts +1 -1
- package/src/live-snapshot.d.ts +2 -2
- package/src/model.d.ts +1 -1
- package/src/readers.d.ts +2 -2
- package/src/records.d.ts +1 -1
- package/src/rules.d.ts +2 -2
- package/src/saved-rows.d.ts +1 -1
- package/src/sql.d.ts +1 -1
- package/src/tables.d.ts +1 -1
- package/src/text.d.ts +1 -1
- package/src/view-context.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-artifact/data-core",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "The Data type's model, free of DOM and React: dataset and dashboard documents, filters and their rules, SQL filling, tables and data files, connector answer readers, dash/look colors, drafts, the view context and the project check.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"NOTICE"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@open-artifact/live-store": "0.14.
|
|
20
|
-
"@open-artifact/wasm-data-rules": "0.14.
|
|
19
|
+
"@open-artifact/live-store": "0.14.1",
|
|
20
|
+
"@open-artifact/wasm-data-rules": "0.14.1"
|
|
21
21
|
},
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"author": {
|
package/src/addresses.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SourceAddress, SourceResolution, Table } from './types.
|
|
1
|
+
import type { SourceAddress, SourceResolution, Table } from './types.js';
|
|
2
2
|
/** The attributes a page marks an element's data with. */
|
|
3
3
|
export declare const SOURCE_ATTRIBUTE = "data-source";
|
|
4
4
|
export declare const FIELD_ATTRIBUTE = "data-field";
|
package/src/answers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CachedToolResult, McpError, McpToolResult, ReaderError, ToolCall, ToolCallGot } from './connector-types.
|
|
2
|
-
import type { ResultMetadata, Table, UnknownRecord } from './types.
|
|
1
|
+
import type { CachedToolResult, McpError, McpToolResult, ReaderError, ToolCall, ToolCallGot } from './connector-types.js';
|
|
2
|
+
import type { ResultMetadata, Table, UnknownRecord } from './types.js';
|
|
3
3
|
/** The error codes a tool call through the host reports as they are; any other failure is "upstream_error". */
|
|
4
4
|
export declare const MCP_ERROR_CODES: ReadonlySet<string>;
|
|
5
5
|
export declare function isRecordArray(value: unknown): value is UnknownRecord[];
|
package/src/check-page.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Table } from './types.
|
|
1
|
+
import type { Table } from './types.js';
|
|
2
2
|
/** How a page finding is told: the document it is in, and a line of that document's text when it has one. */
|
|
3
3
|
export type PageReport = (doc: string, level: 'error' | 'warning', message: string, line?: number) => void;
|
|
4
4
|
/** A dataset as the page check knows it: its rows when the check could read them. */
|
package/src/connector-types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Dataset, DatasetRun, FailedRun, JsonValue, LoadWording, Parameters, QueryRule, QuerySource, ResultMetadata, Row, SqlQuoteMode, Table, UnfilledAs, UnknownRecord, WordedMessage } from './types.
|
|
1
|
+
import type { Dataset, DatasetRun, FailedRun, JsonValue, LoadWording, Parameters, QueryRule, QuerySource, ResultMetadata, Row, SqlQuoteMode, Table, UnfilledAs, UnknownRecord, WordedMessage } from './types.js';
|
|
2
2
|
export interface SqlToolSpec {
|
|
3
3
|
sqlArg: string;
|
|
4
4
|
quotes?: SqlQuoteMode;
|
package/src/connectors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { QueryConnector, SqlToolSpec } from './connector-types.
|
|
2
|
-
import type { QuerySource, UnknownRecord } from './types.
|
|
1
|
+
import type { QueryConnector, SqlToolSpec } from './connector-types.js';
|
|
2
|
+
import type { QuerySource, UnknownRecord } from './types.js';
|
|
3
3
|
/** The governed BigQuery connector: `bigquery_query` takes SQL in `sql`; answers are its XML result. */
|
|
4
4
|
export declare const GOVERNED_BIGQUERY_CONNECTOR: QueryConnector;
|
|
5
5
|
/** The connectors whose query tools are known, by connector name. */
|
package/src/drafts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DashboardContent, DashboardFile, Dataset, Parameters, UnknownRecord } from './types.
|
|
2
|
-
import type { DocumentWritePlan } from './versions.
|
|
3
|
-
import { type DashboardForm } from './forms.
|
|
1
|
+
import type { DashboardContent, DashboardFile, Dataset, Parameters, UnknownRecord } from './types.js';
|
|
2
|
+
import type { DocumentWritePlan } from './versions.js';
|
|
3
|
+
import { type DashboardForm } from './forms.js';
|
|
4
4
|
/** One of the dashboard type's own formats a draft can be remixed into. */
|
|
5
5
|
export type RemixForm = DashboardForm;
|
|
6
6
|
/** A parsed `drafts/<id>` record. */
|
package/src/fill.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ArgumentRule, FilledArguments, QueryConnector, RuleProblem } from './connector-types.
|
|
2
|
-
import type { DashboardContent, Dataset, ParameterValue, Parameters, QuerySource, UnknownRecord } from './types.
|
|
1
|
+
import type { ArgumentRule, FilledArguments, QueryConnector, RuleProblem } from './connector-types.js';
|
|
2
|
+
import type { DashboardContent, Dataset, ParameterValue, Parameters, QuerySource, UnknownRecord } from './types.js';
|
|
3
3
|
/** Every string inside a JSON value, depth first. */
|
|
4
4
|
export declare function collectNestedStrings(value: unknown, into?: string[]): string[];
|
|
5
5
|
/** A query's argument template (JSON text) as an object; empty when it isn't one. */
|
package/src/imports.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Files a person imports on an empty dashboard, and the request that hands them to the agent. */
|
|
2
|
-
import type { DataFileFormat } from './types.
|
|
2
|
+
import type { DataFileFormat } from './types.js';
|
|
3
3
|
/** What an imported file holds: a data file a source reads as it is, or a workbook the agent turns into CSV. */
|
|
4
4
|
export type ImportedFileKind = DataFileFormat | 'workbook';
|
|
5
5
|
/** An imported file once stored. */
|
package/src/index.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export * from './types.
|
|
2
|
-
export * from './connector-types.
|
|
3
|
-
export * from './text.
|
|
4
|
-
export * from './paths.
|
|
5
|
-
export * from './tables.
|
|
6
|
-
export * from './saved-rows.
|
|
7
|
-
export * from './rule-pattern.
|
|
8
|
-
export * from './model.
|
|
9
|
-
export * from './addresses.
|
|
10
|
-
export * from './sql.
|
|
11
|
-
export * from './connectors.
|
|
12
|
-
export * from './rules.
|
|
13
|
-
export * from './fill.
|
|
14
|
-
export * from './limiter.
|
|
15
|
-
export * from './answers.
|
|
16
|
-
export * from './readers.
|
|
17
|
-
export * from './look.
|
|
18
|
-
export * from './forms.
|
|
19
|
-
export * from './records.
|
|
20
|
-
export * from './versions.
|
|
21
|
-
export * from './drafts.
|
|
22
|
-
export * from './imports.
|
|
23
|
-
export * from './view-context.
|
|
24
|
-
export * from './check.
|
|
25
|
-
export * from './check-page.
|
|
26
|
-
export * from './live-snapshot.
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './connector-types.js';
|
|
3
|
+
export * from './text.js';
|
|
4
|
+
export * from './paths.js';
|
|
5
|
+
export * from './tables.js';
|
|
6
|
+
export * from './saved-rows.js';
|
|
7
|
+
export * from './rule-pattern.js';
|
|
8
|
+
export * from './model.js';
|
|
9
|
+
export * from './addresses.js';
|
|
10
|
+
export * from './sql.js';
|
|
11
|
+
export * from './connectors.js';
|
|
12
|
+
export * from './rules.js';
|
|
13
|
+
export * from './fill.js';
|
|
14
|
+
export * from './limiter.js';
|
|
15
|
+
export * from './answers.js';
|
|
16
|
+
export * from './readers.js';
|
|
17
|
+
export * from './look.js';
|
|
18
|
+
export * from './forms.js';
|
|
19
|
+
export * from './records.js';
|
|
20
|
+
export * from './versions.js';
|
|
21
|
+
export * from './drafts.js';
|
|
22
|
+
export * from './imports.js';
|
|
23
|
+
export * from './view-context.js';
|
|
24
|
+
export * from './check.js';
|
|
25
|
+
export * from './check-page.js';
|
|
26
|
+
export * from './live-snapshot.js';
|
package/src/limiter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AdaptiveLimiter, BusyRetryResult, PollClock } from './connector-types.
|
|
1
|
+
import type { AdaptiveLimiter, BusyRetryResult, PollClock } from './connector-types.js';
|
|
2
2
|
/** After a busy answer the limiter pauses this long (times 1–2). */
|
|
3
3
|
export declare const BUSY_PAUSE_MS = 2000;
|
|
4
4
|
/** For this long after a busy answer the limiter stays under the size it had then. */
|
package/src/live-snapshot.d.ts
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
*
|
|
20
20
|
* A dataset opts out with `"snapshot": false` in its document: its query never leaves the owner's computer.
|
|
21
21
|
*/
|
|
22
|
-
import type { UnknownRecord } from './types.
|
|
23
|
-
import type { McpToolResult } from './connector-types.
|
|
22
|
+
import type { UnknownRecord } from './types.js';
|
|
23
|
+
import type { McpToolResult } from './connector-types.js';
|
|
24
24
|
/** The snapshot's status document. */
|
|
25
25
|
export declare const LIVE_SNAPSHOT_PATH = "data/live";
|
|
26
26
|
/** The collection of the snapshot's answers, one document per dataset id. */
|
package/src/model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DashboardContent, DashboardFile, DashboardUpdates, DashboardUpdateSetting, Dataset, DatasetSource, LimiterDefaults, ParameterScalar, ParameterValue, Parameters, QueryFailure, QueryFailureCode, QueryRule, QuerySource, UpdateStamp, ViewerIdentity } from './types.
|
|
1
|
+
import type { DashboardContent, DashboardFile, DashboardUpdates, DashboardUpdateSetting, Dataset, DatasetSource, LimiterDefaults, ParameterScalar, ParameterValue, Parameters, QueryFailure, QueryFailureCode, QueryRule, QuerySource, UpdateStamp, ViewerIdentity } from './types.js';
|
|
2
2
|
export declare const MAX_ERROR_MESSAGE_CHARACTERS = 400;
|
|
3
3
|
/** The largest data file the file editor stores. */
|
|
4
4
|
export declare const MAX_DATA_BYTES = 8388608;
|
package/src/readers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BigQueryAnswer, ConnectorAnswer, LoaderResultReaders, ReaderContext, ReaderKind, ResultReader, SchemaField, SchemaRowReader } from './connector-types.
|
|
2
|
-
import type { ResultMetadata, Table, UnknownRecord } from './types.
|
|
1
|
+
import type { BigQueryAnswer, ConnectorAnswer, LoaderResultReaders, ReaderContext, ReaderKind, ResultReader, SchemaField, SchemaRowReader } from './connector-types.js';
|
|
2
|
+
import type { ResultMetadata, Table, UnknownRecord } from './types.js';
|
|
3
3
|
export declare const BIGQUERY_POLL_TOOL = "get_query_results";
|
|
4
4
|
export declare const DATABRICKS_POLL_TOOL = "poll_sql_result";
|
|
5
5
|
/** A number text within the safe integer range as a number; anything else as it was. */
|
package/src/records.d.ts
CHANGED
package/src/rules.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ArgumentRule, FilledArguments } from './connector-types.
|
|
2
|
-
import type { ParameterValue, UnfilledCode } from './types.
|
|
1
|
+
import type { ArgumentRule, FilledArguments } from './connector-types.js';
|
|
2
|
+
import type { ParameterValue, UnfilledCode } from './types.js';
|
|
3
3
|
/** What a viewer reads when a `{{filter}}` can't be filled in. */
|
|
4
4
|
export declare const UNFILLED_MESSAGES: Readonly<Record<UnfilledCode, (filter: string, char?: string) => string>>;
|
|
5
5
|
/** The codes that depend on the viewer's value (another value may work). */
|
package/src/saved-rows.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* and read back as a source, `{kind: "store", path}`. A path with an odd number of segments names a collection (one
|
|
4
4
|
* row per document, by document ID); an even number names one document (one row while it exists).
|
|
5
5
|
*/
|
|
6
|
-
import type { Table } from './types.
|
|
6
|
+
import type { Table } from './types.js';
|
|
7
7
|
/** Where saved rows live: `data/…`. */
|
|
8
8
|
export declare const SAVED_ROWS_ROOT = "data";
|
|
9
9
|
/** `data/users/me/…` stands for the person looking at the page. */
|
package/src/sql.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonPrimitive, ParameterValue, Parameters, SqlQuoteMode, SqlToken } from './types.
|
|
1
|
+
import type { JsonPrimitive, ParameterValue, Parameters, SqlQuoteMode, SqlToken } from './types.js';
|
|
2
2
|
export declare const SQL_KEYWORDS: ReadonlySet<string>;
|
|
3
3
|
export declare const SQL_LITERAL_KEYWORDS: ReadonlySet<string>;
|
|
4
4
|
/** `{{name}}`, with spaces or tabs inside the braces; group 1 is the filter name. */
|
package/src/tables.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Cell, DataFileFormat, JsonValue, Table } from './types.
|
|
1
|
+
import type { Cell, DataFileFormat, JsonValue, Table } from './types.js';
|
|
2
2
|
export declare const NUMERIC_TEXT_PATTERN: RegExp;
|
|
3
3
|
export declare const CUT_WITHOUT_ROWS_MESSAGE = "The answer reports rows, but none of them could be read.";
|
|
4
4
|
export declare const DATA_FILE_FORMATS: readonly DataFileFormat[];
|
package/src/text.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UnknownRecord } from './types.
|
|
1
|
+
import type { UnknownRecord } from './types.js';
|
|
2
2
|
/** Object keys never read from stored data. */
|
|
3
3
|
export declare const RESERVED_OBJECT_KEYS: ReadonlySet<string>;
|
|
4
4
|
export declare function isPlainObject(value: unknown): value is UnknownRecord;
|
package/src/view-context.d.ts
CHANGED