@yaks/browse 0.0.0-stage → 0.2.36
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 +202 -0
- package/README.md +324 -2
- package/_dist/app.d.ts +8 -0
- package/_dist/app.d.ts.map +1 -0
- package/_dist/cli.d.ts +16 -0
- package/_dist/cli.d.ts.map +1 -0
- package/_dist/hosting.d.ts +24 -0
- package/_dist/hosting.d.ts.map +1 -0
- package/_dist/mod.d.ts +7 -0
- package/_dist/mod.d.ts.map +1 -0
- package/_dist/types.d.ts +5 -0
- package/_dist/types.d.ts.map +1 -0
- package/_dist/url.d.ts +2 -0
- package/_dist/url.d.ts.map +1 -0
- package/app.js +10 -0
- package/app.js.map +1 -0
- package/app.ts +10 -0
- package/browser-links.js +22 -0
- package/browser-links.js.map +1 -0
- package/browser-links.ts +28 -0
- package/cli.js +172 -0
- package/cli.js.map +1 -0
- package/cli.ts +168 -0
- package/client.js +748 -0
- package/client.js.map +1 -0
- package/client.ts +734 -0
- package/clipboard.js +18 -0
- package/clipboard.js.map +1 -0
- package/clipboard.ts +17 -0
- package/commands.js +1157 -0
- package/commands.js.map +1 -0
- package/commands.ts +1108 -0
- package/components/Ansi.tsx +160 -0
- package/components/App.tsx +446 -0
- package/components/Canvas.tsx +625 -0
- package/components/Card.tsx +276 -0
- package/components/Chat.tsx +205 -0
- package/components/Configuration.tsx +218 -0
- package/components/Decision.tsx +49 -0
- package/components/Dot.tsx +52 -0
- package/components/Entity.tsx +609 -0
- package/components/Fault.tsx +43 -0
- package/components/Filter.tsx +103 -0
- package/components/Keybindings.tsx +100 -0
- package/components/Keys.tsx +67 -0
- package/components/Markdown.tsx +90 -0
- package/components/Navigation.tsx +161 -0
- package/components/New.tsx +490 -0
- package/components/Peek.tsx +168 -0
- package/components/Prio.tsx +20 -0
- package/components/Run.tsx +263 -0
- package/components/Search.tsx +280 -0
- package/components/Stamp.tsx +44 -0
- package/components/Status.tsx +514 -0
- package/components/Sync.tsx +173 -0
- package/components/Tile.tsx +50 -0
- package/components/answered.js +23 -0
- package/components/answered.js.map +1 -0
- package/components/answered.ts +25 -0
- package/components/comp.js +11 -0
- package/components/comp.js.map +1 -0
- package/components/comp.ts +10 -0
- package/components/drag.js +173 -0
- package/components/drag.js.map +1 -0
- package/components/drag.ts +198 -0
- package/components/fields.tsx +90 -0
- package/components/fixtures/README.md +10 -0
- package/components/fixtures/archetypes.json +3646 -0
- package/components/hits.js +63 -0
- package/components/hits.js.map +1 -0
- package/components/hits.ts +84 -0
- package/components/icons.tsx +177 -0
- package/components/inspect.tsx +331 -0
- package/components/mount.ts +79 -0
- package/components/nav.tsx +479 -0
- package/components/offers.js +26 -0
- package/components/offers.js.map +1 -0
- package/components/offers.ts +54 -0
- package/components/page.js +21 -0
- package/components/page.js.map +1 -0
- package/components/page.ts +18 -0
- package/components/read.js +5 -0
- package/components/read.js.map +1 -0
- package/components/read.ts +7 -0
- package/components/registry.js +285 -0
- package/components/registry.js.map +1 -0
- package/components/registry.ts +317 -0
- package/components/session_status.tsx +115 -0
- package/components/subscriptions.js +149 -0
- package/components/subscriptions.js.map +1 -0
- package/components/subscriptions.ts +161 -0
- package/components/title.tsx +21 -0
- package/components/useQuery.js +166 -0
- package/components/useQuery.js.map +1 -0
- package/components/useQuery.ts +211 -0
- package/components/views/Board.tsx +450 -0
- package/components/views/BoardTile.tsx +65 -0
- package/components/views/Dashboard.tsx +148 -0
- package/components/views/Debug.tsx +445 -0
- package/components/views/Dependency.tsx +51 -0
- package/components/views/Entry.tsx +500 -0
- package/components/views/Gist.tsx +28 -0
- package/components/views/Inline.tsx +54 -0
- package/components/views/Json.tsx +19 -0
- package/components/views/Layout.tsx +211 -0
- package/components/views/List.tsx +238 -0
- package/components/views/Md.tsx +43 -0
- package/components/views/Media.tsx +48 -0
- package/components/views/Memory.tsx +32 -0
- package/components/views/Relate.tsx +205 -0
- package/components/views/Search.tsx +42 -0
- package/components/views/Session.tsx +850 -0
- package/components/views/SessionManage.tsx +127 -0
- package/components/views/Show.tsx +758 -0
- package/components/views/Shown.tsx +72 -0
- package/components/views/Split.tsx +58 -0
- package/components/views/TaskTile.tsx +37 -0
- package/components/views/Title.tsx +105 -0
- package/components/views/Wake.tsx +77 -0
- package/components/views/Web.tsx +49 -0
- package/components/wells.js +30 -0
- package/components/wells.js.map +1 -0
- package/components/wells.ts +33 -0
- package/configuration.js +38 -0
- package/configuration.js.map +1 -0
- package/configuration.ts +41 -0
- package/decision_sync.js +88 -0
- package/decision_sync.js.map +1 -0
- package/decision_sync.ts +93 -0
- package/deno.json +1 -0
- package/domain-host.tsx +108 -0
- package/edge.js +193 -0
- package/edge.js.map +1 -0
- package/edge.ts +196 -0
- package/entry_log.js +241 -0
- package/entry_log.js.map +1 -0
- package/entry_log.ts +214 -0
- package/failure.js +22 -0
- package/failure.js.map +1 -0
- package/failure.ts +34 -0
- package/front.json +61 -0
- package/highlight.js +143 -0
- package/highlight.js.map +1 -0
- package/highlight.ts +149 -0
- package/history.js +68 -0
- package/history.js.map +1 -0
- package/history.ts +72 -0
- package/host_commands.js +107 -0
- package/host_commands.js.map +1 -0
- package/host_commands.ts +38 -0
- package/hosting.js +53 -0
- package/hosting.js.map +1 -0
- package/hosting.ts +72 -0
- package/idb.js +14 -0
- package/idb.js.map +1 -0
- package/idb.ts +15 -0
- package/index.js +232 -0
- package/index.js.map +1 -0
- package/index.ts +252 -0
- package/keybindings.js +136 -0
- package/keybindings.js.map +1 -0
- package/keybindings.ts +37 -0
- package/kit.js +103 -0
- package/kit.js.map +1 -0
- package/kit.ts +119 -0
- package/layout.js +254 -0
- package/layout.js.map +1 -0
- package/layout.ts +210 -0
- package/legacy_outbox.js +53 -0
- package/legacy_outbox.js.map +1 -0
- package/legacy_outbox.ts +63 -0
- package/live.js +2883 -0
- package/live.js.map +1 -0
- package/live.ts +3334 -0
- package/live_archetypes.js +92 -0
- package/live_archetypes.js.map +1 -0
- package/live_archetypes.ts +113 -0
- package/live_client.js +145 -0
- package/live_client.js.map +1 -0
- package/live_client.ts +120 -0
- package/main.tsx +5 -0
- package/mod.js +7 -0
- package/mod.js.map +1 -0
- package/mod.ts +7 -0
- package/mount.tsx +50 -0
- package/navigation.js +120 -0
- package/navigation.js.map +1 -0
- package/navigation.ts +152 -0
- package/near.js +83 -0
- package/near.js.map +1 -0
- package/near.ts +83 -0
- package/new.js +295 -0
- package/new.js.map +1 -0
- package/new.ts +361 -0
- package/outbox.js +112 -0
- package/outbox.js.map +1 -0
- package/outbox.ts +129 -0
- package/owner.js +39 -0
- package/owner.js.map +1 -0
- package/owner.ts +37 -0
- package/package.json +81 -4
- package/paste.js +157 -0
- package/paste.js.map +1 -0
- package/paste.ts +122 -0
- package/props.js +303 -0
- package/props.js.map +1 -0
- package/props.ts +358 -0
- package/providers.js +136 -0
- package/providers.js.map +1 -0
- package/providers.ts +194 -0
- package/query.js +987 -0
- package/query.js.map +1 -0
- package/query.ts +1113 -0
- package/remote.js +37 -0
- package/remote.js.map +1 -0
- package/remote.ts +46 -0
- package/resolver.js +149 -0
- package/resolver.js.map +1 -0
- package/resolver.ts +213 -0
- package/rfc2047.js +37 -0
- package/rfc2047.js.map +1 -0
- package/rfc2047.ts +40 -0
- package/row_holds.js +107 -0
- package/row_holds.js.map +1 -0
- package/row_holds.ts +93 -0
- package/served.ts +42 -0
- package/session_worktree.js +7 -0
- package/session_worktree.js.map +1 -0
- package/session_worktree.ts +16 -0
- package/sessions.js +57 -0
- package/sessions.js.map +1 -0
- package/sessions.ts +53 -0
- package/sha.js +161 -0
- package/sha.js.map +1 -0
- package/sha.ts +164 -0
- package/styles.css +2823 -0
- package/subs.js +36 -0
- package/subs.js.map +1 -0
- package/subs.ts +40 -0
- package/terminal-route.js +13 -0
- package/terminal-route.js.map +1 -0
- package/terminal-route.ts +17 -0
- package/terminal.js +251 -0
- package/terminal.js.map +1 -0
- package/terminal.ts +186 -0
- package/time.js +142 -0
- package/time.js.map +1 -0
- package/time.ts +133 -0
- package/title.js +25 -0
- package/title.js.map +1 -0
- package/title.ts +50 -0
- package/tui/doc.ts +6 -0
- package/tui/testing.ts +19 -0
- package/twin.js +11 -0
- package/twin.js.map +1 -0
- package/twin.ts +13 -0
- package/types.js +456 -0
- package/types.js.map +1 -0
- package/types.ts +1370 -0
- package/url.js +77 -0
- package/url.js.map +1 -0
- package/url.ts +85 -0
- package/verb.js +82 -0
- package/verb.js.map +1 -0
- package/verb.ts +137 -0
- package/warmth.js +41 -0
- package/warmth.js.map +1 -0
- package/warmth.ts +54 -0
- package/wire.js +86 -0
- package/wire.js.map +1 -0
- package/wire.ts +63 -0
package/types.js
ADDED
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
import { apiPath, hosting } from "./hosting.js";
|
|
2
|
+
import { writeOwner } from "./owner.js";
|
|
3
|
+
// The browser's vocabulary: what each component is, learned from the graph it
|
|
4
|
+
// is looking at. A host serves the documents it composed (`/vocab`,
|
|
5
|
+
// @yaks/api) and `learn()` reads the tables below out of them before
|
|
6
|
+
// anything renders, so the page and the server read one set of components.
|
|
7
|
+
// Nothing here is written down per component: a plugin the host lists is
|
|
8
|
+
// understood the moment the host loads it.
|
|
9
|
+
//
|
|
10
|
+
// In a browser the documents are fetched at the top of this module, so every
|
|
11
|
+
// module that imports it evaluates after the tables are full. Under Deno the
|
|
12
|
+
// tables start empty until something calls learn(): the tests learn the
|
|
13
|
+
// documents a host composes (testing.ts), a terminal the ones its server
|
|
14
|
+
// serves.
|
|
15
|
+
import { loadVocab } from "@yaks/vocab";
|
|
16
|
+
import { idOf as idsOf, SHORT } from "@yaks/id";
|
|
17
|
+
import { idKeywords } from "@yaks/id/vocab";
|
|
18
|
+
import { nameKeywords } from "@yaks/names";
|
|
19
|
+
import { edgeKeywords } from "@yaks/edge/vocab";
|
|
20
|
+
import { relations as edgeRelations } from "@yaks/edge";
|
|
21
|
+
import { blobKeywords } from "@yaks/blob";
|
|
22
|
+
import { kernelKeywords } from "@yaks/kernel/vocab";
|
|
23
|
+
import { keyKeywords } from "@yaks/key/vocab";
|
|
24
|
+
import { settled, statusOf as taskStatus } from "@yaks/task";
|
|
25
|
+
export let statuses = [
|
|
26
|
+
'open',
|
|
27
|
+
'wip',
|
|
28
|
+
'done',
|
|
29
|
+
'cancelled'
|
|
30
|
+
];
|
|
31
|
+
export let turnStates = [
|
|
32
|
+
'idle',
|
|
33
|
+
'busy'
|
|
34
|
+
];
|
|
35
|
+
export let messageRoles = [
|
|
36
|
+
'user',
|
|
37
|
+
'agent'
|
|
38
|
+
];
|
|
39
|
+
export let httpMethods = [
|
|
40
|
+
'GET',
|
|
41
|
+
'HEAD',
|
|
42
|
+
'POST',
|
|
43
|
+
'PUT',
|
|
44
|
+
'PATCH',
|
|
45
|
+
'DELETE'
|
|
46
|
+
];
|
|
47
|
+
export let roleSurfaces = [
|
|
48
|
+
'native',
|
|
49
|
+
'managed'
|
|
50
|
+
];
|
|
51
|
+
export let wakePolicies = [
|
|
52
|
+
'always',
|
|
53
|
+
'attention',
|
|
54
|
+
'scheduled',
|
|
55
|
+
'manual'
|
|
56
|
+
];
|
|
57
|
+
export let dirs = [
|
|
58
|
+
'h',
|
|
59
|
+
'v'
|
|
60
|
+
];
|
|
61
|
+
export let subModes = [
|
|
62
|
+
'watch',
|
|
63
|
+
'mute'
|
|
64
|
+
];
|
|
65
|
+
export let verdicts = [
|
|
66
|
+
'approved',
|
|
67
|
+
'rejected',
|
|
68
|
+
'changes_requested'
|
|
69
|
+
];
|
|
70
|
+
export let grades = [
|
|
71
|
+
'frontier',
|
|
72
|
+
'mid',
|
|
73
|
+
'small'
|
|
74
|
+
];
|
|
75
|
+
export let transports = [
|
|
76
|
+
'process',
|
|
77
|
+
'http',
|
|
78
|
+
'machine'
|
|
79
|
+
];
|
|
80
|
+
export let signalKinds = [
|
|
81
|
+
'lapse',
|
|
82
|
+
'sweep',
|
|
83
|
+
'scene',
|
|
84
|
+
'wake'
|
|
85
|
+
];
|
|
86
|
+
export let effectStates = [
|
|
87
|
+
'pending',
|
|
88
|
+
'leased',
|
|
89
|
+
'delivered',
|
|
90
|
+
'failed'
|
|
91
|
+
];
|
|
92
|
+
export let appAccess = [
|
|
93
|
+
'public',
|
|
94
|
+
'open',
|
|
95
|
+
'private'
|
|
96
|
+
];
|
|
97
|
+
export let planTiers = [
|
|
98
|
+
'free',
|
|
99
|
+
'plus',
|
|
100
|
+
'pro'
|
|
101
|
+
];
|
|
102
|
+
export let hostnameStages = [
|
|
103
|
+
'pending',
|
|
104
|
+
'active',
|
|
105
|
+
'error'
|
|
106
|
+
];
|
|
107
|
+
// The keyword vocabularies the documents are written with: every set the
|
|
108
|
+
// packages ship.
|
|
109
|
+
export let keywords = [
|
|
110
|
+
idKeywords,
|
|
111
|
+
nameKeywords,
|
|
112
|
+
edgeKeywords,
|
|
113
|
+
blobKeywords,
|
|
114
|
+
kernelKeywords,
|
|
115
|
+
keyKeywords
|
|
116
|
+
];
|
|
117
|
+
// The loaded vocabulary itself, for readers that ask it directly (the renderer
|
|
118
|
+
// registry, the browser replica).
|
|
119
|
+
export let vocab = loadVocab([], keywords);
|
|
120
|
+
// The components and their wire-writable columns, each with what it IS.
|
|
121
|
+
export let comps = {};
|
|
122
|
+
// Composite indexes (see index.ts): what a component declares `index` or
|
|
123
|
+
// `unique` over.
|
|
124
|
+
export let indexes = {};
|
|
125
|
+
// Components never part of a working set (the kernel's `lazy` keyword): a
|
|
126
|
+
// view that needs them holds its own subscription (live.ts entrySub).
|
|
127
|
+
export let partition = {};
|
|
128
|
+
// Server-stamped columns — never wire-writable, still read.
|
|
129
|
+
export let stamped = {};
|
|
130
|
+
// kind is DERIVED: the most specific component an entity carries names it.
|
|
131
|
+
export let kindOrder = [];
|
|
132
|
+
// Kinds whose doc title is a NAME a caller can type (near.ts).
|
|
133
|
+
export let byName = new Set();
|
|
134
|
+
// An entity's id as a person reads it: `T-9` once the store numbers it, its
|
|
135
|
+
// short handle `#3b5bc70420` until then. @yaks/id's, the one every door reads
|
|
136
|
+
// an id through.
|
|
137
|
+
export let idOf = idsOf(vocab);
|
|
138
|
+
let irregular = {
|
|
139
|
+
person: 'people'
|
|
140
|
+
};
|
|
141
|
+
// The edge vocabulary — every edge reads as a sentence, parent first: each
|
|
142
|
+
// relation a component declares with the `edge` keyword.
|
|
143
|
+
export let edges = [];
|
|
144
|
+
// Durable work/knowledge facets governed by project-rooted edge paths.
|
|
145
|
+
export let governed = [
|
|
146
|
+
'task',
|
|
147
|
+
'architecture',
|
|
148
|
+
'memory',
|
|
149
|
+
'persona'
|
|
150
|
+
];
|
|
151
|
+
// What the host derives a session's status as, and the ones still going.
|
|
152
|
+
export let sessionStates = [
|
|
153
|
+
'pending',
|
|
154
|
+
'running',
|
|
155
|
+
'settled',
|
|
156
|
+
'stopped',
|
|
157
|
+
'failed'
|
|
158
|
+
];
|
|
159
|
+
export let sessionActive = [
|
|
160
|
+
'pending',
|
|
161
|
+
'running'
|
|
162
|
+
];
|
|
163
|
+
// One property, in the words the views speak (PropType below).
|
|
164
|
+
let typeOf = (v, comp, prop)=>{
|
|
165
|
+
let p = v.prop(comp, prop);
|
|
166
|
+
let raw = v.def(comp)?.properties?.[prop] ?? {};
|
|
167
|
+
if (p.category == 'ref') {
|
|
168
|
+
return {
|
|
169
|
+
eid: p.ref || 'entity',
|
|
170
|
+
death: p.death ?? 'keep'
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
if (p.category == 'enum') {
|
|
174
|
+
return {
|
|
175
|
+
enum: p.values?.map(String) ?? [],
|
|
176
|
+
...p.aliases ? {
|
|
177
|
+
aliases: p.aliases
|
|
178
|
+
} : {}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
if (raw.store == 'blob') return 'body';
|
|
182
|
+
if (raw.well) return {
|
|
183
|
+
text: raw.well
|
|
184
|
+
};
|
|
185
|
+
let s = p.scalar;
|
|
186
|
+
return s == 'bool' || s == 'number' || s == 'priority' || s == 'time' || s == 'url' || s == 'query' ? s : 'text';
|
|
187
|
+
};
|
|
188
|
+
/** Read the tables above out of a host's vocabulary documents, replacing
|
|
189
|
+
* whatever was learned before. */ export let learn = (docs, hostKeywords)=>{
|
|
190
|
+
if (hostKeywords) keywords = hostKeywords;
|
|
191
|
+
let v = loadVocab(docs, keywords);
|
|
192
|
+
let c = {};
|
|
193
|
+
let st = {};
|
|
194
|
+
let ix = {};
|
|
195
|
+
let names = new Set();
|
|
196
|
+
let parts = {};
|
|
197
|
+
// The spine's columns are the store's to stamp: read and filtered on, never
|
|
198
|
+
// written. Its identity, eid, is read through spineProps below.
|
|
199
|
+
let spine = v.props('entity').map((p)=>[
|
|
200
|
+
p,
|
|
201
|
+
typeOf(v, 'entity', p)
|
|
202
|
+
]);
|
|
203
|
+
if (spine.length) st.entity = Object.fromEntries(spine);
|
|
204
|
+
for (let name of v.all.filter((n)=>n != 'entity')){
|
|
205
|
+
let def = v.def(name) ?? {};
|
|
206
|
+
let own = {};
|
|
207
|
+
let server = {};
|
|
208
|
+
// A computed column is the host's to derive: read, filtered on, never
|
|
209
|
+
// written — the same standing as a stamped one.
|
|
210
|
+
for (let prop of v.props(name)){
|
|
211
|
+
let p = v.prop(name, prop);
|
|
212
|
+
(p.stamped || p.computed ? server : own)[prop] = typeOf(v, name, prop);
|
|
213
|
+
}
|
|
214
|
+
c[name] = own;
|
|
215
|
+
if (Object.keys(server).length) st[name] = server;
|
|
216
|
+
let rows = [
|
|
217
|
+
...(def.unique ?? []).map((cols)=>({
|
|
218
|
+
cols,
|
|
219
|
+
unique: true
|
|
220
|
+
})),
|
|
221
|
+
...(def.index ?? []).map((cols)=>({
|
|
222
|
+
cols
|
|
223
|
+
}))
|
|
224
|
+
].filter((r)=>Array.isArray(r.cols));
|
|
225
|
+
if (rows.length) ix[name] = rows;
|
|
226
|
+
if (def.by_name) names.add(name);
|
|
227
|
+
if (v.comp(name)?.keywords?.lazy) parts[name] = 'lazy';
|
|
228
|
+
}
|
|
229
|
+
vocab = v;
|
|
230
|
+
comps = c;
|
|
231
|
+
stamped = st;
|
|
232
|
+
indexes = ix;
|
|
233
|
+
idOf = idsOf(v);
|
|
234
|
+
byName = names;
|
|
235
|
+
edges = Object.keys(edgeRelations(v));
|
|
236
|
+
partition = parts;
|
|
237
|
+
kindOrder = [
|
|
238
|
+
...v.kinds
|
|
239
|
+
];
|
|
240
|
+
kindRank = new Map(kindOrder.map((k, i)=>[
|
|
241
|
+
k,
|
|
242
|
+
i
|
|
243
|
+
]));
|
|
244
|
+
planted = 0;
|
|
245
|
+
plurals = new Set(kindOrder.flatMap((k)=>[
|
|
246
|
+
plural(k),
|
|
247
|
+
`${k}s`
|
|
248
|
+
]));
|
|
249
|
+
return v;
|
|
250
|
+
};
|
|
251
|
+
// One column's type in a word an app author already knows — the five a
|
|
252
|
+
// vocab.json may spell (store/vocab.ts TYPES), plus `eid` for a reference and
|
|
253
|
+
// the values themselves for a closed set. The internal spellings collapse:
|
|
254
|
+
// a body and a saved query are text, a priority is a number.
|
|
255
|
+
export let typeName = (t)=>typeof t == 'string' ? t == 'body' || t == 'query' ? 'text' : t == 'priority' ? 'number' : t : 'enum' in t ? t.enum.join('|') : 'eid' in t ? 'eid' : 'text';
|
|
256
|
+
// A component's whole shape, said in one line: `attachment has artifact
|
|
257
|
+
// (eid), media_type (text), name (text)`. Every unknown-column refusal carries it, at the
|
|
258
|
+
// write door and the filter door alike, because a refusal that names only what
|
|
259
|
+
// it did not understand teaches nothing — the seventh user test learned
|
|
260
|
+
// `artifact` by guessing five times and still read `size` as the bytes
|
|
261
|
+
// (C-32675 items 2 and 3). `type` is how the caller's vocabulary answers what
|
|
262
|
+
// a column is; a column it cannot type says its name alone.
|
|
263
|
+
export let shapeOf = (name, cols, type = ()=>undefined)=>{
|
|
264
|
+
let said = cols.map((col)=>{
|
|
265
|
+
let t = type(col);
|
|
266
|
+
return t ? `${col} (${typeName(t)})` : col;
|
|
267
|
+
});
|
|
268
|
+
return said.length ? `${name} has ${said.join(', ')}` : `${name} has no columns`;
|
|
269
|
+
};
|
|
270
|
+
export let verdictName = (verdict)=>String(verdict ?? '').replaceAll('_', ' ');
|
|
271
|
+
// DERIVED columns (D-24102): readable exactly like a stored column — filter,
|
|
272
|
+
// project, tally, sort — but absent from `comps`/`stamped`, so raw graph writes
|
|
273
|
+
// cannot store one. The query evaluators compute the value (statusOf in query.ts
|
|
274
|
+
// read() and its SQL CASE mirror). Merged into readable routing so
|
|
275
|
+
// `.task.status` resolves and type-checks; CLI/MCP compatibility writers expand
|
|
276
|
+
// that spelling into facets. `status` is the first and only member: it reads
|
|
277
|
+
// completed/cancelled/claim.
|
|
278
|
+
export let derivedProps = {
|
|
279
|
+
task: {
|
|
280
|
+
status: {
|
|
281
|
+
enum: statuses
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
// The spine's own identity column. The contract declares what a store STAMPS on
|
|
286
|
+
// `entity` (num); the `eid` beside it is the identity itself — readable on every
|
|
287
|
+
// row, never writable, and derived
|
|
288
|
+
// from nothing, so it belongs to neither map above. Declared here so both
|
|
289
|
+
// routing tables carry it and `.entity.eid=<id>` NAMES entities at this door exactly as
|
|
290
|
+
// @yaks/sql and @yaks/match answer the same predicate.
|
|
291
|
+
export let spineProps = {
|
|
292
|
+
entity: {
|
|
293
|
+
eid: 'text'
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
// Task status is derived, never stored (D-24102). The rule is the ladder the
|
|
297
|
+
// learned vocabulary declares (@yaks/task's `statusOf`): `cancelled`, then
|
|
298
|
+
// `completed`, then a held `claim` reads wip (@yaks/session's rung), then the
|
|
299
|
+
// `task.status` the row carries, else open. The carried value is what the host
|
|
300
|
+
// derived; it holds where a row arrives without its marks (a read answers the
|
|
301
|
+
// components it names, and an edge rider ships projected columns only). A mark
|
|
302
|
+
// the row does carry wins, so a local patch reads its own evidence before the
|
|
303
|
+
// host's older answer. `has` is a component bag (a live row's `.comps`, a
|
|
304
|
+
// Row's comps).
|
|
305
|
+
export let statusOf = (has)=>taskStatus(vocab, has) ?? 'open';
|
|
306
|
+
// Settled = no longer open work, whether it finished or was called off.
|
|
307
|
+
// Gating, board defaults, and lease-lapse audits all key off this
|
|
308
|
+
// instead of 'done' alone, so a cancelled blocker releases its gate too.
|
|
309
|
+
export { settled };
|
|
310
|
+
export let lazy = (name)=>partition[name] === 'lazy';
|
|
311
|
+
// A component's wire-writable column names — what most consumers of the
|
|
312
|
+
// old flat list actually want.
|
|
313
|
+
export let cols = (comp)=>Object.keys(comps[comp] ?? {});
|
|
314
|
+
// The reaper's worklists, derived: every wire-writable reference wearing
|
|
315
|
+
// the given death word, as (comp, column) pairs. The host walks these when
|
|
316
|
+
// an entity dies — the declarations above ARE the cascade, so a new
|
|
317
|
+
// reference can't dodge the reaper by forgetting a hand-kept list.
|
|
318
|
+
// (`stamped` refs stay out on purpose: server-owned rows die by server
|
|
319
|
+
// code, not by the wire's cascade.)
|
|
320
|
+
export let deaths = (word)=>Object.entries(comps).flatMap(([name, props])=>Object.entries(props).flatMap(([col, t])=>typeof t == 'object' && 'eid' in t && t.death == word ? [
|
|
321
|
+
[
|
|
322
|
+
name,
|
|
323
|
+
col
|
|
324
|
+
]
|
|
325
|
+
] : []));
|
|
326
|
+
// The eid minter. Both sides of the wire mint them (clients name their own
|
|
327
|
+
// entities), so it must work on both: crypto.randomUUID is gated to secure
|
|
328
|
+
// contexts and this page is served over plain http on the tailnet, while
|
|
329
|
+
// getRandomValues is gated nowhere.
|
|
330
|
+
export let uuid = ()=>{
|
|
331
|
+
let b = crypto.getRandomValues(new Uint8Array(16));
|
|
332
|
+
b[6] = b[6] & 0x0f | 0x40;
|
|
333
|
+
b[8] = b[8] & 0x3f | 0x80;
|
|
334
|
+
let h = [
|
|
335
|
+
...b
|
|
336
|
+
].map((x)=>x.toString(16).padStart(2, '0')).join('');
|
|
337
|
+
return `${h.slice(0, 8)}-${h.slice(8, 12)}-${h.slice(12, 16)}-${h.slice(16, 20)}-${h.slice(20)}`;
|
|
338
|
+
};
|
|
339
|
+
// Token counts the way a human reads them: 831, 12k, 1.2M.
|
|
340
|
+
export let kilo = (n)=>n < 1000 ? String(n) : n < 1e6 ? `${+(n / 1e3).toFixed(n < 10_000 ? 1 : 0)}k` : `${+(n / 1e6).toFixed(1)}M`;
|
|
341
|
+
// Precedence as a LOOKUP, one rank per kind. kindOf runs once per row on
|
|
342
|
+
// every snapshot read, so it must cost the ENTITY's component count (a
|
|
343
|
+
// handful), never the vocabulary's (~50 and growing): a scan down kindOrder
|
|
344
|
+
// charges every row for wherever its kind happens to sit, and kindOrder is
|
|
345
|
+
// derived (alphabetical, refined by `before`), so nothing keeps the hot
|
|
346
|
+
// kinds near the front of it.
|
|
347
|
+
//
|
|
348
|
+
// An APP's own components join the same table when a store
|
|
349
|
+
// plants them — the registry query.ts keeps for the
|
|
350
|
+
// filter grammar, safe for the same reason: a row wears a word only if its
|
|
351
|
+
// OWN store planted the table, so no store is ever told about another's
|
|
352
|
+
// rows. They rank NEGATIVE in the order learned, so a store's word beats
|
|
353
|
+
// every platform kind and an earlier-planted word beats a later one.
|
|
354
|
+
let kindRank = new Map(kindOrder.map((k, i)=>[
|
|
355
|
+
k,
|
|
356
|
+
i
|
|
357
|
+
]));
|
|
358
|
+
let planted = 0;
|
|
359
|
+
export let learnKinds = (names)=>{
|
|
360
|
+
for (let name of names)if (!kindRank.has(name)) kindRank.set(name, --planted);
|
|
361
|
+
};
|
|
362
|
+
// A store's own word is the most specific thing it says about a row, so it
|
|
363
|
+
// outranks every platform kind: an entity carrying `book` IS a book, not the
|
|
364
|
+
// `doc` it also wears for its title (C-32574 item 7).
|
|
365
|
+
export let kindOf = (has)=>{
|
|
366
|
+
let kind = 'entity';
|
|
367
|
+
let best = Infinity;
|
|
368
|
+
for(let k in has){
|
|
369
|
+
if (!has[k]) continue;
|
|
370
|
+
let r = kindRank.get(k) ?? Infinity;
|
|
371
|
+
if (r < best) [best, kind] = [
|
|
372
|
+
r,
|
|
373
|
+
k
|
|
374
|
+
];
|
|
375
|
+
}
|
|
376
|
+
return kind;
|
|
377
|
+
};
|
|
378
|
+
// The id of an entity read as its components, its `entity` row among them:
|
|
379
|
+
// the number and the prefix stored there, the kind's letter for a row stored
|
|
380
|
+
// without one.
|
|
381
|
+
export let idIn = (eid, has)=>idOf({
|
|
382
|
+
eid,
|
|
383
|
+
kind: kindOf(has),
|
|
384
|
+
num: has.entity?.num,
|
|
385
|
+
prefix: has.entity?.prefix
|
|
386
|
+
});
|
|
387
|
+
// Kinds are singular in the graph and plural in the mouth — a listing is
|
|
388
|
+
// asked for `projects`, never `project`. Derived, so a new kind gets its
|
|
389
|
+
// listing word the moment it joins kindOrder.
|
|
390
|
+
export let plural = (kind)=>irregular[kind] ?? (kind.endsWith('y') ? `${kind.slice(0, -1)}ies` : /(?:s|x|ch|sh)$/.test(kind) ? `${kind}es` : `${kind}s`);
|
|
391
|
+
// Every plural spelling — the naive one rides along so whatever a listing
|
|
392
|
+
// accepts as a word, the bare verb accepts too.
|
|
393
|
+
export let plurals = new Set(kindOrder.flatMap((k)=>[
|
|
394
|
+
plural(k),
|
|
395
|
+
`${k}s`
|
|
396
|
+
]));
|
|
397
|
+
// The word a caller types for a kind, in either number — the naive plural
|
|
398
|
+
// too, so `persons` still lands where `people` does.
|
|
399
|
+
export let kindWord = (word)=>kindOrder.find((k)=>k == word || plural(k) == word || `${k}s` == word);
|
|
400
|
+
// Identity refusals must not become a saved query's ordinary "not loaded" miss.
|
|
401
|
+
export class IdError extends Error {
|
|
402
|
+
}
|
|
403
|
+
// The hex a short handle (@yaks/id `SHORT`, `#3b5bc70420`) names.
|
|
404
|
+
export let shortHex = (id)=>SHORT.test(id) ? id.slice(1).toLowerCase() : undefined;
|
|
405
|
+
// A WHOLE eid, in every shape a client may name an entity by: the uuid it
|
|
406
|
+
// mints, or the hash a content-addressed entity is its own name by — a
|
|
407
|
+
// blob's sha-256 (64 hex), a commit's git sha (40). One spelling for every
|
|
408
|
+
// id door, so none of them can drift out of knowing a shape the others take
|
|
409
|
+
// (props.ts reference, client.ts minting).
|
|
410
|
+
export let EID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|^[0-9a-f]{40}$|^[0-9a-f]{64}$/i;
|
|
411
|
+
// A model's short name — 'claude-fable-5' is fable, 'gpt-5.6-sol' is sol:
|
|
412
|
+
// drop the vendor word and anything wearing a digit, keep what's left.
|
|
413
|
+
// The composer greets an agent by it; a persona's name outranks it once
|
|
414
|
+
// personas exist.
|
|
415
|
+
export let nick = (model)=>{
|
|
416
|
+
let words = (model ?? '').split('-').filter((w)=>w && !/\d/.test(w) && w != 'claude' && w != 'gpt');
|
|
417
|
+
return words.join('-') || null;
|
|
418
|
+
};
|
|
419
|
+
// A model id worn friendly — nick's display face: the vendor prefix and
|
|
420
|
+
// date pin drop, version digits regain their dots, words their caps.
|
|
421
|
+
// 'claude-opus-4-8' → 'Opus 4.8', 'gpt-5.6-sol' → 'GPT 5.6 Sol'.
|
|
422
|
+
export let friendly = (model)=>{
|
|
423
|
+
let words = [];
|
|
424
|
+
for (let w of (model ?? '').replace(/-\d{8}$/, '').split('-').filter(Boolean)){
|
|
425
|
+
if (/^[\d.]+$/.test(w) && /\d$/.test(words.at(-1) ?? '')) {
|
|
426
|
+
words[words.length - 1] += `.${w}`;
|
|
427
|
+
} else if (w != 'claude') {
|
|
428
|
+
words.push(w == 'gpt' ? 'GPT' : w[0].toUpperCase() + w.slice(1));
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
return words.join(' ') || null;
|
|
432
|
+
};
|
|
433
|
+
// Is anybody home? A session whose transcript still asks for work is, and so
|
|
434
|
+
// is one whose process has not exited — a harness session announces itself
|
|
435
|
+
// with a pid and keeps no transcript for the host to read a status from.
|
|
436
|
+
export let awake = (e)=>sessionActive.includes(String(e.session?.status)) || !!e.process?.pid && !e.exit;
|
|
437
|
+
// The word a session's pip and label wear. Between turns an awake session is
|
|
438
|
+
// idle; otherwise its status, or `running` while only its process says so. An
|
|
439
|
+
// ended one keeps its ending.
|
|
440
|
+
export let standing = (e)=>awake(e) && e.session?.standing == 'idle' ? 'idle' : e.session?.status || (awake(e) ? 'running' : '');
|
|
441
|
+
// The name an alias key gives and the entity it names — one reading for every
|
|
442
|
+
// resolution door (client.ts find, live.ts cache); undefined for any other
|
|
443
|
+
// row.
|
|
444
|
+
export let aliasOf = (c)=>c.alias && c.key?.value && c.key.of ? {
|
|
445
|
+
name: String(c.key.value),
|
|
446
|
+
eid: String(c.key.of)
|
|
447
|
+
} : undefined;
|
|
448
|
+
// A page learns its host's vocabulary here, at the bottom of the module, so
|
|
449
|
+
// every module that imports this one evaluates with the tables full.
|
|
450
|
+
if (globalThis.document && !('Deno' in globalThis)) {
|
|
451
|
+
// This independent authenticated read need not wait for vocabulary parsing.
|
|
452
|
+
writeOwner.begin(new URL(hosting().owner, `${location.origin}${hosting().api}`).href);
|
|
453
|
+
let wire = await (await fetch(apiPath('/vocab'))).json();
|
|
454
|
+
learn(wire.docs, wire.keywords);
|
|
455
|
+
}
|
|
456
|
+
//# sourceMappingURL=types.js.map
|
package/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["./types.ts"],"names":[],"mappings":"AAAA,SAAS,OAAO,EAAE,OAAO,uBAAsB;AAC/C,SAAS,UAAU,qBAAoB;AACvC,8EAA8E;AAC9E,oEAAoE;AACpE,qEAAqE;AACrE,2EAA2E;AAC3E,yEAAyE;AACzE,2CAA2C;AAC3C,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,wEAAwE;AACxE,yEAAyE;AACzE,UAAU;AAEV,SAEE,SAAS,2BAGoB;AAC/B,SAAS,QAAQ,KAAK,EAAE,KAAK,wBAA6B;AAC1D,SAAS,UAAU,8BAAmC;AACtD,SAAS,YAAY,2BAAgC;AACrD,SAAS,YAAY,gCAAqC;AAC1D,SAAS,aAAa,aAAa,0BAA+B;AAClE,SAAS,YAAY,0BAA+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