@graview/core 0.1.63 → 0.1.65
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/dist/catalog.d.ts +32 -2
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +1 -0
- package/dist/catalog.js.map +1 -1
- package/dist/compose.d.ts +25 -1
- package/dist/compose.d.ts.map +1 -1
- package/dist/compose.js +56 -0
- package/dist/compose.js.map +1 -1
- package/dist/conformance/index.d.ts +6 -0
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +3 -0
- package/dist/conformance/index.js.map +1 -1
- package/dist/conformance/plan-host.d.ts +73 -0
- package/dist/conformance/plan-host.d.ts.map +1 -0
- package/dist/conformance/plan-host.js +64 -0
- package/dist/conformance/plan-host.js.map +1 -0
- package/dist/conformance/told-host.d.ts +40 -0
- package/dist/conformance/told-host.d.ts.map +1 -0
- package/dist/conformance/told-host.js +57 -0
- package/dist/conformance/told-host.js.map +1 -0
- package/dist/conformance/view-revision-host.d.ts +36 -0
- package/dist/conformance/view-revision-host.d.ts.map +1 -0
- package/dist/conformance/view-revision-host.js +42 -0
- package/dist/conformance/view-revision-host.js.map +1 -0
- package/dist/document/brand-check.d.ts.map +1 -1
- package/dist/document/brand-check.js +8 -2
- package/dist/document/brand-check.js.map +1 -1
- package/dist/document/connection-findings.js +15 -8
- package/dist/document/connection-findings.js.map +1 -1
- package/dist/document/connection-spec.d.ts +22 -0
- package/dist/document/connection-spec.d.ts.map +1 -1
- package/dist/document/connection-spec.js +24 -2
- package/dist/document/connection-spec.js.map +1 -1
- package/dist/document/edit.js +1 -1
- package/dist/document/edit.js.map +1 -1
- package/dist/document/expr/evaluate.d.ts.map +1 -1
- package/dist/document/expr/evaluate.js +29 -2
- package/dist/document/expr/evaluate.js.map +1 -1
- package/dist/document/schema.d.ts +10 -0
- package/dist/document/schema.d.ts.map +1 -1
- package/dist/document/schema.js +4 -1
- package/dist/document/schema.js.map +1 -1
- package/dist/document.schema.json +45 -2
- package/dist/head.d.ts +81 -0
- package/dist/head.d.ts.map +1 -0
- package/dist/head.js +123 -0
- package/dist/head.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/intelligence-bridge.d.ts +2 -0
- package/dist/intelligence-bridge.d.ts.map +1 -1
- package/dist/plan-edits.d.ts +55 -0
- package/dist/plan-edits.d.ts.map +1 -0
- package/dist/plan-edits.js +84 -0
- package/dist/plan-edits.js.map +1 -0
- package/dist/presence.d.ts +10 -0
- package/dist/presence.d.ts.map +1 -1
- package/dist/presence.js.map +1 -1
- package/dist/revisions/beyond.d.ts +56 -0
- package/dist/revisions/beyond.d.ts.map +1 -0
- package/dist/revisions/beyond.js +112 -0
- package/dist/revisions/beyond.js.map +1 -0
- package/dist/revisions/pictured.d.ts +52 -0
- package/dist/revisions/pictured.d.ts.map +1 -0
- package/dist/revisions/pictured.js +85 -0
- package/dist/revisions/pictured.js.map +1 -0
- package/dist/revisions/problems.d.ts +57 -0
- package/dist/revisions/problems.d.ts.map +1 -0
- package/dist/revisions/problems.js +51 -0
- package/dist/revisions/problems.js.map +1 -0
- package/dist/revisions/sections.d.ts +18 -0
- package/dist/revisions/sections.d.ts.map +1 -0
- package/dist/revisions/sections.js +91 -0
- package/dist/revisions/sections.js.map +1 -0
- package/dist/revisions/view.d.ts +71 -0
- package/dist/revisions/view.d.ts.map +1 -0
- package/dist/revisions/view.js +338 -0
- package/dist/revisions/view.js.map +1 -0
- package/dist/revisions.d.ts +11 -0
- package/dist/revisions.d.ts.map +1 -0
- package/dist/revisions.js +20 -0
- package/dist/revisions.js.map +1 -0
- package/dist/scene.d.ts +2 -2
- package/dist/scene.d.ts.map +1 -1
- package/dist/scene.js +1 -1
- package/dist/scene.js.map +1 -1
- package/dist/sync/connection.d.ts.map +1 -1
- package/dist/sync/connection.js +12 -8
- package/dist/sync/connection.js.map +1 -1
- package/dist/sync/engine.d.ts +14 -0
- package/dist/sync/engine.d.ts.map +1 -1
- package/dist/sync/engine.js +8 -1
- package/dist/sync/engine.js.map +1 -1
- package/dist/sync/index.d.ts +2 -2
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +1 -1
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/notion.d.ts +2 -1
- package/dist/sync/notion.d.ts.map +1 -1
- package/dist/sync/notion.js +28 -16
- package/dist/sync/notion.js.map +1 -1
- package/dist/sync/status.d.ts +1 -1
- package/dist/sync/status.d.ts.map +1 -1
- package/dist/sync/status.js +2 -1
- package/dist/sync/status.js.map +1 -1
- package/dist/sync/types.d.ts +5 -0
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/sync/types.js.map +1 -1
- package/dist/theme/marks.d.ts +12 -0
- package/dist/theme/marks.d.ts.map +1 -1
- package/dist/theme/marks.js +5 -0
- package/dist/theme/marks.js.map +1 -1
- package/dist/told.d.ts +306 -0
- package/dist/told.d.ts.map +1 -0
- package/dist/told.js +409 -0
- package/dist/told.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/views/kept.d.ts +44 -0
- package/dist/views/kept.d.ts.map +1 -1
- package/dist/views/kept.js +30 -0
- package/dist/views/kept.js.map +1 -1
- package/dist/workflow-shape.d.ts +12 -6
- package/dist/workflow-shape.d.ts.map +1 -1
- package/dist/workflow-shape.js.map +1 -1
- package/dist/workflows/on-the-map.d.ts +14 -5
- package/dist/workflows/on-the-map.d.ts.map +1 -1
- package/dist/workflows/on-the-map.js +6 -4
- package/dist/workflows/on-the-map.js.map +1 -1
- package/dist/workflows/step-classify.d.ts +2 -0
- package/dist/workflows/step-classify.d.ts.map +1 -1
- package/dist/workflows/step-classify.js +26 -9
- package/dist/workflows/step-classify.js.map +1 -1
- package/dist/workflows/triggered.d.ts +14 -1
- package/dist/workflows/triggered.d.ts.map +1 -1
- package/dist/workflows/triggered.js +19 -2
- package/dist/workflows/triggered.js.map +1 -1
- package/dist/workflows.d.ts +2 -2
- package/dist/workflows.d.ts.map +1 -1
- package/dist/workflows.js +2 -2
- package/dist/workflows.js.map +1 -1
- package/package.json +13 -1
package/dist/told.d.ts
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@graview/core/told` — WHAT PEOPLE TELL GRAVIEW, KEPT (Roadmap f-menu-learns).
|
|
3
|
+
*
|
|
4
|
+
* "Tell Graview…" takes words about what a person is on — "finish all
|
|
5
|
+
* these", "assign this to Sam" — and answers with an act over records, a
|
|
6
|
+
* plan that changes the app, an open answer, or a refusal. A TELLING is the
|
|
7
|
+
* record of one of those: the words, what they were about (a kind and ids,
|
|
8
|
+
* never a record's content), which records they were read as, whom they
|
|
9
|
+
* named, what was decided and by which slot, how long it took, how it
|
|
10
|
+
* ended (previewed, accepted, declined, undone, abandoned), and what the
|
|
11
|
+
* person thought of it (👍, 👎 and "what should it have done?").
|
|
12
|
+
*
|
|
13
|
+
* Kept, tellings are what the app learns from: one that worked is offered
|
|
14
|
+
* again where somebody types something like it (`similarTellings`), and
|
|
15
|
+
* given to Jev and the light model as an example of what this app's people
|
|
16
|
+
* mean (`tellingExamples`); an owner sees them all in the Studio, marks a
|
|
17
|
+
* good one, excludes a bad one, deletes any (`toldTeachingWords` says how
|
|
18
|
+
* many teach).
|
|
19
|
+
*
|
|
20
|
+
* Who sees what: a telling is read back only by somebody who may see every
|
|
21
|
+
* record it names (`toldSeenBy`); a person reads their own, and somebody
|
|
22
|
+
* else's only once `minPeople` people (2 unsaid) have told the app the same
|
|
23
|
+
* kind of thing and it worked (`toldFor`) — the rule `@graview/core/learn`
|
|
24
|
+
* holds. A visitor is never recorded.
|
|
25
|
+
*
|
|
26
|
+
* Core keeps no storage of it: `memoryTold` here, `fileTold` (`told.json`
|
|
27
|
+
* beside the store, as `graview serve` and the dev server keep it) and the
|
|
28
|
+
* wire's door in `@graview/ship`, a host's own anywhere. A page reaches the
|
|
29
|
+
* host's through `HostAi.told` — `toldOver(url)` for a served one. Its own
|
|
30
|
+
* entry, because a page draws nothing with it: the answer card that records
|
|
31
|
+
* a telling and the Studio that lists them are fetched when opened.
|
|
32
|
+
*/
|
|
33
|
+
import type { Author } from "./ops/types.js";
|
|
34
|
+
import type { Principal } from "./permissions/types.js";
|
|
35
|
+
/** How a telling ended: still on the card, taken (Yes, Take, Accept), set aside (No, Dismiss), taken back, or closed with nothing done. */
|
|
36
|
+
export declare const TELLING_OUTCOMES: readonly ["previewed", "accepted", "declined", "undone", "abandoned"];
|
|
37
|
+
export type TellingOutcome = (typeof TELLING_OUTCOMES)[number];
|
|
38
|
+
/** Which slot decided it: the graph by the Fast slot (Jev), the light model, or the full one. */
|
|
39
|
+
export declare const TELLING_SLOTS: readonly ["graph", "light", "full"];
|
|
40
|
+
export type TellingSlot = (typeof TELLING_SLOTS)[number];
|
|
41
|
+
/** What a person thought of it. */
|
|
42
|
+
export type TellingRating = "up" | "down";
|
|
43
|
+
/** What was decided: one act over N records, a plan of N edits to the app, an open answer, or nothing it could do. */
|
|
44
|
+
export type TellingDecided = {
|
|
45
|
+
readonly type: "act";
|
|
46
|
+
readonly act: string;
|
|
47
|
+
readonly records: number;
|
|
48
|
+
} | {
|
|
49
|
+
readonly type: "plan";
|
|
50
|
+
readonly edits: number;
|
|
51
|
+
} | {
|
|
52
|
+
readonly type: "answer";
|
|
53
|
+
} | {
|
|
54
|
+
readonly type: "refusal";
|
|
55
|
+
}
|
|
56
|
+
/** A section of a worker view revised ("Make this better", Roadmap f-make-this-section-better), by the section's name. */
|
|
57
|
+
| {
|
|
58
|
+
readonly type: "view";
|
|
59
|
+
readonly section: string;
|
|
60
|
+
};
|
|
61
|
+
/** What the words were said on: the target's own kind and id, or the place. Never a record's content. */
|
|
62
|
+
export interface TellingTarget {
|
|
63
|
+
readonly on: "record" | "field" | "selection" | "list" | "lens" | "place" | "act";
|
|
64
|
+
readonly kind?: string;
|
|
65
|
+
readonly id?: string;
|
|
66
|
+
readonly place?: string;
|
|
67
|
+
}
|
|
68
|
+
/** Which records the words were read as: the target itself or the records it holds, by id. */
|
|
69
|
+
export interface TellingReading {
|
|
70
|
+
readonly which: "itself" | "held";
|
|
71
|
+
readonly kind: string;
|
|
72
|
+
readonly records: readonly string[];
|
|
73
|
+
}
|
|
74
|
+
/** One stage, timed. */
|
|
75
|
+
export interface TellingStage {
|
|
76
|
+
readonly stage: string;
|
|
77
|
+
readonly ms: number;
|
|
78
|
+
readonly model?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface Telling {
|
|
81
|
+
readonly id: string;
|
|
82
|
+
/** When it was told, ISO. */
|
|
83
|
+
readonly at: string;
|
|
84
|
+
/** Who told it: the seat's kind and id, and whom an agent acted for. */
|
|
85
|
+
readonly by: Author;
|
|
86
|
+
/** The person's own words, as typed. */
|
|
87
|
+
readonly words: string;
|
|
88
|
+
readonly target: TellingTarget;
|
|
89
|
+
readonly reading?: TellingReading;
|
|
90
|
+
/** The records the words named as people ("Sam", "her"), resolved, by id. */
|
|
91
|
+
readonly people?: readonly string[];
|
|
92
|
+
readonly decided: TellingDecided;
|
|
93
|
+
readonly slot?: TellingSlot;
|
|
94
|
+
readonly stages?: readonly TellingStage[];
|
|
95
|
+
/** How long it took from Enter to the answer, in milliseconds. */
|
|
96
|
+
readonly ms?: number;
|
|
97
|
+
readonly outcome: TellingOutcome;
|
|
98
|
+
readonly rating?: TellingRating;
|
|
99
|
+
/** What the person said it should have done, with a 👎. */
|
|
100
|
+
readonly should?: string;
|
|
101
|
+
/** The first telling of the card's conversation: its own id when it began one. */
|
|
102
|
+
readonly conversation: string;
|
|
103
|
+
/** The telling this one replies to on the same card. */
|
|
104
|
+
readonly follows?: string;
|
|
105
|
+
/** The AI interaction it answered as (`AiInteraction.id`, `@graview/core/catalog`). */
|
|
106
|
+
readonly interaction?: string;
|
|
107
|
+
/** The tellings given to the slots as examples, or the one a suggestion was taken from. */
|
|
108
|
+
readonly examples?: readonly string[];
|
|
109
|
+
/** An owner marked it a good example: ranked first among the like. */
|
|
110
|
+
readonly pinned?: boolean;
|
|
111
|
+
/** An owner excluded it: never suggested, never an example. */
|
|
112
|
+
readonly excluded?: boolean;
|
|
113
|
+
}
|
|
114
|
+
/** What a page hands the door: everything but who and when, which the door stamps. */
|
|
115
|
+
export type TellingDraft = Omit<Telling, "id" | "at" | "by" | "conversation"> & {
|
|
116
|
+
readonly id?: string;
|
|
117
|
+
readonly conversation?: string;
|
|
118
|
+
};
|
|
119
|
+
/** What may change on a kept telling: how it ended and how it was rated by its teller; pinned and excluded by an owner. */
|
|
120
|
+
export interface TellingChange {
|
|
121
|
+
readonly outcome?: TellingOutcome;
|
|
122
|
+
readonly rating?: TellingRating | null;
|
|
123
|
+
readonly should?: string | null;
|
|
124
|
+
readonly examples?: readonly string[];
|
|
125
|
+
readonly pinned?: boolean;
|
|
126
|
+
readonly excluded?: boolean;
|
|
127
|
+
}
|
|
128
|
+
/** The caps on what a telling keeps. */
|
|
129
|
+
export declare const TOLD_LIMITS: {
|
|
130
|
+
readonly words: 300;
|
|
131
|
+
readonly should: 300;
|
|
132
|
+
readonly name: 80;
|
|
133
|
+
readonly records: 200;
|
|
134
|
+
readonly people: 20;
|
|
135
|
+
readonly stages: 8;
|
|
136
|
+
readonly examples: 5;
|
|
137
|
+
};
|
|
138
|
+
/** How long a host keeps tellings when it says nothing: a year. */
|
|
139
|
+
export declare const TOLD_RETENTION_DAYS = 365;
|
|
140
|
+
/** The most a kept list holds, oldest let go first. */
|
|
141
|
+
export declare const TOLD_KEPT_MOST = 5000;
|
|
142
|
+
/** A fresh telling id. */
|
|
143
|
+
export declare const tellingId: () => string;
|
|
144
|
+
/**
|
|
145
|
+
* A DRAFT, KEPT AS A TELLING: its words bounded, its names and ids checked,
|
|
146
|
+
* stamped with an id, a time and its author — the door's, never the
|
|
147
|
+
* draft's. Undefined for a visitor and for a draft with no words or no
|
|
148
|
+
* decision.
|
|
149
|
+
*/
|
|
150
|
+
export declare function tellingOf(draft: TellingDraft, by: Author, options?: {
|
|
151
|
+
readonly at?: string;
|
|
152
|
+
readonly id?: string;
|
|
153
|
+
}): Telling | undefined;
|
|
154
|
+
/** The change a teller may make (outcome, rating, what it should have done, examples) and an owner may make (pinned, excluded), checked. */
|
|
155
|
+
export declare function tellingChange(asked: unknown): TellingChange | undefined;
|
|
156
|
+
/** Whether a change is only an owner's to make: pinning and excluding. */
|
|
157
|
+
export declare const curatesOnly: (change: TellingChange) => boolean;
|
|
158
|
+
/** Whether a change is only its teller's to make: how it ended, how it was rated, what it should have done. */
|
|
159
|
+
export declare const tellsOnly: (change: TellingChange) => boolean;
|
|
160
|
+
/**
|
|
161
|
+
* A TELLING CHANGED. An outcome never goes back to "previewed", and once a
|
|
162
|
+
* telling was accepted it ends only as undone: a card closed after its Yes
|
|
163
|
+
* did not abandon it. A rating taken away takes its "should" with it; a 👍
|
|
164
|
+
* keeps none.
|
|
165
|
+
*/
|
|
166
|
+
export declare function changedTelling(telling: Telling, change: TellingChange): Telling;
|
|
167
|
+
/**
|
|
168
|
+
* WHERE A HOST KEEPS TELLINGS: add one, change one, remove one, list them.
|
|
169
|
+
* `memoryTold` here; `fileTold` (`told.json` beside the store) and the
|
|
170
|
+
* wire's door in `@graview/ship`; `toldOver(url)` for a page; a host's own
|
|
171
|
+
* anywhere. Handed to a page as `HostAi.told`.
|
|
172
|
+
*/
|
|
173
|
+
export interface ToldStore {
|
|
174
|
+
add(telling: Telling): void | Promise<void>;
|
|
175
|
+
change(id: string, change: TellingChange): void | Promise<void>;
|
|
176
|
+
remove(id: string): void | Promise<void>;
|
|
177
|
+
list(): readonly Telling[] | Promise<readonly Telling[]>;
|
|
178
|
+
}
|
|
179
|
+
/** A store that answers at once: memory, a file. */
|
|
180
|
+
export interface HeldTold extends ToldStore {
|
|
181
|
+
add(telling: Telling): void;
|
|
182
|
+
change(id: string, change: TellingChange): void;
|
|
183
|
+
remove(id: string): void;
|
|
184
|
+
list(): readonly Telling[];
|
|
185
|
+
}
|
|
186
|
+
/** What a store keeps: within the retention, at most `most`, oldest let go first, one per id (the later kept). */
|
|
187
|
+
export declare function keptTold(tellings: readonly Telling[], options?: {
|
|
188
|
+
readonly retentionDays?: number;
|
|
189
|
+
readonly most?: number;
|
|
190
|
+
readonly now?: number;
|
|
191
|
+
}): readonly Telling[];
|
|
192
|
+
/** The tellings after one is added, changed or removed: what every held store does. */
|
|
193
|
+
export declare function toldAfter(tellings: readonly Telling[], step: {
|
|
194
|
+
readonly add: Telling;
|
|
195
|
+
} | {
|
|
196
|
+
readonly change: string;
|
|
197
|
+
readonly with: TellingChange;
|
|
198
|
+
} | {
|
|
199
|
+
readonly remove: string;
|
|
200
|
+
}, options?: {
|
|
201
|
+
readonly retentionDays?: number;
|
|
202
|
+
readonly most?: number;
|
|
203
|
+
}): readonly Telling[];
|
|
204
|
+
/** Tellings kept in memory for as long as the process (or the page) runs. */
|
|
205
|
+
export declare function memoryTold(options?: {
|
|
206
|
+
readonly retentionDays?: number;
|
|
207
|
+
readonly most?: number;
|
|
208
|
+
}): HeldTold;
|
|
209
|
+
/** The wire's path: `graview serve` answers it, and `toldOver` asks it. */
|
|
210
|
+
export declare const TOLD_PATH = "/graview/told";
|
|
211
|
+
/**
|
|
212
|
+
* A PAGE'S DOOR TO A SERVED HOST'S TELLINGS: `POST` one, `PATCH <id>` a
|
|
213
|
+
* change, `DELETE <id>`, `GET` what the asker may read. The server says who,
|
|
214
|
+
* from the session; nothing is awaited by whoever recorded; a host that
|
|
215
|
+
* keeps none (404, 410) is never asked again. `url` is the store's address
|
|
216
|
+
* (`TOLD_PATH` is added) or, with `path`, the door's own.
|
|
217
|
+
*/
|
|
218
|
+
export declare function toldOver(url: string, options?: {
|
|
219
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
220
|
+
readonly fetch?: typeof fetch;
|
|
221
|
+
readonly path?: string;
|
|
222
|
+
}): ToldStore;
|
|
223
|
+
/** Every record a telling names: its target, the records it was read as, the people. */
|
|
224
|
+
export declare const recordsOfTelling: (telling: Telling) => readonly string[];
|
|
225
|
+
/**
|
|
226
|
+
* WHAT A VIEWER MAY READ BACK: a telling about a record they may not see is
|
|
227
|
+
* hidden from them whole — its words would say what is there. `sees` is the
|
|
228
|
+
* viewer's sight (`seesId(store, principal)`).
|
|
229
|
+
*/
|
|
230
|
+
export declare function toldSeenBy(tellings: readonly Telling[], sees: (id: string) => boolean): readonly Telling[];
|
|
231
|
+
/** A person's own tellings, and an agent's acting for them. A seat with no id has none. */
|
|
232
|
+
export declare function ownTold(tellings: readonly Telling[], principal: Principal): readonly Telling[];
|
|
233
|
+
/** Whether a telling worked: accepted or 👍, never 👎, never excluded, never undone. */
|
|
234
|
+
export declare const tellingWorked: (telling: Telling) => boolean;
|
|
235
|
+
/**
|
|
236
|
+
* THE LESSONS ENOUGH PEOPLE AGREE ON: each act-over-a-kind (or plan on a
|
|
237
|
+
* kind) that worked for at least `minPeople` distinct people other than
|
|
238
|
+
* the reader. Only these of other people's tellings are ever suggested.
|
|
239
|
+
*/
|
|
240
|
+
export declare function agreedLessons(tellings: readonly Telling[], options?: {
|
|
241
|
+
readonly reader?: Principal;
|
|
242
|
+
readonly minPeople?: number;
|
|
243
|
+
}): ReadonlySet<string>;
|
|
244
|
+
/**
|
|
245
|
+
* WHAT A READER IS SERVED: everything, for an owner (`curator`); else their
|
|
246
|
+
* own, and of other people's only those that worked in a lesson enough
|
|
247
|
+
* people agree on (`agreedLessons`) — so one person's words are never shown
|
|
248
|
+
* to another until others told the app the same. Sight is `toldSeenBy`'s.
|
|
249
|
+
*/
|
|
250
|
+
export declare function toldFor(tellings: readonly Telling[], reader: Principal, options?: {
|
|
251
|
+
readonly minPeople?: number;
|
|
252
|
+
readonly curator?: boolean;
|
|
253
|
+
}): readonly Telling[];
|
|
254
|
+
/** What the Studio filters by: a rating (or none), an outcome, a kind. */
|
|
255
|
+
export interface ToldFilter {
|
|
256
|
+
readonly rating?: TellingRating | "none";
|
|
257
|
+
readonly outcome?: TellingOutcome;
|
|
258
|
+
readonly kind?: string;
|
|
259
|
+
}
|
|
260
|
+
export declare function toldMatching(tellings: readonly Telling[], filter: ToldFilter): readonly Telling[];
|
|
261
|
+
/** The tellings that teach: those that worked, act or plan, not excluded. */
|
|
262
|
+
export declare const teachingTold: (tellings: readonly Telling[]) => readonly Telling[];
|
|
263
|
+
/** What is teaching the system, in a sentence: "Suggestions come from 23 rated tellings in this app." */
|
|
264
|
+
export declare function toldTeachingWords(tellings: readonly Telling[]): string;
|
|
265
|
+
/** What a telling did, in words: "An act over 6 records", "A plan of 3 changes", "An open answer", "Nothing it could do". */
|
|
266
|
+
export declare function tellingDidWords(telling: Telling, titleOf?: (act: string) => string): string;
|
|
267
|
+
/** How a telling ended, in words. */
|
|
268
|
+
export declare const TELLING_OUTCOME_WORDS: Readonly<Record<TellingOutcome, string>>;
|
|
269
|
+
/** Words as they are compared: lower case, no accents, a plural's `s` gone, the common ones out. */
|
|
270
|
+
export declare function tellingWordsOf(words: string): readonly string[];
|
|
271
|
+
/** What a telling is like: the words typed, the kind they are on, the act wanted, if known. */
|
|
272
|
+
export interface TellingLike {
|
|
273
|
+
readonly words: string;
|
|
274
|
+
readonly kind?: string;
|
|
275
|
+
readonly act?: string;
|
|
276
|
+
}
|
|
277
|
+
export interface SimilarTelling {
|
|
278
|
+
readonly telling: Telling;
|
|
279
|
+
/** How alike, 0–1: the words' overlap, the kind and the act. */
|
|
280
|
+
readonly score: number;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* TELLINGS LIKE THESE WORDS THAT WORKED: accepted or 👍, never excluded,
|
|
284
|
+
* never 👎, never undone, ranked by how alike their words are (by the words'
|
|
285
|
+
* overlap, a typed word that begins one of theirs counting), the same kind
|
|
286
|
+
* and the same act — an owner's pinned first among equals. Cheap and local:
|
|
287
|
+
* no model. Another person's is offered only where `minPeople` people agree
|
|
288
|
+
* (`agreedLessons`); the reader's own always. One per lesson, so two
|
|
289
|
+
* suggestions say two things.
|
|
290
|
+
*/
|
|
291
|
+
export declare function similarTellings(tellings: readonly Telling[], like: TellingLike, options?: {
|
|
292
|
+
readonly reader?: Principal;
|
|
293
|
+
readonly minPeople?: number;
|
|
294
|
+
readonly most?: number;
|
|
295
|
+
readonly floor?: number;
|
|
296
|
+
readonly rated?: boolean;
|
|
297
|
+
}): readonly SimilarTelling[];
|
|
298
|
+
/** An example a slot is given: what was said and what was done, by name — no ids, no record's content. */
|
|
299
|
+
export interface TellingExample {
|
|
300
|
+
readonly said: string;
|
|
301
|
+
readonly did: string;
|
|
302
|
+
readonly reading?: "itself" | "held";
|
|
303
|
+
}
|
|
304
|
+
/** The like tellings that worked, as the Fast slot and the light model are given them. */
|
|
305
|
+
export declare function tellingExamples(similar: readonly SimilarTelling[]): readonly TellingExample[];
|
|
306
|
+
//# sourceMappingURL=told.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"told.d.ts","sourceRoot":"","sources":["../src/told.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAIxD,2IAA2I;AAC3I,eAAO,MAAM,gBAAgB,uEAAwE,CAAC;AACtG,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,iGAAiG;AACjG,eAAO,MAAM,aAAa,qCAAsC,CAAC;AACjE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,mCAAmC;AACnC,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,MAAM,CAAC;AAE1C,sHAAsH;AACtH,MAAM,MAAM,cAAc,GACtB;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAA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