@40rty/ams-sdk 0.5.15 → 0.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +197 -177
- package/dist/types/sdk/src/canvas/index.d.ts +0 -1
- package/dist/types/sdk/src/catalog/index.d.ts +1 -0
- package/dist/types/sdk/src/catalog/prose-links.d.ts +12 -0
- package/dist/types/sdk/src/host/host-modules.d.ts +24 -4
- package/dist/types/spacestation/src/catalog/catalog-schemas.d.ts +6 -0
- package/dist/types/spacestation/src/catalog/wire/catalog-wire.d.ts +6 -0
- package/dist/types/spacestation/src/catalog/wire/package-release.d.ts +5 -0
- package/dist/types/spacestation/src/contracts/retrieval/core/platform-connector.d.ts +6 -0
- package/dist/types/spacestation/src/signal/turn-ask.d.ts +11 -1
- package/dist/types/spacestation/src/space/agent-directive.d.ts +4 -4
- package/dist/types/spacestation/src/trace/trace-diagnostics.d.ts +20 -0
- package/package.json +1 -1
- package/dist/types/sdk/src/canvas/hydration-notice.d.ts +0 -23
|
@@ -2,7 +2,6 @@ export { FourtyRuntimeProvider, useFourtyRuntime, useOptionalFourtyRuntime, } fr
|
|
|
2
2
|
export { useTurn, useStream, useTurnAsk, useDisplayedLayout, useFourtyShell, useAgentDriven, useReasoning, useSessionState, useSessionId, useSessionMessages, useFacts, useConversationMessages, usePendingMessage, useCurrentMessageIndex, useSelectMessage, useExplicitTurnId, useExplicitTurnSelection, useHistoryNav, useCanvasBack, useCanvasViewBack, useCanvasForward, useConversationState, useSuggestionsWithDefaults, useComposerPlaceholder, useComposerPlaceholderRotation, useLayout, useFocalEntityId, useInteraction, useConversations, useHasLeftSeedHome, useVisitorName, } from './runtime-hooks';
|
|
3
3
|
export type { TurnInfo, HistoryNav, CanvasBack, CanvasForward, ConversationState, RuntimeSessionState, FourtyRuntime, InteractionActions, VisitorName, ExplicitTurnSelection, } from './runtime-types';
|
|
4
4
|
export { CanvasTailProvider, useCanvasTail, CanvasTailMount, type CanvasTailComponent, } from './canvas-tail';
|
|
5
|
-
export { HydrationNoticeProvider, useHydrationNotice, type HydrationNoticeProps, type HydrationNoticeComponent, } from './hydration-notice';
|
|
6
5
|
export { GenerationStyleContext, GenerationStyleProvider, useGenerationStyle, } from './GenerationStyleContext';
|
|
7
6
|
export { ShimmerSweep, type ShimmerSweepProps } from './ShimmerSweep';
|
|
8
7
|
export { FadeTransition, TransitionProvider, useLayoutTransition, type LayoutTransitionItemProps, type LayoutTransitionGroupProps, type LayoutTransition, } from './TransitionContext';
|
|
@@ -5,6 +5,7 @@ export { HydratorProvider, useHydrators } from './HydratorContext';
|
|
|
5
5
|
export type { ComponentMapping, ComponentsMap, Hydrator, HydratorMap, HydrationContext, } from './normalize-components';
|
|
6
6
|
export { RegistryProvider, useRegistry, PackageLookupProvider, usePackageLookup, createAliasedRegistry, type ComponentRegistry, type PackageLookupFn, } from './registry';
|
|
7
7
|
export { renderInline } from './render-inline';
|
|
8
|
+
export { proseRuns, type ProseRun } from './prose-links';
|
|
8
9
|
export { adaptComponent, NullComponent, buildComponentLibrary, type BrandComponent } from './component-library';
|
|
9
10
|
export { catalogComponent, catalogComponentFrom, entity, text, plain, token, type CatalogComponent, type CatalogComponentMeta, } from './define';
|
|
10
11
|
export { adaptCatalogComponent, type CatalogComponentProps, type ValidCatalogComponent, type InteractionContractViolation, } from './interaction-contract';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** A stretch of prose: plain, or the label of a `[label](url)` link. */
|
|
2
|
+
export interface ProseRun {
|
|
3
|
+
text: string;
|
|
4
|
+
/** Set on a link's label. A link to anything but a web page or a site path stays plain text. */
|
|
5
|
+
href: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The prose split into plain runs and link labels. The visitor reads the
|
|
9
|
+
* label, never the URL — also while the link is still streaming in, so a
|
|
10
|
+
* half-written `[our contact form](https://…` shows only "our contact form".
|
|
11
|
+
*/
|
|
12
|
+
export declare function proseRuns(text: string): ProseRun[];
|
|
@@ -167,8 +167,6 @@ export declare const HOST_MODULES: {
|
|
|
167
167
|
CanvasTailProvider: typeof sdk.CanvasTailProvider;
|
|
168
168
|
useCanvasTail: typeof sdk.useCanvasTail;
|
|
169
169
|
CanvasTailMount: typeof sdk.CanvasTailMount;
|
|
170
|
-
HydrationNoticeProvider: typeof sdk.HydrationNoticeProvider;
|
|
171
|
-
useHydrationNotice: typeof sdk.useHydrationNotice;
|
|
172
170
|
GenerationStyleContext: react.Context<sdk.GenerationStyle>;
|
|
173
171
|
GenerationStyleProvider: react.Provider<sdk.GenerationStyle>;
|
|
174
172
|
useGenerationStyle: typeof sdk.useGenerationStyle;
|
|
@@ -244,6 +242,7 @@ export declare const HOST_MODULES: {
|
|
|
244
242
|
usePackageLookup: typeof sdk.usePackageLookup;
|
|
245
243
|
createAliasedRegistry: typeof sdk.createAliasedRegistry;
|
|
246
244
|
renderInline: typeof sdk.renderInline;
|
|
245
|
+
proseRuns: typeof sdk.proseRuns;
|
|
247
246
|
adaptComponent: typeof sdk.adaptComponent;
|
|
248
247
|
NullComponent: sdk.BrandComponent;
|
|
249
248
|
buildComponentLibrary: typeof sdk.buildComponentLibrary;
|
|
@@ -1166,7 +1165,7 @@ export declare const HOST_MODULES: {
|
|
|
1166
1165
|
CHIP_SHOW_SIGNAL: "chip.show";
|
|
1167
1166
|
chipsFromShowSignal: typeof spacestation.chipsFromShowSignal;
|
|
1168
1167
|
TURN_ASK_SIGNAL: "turn.ask";
|
|
1169
|
-
TurnAskSchema: zod.ZodUnion<[zod.ZodEffects<zod.ZodEffects<zod.ZodObject<{
|
|
1168
|
+
TurnAskSchema: zod.ZodUnion<[zod.ZodEffects<zod.ZodEffects<zod.ZodEffects<zod.ZodObject<{
|
|
1170
1169
|
kind: zod.ZodEnum<["choice", "open"]>;
|
|
1171
1170
|
parts: zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodObject<{
|
|
1172
1171
|
answer: zod.ZodString;
|
|
@@ -1195,6 +1194,16 @@ export declare const HOST_MODULES: {
|
|
|
1195
1194
|
parts: (string | {
|
|
1196
1195
|
answer: string;
|
|
1197
1196
|
})[];
|
|
1197
|
+
}>, {
|
|
1198
|
+
kind: "choice" | "open";
|
|
1199
|
+
parts: (string | {
|
|
1200
|
+
answer: string;
|
|
1201
|
+
})[];
|
|
1202
|
+
}, {
|
|
1203
|
+
kind: "choice" | "open";
|
|
1204
|
+
parts: (string | {
|
|
1205
|
+
answer: string;
|
|
1206
|
+
})[];
|
|
1198
1207
|
}>, spacestation.TurnAsk, {
|
|
1199
1208
|
kind: "choice" | "open";
|
|
1200
1209
|
parts: (string | {
|
|
@@ -1264,6 +1273,7 @@ export declare const HOST_MODULES: {
|
|
|
1264
1273
|
examples: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>, "many">>;
|
|
1265
1274
|
renderedBy: zod.ZodOptional<zod.ZodString>;
|
|
1266
1275
|
alwaysInclude: zod.ZodOptional<zod.ZodBoolean>;
|
|
1276
|
+
asks: zod.ZodOptional<zod.ZodBoolean>;
|
|
1267
1277
|
whenToUse: zod.ZodOptional<zod.ZodString>;
|
|
1268
1278
|
dontUseWhen: zod.ZodOptional<zod.ZodString>;
|
|
1269
1279
|
variants: zod.ZodOptional<zod.ZodString>;
|
|
@@ -1308,6 +1318,7 @@ export declare const HOST_MODULES: {
|
|
|
1308
1318
|
examples?: Record<string, unknown>[] | undefined;
|
|
1309
1319
|
renderedBy?: string | undefined;
|
|
1310
1320
|
alwaysInclude?: boolean | undefined;
|
|
1321
|
+
asks?: boolean | undefined;
|
|
1311
1322
|
whenToUse?: string | undefined;
|
|
1312
1323
|
dontUseWhen?: string | undefined;
|
|
1313
1324
|
variants?: string | undefined;
|
|
@@ -1334,6 +1345,7 @@ export declare const HOST_MODULES: {
|
|
|
1334
1345
|
examples?: Record<string, unknown>[] | undefined;
|
|
1335
1346
|
renderedBy?: string | undefined;
|
|
1336
1347
|
alwaysInclude?: boolean | undefined;
|
|
1348
|
+
asks?: boolean | undefined;
|
|
1337
1349
|
whenToUse?: string | undefined;
|
|
1338
1350
|
dontUseWhen?: string | undefined;
|
|
1339
1351
|
variants?: string | undefined;
|
|
@@ -1353,6 +1365,7 @@ export declare const HOST_MODULES: {
|
|
|
1353
1365
|
examples: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>, "many">>;
|
|
1354
1366
|
renderedBy: zod.ZodOptional<zod.ZodString>;
|
|
1355
1367
|
alwaysInclude: zod.ZodOptional<zod.ZodBoolean>;
|
|
1368
|
+
asks: zod.ZodOptional<zod.ZodBoolean>;
|
|
1356
1369
|
whenToUse: zod.ZodOptional<zod.ZodString>;
|
|
1357
1370
|
dontUseWhen: zod.ZodOptional<zod.ZodString>;
|
|
1358
1371
|
variants: zod.ZodOptional<zod.ZodString>;
|
|
@@ -1397,6 +1410,7 @@ export declare const HOST_MODULES: {
|
|
|
1397
1410
|
examples?: Record<string, unknown>[] | undefined;
|
|
1398
1411
|
renderedBy?: string | undefined;
|
|
1399
1412
|
alwaysInclude?: boolean | undefined;
|
|
1413
|
+
asks?: boolean | undefined;
|
|
1400
1414
|
whenToUse?: string | undefined;
|
|
1401
1415
|
dontUseWhen?: string | undefined;
|
|
1402
1416
|
variants?: string | undefined;
|
|
@@ -1423,6 +1437,7 @@ export declare const HOST_MODULES: {
|
|
|
1423
1437
|
examples?: Record<string, unknown>[] | undefined;
|
|
1424
1438
|
renderedBy?: string | undefined;
|
|
1425
1439
|
alwaysInclude?: boolean | undefined;
|
|
1440
|
+
asks?: boolean | undefined;
|
|
1426
1441
|
whenToUse?: string | undefined;
|
|
1427
1442
|
dontUseWhen?: string | undefined;
|
|
1428
1443
|
variants?: string | undefined;
|
|
@@ -1454,6 +1469,7 @@ export declare const HOST_MODULES: {
|
|
|
1454
1469
|
examples: zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>, "many">>;
|
|
1455
1470
|
renderedBy: zod.ZodOptional<zod.ZodString>;
|
|
1456
1471
|
alwaysInclude: zod.ZodOptional<zod.ZodBoolean>;
|
|
1472
|
+
asks: zod.ZodOptional<zod.ZodBoolean>;
|
|
1457
1473
|
whenToUse: zod.ZodOptional<zod.ZodString>;
|
|
1458
1474
|
dontUseWhen: zod.ZodOptional<zod.ZodString>;
|
|
1459
1475
|
variants: zod.ZodOptional<zod.ZodString>;
|
|
@@ -1498,6 +1514,7 @@ export declare const HOST_MODULES: {
|
|
|
1498
1514
|
examples?: Record<string, unknown>[] | undefined;
|
|
1499
1515
|
renderedBy?: string | undefined;
|
|
1500
1516
|
alwaysInclude?: boolean | undefined;
|
|
1517
|
+
asks?: boolean | undefined;
|
|
1501
1518
|
whenToUse?: string | undefined;
|
|
1502
1519
|
dontUseWhen?: string | undefined;
|
|
1503
1520
|
variants?: string | undefined;
|
|
@@ -1524,6 +1541,7 @@ export declare const HOST_MODULES: {
|
|
|
1524
1541
|
examples?: Record<string, unknown>[] | undefined;
|
|
1525
1542
|
renderedBy?: string | undefined;
|
|
1526
1543
|
alwaysInclude?: boolean | undefined;
|
|
1544
|
+
asks?: boolean | undefined;
|
|
1527
1545
|
whenToUse?: string | undefined;
|
|
1528
1546
|
dontUseWhen?: string | undefined;
|
|
1529
1547
|
variants?: string | undefined;
|
|
@@ -1750,6 +1768,7 @@ export declare const HOST_MODULES: {
|
|
|
1750
1768
|
examples?: Record<string, unknown>[] | undefined;
|
|
1751
1769
|
renderedBy?: string | undefined;
|
|
1752
1770
|
alwaysInclude?: boolean | undefined;
|
|
1771
|
+
asks?: boolean | undefined;
|
|
1753
1772
|
whenToUse?: string | undefined;
|
|
1754
1773
|
dontUseWhen?: string | undefined;
|
|
1755
1774
|
variants?: string | undefined;
|
|
@@ -1833,6 +1852,7 @@ export declare const HOST_MODULES: {
|
|
|
1833
1852
|
examples?: Record<string, unknown>[] | undefined;
|
|
1834
1853
|
renderedBy?: string | undefined;
|
|
1835
1854
|
alwaysInclude?: boolean | undefined;
|
|
1855
|
+
asks?: boolean | undefined;
|
|
1836
1856
|
whenToUse?: string | undefined;
|
|
1837
1857
|
dontUseWhen?: string | undefined;
|
|
1838
1858
|
variants?: string | undefined;
|
|
@@ -2761,7 +2781,7 @@ export declare const HOST_MODULES: {
|
|
|
2761
2781
|
AGENT_DIRECTIVE_SEVERITIES: readonly ["a missed opportunity", "a problem", "unacceptable"];
|
|
2762
2782
|
AGENT_DIRECTIVE_SOURCES: readonly ["owner", "operator", "session-lesson"];
|
|
2763
2783
|
AGENT_DIRECTIVE_STATUSES: readonly ["proposed", "active", "rejected", "retired"];
|
|
2764
|
-
MAX_ACTIVE_AGENT_DIRECTIVES:
|
|
2784
|
+
MAX_ACTIVE_AGENT_DIRECTIVES: 20;
|
|
2765
2785
|
DEFAULT_SPACE_LOCALE: "en-US";
|
|
2766
2786
|
SpaceLocaleSchema: zod.ZodEffects<zod.ZodString, string, string>;
|
|
2767
2787
|
textDirectionOf: typeof spacestation.textDirectionOf;
|
|
@@ -34,6 +34,12 @@ export interface CatalogEntryStructural {
|
|
|
34
34
|
renderedBy?: string;
|
|
35
35
|
/** If true, always included in catalog prompt even when not in component hints (layout primitives). */
|
|
36
36
|
alwaysInclude?: boolean;
|
|
37
|
+
/** The component ASKS the visitor something (a quiz, an interview card):
|
|
38
|
+
* once one has been on the canvas, no later turn may introduce another
|
|
39
|
+
* (`@fourty/agent` `layout/spent-ask-guard.ts`), and a turn that places
|
|
40
|
+
* one leads its page with it (`layout/asks-lead.ts`). Set from the
|
|
41
|
+
* manifest's `asks: true` frontmatter by `applyManifests`. */
|
|
42
|
+
asks?: boolean;
|
|
37
43
|
/** When the LLM should select this component. */
|
|
38
44
|
whenToUse?: string;
|
|
39
45
|
/** When NOT to use this component. */
|
|
@@ -11,6 +11,7 @@ export declare const WireCatalogEntrySchema: z.ZodObject<{
|
|
|
11
11
|
examples: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
12
12
|
renderedBy: z.ZodOptional<z.ZodString>;
|
|
13
13
|
alwaysInclude: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
asks: z.ZodOptional<z.ZodBoolean>;
|
|
14
15
|
whenToUse: z.ZodOptional<z.ZodString>;
|
|
15
16
|
dontUseWhen: z.ZodOptional<z.ZodString>;
|
|
16
17
|
variants: z.ZodOptional<z.ZodString>;
|
|
@@ -55,6 +56,7 @@ export declare const WireCatalogEntrySchema: z.ZodObject<{
|
|
|
55
56
|
examples?: Record<string, unknown>[] | undefined;
|
|
56
57
|
renderedBy?: string | undefined;
|
|
57
58
|
alwaysInclude?: boolean | undefined;
|
|
59
|
+
asks?: boolean | undefined;
|
|
58
60
|
whenToUse?: string | undefined;
|
|
59
61
|
dontUseWhen?: string | undefined;
|
|
60
62
|
variants?: string | undefined;
|
|
@@ -81,6 +83,7 @@ export declare const WireCatalogEntrySchema: z.ZodObject<{
|
|
|
81
83
|
examples?: Record<string, unknown>[] | undefined;
|
|
82
84
|
renderedBy?: string | undefined;
|
|
83
85
|
alwaysInclude?: boolean | undefined;
|
|
86
|
+
asks?: boolean | undefined;
|
|
84
87
|
whenToUse?: string | undefined;
|
|
85
88
|
dontUseWhen?: string | undefined;
|
|
86
89
|
variants?: string | undefined;
|
|
@@ -101,6 +104,7 @@ export declare const WireCatalogSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
101
104
|
examples: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
102
105
|
renderedBy: z.ZodOptional<z.ZodString>;
|
|
103
106
|
alwaysInclude: z.ZodOptional<z.ZodBoolean>;
|
|
107
|
+
asks: z.ZodOptional<z.ZodBoolean>;
|
|
104
108
|
whenToUse: z.ZodOptional<z.ZodString>;
|
|
105
109
|
dontUseWhen: z.ZodOptional<z.ZodString>;
|
|
106
110
|
variants: z.ZodOptional<z.ZodString>;
|
|
@@ -145,6 +149,7 @@ export declare const WireCatalogSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
145
149
|
examples?: Record<string, unknown>[] | undefined;
|
|
146
150
|
renderedBy?: string | undefined;
|
|
147
151
|
alwaysInclude?: boolean | undefined;
|
|
152
|
+
asks?: boolean | undefined;
|
|
148
153
|
whenToUse?: string | undefined;
|
|
149
154
|
dontUseWhen?: string | undefined;
|
|
150
155
|
variants?: string | undefined;
|
|
@@ -171,6 +176,7 @@ export declare const WireCatalogSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
171
176
|
examples?: Record<string, unknown>[] | undefined;
|
|
172
177
|
renderedBy?: string | undefined;
|
|
173
178
|
alwaysInclude?: boolean | undefined;
|
|
179
|
+
asks?: boolean | undefined;
|
|
174
180
|
whenToUse?: string | undefined;
|
|
175
181
|
dontUseWhen?: string | undefined;
|
|
176
182
|
variants?: string | undefined;
|
|
@@ -48,6 +48,7 @@ export declare const PackageReleaseSchema: z.ZodObject<{
|
|
|
48
48
|
examples: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
49
49
|
renderedBy: z.ZodOptional<z.ZodString>;
|
|
50
50
|
alwaysInclude: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
asks: z.ZodOptional<z.ZodBoolean>;
|
|
51
52
|
whenToUse: z.ZodOptional<z.ZodString>;
|
|
52
53
|
dontUseWhen: z.ZodOptional<z.ZodString>;
|
|
53
54
|
variants: z.ZodOptional<z.ZodString>;
|
|
@@ -92,6 +93,7 @@ export declare const PackageReleaseSchema: z.ZodObject<{
|
|
|
92
93
|
examples?: Record<string, unknown>[] | undefined;
|
|
93
94
|
renderedBy?: string | undefined;
|
|
94
95
|
alwaysInclude?: boolean | undefined;
|
|
96
|
+
asks?: boolean | undefined;
|
|
95
97
|
whenToUse?: string | undefined;
|
|
96
98
|
dontUseWhen?: string | undefined;
|
|
97
99
|
variants?: string | undefined;
|
|
@@ -118,6 +120,7 @@ export declare const PackageReleaseSchema: z.ZodObject<{
|
|
|
118
120
|
examples?: Record<string, unknown>[] | undefined;
|
|
119
121
|
renderedBy?: string | undefined;
|
|
120
122
|
alwaysInclude?: boolean | undefined;
|
|
123
|
+
asks?: boolean | undefined;
|
|
121
124
|
whenToUse?: string | undefined;
|
|
122
125
|
dontUseWhen?: string | undefined;
|
|
123
126
|
variants?: string | undefined;
|
|
@@ -383,6 +386,7 @@ export declare const PackageReleaseSchema: z.ZodObject<{
|
|
|
383
386
|
examples?: Record<string, unknown>[] | undefined;
|
|
384
387
|
renderedBy?: string | undefined;
|
|
385
388
|
alwaysInclude?: boolean | undefined;
|
|
389
|
+
asks?: boolean | undefined;
|
|
386
390
|
whenToUse?: string | undefined;
|
|
387
391
|
dontUseWhen?: string | undefined;
|
|
388
392
|
variants?: string | undefined;
|
|
@@ -466,6 +470,7 @@ export declare const PackageReleaseSchema: z.ZodObject<{
|
|
|
466
470
|
examples?: Record<string, unknown>[] | undefined;
|
|
467
471
|
renderedBy?: string | undefined;
|
|
468
472
|
alwaysInclude?: boolean | undefined;
|
|
473
|
+
asks?: boolean | undefined;
|
|
469
474
|
whenToUse?: string | undefined;
|
|
470
475
|
dontUseWhen?: string | undefined;
|
|
471
476
|
variants?: string | undefined;
|
|
@@ -46,4 +46,10 @@ export interface PlatformConnector<TDomains = unknown> {
|
|
|
46
46
|
* The runner falls back to "no enrichment" silently.
|
|
47
47
|
*/
|
|
48
48
|
resolveEntities?(ids: ReadonlyArray<string>): Promise<ReadonlyMap<string, EntityRegistryEntry>>;
|
|
49
|
+
/**
|
|
50
|
+
* The `resolved()` kinds `resolveEntities` answers. An id of any other kind
|
|
51
|
+
* is absent from its result because it was never looked up — not because
|
|
52
|
+
* the store lacks it — so a caller asking "does this exist?" asks only these.
|
|
53
|
+
*/
|
|
54
|
+
readonly resolvableKinds?: readonly string[];
|
|
49
55
|
}
|
|
@@ -33,7 +33,7 @@ export interface TurnAsk {
|
|
|
33
33
|
kind: 'choice' | 'open';
|
|
34
34
|
parts: TurnAskPart[];
|
|
35
35
|
}
|
|
36
|
-
export declare const TurnAskSchema: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
36
|
+
export declare const TurnAskSchema: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
37
37
|
kind: z.ZodEnum<["choice", "open"]>;
|
|
38
38
|
parts: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
39
39
|
answer: z.ZodString;
|
|
@@ -62,6 +62,16 @@ export declare const TurnAskSchema: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodO
|
|
|
62
62
|
parts: (string | {
|
|
63
63
|
answer: string;
|
|
64
64
|
})[];
|
|
65
|
+
}>, {
|
|
66
|
+
kind: "choice" | "open";
|
|
67
|
+
parts: (string | {
|
|
68
|
+
answer: string;
|
|
69
|
+
})[];
|
|
70
|
+
}, {
|
|
71
|
+
kind: "choice" | "open";
|
|
72
|
+
parts: (string | {
|
|
73
|
+
answer: string;
|
|
74
|
+
})[];
|
|
65
75
|
}>, TurnAsk, {
|
|
66
76
|
kind: "choice" | "open";
|
|
67
77
|
parts: (string | {
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* list; only `AgentDirective` reaches the prompt.
|
|
14
14
|
*/
|
|
15
15
|
import { z } from 'zod';
|
|
16
|
-
/** At most this many ACTIVE directives per space
|
|
17
|
-
*
|
|
18
|
-
* is pasted in, the prompt just gets longer. */
|
|
19
|
-
export declare const MAX_ACTIVE_AGENT_DIRECTIVES =
|
|
16
|
+
/** At most this many ACTIVE directives per space (raised from 12 in 2026-11,
|
|
17
|
+
* when live spaces hit the limit). Prose is where a cap rots silently: nothing
|
|
18
|
+
* throws when one more rule is pasted in, the prompt just gets longer. */
|
|
19
|
+
export declare const MAX_ACTIVE_AGENT_DIRECTIVES = 20;
|
|
20
20
|
/** What KIND of directive — how an evidence report tells a preference from a
|
|
21
21
|
* promise. */
|
|
22
22
|
export declare const AGENT_DIRECTIVE_KINDS: readonly ["preference", "pairing", "order of things", "promise", "threshold"];
|
|
@@ -215,6 +215,26 @@ export type TraceDiagnostic = {
|
|
|
215
215
|
rootKey: string;
|
|
216
216
|
maxSections: number;
|
|
217
217
|
dropped: string[];
|
|
218
|
+
}
|
|
219
|
+
/** The turn wrote a NEW element of an `asks` type (a quiz, an interview
|
|
220
|
+
* card) the visitor already met this session. Dropped pre-wire by the
|
|
221
|
+
* asks-once guard (`layout/spent-ask-guard.ts`); the visitor never saw it.
|
|
222
|
+
* A model fault — the per-turn `context/spent-asks` line told it not to. */
|
|
223
|
+
| {
|
|
224
|
+
kind: 'spent_ask_component_dropped';
|
|
225
|
+
stage: 'layout_generation';
|
|
226
|
+
element: string;
|
|
227
|
+
elementType: string;
|
|
228
|
+
}
|
|
229
|
+
/** The turn placed an `asks` card (a quiz, an interview card, a planner)
|
|
230
|
+
* below another block on its page. Moved to lead by the asks-leads repair
|
|
231
|
+
* (`layout/asks-lead.ts`) after the stream — a soft model fault: the card is
|
|
232
|
+
* the turn's question, and below a long block the visitor never reaches it. */
|
|
233
|
+
| {
|
|
234
|
+
kind: 'asks_card_led';
|
|
235
|
+
stage: 'layout_generation';
|
|
236
|
+
rootKey: string;
|
|
237
|
+
children: string[];
|
|
218
238
|
} | {
|
|
219
239
|
kind: 'render_sanitized';
|
|
220
240
|
stage: 'layout_generation';
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* THE HYDRATION-FAILURE NOTICE SLOT — what the canvas shows the visitor when
|
|
4
|
-
* an element's entities could not be loaded.
|
|
5
|
-
*
|
|
6
|
-
* The engine (`@fourty/react`) decides WHEN a notice is due; it does not own
|
|
7
|
-
* the WORDS, because words are in the space's language and the label set lives
|
|
8
|
-
* in the UI layer the engine cannot import. So the engine asks this slot, and
|
|
9
|
-
* the spacefront mounts the UI's notice into it (`SpaceFront`). No provider ⇒
|
|
10
|
-
* no notice, never an English one.
|
|
11
|
-
*/
|
|
12
|
-
export interface HydrationNoticeProps {
|
|
13
|
-
/** Entities that resolved to nothing (deleted, unpublished) — the count shown. */
|
|
14
|
-
unavailableCount: number;
|
|
15
|
-
/** A hydrator threw: the content is unknown, not merely missing. */
|
|
16
|
-
hasErrors: boolean;
|
|
17
|
-
}
|
|
18
|
-
export type HydrationNoticeComponent = React.ComponentType<HydrationNoticeProps>;
|
|
19
|
-
export declare function HydrationNoticeProvider({ notice, children }: {
|
|
20
|
-
notice: HydrationNoticeComponent;
|
|
21
|
-
children: React.ReactNode;
|
|
22
|
-
}): React.ReactElement;
|
|
23
|
-
export declare function useHydrationNotice(): HydrationNoticeComponent | null;
|