@honua/react 0.1.7-beta.0 → 0.1.10-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/control-plane/admin-client.d.ts +89 -0
  2. package/control-plane/admin-client.d.ts.map +1 -0
  3. package/control-plane/admin-client.js +200 -0
  4. package/control-plane/client.d.ts +1 -1
  5. package/control-plane/client.d.ts.map +1 -1
  6. package/control-plane/client.js +145 -11
  7. package/control-plane/commands/catalog.d.ts +133 -0
  8. package/control-plane/commands/catalog.d.ts.map +1 -0
  9. package/control-plane/commands/catalog.js +365 -0
  10. package/control-plane/commands/errors.d.ts +96 -0
  11. package/control-plane/commands/errors.d.ts.map +1 -0
  12. package/control-plane/commands/errors.js +130 -0
  13. package/control-plane/commands/identity.d.ts +71 -0
  14. package/control-plane/commands/identity.d.ts.map +1 -0
  15. package/control-plane/commands/identity.js +0 -0
  16. package/control-plane/commands/index.d.ts +39 -0
  17. package/control-plane/commands/index.d.ts.map +1 -0
  18. package/control-plane/commands/index.js +34 -0
  19. package/control-plane/commands/runtime.d.ts +146 -0
  20. package/control-plane/commands/runtime.d.ts.map +1 -0
  21. package/control-plane/commands/runtime.js +330 -0
  22. package/control-plane/commands/types.d.ts +228 -0
  23. package/control-plane/commands/types.d.ts.map +1 -0
  24. package/control-plane/commands/types.js +30 -0
  25. package/control-plane/commands/validate.d.ts +27 -0
  26. package/control-plane/commands/validate.d.ts.map +1 -0
  27. package/control-plane/commands/validate.js +132 -0
  28. package/control-plane/generated/admin-api.d.ts +30265 -0
  29. package/control-plane/generated/admin-api.d.ts.map +1 -0
  30. package/control-plane/generated/admin-api.js +5 -0
  31. package/control-plane/generated/admin-operations.d.ts +4053 -0
  32. package/control-plane/generated/admin-operations.d.ts.map +1 -0
  33. package/control-plane/generated/admin-operations.js +820 -0
  34. package/control-plane/index.d.ts +11 -0
  35. package/control-plane/index.d.ts.map +1 -1
  36. package/control-plane/index.js +8 -0
  37. package/control-plane/types.d.ts +14 -0
  38. package/control-plane/types.d.ts.map +1 -1
  39. package/core/client.d.ts.map +1 -1
  40. package/core/client.js +29 -31
  41. package/core/credential-redaction.d.ts +163 -0
  42. package/core/credential-redaction.d.ts.map +1 -0
  43. package/core/credential-redaction.js +389 -0
  44. package/core/error-classifications.d.ts +15 -0
  45. package/core/error-classifications.d.ts.map +1 -1
  46. package/core/error-classifications.js +15 -0
  47. package/core/error-code-registry.d.ts +15 -0
  48. package/core/error-code-registry.d.ts.map +1 -1
  49. package/core/error-code-registry.js +15 -0
  50. package/core/error-envelope.d.ts +31 -0
  51. package/core/error-envelope.d.ts.map +1 -1
  52. package/core/error-envelope.js +11 -0
  53. package/core/errors.d.ts +15 -3
  54. package/core/errors.d.ts.map +1 -1
  55. package/core/errors.js +254 -2
  56. package/core/geometry-input-sr.d.ts +3 -0
  57. package/core/geometry-input-sr.d.ts.map +1 -0
  58. package/core/geometry-input-sr.js +28 -0
  59. package/core/geoservices.d.ts.map +1 -1
  60. package/core/geoservices.js +33 -6
  61. package/core/grpc-adapter.d.ts +2 -2
  62. package/core/grpc-adapter.d.ts.map +1 -1
  63. package/core/grpc-adapter.js +41 -9
  64. package/core/job-run-errors.d.ts +10 -0
  65. package/core/job-run-errors.d.ts.map +1 -0
  66. package/core/job-run-errors.js +14 -0
  67. package/core/job-run-lifecycle.d.ts +34 -0
  68. package/core/job-run-lifecycle.d.ts.map +1 -0
  69. package/core/job-run-lifecycle.js +193 -0
  70. package/core/ogc-processes.d.ts +38 -31
  71. package/core/ogc-processes.d.ts.map +1 -1
  72. package/core/ogc-processes.js +123 -173
  73. package/core/pbf-decoder.d.ts.map +1 -1
  74. package/core/pbf-decoder.js +16 -4
  75. package/core/process-runner.js +15 -100
  76. package/core/protocol-transport.d.ts +6 -1
  77. package/core/protocol-transport.d.ts.map +1 -1
  78. package/core/request-pipeline.d.ts +6 -3
  79. package/core/request-pipeline.d.ts.map +1 -1
  80. package/core/request-pipeline.js +28 -11
  81. package/core/spatial-filter.d.ts +4 -4
  82. package/core/spatial-filter.d.ts.map +1 -1
  83. package/core/spatial-filter.js +7 -7
  84. package/core/surfaces.d.ts +2 -8
  85. package/core/surfaces.d.ts.map +1 -1
  86. package/core/surfaces.js +21 -112
  87. package/core/types.d.ts +21 -9
  88. package/core/types.d.ts.map +1 -1
  89. package/esri-compat/class-breaks-renderer.d.ts +2 -0
  90. package/esri-compat/class-breaks-renderer.d.ts.map +1 -1
  91. package/esri-compat/class-breaks-renderer.js +7 -0
  92. package/esri-compat/controls.d.ts +10 -1
  93. package/esri-compat/controls.d.ts.map +1 -1
  94. package/esri-compat/controls.js +86 -2
  95. package/esri-compat/directions.d.ts +35 -0
  96. package/esri-compat/directions.d.ts.map +1 -1
  97. package/esri-compat/directions.js +153 -2
  98. package/esri-compat/expand.d.ts +1 -0
  99. package/esri-compat/expand.d.ts.map +1 -1
  100. package/esri-compat/expand.js +61 -0
  101. package/esri-compat/feature-layer.d.ts +29 -4
  102. package/esri-compat/feature-layer.d.ts.map +1 -1
  103. package/esri-compat/feature-layer.js +335 -13
  104. package/esri-compat/geometry-engine.d.ts +4 -0
  105. package/esri-compat/geometry-engine.d.ts.map +1 -1
  106. package/esri-compat/geometry-engine.js +8 -1
  107. package/esri-compat/graphic.d.ts +7 -4
  108. package/esri-compat/graphic.d.ts.map +1 -1
  109. package/esri-compat/legend.d.ts +2 -1
  110. package/esri-compat/legend.d.ts.map +1 -1
  111. package/esri-compat/legend.js +15 -0
  112. package/esri-compat/map-view-mount.d.ts +48 -0
  113. package/esri-compat/map-view-mount.d.ts.map +1 -0
  114. package/esri-compat/map-view-mount.js +344 -0
  115. package/esri-compat/map-view.d.ts +38 -6
  116. package/esri-compat/map-view.d.ts.map +1 -1
  117. package/esri-compat/map-view.js +467 -33
  118. package/esri-compat/portal.d.ts +2 -0
  119. package/esri-compat/portal.d.ts.map +1 -1
  120. package/esri-compat/portal.js +7 -2
  121. package/esri-compat/renderer-objects.d.ts +7 -2
  122. package/esri-compat/renderer-objects.d.ts.map +1 -1
  123. package/esri-compat/renderer-objects.js +16 -5
  124. package/esri-compat/route-layer.d.ts +8 -0
  125. package/esri-compat/route-layer.d.ts.map +1 -1
  126. package/esri-compat/route-layer.js +24 -4
  127. package/esri-compat/route-task.d.ts +5 -1
  128. package/esri-compat/route-task.d.ts.map +1 -1
  129. package/esri-compat/route-task.js +119 -7
  130. package/esri-compat/scene-view.d.ts.map +1 -1
  131. package/esri-compat/scene-view.js +1 -0
  132. package/esri-compat/search.d.ts +2 -1
  133. package/esri-compat/search.d.ts.map +1 -1
  134. package/esri-compat/search.js +52 -2
  135. package/esri-compat/unique-value-renderer.d.ts +2 -0
  136. package/esri-compat/unique-value-renderer.d.ts.map +1 -1
  137. package/esri-compat/unique-value-renderer.js +7 -0
  138. package/esri-compat/web-map.d.ts +10 -0
  139. package/esri-compat/web-map.d.ts.map +1 -1
  140. package/esri-compat/web-map.js +102 -0
  141. package/gen/geospatial/v1/common_pb.d.ts +514 -0
  142. package/gen/geospatial/v1/common_pb.d.ts.map +1 -0
  143. package/gen/geospatial/v1/common_pb.js +335 -0
  144. package/gen/geospatial/v1/execution_types_pb.d.ts +1186 -0
  145. package/gen/geospatial/v1/execution_types_pb.d.ts.map +1 -0
  146. package/gen/geospatial/v1/execution_types_pb.js +396 -0
  147. package/gen/geospatial/v1/feature_service_pb.d.ts +403 -0
  148. package/gen/geospatial/v1/feature_service_pb.d.ts.map +1 -0
  149. package/gen/geospatial/v1/feature_service_pb.js +47 -0
  150. package/gen/geospatial/v1/index.d.ts +5 -0
  151. package/gen/geospatial/v1/index.d.ts.map +1 -0
  152. package/gen/geospatial/v1/index.js +9 -0
  153. package/gen/geospatial/v1/spatial_types_pb.d.ts +285 -0
  154. package/gen/geospatial/v1/spatial_types_pb.d.ts.map +1 -0
  155. package/gen/geospatial/v1/spatial_types_pb.js +58 -0
  156. package/gen/geospatial/v1/workspace_artifact_types_pb.d.ts +379 -0
  157. package/gen/geospatial/v1/workspace_artifact_types_pb.d.ts.map +1 -0
  158. package/gen/geospatial/v1/workspace_artifact_types_pb.js +151 -0
  159. package/generated-app/projection.d.ts.map +1 -1
  160. package/generated-app/projection.js +10 -1
  161. package/map/webmap-maplibre.d.ts +2 -1
  162. package/map/webmap-maplibre.d.ts.map +1 -1
  163. package/map/webmap-maplibre.js +3 -0
  164. package/package.json +3 -3
  165. package/query-planner/geoservices.d.ts.map +1 -1
  166. package/query-planner/geoservices.js +2 -0
  167. package/query-planner/grpc.d.ts +4 -4
  168. package/query-planner/grpc.d.ts.map +1 -1
  169. package/query-planner/grpc.js +11 -11
  170. package/query-planner/types.d.ts +6 -4
  171. package/query-planner/types.d.ts.map +1 -1
  172. package/realtime/honua-server.d.ts +4 -0
  173. package/realtime/honua-server.d.ts.map +1 -1
  174. package/realtime/honua-server.js +10 -0
  175. package/realtime/resumable.js +9 -0
  176. package/realtime/types.d.ts +8 -0
  177. package/realtime/types.d.ts.map +1 -1
  178. package/runtime/errors.d.ts +1 -1
  179. package/runtime/errors.d.ts.map +1 -1
  180. package/runtime/errors.js +2 -0
  181. package/runtime/generated/map-package-schema-meta.d.ts +11 -0
  182. package/runtime/generated/map-package-schema-meta.d.ts.map +1 -0
  183. package/runtime/generated/map-package-schema-meta.js +12 -0
  184. package/runtime/generated/map-package-schema-validator.d.ts +16 -0
  185. package/runtime/generated/map-package-schema-validator.d.ts.map +1 -0
  186. package/runtime/generated/map-package-schema-validator.js +1422 -0
  187. package/runtime/index.d.ts +5 -1
  188. package/runtime/index.d.ts.map +1 -1
  189. package/runtime/index.js +6 -0
  190. package/runtime/map-package-export.d.ts +151 -0
  191. package/runtime/map-package-export.d.ts.map +1 -0
  192. package/runtime/map-package-export.js +636 -0
  193. package/runtime/map-package-validation.d.ts +21 -1
  194. package/runtime/map-package-validation.d.ts.map +1 -1
  195. package/runtime/map-package-validation.js +132 -95
  196. package/runtime/map-package.d.ts +80 -0
  197. package/runtime/map-package.d.ts.map +1 -1
  198. package/studio/capability-manifest.d.ts +10 -0
  199. package/studio/capability-manifest.d.ts.map +1 -1
  200. package/studio/capability-manifest.js +38 -0
  201. package/studio/chart-spec.d.ts +6 -6
  202. package/studio/chart-spec.d.ts.map +1 -1
  203. package/studio/chart-spec.js +6 -6
  204. package/studio/command-adapter.d.ts +35 -0
  205. package/studio/command-adapter.d.ts.map +1 -0
  206. package/studio/command-adapter.js +36 -0
  207. package/studio/generated/studio-api.d.ts +1062 -0
  208. package/studio/generated/studio-api.d.ts.map +1 -0
  209. package/studio/generated/studio-api.js +4 -0
  210. package/studio/index.d.ts +25 -13
  211. package/studio/index.d.ts.map +1 -1
  212. package/studio/index.js +21 -10
  213. package/studio/lifecycle-client.d.ts +262 -22
  214. package/studio/lifecycle-client.d.ts.map +1 -1
  215. package/studio/lifecycle-client.js +543 -24
  216. package/studio/lifecycle-errors.d.ts +8 -2
  217. package/studio/lifecycle-errors.d.ts.map +1 -1
  218. package/studio/lifecycle-errors.js +6 -1
  219. package/studio/lifecycle-types.d.ts +237 -38
  220. package/studio/lifecycle-types.d.ts.map +1 -1
  221. package/studio/lifecycle-types.js +5 -12
  222. package/studio/publication-status.d.ts +55 -0
  223. package/studio/publication-status.d.ts.map +1 -0
  224. package/studio/publication-status.js +103 -0
  225. package/studio/types.d.ts +37 -7
  226. package/studio/types.d.ts.map +1 -1
  227. package/studio/types.js +5 -3
  228. package/studio/validate.d.ts.map +1 -1
  229. package/studio/validate.js +104 -7
  230. package/style/renderers.d.ts +6 -1
  231. package/style/renderers.d.ts.map +1 -1
  232. package/style/renderers.js +11 -6
  233. package/style/visual-variables.d.ts +43 -0
  234. package/style/visual-variables.d.ts.map +1 -0
  235. package/style/visual-variables.js +183 -0
  236. package/webmap/convert-layer.d.ts +2 -1
  237. package/webmap/convert-layer.d.ts.map +1 -1
  238. package/webmap/convert-layer.js +20 -3
  239. package/webmap/convert-renderer.d.ts +10 -3
  240. package/webmap/convert-renderer.d.ts.map +1 -1
  241. package/webmap/convert-renderer.js +190 -36
  242. package/webmap/index.d.ts +1 -0
  243. package/webmap/index.d.ts.map +1 -1
  244. package/webmap/parse.d.ts +2 -1
  245. package/webmap/parse.d.ts.map +1 -1
  246. package/webmap/parse.js +1 -1
  247. package/gen/honua/v1/feature_service_pb.d.ts +0 -918
  248. package/gen/honua/v1/feature_service_pb.d.ts.map +0 -1
  249. package/gen/honua/v1/feature_service_pb.js +0 -375
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Structural validation for command inputs.
3
+ *
4
+ * Commands describe their input with the JSON-Schema subset in `./types.js`,
5
+ * the same dialect `src/agent-tools/index.ts` uses for agent tool definitions.
6
+ * That one description drives CLI argument checking, MCP tool schemas, Studio
7
+ * forms, and this validator — so an input rejected by one transport is
8
+ * rejected identically by all of them.
9
+ *
10
+ * The validator covers exactly the keywords the dialect declares. It is not a
11
+ * general JSON-Schema implementation and deliberately adds no dependency;
12
+ * `src/` is zod-free.
13
+ *
14
+ * @experimental
15
+ * @module
16
+ */
17
+ /**
18
+ * Validate `value` against `schema`, returning every finding.
19
+ *
20
+ * `additionalProperties: false` is the load-bearing rule for the security
21
+ * contract: a closed input schema is why no transport can smuggle an approval
22
+ * or authority field into a shared command.
23
+ */
24
+ export function validateCommandInput(schema, value) {
25
+ const issues = [];
26
+ validateNode(schema, value, "", issues);
27
+ return issues;
28
+ }
29
+ function validateNode(schema, value, path, issues) {
30
+ if (schema.type !== undefined && !matchesType(schema.type, value)) {
31
+ issues.push({ path, message: `expected type ${formatType(schema.type)}, received ${describe(value)}` });
32
+ return;
33
+ }
34
+ if (schema.enum !== undefined && !schema.enum.some((allowed) => Object.is(allowed, value))) {
35
+ issues.push({ path, message: `expected one of ${schema.enum.map((entry) => JSON.stringify(entry)).join(", ")}` });
36
+ return;
37
+ }
38
+ if (typeof value === "string")
39
+ validateString(schema, value, path, issues);
40
+ if (typeof value === "number")
41
+ validateNumber(schema, value, path, issues);
42
+ if (Array.isArray(value)) {
43
+ if (schema.items) {
44
+ value.forEach((entry, index) => validateNode(schema.items, entry, `${path}[${index}]`, issues));
45
+ }
46
+ return;
47
+ }
48
+ if (isPlainRecord(value))
49
+ validateObject(schema, value, path, issues);
50
+ }
51
+ function validateString(schema, value, path, issues) {
52
+ if (schema.minLength !== undefined && value.length < schema.minLength) {
53
+ issues.push({ path, message: `expected at least ${schema.minLength} character(s)` });
54
+ }
55
+ if (schema.maxLength !== undefined && value.length > schema.maxLength) {
56
+ issues.push({ path, message: `expected at most ${schema.maxLength} character(s)` });
57
+ }
58
+ }
59
+ function validateNumber(schema, value, path, issues) {
60
+ if (schema.minimum !== undefined && value < schema.minimum) {
61
+ issues.push({ path, message: `expected >= ${schema.minimum}` });
62
+ }
63
+ if (schema.maximum !== undefined && value > schema.maximum) {
64
+ issues.push({ path, message: `expected <= ${schema.maximum}` });
65
+ }
66
+ }
67
+ function validateObject(schema, value, path, issues) {
68
+ const properties = schema.properties ?? {};
69
+ for (const required of schema.required ?? []) {
70
+ if (value[required] === undefined) {
71
+ issues.push({ path: join(path, required), message: "is required" });
72
+ }
73
+ }
74
+ for (const [key, child] of Object.entries(value)) {
75
+ if (child === undefined)
76
+ continue;
77
+ const propertySchema = properties[key];
78
+ if (propertySchema) {
79
+ validateNode(propertySchema, child, join(path, key), issues);
80
+ continue;
81
+ }
82
+ if (schema.additionalProperties === false) {
83
+ issues.push({ path: join(path, key), message: "is not an accepted property of this command" });
84
+ continue;
85
+ }
86
+ if (typeof schema.additionalProperties === "object") {
87
+ validateNode(schema.additionalProperties, child, join(path, key), issues);
88
+ }
89
+ }
90
+ }
91
+ function matchesType(type, value) {
92
+ const types = typeof type === "string" ? [type] : type;
93
+ return types.some((entry) => matchesSingleType(entry, value));
94
+ }
95
+ function matchesSingleType(type, value) {
96
+ switch (type) {
97
+ case "string":
98
+ return typeof value === "string";
99
+ case "number":
100
+ return typeof value === "number" && Number.isFinite(value);
101
+ case "integer":
102
+ return typeof value === "number" && Number.isInteger(value);
103
+ case "boolean":
104
+ return typeof value === "boolean";
105
+ case "array":
106
+ return Array.isArray(value);
107
+ case "object":
108
+ return isPlainRecord(value);
109
+ case "null":
110
+ return value === null;
111
+ default:
112
+ return true;
113
+ }
114
+ }
115
+ function formatType(type) {
116
+ return typeof type === "string" ? type : type.join(" | ");
117
+ }
118
+ function describe(value) {
119
+ if (value === null)
120
+ return "null";
121
+ if (value === undefined)
122
+ return "undefined";
123
+ if (Array.isArray(value))
124
+ return "array";
125
+ return typeof value;
126
+ }
127
+ function isPlainRecord(value) {
128
+ return typeof value === "object" && value !== null && !Array.isArray(value);
129
+ }
130
+ function join(path, key) {
131
+ return path ? `${path}.${key}` : key;
132
+ }