@ouispec/bindings 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +18 -2
- package/dist/binding.d.ts +46 -0
- package/dist/binding.d.ts.map +1 -0
- package/dist/binding.js +51 -0
- package/dist/binding.js.map +1 -0
- package/dist/controls.d.ts +69 -0
- package/dist/controls.d.ts.map +1 -0
- package/dist/controls.js +334 -0
- package/dist/controls.js.map +1 -0
- package/dist/effect.d.ts +54 -0
- package/dist/effect.d.ts.map +1 -0
- package/dist/effect.js +88 -0
- package/dist/effect.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/interactive.d.ts +12 -0
- package/dist/interactive.d.ts.map +1 -0
- package/dist/interactive.js +21 -0
- package/dist/interactive.js.map +1 -0
- package/dist/jobs.d.ts +54 -0
- package/dist/jobs.d.ts.map +1 -0
- package/dist/jobs.js +74 -0
- package/dist/jobs.js.map +1 -0
- package/dist/json-schema.d.ts +36 -0
- package/dist/json-schema.d.ts.map +1 -0
- package/dist/json-schema.js +196 -0
- package/dist/json-schema.js.map +1 -0
- package/dist/jsx.d.ts +19 -0
- package/dist/jsx.d.ts.map +1 -0
- package/dist/jsx.js +2 -0
- package/dist/jsx.js.map +1 -0
- package/dist/manifest.d.ts +35 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +77 -0
- package/dist/manifest.js.map +1 -0
- package/dist/oui.d.ts +112 -0
- package/dist/oui.d.ts.map +1 -0
- package/dist/oui.js +514 -0
- package/dist/oui.js.map +1 -0
- package/dist/package-declaration.d.ts +24 -0
- package/dist/package-declaration.d.ts.map +1 -0
- package/dist/package-declaration.js +24 -0
- package/dist/package-declaration.js.map +1 -0
- package/dist/react.d.ts +74 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +179 -0
- package/dist/react.js.map +1 -0
- package/dist/registry.d.ts +103 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +146 -0
- package/dist/registry.js.map +1 -0
- package/dist/room.d.ts +79 -0
- package/dist/room.d.ts.map +1 -0
- package/dist/room.js +111 -0
- package/dist/room.js.map +1 -0
- package/dist/tier2-react.d.ts +35 -0
- package/dist/tier2-react.d.ts.map +1 -0
- package/dist/tier2-react.js +186 -0
- package/dist/tier2-react.js.map +1 -0
- package/dist/tier2.d.ts +68 -0
- package/dist/tier2.d.ts.map +1 -0
- package/dist/tier2.js +129 -0
- package/dist/tier2.js.map +1 -0
- package/package.json +74 -3
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React side of the binding (ADR-0220 §2.2): how a design-system control
|
|
3
|
+
* registers its real handler, and how a room registers its catalog.
|
|
4
|
+
*
|
|
5
|
+
* A control calls `useAgentBinding` with its `agent` prop, its kind, its live
|
|
6
|
+
* props and the function its own gesture calls. Without a provider (the
|
|
7
|
+
* showcase, a test, any app with no assistant) nothing registers and the
|
|
8
|
+
* control behaves exactly as before.
|
|
9
|
+
*/
|
|
10
|
+
import { type ReactNode } from 'react';
|
|
11
|
+
import { type AgentProp } from './binding.js';
|
|
12
|
+
import { type AnyControlKind, type SchemaProps } from './controls.js';
|
|
13
|
+
import type { BindingRegistry } from './registry.js';
|
|
14
|
+
import type { RoomCatalogData, RoomProblem, RoomResult } from './room.js';
|
|
15
|
+
export interface AgentBindingProviderProps {
|
|
16
|
+
registry: BindingRegistry;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/** Makes one binding registry available to every bound control below it. */
|
|
20
|
+
export declare function AgentBindingProvider({ registry, children }: AgentBindingProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<BindingRegistry | null>>;
|
|
21
|
+
/** The registry from the nearest provider, or null when there is none. */
|
|
22
|
+
export declare function useAgentBindingRegistry(): BindingRegistry | null;
|
|
23
|
+
/** What a control's handler may return: nothing (it worked), or a result saying what happened. */
|
|
24
|
+
export type BindingRunResult = RoomResult | void;
|
|
25
|
+
export interface AgentBindingSpec {
|
|
26
|
+
/** The control's `agent` prop, as the page passed it. */
|
|
27
|
+
agent: AgentProp | undefined | null;
|
|
28
|
+
kind: AnyControlKind;
|
|
29
|
+
/** What the control is called on screen, from its own props. */
|
|
30
|
+
title: string;
|
|
31
|
+
/** The live props its schema is derived from. */
|
|
32
|
+
schemaProps?: SchemaProps;
|
|
33
|
+
/** Its current value, for the page's observation. */
|
|
34
|
+
value?: unknown;
|
|
35
|
+
/** It cannot be used right now. */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** Does what the person's gesture does. */
|
|
38
|
+
run: (input: {
|
|
39
|
+
value?: unknown;
|
|
40
|
+
}) => BindingRunResult | Promise<BindingRunResult>;
|
|
41
|
+
}
|
|
42
|
+
/** Register one bound control for as long as it is mounted. */
|
|
43
|
+
export declare function useAgentBinding(spec: AgentBindingSpec): void;
|
|
44
|
+
/**
|
|
45
|
+
* Register several bound controls at once: a composite's slots, or the
|
|
46
|
+
* entries of a toolbar, menu or selection bar. The list may change length
|
|
47
|
+
* between renders.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useAgentBindings(specs: readonly AgentBindingSpec[]): void;
|
|
50
|
+
export interface UseRoomRegistrationOptions {
|
|
51
|
+
/** Runs one of the catalog's actions by id, through the room's own entry (the room controller's `run`). */
|
|
52
|
+
run: (actionId: string, input: Record<string, unknown>) => RoomResult | Promise<RoomResult>;
|
|
53
|
+
/** The current values of the catalog's observations, by id. */
|
|
54
|
+
observations: Readonly<Record<string, unknown>>;
|
|
55
|
+
/** What the room's banners show is wrong. */
|
|
56
|
+
problems: readonly RoomProblem[];
|
|
57
|
+
/** Register only while true. Default true. */
|
|
58
|
+
active?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/** Register a room's catalog for as long as the room is mounted. */
|
|
61
|
+
export declare function useRoomRegistration(catalog: RoomCatalogData, options: UseRoomRegistrationOptions): void;
|
|
62
|
+
/**
|
|
63
|
+
* Report the problems a page area shows (an asset that failed to load, a
|
|
64
|
+
* render that failed), under the binding id of the area that shows them.
|
|
65
|
+
*/
|
|
66
|
+
export declare function useAgentProblems(source: string, problems: readonly RoomProblem[]): void;
|
|
67
|
+
/**
|
|
68
|
+
* Reports what a display shows: its facts, by label, as text. The design
|
|
69
|
+
* system's displays call this with their `agent` binding; a page reports its
|
|
70
|
+
* own facts the same way.
|
|
71
|
+
*/
|
|
72
|
+
export declare function useAgentFacts(agent: AgentProp | undefined, title: string, facts: Readonly<Record<string, string | number | boolean | null | undefined>>): void;
|
|
73
|
+
export { boundCompound, boundControl, withMembers, type AgentAttribute } from './tier2-react.js';
|
|
74
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA+D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpG,OAAO,EAA8B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAqB,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAA6B,MAAM,eAAe,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAI1E,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,yBAAyB,mGAErF;AAED,0EAA0E;AAC1E,wBAAgB,uBAAuB,IAAI,eAAe,GAAG,IAAI,CAEhE;AAED,kGAAkG;AAClG,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BAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,IAAI,CAcvF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,SAAS,GAAG,SAAS,EAC5B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,GAC5E,IAAI,CAyBN;AAGD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React side of the binding (ADR-0220 §2.2): how a design-system control
|
|
3
|
+
* registers its real handler, and how a room registers its catalog.
|
|
4
|
+
*
|
|
5
|
+
* A control calls `useAgentBinding` with its `agent` prop, its kind, its live
|
|
6
|
+
* props and the function its own gesture calls. Without a provider (the
|
|
7
|
+
* showcase, a test, any app with no assistant) nothing registers and the
|
|
8
|
+
* control behaves exactly as before.
|
|
9
|
+
*/
|
|
10
|
+
import { createContext, createElement, useContext, useEffect, useRef } from 'react';
|
|
11
|
+
import { isAgentBinding, isNonAgent } from './binding.js';
|
|
12
|
+
import { deriveValueSchema } from './controls.js';
|
|
13
|
+
const RegistryContext = createContext(null);
|
|
14
|
+
/** Makes one binding registry available to every bound control below it. */
|
|
15
|
+
export function AgentBindingProvider({ registry, children }) {
|
|
16
|
+
return createElement(RegistryContext.Provider, { value: registry }, children);
|
|
17
|
+
}
|
|
18
|
+
/** The registry from the nearest provider, or null when there is none. */
|
|
19
|
+
export function useAgentBindingRegistry() {
|
|
20
|
+
return useContext(RegistryContext);
|
|
21
|
+
}
|
|
22
|
+
/** Register one bound control for as long as it is mounted. */
|
|
23
|
+
export function useAgentBinding(spec) {
|
|
24
|
+
useAgentBindings([spec]);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Register several bound controls at once: a composite's slots, or the
|
|
28
|
+
* entries of a toolbar, menu or selection bar. The list may change length
|
|
29
|
+
* between renders.
|
|
30
|
+
*/
|
|
31
|
+
export function useAgentBindings(specs) {
|
|
32
|
+
const registry = useContext(RegistryContext);
|
|
33
|
+
const specsRef = useRef(specs);
|
|
34
|
+
specsRef.current = specs;
|
|
35
|
+
const signature = specs
|
|
36
|
+
.map(s => (isAgentBinding(s.agent) ? `${s.agent.id}\u0000${s.agent.item?.key ?? ''}\u0000${s.kind}` : ''))
|
|
37
|
+
.join('\u0001');
|
|
38
|
+
const handles = useRef([]);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (!registry)
|
|
41
|
+
return;
|
|
42
|
+
const current = specsRef.current;
|
|
43
|
+
handles.current = current.map((spec, index) => {
|
|
44
|
+
const agent = spec.agent;
|
|
45
|
+
if (!isAgentBinding(agent))
|
|
46
|
+
return null;
|
|
47
|
+
return registry.registerControl({
|
|
48
|
+
id: agent.id,
|
|
49
|
+
kind: spec.kind,
|
|
50
|
+
title: agent.title ?? spec.title,
|
|
51
|
+
valueSchema: deriveValueSchema(spec.kind, spec.schemaProps),
|
|
52
|
+
item: agent.item,
|
|
53
|
+
value: spec.value,
|
|
54
|
+
disabled: spec.disabled,
|
|
55
|
+
run: input => runSafely(() => specsRef.current[index].run(input)),
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
return () => {
|
|
59
|
+
for (const h of handles.current)
|
|
60
|
+
h?.unregister();
|
|
61
|
+
handles.current = [];
|
|
62
|
+
};
|
|
63
|
+
}, [registry, signature]);
|
|
64
|
+
// Keep what the registry knows about each control current: its title,
|
|
65
|
+
// schema, row, value and whether it can be used.
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
specs.forEach((spec, index) => {
|
|
68
|
+
const handle = handles.current[index];
|
|
69
|
+
if (!handle || !isAgentBinding(spec.agent))
|
|
70
|
+
return;
|
|
71
|
+
handle.update({
|
|
72
|
+
title: spec.agent.title ?? spec.title,
|
|
73
|
+
valueSchema: deriveValueSchema(spec.kind, spec.schemaProps),
|
|
74
|
+
item: spec.agent.item,
|
|
75
|
+
value: spec.value,
|
|
76
|
+
disabled: spec.disabled,
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
async function runSafely(run) {
|
|
82
|
+
try {
|
|
83
|
+
// A callback typed `() => void` may still return something (an array's
|
|
84
|
+
// `push` returns its length); only a real result says what happened.
|
|
85
|
+
const result = await run();
|
|
86
|
+
return isRoomResult(result) ? result : { ok: true };
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
return { ok: false, code: 'FAILED', message: err instanceof Error ? err.message : String(err) };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function isRoomResult(value) {
|
|
93
|
+
return !!value && typeof value === 'object' && typeof value.ok === 'boolean';
|
|
94
|
+
}
|
|
95
|
+
/** Register a room's catalog for as long as the room is mounted. */
|
|
96
|
+
export function useRoomRegistration(catalog, options) {
|
|
97
|
+
const registry = useContext(RegistryContext);
|
|
98
|
+
const optionsRef = useRef(options);
|
|
99
|
+
optionsRef.current = options;
|
|
100
|
+
const handle = useRef(null);
|
|
101
|
+
const active = options.active ?? true;
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
if (!registry || !active)
|
|
104
|
+
return;
|
|
105
|
+
handle.current = registry.registerRoom({
|
|
106
|
+
catalog,
|
|
107
|
+
run: (id, input) => optionsRef.current.run(id, input),
|
|
108
|
+
});
|
|
109
|
+
return () => {
|
|
110
|
+
handle.current?.unregister();
|
|
111
|
+
handle.current = null;
|
|
112
|
+
};
|
|
113
|
+
}, [registry, catalog, active]);
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
const h = handle.current;
|
|
116
|
+
if (!h)
|
|
117
|
+
return;
|
|
118
|
+
for (const [id, value] of Object.entries(options.observations))
|
|
119
|
+
h.setObservation(id, value);
|
|
120
|
+
h.setProblems(options.problems);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Report the problems a page area shows (an asset that failed to load, a
|
|
125
|
+
* render that failed), under the binding id of the area that shows them.
|
|
126
|
+
*/
|
|
127
|
+
export function useAgentProblems(source, problems) {
|
|
128
|
+
const registry = useContext(RegistryContext);
|
|
129
|
+
const handle = useRef(null);
|
|
130
|
+
useEffect(() => {
|
|
131
|
+
if (!registry)
|
|
132
|
+
return;
|
|
133
|
+
handle.current = registry.registerProblems(source);
|
|
134
|
+
return () => {
|
|
135
|
+
handle.current?.unregister();
|
|
136
|
+
handle.current = null;
|
|
137
|
+
};
|
|
138
|
+
}, [registry, source]);
|
|
139
|
+
useEffect(() => {
|
|
140
|
+
handle.current?.set(problems);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Reports what a display shows: its facts, by label, as text. The design
|
|
145
|
+
* system's displays call this with their `agent` binding; a page reports its
|
|
146
|
+
* own facts the same way.
|
|
147
|
+
*/
|
|
148
|
+
export function useAgentFacts(agent, title, facts) {
|
|
149
|
+
const registry = useContext(RegistryContext);
|
|
150
|
+
const handle = useRef(null);
|
|
151
|
+
const bound = agent && !isNonAgent(agent) && isAgentBinding(agent) ? agent : null;
|
|
152
|
+
useEffect(() => {
|
|
153
|
+
if (!registry || !bound)
|
|
154
|
+
return;
|
|
155
|
+
handle.current = registry.registerFacts();
|
|
156
|
+
return () => {
|
|
157
|
+
handle.current?.unregister();
|
|
158
|
+
handle.current = null;
|
|
159
|
+
};
|
|
160
|
+
}, [registry, !!bound]);
|
|
161
|
+
useEffect(() => {
|
|
162
|
+
if (!bound)
|
|
163
|
+
return;
|
|
164
|
+
const text = {};
|
|
165
|
+
for (const [label, value] of Object.entries(facts)) {
|
|
166
|
+
if (value !== null && value !== undefined && value !== '')
|
|
167
|
+
text[label] = String(value);
|
|
168
|
+
}
|
|
169
|
+
handle.current?.set({
|
|
170
|
+
id: bound.id,
|
|
171
|
+
title: bound.title ?? title,
|
|
172
|
+
facts: text,
|
|
173
|
+
...(bound.item ? { item: bound.item } : {}),
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
// Tier 2 (ADR-0226 §2.3): what the bound wrappers `oui generate` emits are built from.
|
|
178
|
+
export { boundCompound, boundControl, withMembers } from './tier2-react.js';
|
|
179
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;AAEpG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAyC,MAAM,eAAe,CAAC;AAIzF,MAAM,eAAe,GAAG,aAAa,CAAyB,IAAI,CAAC,CAAC;AAOpE,4EAA4E;AAC5E,MAAM,UAAU,oBAAoB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAA6B;IACpF,OAAO,aAAa,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC;AAChF,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,uBAAuB;IACrC,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC;AAqBD,+DAA+D;AAC/D,MAAM,UAAU,eAAe,CAAC,IAAsB;IACpD,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAkC;IACjE,MAAM,QAAQ,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,MAAM,CA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E,WAAW,EAAuB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tab's record of what is mounted right now (ADR-0220 §2.2): every bound
|
|
3
|
+
* control with its real handler, and every room with its catalog and context.
|
|
4
|
+
*
|
|
5
|
+
* Controls register when they mount and leave when they unmount, so the
|
|
6
|
+
* registry is exactly what a person could use on screen. An adapter
|
|
7
|
+
* (`./oui`) turns it, with the build's generated manifest, into the tab's OUI
|
|
8
|
+
* surfaces.
|
|
9
|
+
*
|
|
10
|
+
* Plain TypeScript: no React, no OUI runtime.
|
|
11
|
+
*/
|
|
12
|
+
import type { AgentItem } from './binding.js';
|
|
13
|
+
import type { AnyControlKind } from './controls.js';
|
|
14
|
+
import type { JsonSchema } from './json-schema.js';
|
|
15
|
+
import type { RoomCatalogData, RoomProblem, RoomResult } from './room.js';
|
|
16
|
+
/** One mounted bound control. */
|
|
17
|
+
export interface ControlRegistration {
|
|
18
|
+
/** The binding id. */
|
|
19
|
+
id: string;
|
|
20
|
+
kind: AnyControlKind;
|
|
21
|
+
/** What the control is called on screen. */
|
|
22
|
+
title: string;
|
|
23
|
+
/** The live schema of its value (no `item`), derived from its live props; null for a button or dialog. */
|
|
24
|
+
valueSchema: JsonSchema | null;
|
|
25
|
+
/** Which row, when it is one of a list's. */
|
|
26
|
+
item?: AgentItem;
|
|
27
|
+
/** Its current value, for the page's observation. */
|
|
28
|
+
value?: unknown;
|
|
29
|
+
/** It cannot be used right now; its action is not offered. */
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/** Does what the person's gesture does, with `value` for a field. */
|
|
32
|
+
run(input: {
|
|
33
|
+
value?: unknown;
|
|
34
|
+
}): RoomResult | Promise<RoomResult>;
|
|
35
|
+
}
|
|
36
|
+
/** One mounted room. */
|
|
37
|
+
export interface RoomRegistration {
|
|
38
|
+
/** The room's catalog (a `RoomCatalog` is one): which room it is, and what it declares. */
|
|
39
|
+
catalog: RoomCatalogData;
|
|
40
|
+
/** Runs one of the catalog's actions by id, through the room's own entry — as the room's controller does. */
|
|
41
|
+
run(actionId: string, input: Record<string, unknown>): RoomResult | Promise<RoomResult>;
|
|
42
|
+
}
|
|
43
|
+
/** What changed: what can be done (`structure`), or only what the page shows (`values`). */
|
|
44
|
+
export type RegistryChange = 'structure' | 'values';
|
|
45
|
+
export interface ControlHandle {
|
|
46
|
+
/** New live facts about the control. A change of title, schema, row or disabled changes what can be done. */
|
|
47
|
+
update(patch: Partial<Omit<ControlRegistration, 'id' | 'kind' | 'run'>>): void;
|
|
48
|
+
unregister(): void;
|
|
49
|
+
}
|
|
50
|
+
export interface RoomHandle {
|
|
51
|
+
/** The current value of one of the catalog's observations. */
|
|
52
|
+
setObservation(id: string, value: unknown): void;
|
|
53
|
+
/** The room's problems, as its banners show them. */
|
|
54
|
+
setProblems(problems: readonly RoomProblem[]): void;
|
|
55
|
+
unregister(): void;
|
|
56
|
+
}
|
|
57
|
+
/** Problems a page shows that are not a room's: an asset that failed to load, a render that failed. */
|
|
58
|
+
export interface ProblemHandle {
|
|
59
|
+
set(problems: readonly RoomProblem[]): void;
|
|
60
|
+
unregister(): void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* What a page shows that is not a control: a clip's model and seed, a job's
|
|
64
|
+
* cost. Read-only facts, by label, reported in the page state so the
|
|
65
|
+
* assistant reads what the person reads.
|
|
66
|
+
*/
|
|
67
|
+
export interface ShownFacts {
|
|
68
|
+
/** The binding id of the display that shows them. */
|
|
69
|
+
id: string;
|
|
70
|
+
/** Its heading, as the page shows it. */
|
|
71
|
+
title: string;
|
|
72
|
+
/** Each fact's value as text, by its label. */
|
|
73
|
+
facts: Readonly<Record<string, string>>;
|
|
74
|
+
/** Which row of a list it describes, when it is one of many. */
|
|
75
|
+
item?: AgentItem;
|
|
76
|
+
}
|
|
77
|
+
export interface FactsHandle {
|
|
78
|
+
set(value: ShownFacts): void;
|
|
79
|
+
unregister(): void;
|
|
80
|
+
}
|
|
81
|
+
export interface BindingRegistry {
|
|
82
|
+
registerControl(registration: ControlRegistration): ControlHandle;
|
|
83
|
+
registerRoom(registration: RoomRegistration): RoomHandle;
|
|
84
|
+
/** Problems shown on the page, by the binding id of the page area that shows them. */
|
|
85
|
+
registerProblems(source: string): ProblemHandle;
|
|
86
|
+
/** Facts a page shows, by display. */
|
|
87
|
+
registerFacts(): FactsHandle;
|
|
88
|
+
/** Every shown display's facts, oldest first. */
|
|
89
|
+
facts(): readonly ShownFacts[];
|
|
90
|
+
/** Every mounted control, oldest first. */
|
|
91
|
+
controls(): readonly ControlRegistration[];
|
|
92
|
+
/** Every mounted room, with its observation values and problems. */
|
|
93
|
+
rooms(): readonly {
|
|
94
|
+
registration: RoomRegistration;
|
|
95
|
+
observations: Readonly<Record<string, unknown>>;
|
|
96
|
+
problems: readonly RoomProblem[];
|
|
97
|
+
}[];
|
|
98
|
+
/** Every page problem, by source. */
|
|
99
|
+
problems(): Readonly<Record<string, readonly RoomProblem[]>>;
|
|
100
|
+
subscribe(listener: (change: RegistryChange) => void): () => void;
|
|
101
|
+
}
|
|
102
|
+
export declare function createBindingRegistry(): BindingRegistry;
|
|
103
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE1E,iCAAiC;AACjC,MAAM,WAAW,mBAAmB;IAClC,sBAAsB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,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AAG,MAAM,IAAI,CAAC;CACnE;AAED,wBAAgB,qBAAqB,IAAI,eAAe,CA6HvD"}
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tab's record of what is mounted right now (ADR-0220 §2.2): every bound
|
|
3
|
+
* control with its real handler, and every room with its catalog and context.
|
|
4
|
+
*
|
|
5
|
+
* Controls register when they mount and leave when they unmount, so the
|
|
6
|
+
* registry is exactly what a person could use on screen. An adapter
|
|
7
|
+
* (`./oui`) turns it, with the build's generated manifest, into the tab's OUI
|
|
8
|
+
* surfaces.
|
|
9
|
+
*
|
|
10
|
+
* Plain TypeScript: no React, no OUI runtime.
|
|
11
|
+
*/
|
|
12
|
+
export function createBindingRegistry() {
|
|
13
|
+
const controls = [];
|
|
14
|
+
const rooms = [];
|
|
15
|
+
const pageProblems = new Map();
|
|
16
|
+
const shown = [];
|
|
17
|
+
const listeners = new Set();
|
|
18
|
+
// Changes arrive in bursts (a page mounting fifty controls); listeners hear
|
|
19
|
+
// one notification per burst, the strongest change in it.
|
|
20
|
+
let pending = null;
|
|
21
|
+
const notify = (change) => {
|
|
22
|
+
const flush = pending === null;
|
|
23
|
+
if (pending !== 'structure')
|
|
24
|
+
pending = change;
|
|
25
|
+
if (!flush)
|
|
26
|
+
return;
|
|
27
|
+
queueMicrotask(() => {
|
|
28
|
+
const c = pending;
|
|
29
|
+
pending = null;
|
|
30
|
+
for (const l of [...listeners])
|
|
31
|
+
l(c);
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
registerControl(registration) {
|
|
36
|
+
const entry = { ...registration };
|
|
37
|
+
controls.push(entry);
|
|
38
|
+
notify('structure');
|
|
39
|
+
return {
|
|
40
|
+
update(patch) {
|
|
41
|
+
if (!controls.includes(entry))
|
|
42
|
+
return;
|
|
43
|
+
const structural = ('title' in patch && patch.title !== entry.title) ||
|
|
44
|
+
('disabled' in patch && !!patch.disabled !== !!entry.disabled) ||
|
|
45
|
+
('item' in patch && !sameItem(patch.item, entry.item)) ||
|
|
46
|
+
('valueSchema' in patch &&
|
|
47
|
+
JSON.stringify(patch.valueSchema) !== JSON.stringify(entry.valueSchema));
|
|
48
|
+
const valueChanged = 'value' in patch && !Object.is(patch.value, entry.value);
|
|
49
|
+
Object.assign(entry, patch);
|
|
50
|
+
if (structural)
|
|
51
|
+
notify('structure');
|
|
52
|
+
else if (valueChanged)
|
|
53
|
+
notify('values');
|
|
54
|
+
},
|
|
55
|
+
unregister() {
|
|
56
|
+
const i = controls.indexOf(entry);
|
|
57
|
+
if (i === -1)
|
|
58
|
+
return;
|
|
59
|
+
controls.splice(i, 1);
|
|
60
|
+
notify('structure');
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
registerRoom(registration) {
|
|
65
|
+
const entry = {
|
|
66
|
+
registration,
|
|
67
|
+
observations: {},
|
|
68
|
+
problems: [],
|
|
69
|
+
};
|
|
70
|
+
rooms.push(entry);
|
|
71
|
+
notify('structure');
|
|
72
|
+
return {
|
|
73
|
+
setObservation(id, value) {
|
|
74
|
+
if (Object.is(entry.observations[id], value))
|
|
75
|
+
return;
|
|
76
|
+
entry.observations[id] = value;
|
|
77
|
+
notify('values');
|
|
78
|
+
},
|
|
79
|
+
setProblems(problems) {
|
|
80
|
+
if (JSON.stringify(problems) === JSON.stringify(entry.problems))
|
|
81
|
+
return;
|
|
82
|
+
entry.problems = problems;
|
|
83
|
+
notify('values');
|
|
84
|
+
},
|
|
85
|
+
unregister() {
|
|
86
|
+
const i = rooms.indexOf(entry);
|
|
87
|
+
if (i === -1)
|
|
88
|
+
return;
|
|
89
|
+
rooms.splice(i, 1);
|
|
90
|
+
notify('structure');
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
registerProblems(source) {
|
|
95
|
+
return {
|
|
96
|
+
set(problems) {
|
|
97
|
+
// Nothing changed, none before and none now included: a banner with nothing wrong says nothing.
|
|
98
|
+
const before = pageProblems.get(source) ?? [];
|
|
99
|
+
if (JSON.stringify(before) === JSON.stringify(problems))
|
|
100
|
+
return;
|
|
101
|
+
if (problems.length)
|
|
102
|
+
pageProblems.set(source, problems);
|
|
103
|
+
else
|
|
104
|
+
pageProblems.delete(source);
|
|
105
|
+
notify('values');
|
|
106
|
+
},
|
|
107
|
+
unregister() {
|
|
108
|
+
if (pageProblems.delete(source))
|
|
109
|
+
notify('values');
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
registerFacts() {
|
|
114
|
+
const entry = { value: null };
|
|
115
|
+
shown.push(entry);
|
|
116
|
+
return {
|
|
117
|
+
set(value) {
|
|
118
|
+
if (JSON.stringify(value) === JSON.stringify(entry.value))
|
|
119
|
+
return;
|
|
120
|
+
entry.value = value;
|
|
121
|
+
notify('values');
|
|
122
|
+
},
|
|
123
|
+
unregister() {
|
|
124
|
+
const i = shown.indexOf(entry);
|
|
125
|
+
if (i === -1)
|
|
126
|
+
return;
|
|
127
|
+
shown.splice(i, 1);
|
|
128
|
+
if (entry.value)
|
|
129
|
+
notify('values');
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
},
|
|
133
|
+
controls: () => controls,
|
|
134
|
+
facts: () => shown.flatMap(e => (e.value ? [e.value] : [])),
|
|
135
|
+
rooms: () => rooms,
|
|
136
|
+
problems: () => Object.fromEntries(pageProblems),
|
|
137
|
+
subscribe(listener) {
|
|
138
|
+
listeners.add(listener);
|
|
139
|
+
return () => listeners.delete(listener);
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function sameItem(a, b) {
|
|
144
|
+
return a?.key === b?.key && a?.title === b?.title;
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAoG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AC,EAAE,GAAG,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,KAAK,CAAC;AACpD,CAAC"}
|
package/dist/room.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The room catalog contract (ADR-0220 §2.3): what a room with its own editing
|
|
3
|
+
* model — the vector studio, the video editor — declares about everything a
|
|
4
|
+
* person can do in it, so the assistant's actions and knowledge are generated
|
|
5
|
+
* from the room's code rather than written by hand.
|
|
6
|
+
*
|
|
7
|
+
* The declarations are the contract's (`room-catalog-data.json`), generated
|
|
8
|
+
* from its schema: what `agent-catalog.json` holds and a generator reads. This
|
|
9
|
+
* module adds what a room runs — each action's `run`, each field's `read` and
|
|
10
|
+
* `write` — and the catalog's two derived pieces: its `problems` schema and
|
|
11
|
+
* its data.
|
|
12
|
+
*
|
|
13
|
+
* - **actions**: its operations, each carried out through the room's own
|
|
14
|
+
* reducer and commands, with a JSON schema for the input;
|
|
15
|
+
* - **fields**: its inspector's fields, from the same definitions the
|
|
16
|
+
* inspector renders, each with its value's schema, unit, range, its
|
|
17
|
+
* animation and which kinds of thing it applies to;
|
|
18
|
+
* - **commands**: its keymap, each command with its keys and what it does;
|
|
19
|
+
* - **observations**: what a host reports about the room's state, including
|
|
20
|
+
* the problems it has drawing it.
|
|
21
|
+
*/
|
|
22
|
+
import type { JsonSchema, RoomActionData, RoomCatalogData, RoomCommand, RoomFieldData, RoomObservation, RoomProblemKind, RoomRecipe, RoomResult } from '@ouispec/contract';
|
|
23
|
+
export type { AgentCatalogManifestEntry, RoomActionData, RoomCatalogData, RoomCommand, RoomEntryInfo, RoomFieldAnimation, RoomFieldData, RoomObservation, RoomProblem, RoomProblemKind, RoomRecipe, RoomResult, RoomSection, } from '@ouispec/contract';
|
|
24
|
+
/**
|
|
25
|
+
* What a room action changes.
|
|
26
|
+
* @deprecated Since 0.8: a room action's effect is an `ActionEffect` (ADR-0226 §2.6), of which these are four. Kept for one minor.
|
|
27
|
+
*/
|
|
28
|
+
export type RoomEffect = 'edit' | 'selection' | 'view' | 'file';
|
|
29
|
+
/** One operation of the room. `Ctx` is the room's runtime: what `run` edits through. */
|
|
30
|
+
export interface RoomAction<Ctx, Input = Record<string, unknown>> extends RoomActionData {
|
|
31
|
+
/** Carries the action out through the room's own reducer and commands, as the person's control does. */
|
|
32
|
+
run(ctx: Ctx, input: Input): RoomResult | Promise<RoomResult>;
|
|
33
|
+
}
|
|
34
|
+
/** One inspector field: what it shows for the selection, and what setting it does. */
|
|
35
|
+
export interface RoomField<Ctx, Value = unknown> extends RoomFieldData {
|
|
36
|
+
/** The value for what is selected; `undefined` when the field does not apply to it. */
|
|
37
|
+
read(ctx: Ctx): Value | undefined;
|
|
38
|
+
/** Set it on what is selected, as typing into the field does. */
|
|
39
|
+
write(ctx: Ctx, value: Value): RoomResult | Promise<RoomResult>;
|
|
40
|
+
}
|
|
41
|
+
/** Whether a field animates: its `animation`, or the `keyframeable` of a catalog written before it. */
|
|
42
|
+
export declare function isKeyframeable(field: Pick<RoomFieldData, 'animation' | 'keyframeable'>): boolean;
|
|
43
|
+
/** Everything a room declares. */
|
|
44
|
+
export interface RoomCatalog<Ctx> {
|
|
45
|
+
/** The room's id: the surface id its assistant surface is published under. */
|
|
46
|
+
room: string;
|
|
47
|
+
title: string;
|
|
48
|
+
/** What the room is for, in one or two sentences. */
|
|
49
|
+
description: string;
|
|
50
|
+
actions: readonly RoomAction<Ctx, never>[];
|
|
51
|
+
fields: readonly RoomField<Ctx, unknown>[];
|
|
52
|
+
commands: readonly RoomCommand[];
|
|
53
|
+
observations: readonly RoomObservation[];
|
|
54
|
+
/** The kinds of problem it reports, in its own vocabulary. Default: the generic `problems` schema. */
|
|
55
|
+
problems?: readonly RoomProblemKind[];
|
|
56
|
+
/** Tasks its tools carry out together, which only the room knows. */
|
|
57
|
+
recipes?: readonly RoomRecipe[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The ids of a room's two generic actions, built from the rest of its
|
|
61
|
+
* catalog so they cannot fall behind it: one sets any of its fields (its
|
|
62
|
+
* input has one property per field, under `values`), one runs any available
|
|
63
|
+
* command. A room with fields declares the first; a room with available
|
|
64
|
+
* commands declares the second.
|
|
65
|
+
*/
|
|
66
|
+
export declare const ROOM_SET_PROPERTIES_ID = "set-properties";
|
|
67
|
+
export declare const ROOM_RUN_COMMAND_ID = "run-command";
|
|
68
|
+
/** The id every room and page reports its problems under. */
|
|
69
|
+
export declare const PROBLEMS_OBSERVATION_ID = "problems";
|
|
70
|
+
/**
|
|
71
|
+
* The schema of a `problems` observation: a list of `RoomProblem`. Its kinds
|
|
72
|
+
* are the room's own when it declares them (`RoomCatalog.problems`).
|
|
73
|
+
*/
|
|
74
|
+
export declare function problemsSchema(kinds?: readonly RoomProblemKind[]): JsonSchema;
|
|
75
|
+
/** The schema of a `problems` observation whose kinds are not declared: every page's. */
|
|
76
|
+
export declare const PROBLEMS_SCHEMA: JsonSchema;
|
|
77
|
+
/** The catalog's declarations, as `agent-catalog.json` holds them. Deterministic: entries keep the catalog's order. */
|
|
78
|
+
export declare function catalogData<Ctx>(catalog: RoomCatalog<Ctx>): RoomCatalogData;
|
|
79
|
+
//# sourceMappingURL=room.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room.d.ts","sourceRoot":"","sources":["../src/room.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,aAAa,EACb,eAAe,EACf,eAAe,EACf,UAAU,EACV,UAAU,EACX,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,yBAAyB,EACzB,cAAc,EACd,eAAe,EACf,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,WAAW,GACZ,M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