unoverse 0.1.219 → 0.1.221

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.
@@ -42,6 +42,13 @@ DOCR_TOKEN=
42
42
  # Page intelligence (promote-page extraction)
43
43
  HYPERBROWSER_API_KEY=
44
44
 
45
+ # The document engine (its own repo, unoverse-platform/document-engine), on Beam
46
+ # (docs/saas-architecture/DOCUMENT_ENGINE.md). Empty = a local one at localhost:5002.
47
+ # The token is your Beam workspace token (`beam config list`); the engine sends it on every
48
+ # call, because a Beam address is public.
49
+ DOCUMENTS_SERVICE_URL=
50
+ DOCUMENTS_SERVICE_TOKEN=
51
+
45
52
  # Marketplace catalogue to install from (docs/architecture/authoring/MARKETPLACE.md).
46
53
  # Empty = local items only. No default: a URL is never hardcoded.
47
54
  UNOVERSE_MARKETPLACE_URL=
@@ -46,7 +46,7 @@ cmd_db_verify() {
46
46
  "execution_id", "workflow_id", "status", "start_time", "end_time",
47
47
  "duration", "error", "result", "created_at", "was_from_cache", "source",
48
48
  "user_id", "task_ref", "state_ciphertext", "wake", "wake_at",
49
- "expires_at", "snapshot_id"
49
+ "expires_at", "snapshot_id", "opened_by"
50
50
  ],
51
51
  node_traces: [
52
52
  "trace_id", "execution_id", "node_id", "node_type", "start_time",
@@ -128,12 +128,9 @@ cmd_db_verify() {
128
128
  dictionary_links: [
129
129
  "from_id", "to_id", "name", "type", "org", "provenance", "created_at"
130
130
  ],
131
- dictionary_faces: [
132
- "parent_id", "part_id", "kind", "org", "embedding", "face_hash", "updated_at"
133
- ],
134
131
  dictionary_pieces: [
135
132
  "parent_id", "part_id", "part_no", "kind", "org", "title", "page_from", "page_to",
136
- "text", "content_hash", "split_version", "words", "updated_at"
133
+ "text", "content_hash", "split_version", "words", "updated_at", "embedding", "cells"
137
134
  ],
138
135
  dictionary_ingestion_configs: [
139
136
  "id", "name", "description", "connector_type", "connector_config",
@@ -200,6 +197,30 @@ cmd_db_verify() {
200
197
  "id", "label", "key_prefix", "key_hash", "scopes", "expires_at",
201
198
  "revoked_at", "last_used_at", "created_by", "created_at",
202
199
  "owner_id", "owner_label"
200
+ ],
201
+ agent_signing_keys: [
202
+ "kid", "public_jwk", "private_jwk", "created_at"
203
+ ],
204
+ agent_switches: [
205
+ "agent_ref", "owner_id", "owner_permissions", "state", "mailbox",
206
+ "switched_on_at", "updated_at"
207
+ ],
208
+ agent_runs: [
209
+ "run_id", "agent_ref", "woken_by", "instruction", "state", "outcome",
210
+ "started_at", "ended_at"
211
+ ],
212
+ dictionary_mentions: [
213
+ "id", "org", "job_id", "source", "object_type", "fields", "document_id",
214
+ "page_from", "page_to", "record_id", "outcome", "created_at", "resolved_at"
215
+ ],
216
+ people: [
217
+ "person_id", "org", "stage", "email", "linkedin", "user_id", "crm_provider",
218
+ "crm_id", "name", "company", "role", "observed", "understood", "inferred",
219
+ "researched", "created_at", "updated_at"
220
+ ],
221
+ dictionary_merges: [
222
+ "id", "org", "survivor_id", "gone_id", "name", "snapshot", "changed", "by",
223
+ "at", "undone_at"
203
224
  ]
204
225
  };
205
226
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.219",
3
+ "version": "0.1.221",
4
4
  "description": "The Unoverse front door — create a Studio project, a universe, or a client app, and launch Studio.",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "type": "module",
@@ -94,6 +94,15 @@ export async function lintOrg(home) {
94
94
  result.problems.push(...lintPrompts(home.dir, { org }).problems);
95
95
  return { problems: result.problems, errors: result.problems.filter((p) => p.level === "error") };
96
96
  }
97
+ /**
98
+ * Lint an org repo's objects and pipelines with some files as they WOULD be (`overlay`: absolute path ->
99
+ * text): a change is checked before it is written (an approved table wording, pipelines/tables.md).
100
+ */
101
+ export async function lintOrgObjects(home, overlay = {}) {
102
+ const { lintObjects } = await import("../lint/objects/index.mjs");
103
+ const problems = lintObjects(home.dir, { org: { name: home.org, dir: home.dir }, overlay }).problems;
104
+ return { problems, errors: problems.filter((p) => p.level === "error") };
105
+ }
97
106
  /**
98
107
  * What publishing WOULD do, without doing it.
99
108
  *
@@ -461,8 +461,8 @@ function lintFile(file) {
461
461
  // TEMPLATE manifest = the envelope. Requires binding + a resolvable root.
462
462
  if (!json.name) report("warn", file, `app manifest missing "name": the display name (docs.unoverse.ai/design/apps)`);
463
463
  checkDiscoveryMeta(report, file, json, "app", "docs.unoverse.ai/design/apps");
464
- if (!(json.binding && json.binding.workflow))
465
- report("warn", file, `template manifest has no binding.workflow. The app owns its workflow binding (docs.unoverse.ai/design/apps)`);
464
+ if (!(json.binding && (json.binding.workflow || json.binding.pipeline)))
465
+ report("warn", file, `template manifest has no binding.workflow or binding.pipeline. The app owns its workflow binding (docs.unoverse.ai/design/apps)`);
466
466
  // Two valid roots (definitions.ts:229): the STANDARD manifest-only form (root =
467
467
  // layouts/<layout>), OR a `<name>` envelope OVERRIDE (its own root). Only the
468
468
  // manifest-only form must resolve a layout; an envelope-form template supplies its own.
@@ -693,7 +693,10 @@ for (const orgDir of orgDirs) {
693
693
  // rule is off, silently.
694
694
  for (const sub of ["apps", "components", "templates", "agents"]) {
695
695
  const d = join(orgDir, sub);
696
- if (existsSync(d) && statSync(d).isDirectory()) homes.push({ dir: d });
696
+ // AN AGENT FOLDER (agents/<name>/agent.yaml, docs/architecture/signal/AGENTS.md § 3) is not a
697
+ // definition: the objects linter checks it, as it does a pipeline folder. Only a flat file
698
+ // directly in agents/ is the older Agent file, still checked here until it is converted.
699
+ if (existsSync(d) && statSync(d).isDirectory()) homes.push(sub === "agents" ? { dir: d, flat: true } : { dir: d });
697
700
  }
698
701
  }
699
702
 
@@ -865,7 +868,10 @@ for (const orgDir of [DS, ...orgDirs]) {
865
868
  // This was an org-blocking error until it stopped a yasisland deploy over a form
866
869
  // nobody needed that day.
867
870
  if (credentialDefs.size)
868
- for (const cname of Array.isArray(readDef(mf).credentials) ? readDef(mf).credentials : [])
871
+ for (const entry of Array.isArray(readDef(mf).credentials) ? readDef(mf).credentials : [])
872
+ // `- googleApiCredential` or `- googleApiCredential: MapKey` (the saved name chooses
873
+ // between two of one type); the definition looked for is the TYPE either way.
874
+ for (const cname of typeof entry === "string" ? [entry] : entry && typeof entry === "object" ? Object.keys(entry) : [String(entry)])
869
875
  if (!credentialDefs.has(String(cname)))
870
876
  report(
871
877
  "warn",
@@ -1039,7 +1045,12 @@ function placeNames() {
1039
1045
  const walkNode = makeWalkNode(ctx);
1040
1046
  const lintFile = makeLintFile({ ...ctx, walkNode });
1041
1047
 
1042
- for (const home of homes) for (const f of jsonFiles(home.dir)) lintFile(f);
1048
+ for (const home of homes) {
1049
+ const files = home.flat
1050
+ ? readdirSync(home.dir).filter((f) => !f.startsWith(".") && isDefFile(f) && !statSync(join(home.dir, f)).isDirectory()).map((f) => join(home.dir, f))
1051
+ : jsonFiles(home.dir);
1052
+ for (const f of files) lintFile(f);
1053
+ }
1043
1054
  return { problems, homes, designRoot: DESIGN_ROOT, designSystem: DS };
1044
1055
  }
1045
1056
 
@@ -72,7 +72,7 @@ export const INTERFACE_FIELDS = new Set([
72
72
  export const AUTHORED_CONTROLS = ["maxLength", "minItems", "maxItems", "enum"];
73
73
 
74
74
  export const PRIMITIVE_PROPS = {
75
- Box: ["children", "autoScroll", "revealOnStick", "selection", "appWidth"],
75
+ Box: ["children", "autoScroll", "revealOnStick", "selection", "appWidth", "pan"],
76
76
  Stack: ["children", "autoScroll", "revealOnStick", "appWidth"],
77
77
  Row: ["children", "autoScroll", "revealOnStick", "appWidth"],
78
78
  Column: ["children", "autoScroll", "revealOnStick", "appWidth"],
@@ -48,9 +48,10 @@
48
48
  "apiKeyHeader",
49
49
  "apiKeyQuery",
50
50
  "oauth2ClientCredentials",
51
+ "oauth2RefreshToken",
51
52
  "awsSigV4"
52
53
  ],
53
- "description": "IMPLEMENTED schemes only. Values are added here only WITH their implementation, never ahead of it.\n\noauth2ClientCredentials exchanges a client id and secret for a short-lived token, form-encoded, caches it per connected app until it expires, and refreshes once on a 401. What the exchange returned is in scope as `token`, so a url can reach `{{ token.instanceUrl }}` where the vendor tells you where to talk as well as how.\n\nawsSigV4 signs the request with AWS Signature Version 4, which is what turns every AWS service into a manifest: the signature is computation over the request (it hashes the exact bytes being sent), so it belongs to the executor, while the endpoint, operation and body are description and stay here. Name `service` and, if it is not on the credential, `region`; the keys come from `awsCredential` and are never written in a manifest. Unlike every other scheme this resolves LAST, after the url and body are final, because a signature covers them."
54
+ "description": "IMPLEMENTED schemes only. Values are added here only WITH their implementation, never ahead of it.\n\noauth2ClientCredentials exchanges a client id and secret for a short-lived token, form-encoded, caches it per connected app until it expires, and refreshes once on a 401. What the exchange returned is in scope as `token`, so a url can reach `{{ token.instanceUrl }}` where the vendor tells you where to talk as well as how.\n\noauth2RefreshToken is the same exchange with a refresh token as well, for vendors that only issue tokens a person approved once (LinkedIn): the refresh token is made once in the vendor's developer portal and kept on the credential.\n\nawsSigV4 signs the request with AWS Signature Version 4, which is what turns every AWS service into a manifest: the signature is computation over the request (it hashes the exact bytes being sent), so it belongs to the executor, while the endpoint, operation and body are description and stay here. Name `service` and, if it is not on the credential, `region`; the keys come from `awsCredential` and are never written in a manifest. Unlike every other scheme this resolves LAST, after the url and body are final, because a signature covers them."
54
55
  },
55
56
  "token": {
56
57
  "$ref": "_defs.schema.json#/definitions/templateOrExpression"
@@ -82,19 +83,23 @@
82
83
  },
83
84
  "tokenUrl": {
84
85
  "$ref": "_defs.schema.json#/definitions/templateOrExpression",
85
- "description": "oauth2ClientCredentials: where the token is minted, e.g. https://your-org.my.salesforce.com/services/oauth2/token."
86
+ "description": "oauth2ClientCredentials, oauth2RefreshToken: where the token is minted, e.g. https://your-org.my.salesforce.com/services/oauth2/token."
86
87
  },
87
88
  "clientId": {
88
89
  "$ref": "_defs.schema.json#/definitions/templateOrExpression",
89
- "description": "oauth2ClientCredentials: the connected app's id. Not secret."
90
+ "description": "oauth2ClientCredentials, oauth2RefreshToken: the connected app's id. Not secret."
90
91
  },
91
92
  "clientSecret": {
92
93
  "$ref": "_defs.schema.json#/definitions/templateOrExpression",
93
- "description": "oauth2ClientCredentials: the connected app's secret."
94
+ "description": "oauth2ClientCredentials, oauth2RefreshToken: the connected app's secret."
94
95
  },
95
96
  "scope": {
96
97
  "$ref": "_defs.schema.json#/definitions/templateOrExpression",
97
98
  "description": "oauth2ClientCredentials: optional scope string, when the vendor wants one."
99
+ },
100
+ "refreshToken": {
101
+ "$ref": "_defs.schema.json#/definitions/templateOrExpression",
102
+ "description": "oauth2RefreshToken: the long-lived refresh token a person made once for the app."
98
103
  }
99
104
  },
100
105
  "additionalProperties": false
@@ -931,9 +936,13 @@
931
936
  "$ref": "_defs.schema.json#/definitions/expression",
932
937
  "description": "The assistant's own words this turn, read per streamed event and concatenated - e.g. \"return response.choices[0].delta.content\". Keeps a preamble in the history; without it the model loses its own reasoning thread between turns."
933
938
  },
939
+ "thinking": {
940
+ "$ref": "_defs.schema.json#/definitions/expression",
941
+ "description": "The assistant's own reasoning this turn, read per streamed event and concatenated - e.g. \"return response.choices[0].delta.reasoning_content\". For a vendor that keeps its reasoning only when it is sent back (GLM's preserved thinking): the loop hands it to `assistant` as `thinking`, so the model continues its plan instead of rebuilding it every turn."
942
+ },
934
943
  "assistant": {
935
944
  "$ref": "_defs.schema.json#/definitions/expression",
936
- "description": "The assistant's tool-call turn, built from `calls` and `text`. Its SHAPE is the vendor's: Chat Completions wants { role: 'assistant', content, tool_calls: [...] }."
945
+ "description": "The assistant's tool-call turn, built from `calls`, `text` and `thinking`. Its SHAPE is the vendor's: Chat Completions wants { role: 'assistant', content, tool_calls: [...] }, and a vendor that preserves reasoning takes it back on the same message."
937
946
  }
938
947
  }
939
948
  }
@@ -83,6 +83,16 @@
83
83
  "default": "public",
84
84
  "description": "`internal` nodes load everywhere but never appear in the node library or palette. Used by harness and builder nodes."
85
85
  },
86
+ "inbound": {
87
+ "type": "object",
88
+ "description": "How the service this node talks to proves a message it SENDS US is genuine (docs/auth-security/INBOUND.md). Name one of the platform's verifiers and the field of this node's credential that holds the secret. A node can never describe its own check: the platform's verifier decides, and refuses when the secret is missing.",
89
+ "properties": {
90
+ "verify": { "enum": ["slack"], "description": "The platform verifier for this service's signature." },
91
+ "secret": { "type": "string", "description": "The field of this node's credential holding the signing secret, e.g. signingSecret." }
92
+ },
93
+ "required": ["verify", "secret"],
94
+ "additionalProperties": false
95
+ },
86
96
  "capabilities": {
87
97
  "type": "object",
88
98
  "description": "Engine-level behaviour of this node type. All optional.",
@@ -81,7 +81,7 @@
81
81
  "items": {
82
82
  "type": "string"
83
83
  },
84
- "description": "The credential SCHEMES this package's calls use (bearer, basic, apiKeyHeader, apiKeyQuery, oauth2ClientCredentials, awsSigV4). Named `auth` until 2026-07-28, renamed with the call key it mirrors so the package's promise and the call's spelling stay the same word. Nothing to do with node.yaml's `auth`, which is who may RUN a node."
84
+ "description": "The credential SCHEMES this package's calls use (bearer, basic, apiKeyHeader, apiKeyQuery, oauth2ClientCredentials, oauth2RefreshToken, awsSigV4). Named `auth` until 2026-07-28, renamed with the call key it mirrors so the package's promise and the call's spelling stay the same word. Nothing to do with node.yaml's `auth`, which is who may RUN a node."
85
85
  },
86
86
  "transport": {
87
87
  "type": "array",
@@ -0,0 +1,190 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://docs.unoverse.ai/schemas/agents/agent.schema.json",
4
+ "title": "Unoverse Agent",
5
+ "description": "agents/<name>/agent.yaml: an Agent, someone who does work by calling tasks (docs/architecture/signal/AGENTS.md § 3). Who is responsible for it and whether it is on are set per environment in Signal, never here; no credentials, no permissions beyond access.",
6
+ "type": "object",
7
+ "required": [
8
+ "type",
9
+ "name",
10
+ "title",
11
+ "role",
12
+ "description",
13
+ "whenToUse",
14
+ "skills",
15
+ "soul"
16
+ ],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "unoverse": {
20
+ "type": "string"
21
+ },
22
+ "type": {
23
+ "const": "agent"
24
+ },
25
+ "name": {
26
+ "type": "string",
27
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
28
+ "description": "Equals the folder."
29
+ },
30
+ "title": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
34
+ "role": {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "description": "Its job title, e.g. Go-to-market lead. Signs its emails and Slack posts beside its name (title) and the address of its connected mailbox."
38
+ },
39
+ "description": {
40
+ "type": "string",
41
+ "minLength": 1
42
+ },
43
+ "whenToUse": {
44
+ "type": "string",
45
+ "minLength": 1
46
+ },
47
+ "category": {
48
+ "type": "string"
49
+ },
50
+ "version": {
51
+ "type": "string"
52
+ },
53
+ "avatar": {
54
+ "type": "string",
55
+ "pattern": "^https://",
56
+ "description": "Its picture: an image URL (https). Shown in Studio, Signal and beside what it signs."
57
+ },
58
+ "skills": {
59
+ "type": "array",
60
+ "minItems": 1,
61
+ "items": {
62
+ "type": "string",
63
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
64
+ },
65
+ "description": "What it does: Agent skills in the org's skills/, by name."
66
+ },
67
+ "soul": {
68
+ "type": "string",
69
+ "pattern": "\\.md$",
70
+ "description": "Who it is: its character, beside this file. Character only."
71
+ },
72
+ "model": {
73
+ "type": "object",
74
+ "required": [
75
+ "use"
76
+ ],
77
+ "additionalProperties": false,
78
+ "properties": {
79
+ "use": {
80
+ "type": "string",
81
+ "minLength": 1,
82
+ "description": "Named, never defaulted."
83
+ },
84
+ "reasoning": {
85
+ "enum": [
86
+ "low",
87
+ "medium",
88
+ "high",
89
+ "xhigh",
90
+ "max"
91
+ ]
92
+ },
93
+ "turns": {
94
+ "type": "integer",
95
+ "minimum": 1,
96
+ "description": "How many times it may think and call a task in one run; never more than its model's node allows."
97
+ },
98
+ "fallback": {
99
+ "type": "string",
100
+ "minLength": 1
101
+ }
102
+ }
103
+ },
104
+ "budget": {
105
+ "type": "object",
106
+ "required": [
107
+ "perDay"
108
+ ],
109
+ "additionalProperties": false,
110
+ "description": "Required: no budget, no Agent.",
111
+ "properties": {
112
+ "perDay": {
113
+ "type": "string",
114
+ "pattern": "^[0-9]+(\\.[0-9]+)? [A-Z]{3}$",
115
+ "description": "e.g. 20 USD"
116
+ },
117
+ "perRun": {
118
+ "type": "string",
119
+ "pattern": "^[0-9]+(\\.[0-9]+)? [A-Z]{3}$"
120
+ }
121
+ }
122
+ },
123
+ "tasks": {
124
+ "type": "array",
125
+ "items": {
126
+ "type": "string",
127
+ "pattern": "^unoverse://tasks/[a-z0-9][a-z0-9-]*/[A-Za-z0-9][A-Za-z0-9._-]*$"
128
+ },
129
+ "description": "The tasks it may call, each by its one URI. A marketplace MCP is a task too: unoverse://tasks/marketplace/signal-save hands over every tool it offers (MCP_TASKS.md § 2a)."
130
+ },
131
+ "access": {
132
+ "type": "array",
133
+ "items": {
134
+ "type": "string",
135
+ "pattern": "^[a-z0-9-]+:[a-z0-9-]+$"
136
+ },
137
+ "description": "The most it may ever do (noun:verb). None: no one's information."
138
+ },
139
+ "triggers": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "object",
143
+ "required": [
144
+ "name"
145
+ ],
146
+ "additionalProperties": false,
147
+ "properties": {
148
+ "name": {
149
+ "type": "string",
150
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
151
+ },
152
+ "node": {
153
+ "type": "string",
154
+ "description": "An existing node type. Not for spatial."
155
+ },
156
+ "wakes": {
157
+ "enum": [
158
+ "mentions",
159
+ "replies",
160
+ "events"
161
+ ]
162
+ },
163
+ "config": {
164
+ "type": "object"
165
+ }
166
+ }
167
+ }
168
+ },
169
+ "checkIn": {
170
+ "type": "string",
171
+ "pattern": "^[0-9]+(m|h)$"
172
+ },
173
+ "memory": {
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "properties": {
177
+ "agent": {
178
+ "enum": [
179
+ "on",
180
+ "off"
181
+ ],
182
+ "description": "Its own Agent Memory: goal, plan and notes, under its id. What it knows of people is Signal's."
183
+ }
184
+ }
185
+ },
186
+ "askWhenUnsure": {
187
+ "type": "string"
188
+ }
189
+ }
190
+ }
@@ -59,6 +59,25 @@
59
59
  "type": "string"
60
60
  },
61
61
  "description": "The only values this column may hold. The database refuses anything else, so a word that IS the language (a measure, a unit, a side) cannot arrive misspelled and quietly become a second thing that never adds up with the first. Leave it off for a column that carries a document's own words, which are not ours to enumerate."
62
+ },
63
+ "wordings": {
64
+ "type": "object",
65
+ "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string" } },
66
+ "description": "For a column with `enum`: the words a table's title or headings print for each value (net return: [performance, returns]), so a table found by its shape is known by what it holds. Each key is one of `enum`. Grows by approval (pipelines/tables.md 3b)." },
67
+ "rowWordings": {
68
+ "type": "object",
69
+ "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string" } },
70
+ "description": "For a column with `enum`: the words a key-figures row's own label prints for each value (net asset value: [total net assets, fund size]), so one row of a label | value table is one figure. Each key is one of `enum`. Grows by approval (pipelines/tables.md 3b)."
71
+ },
72
+ "columnWordings": {
73
+ "type": "object",
74
+ "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string" } },
75
+ "description": "For a column with `enum`: the words a table's column prints for each value (exposure: [market value, of net assets]), so a number kept from any table is known by the column it sits under when its table's title names none. Each key is one of `enum`. Grows by approval (pipelines/tables.md 3f)."
76
+ },
77
+ "values": {
78
+ "type": "object",
79
+ "additionalProperties": { "type": "array", "minItems": 1, "items": { "type": "string" } },
80
+ "description": "For a column with `enum`: the values of another column each of its values gathers (a dimension's own categories: fair value level: [Level 1, Level 2, Level 3]), so a number whose row or column names one is known to be sliced that way. Each key is one of `enum`. Grows by approval (pipelines/tables.md 3i)."
62
81
  }
63
82
  }
64
83
  }
@@ -78,6 +97,23 @@
78
97
  "asOf": {
79
98
  "type": "string",
80
99
  "description": "The column that says when these rows speak as of, so the handle can say it."
100
+ },
101
+ "whose": {
102
+ "type": "object",
103
+ "required": ["object", "column", "level"],
104
+ "description": "Whose a row is, as records (pipelines/tables.md 3i step 4): the object a row's subject is, its parts, how one sits inside another, and the `level` value each is filed under. The platform names no industry: the org says its subject is a fund, a store, a client.",
105
+ "properties": {
106
+ "object": { "type": "string", "description": "The object a row's subject is (fund)." },
107
+ "column": { "type": "string", "description": "The column its name goes in (fund)." },
108
+ "level": { "type": "string", "description": "The `level` value for the subject's own figures (fund)." },
109
+ "names": { "type": "string", "description": "The subject's field of other names (alsoKnownAs)." },
110
+ "compare": { "type": "string", "description": "The subject's field naming what it is compared with (benchmark)." },
111
+ "compareLevel": { "type": "string", "description": "The `level` value for that comparison's figures (index)." },
112
+ "within": { "type": "object", "required": ["link"], "properties": { "link": { "type": "string" }, "field": { "type": "string" } }, "description": "How a subject sits inside another: the link to its parent (subFundOf) and the field naming the parent (umbrella)." },
113
+ "part": { "type": "object", "required": ["object", "column", "level", "name", "of"], "properties": { "object": { "type": "string" }, "column": { "type": "string" }, "level": { "type": "string" }, "name": { "type": "string" }, "of": { "type": "string" } }, "description": "Its parts (a fund's share classes): their object, column, `level` value, name field and the field naming their subject." },
114
+ "none": { "type": "string", "description": "The `level` value for a document about no subject (market)." },
115
+ "terms": { "type": "array", "items": { "type": "string" }, "description": "The measures that are a record's standing terms, never figures over time (fee): a rate of one is a field of the subject's or part's record, read by the layout, and never a row; an amount of money of one (fees charged over a period) stays a row. Each is one of the measure column's `enum`." }
116
+ }
81
117
  }
82
118
  },
83
119
  "additionalProperties": false
@@ -47,7 +47,8 @@
47
47
  "people",
48
48
  "product",
49
49
  "brand",
50
- "document"
50
+ "document",
51
+ "observation"
51
52
  ],
52
53
  "description": "Which of the twelve elements of the vocabulary this object IS (docs/unoverse/data/objects/README.md, the table of kinds and elements): a classification, never a shape. The Spatial view's filters and the search toggles read it. Not inherited; the need declares none."
53
54
  },
@@ -203,7 +204,11 @@
203
204
  },
204
205
  "minProperties": 1,
205
206
  "maxProperties": 1,
206
- "description": "One pair: this row's field naming that row's ({ manager: legalName })."
207
+ "description": "One pair: this row's field naming that row's ({ manager: legalName })." },
208
+ "carries": {
209
+ "type": "array",
210
+ "items": { "type": "string" },
211
+ "description": "Fields of this row each line keeps (a provider's role for the fund it serves). A line that carries is added, never replaced, and a second value for the same line joins its list (relationships-and-labels.md, Lines to another object)."
207
212
  }
208
213
  },
209
214
  "oneOf": [
@@ -236,9 +241,42 @@
236
241
  "evidence": { "type": "array", "items": { "type": "string" }, "description": "Fields shown to the judge beside each candidate, to tell like names apart." },
237
242
  "ruleOut": { "type": "array", "items": { "type": "string" }, "description": "Fields that, filled on both and different as words, mean never the same thing." },
238
243
  "judge": { "type": "string", "description": "The node that decides a name the rules leave open, choosing among the candidates or none (TypeSafeChoice). Absent, an open name goes to review." },
244
+ "link": {
245
+ "type": "object",
246
+ "additionalProperties": false,
247
+ "required": ["node"],
248
+ "description": "The node that scores the name against each candidate's names before the judge (Splink on Beam): sure the same, linked; sure different, none; between, the judge.",
249
+ "properties": { "node": { "type": "string", "minLength": 1 }, "config": { "type": "object" } }
250
+ },
251
+ "review": { "type": "object", "additionalProperties": false, "required": ["node"], "description": "The node that looks last at every name a run left open, with what the documents say where the name is used (OpenAIDecision): sure, it decides as a person would, with Undo; not sure, the name stays open for a person. Absent, the judge looks.", "properties": { "node": { "type": "string", "minLength": 1 }, "config": { "type": "object" } } },
239
252
  "createFrom": { "type": "array", "items": { "type": "string" }, "description": "The lines, by name (a document's about), whose name the judge is sure is no record held makes the record. A mention on any other line, or a name of one word, never does." }
240
253
  }
241
254
  },
255
+ "extract": {
256
+ "type": "object",
257
+ "additionalProperties": false,
258
+ "description": "How a page reader picks this object out of a page (pipelines README, \"Or read by a node\"): plain instructions and worked examples, handed to the read node beside the template made from the object's input props.",
259
+ "properties": {
260
+ "instructions": { "type": "string", "description": "What to take and what to leave, in plain words: what this object is, and what it is not." },
261
+ "never": { "type": "array", "items": { "type": "string" }, "description": "Words that are never a name on their own: a name made only of these (\"Voting Shares\", \"Custodians\") is no record. A name with any other word stays." },
262
+ "notAlso": { "type": "array", "items": { "type": "string" }, "description": "Other objects a name is never also: a name one document's read gives as a row of one of these is not made a row of this one (a manager's notAlso: [fund], so a fund in an allocation table is never also its manager)." },
263
+ "notAlsoWhen": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }, "description": "Another object a name is never also when that object's row says so: { service-provider: { role: [administrator, custodian] } } — a name the same document's read gives as a service provider with one of those roles is not a row of this one; as one with another role, it may be." },
264
+ "notWhen": { "type": "array", "items": { "type": "string" }, "description": "Phrases of a notice or of another kind's role (issued by, representative, paying agent): a name every sentence of its chunk names only beside one of these, and beside none of this object's own field wordings, is not a row of this one." },
265
+ "examples": {
266
+ "type": "array",
267
+ "description": "Worked examples: a piece of text, and the right answer for it, a list of this object's input fields. An empty answer shows what to leave.",
268
+ "items": {
269
+ "type": "object",
270
+ "additionalProperties": false,
271
+ "required": ["text", "answer"],
272
+ "properties": {
273
+ "text": { "type": "string" },
274
+ "answer": { "type": "array", "items": { "type": "object" } }
275
+ }
276
+ }
277
+ }
278
+ }
279
+ },
242
280
  "dataset": {
243
281
  "oneOf": [
244
282
  {
@@ -74,6 +74,35 @@
74
74
  "items": {
75
75
  "$ref": "#/definitions/items"
76
76
  },
77
+ "answeredBy": {
78
+ "type": "array",
79
+ "minItems": 1,
80
+ "items": { "type": "string", "minLength": 1 },
81
+ "description": "The kinds of document that may answer this field (the reading document's choice, e.g. offering-memorandum). Each page of a document of one of these kinds is asked for the field while it is still empty, and a value stated is written with its page and words (docs/unoverse/data/pipelines/proved-before-built.md). On an object filled from documents, every input: true field names them."
82
+ },
83
+ "standard": {
84
+ "type": "string",
85
+ "minLength": 1,
86
+ "description": "The field's id in the org's field list (one org's list is openfunds: OFST452010). A table's column or row named by this field's wordings, or by the standard field's own name, fills it (docs/unoverse/data/pipelines/tables.md)."
87
+ },
88
+ "format": {
89
+ "enum": ["date", "country"],
90
+ "description": "date: the field is a date, written yyyy-mm-dd. A date a document prints another way (31/Mar/2025, 21 October 2024) is written so; one that could be read two ways (03/04/2025) is left, never guessed. country: the field is a country, held by its one name from ISO 3166-1 (its code named by the CLDR English region names) however a document prints it (UK, GB and United Kingdom are United Kingdom); a value no country fits stays as printed."
91
+ },
92
+ "pattern": {
93
+ "type": "string",
94
+ "minLength": 1,
95
+ "description": "The regular expression a value must match (an ISIN: ^[A-Z]{2}[A-Z0-9]{9}[0-9]$). A value that does not match is never saved, whichever reader read it."
96
+ },
97
+ "wordings": {
98
+ "type": "array",
99
+ "minItems": 1,
100
+ "items": { "type": "string", "minLength": 1 },
101
+ "description": "The words documents print for this field (management related fees, mgmt fee), matched exactly after lower case. A new wording is proposed, approved by a person, then added here (docs/unoverse/data/pipelines/tables.md)."
102
+ },
103
+ "none": {
104
+ "description": "The value a table cell that states there is none (\"None\", \"N/A\", \"-\", \"Nil\") stands for (0 for a fee), kept as stated; without it such a cell fills nothing. Never a default: a field the documents do not state stays empty."
105
+ },
77
106
  "reuse": {
78
107
  "type": "boolean",
79
108
  "description": "true: the read is shown the values this field already holds on the object's rows in the org, and gives one of them, spelled exactly, when it names the same thing. For a name many rows share: a subject, a series."
@@ -0,0 +1,212 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://docs.unoverse.ai/schemas/pipelines/layout.schema.json",
4
+ "title": "Unoverse document layout",
5
+ "description": "pipelines/<pipeline>/documents/<type>.yaml, ONE per document type, never per house: the map of one document type (docs/unoverse/data/pipelines/document-map.md, 'Layouts'). How to recognise the type, its sections and how to find each, who each section is about, what reads it, what it gives, and what is never a record. A hint, never a gate: a section not found is read the general way and flagged. One small vocabulary of finders, the same in every layout. Field names are the objects' own props (props.yaml); the engine checks them against the org at load, a schema cannot.",
6
+ "type": "object",
7
+ "required": ["layout", "reportType", "recognise", "sections"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "unoverse": { "type": "string" },
11
+ "layout": {
12
+ "type": "string",
13
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
14
+ "description": "Equals the file name."
15
+ },
16
+ "reportType": {
17
+ "type": "string",
18
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
19
+ "description": "A value of fund-document.reportType (the org's REPORT_TYPES)."
20
+ },
21
+ "describe": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "description": "What a document of this type is, in plain words, from its own definition: who writes it, its usual order, what in it is never the subject's. Given to the model before every section it reads. Names no fund, firm, index or term."
25
+ },
26
+ "recognise": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "description": "Signals that this document is of this type. `all` must every one match; `any` needs one. The first read's report type is a signal like any other. A document that matches no layout is read generally.",
30
+ "properties": {
31
+ "all": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/signal" } },
32
+ "any": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/signal" } }
33
+ }
34
+ },
35
+ "sections": {
36
+ "type": "array",
37
+ "minItems": 1,
38
+ "items": { "$ref": "#/definitions/section" }
39
+ },
40
+ "includes": {
41
+ "type": "array",
42
+ "items": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
43
+ "description": "Shared section files this layout takes in (documents/_shared/<name>.yaml), such as the country notices every retail document ends with."
44
+ },
45
+ "match": {
46
+ "type": "object",
47
+ "description": "Local rules for the matcher, per kind: which keys decide a match for records this type gives, in order, and what a name with no candidate becomes. Never a name: aliases and same-as pairs live on records.",
48
+ "propertyNames": { "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "description": "An object kind of the org (its object's name), as the org declares it." },
49
+ "additionalProperties": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["by"],
53
+ "properties": {
54
+ "by": {
55
+ "type": "array",
56
+ "minItems": 1,
57
+ "items": { "type": "string", "enum": ["isin", "lei", "bloombergCode", "name", "name-within-fund", "name-within-firm", "alias", "class-isin"] },
58
+ "description": "Keys tried in order; the first that finds a record decides. `class-isin`: a fund found through the ISIN of one of its classes."
59
+ },
60
+ "noCandidate": { "type": "string", "enum": ["review", "make"], "description": "What happens when no key finds a record: `review` (default) holds it for a person; `make` creates it, only for a kind the type is the source of (a prospectus makes its funds)." }
61
+ }
62
+ }
63
+ },
64
+ "never": {
65
+ "type": "array",
66
+ "items": { "$ref": "#/definitions/never" },
67
+ "description": "Names this type prints that are never records. Structured so the confirm step can apply them."
68
+ }
69
+ },
70
+ "definitions": {
71
+ "signal": {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "minProperties": 1,
75
+ "properties": {
76
+ "text": { "type": "string", "minLength": 1, "description": "Words printed on the page (a regular expression)." },
77
+ "heading": { "type": "string", "minLength": 1, "description": "A heading printed on the page (a regular expression)." },
78
+ "page": { "type": "integer", "minimum": 1, "description": "The page the signal must be on; any page when absent." },
79
+ "reportType": { "type": "string", "description": "The first read said this type." }
80
+ }
81
+ },
82
+ "section": {
83
+ "type": "object",
84
+ "required": ["kind", "find"],
85
+ "additionalProperties": false,
86
+ "properties": {
87
+ "kind": {
88
+ "type": "string",
89
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
90
+ "description": "What this section is, in the layout's words (product, costs, directory, schedule, share-class-table, holdings, legal-notices)."
91
+ },
92
+ "find": { "$ref": "#/definitions/find" },
93
+ "each": {
94
+ "type": "string",
95
+ "enum": ["heading"],
96
+ "description": "`heading`: every heading the finder hits is its own section instance (one sub-fund's schedule each), running from its heading to the next hit of this section, else the first `find.until` heading, else the end; other sections' headings inside it do not end it. A section or table inside an instance is about the instance's record; a `kind.prop` field it gives for its own record's kind is that record's, and one for another kind (`share-class.<prop>`) applies to every record of that kind the instance holds. Two records of one kind and name within an instance (or of the instance's own kind anywhere) are one record. Without `each`, every hit is joined into one section."
97
+ },
98
+ "about": {
99
+ "type": "string",
100
+ "pattern": "^(document|umbrella|named|none|[a-z0-9]+(-[a-z0-9]+)*)$",
101
+ "description": "Who the section is about: the document's own subject (default), the umbrella, the fund, the share class, the entity the section's own title names (`named`, as a prospectus schedule: with `each`, the record the section's first record finder names, else the heading's words), or no one."
102
+ },
103
+ "read": { "$ref": "#/definitions/read" },
104
+ "gives": {
105
+ "type": "object",
106
+ "description": "What the section states, by rule. A key is an object kind (a record or a list of records: fund, share-class, manager, service-provider, person) or kind.prop (a field, the prop one of the object's own). `asOf` is the document's date.",
107
+ "propertyNames": { "pattern": "^(asOf|[a-z0-9]+(-[a-z0-9]+)*(\\.[a-zA-Z][a-zA-Z0-9]*)?)$" },
108
+ "additionalProperties": {
109
+ "oneOf": [
110
+ { "$ref": "#/definitions/finder" },
111
+ { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/finder" }, "description": "Alternative finders for one field, tried in order: one per wording the type is printed in." },
112
+ { "$ref": "#/definitions/record" },
113
+ { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/record" } }
114
+ ]
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "find": {
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "minProperties": 1,
123
+ "description": "How to find the section. Headings, tables and text are regular expressions, any one of a list; every match is part of the section (a facts block printed as two headings). `order` is the section's place among the layout's sections when headings differ (a translated document). `optional` sections are not flagged when missing.",
124
+ "properties": {
125
+ "heading": { "$ref": "#/definitions/oneOrMore" },
126
+ "table": { "$ref": "#/definitions/oneOrMore", "description": "A table title that marks the section." },
127
+ "text": { "$ref": "#/definitions/oneOrMore", "description": "Words that mark the section where it has no heading (a notice at the foot of a page); the section is that page." },
128
+ "page": { "type": "integer", "minimum": 1 },
129
+ "order": { "type": "integer", "minimum": 1 },
130
+ "optional": { "type": "boolean" },
131
+ "next": { "$ref": "#/definitions/oneOrMore", "description": "A heading counts only when the heading printed after it matches one of these (case ignored): a sub-fund's name known by the objective or the 'A Sub-Fund of' that follows it." },
132
+ "until": { "$ref": "#/definitions/oneOrMore", "description": "With `each`: headings that end an instance (the annex or exhibit after the last schedule); case ignored." }
133
+ }
134
+ },
135
+ "read": {
136
+ "type": "object",
137
+ "required": ["tool"],
138
+ "additionalProperties": false,
139
+ "description": "What reads the section's text. `model` is the pipeline's own read node (the page reader), given this section only, a fixed header (document, section, scope, defined terms) and `say`; it may return only `kinds`. `rules` means the finders under `gives` alone. `none` reads nothing (a glossary, a disclaimer).",
140
+ "properties": {
141
+ "tool": { "type": "string", "enum": ["model", "rules", "none"] },
142
+ "kinds": {
143
+ "type": "array",
144
+ "items": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" }
145
+ },
146
+ "say": { "type": "string", "minLength": 1, "description": "The instruction for this section, in plain words." }
147
+ }
148
+ },
149
+ "finder": {
150
+ "type": "object",
151
+ "additionalProperties": false,
152
+ "minProperties": 1,
153
+ "description": "Where a value is, by rule. One of: `pattern` (a regular expression; group 1 is the value, or `group` says which); `line` (a line by position); `table` and `row` (a cell: the first non-empty cell after the row label, or `column`); or, as a record's field, `group` alone (that group of the record's own name match). `na` is the value when the page prints N/A or 'none'. `map` turns printed wording into the prop's enum value. A pattern is tried on the text as printed, then with runs of spaces made one.",
154
+ "properties": {
155
+ "pattern": { "type": "string", "minLength": 1 },
156
+ "group": { "type": "integer", "minimum": 1, "description": "The group of `pattern` that is the value; alone, in a record's `fields`, the group of the record's name match (\"Minimum Initial Subscription for (Class B) Shares: (250,000)\" gives the class and its minimum)." },
157
+ "case": { "type": "string", "enum": ["any"], "description": "`any`: the pattern matches whatever the case of the page's words (a heading in capitals, the same words in a sentence)." },
158
+ "scope": { "type": "string", "enum": ["section", "document"], "description": "Where the pattern is searched: the section (default) or the whole document, for a value printed outside its section (an umbrella named only in the notices)." },
159
+ "cell": { "type": "string", "enum": ["value", "label"], "description": "With `table` and `row`: take the value cell (default) or the row's label (a class named in the label, 'ISIN - Base Shares')." },
160
+ "line": { "type": "string", "enum": ["after-heading", "first-heading", "first", "last"] },
161
+ "table": { "type": "string", "minLength": 1 },
162
+ "row": { "type": "string", "minLength": 1 },
163
+ "column": { "type": "integer", "minimum": 1 },
164
+ "na": { "description": "The value when the page prints N/A or 'none'." },
165
+ "map": {
166
+ "type": "object",
167
+ "additionalProperties": { "type": "string" },
168
+ "description": "Printed wording to the prop's enum value ('Accumulation' to accumulating)."
169
+ }
170
+ }
171
+ },
172
+ "record": {
173
+ "type": "object",
174
+ "additionalProperties": false,
175
+ "minProperties": 1,
176
+ "description": "A record given by rule: its name and fields, each a finder or a list of alternative finders. A record with no name finder is named by its identifier field (isin, lei): the matcher finds the record the identifier names, and never invents a name.",
177
+ "properties": {
178
+ "name": { "oneOf": [ { "$ref": "#/definitions/finder" }, { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/finder" } } ] },
179
+ "role": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
180
+ "country": { "oneOf": [ { "type": "string" }, { "type": "object", "properties": { "group": { "type": "integer", "minimum": 1 } }, "required": ["group"], "additionalProperties": false } ], "description": "The country the provider serves: a word, or a group of the name pattern that prints it beside the name." },
181
+ "split": { "type": "string", "minLength": 1, "description": "Breaks one match into several records." },
182
+ "trim": { "type": "string", "minLength": 1, "description": "After `split`, a pattern applied to each part; group 1 is the name (the words before the address)." },
183
+ "fields": {
184
+ "type": "object",
185
+ "propertyNames": { "pattern": "^[a-zA-Z][a-zA-Z0-9]*$" },
186
+ "additionalProperties": { "oneOf": [ { "$ref": "#/definitions/finder" }, { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/finder" } } ] }
187
+ }
188
+ }
189
+ },
190
+ "never": {
191
+ "type": "object",
192
+ "additionalProperties": false,
193
+ "required": ["reason"],
194
+ "minProperties": 2,
195
+ "description": "A structural rule, never a list of names (owner, 2026-10-21): `in`, a name found inside sections of these kinds; `after`, a name printed right after this wording (\"regulated by\"); `pattern`, the shape of a name (a defined term, \"^the \\w+$\"). A layout never carries a document's own names.",
196
+ "properties": {
197
+ "kind": { "type": "string", "enum": ["fund", "share-class", "manager", "service-provider", "person", "deal", "any"] },
198
+ "in": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "Section kinds: a name found inside one of them is never a record of this kind." },
199
+ "after": { "type": "string", "minLength": 1, "description": "A wording the name follows on the page: 'regulated by', 'compared against'." },
200
+ "pattern": { "type": "string", "minLength": 1, "description": "The shape of a name, never a particular name." },
201
+ "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" }, "description": "Roles the rule spares: a record given with one of these roles (a country's representative or paying agent in the notices) is kept. A record with no role is held by the rule." },
202
+ "reason": { "type": "string", "minLength": 1 }
203
+ }
204
+ },
205
+ "oneOrMore": {
206
+ "oneOf": [
207
+ { "type": "string", "minLength": 1 },
208
+ { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }
209
+ ]
210
+ }
211
+ }
212
+ }
@@ -126,8 +126,44 @@
126
126
  "description": "The item MAY be one; the model says."
127
127
  },
128
128
  "per": {
129
- "const": "section",
130
- "description": "Written after the document is cut, one read per stored piece of each named section, instead of in the document's first read."
129
+ "const": "page",
130
+ "description": "Written once the document's pages are kept, one read per page, instead of in the document's first read (page-store.md: no sections)."
131
+ },
132
+ "read": {
133
+ "type": "object",
134
+ "required": ["node"],
135
+ "additionalProperties": false,
136
+ "description": "With per: page, the node that reads the pages for this object: handed the chunks that name it, with a template made from its input props (pipelines README, Or read by a node).",
137
+ "properties": {
138
+ "node": { "type": "string", "minLength": 1 },
139
+ "config": { "type": "object" },
140
+ "chunks": { "oneOf": [{ "type": "integer", "minimum": 1 }, { "const": "all" }], "description": "How many of the document's chunks it is handed: the best few by the object's words (default 4), or all of them." },
141
+ "cacheable": { "type": "boolean", "description": "This read's answers may be reused, remembered under the version the called deployment reports at its /ready; a deployment that reports none is never remembered (pipelines README, A read may be remembered)." }
142
+ }
143
+ },
144
+ "tables": {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "description": "Read from the document's tables too: a table's labels matched to the object's props by their wordings, a matched cell's value copied as printed (pipelines/tables.md).",
148
+ "properties": {
149
+ "whose": {
150
+ "type": "object",
151
+ "required": ["node"],
152
+ "additionalProperties": false,
153
+ "description": "The node that says which of the document's rows a table is about, when the document is linked to more than one.",
154
+ "properties": { "node": { "type": "string", "minLength": 1 }, "config": { "type": "object" } }
155
+ },
156
+ "subject": { "type": "boolean", "description": "The object is what the document is about: a label | value table fills the row of this kind the document is linked to." },
157
+ "labels": {
158
+ "type": "object",
159
+ "required": ["node"],
160
+ "additionalProperties": false,
161
+ "description": "The node that proposes a field for a table label no rule matched (column matching step 4): asked once per org, one call per document; a person approves it in Review. Absent: the step is off.",
162
+ "properties": { "node": { "type": "string", "minLength": 1 }, "config": { "type": "object" } }
163
+ },
164
+ "allocations": { "type": "string", "minLength": 1, "description": "The object's line an allocation table draws to each fund it holds, carrying the weight (pipelines/tables.md 3c)." },
165
+ "boards": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "The object's lines a board list may draw, each to whose board it is (the line whose kind the organisation is), carrying the role (pipelines/tables.md 3d)." }
166
+ }
131
167
  },
132
168
  "parts": {
133
169
  "type": "object",
@@ -22,7 +22,7 @@ import { problems, reset, report, state } from "../context.mjs";
22
22
  import { validateAgainst, Validator } from "../nodes/schema.mjs";
23
23
  import {
24
24
  envelopeFindings, propsFindings, fromFindings, serviceFindings, makeFindings, rowKeyFindings, objectTestFindings,
25
- pipelineFindings, pipelineFolderFindings,
25
+ pipelineFindings, pipelineFolderFindings, layoutFindings,
26
26
  } from "./rules.mjs";
27
27
 
28
28
  const require_ = createRequire(import.meta.url);
@@ -46,6 +46,7 @@ export const SCHEMA_ID = {
46
46
  config: "https://docs.unoverse.ai/schemas/pipelines/config.schema.json",
47
47
  interface: "https://docs.unoverse.ai/schemas/pipelines/interface.schema.json",
48
48
  pipelineTest: "https://docs.unoverse.ai/schemas/pipelines/test.schema.json",
49
+ agent: "https://docs.unoverse.ai/schemas/agents/agent.schema.json",
49
50
  };
50
51
 
51
52
  /**
@@ -57,7 +58,7 @@ export const SCHEMA_ID = {
57
58
  */
58
59
  function schemaDirs() {
59
60
  const out = [];
60
- for (const kind of ["objects", "pipelines", "nodes"]) {
61
+ for (const kind of ["objects", "pipelines", "agents", "nodes"]) {
61
62
  for (const c of [join(HERE, "_schema", kind), resolve(HERE, `../../../../docs/schemas/${kind}`), join(HERE, "../nodes/_schema")]) {
62
63
  if (existsSync(c)) {
63
64
  out.push(c);
@@ -161,6 +162,28 @@ export function lintObjects(designRoot, options = {}) {
161
162
  }
162
163
  return out;
163
164
  };
165
+ /**
166
+ * THE MARKETPLACE MCPS, by task name (MCP_TASKS.md § 2a): every marketplace node that offers MCP
167
+ * tools (`serviceType: mcp` in its interface), its type in kebab case. Null when the marketplace
168
+ * is not seen.
169
+ */
170
+ const marketplaceMcps = () => {
171
+ if (!marketplaceSeen) return null;
172
+ const out = new Set();
173
+ const home = join(marketplace, "nodes");
174
+ if (!isDir(home)) return out;
175
+ for (const pkg of readdirSync(home)) {
176
+ const nodes = join(home, pkg, "nodes");
177
+ if (!isDir(nodes)) continue;
178
+ for (const n of readdirSync(nodes)) {
179
+ const iface = join(nodes, n, "interface.yaml");
180
+ if (!existsSync(iface) || !/serviceType:\s*mcp\b/.test(readFileSync(iface, "utf8"))) continue;
181
+ const m = /^type:\s*([A-Za-z0-9_]+)/m.exec(existsSync(join(nodes, n, "node.yaml")) ? readFileSync(join(nodes, n, "node.yaml"), "utf8") : "");
182
+ out.add((m ? m[1] : n).replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase());
183
+ }
184
+ }
185
+ return out;
186
+ };
164
187
  const foldersIn = (tierDir, kind) => {
165
188
  const home = join(tierDir, kind);
166
189
  if (!isDir(home)) return [];
@@ -340,9 +363,104 @@ export function lintObjects(designRoot, options = {}) {
340
363
  if (tier.org && marketplacePipelines.has(name)) report("error", at("pipeline.yaml"), `pipeline ${name}: an org's pipeline may not take a marketplace pipeline's name; the connector's name would be ambiguous`);
341
364
  }
342
365
 
366
+ /**
367
+ * AGENTS (docs/architecture/signal/AGENTS.md § 3, § 3a): one folder each, `agents/<name>/`, its
368
+ * `agent.yaml` and its soul. The schema says the shape; these say what a schema cannot: the
369
+ * folder and the name agree, the skills and the soul exist, each task's URI names a task of the
370
+ * org, each trigger names a node there is, and the soul gives no orders. A flat file directly in
371
+ * agents/ is the older Agent file, checked by the design linter until it is converted.
372
+ */
373
+ let agentCount = 0;
374
+ for (const tier of tiers) {
375
+ if (!tier.org) continue;
376
+ for (const name of foldersIn(tier.dir, "agents")) {
377
+ agentCount++;
378
+ const dir = join(tier.dir, "agents", name);
379
+ const file = join(dir, "agent.yaml");
380
+ const at = rel(file);
381
+ const doc = readYaml(file);
382
+ if (doc == null) {
383
+ if (!existsSync(file)) report("error", rel(dir), `agent ${name}: the folder holds no agent.yaml`);
384
+ continue;
385
+ }
386
+ validateAgainst(SCHEMA_ID.agent, doc, at, `agent ${name}`);
387
+ if (doc.name !== name) report("error", at, `agent ${name}: name is "${doc.name}"; it must equal the folder`);
388
+ // NO BUDGET, NO AGENT, enforced where it runs: Signal refuses to switch it on (AGENTS.md § 9).
389
+ // Here it is a warning, so a draft Agent still syncs and shows in Studio as "not set", and
390
+ // never holds back the rest of its org's update (owner, 2026-10-10).
391
+ if (!isRecord(doc.model) || !doc.model.use) report("warn", at, `agent ${name}: no model set; it cannot be switched on until model.use is set`);
392
+ if (!isRecord(doc.budget) || !doc.budget.perDay) report("warn", at, `agent ${name}: no daily budget set; it cannot be switched on until budget.perDay is set`);
393
+ for (const skill of Array.isArray(doc.skills) ? doc.skills : []) {
394
+ if (!existsSync(join(tier.dir, "skills", skill, "SKILL.md")) && !existsSync(join(marketplace, "skills", skill, "SKILL.md"))) {
395
+ report("error", at, `agent ${name}: skill "${skill}" is not in skills/`);
396
+ }
397
+ }
398
+ if (typeof doc.soul === "string") {
399
+ const soulFile = join(dir, doc.soul);
400
+ if (!existsSync(soulFile)) report("error", at, `agent ${name}: its soul, ${doc.soul}, is not beside agent.yaml`);
401
+ else {
402
+ // CHARACTER ONLY (§ 3a): a soul that names a permission or a task changes nothing, and a
403
+ // reader may think it did. Said, not refused: the words may be innocent.
404
+ const soul = readText(soulFile);
405
+ if (/\b[a-z]+:(read|write|read-all|manage|author|publish)\b|unoverse:\/\/tasks\//.test(soul)) {
406
+ report("warn", rel(soulFile), `agent ${name}: the soul names a permission or a task. A soul is character only: put access and tasks in agent.yaml`);
407
+ }
408
+ }
409
+ }
410
+ // Each task's URI names a task of the org: an app, template, component or pipeline folder.
411
+ // A workflow's Task Start is named on its canvas, not here, so one not found is a hint.
412
+ const own = new Set(["apps", "templates", "components", "pipelines"].flatMap((k) => foldersIn(tier.dir, k)));
413
+ const mcpNodes = marketplaceMcps();
414
+ for (const uri of Array.isArray(doc.tasks) ? doc.tasks : []) {
415
+ const m = /^unoverse:\/\/tasks\/([a-z0-9][a-z0-9-]*)\/([A-Za-z0-9][A-Za-z0-9._-]*)$/.exec(String(uri));
416
+ if (!m) continue;
417
+ if (m[1] !== tier.org && m[1] !== "marketplace") report("error", at, `agent ${name}: task ${uri} belongs to another org; an Agent calls its own org's tasks and the marketplace's`);
418
+ // A MARKETPLACE MCP IS A TASK (MCP_TASKS.md § 2a): its name is a node type in kebab case.
419
+ else if (m[1] === "marketplace" && mcpNodes && !mcpNodes.has(m[2])) report("error", at, `agent ${name}: task ${uri} is not a marketplace MCP; one is a node that offers MCP tools, by its type in kebab case (signal-save, spatial-search)`);
420
+ else if (m[1] === tier.org && !own.has(m[2])) report("hint", at, `agent ${name}: task ${uri} is not an app, template, component or pipeline here; if it is a workflow's Task Start, check its Name on the canvas`);
421
+ }
422
+ const nodes = visibleNodes(tier);
423
+ for (const ch of Array.isArray(doc.triggers) ? doc.triggers : []) {
424
+ if (!isRecord(ch)) continue;
425
+ if (ch.name === "spatial") {
426
+ if (ch.node) report("error", at, `agent ${name}: the spatial trigger names no node; the Agent is found in its org's Spatial`);
427
+ continue;
428
+ }
429
+ if (!ch.node) report("error", at, `agent ${name}: trigger ${ch.name} names no node`);
430
+ else if (nodes && !nodes.has(ch.node)) report("error", at, `agent ${name}: trigger ${ch.name} names node ${ch.node}, which is not a node here`);
431
+ }
432
+ if (!Array.isArray(doc.tasks) || doc.tasks.length === 0) report("error", at, `agent ${name}: it has no tasks, so it can do nothing`);
433
+ }
434
+ }
435
+
436
+ /**
437
+ * ONE NAME PER TASK IN AN ORG (docs/mcp/MCP_TASKS.md § 2a, U9). Every task is
438
+ * `unoverse://tasks/<org>/<name>`, whatever it is built from, so two assets of an org may not
439
+ * share a name. The one exception is the usual one: an app and the template or component it
440
+ * wraps share its name, and the app is the task. A workflow's Task Start is named on its canvas,
441
+ * not in these folders, so it is not seen here.
442
+ */
443
+ for (const tier of tiers) {
444
+ if (!tier.org) continue;
445
+ const kinds = new Map();
446
+ for (const kind of ["apps", "templates", "components", "pipelines"]) {
447
+ for (const n of foldersIn(tier.dir, kind)) kinds.set(n, [...(kinds.get(n) ?? []), kind]);
448
+ }
449
+ for (const [n, list] of kinds) {
450
+ if (list.length < 2) continue;
451
+ const wrapped = list.includes("apps") && list.length === 2 && (list.includes("templates") || list.includes("components"));
452
+ if (wrapped) continue;
453
+ report(
454
+ "error",
455
+ rel(join(tier.dir, list[0], n)),
456
+ `task ${tier.org}/${n}: ${list.join(" and ")} share one name, and a task's name is unique in its org (unoverse://tasks/${tier.org}/${n}). Rename one.`,
457
+ );
458
+ }
459
+ }
460
+
343
461
  const rank = { error: 0, warn: 1, hint: 2 };
344
462
  const sorted = [...problems].sort((a, b) => rank[a.level] - rank[b.level] || a.file.localeCompare(b.file));
345
- return { problems: sorted, objectCount, pipelineCount, designRoot: ROOT };
463
+ return { problems: sorted, objectCount, pipelineCount, agentCount, designRoot: ROOT };
346
464
  }
347
465
 
348
466
  /** True when anything would fail a build. Warnings and hints inform, errors stop. */
@@ -23,13 +23,15 @@ export const KEBAB = /^[a-z0-9]+(-[a-z0-9]+)*$/;
23
23
  const REF_OR_EXPR = /[{}]|^\s*return\b/;
24
24
 
25
25
  /** The twelve elements of the vocabulary (docs/unoverse/data/objects/elements/): what an object IS. */
26
- export const ELEMENTS = new Set(["purpose", "story", "content", "capability", "process", "asset", "task", "journey", "channel", "organisation", "people", "product", "brand", "document"]);
26
+ export const ELEMENTS = new Set(["purpose", "story", "content", "capability", "process", "asset", "task", "journey", "channel", "organisation", "people", "product", "brand", "document", "observation"]);
27
27
 
28
28
  /** The face every object and pipeline carries, as a node's node.yaml does. */
29
29
  export const FACE_KEYS = ["title", "description", "whenToUse", "category", "version"];
30
30
 
31
31
  /** The prop grammar of UNOVERSE_AUTHORING 3b plus the object's one word, `from` (README 4c). */
32
- export const PROP_KEYS = new Set(["type", "input", "description", "from", "hydrate", "enum", "oneOf", "minLength", "maxLength", "minItems", "maxItems", "items", "reuse"]);
32
+ // `none` IS NO DEFAULT (2026-10-15): it is what a cell that STATES there is none ("None", "N/A") stands for, so a
33
+ // stated "no performance fee" is 0 and a fee nobody states stays empty.
34
+ export const PROP_KEYS = new Set(["type", "input", "description", "from", "hydrate", "enum", "oneOf", "minLength", "maxLength", "minItems", "maxItems", "items", "reuse", "answeredBy", "standard", "wordings", "format", "pattern", "none"]);
33
35
  export const LIMIT_KEYS = ["minLength", "maxLength", "minItems", "maxItems"];
34
36
 
35
37
  /** Words that left the object grammar and must not come back (README 11.7, 12.3, 12.4). */
@@ -96,7 +98,9 @@ export function envelopeFindings(name, envelope, file = `${name}.yaml`) {
96
98
  if (pairs.length !== 1 || pairs.some(([a, b]) => typeof a !== "string" || typeof b !== "string" || !a || !b)) refuse(`object ${name}: link ${ln}: match is one pair, this row's field naming that row's ({ manager: legalName })`);
97
99
  if (l.between != null || l.order != null) refuse(`object ${name}: link ${ln}: a line to another object says to and match, never between or order`);
98
100
  if (l.alike != null && (!Array.isArray(l.alike) || l.alike.some((f) => typeof f !== "string" || !pairs.some(([a]) => a === f)))) refuse(`object ${name}: link ${ln}: alike lists this row's match field whose value may name one thing several ways`);
99
- for (const k of Object.keys(l)) if (!["type", "to", "match", "when", "alike"].includes(k)) say(`object ${name}: link ${ln}: "${k}" is not a word here`);
101
+ // WHAT A LINE CARRIES (relationships-and-labels.md, 2026-10-14) is fields of this row, by name.
102
+ if (l.carries != null && (!Array.isArray(l.carries) || l.carries.some((f) => typeof f !== "string" || !f))) refuse(`object ${name}: link ${ln}: carries lists fields of this row each line keeps ([role])`);
103
+ for (const k of Object.keys(l)) if (!["type", "to", "match", "when", "alike", "carries"].includes(k)) say(`object ${name}: link ${ln}: "${k}" is not a word here`);
100
104
  continue;
101
105
  }
102
106
  if (!Array.isArray(l.between) || !l.between.length || l.between.some((f) => typeof f !== "string")) refuse(`object ${name}: link ${ln}: between is a list of the fields whose equal values make one line of rows`);
@@ -117,7 +121,7 @@ export function envelopeFindings(name, envelope, file = `${name}.yaml`) {
117
121
  if (m.createFrom != null && !fields(m.createFrom)) refuse(`object ${name}: matching: createFrom is a list of line names (about)`);
118
122
  if (m.remember != null && (typeof m.remember !== "string" || !(m.names ?? []).includes(m.remember))) refuse(`object ${name}: matching: remember names one of names, the list a confirmed name is added to`);
119
123
  if (m.judge != null && (typeof m.judge !== "string" || !/^[A-Z][A-Za-z0-9]*$/.test(m.judge))) refuse(`object ${name}: matching: judge names a node by its type (TypeSafeChoice)`);
120
- for (const k of Object.keys(m)) if (!["ids", "names", "remember", "evidence", "ruleOut", "judge", "createFrom"].includes(k)) say(`object ${name}: matching: "${k}" is not a word here`);
124
+ for (const k of Object.keys(m)) if (!["ids", "names", "remember", "evidence", "ruleOut", "judge", "link", "review", "createFrom"].includes(k)) say(`object ${name}: matching: "${k}" is not a word here`);
121
125
  }
122
126
  }
123
127
  return out;
@@ -158,6 +162,22 @@ export function propsFindings(name, ownProps, parentProps = null, base = null, f
158
162
  if (raw.enum != null) say(`object ${name}: prop "${k}" says both enum and oneOf; one or the other`);
159
163
  }
160
164
  if (raw.type === "array" && !isRecord(raw.items)) say(`object ${name}: prop "${k}" is an array and carries no items: an array says the shape of one element, in the same grammar one level down (README 4c)`);
165
+ if (raw.answeredBy != null && (!Array.isArray(raw.answeredBy) || !raw.answeredBy.length || raw.answeredBy.some((d) => typeof d !== "string" || !d.trim()))) say(`object ${name}: prop "${k}": answeredBy is a list of the document kinds that may answer it, e.g. [offering-memorandum, side-letter]`);
166
+ if (raw.answeredBy != null && raw.input !== true) say(`object ${name}: prop "${k}" says answeredBy but not input: true; only a field read from documents is answered by one`);
167
+ // A FIELD A TABLE CAN FILL (pipelines/tables.md, 2026-10-12): `standard` is its id in the org's
168
+ // field list, `wordings` the words documents print for it, matched exactly after lower case.
169
+ if (raw.standard != null && (typeof raw.standard !== "string" || !raw.standard.trim())) say(`object ${name}: prop "${k}": standard is the field's id in the org's field list, one word (OFST452010)`);
170
+ if (raw.wordings != null && (!Array.isArray(raw.wordings) || !raw.wordings.length || raw.wordings.some((w) => typeof w !== "string" || !w.trim()))) say(`object ${name}: prop "${k}": wordings is a list of the words documents print for this field, e.g. [management fee, mgmt fee]`);
171
+ if (raw.pattern != null) { try { if (typeof raw.pattern !== "string" || !raw.pattern.trim()) throw 0; new RegExp(raw.pattern); } catch { say(`object ${name}: prop "${k}": pattern is the regular expression a value must match, e.g. ^[A-Z]{2}[A-Z0-9]{9}[0-9]$; a value that does not match is never saved`); } }
172
+ if (raw.format != null && raw.format !== "date" && raw.format !== "country") say(`object ${name}: prop "${k}": format is date, country, or nothing (a date is written yyyy-mm-dd; a country is held by its one name from ISO 3166, "UK" saved as United Kingdom)`);
173
+ if ((raw.standard != null || raw.wordings != null) && raw.input !== true) say(`object ${name}: prop "${k}" says standard or wordings but not input: true; only a field read from documents is filled from a table`);
174
+ }
175
+ // FILLED FROM DOCUMENTS, EVERY FIELD SAYS WHICH (proved-before-built.md, ruled 2026-10-07): an
176
+ // object one of whose fields names the documents that answer it is filled from documents, so
177
+ // every field it reads names them; a field without would never be asked.
178
+ const own = Object.entries(ownProps).filter(([k, raw]) => isRecord(raw) && !(parentProps && k in parentProps));
179
+ if (own.some(([, raw]) => raw.answeredBy != null)) {
180
+ for (const [k, raw] of own) if (raw.input === true && raw.answeredBy == null) say(`object ${name}: prop "${k}" is input: true and says no answeredBy; on an object filled from documents every field read names the documents that answer it, or nothing ever asks for it`);
161
181
  }
162
182
  return out;
163
183
  }
@@ -304,7 +324,7 @@ export const PIPELINE_READ_KEYS = new Set(["each", "sourceUrl", "sourceId", "con
304
324
  const DROPPED_MAKE_KEYS = ["partsOf", "by", "under", "when", "from", "any", "index"];
305
325
 
306
326
  /** What an object may say: under `each`, how many and what it holds; made once per pack, how many and from which rows. */
307
- const ITEM_OBJECT_KEYS = new Set(["cardinality", "any", "parts", "where", "per"]);
327
+ const ITEM_OBJECT_KEYS = new Set(["cardinality", "any", "parts", "where", "per", "read", "tables"]);
308
328
  const FIELD = /^[A-Za-z_][A-Za-z0-9_]*$/;
309
329
 
310
330
  /**
@@ -334,6 +354,7 @@ export function pipelineFindings(name, file, fileName = "pipeline.yaml") {
334
354
  return;
335
355
  }
336
356
  if (stepNames.has(s.name)) refuse(`pipeline ${name}: two collect steps named "${s.name}"`);
357
+ if (s.node === "InputTrigger" && i > 0) refuse(`pipeline ${name}: collect step "${s.name}" is an Input Trigger, which only opens a pipeline: make it the first step (docs/unoverse/data/pipelines/README.md, collect)`);
337
358
  // A step reads only what came before it.
338
359
  for (const ref of collectRefs(s.config)) if (!stepNames.has(ref)) say(`pipeline ${name}: collect step "${s.name}" reads collect.${ref}, which is not an earlier step`);
339
360
  stepNames.add(s.name);
@@ -380,8 +401,14 @@ export function pipelineFindings(name, file, fileName = "pipeline.yaml") {
380
401
  }
381
402
  if (made.includes(o)) refuse(`pipeline ${name}: ${at}.${o} is made above already; one entry makes an object`);
382
403
  const allowed = ITEM_OBJECT_KEYS;
383
- for (const k of Object.keys(spec)) if (!allowed.has(k)) refuse(`pipeline ${name}: ${at}.${o}: "${k}" is not a word here; an object says cardinality, any, parts, where and per (${see})`);
384
- if ("per" in spec && spec.per !== "section") refuse(`pipeline ${name}: ${at}.${o}: per says section, the only unit an object is written per (${see})`);
404
+ for (const k of Object.keys(spec)) if (!allowed.has(k)) refuse(`pipeline ${name}: ${at}.${o}: "${k}" is not a word here; an object says cardinality, any, parts, where, per, read and tables (${see})`);
405
+ if ("tables" in spec && (!isRecord(spec.tables) || ("whose" in spec.tables && (!isRecord(spec.tables.whose) || typeof spec.tables.whose.node !== "string" || !spec.tables.whose.node)))) refuse(`pipeline ${name}: ${at}.${o}: tables is a record; its whose names the node that says which row a table is about: tables: { whose: { node: OpenAIDecision, config: { ... } } } (pipelines/tables.md)`);
406
+ if (isRecord(spec.tables) && "labels" in spec.tables && (!isRecord(spec.tables.labels) || typeof spec.tables.labels.node !== "string" || !spec.tables.labels.node)) refuse(`pipeline ${name}: ${at}.${o}: tables.labels names the node that proposes a field for a label no rule matched: tables: { labels: { node: OpenAIDecision, config: { ... } } } (pipelines/tables.md)`);
407
+ if (isRecord(spec.tables) && "allocations" in spec.tables && (typeof spec.tables.allocations !== "string" || !spec.tables.allocations)) refuse(`pipeline ${name}: ${at}.${o}: tables.allocations names the line an allocation table draws to each fund it holds: tables: { allocations: allocatesTo } (pipelines/tables.md 3c)`);
408
+ if (isRecord(spec.tables) && "boards" in spec.tables && (!Array.isArray(spec.tables.boards) || !spec.tables.boards.length || !spec.tables.boards.every((b) => typeof b === "string" && b))) refuse(`pipeline ${name}: ${at}.${o}: tables.boards names the lines a board list may draw, each to whose board it is: tables: { boards: [directorOf, worksAt] } (pipelines/tables.md 3d)`);
409
+ if ("read" in spec && (!isRecord(spec.read) || typeof spec.read.node !== "string" || !spec.read.node)) refuse(`pipeline ${name}: ${at}.${o}: read names the node that reads the pages: read: { node: BeamEndpoint, config: { ... } } (${see})`);
410
+ if ("read" in spec && spec.per !== "page") refuse(`pipeline ${name}: ${at}.${o}: read is how an object written per page is read; say per: page beside it (${see})`);
411
+ if ("per" in spec && spec.per !== "page") refuse(`pipeline ${name}: ${at}.${o}: per says page, the only unit an object is written per; there are no sections (page-store.md) (${see})`);
385
412
  // HOW MANY IS SAID by every object the model writes (owner, 2026-09-13).
386
413
  if (spec.cardinality !== "one" && spec.cardinality !== "many") say(`pipeline ${name}: ${at}.${o} says cardinality: one or many, how many of it one row makes (${see})`);
387
414
  if ("any" in spec && spec.any !== true) refuse(`pipeline ${name}: ${at}.${o}: any: true is its only value, the item MAY be one`);
@@ -439,7 +466,8 @@ export function pipelineFolderFindings(name, { file, config, test }, { nodeTypes
439
466
  const out = [];
440
467
  if (!isRecord(file)) return out;
441
468
  const steps = Array.isArray(file.collect) ? file.collect.filter(isRecord) : [];
442
- if (nodeTypes) for (const s of steps) if (typeof s.node === "string" && !nodeTypes.has(s.node)) out.push({ file: "pipeline.yaml", msg: `pipeline ${name}: collect step "${s.name}" names node "${s.node}", which neither the marketplace nor this org holds. A step runs a node the org has` });
469
+ // The Input Trigger is the engine's own node, not a marketplace one: the pipeline's door (README, collect).
470
+ if (nodeTypes) for (const s of steps) if (typeof s.node === "string" && s.node !== "InputTrigger" && !nodeTypes.has(s.node)) out.push({ file: "pipeline.yaml", msg: `pipeline ${name}: collect step "${s.name}" names node "${s.node}", which neither the marketplace nor this org holds. A step runs a node the org has` });
443
471
  if (objectNames && isRecord(file.make)) for (const object of Object.keys(file.make)) if (!objectNames.has(object)) out.push({ file: "pipeline.yaml", msg: `pipeline ${name}: make.${object} names an object neither the marketplace nor this org holds. What a pipeline makes is an object folder: design/<tier>/objects/${object}/` });
444
472
  const props = isRecord(config?.configSchema?.properties) ? new Set(Object.keys(config.configSchema.properties)) : null;
445
473
  const refs = configRefs(file);
@@ -454,6 +482,70 @@ export function pipelineFolderFindings(name, { file, config, test }, { nodeTypes
454
482
  }
455
483
 
456
484
  /** The first error's message. */
485
+ // ── Layouts ─────────────────────────────────────────────────────────────────────────────────────────
486
+ /**
487
+ * A LAYOUT NAMES NO DOCUMENT (docs/unoverse/data/pipelines/document-map.md, owner 2026-10-21, seeing a
488
+ * draft carry "EAM B.V." and "TL-X"). A layout is the map of a document TYPE: it speaks in the type's
489
+ * structure and wording, never in a fund's, a firm's, an index's or a ticker's name. Names belong on
490
+ * records. Refused here, so a layout that fits one house's documents is never loaded.
491
+ */
492
+ /** A legal form as one word of a name, in any jurisdiction's spelling: the mark of a firm's or a fund's name. */
493
+ const LEGAL_FORM_WORD = /^(?:Ltd|Limited|LLC|LLP|L\.?P\.?|LP|plc|PLC|Inc\.?|Corp\.?|Co\.?|GmbH|AG|S\.?A\.?|S\.?C\.?A\.?|S\.?p\.?A\.?|SpA|B\.?V\.?|BV|N\.?V\.?|NV|S\.?à\.?r\.?l\.?|SARL|Sàrl|Pte\.?|Pty\.?|KGaA|KG|ApS|AB|AS|Oy|SE|SAS|SL|SRL|Srl|V)\.?$/;
494
+ const LAYOUT_TEXT_KEYS = new Set(["pattern", "after", "heading", "text", "row", "table", "say", "describe", "trim", "split"]);
495
+ const LAYOUT_NAME_KEYS = new Set(["names", "sameAs", "neverMerge", "aliases"]);
496
+ /** Every capitalised run of two or more words in a string, regex syntax and escapes aside. */
497
+ function capitalisedRuns(str) {
498
+ // Regex syntax is not words: character classes, counts, escapes and group openers go before the words are read.
499
+ const plain = String(str).replace(/\(\?<?[!=][^)]*\)/g, " ").replace(/\[[^\]]*\]/g, " ").replace(/\{[^}]*\}/g, " ").replace(/\\[A-Za-z]/g, " ").replace(/\(\?[:!=<]?/g, " ").replace(/[\[\]()|^$?*+{}.\\]/g, " ").replace(/\s+/g, " ");
500
+ return [...plain.matchAll(/(?:\b[A-Z][\w'&.-]*(?: (?:of|de|di|du|des|and|&) )?\s?){2,}/g)].map((m) => m[0].trim()).filter((r) => r.split(/\s+/).length >= 2);
501
+ }
502
+ /** A ticker or an identifier spelled out: letters and digits run together ("LU0000000000", "ABCDEF LX", "X1AA"), or an ISIN shape. */
503
+ const LITERAL_CODE = /\b(?:[A-Z]{2}[A-Z0-9]{9}\d|[A-Z]{4,}\s[A-Z]{2}|[A-Z]+\d+[A-Z]+|TL-[A-Z]\d*)\b/;
504
+ /**
505
+ * The same inside a finder that reads any case (`case: any`, 2026-10-24): there capitals are the type's wording as printed
506
+ * ("A SUB-FUND OF THE"), so a word of four capitals then one of two is a ticker only when the two stand alone ("ABCDEF LX");
507
+ * a code with digits or an identifier's shape is refused as everywhere.
508
+ */
509
+ const LITERAL_CODE_ANY_CASE = /\b(?:[A-Z]{2}[A-Z0-9]{9}\d|[A-Z]+\d+[A-Z]+|TL-[A-Z]\d*)\b|(?<![A-Za-z][\s-]?)\b[A-Z]{4,}\s[A-Z]{2}\b(?![\s-]?[A-Za-z])/;
510
+ export function layoutFindings(name, file, fileName = `${name}.yaml`) {
511
+ const out = [];
512
+ const refuse = (msg) => out.push({ file: fileName, msg, refuses: true });
513
+ if (!isRecord(file)) return [{ file: fileName, msg: `layout ${name}: ${fileName} must be a record`, refuses: true }];
514
+ const walk = (v, path, anyCase = false) => {
515
+ if (Array.isArray(v)) { v.forEach((x, i) => walk(x, `${path}[${i}]`, anyCase)); return; }
516
+ if (isRecord(v)) {
517
+ // A FINDER THAT READS ANY CASE (`case: any`): its own strings are wording, capitals and all; a record beneath it is its own.
518
+ const own = v.case === "any";
519
+ for (const [k, x] of Object.entries(v)) {
520
+ if (LAYOUT_NAME_KEYS.has(k)) refuse(`layout ${name}: "${k}" at ${path} lists names; a layout names no document, aliases live on records (document-map.md, 2026-10-21)`);
521
+ else if (k === "map" && isRecord(x)) { for (const [from, to] of Object.entries(x)) for (const t of [from, String(to)]) check(t, `${path}.map`); }
522
+ else walk(x, path ? `${path}.${k}` : k, own && typeof x === "string");
523
+ }
524
+ return;
525
+ }
526
+ if (typeof v === "string") { const key = path.split(/[.[]/).pop()?.replace("]", ""); if (LAYOUT_TEXT_KEYS.has(key)) check(v, path, anyCase); }
527
+ };
528
+ const check = (str, path, anyCase = false) => {
529
+ // BY STRUCTURE, NEVER BY A WORD LIST (owner 2026-10-24: a list of a document type's words grew from one org's documents).
530
+ // A name shows itself two ways: a capitalised run that ends in a legal form and holds a word that is not one
531
+ // ("Example Asset Management B.V."; an alternation of legal forms alone is pattern syntax), and a `never` pattern that
532
+ // is plain words with no regular-expression structure, which can only be one name. Wording a pattern matches or maps
533
+ // ("No Distribution", "Swiss Paying Agent") is the type's own and carries no name.
534
+ const plain = String(str).replace(/\\[A-Za-z]/g, " ");
535
+ for (const run of capitalisedRuns(plain)) {
536
+ const words = run.split(/\s+/).filter(Boolean);
537
+ const last = words[words.length - 1] ?? "";
538
+ // A lone capital letter is a legal form's initial once its dots are gone ("S A", "B V"), never a word of a name.
539
+ const ownWords = words.filter((w) => !LEGAL_FORM_WORD.test(w) && !/^[A-Z]$/.test(w) && !/^(?:of|de|di|du|des|and|&)$/i.test(w));
540
+ if (LEGAL_FORM_WORD.test(last) && ownWords.length >= 1) refuse(`layout ${name}: "${run}" at ${path} reads like a name (a legal form ends it); a layout names no document (document-map.md, 2026-10-21)`);
541
+ }
542
+ if (/(^|\.)never\[\d+\]\.pattern$/.test(path) && !/[\\^$.*+?()[\]{}|]/.test(str) && /[A-Z]/.test(str)) refuse(`layout ${name}: "${str.slice(0, 60)}" at ${path} reads like a name (plain words with no structure); a never rule is structural (document-map.md, 2026-10-21)`);
543
+ if ((anyCase ? LITERAL_CODE_ANY_CASE : LITERAL_CODE).test(str.replace(/\[[^\]]*\]|\{[^}]*\}|\\[A-Za-z]/g, " "))) refuse(`layout ${name}: "${str.slice(0, 60)}" at ${path} spells out a code or ticker; a layout names no document (document-map.md, 2026-10-21)`);
544
+ };
545
+ walk(file, "");
546
+ return out;
547
+ }
548
+
457
549
  export function firstError(findings) {
458
550
  const f = findings.find((x) => !x.level || x.level === "error");
459
551
  return f ? f.msg : null;