@almadar/core 10.19.0 → 10.20.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.
@@ -1,60 +1,4 @@
1
- import { e as TraitEventListener, f as EntityField, g as EntityPersistence, j as TraitReference, k as RelationConfig } from './trait-BnNByIRE.js';
2
-
3
- /**
4
- * JSON primitives — the universal "data crossed a boundary" type.
5
- *
6
- * Every value that arrives over the wire from an LLM (tool-call args),
7
- * from disk (workspace files), or from an HTTP body before
8
- * domain-specific validation is a `JsonValue`. Narrow with a typed
9
- * predicate (`is`-guard) at the boundary; don't widen back to `unknown`.
10
- *
11
- * `JsonObject` and `ToolArgs` are aliases for the common
12
- * `Record<string, JsonValue>` shape. `ToolArgs` is the name the
13
- * agent surface uses for LLM-emitted tool-call arguments; `JsonObject`
14
- * is the general-purpose alias. They are the same type — the alias
15
- * exists so call sites read at the right semantic level.
16
- *
17
- * Why not `Record<string, unknown>`? Two reasons. (1) `unknown` widens
18
- * back to anything, which defeats the purpose of typing the boundary.
19
- * (2) The `@almadar/eslint-plugin/no-record-string-unknown` rule blocks
20
- * the wider form — `JsonValue`-based records are the typed answer.
21
- *
22
- * @packageDocumentation
23
- */
24
- /**
25
- * Recursive JSON value union — every shape JSON can carry.
26
- */
27
- type JsonValue = string | number | boolean | null | JsonValue[] | {
28
- [key: string]: JsonValue;
29
- };
30
- /**
31
- * JSON object — keyed string→JsonValue. The wire form of arbitrary
32
- * structured data. Replaces `Record<string, unknown>` at typed
33
- * boundaries (LLM emits, file reads, HTTP bodies).
34
- */
35
- type JsonObject = {
36
- [key: string]: JsonValue;
37
- };
38
- /**
39
- * LLM tool-call arguments — same shape as `JsonObject`, named for the
40
- * agent-surface call site. Each tool's `execute(args: ToolArgs)`
41
- * receives this and narrows via an `is`-guard predicate before any
42
- * field access.
43
- */
44
- type ToolArgs = JsonObject;
45
- /**
46
- * Type guard: is the given value a JSON primitive (non-array,
47
- * non-object)? Used by walkers that decide whether to recurse.
48
- */
49
- declare function isJsonPrimitive(value: JsonValue): value is string | number | boolean | null;
50
- /**
51
- * Type guard: is the given value a JSON object (non-array, non-null)?
52
- */
53
- declare function isJsonObject(value: JsonValue): value is JsonObject;
54
- /**
55
- * Type guard: is the given value a JSON array?
56
- */
57
- declare function isJsonArray(value: JsonValue): value is JsonValue[];
1
+ import { e as TraitEventListener, f as EntityField, g as EntityPersistence, j as TraitReference, k as RelationConfig } from './trait-BcRvHKLW.js';
58
2
 
59
3
  /**
60
4
  * Cross-cutting presentation knobs that don't live per orbital
@@ -123,6 +67,62 @@ interface OwnershipOverlayEntry {
123
67
  ownerField: string;
124
68
  }
125
69
 
70
+ /**
71
+ * JSON primitives — the universal "data crossed a boundary" type.
72
+ *
73
+ * Every value that arrives over the wire from an LLM (tool-call args),
74
+ * from disk (workspace files), or from an HTTP body before
75
+ * domain-specific validation is a `JsonValue`. Narrow with a typed
76
+ * predicate (`is`-guard) at the boundary; don't widen back to `unknown`.
77
+ *
78
+ * `JsonObject` and `ToolArgs` are aliases for the common
79
+ * `Record<string, JsonValue>` shape. `ToolArgs` is the name the
80
+ * agent surface uses for LLM-emitted tool-call arguments; `JsonObject`
81
+ * is the general-purpose alias. They are the same type — the alias
82
+ * exists so call sites read at the right semantic level.
83
+ *
84
+ * Why not `Record<string, unknown>`? Two reasons. (1) `unknown` widens
85
+ * back to anything, which defeats the purpose of typing the boundary.
86
+ * (2) The `@almadar/eslint-plugin/no-record-string-unknown` rule blocks
87
+ * the wider form — `JsonValue`-based records are the typed answer.
88
+ *
89
+ * @packageDocumentation
90
+ */
91
+ /**
92
+ * Recursive JSON value union — every shape JSON can carry.
93
+ */
94
+ type JsonValue = string | number | boolean | null | JsonValue[] | {
95
+ [key: string]: JsonValue;
96
+ };
97
+ /**
98
+ * JSON object — keyed string→JsonValue. The wire form of arbitrary
99
+ * structured data. Replaces `Record<string, unknown>` at typed
100
+ * boundaries (LLM emits, file reads, HTTP bodies).
101
+ */
102
+ type JsonObject = {
103
+ [key: string]: JsonValue;
104
+ };
105
+ /**
106
+ * LLM tool-call arguments — same shape as `JsonObject`, named for the
107
+ * agent-surface call site. Each tool's `execute(args: ToolArgs)`
108
+ * receives this and narrows via an `is`-guard predicate before any
109
+ * field access.
110
+ */
111
+ type ToolArgs = JsonObject;
112
+ /**
113
+ * Type guard: is the given value a JSON primitive (non-array,
114
+ * non-object)? Used by walkers that decide whether to recurse.
115
+ */
116
+ declare function isJsonPrimitive(value: JsonValue): value is string | number | boolean | null;
117
+ /**
118
+ * Type guard: is the given value a JSON object (non-array, non-null)?
119
+ */
120
+ declare function isJsonObject(value: JsonValue): value is JsonObject;
121
+ /**
122
+ * Type guard: is the given value a JSON array?
123
+ */
124
+ declare function isJsonArray(value: JsonValue): value is JsonValue[];
125
+
126
126
  /**
127
127
  * Recursive JSON Schema. Intentionally narrow — only the keywords V2's
128
128
  * signature → schema generator emits. Custom `x-*` extensions carry
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/core",
3
- "version": "10.19.0",
3
+ "version": "10.20.0",
4
4
  "description": "Core schema types and definitions for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",