@graview/studio 0.0.0-stage → 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.
Files changed (67) hide show
  1. package/LICENSE +96 -0
  2. package/README.md +31 -2
  3. package/dist/agent-panel.d.ts +11 -0
  4. package/dist/agent-panel.d.ts.map +1 -0
  5. package/dist/agent-panel.js +334 -0
  6. package/dist/agent-panel.js.map +1 -0
  7. package/dist/agent.d.ts +24 -0
  8. package/dist/agent.d.ts.map +1 -0
  9. package/dist/agent.js +371 -0
  10. package/dist/agent.js.map +1 -0
  11. package/dist/changes.d.ts +49 -0
  12. package/dist/changes.d.ts.map +1 -0
  13. package/dist/changes.js +217 -0
  14. package/dist/changes.js.map +1 -0
  15. package/dist/from-declaration.d.ts +13 -0
  16. package/dist/from-declaration.d.ts.map +1 -0
  17. package/dist/from-declaration.js +204 -0
  18. package/dist/from-declaration.js.map +1 -0
  19. package/dist/in-place.d.ts +27 -0
  20. package/dist/in-place.d.ts.map +1 -0
  21. package/dist/in-place.js +151 -0
  22. package/dist/in-place.js.map +1 -0
  23. package/dist/index.d.ts +24 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +15 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/lens.d.ts +9 -0
  28. package/dist/lens.d.ts.map +1 -0
  29. package/dist/lens.js +40 -0
  30. package/dist/lens.js.map +1 -0
  31. package/dist/meta.d.ts +2648 -0
  32. package/dist/meta.d.ts.map +1 -0
  33. package/dist/meta.js +553 -0
  34. package/dist/meta.js.map +1 -0
  35. package/dist/migration.d.ts +15 -0
  36. package/dist/migration.d.ts.map +1 -0
  37. package/dist/migration.js +82 -0
  38. package/dist/migration.js.map +1 -0
  39. package/dist/place.d.ts +61 -0
  40. package/dist/place.d.ts.map +1 -0
  41. package/dist/place.js +328 -0
  42. package/dist/place.js.map +1 -0
  43. package/dist/rewrite.d.ts +28 -0
  44. package/dist/rewrite.d.ts.map +1 -0
  45. package/dist/rewrite.js +52 -0
  46. package/dist/rewrite.js.map +1 -0
  47. package/dist/source.d.ts +69 -0
  48. package/dist/source.d.ts.map +1 -0
  49. package/dist/source.js +465 -0
  50. package/dist/source.js.map +1 -0
  51. package/dist/studio.d.ts +64 -0
  52. package/dist/studio.d.ts.map +1 -0
  53. package/dist/studio.js +96 -0
  54. package/dist/studio.js.map +1 -0
  55. package/dist/to-declaration.d.ts +24 -0
  56. package/dist/to-declaration.d.ts.map +1 -0
  57. package/dist/to-declaration.js +439 -0
  58. package/dist/to-declaration.js.map +1 -0
  59. package/dist/write-in-place.d.ts +27 -0
  60. package/dist/write-in-place.d.ts.map +1 -0
  61. package/dist/write-in-place.js +61 -0
  62. package/dist/write-in-place.js.map +1 -0
  63. package/dist/zod-source.d.ts +7 -0
  64. package/dist/zod-source.d.ts.map +1 -0
  65. package/dist/zod-source.js +124 -0
  66. package/dist/zod-source.js.map +1 -0
  67. package/package.json +58 -3
package/LICENSE ADDED
@@ -0,0 +1,96 @@
1
+ Elastic License 2.0
2
+
3
+ ## Acceptance
4
+
5
+ By using the software, you agree to all of the terms and conditions below.
6
+
7
+ ## Copyright License
8
+
9
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
10
+ non-sublicensable, non-transferable license to use, copy, distribute, make
11
+ available, and prepare derivative works of the software, in each case subject
12
+ to the limitations and conditions below.
13
+
14
+ ## Limitations
15
+
16
+ You may not provide the software to third parties as a hosted or managed
17
+ service, where the service provides users with access to any substantial set
18
+ of the features or functionality of the software.
19
+
20
+ You may not move, change, disable, or circumvent the license key
21
+ functionality in the software, and you may not remove or obscure any
22
+ functionality in the software that is protected by the license key.
23
+
24
+ You may not alter, remove, or obscure any licensing, copyright, or other
25
+ notices of the licensor in the software. Any use of the licensor's trademarks
26
+ is subject to applicable law.
27
+
28
+ ## Patents
29
+
30
+ The licensor grants you a license, under any patent claims the licensor can
31
+ license, or becomes able to license, to make, have made, use, sell, offer for
32
+ sale, import and have imported the software, in each case subject to the
33
+ limitations and conditions in this license. This license does not cover any
34
+ patent claims that you cause to be infringed by modifications or additions to
35
+ the software. If you or your company make any written claim that the software
36
+ infringes or contributes to infringement of any patent, your patent license
37
+ for the software granted under these terms ends immediately. If your company
38
+ makes such a claim, your patent license ends immediately for work on behalf
39
+ of your company.
40
+
41
+ ## Notices
42
+
43
+ You must ensure that anyone who gets a copy of any part of the software from
44
+ you also gets a copy of these terms.
45
+
46
+ If you modify the software, you must include in any modified copies of the
47
+ software prominent notices stating that you have modified the software.
48
+
49
+ ## No Other Rights
50
+
51
+ These terms do not imply any licenses other than those expressly granted in
52
+ these terms.
53
+
54
+ ## Termination
55
+
56
+ If you use the software in violation of these terms, such use is not
57
+ licensed, and your licenses will automatically terminate. If the licensor
58
+ provides you with a notice of your violation, and you cease all violation of
59
+ this license no later than 30 days after you receive that notice, your
60
+ licenses will be reinstated retroactively. However, if you violate these
61
+ terms after such reinstatement, any additional violation of these terms will
62
+ cause your licenses to terminate automatically and permanently.
63
+
64
+ ## No Liability
65
+
66
+ *As far as the law allows, the software comes as is, without any warranty or
67
+ condition, and the licensor will not be liable to you for any damages arising
68
+ out of these terms or the use or nature of the software, under any kind of
69
+ legal claim.*
70
+
71
+ ## Definitions
72
+
73
+ The **licensor** is the entity offering these terms, and the **software** is
74
+ the software the licensor makes available under these terms, including any
75
+ portion of it.
76
+
77
+ **you** refers to the individual or entity agreeing to these terms.
78
+
79
+ **your company** is any legal entity, sole proprietorship, or other kind of
80
+ organization that you work for, plus all organizations that have control
81
+ over, are under the control of, or are under common control with that
82
+ organization. **control** means ownership of substantially all the assets of
83
+ an entity, or the power to direct its management and policies by vote,
84
+ contract, or otherwise. Control can be direct or indirect.
85
+
86
+ **your licenses** are all the licenses granted to you for the software under
87
+ these terms.
88
+
89
+ **use** means anything you do with the software requiring one of your
90
+ licenses.
91
+
92
+ **trademark** means trademarks, service marks, and similar rights.
93
+
94
+ ---
95
+
96
+ Copyright 2025-2026 En Dash Consulting
package/README.md CHANGED
@@ -1,3 +1,32 @@
1
- # Temporary Holding Version
1
+ # @graview/studio
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The declaration itself as a graph. Kinds, fields, edges, acts, rules, roles,
4
+ grants, lenses and the brand are nodes of a meta-schema declared with the
5
+ same `defineNode` an app uses, so the studio is a Graview app over the
6
+ declaration: adding a field is an act, renaming a kind is an act, every
7
+ change is an op with an author, an intent and an inverse, and `graview check`
8
+ judges the result before it is applied.
9
+
10
+ ```ts
11
+ import { createStudio, createStudioLens } from "@graview/studio";
12
+
13
+ const studio = createStudio(app); // the app's declaration, as a store
14
+ studio.store.apply({ name: "add-field", args: { kind: "kind:plot", label: "soil", type: "enum", required: true, options: ["clay", "loam"] } });
15
+ studio.check(); // graview check on what it would become
16
+ const applied = studio.apply(); // { app, migration } — refused while there are errors
17
+ studio.files(); // src/domain/schema.ts, mutations.ts, invariants.ts, policy.ts
18
+
19
+ // An agent proposes; a person keeps or takes back.
20
+ studio.propose({ name: "add-kind", args: { label: "bed" } }, { kind: "agent", id: "planner" });
21
+ studio.proposals(); // the agent's batches still standing
22
+ studio.decline("proposal:1"); // undo, like any turn of an agent's
23
+ ```
24
+
25
+ `createStudioLens(app).View`, registered over the studio's kinds with a
26
+ title, is a place: what the checker says, judged on every change.
27
+
28
+ What a graph can carry is the declaration's shape. An act's hand-written
29
+ body and a rule's judgement are code: the studio keeps the checkout's by
30
+ name, writes a body for an act it declared from what the act says (create,
31
+ connect, sever, write), and writes a rule it declared as one that judges
32
+ nothing until the checkout gives it an `evaluate`.
@@ -0,0 +1,11 @@
1
+ import { type AnySchema } from "@graview/core";
2
+ import { type Responder } from "@graview/tools";
3
+ import type { StudioSchema } from "./meta.js";
4
+ import type { Studio } from "./studio.js";
5
+ export declare function StudioAgentPanel({ studio, respond, testId, }: {
6
+ readonly studio: Studio<AnySchema>;
7
+ /** How the seat answers, when a host decides — as on the app's own chat. Defaults to the ladder over the declaration's floor. */
8
+ readonly respond?: Responder<StudioSchema>;
9
+ readonly testId?: string;
10
+ }): import("react").JSX.Element;
11
+ //# sourceMappingURL=agent-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-panel.d.ts","sourceRoot":"","sources":["../src/agent-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiD,KAAK,SAAS,EAA4C,MAAM,eAAe,CAAC;AAWxI,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,gBAAgB,CAAC;AAIxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAmC1C,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,OAAO,EACP,MAAuB,GACxB,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IACnC,iIAAiI;IACjI,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IAC3C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,+BA8PA"}
@@ -0,0 +1,334 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { figureSvg, formFields, humaniseField, labelOf } from "@graview/core";
3
+ import { useGraview } from "@graview/react";
4
+ import { describeSource, proposalKey, SeatComposer, SeatHeader, SeatSettings, SeatThread, useSeatConversation, } from "@graview/primitives";
5
+ import { completionFor, configuredResponder, describeIntelligence, describeProposal, resolveProposal, } from "@graview/tools";
6
+ import { useEffect, useMemo, useRef, useState } from "react";
7
+ import { useStoreTick } from "@graview/pages";
8
+ import { studioResponder } from "./agent.js";
9
+ export function StudioAgentPanel({ studio, respond, testId = "studio-agent", }) {
10
+ const { principal, intelligence: config } = useGraview();
11
+ const [open, setOpen] = useState(false);
12
+ const [settings, setSettings] = useState(false);
13
+ const [warmth, setWarmth] = useState(null);
14
+ useEffect(() => setWarmth(null), [config]);
15
+ /** What the person changed on each proposal before keeping it, by proposal key. */
16
+ const [edits, setEdits] = useState(new Map());
17
+ const anchor = useRef(null);
18
+ const statusToken = useRef(0);
19
+ /*
20
+ * THE SAME LADDER, WITH THE STUDIO'S OWN FLOOR. Keyless, the declaration
21
+ * answers for itself — what kinds there are, what an act writes, which
22
+ * kinds have no figure — and a model earns only the questions that floor
23
+ * cannot answer. The drawing reaches the same configured provider through
24
+ * `completionFor`, so there is one place a key is read.
25
+ */
26
+ const configNow = useRef(config);
27
+ configNow.current = config;
28
+ const answer = useMemo(() => {
29
+ const token = ++statusToken.current;
30
+ const onStatus = (status) => {
31
+ if (token === statusToken.current)
32
+ setWarmth(status);
33
+ };
34
+ const complete = completionFor(config, { onStatus });
35
+ const floor = studioResponder(complete ? { complete } : {});
36
+ return respond ?? configuredResponder(config, { onStatus, floor, current: () => configNow.current });
37
+ }, [config, respond]);
38
+ const conversation = useSeatConversation({
39
+ answer: (text, context) => answer(studio.store, text, context),
40
+ });
41
+ const { outcomes, settle } = conversation;
42
+ /*
43
+ * WHAT THE CHECKER WOULD SAY, for the arguments as they now stand.
44
+ *
45
+ * The baseline matters: a declaration that is already failing must not
46
+ * make every proposal unkeepable, so what condemns a change is the errors
47
+ * it ADDS — and only the findings it brought are shown under it. Rota
48
+ * ships a standing finding about a role that may run nothing; shown under
49
+ * a proposal, it read as a verdict ON the proposal.
50
+ */
51
+ const judge = (args, proposal) => {
52
+ const now = studio.check();
53
+ const would = studio.would({ name: proposal.mutation, args: { ...args } });
54
+ if (!would.ok)
55
+ return { ok: false, reason: would.reason };
56
+ const standing = new Set(now.findings.map((finding) => `${finding.code}:${finding.where}`));
57
+ const added = would.check.findings.filter((finding) => !standing.has(`${finding.code}:${finding.where}`));
58
+ return {
59
+ ok: true,
60
+ errors: would.check.errors,
61
+ warnings: would.check.warnings,
62
+ findings: added.slice(0, 4),
63
+ breaks: would.check.errors > now.errors,
64
+ };
65
+ };
66
+ /*
67
+ * EVERY OPEN PROPOSAL IS ABOUT THE DECLARATION AS IT NOW STANDS.
68
+ *
69
+ * A loose sentence describes several changes that depend on each other:
70
+ * "a Meal kind, with a name and how many it feeds" is one act that creates
71
+ * the kind and two that need it. Read afresh against the declaration each
72
+ * time it moves, the name the model used resolves the moment the thing it
73
+ * names exists, and an undo puts them back where they were — so the
74
+ * verdict on screen is never about a declaration that has moved on.
75
+ */
76
+ const tick = useStoreTick(studio.store);
77
+ const offerFor = (proposal, key) => {
78
+ const resolved = resolveProposal(studio.store, { ...proposal, args: edits.get(key) ?? proposal.args });
79
+ const args = { ...resolved.args };
80
+ return { proposal: resolved, args, verdict: judge(args, resolved) };
81
+ };
82
+ // Judging runs the checker twice per proposal: once per declaration change and edit, not per render.
83
+ const offers = useMemo(() => {
84
+ const judged = new Map();
85
+ conversation.turns.forEach((turn, index) => (turn.proposals ?? []).forEach((proposal, at) => {
86
+ const key = proposalKey(index, at);
87
+ if (!outcomes.has(key) || outcomes.get(key)?.state === "refused")
88
+ judged.set(key, offerFor(proposal, key));
89
+ }));
90
+ return judged;
91
+ // `offerFor` reads the store as it is, so the tick stands for it.
92
+ }, [conversation.turns, outcomes, edits, tick]);
93
+ /*
94
+ * KEPT, THE KEYBOARD MOVES ON. Keeping or discarding an offer turns it into
95
+ * a line of what happened, and the button the keyboard was on goes with it;
96
+ * on the nightly's runner the keyboard was still on <body> seconds later.
97
+ * It goes to the next offer still open, or to the words to ask with when
98
+ * none is — where a person works next.
99
+ */
100
+ const handOn = () => {
101
+ const panel = anchor.current;
102
+ if (!panel)
103
+ return;
104
+ const pressed = document.activeElement;
105
+ let tries = 20;
106
+ const land = () => {
107
+ const active = document.activeElement;
108
+ // Still on the button that was pressed, while the panel redraws: ask again next frame.
109
+ if (active === pressed && active?.isConnected && --tries > 0)
110
+ return void requestAnimationFrame(land);
111
+ if (active && active !== pressed && active !== document.body && active.isConnected)
112
+ return;
113
+ const next = panel.querySelector('[data-testid="studio-agent-keep"]:not([disabled])') ??
114
+ panel.querySelector("textarea, input[type='text'], input:not([type])");
115
+ if (next)
116
+ next.focus({ preventScroll: true });
117
+ else if (--tries > 0)
118
+ requestAnimationFrame(land);
119
+ };
120
+ requestAnimationFrame(land);
121
+ };
122
+ const keep = (key, offer) => {
123
+ // Said before it lands: a removal described afterwards names what is no longer there.
124
+ const said = describeProposal(studio.store, { ...offer.proposal, args: offer.args });
125
+ const result = studio.propose({ name: offer.proposal.mutation, args: { ...offer.args } }, { kind: "agent", id: "studio-agent", session: "ui", ...(principal.roles ? { roles: principal.roles } : {}) }, offer.proposal.why ?? `you asked for it in words`);
126
+ if (!result.ok) {
127
+ settle(key, { state: "refused", error: result.reason });
128
+ return false;
129
+ }
130
+ settle(key, { state: "applied", said });
131
+ return true;
132
+ };
133
+ /*
134
+ * ONE REQUEST, ONE PRESS — judged as what the proposals make TOGETHER.
135
+ * "Remove the edge from the plot, add it to the planting" breaks the
136
+ * build after its first half and is whole after its second, so the set
137
+ * is tried in order on a copy and only its end is checked; kept, each is
138
+ * read afresh after the one before it has landed, so a field waiting on
139
+ * its kind resolves against the declaration that now has it.
140
+ */
141
+ const keepAll = (turn, proposals) => {
142
+ const open = proposals.flatMap((proposal, at) => {
143
+ const key = proposalKey(turn, at);
144
+ const state = outcomes.get(key)?.state;
145
+ return state === "applied" || state === "declined" ? [] : [{ proposal, key }];
146
+ });
147
+ const together = studio.would(open.map(({ proposal, key }) => ({ name: proposal.mutation, args: { ...offerFor(proposal, key).args } })));
148
+ const before = studio.check().errors;
149
+ if (!together.ok || together.check.errors > before) {
150
+ const reason = together.ok ? together.check.findings.find((finding) => finding.severity === "error")?.message : together.reason;
151
+ settle(open[0].key, { state: "refused", error: `Together these would fail the build: ${reason ?? "the checker refuses them"}` });
152
+ return;
153
+ }
154
+ for (const { proposal, key } of open) {
155
+ if (!keep(key, offerFor(proposal, key)))
156
+ return;
157
+ }
158
+ };
159
+ return (_jsxs("div", { ref: anchor, style: { position: "relative" }, children: [_jsxs("button", { type: "button", "data-testid": testId, "aria-expanded": open, onClick: () => setOpen((current) => !current), title: "Ask for a change to this declaration in words, see what the checker makes of it, and keep or discard it", style: { display: "inline-flex", alignItems: "center", gap: 6, padding: "3px 11px", fontSize: "0.875rem" }, children: [_jsx("span", { "aria-hidden": "true", children: "\u25C6" }), "Ask"] }), open ? (_jsxs("div", { "data-testid": `${testId}-panel`, "data-graview-offstage": "", "data-graview-overlay": "", style: {
160
+ position: "absolute",
161
+ top: "calc(100% + 6px)",
162
+ right: 0,
163
+ zIndex: 45,
164
+ width: 360,
165
+ display: "grid",
166
+ gridTemplateRows: "auto 1fr auto",
167
+ borderRadius: 10,
168
+ border: "1px solid var(--graview-edge)",
169
+ background: "var(--graview-float)",
170
+ boxShadow: "var(--graview-lift-high)",
171
+ overflow: "hidden",
172
+ }, children: [_jsx(SeatHeader, { label: "Declaration", testId: testId, source: describeSource(describeIntelligence(config), warmth, "the declaration"), ...(warmth?.state === "failed" && warmth.detail ? { sourceTitle: warmth.detail } : {}), settings: settings, onSettings: () => setSettings((current) => !current) }), settings ? (_jsx(SeatSettings, { testId: testId, onDone: () => setSettings(false) })) : (_jsx(SeatThread, { turns: conversation.turns, outcomes: outcomes, busy: conversation.busy, testId: testId, minHeight: 140, maxHeight: "min(46cqh, 420px)", empty: _jsx(_Fragment, { children: "Ask about this declaration \u2014 what kinds there are, what an act writes, what a rule judges, which kinds have no figure \u2014 or say a change: \u201Cadd a due date to tasks\u201D, \u201Cdraw a figure for person\u201D. Nothing is applied until you keep it." }), renderProposal: (proposal, { key }) => {
173
+ const offer = offers.get(key) ?? offerFor(proposal, key);
174
+ return (_jsx(Offered, { offer: offer, testId: testId, store: studio.store, onEdit: (name, value) => setEdits((current) => new Map(current).set(key, { ...offer.args, [name]: value })), onKeep: () => {
175
+ keep(key, offer);
176
+ handOn();
177
+ }, onDiscard: () => {
178
+ settle(key, { state: "declined", said: describeProposal(studio.store, { ...offer.proposal, args: offer.args }) });
179
+ handOn();
180
+ } }));
181
+ }, onApplyAll: keepAll, applyAllLabel: "Keep all", ...(config.source === "graph" ? { onChooseModel: () => setSettings(true) } : {}) })), _jsx(SeatComposer, { busy: conversation.busy, placeholder: "Ask for a change\u2026", ariaLabel: "Ask for a change to the declaration", testId: testId, onSend: (text) => void conversation.send(text) })] })) : null] }));
182
+ }
183
+ /**
184
+ * ONE PROPOSAL, AS THE ACT'S OWN FORM, WITH THE CHECKER ON IT.
185
+ *
186
+ * It was a sentence and a button, and that made the conversation the only
187
+ * way to correct anything: asked to add a field to Meal and told the field
188
+ * would land on "user", a person's only move was to argue with a chat and
189
+ * hope. Hoping is not an interface.
190
+ *
191
+ * So a proposal is the act's own arguments, drawn from the same
192
+ * `formFields` the actions strip draws — a picker for a kind, a choice for
193
+ * a type, a box for a name — filled with what was proposed and editable
194
+ * before it is kept. The checker re-runs on every edit, so the verdict is
195
+ * about what you are actually about to do; a change that would add an error
196
+ * says so and cannot be kept.
197
+ *
198
+ * This is also what makes a half-right answer USEFUL. A model that names
199
+ * the wrong kind, or leaves an argument out, now costs one press to fix
200
+ * rather than a fresh sentence and another turn.
201
+ */
202
+ function Offered({ offer, store, testId, onEdit, onKeep, onDiscard, }) {
203
+ const faint = { fontSize: "0.8125rem", color: "var(--graview-ink-muted)" };
204
+ const declared = store.allMutations().find((one) => one.name === offer.proposal.mutation);
205
+ const fields = declared ? formFields(declared.input) : [];
206
+ const breaks = offer.verdict.ok && offer.verdict.breaks;
207
+ const refused = !offer.verdict.ok;
208
+ /*
209
+ * A REFUSAL NAMES THE ARGUMENT, not the parser. The store answers with
210
+ * zod's own sentence — `label: Invalid input: expected string, received
211
+ * undefined` — which tells a person nothing they can act on. The form
212
+ * below is what they act on, so the line above it says which of its boxes
213
+ * is the problem.
214
+ */
215
+ const wanted = refused
216
+ ? fields
217
+ .filter((field) => !field.optional && (offer.args[field.name] === undefined || offer.args[field.name] === ""))
218
+ .map((field) => humaniseField(field.name).toLowerCase())
219
+ : [];
220
+ /*
221
+ * AND AN ARGUMENT THAT NAMES SOMETHING NOT THERE YET SAYS THAT.
222
+ *
223
+ * A sentence split into several acts usually splits into acts that wait
224
+ * on each other: the field cannot be added until the kind exists. The
225
+ * store's own refusal for that is `Edge "of" references missing node`,
226
+ * which is true, internal, and no use at all to somebody looking at a
227
+ * form with an empty picker in it.
228
+ */
229
+ const awaiting = refused
230
+ ? fields
231
+ .filter((field) => field.control === "node")
232
+ .map((field) => ({ field, value: offer.args[field.name] }))
233
+ .filter(({ value }) => typeof value === "string" && value.length > 0 && !store.graph.getNode(value))
234
+ .map(({ field, value }) => `${humaniseField(field.name).toLowerCase()} "${String(value)}"`)
235
+ : [];
236
+ return (_jsxs("span", { "data-testid": `${testId}-offer`, "data-mutation": offer.proposal.mutation, style: {
237
+ display: "grid",
238
+ gap: 6,
239
+ justifySelf: "stretch",
240
+ padding: 8,
241
+ borderRadius: 8,
242
+ border: `1px solid ${breaks || refused ? "var(--graview-warn)" : "var(--graview-edge)"}`,
243
+ background: "var(--graview-panel)",
244
+ }, children: [_jsxs("span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [_jsx("strong", { style: { fontSize: "0.875rem", fontWeight: 550 }, children: declared?.title ?? offer.proposal.mutation }), _jsx(ProposedDrawing, { offer: offer })] }), fields.map((field) => (_jsx(Argument, { field: field, value: offer.args[field.name], store: store, testId: `${testId}-arg-${field.name}`, onChange: (value) => onEdit(field.name, value) }, field.name))), _jsx("span", { "data-testid": `${testId}-check`, "data-errors": offer.verdict.ok ? offer.verdict.errors : -1, "data-warnings": offer.verdict.ok ? offer.verdict.warnings : -1, style: faint, children: refused
245
+ ? awaiting.length > 0
246
+ ? `Waiting on ${awaiting.join(" and ")} — keep the one that makes it first, or choose something that is already here.`
247
+ : wanted.length > 0
248
+ ? `It still needs ${wanted.join(" and ")}.`
249
+ : `The store will not take it: ${offer.verdict.reason}`
250
+ : breaks
251
+ ? `That would fail the build: ${offer.verdict.findings.find((finding) => finding.severity === "error")?.message ?? `${offer.verdict.errors} errors`}`
252
+ : offer.verdict.findings.length === 0
253
+ ? "The checker finds nothing wrong with it."
254
+ : `It would add a warning: ${offer.verdict.findings[0].message}` }), _jsxs("span", { style: { display: "flex", gap: 6 }, children: [_jsx("button", { type: "button", "data-testid": `${testId}-keep`, disabled: breaks || refused, onClick: onKeep, title: breaks ? "The checker refuses this one" : (offer.proposal.why ?? "Keep this change"), style: { fontSize: "0.8125rem" }, children: "Keep" }), _jsx("button", { type: "button", "data-testid": `${testId}-discard`, onClick: onDiscard, style: { fontSize: "0.8125rem" }, children: "Discard" })] })] }));
255
+ }
256
+ /**
257
+ * ONE ARGUMENT, drawn as what it is.
258
+ *
259
+ * The same controls the actions strip derives, because they come from the
260
+ * same declaration: a kind is a picker over the kinds that exist, a type is
261
+ * its own enum, a flag is a checkbox. Nothing here knows what "kind" or
262
+ * "type" mean — it reads `formFields` and draws what it is told.
263
+ */
264
+ function Argument({ field, value, store, testId, onChange, }) {
265
+ const label = humaniseField(field.name);
266
+ const box = {
267
+ font: "inherit",
268
+ fontSize: "0.8125rem",
269
+ padding: "3px 6px",
270
+ minHeight: 24,
271
+ borderRadius: 6,
272
+ border: "1px solid var(--graview-edge)",
273
+ background: "var(--graview-float)",
274
+ color: "var(--graview-ink)",
275
+ maxWidth: "100%",
276
+ };
277
+ const row = (control) => (_jsxs("label", { style: { display: "grid", gridTemplateColumns: "minmax(0, 5.5rem) minmax(0, 1fr)", alignItems: "center", gap: 6 }, children: [_jsx("span", { style: { fontSize: "0.75rem", color: "var(--graview-ink-muted)" }, children: label }), control] }));
278
+ if (field.control === "node") {
279
+ const choices = [...store.graph.allNodes()].filter((node) => field.kinds.includes("*") || field.kinds.includes(node.kind));
280
+ return row(_jsxs("select", { "data-testid": testId, value: typeof value === "string" ? value : "", onChange: (event) => onChange(event.target.value), style: box, children: [_jsx("option", { value: "", children: "\u2014 choose \u2014" }), choices.map((node) => (_jsx("option", { value: node.id, children: labelOf(store.schema.tryDefinition(node.kind), node) }, node.id)))] }));
281
+ }
282
+ if (field.control === "choice" && field.options) {
283
+ return row(_jsx("select", { "data-testid": testId, value: String(value ?? ""), onChange: (event) => onChange(event.target.value), style: box, children: field.options.map((option) => (_jsx("option", { value: option, children: option }, option))) }));
284
+ }
285
+ if (field.control === "boolean") {
286
+ return row(_jsx("input", { type: "checkbox", "data-testid": testId, checked: value === true, onChange: (event) => onChange(event.target.checked), style: { justifySelf: "start", width: 16, height: 16 } }));
287
+ }
288
+ if (field.control === "number") {
289
+ return row(_jsx("input", { type: "number", "data-testid": testId, value: typeof value === "number" ? value : "", onChange: (event) => onChange(event.target.value === "" ? undefined : Number(event.target.value)), style: box }));
290
+ }
291
+ if (field.control === "date") {
292
+ return row(_jsx("input", { type: field.time ? "datetime-local" : "date", "data-testid": testId, value: typeof value === "string" ? value : "", onChange: (event) => onChange(event.target.value), style: box }));
293
+ }
294
+ if (field.control === "list") {
295
+ // A list of plain words — an enum's own options, most of the time.
296
+ const held = Array.isArray(value) ? value.map(String) : [];
297
+ return row(_jsx("input", { "data-testid": testId, value: held.join(", "), placeholder: "one, two, three", onChange: (event) => {
298
+ const words = event.target.value.split(",").map((word) => word.trim()).filter(Boolean);
299
+ onChange(words.length > 0 ? words : undefined);
300
+ }, style: box }));
301
+ }
302
+ if (field.control === "text") {
303
+ return row(_jsx("input", { "data-testid": testId, value: typeof value === "string" ? value : "", onChange: (event) => onChange(event.target.value), style: box }));
304
+ }
305
+ // Anything the framework cannot draw is said rather than silently dropped.
306
+ return row(_jsx("span", { style: { fontSize: "0.8125rem", color: "var(--graview-ink-faint)" }, children: String(value ?? "—") }));
307
+ }
308
+ /**
309
+ * A DRAWING IS SHOWN BEFORE IT IS KEPT, because a figure is the one change
310
+ * whose whole content is what it looks like.
311
+ *
312
+ * It is safe to show because `figureFaults` — the checker's own function,
313
+ * which `drawFigure` already ran — holds a figure to a closed vocabulary of
314
+ * drawing elements and drawing attributes. Anything a model smuggled in
315
+ * besides line art was refused before it ever reached a proposal.
316
+ */
317
+ function ProposedDrawing({ offer }) {
318
+ const art = offer.proposal.mutation === "set-figure" ? figureSvg(String(offer.proposal.args["figure"] ?? "")) : undefined;
319
+ const drawing = useMemo(() => (art ? { __html: art } : null), [art]);
320
+ if (!drawing)
321
+ return null;
322
+ return (_jsx("span", { "data-testid": "studio-agent-drawing", "aria-hidden": "true", dangerouslySetInnerHTML: drawing, style: {
323
+ display: "inline-flex",
324
+ alignItems: "center",
325
+ justifyContent: "center",
326
+ width: 34,
327
+ height: 34,
328
+ padding: 4,
329
+ borderRadius: 8,
330
+ border: "1px solid var(--graview-edge)",
331
+ color: "var(--graview-ink)",
332
+ } }));
333
+ }
334
+ //# sourceMappingURL=agent-panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-panel.js","sourceRoot":"","sources":["../src/agent-panel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAA4D,MAAM,eAAe,CAAC;AACxI,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,WAAW,EACX,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,UAAU,EACV,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,GAIhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAqC7C,MAAM,UAAU,gBAAgB,CAAC,EAC/B,MAAM,EACN,OAAO,EACP,MAAM,GAAG,cAAc,GAMxB;IACC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,UAAU,EAAgB,CAAC;I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GAAG,KAAK,CAAC,QAAQ,CAAC,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1H,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrE,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,OAAO,CACL,8BACc,sBAAsB,iBACtB,MAAM,EAClB,uBAAuB,EAAE,OAAO,EAChC,KAAK,EAAE;YACL,OAAO,EAAE,aAAa;YACtB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,CAAC;YACV,YAAY,EAAE,CAAC;YACf,MAAM,EAAE,+BAA+B;YACvC,KAAK,EAAE,oBAAoB;SAC5B,GACD,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { type Completion, type Responder } from "@graview/tools";
2
+ import type { FieldType, StudioSchema } from "./meta.js";
3
+ export interface StudioResponderOptions {
4
+ /**
5
+ * The model behind a drawing, when the person has chosen one. Without it
6
+ * a figure ask is answered with the nearest SHIPPED figure, which is an
7
+ * honest answer — and the reply says which it was, because being shown a
8
+ * machine's work and told it was a choice is the one thing a seat must
9
+ * never do.
10
+ */
11
+ readonly complete?: Completion;
12
+ }
13
+ /**
14
+ * THE TYPE A NAME IMPLIES, and nothing cleverer.
15
+ *
16
+ * "a due date" is a date and "how many" is a number, in every domain that
17
+ * has ever existed. Where the name says nothing, the answer is a string —
18
+ * never a guess dressed up as a decision, because the person is about to
19
+ * see the act before they keep it and can change it there.
20
+ */
21
+ export declare function typeFromName(name: string): FieldType;
22
+ /** The graph-native studio conversation: the declaration, in its own words. */
23
+ export declare function studioResponder(options?: StudioResponderOptions): Responder<StudioSchema>;
24
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,UAAU,EAEf,KAAK,SAAS,EACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAuBzD,MAAM,WAAW,sBAAsB;IACrC;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;CAChC;AAYD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAOpD;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,SAAS,CAAC,YAAY,CAAC,CAoY7F"}