@kvman/sdk 0.1.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/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/ctx.d.ts +142 -0
- package/dist/ctx.d.ts.map +1 -0
- package/dist/ctx.js +2 -0
- package/dist/ctx.js.map +1 -0
- package/dist/envelope.d.ts +285 -0
- package/dist/envelope.d.ts.map +1 -0
- package/dist/envelope.js +25 -0
- package/dist/envelope.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/json.d.ts +14 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +4 -0
- package/dist/json.js.map +1 -0
- package/dist/kernel-api.d.ts +550 -0
- package/dist/kernel-api.d.ts.map +1 -0
- package/dist/kernel-api.js +110 -0
- package/dist/kernel-api.js.map +1 -0
- package/dist/manifest.d.ts +34 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +25 -0
- package/dist/manifest.js.map +1 -0
- package/dist/preset.d.ts +38 -0
- package/dist/preset.d.ts.map +1 -0
- package/dist/preset.js +26 -0
- package/dist/preset.js.map +1 -0
- package/dist/problem.d.ts +63 -0
- package/dist/problem.d.ts.map +1 -0
- package/dist/problem.js +45 -0
- package/dist/problem.js.map +1 -0
- package/dist/registrations.d.ts +92 -0
- package/dist/registrations.d.ts.map +1 -0
- package/dist/registrations.js +2 -0
- package/dist/registrations.js.map +1 -0
- package/dist/registry.d.ts +24 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +2 -0
- package/dist/registry.js.map +1 -0
- package/dist/rows.d.ts +113 -0
- package/dist/rows.d.ts.map +1 -0
- package/dist/rows.js +53 -0
- package/dist/rows.js.map +1 -0
- package/dist/store.d.ts +90 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +2 -0
- package/dist/store.js.map +1 -0
- package/dist/web.d.ts +158 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js +2 -0
- package/dist/web.js.map +1 -0
- package/package.json +39 -0
package/dist/store.d.ts
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { Json, JsonObject, JsonPrimitive } from './json.ts';
|
|
3
|
+
/** A stored document: its fields plus the kernel-assigned `id`. */
|
|
4
|
+
export type Stored<Document> = Document & {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
/** Equality on top-level fields; every field given must match. */
|
|
8
|
+
export type Filter<Document> = {
|
|
9
|
+
[Field in keyof Document]?: Extract<Document[Field], JsonPrimitive>;
|
|
10
|
+
};
|
|
11
|
+
/** How `find` pages: a required `limit` (at most 1000), and `order` by id (`asc`, oldest first, by default). */
|
|
12
|
+
export type FindOptions = {
|
|
13
|
+
limit: number;
|
|
14
|
+
order?: 'asc' | 'desc';
|
|
15
|
+
};
|
|
16
|
+
/** A key-value map of JSON values. */
|
|
17
|
+
export type Kv = {
|
|
18
|
+
/** The value, or `undefined` when the key holds none. */
|
|
19
|
+
get(key: string): Promise<Json | undefined>;
|
|
20
|
+
/** Stores a value (at most 16 MiB of JSON). */
|
|
21
|
+
set(key: string, value: Json): Promise<void>;
|
|
22
|
+
/** Removes a key. */
|
|
23
|
+
delete(key: string): Promise<void>;
|
|
24
|
+
};
|
|
25
|
+
/** A collection of JSON documents, checked against its schema on write and parsed on read. */
|
|
26
|
+
export type Collection<Document extends JsonObject> = {
|
|
27
|
+
/** Adds a document and returns it with its id. */
|
|
28
|
+
insert(document: Document): Promise<Stored<Document>>;
|
|
29
|
+
/** The document, or `undefined` when there is none with that id. */
|
|
30
|
+
get(id: string): Promise<Stored<Document> | undefined>;
|
|
31
|
+
/** The matching documents by id. */
|
|
32
|
+
find(filter: Filter<Document>, options: FindOptions): Promise<Stored<Document>[]>;
|
|
33
|
+
/** The number of matching documents. */
|
|
34
|
+
count(filter: Filter<Document>): Promise<number>;
|
|
35
|
+
/** Replaces the top-level fields in `patch` and returns the document; a missing id fails `NOT_FOUND`. */
|
|
36
|
+
update(id: string, patch: Partial<Document>): Promise<Stored<Document>>;
|
|
37
|
+
/** Removes a document; a missing id fails `NOT_FOUND`. */
|
|
38
|
+
delete(id: string): Promise<void>;
|
|
39
|
+
};
|
|
40
|
+
/** A key-value map inside a transaction: synchronous calls. */
|
|
41
|
+
export type TransactionKv = {
|
|
42
|
+
/** The value, or `undefined` when the key holds none. */
|
|
43
|
+
get(key: string): Json | undefined;
|
|
44
|
+
/** Stores a value. */
|
|
45
|
+
set(key: string, value: Json): void;
|
|
46
|
+
/** Removes a key. */
|
|
47
|
+
delete(key: string): void;
|
|
48
|
+
};
|
|
49
|
+
/** A collection inside a transaction: synchronous calls. */
|
|
50
|
+
export type TransactionCollection<Document extends JsonObject> = {
|
|
51
|
+
/** Adds a document and returns it with its id. */
|
|
52
|
+
insert(document: Document): Stored<Document>;
|
|
53
|
+
/** The document, or `undefined` when there is none with that id. */
|
|
54
|
+
get(id: string): Stored<Document> | undefined;
|
|
55
|
+
/** The matching documents by id. */
|
|
56
|
+
find(filter: Filter<Document>, options: FindOptions): Stored<Document>[];
|
|
57
|
+
/** The number of matching documents. */
|
|
58
|
+
count(filter: Filter<Document>): number;
|
|
59
|
+
/** Replaces the top-level fields in `patch` and returns the document. */
|
|
60
|
+
update(id: string, patch: Partial<Document>): Stored<Document>;
|
|
61
|
+
/** Removes a document. */
|
|
62
|
+
delete(id: string): void;
|
|
63
|
+
};
|
|
64
|
+
/** One scope (a workspace, or global) inside a transaction. */
|
|
65
|
+
export type TransactionScope = {
|
|
66
|
+
/** The scope's key-value map. */
|
|
67
|
+
kv: TransactionKv;
|
|
68
|
+
/** A collection of this extension in the scope. */
|
|
69
|
+
collection<Document extends JsonObject>(name: string, schema: z.ZodType<Document>): TransactionCollection<Document>;
|
|
70
|
+
};
|
|
71
|
+
/** A transaction: the workspace scope, plus `global`. */
|
|
72
|
+
export type Transaction = TransactionScope & {
|
|
73
|
+
/** The home-wide scope. */
|
|
74
|
+
global: TransactionScope;
|
|
75
|
+
};
|
|
76
|
+
/** One store scope: a workspace, or global. */
|
|
77
|
+
export type StoreScope = {
|
|
78
|
+
/** The scope's key-value map. */
|
|
79
|
+
kv: Kv;
|
|
80
|
+
/** A collection of this extension in the scope. */
|
|
81
|
+
collection<Document extends JsonObject>(name: string, schema: z.ZodType<Document>): Collection<Document>;
|
|
82
|
+
};
|
|
83
|
+
/** The calling extension's store: the current job's workspace, plus `global`. */
|
|
84
|
+
export type Store = StoreScope & {
|
|
85
|
+
/** The home-wide scope. */
|
|
86
|
+
global: StoreScope;
|
|
87
|
+
/** Runs `fn` in one SQLite transaction; a `fn` that returns a Promise is rolled back with `VALIDATION_FAILED`. */
|
|
88
|
+
transaction<Result>(fn: (tx: Transaction) => Result): Promise<Result>;
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEjE,mEAAmE;AACnE,MAAM,MAAM,MAAM,CAAC,QAAQ,IAAI,QAAQ,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD,kEAAkE;AAClE,MAAM,MAAM,MAAM,CAAC,QAAQ,IAAI;KAAG,KAAK,IAAI,MAAM,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;CAAE,CAAC;AAEvG,gHAAgH;AAChH,MAAM,MAAM,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA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AEF,yDAAyD;AACzD,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG;IAC3C,2BAA2B;IAC3B,MAAM,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,+CAA+C;AAC/C,MAAM,MAAM,UAAU,GAAG;IACvB,iCAAiC;IACjC,EAAE,EAAE,EAAE,CAAC;IACP,mDAAmD;IACnD,UAAU,CAAC,QAAQ,SAAS,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;CAC1G,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG;IAC/B,2BAA2B;IAC3B,MAAM,EAAE,UAAU,CAAC;IACnB,kHAAkH;IAClH,WAAW,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACvE,CAAC"}
|
package/dist/store.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":""}
|
package/dist/web.d.ts
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { Json } from './json.ts';
|
|
2
|
+
import type { Problem } from './problem.ts';
|
|
3
|
+
import type { CommandInputOf, InputOf, OutputOf } from './registry.ts';
|
|
4
|
+
import type { Workspace } from './rows.ts';
|
|
5
|
+
/** Values in a view's inputs, params, or props: JSON, where `{ $param }` and `{ $row }` are resolved when used. */
|
|
6
|
+
export type ViewValues = Record<string, Json>;
|
|
7
|
+
/** A badge's color. */
|
|
8
|
+
export type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
9
|
+
/** A toast's level. */
|
|
10
|
+
export type ToastLevel = 'info' | 'success' | 'warning' | 'error';
|
|
11
|
+
/** How a column shows its value. */
|
|
12
|
+
export type Format = 'text' | 'number' | 'date' | 'bytes' | 'boolean';
|
|
13
|
+
/** A table column or detail field. */
|
|
14
|
+
export type ViewColumn = {
|
|
15
|
+
field: string;
|
|
16
|
+
title: string;
|
|
17
|
+
format?: Format;
|
|
18
|
+
secondary?: string;
|
|
19
|
+
badges?: Record<string, {
|
|
20
|
+
text: string;
|
|
21
|
+
tone: Tone;
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
/** What a button or form does after its command succeeds. */
|
|
25
|
+
export type ViewThen = 'rerun' | {
|
|
26
|
+
navigate: string;
|
|
27
|
+
params?: ViewValues;
|
|
28
|
+
} | {
|
|
29
|
+
toast: string;
|
|
30
|
+
level?: ToastLevel;
|
|
31
|
+
};
|
|
32
|
+
/** A page to open: a full page id and its params. */
|
|
33
|
+
export type PageLink = {
|
|
34
|
+
page: string;
|
|
35
|
+
params?: ViewValues;
|
|
36
|
+
};
|
|
37
|
+
/** A button that runs a command. */
|
|
38
|
+
export type ButtonView = {
|
|
39
|
+
type: 'button';
|
|
40
|
+
text: string;
|
|
41
|
+
params?: ViewValues;
|
|
42
|
+
command: string;
|
|
43
|
+
input: ViewValues;
|
|
44
|
+
confirm?: string;
|
|
45
|
+
style?: 'primary' | 'secondary' | 'danger';
|
|
46
|
+
then?: ViewThen;
|
|
47
|
+
};
|
|
48
|
+
type Text = {
|
|
49
|
+
text: string;
|
|
50
|
+
params?: ViewValues;
|
|
51
|
+
};
|
|
52
|
+
/** A view tree of kvwebui's built-in components; every text is a translation key. */
|
|
53
|
+
export type View = {
|
|
54
|
+
type: 'stack';
|
|
55
|
+
direction: 'vertical' | 'horizontal';
|
|
56
|
+
gap?: 'sm' | 'md' | 'lg';
|
|
57
|
+
children: View[];
|
|
58
|
+
} | {
|
|
59
|
+
type: 'card';
|
|
60
|
+
title?: string;
|
|
61
|
+
children: View[];
|
|
62
|
+
} | ({
|
|
63
|
+
type: 'heading';
|
|
64
|
+
level: 1 | 2 | 3;
|
|
65
|
+
} & Text) | ({
|
|
66
|
+
type: 'text';
|
|
67
|
+
} & Text) | {
|
|
68
|
+
type: 'markdown';
|
|
69
|
+
text?: string;
|
|
70
|
+
params?: ViewValues;
|
|
71
|
+
query?: string;
|
|
72
|
+
input?: ViewValues;
|
|
73
|
+
field?: string;
|
|
74
|
+
} | {
|
|
75
|
+
type: 'table';
|
|
76
|
+
query: string;
|
|
77
|
+
input: ViewValues;
|
|
78
|
+
columns: ViewColumn[];
|
|
79
|
+
rowActions?: ButtonView[];
|
|
80
|
+
rowLink?: PageLink;
|
|
81
|
+
empty?: string;
|
|
82
|
+
} | {
|
|
83
|
+
type: 'list';
|
|
84
|
+
query: string;
|
|
85
|
+
input: ViewValues;
|
|
86
|
+
item: View;
|
|
87
|
+
empty?: string;
|
|
88
|
+
} | {
|
|
89
|
+
type: 'detail';
|
|
90
|
+
query: string;
|
|
91
|
+
input: ViewValues;
|
|
92
|
+
fields: ViewColumn[];
|
|
93
|
+
} | {
|
|
94
|
+
type: 'form';
|
|
95
|
+
command: string;
|
|
96
|
+
fixed?: ViewValues;
|
|
97
|
+
submit: string;
|
|
98
|
+
then?: ViewThen;
|
|
99
|
+
} | ({
|
|
100
|
+
type: 'link';
|
|
101
|
+
to: PageLink;
|
|
102
|
+
} & Text) | ButtonView | {
|
|
103
|
+
type: 'setting';
|
|
104
|
+
key: string;
|
|
105
|
+
} | {
|
|
106
|
+
type: 'custom';
|
|
107
|
+
component: string;
|
|
108
|
+
props: ViewValues;
|
|
109
|
+
};
|
|
110
|
+
/** An event of a job's stream: progress chunks, then one result or Problem. */
|
|
111
|
+
export type StreamEvent = {
|
|
112
|
+
type: 'progress';
|
|
113
|
+
source: string;
|
|
114
|
+
data: Json;
|
|
115
|
+
} | {
|
|
116
|
+
type: 'result';
|
|
117
|
+
output: Json;
|
|
118
|
+
} | {
|
|
119
|
+
type: 'problem';
|
|
120
|
+
problem: Problem;
|
|
121
|
+
};
|
|
122
|
+
/** The object kvwebui gives a custom component through `inject('kvman')`. */
|
|
123
|
+
export type Kvman = {
|
|
124
|
+
/** Runs a command or query now; a command counts as one the UI ran (queries rerun, effects apply). */
|
|
125
|
+
exec<Name extends string>(name: Name, input: InputOf<Name>): Promise<OutputOf<Name>>;
|
|
126
|
+
/** Queues a command, resolves to its job id, and follows the job. */
|
|
127
|
+
execAsync<Name extends string>(name: Name, input: CommandInputOf<Name>): Promise<string>;
|
|
128
|
+
/** The job's stream events; it ends after the result or Problem, and closes when the component unmounts. */
|
|
129
|
+
stream(jobId: string): AsyncIterable<StreamEvent>;
|
|
130
|
+
/** Resolves when the job has ended, the page's queries have rerun, and its effects have applied. */
|
|
131
|
+
follow(jobId: string): Promise<void>;
|
|
132
|
+
/** Reruns the page's queries and the status items now, as after a command the UI ran. */
|
|
133
|
+
refresh(): void;
|
|
134
|
+
/** Opens a page by its full id. */
|
|
135
|
+
navigate(page: string, params?: Record<string, string>): void;
|
|
136
|
+
/** Shows a toast with a translated text (level `info` by default). */
|
|
137
|
+
toast(text: string, params?: Record<string, Json>, level?: ToastLevel): void;
|
|
138
|
+
/** Opens or closes a panel by its full id. */
|
|
139
|
+
panel(id: string, open: boolean): void;
|
|
140
|
+
/** Translates a key with the UI language's catalog. */
|
|
141
|
+
t(key: string, params?: Record<string, unknown>): string;
|
|
142
|
+
/** The tab's workspace, a live read-only ref. */
|
|
143
|
+
workspace: {
|
|
144
|
+
readonly value: Workspace;
|
|
145
|
+
};
|
|
146
|
+
/** What the extension's page is set to save to, a live read-only ref; `global` anywhere else. */
|
|
147
|
+
scope: {
|
|
148
|
+
readonly value: 'global' | 'workspace';
|
|
149
|
+
};
|
|
150
|
+
/** A component that renders a view tree with kvwebui's built-in components. */
|
|
151
|
+
View: new () => {
|
|
152
|
+
$props: {
|
|
153
|
+
view: View;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
export {};
|
|
158
|
+
//# sourceMappingURL=web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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AAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IACzD,iDAAiD;IACjD,SAAS,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;KAAE,CAAC;IACzC,iGAAiG;IACjG,KAAK,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,WAAW,CAAA;KAAE,CAAC;IAClD,+EAA+E;IAC/E,IAAI,EAAE,UAAU;QAAE,MAAM,EAAE;YAAE,IAAI,EAAE,IAAI,CAAA;SAAE,CAAA;KAAE,CAAC;CAC5C,CAAC"}
|
package/dist/web.js
ADDED
package/dist/web.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kvman/sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "The kvman extension API: the ctx types, zod, and the shared shapes.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/ibndeif/kvman.git",
|
|
9
|
+
"directory": "packages/sdk"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/ibndeif/kvman#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/ibndeif/kvman/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"@kvman/source": "./src/index.ts",
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./web": {
|
|
23
|
+
"@kvman/source": "./src/web.ts",
|
|
24
|
+
"types": "./dist/web.d.ts",
|
|
25
|
+
"default": "./dist/web.js"
|
|
26
|
+
},
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"zod": "4.6.5"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsc -p tsconfig.build.json",
|
|
37
|
+
"typecheck": "tsc -p tsconfig.json"
|
|
38
|
+
}
|
|
39
|
+
}
|