@inf-monkeys-tech/monkeys 1.1.39 → 1.1.40
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/lib/contracts/declarative-control-http.d.ts +817 -190
- package/lib/contracts/declarative-control-http.d.ts.map +1 -1
- package/lib/contracts/declarative-control.d.ts +140 -30
- package/lib/contracts/declarative-control.d.ts.map +1 -1
- package/lib/contracts/declarative-control.js +101 -85
- package/lib/contracts/declarative-control.js.map +1 -1
- package/lib/contracts/declarative-document-import.d.ts +215 -50
- package/lib/contracts/declarative-document-import.d.ts.map +1 -1
- package/lib/contracts/declarative-publication-job.d.ts +172 -40
- package/lib/contracts/declarative-publication-job.d.ts.map +1 -1
- package/lib/esm/{chunk-OUQ5WLMZ.mjs → chunk-5UMICQYH.mjs} +5 -3
- package/lib/esm/chunk-5UMICQYH.mjs.map +1 -0
- package/lib/esm/{chunk-JFR4WV3P.mjs → chunk-AJWWNJFI.mjs} +2 -2
- package/lib/esm/{chunk-SZ53EILQ.mjs → chunk-FIIAQQUQ.mjs} +2 -2
- package/lib/esm/{chunk-NTGF72G3.mjs → chunk-G2HBRCFH.mjs} +94 -75
- package/lib/esm/chunk-G2HBRCFH.mjs.map +1 -0
- package/lib/esm/{chunk-EOSZ6WB2.mjs → chunk-NIFHONOR.mjs} +3 -3
- package/lib/esm/{chunk-GHOCGKIR.mjs → chunk-YYDR6UML.mjs} +2 -2
- package/lib/esm/contracts/index.mjs +8 -6
- package/lib/esm/index.mjs +10 -8
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +3 -3
- package/lib/esm/schemas/index.mjs +3 -3
- package/lib/json-schema/navigation-runtime-bundle.schema.json +470 -26
- package/lib/json-schema/navigation.schema.json +503 -26
- package/lib/runtime/declarative-control-compiler.d.ts.map +1 -1
- package/lib/runtime/declarative-control-compiler.js +2 -0
- package/lib/runtime/declarative-control-compiler.js.map +1 -1
- package/lib/runtime/runtime-definition-wire.d.ts +43 -10
- package/lib/runtime/runtime-definition-wire.d.ts.map +1 -1
- package/lib/schemas/index.d.ts +86 -20
- package/lib/schemas/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/esm/chunk-NTGF72G3.mjs.map +0 -1
- package/lib/esm/chunk-OUQ5WLMZ.mjs.map +0 -1
- /package/lib/esm/{chunk-JFR4WV3P.mjs.map → chunk-AJWWNJFI.mjs.map} +0 -0
- /package/lib/esm/{chunk-SZ53EILQ.mjs.map → chunk-FIIAQQUQ.mjs.map} +0 -0
- /package/lib/esm/{chunk-EOSZ6WB2.mjs.map → chunk-NIFHONOR.mjs.map} +0 -0
- /package/lib/esm/{chunk-GHOCGKIR.mjs.map → chunk-YYDR6UML.mjs.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DECLARATIVE_CONTROL_API_PREFIX,
|
|
3
3
|
IsoDateTimeSchema,
|
|
4
4
|
JsonObjectSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G2HBRCFH.mjs";
|
|
6
6
|
|
|
7
7
|
// src/contracts/page-stream.ts
|
|
8
8
|
import { z } from "zod";
|
|
@@ -75,4 +75,4 @@ export {
|
|
|
75
75
|
pageStreamRoutes,
|
|
76
76
|
PageStreamControlResultSchema
|
|
77
77
|
};
|
|
78
|
-
//# sourceMappingURL=chunk-
|
|
78
|
+
//# sourceMappingURL=chunk-AJWWNJFI.mjs.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
JsonObjectSchema,
|
|
10
10
|
RevisionRefSchema,
|
|
11
11
|
Sha256Schema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-G2HBRCFH.mjs";
|
|
13
13
|
|
|
14
14
|
// src/contracts/agent-native-runtime.ts
|
|
15
15
|
import { z } from "zod";
|
|
@@ -252,4 +252,4 @@ export {
|
|
|
252
252
|
RuntimeProgramCallResultSchema,
|
|
253
253
|
RuntimeProgramDownloadResultSchema
|
|
254
254
|
};
|
|
255
|
-
//# sourceMappingURL=chunk-
|
|
255
|
+
//# sourceMappingURL=chunk-FIIAQQUQ.mjs.map
|
|
@@ -13014,58 +13014,77 @@ var NavigationSeparatorNodeSchema = z13.object({
|
|
|
13014
13014
|
...NavigationNodeBaseShape,
|
|
13015
13015
|
kind: z13.literal("separator")
|
|
13016
13016
|
}).strict();
|
|
13017
|
-
var
|
|
13018
|
-
|
|
13019
|
-
|
|
13020
|
-
|
|
13021
|
-
|
|
13022
|
-
|
|
13023
|
-
|
|
13024
|
-
|
|
13025
|
-
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
|
-
|
|
13029
|
-
|
|
13030
|
-
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
|
|
13017
|
+
var HeadbarActionConditionShape = { when: PageExpressionSchema.optional() };
|
|
13018
|
+
var NavigationHeadbarActionSchema = z13.discriminatedUnion("kind", [
|
|
13019
|
+
z13.object({
|
|
13020
|
+
...HeadbarActionConditionShape,
|
|
13021
|
+
kind: z13.literal("navigate"),
|
|
13022
|
+
nodeId: ContractIdentifierSchema,
|
|
13023
|
+
rememberLocation: ContractIdentifierSchema.optional()
|
|
13024
|
+
}).strict(),
|
|
13025
|
+
z13.object({
|
|
13026
|
+
...HeadbarActionConditionShape,
|
|
13027
|
+
kind: z13.literal("restore-location"),
|
|
13028
|
+
key: ContractIdentifierSchema
|
|
13029
|
+
}).strict(),
|
|
13030
|
+
z13.object({
|
|
13031
|
+
...HeadbarActionConditionShape,
|
|
13032
|
+
kind: z13.literal("set-state"),
|
|
13033
|
+
stateId: ContractIdentifierSchema,
|
|
13034
|
+
value: PageExpressionSchema
|
|
13035
|
+
}).strict()
|
|
13036
|
+
]);
|
|
13037
|
+
var NavigationHeadbarSchema = z13.object({
|
|
13038
|
+
state: z13.record(ContractIdentifierSchema, z13.object({
|
|
13039
|
+
defaultValue: z13.union([z13.string(), z13.number().finite(), z13.boolean(), z13.null()]),
|
|
13040
|
+
persistence: z13.enum(["none", "user-preference"])
|
|
13041
|
+
}).strict()).default({}),
|
|
13042
|
+
navigationVisible: PageExpressionSchema.optional(),
|
|
13043
|
+
buttons: z13.array(z13.object({
|
|
13044
|
+
id: ContractIdentifierSchema,
|
|
13045
|
+
label: I18nTextSchema,
|
|
13046
|
+
icon: z13.discriminatedUnion("kind", [
|
|
13047
|
+
z13.object({ kind: z13.literal("text"), value: z13.string().trim().min(1).max(16) }).strict(),
|
|
13048
|
+
z13.object({ kind: z13.literal("design-icon"), name: ContractIdentifierSchema }).strict()
|
|
13049
|
+
]),
|
|
13050
|
+
presentation: z13.enum(["icon", "icon-label"]).default("icon"),
|
|
13051
|
+
when: PageExpressionSchema.optional(),
|
|
13052
|
+
onPress: z13.array(NavigationHeadbarActionSchema).min(1).max(8)
|
|
13053
|
+
}).strict()).max(32)
|
|
13036
13054
|
}).strict().superRefine((value, context) => {
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
|
|
13058
|
-
message: "Smart mode must hide the declared Navigation."
|
|
13059
|
-
});
|
|
13060
|
-
}
|
|
13061
|
-
if (value.defaultMode === "smart" && !value.modes.find((mode) => mode.id === "smart")?.targetNodeId) {
|
|
13062
|
-
context.addIssue({
|
|
13063
|
-
code: "custom",
|
|
13064
|
-
path: ["defaultMode"],
|
|
13065
|
-
message: "A smart default requires an executable smart target."
|
|
13055
|
+
if (Object.keys(value.state).length > 32) context.addIssue({ code: "custom", path: ["state"], message: "Headbar supports at most 32 state values." });
|
|
13056
|
+
const ids = value.buttons.map((button) => button.id);
|
|
13057
|
+
if (new Set(ids).size !== ids.length) context.addIssue({ code: "custom", path: ["buttons"], message: "Headbar button identities must be unique." });
|
|
13058
|
+
const checkExpression = (expression, path2) => {
|
|
13059
|
+
if (!expression) return;
|
|
13060
|
+
for (const read of collectExternalPageExpressionReads(expression)) {
|
|
13061
|
+
if (read.root === "state" && read.path.length && Object.prototype.hasOwnProperty.call(value.state, read.path[0])) continue;
|
|
13062
|
+
if (read.root === "scope" && read.path[0] === "targets") continue;
|
|
13063
|
+
context.addIssue({ code: "custom", path: path2, message: "Headbar expressions may read declared state and resolved navigation targets only." });
|
|
13064
|
+
}
|
|
13065
|
+
};
|
|
13066
|
+
checkExpression(value.navigationVisible, ["navigationVisible"]);
|
|
13067
|
+
value.buttons.forEach((button, index) => {
|
|
13068
|
+
checkExpression(button.when, ["buttons", index, "when"]);
|
|
13069
|
+
button.onPress.forEach((action, actionIndex) => {
|
|
13070
|
+
const path2 = ["buttons", index, "onPress", actionIndex];
|
|
13071
|
+
checkExpression(action.when, [...path2, "when"]);
|
|
13072
|
+
if (action.kind === "set-state") {
|
|
13073
|
+
if (!Object.prototype.hasOwnProperty.call(value.state, action.stateId)) context.addIssue({ code: "custom", path: path2, message: "Headbar actions must update declared state." });
|
|
13074
|
+
checkExpression(action.value, [...path2, "value"]);
|
|
13075
|
+
}
|
|
13066
13076
|
});
|
|
13067
|
-
}
|
|
13077
|
+
});
|
|
13068
13078
|
});
|
|
13079
|
+
var validateHeadbarTargets = (headbar, nodes, context) => {
|
|
13080
|
+
headbar?.buttons.forEach((button, index) => button.onPress.forEach((action, actionIndex) => {
|
|
13081
|
+
if (action.kind !== "navigate") return;
|
|
13082
|
+
const target = nodes.find((node) => node.nodeId === action.nodeId);
|
|
13083
|
+
if (!target || target.kind !== "target" || !["page", "workbench"].includes(target.targetRef?.kind ?? "")) {
|
|
13084
|
+
context.addIssue({ code: "custom", path: ["headbar", "buttons", index, "onPress", actionIndex], message: "Headbar navigation requires a Page or Workbench target in this Navigation." });
|
|
13085
|
+
}
|
|
13086
|
+
}));
|
|
13087
|
+
};
|
|
13069
13088
|
var NavigationNodeSchema = z13.discriminatedUnion("kind", [
|
|
13070
13089
|
NavigationGroupNodeSchema,
|
|
13071
13090
|
NavigationTargetNodeSchema,
|
|
@@ -13133,23 +13152,26 @@ var NavigationSchema = z13.object({
|
|
|
13133
13152
|
placements: z13.array(ContractIdentifierSchema).min(1),
|
|
13134
13153
|
lifecycle: DeclarativeLifecycleSchema,
|
|
13135
13154
|
nodes: z13.array(NavigationNodeSchema),
|
|
13136
|
-
|
|
13155
|
+
headbar: NavigationHeadbarSchema.optional(),
|
|
13156
|
+
/** Historical releases retain this opaque payload for revision readback and rolling upgrades. New Headbar runtimes ignore it. */
|
|
13157
|
+
headbarModeSwitch: JsonObjectSchema.optional(),
|
|
13158
|
+
menuRef: z13.object({
|
|
13159
|
+
applicationId: ContractIdentifierSchema,
|
|
13160
|
+
surface: ContractIdentifierSchema,
|
|
13161
|
+
menuId: ContractIdentifierSchema
|
|
13162
|
+
}).strict().optional(),
|
|
13137
13163
|
managementAccess: ManagementAccessSchema,
|
|
13138
13164
|
performanceBudgetRef: RevisionRefSchema,
|
|
13139
13165
|
observationPolicyRevisionRef: RevisionRefSchema
|
|
13140
13166
|
}).strict().superRefine((value, context) => {
|
|
13141
13167
|
validateNavigationTree(value.nodes, context);
|
|
13142
|
-
|
|
13143
|
-
if (
|
|
13144
|
-
|
|
13145
|
-
|
|
13146
|
-
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
message: "The smart Headbar mode must point to a Page target in the same Navigation."
|
|
13150
|
-
});
|
|
13151
|
-
}
|
|
13152
|
-
}
|
|
13168
|
+
validateHeadbarTargets(value.headbar, value.nodes, context);
|
|
13169
|
+
if (value.headbar && value.headbarModeSwitch) context.addIssue({ code: "custom", path: ["headbar"], message: "Headbar controls replace the historical declaration; both cannot be authored together." });
|
|
13170
|
+
if (value.menuRef && (value.nodes.length || value.headbar)) context.addIssue({
|
|
13171
|
+
code: "custom",
|
|
13172
|
+
path: ["menuRef"],
|
|
13173
|
+
message: "A menu reference delegates menu ownership and cannot duplicate nodes or controls."
|
|
13174
|
+
});
|
|
13153
13175
|
value.nodes.forEach((node, index) => {
|
|
13154
13176
|
if (node.kind === "target" && !["page", "workbench", "menu-action", "domain-command"].includes(
|
|
13155
13177
|
node.targetRef.kind
|
|
@@ -13662,7 +13684,14 @@ var NavigationRuntimeBundleSchema = z13.object({
|
|
|
13662
13684
|
surface: ProductSurfaceSchema,
|
|
13663
13685
|
placement: ContractIdentifierSchema,
|
|
13664
13686
|
nodes: z13.array(CompiledNavigationNodeSchema),
|
|
13665
|
-
|
|
13687
|
+
headbar: NavigationHeadbarSchema.optional(),
|
|
13688
|
+
/** Historical releases retain this opaque payload for revision readback and rolling upgrades. New Headbar runtimes ignore it. */
|
|
13689
|
+
headbarModeSwitch: JsonObjectSchema.optional(),
|
|
13690
|
+
menuRef: z13.object({
|
|
13691
|
+
applicationId: ContractIdentifierSchema,
|
|
13692
|
+
surface: ContractIdentifierSchema,
|
|
13693
|
+
menuId: ContractIdentifierSchema
|
|
13694
|
+
}).strict().optional(),
|
|
13666
13695
|
performanceBudgetRef: RevisionRefSchema,
|
|
13667
13696
|
observationPolicyRevisionRef: RevisionRefSchema
|
|
13668
13697
|
}).strict().superRefine((value, context) => {
|
|
@@ -13675,17 +13704,6 @@ var NavigationRuntimeBundleSchema = z13.object({
|
|
|
13675
13704
|
value.navigationId,
|
|
13676
13705
|
context
|
|
13677
13706
|
);
|
|
13678
|
-
const targetNodeId = value.headbarModeSwitch?.modes.find((mode) => mode.id === "smart")?.targetNodeId;
|
|
13679
|
-
if (targetNodeId) {
|
|
13680
|
-
const target = value.nodes.find((node) => node.nodeId === targetNodeId);
|
|
13681
|
-
if (target && (target?.kind !== "target" || target.targetRef.kind !== "page" || target.resolvedTarget.kind !== "route" || target.disabled)) {
|
|
13682
|
-
context.addIssue({
|
|
13683
|
-
code: "custom",
|
|
13684
|
-
path: ["headbarModeSwitch", "modes"],
|
|
13685
|
-
message: "A visible smart Headbar target must resolve to an enabled Page route in the compiled Navigation."
|
|
13686
|
-
});
|
|
13687
|
-
}
|
|
13688
|
-
}
|
|
13689
13707
|
});
|
|
13690
13708
|
var DeclarativeControlOntologyDefinitionSchema = OntologyDefinitionSchema.extend({
|
|
13691
13709
|
classification: z13.literal("control"),
|
|
@@ -20323,7 +20341,8 @@ export {
|
|
|
20323
20341
|
NavigationGroupNodeSchema,
|
|
20324
20342
|
NavigationTargetNodeSchema,
|
|
20325
20343
|
NavigationSeparatorNodeSchema,
|
|
20326
|
-
|
|
20344
|
+
NavigationHeadbarActionSchema,
|
|
20345
|
+
NavigationHeadbarSchema,
|
|
20327
20346
|
NavigationNodeSchema,
|
|
20328
20347
|
NavigationSchema,
|
|
20329
20348
|
ResolvedNavigationTargetSchema,
|
|
@@ -20590,4 +20609,4 @@ export {
|
|
|
20590
20609
|
RecordEditorValidationDetailsSchema,
|
|
20591
20610
|
RecordEditorSubmissionSnapshotSchema
|
|
20592
20611
|
};
|
|
20593
|
-
//# sourceMappingURL=chunk-
|
|
20612
|
+
//# sourceMappingURL=chunk-G2HBRCFH.mjs.map
|