gik-components 0.2.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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +373 -0
  3. package/dist/agent-facing-DjAMQ4Ju.d.ts +110 -0
  4. package/dist/agent-facing.d.ts +8 -0
  5. package/dist/agent-facing.js +2 -0
  6. package/dist/agent-facing.js.map +1 -0
  7. package/dist/chunk-2I33SAGT.js +2 -0
  8. package/dist/chunk-2I33SAGT.js.map +1 -0
  9. package/dist/chunk-2XVVN3LX.js +7 -0
  10. package/dist/chunk-2XVVN3LX.js.map +1 -0
  11. package/dist/chunk-4BIHH7HT.js +2 -0
  12. package/dist/chunk-4BIHH7HT.js.map +1 -0
  13. package/dist/chunk-6JMFZS2Y.js +2 -0
  14. package/dist/chunk-6JMFZS2Y.js.map +1 -0
  15. package/dist/chunk-6TBEAKS7.js +2 -0
  16. package/dist/chunk-6TBEAKS7.js.map +1 -0
  17. package/dist/chunk-DMIV5ZI5.js +2 -0
  18. package/dist/chunk-DMIV5ZI5.js.map +1 -0
  19. package/dist/chunk-DNHCWSHQ.js +2 -0
  20. package/dist/chunk-DNHCWSHQ.js.map +1 -0
  21. package/dist/chunk-GL7PGK3G.js +2 -0
  22. package/dist/chunk-GL7PGK3G.js.map +1 -0
  23. package/dist/chunk-H6T3CCU5.js +2 -0
  24. package/dist/chunk-H6T3CCU5.js.map +1 -0
  25. package/dist/chunk-OFWGYY7S.js +2 -0
  26. package/dist/chunk-OFWGYY7S.js.map +1 -0
  27. package/dist/chunk-UP2OAMPY.js +2 -0
  28. package/dist/chunk-UP2OAMPY.js.map +1 -0
  29. package/dist/chunk-VR5CS5LA.js +2 -0
  30. package/dist/chunk-VR5CS5LA.js.map +1 -0
  31. package/dist/chunk-XA6FE7ZK.js +6 -0
  32. package/dist/chunk-XA6FE7ZK.js.map +1 -0
  33. package/dist/component-authoring-internal-DfFqqPhw.d.ts +40 -0
  34. package/dist/fluent.d.ts +103 -0
  35. package/dist/fluent.js +2 -0
  36. package/dist/fluent.js.map +1 -0
  37. package/dist/index.d.ts +139 -0
  38. package/dist/index.js +2 -0
  39. package/dist/index.js.map +1 -0
  40. package/dist/primitives.d.ts +440 -0
  41. package/dist/primitives.js +2 -0
  42. package/dist/primitives.js.map +1 -0
  43. package/dist/security.d.ts +39 -0
  44. package/dist/security.js +2 -0
  45. package/dist/security.js.map +1 -0
  46. package/dist/semantic.d.ts +147 -0
  47. package/dist/semantic.js +2 -0
  48. package/dist/semantic.js.map +1 -0
  49. package/dist/software.d.ts +44 -0
  50. package/dist/software.js +2 -0
  51. package/dist/software.js.map +1 -0
  52. package/package.json +83 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 nsreehari
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,373 @@
1
+ # @gik-ai/components
2
+
3
+ Public, self-describing declarative components for GIK React hosts.
4
+
5
+ The package has five public layers:
6
+
7
+ - `@gik-ai/components/primitives`: domain-neutral UI mechanics such as chart, collection board, form,
8
+ editable table, growing container, infinite canvas, source viewer, and timer button.
9
+ - `@gik-ai/components/semantic`: domain-neutral information roles and relationships such as event
10
+ series, processes, measures, narratives, evidence, decisions, and relationship sets.
11
+ - `@gik-ai/components/security`: security-domain contracts such as adversarial attack paths.
12
+ - `@gik-ai/components/software`: software-domain contracts such as source findings and comparisons.
13
+ - `@gik-ai/components/fluent`: reusable Fluent 2 controls that retain `fluent:*` capability names:
14
+ badges, buttons, inputs, personas, spinners, tabs, tags, lists, tables, and data grids. Presentation choices are closed
15
+ variants backed by native Fluent props; icon buttons are `fluent:button` variants.
16
+
17
+ `@gik-ai/components` re-exports every layer and aggregate `component*` registries for convenience.
18
+ New consumers should import narrow subpaths and register each selected `*ComponentViews` registry
19
+ under its matching provider alias. Domain catalogs are opt-in rather than ambient.
20
+
21
+ The package uses Fluent 2 React v9 through `@fluentui/react-components`. It assumes the host wraps
22
+ rendering in a Fluent `FluentProvider`; it does not create a theme or introduce a semantic provider.
23
+ Components use Fluent theme tokens and contain no independent palette.
24
+
25
+ Every component accepts native root `className` and `style` props. Internal styles use `makeStyles`;
26
+ root classes use Fluent `mergeClasses` with the consumer class last so callsite Griffel rules can
27
+ override component defaults. Use exported slot props for nested customization when a component
28
+ declares slots. The package does not expose a synthetic or Fluent v8-style `styles` bag.
29
+
30
+ Each component exports one definition containing its renderer, closed props schema, recognized
31
+ semantic tokens, closed variants where applicable, emitted events, slots, agent-facing authoring
32
+ guidance, validator, and trial materializer.
33
+
34
+ Component-private interaction mechanics remain inside the component. Blueprint state represents
35
+ application behavior and cross-Cell coordination, not every local visual toggle. Components such
36
+ as `primitive:pane-with-trigger` therefore own their open/closed state by default and may emit
37
+ optional observation events. Use controlled props only when application behavior genuinely needs
38
+ to coordinate that state across components.
39
+
40
+ ```ts
41
+ import {
42
+ semanticComponentDefinitions,
43
+ semanticComponentViews,
44
+ } from "@gik-ai/components/semantic";
45
+
46
+ import {
47
+ primitiveComponentViews,
48
+ } from "@gik-ai/components/primitives";
49
+
50
+ import {
51
+ fluentComponentViews,
52
+ } from "@gik-ai/components/fluent";
53
+
54
+ import { securityComponentViews } from "@gik-ai/components/security";
55
+ import { softwareComponentViews } from "@gik-ai/components/software";
56
+
57
+ const eventSeries = semanticComponentDefinitions["event-series"];
58
+ const guidance = eventSeries.describe();
59
+ const defaultVariant = guidance.defaultVariant;
60
+ const variants = guidance.variants;
61
+ const schema = eventSeries.getSchema();
62
+ const report = eventSeries.validate(eventSeries.materializeTrial().props);
63
+ ```
64
+
65
+ ## React adapters
66
+
67
+ The root package exports `GikComponent` as the typed convenience API for rendering one package
68
+ component without constructing a `ResolvedNode`:
69
+
70
+ ```tsx
71
+ import { GikComponent } from "@gik-ai/components";
72
+
73
+ <GikComponent
74
+ kind="primitive:chart"
75
+ spec={{
76
+ kind: "bar",
77
+ title: "Requests",
78
+ fields: { label: "hour", value: "count" },
79
+ }}
80
+ data={[{ hour: "09:00", count: 12 }]}
81
+ variant="compact"
82
+ onEvent={({ name, payload }) => dispatch(name, payload)}
83
+ />
84
+ ```
85
+
86
+ The public props are:
87
+
88
+ - `kind`: required closed capability ID, such as `primitive:chart` or `semantic:event-series`.
89
+ - `spec`: component-specific declarative specification, assigned to the component's `spec` prop.
90
+ - `data`: generic component data, assigned to the selected definition's declared `dataProp`.
91
+ - `variant`: an optional declared presentation variant.
92
+ - `componentProps`: additional component-specific props. Explicit `spec`, `data`, and `variant`
93
+ values take precedence.
94
+ - `children`: content for components that declare a `children` slot.
95
+ - `id`: optional projection-node identity. A React-generated identity is used when omitted.
96
+ - `onEvent`: receives declared component events as `{ kind, name, payload, actorId }`.
97
+
98
+ `GikComponent` validates the assembled props against the selected definition before rendering.
99
+ It has no JSON-string or declarative-effect props; non-runtime React hosts may translate `onEvent`
100
+ into their own dispatcher.
101
+
102
+ Use `GikComponentDeclarative` when the input is one canonical JSON `DocNode`. The adapter creates
103
+ the minimal package vocabulary and program wrapper internally, then runs the node through the GIK
104
+ kernel. `GikComponentRuntimeProvider` supplies initial state and native effect handlers separately
105
+ from the JSON declaration:
106
+
107
+ ```tsx
108
+ import {
109
+ GikComponentDeclarative,
110
+ GikComponentRuntimeProvider,
111
+ } from "@gik-ai/components";
112
+
113
+ <GikComponentRuntimeProvider
114
+ state={{ report: { points } }}
115
+ effectHandlers={{ handleSelection }}
116
+ >
117
+ <GikComponentDeclarative
118
+ nodeJson={{
119
+ id: "request-chart",
120
+ capability: "primitive:chart",
121
+ props: { spec: chartSpec },
122
+ edges: {
123
+ read: { points: "report.points" },
124
+ on: {
125
+ select: [{ do: "invoke", args: { tool: "handleSelection" } }],
126
+ },
127
+ },
128
+ }}
129
+ />
130
+ </GikComponentRuntimeProvider>
131
+ ```
132
+
133
+ `nodeJson` accepts a JSON value and validates that it is a canonical projected node. It supports
134
+ the standard node edges, including `read`, `readExpr`, `gate`, `write`, `on`, `react`, and
135
+ `children`. The provider also accepts shared `contexts` and an optional projection-provider
136
+ resolver. Referenced `invoke` tools are declared as vocabulary externals and must have matching
137
+ provider handlers.
138
+
139
+ Projection providers remain explicit. A host registers each layer under a provider name, and a
140
+ bundle imports only the capabilities it uses. Nothing is ambient.
141
+
142
+ Application-owned component layers must provide both their projection views and capability
143
+ descriptors. Pass the view resolver through `resolveProvider` and the matching descriptor resolver
144
+ through `resolveCapabilityDescriptors`:
145
+
146
+ ```tsx
147
+ <GikComponentRuntimeProvider
148
+ resolveProvider={(from) => from === "finance" ? financeComponentViews : undefined}
149
+ resolveCapabilityDescriptors={(from) =>
150
+ from === "finance" ? financeComponentCapabilities : undefined}
151
+ >
152
+ <GikComponentDeclarative
153
+ nodeJson={{
154
+ id: "report",
155
+ capability: "finance:report",
156
+ props: { result },
157
+ }}
158
+ />
159
+ </GikComponentRuntimeProvider>
160
+ ```
161
+
162
+ The descriptor resolver is consulted only after the built-in Fluent, primitive, semantic,
163
+ security, and software catalogs. Unknown capabilities still fail bundle construction. Supplying a
164
+ custom view without its descriptor is intentionally insufficient because the generated vocabulary
165
+ must contain the component's actual props, data, slot, and event contract.
166
+
167
+ ## Agent authoring kit
168
+
169
+ Generate instructions and tools for only the components an agent may author. Every catalog has a
170
+ parallel, layer-specific API:
171
+
172
+ ```ts
173
+ import { getSemanticComponentAgentKit } from "@gik-ai/components/semantic";
174
+ import { getPrimitiveComponentAgentKit } from "@gik-ai/components/primitives";
175
+ import { getFluentComponentAgentKit } from "@gik-ai/components/fluent";
176
+ import { getSecurityComponentAgentKit } from "@gik-ai/components/security";
177
+ import { getSoftwareComponentAgentKit } from "@gik-ai/components/software";
178
+
179
+ const kit = getSemanticComponentAgentKit([
180
+ "semantic:event-series",
181
+ "semantic:work-set",
182
+ ]);
183
+
184
+ const primitiveKit = getPrimitiveComponentAgentKit([
185
+ "primitive:form",
186
+ "primitive:editable-table",
187
+ ]);
188
+
189
+ const fluentKit = getFluentComponentAgentKit([
190
+ "fluent:button",
191
+ "fluent:dropdown",
192
+ ]);
193
+
194
+ const securityKit = getSecurityComponentAgentKit(["security:attack-path"]);
195
+ const softwareKit = getSoftwareComponentAgentKit(["software:source-comparison"]);
196
+
197
+ // Add kit.instructions to the agent's authoring context.
198
+ // Contribute kit.tools to createStatelessAgentFaceDispatcher(extraTools).
199
+ ```
200
+
201
+ The generated instructions derive from each selected definition's `describe()` metadata. Tool
202
+ schemas and handlers are restricted to the same selected capabilities. Short registry IDs such as
203
+ `event-series` and full IDs such as `semantic:event-series` are accepted and deduplicated. Omitting the list
204
+ selects the complete registry; an explicit empty list is rejected.
205
+
206
+ The renderer-free `agentFacingComponentCatalog` is designed for the common transport-free
207
+ `describe` tool. Agents first use `catalog-capabilities` to shortlist, then request every selected
208
+ contract together with `multiple-capabilities`. There is no singular detail operation; hosts should
209
+ merge custom catalogs before constructing the tool.
210
+
211
+ The package also exports the underlying pure APIs:
212
+
213
+ - `listSemanticComponents()`
214
+ - `describeSemanticComponent(capability)`
215
+ - `validateSemanticComponentProps(capability, props)`
216
+ - `preflightSemanticComponent(capability, props)`
217
+ - `materializeSemanticComponentTrial(capability, variant?)`
218
+ - `getSemanticComponentAgentInstructions(components?)`
219
+ - `createSemanticComponentAuthoringTools(components?)`
220
+ - `getSemanticComponentAgentKit(components?)`
221
+ - `listSecurityComponents()` / `getSecurityComponentAgentKit(components?)`
222
+ - `listSoftwareComponents()` / `getSoftwareComponentAgentKit(components?)`
223
+ - `listPrimitiveComponents()`
224
+ - `describePrimitiveComponent(capability)`
225
+ - `validatePrimitiveComponentProps(capability, props)`
226
+ - `preflightPrimitiveComponent(capability, props)`
227
+ - `materializePrimitiveComponentTrial(capability, variant?)`
228
+ - `getPrimitiveComponentAgentInstructions(components?)`
229
+ - `createPrimitiveComponentAuthoringTools(components?)`
230
+ - `getPrimitiveComponentAgentKit(components?)`
231
+ - `listFluentComponents()`
232
+ - `describeFluentComponent(capability)`
233
+ - `validateFluentComponentProps(capability, props)`
234
+ - `preflightFluentComponent(capability, props)`
235
+ - `materializeFluentComponentTrial(capability, variant?)`
236
+ - `getFluentComponentAgentInstructions(components?)`
237
+ - `createFluentComponentAuthoringTools(components?)`
238
+ - `getFluentComponentAgentKit(components?)`
239
+
240
+ Each layer exports a `*ComponentAuthoringTools` convenience catalog for its complete registry.
241
+ These are ACX authoring tools, not live AX runtime tools. The package does not create
242
+ `copilot-instructions.md`, `SKILL.md`, or other host-specific agent customization files.
243
+
244
+ The root entry point also exports `componentViews`, `componentDefinitions`, and
245
+ `componentCapabilities` — each an aggregate merging the fluent, primitive, semantic, security, and
246
+ software registries of the same name. Use them when a host wants one combined registry across every
247
+ layer instead of registering each layer separately.
248
+
249
+ ## Variants
250
+
251
+ `variant` is an optional top-level rendering prop with a closed component-specific string enum. An
252
+ authoring agent should inspect `describe().variants`, select a value whose `useWhen` guidance matches
253
+ the target surface, and use `defaultVariant` when no alternate presentation is required. Variants do
254
+ not change domain meaning, semantic status mapping, event contracts, or host theme ownership.
255
+
256
+ - Event series: `chronology`, `axis`, `text`
257
+ - Process: `flow`, `stages`, `text`
258
+ - Entity set: `clusters`, `matrix`, `list`, `text`
259
+ - Decision: `summary`, `rationale-chain`, `text`
260
+ - Graph diagram: `diagram`, `canvas`
261
+ - Chart: `standard`, `compact`
262
+ - Collection board: `standard`, `compact`
263
+ - Fluent list: `standard`, `selectable`, `vertical-cards`
264
+ - Date time: `date`, `time`, `timestamp`
265
+ - Gantt: `standard`, `compact`
266
+ - Semantic graph: `network`, `relations`
267
+ - Infinite canvas: `standard`, `compact`, `minimal`
268
+ - Source viewer: `standard`, `compact`
269
+ - Attack graph: `canvas`, `diagram`, `relations`, `gantt`, `text`
270
+
271
+ Timeline's `axis` variant places point events as labeled markers on one horizontal scale. Its
272
+ `spec.scale` uses the same datetime and numeric linear coordinate options as Gantt, including
273
+ fractional values, shared `tickStep` markers, and presentation-only `displayPrefix` labels.
274
+
275
+ Chart's visualization kind is independent of
276
+ presentation variant. Set `spec.kind` to `bar`, `line`,
277
+ or `pie`; use `variant` only for `standard` or `compact` density.
278
+
279
+ Gantt accepts either actual timestamps or logical coordinates. Omit `spec.scale` (or set
280
+ `kind: "datetime"`) for timestamp intervals. Set `spec.scale.kind` to `linear` for numeric ranges.
281
+ Optional `minimum` and `maximum` values define a fixed domain such as `0..100`; without bounds, the
282
+ domain is derived from data. `displayPrefix` is presentation-only, so numeric `1` may display as `T1`.
283
+ Set a positive `tickStep` to render shared column markers above the tracks: milliseconds for datetime
284
+ scales and coordinate units for linear scales. Datetime row labels and axis markers use human-readable
285
+ browser-local values. `primitive:datetime` owns the reusable `date`,
286
+ `time`, and `timestamp` scalar presentations and exports matching formatter utilities. Dates omit
287
+ the year when it is the current local year and include it for previous or future years. Time and
288
+ timestamp omit seconds and timezone labels by default; `showSeconds` and `showTimeZone` opt into them.
289
+ Time uses 24-hour format by default; set `hourFormat: "12"` for locale-appropriate AM/PM output.
290
+ The formatter exports accept the same options programmatically.
291
+
292
+ Growing container owns bounded overflow for its `children` slot. Set `followEnd` to `always`,
293
+ `when-at-end`, or `off`. It has no data prop or presentation variant.
294
+
295
+ Infinite canvas accepts JSON-native node descriptors and ports. Put target ports on `left` or `top`,
296
+ source ports on `right` or `bottom`, and give each intended connection one shared token; the component
297
+ derives edges automatically and emits `node`, `edge`, and `layout`. It does not accept an edge array or
298
+ React render callbacks through its declarative contract.
299
+
300
+ Attack graph accepts semantic `entities` and `relationships` plus declarative field mappings. Its
301
+ variants choose a representation rather than a density: `canvas` maps relationships to matching
302
+ ports and delegates interaction and geometry persistence to `primitive:infinite-canvas`; `diagram`
303
+ renders a static node-link overview; `relations` renders accessible source-predicate-target cards
304
+ without drawn edges; `gantt` maps relationships with start/end fields into `primitive:gantt`; `text`
305
+ renders plain ordered relationship statements with no visual geometry and includes human-readable
306
+ start/end timestamp metadata when mapped timestamp fields are available.
307
+ Attack graph passes its optional `spec.ganttScale` through to the primitive, so relationships may use
308
+ actual timestamps or numeric linear coordinates, optionally formatted as `T1..T5` for presentation.
309
+ Datetime and linear scales are configurations of the same `gantt` representation, not Attack Graph variants.
310
+
311
+ Timer button emits `press` with reason `manual` or `timeout`. It supports a simple auto countdown,
312
+ optional repeating timeout behavior, or a user-selectable manual/auto pace. Timer state is
313
+ projection-local; durable scheduling remains a runtime or service responsibility.
314
+
315
+ Form renders a schema-driven committed object editor and emits `save` with `{ values }`. Editable
316
+ table renders a committed row editor and emits `save` with `{ rows }`. Both keep draft state local;
317
+ explicit event handlers own persistence and external effects.
318
+
319
+ Collection board arranges records in declared columns. Its optional interaction configuration enables
320
+ single selection, ordering within a column, and movement between columns without assigning workflow
321
+ meaning to those columns. It emits `select`, `activate`, `reorder`, and `move`; event handlers validate
322
+ business transitions and persist the resulting placement. `standard` and `compact` are density variants.
323
+
324
+ Source viewer renders exact mapped source rows and precomputed diffs. Set `spec.kind` to `source`,
325
+ `unified-diff`, or `split-diff`; these are representations of one source-row model, while `standard`
326
+ and `compact` remain density variants. Diff rows must already contain aligned before/after content and
327
+ a recognized change value. The primitive presents changes but does not calculate or interpret them.
328
+
329
+ ## Events and effects
330
+
331
+ These projection components are declarative leaves. A definition's `events` list describes the
332
+ semantic events that its view may emit; the generated capability descriptor exposes the same list as
333
+ `emits`. A bundle may map those events to closed-grammar actions or external effect handlers in its
334
+ behavior graph. Components do not execute bundle effects directly.
335
+
336
+ Most semantic and domain components are render-only leaves. Work sets and interactive graph
337
+ presentations emit declared intents; consuming bundles decide whether and how those intents change
338
+ state or invoke effects.
339
+
340
+ Primitive components:
341
+
342
+ - `chart`
343
+ - `datetime`
344
+ - `editable-table`
345
+ - `form`
346
+ - `gantt`
347
+ - `graph-diagram`
348
+ - `growing-container`
349
+ - `infinite-canvas`
350
+ - `timer-button`
351
+
352
+ Canonical semantic components:
353
+
354
+ - `argument` (`map`, `outline`, `text`)
355
+ - `event-series` (`chronology`, `axis`, `text`)
356
+ - `process` (`flow`, `stages`, `text`)
357
+ - `work-set` (`board`, `queue`, `list`, `text`)
358
+ - `entity-set` (`clusters`, `matrix`, `list`, `text`)
359
+ - `evidence-case` (`case`, `sources`, `chain`, `text`)
360
+ - `decision` (`summary`, `rationale-chain`, `text`)
361
+ - `narrative` (`article`, `outline`, `briefing`, `text`)
362
+ - `measure-set` (`tiles`, `table`, `ranking`, `text`)
363
+ - `milestones` (`rail`, `timeline`, `list`, `axis`, `text`)
364
+ - `relationship-set` (`network`, `matrix`, `relations`, `text`)
365
+
366
+ Security components:
367
+
368
+ - `attack-path` (`canvas`, `diagram`, `relations`, `gantt`, `text`)
369
+
370
+ Software components:
371
+
372
+ - `source-findings` (`findings`, `text`)
373
+ - `source-comparison` (`unified-diff`, `split-diff`, `text`)
@@ -0,0 +1,110 @@
1
+ import { ResolvedNode, Json } from '@gik-ai/kernel';
2
+ import { ProjectionView } from '@gik-ai/react';
3
+
4
+ interface ComponentAuthoringGuide {
5
+ useWhen: readonly string[];
6
+ avoidWhen: readonly string[];
7
+ rules: readonly string[];
8
+ }
9
+ interface ComponentAgentFacingMetadata {
10
+ catalog?: {
11
+ for?: readonly string[];
12
+ notFor?: readonly string[];
13
+ interaction?: string;
14
+ };
15
+ detail?: {
16
+ dataProps?: Readonly<Record<string, unknown>>;
17
+ props?: Readonly<Record<string, unknown>>;
18
+ constraints?: readonly string[];
19
+ notes?: readonly string[];
20
+ example?: Readonly<Record<string, unknown>>;
21
+ };
22
+ }
23
+ interface ComponentVariantDescription {
24
+ value: string;
25
+ summary: string;
26
+ useWhen: readonly string[];
27
+ }
28
+ interface ComponentEventContract {
29
+ summary: string;
30
+ payloadSchema: Record<string, unknown>;
31
+ }
32
+ declare function eventContract(summary: string, properties?: Record<string, unknown>, required?: readonly string[]): ComponentEventContract;
33
+ interface ComponentDescription {
34
+ capability: string;
35
+ summary: string;
36
+ dataProp?: string;
37
+ slots?: readonly string[];
38
+ events: readonly string[];
39
+ eventContracts?: Readonly<Record<string, ComponentEventContract>>;
40
+ semanticTokens: readonly string[];
41
+ defaultVariant?: string;
42
+ variants: readonly ComponentVariantDescription[];
43
+ authoring: ComponentAuthoringGuide;
44
+ agentFacing?: ComponentAgentFacingMetadata;
45
+ }
46
+ interface ComponentValidationIssue {
47
+ detail: string;
48
+ code?: string;
49
+ }
50
+ interface ComponentValidationReport {
51
+ ok: boolean;
52
+ errors: ComponentValidationIssue[];
53
+ warnings: ComponentValidationIssue[];
54
+ }
55
+ interface DeclarativeComponentDefinition {
56
+ capability: string;
57
+ version: string;
58
+ summary: string;
59
+ dataProp?: string;
60
+ slots?: readonly string[];
61
+ events: readonly string[];
62
+ eventContracts: Readonly<Record<string, ComponentEventContract>>;
63
+ semanticTokens: readonly string[];
64
+ defaultVariant?: string;
65
+ variants: readonly ComponentVariantDescription[];
66
+ authoring: ComponentAuthoringGuide;
67
+ component: ProjectionView;
68
+ describe(): ComponentDescription;
69
+ getSchema(): Record<string, unknown>;
70
+ validate(props: unknown): ComponentValidationReport;
71
+ materializeTrial(): ResolvedNode;
72
+ }
73
+ interface ComponentDefinitionOptions {
74
+ description: ComponentDescription;
75
+ version: string;
76
+ component: ProjectionView;
77
+ getSchema(): Record<string, unknown>;
78
+ validate(props: unknown): ComponentValidationReport;
79
+ materializeTrial(): ResolvedNode;
80
+ }
81
+ declare function defineComponent({ description, version, component, getSchema, validate, materializeTrial, }: ComponentDefinitionOptions): DeclarativeComponentDefinition;
82
+ declare function componentNode(id: string, capability: string, props: Record<string, Json>): ResolvedNode;
83
+ declare function trialNode(capability: string, props: Record<string, Json>): ResolvedNode;
84
+
85
+ interface AgentFacingCapabilitySelection {
86
+ for: readonly string[];
87
+ notFor?: readonly string[];
88
+ interaction?: string;
89
+ }
90
+ interface AgentFacingCapabilityDetail {
91
+ dataProps?: Readonly<Record<string, unknown>>;
92
+ props?: Readonly<Record<string, unknown>>;
93
+ variants?: Readonly<Record<string, {
94
+ summary: string;
95
+ useWhen: readonly string[];
96
+ default?: true;
97
+ }>>;
98
+ slots?: readonly string[];
99
+ emits?: Readonly<Record<string, ComponentEventContract>>;
100
+ constraints?: readonly string[];
101
+ notes?: readonly string[];
102
+ example?: Readonly<Record<string, unknown>>;
103
+ }
104
+ interface AgentFacingCapabilityCatalog {
105
+ catalog: Readonly<Record<string, AgentFacingCapabilitySelection>>;
106
+ details: Readonly<Record<string, AgentFacingCapabilityDetail>>;
107
+ }
108
+ declare function mergeAgentFacingCapabilityCatalogs(...catalogs: readonly AgentFacingCapabilityCatalog[]): AgentFacingCapabilityCatalog;
109
+
110
+ export { type AgentFacingCapabilityCatalog as A, type ComponentDescription as C, type DeclarativeComponentDefinition as D, type AgentFacingCapabilityDetail as a, type AgentFacingCapabilitySelection as b, type ComponentEventContract as c, type ComponentValidationReport as d, type ComponentAgentFacingMetadata as e, type ComponentAuthoringGuide as f, type ComponentDefinitionOptions as g, type ComponentValidationIssue as h, type ComponentVariantDescription as i, componentNode as j, defineComponent as k, eventContract as l, mergeAgentFacingCapabilityCatalogs as m, trialNode as t };
@@ -0,0 +1,8 @@
1
+ import { A as AgentFacingCapabilityCatalog } from './agent-facing-DjAMQ4Ju.js';
2
+ export { a as AgentFacingCapabilityDetail, b as AgentFacingCapabilitySelection, m as mergeAgentFacingCapabilityCatalogs } from './agent-facing-DjAMQ4Ju.js';
3
+ import '@gik-ai/kernel';
4
+ import '@gik-ai/react';
5
+
6
+ declare const agentFacingComponentCatalog: AgentFacingCapabilityCatalog;
7
+
8
+ export { AgentFacingCapabilityCatalog, agentFacingComponentCatalog };