unoverse 0.1.218 → 0.1.220

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.
@@ -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"
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.218",
3
+ "version": "0.1.220",
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",
@@ -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
 
@@ -1039,7 +1042,12 @@ function placeNames() {
1039
1042
  const walkNode = makeWalkNode(ctx);
1040
1043
  const lintFile = makeLintFile({ ...ctx, walkNode });
1041
1044
 
1042
- for (const home of homes) for (const f of jsonFiles(home.dir)) lintFile(f);
1045
+ for (const home of homes) {
1046
+ const files = home.flat
1047
+ ? readdirSync(home.dir).filter((f) => !f.startsWith(".") && isDefFile(f) && !statSync(join(home.dir, f)).isDirectory()).map((f) => join(home.dir, f))
1048
+ : jsonFiles(home.dir);
1049
+ for (const f of files) lintFile(f);
1050
+ }
1043
1051
  return { problems, homes, designRoot: DESIGN_ROOT, designSystem: DS };
1044
1052
  }
1045
1053
 
@@ -931,9 +931,13 @@
931
931
  "$ref": "_defs.schema.json#/definitions/expression",
932
932
  "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
933
  },
934
+ "thinking": {
935
+ "$ref": "_defs.schema.json#/definitions/expression",
936
+ "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."
937
+ },
934
938
  "assistant": {
935
939
  "$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: [...] }."
940
+ "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
941
  }
938
942
  }
939
943
  }
@@ -0,0 +1,185 @@
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
+ "fallback": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ }
97
+ }
98
+ },
99
+ "budget": {
100
+ "type": "object",
101
+ "required": [
102
+ "perDay"
103
+ ],
104
+ "additionalProperties": false,
105
+ "description": "Required: no budget, no Agent.",
106
+ "properties": {
107
+ "perDay": {
108
+ "type": "string",
109
+ "pattern": "^[0-9]+(\\.[0-9]+)? [A-Z]{3}$",
110
+ "description": "e.g. 20 USD"
111
+ },
112
+ "perRun": {
113
+ "type": "string",
114
+ "pattern": "^[0-9]+(\\.[0-9]+)? [A-Z]{3}$"
115
+ }
116
+ }
117
+ },
118
+ "tasks": {
119
+ "type": "array",
120
+ "items": {
121
+ "type": "string",
122
+ "pattern": "^unoverse://tasks/[a-z0-9][a-z0-9-]*/[A-Za-z0-9][A-Za-z0-9._-]*$"
123
+ },
124
+ "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)."
125
+ },
126
+ "access": {
127
+ "type": "array",
128
+ "items": {
129
+ "type": "string",
130
+ "pattern": "^[a-z0-9-]+:[a-z0-9-]+$"
131
+ },
132
+ "description": "The most it may ever do (noun:verb). None: no one's information."
133
+ },
134
+ "triggers": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "object",
138
+ "required": [
139
+ "name"
140
+ ],
141
+ "additionalProperties": false,
142
+ "properties": {
143
+ "name": {
144
+ "type": "string",
145
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
146
+ },
147
+ "node": {
148
+ "type": "string",
149
+ "description": "An existing node type. Not for spatial."
150
+ },
151
+ "wakes": {
152
+ "enum": [
153
+ "mentions",
154
+ "replies",
155
+ "events"
156
+ ]
157
+ },
158
+ "config": {
159
+ "type": "object"
160
+ }
161
+ }
162
+ }
163
+ },
164
+ "checkIn": {
165
+ "type": "string",
166
+ "pattern": "^[0-9]+(m|h)$"
167
+ },
168
+ "memory": {
169
+ "type": "object",
170
+ "additionalProperties": false,
171
+ "properties": {
172
+ "agent": {
173
+ "enum": [
174
+ "on",
175
+ "off"
176
+ ],
177
+ "description": "Its own Agent Memory: goal, plan and notes, under its id. What it knows of people is Signal's."
178
+ }
179
+ }
180
+ },
181
+ "askWhenUnsure": {
182
+ "type": "string"
183
+ }
184
+ }
185
+ }
@@ -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
  },
@@ -236,9 +237,39 @@
236
237
  "evidence": { "type": "array", "items": { "type": "string" }, "description": "Fields shown to the judge beside each candidate, to tell like names apart." },
237
238
  "ruleOut": { "type": "array", "items": { "type": "string" }, "description": "Fields that, filled on both and different as words, mean never the same thing." },
238
239
  "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." },
240
+ "link": {
241
+ "type": "object",
242
+ "additionalProperties": false,
243
+ "required": ["node"],
244
+ "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.",
245
+ "properties": { "node": { "type": "string", "minLength": 1 }, "config": { "type": "object" } }
246
+ },
247
+ "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
248
  "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
249
  }
241
250
  },
251
+ "extract": {
252
+ "type": "object",
253
+ "additionalProperties": false,
254
+ "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.",
255
+ "properties": {
256
+ "instructions": { "type": "string", "description": "What to take and what to leave, in plain words: what this object is, and what it is not." },
257
+ "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." },
258
+ "examples": {
259
+ "type": "array",
260
+ "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.",
261
+ "items": {
262
+ "type": "object",
263
+ "additionalProperties": false,
264
+ "required": ["text", "answer"],
265
+ "properties": {
266
+ "text": { "type": "string" },
267
+ "answer": { "type": "array", "items": { "type": "object" } }
268
+ }
269
+ }
270
+ }
271
+ }
272
+ },
242
273
  "dataset": {
243
274
  "oneOf": [
244
275
  {
@@ -74,6 +74,12 @@
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
+ },
77
83
  "reuse": {
78
84
  "type": "boolean",
79
85
  "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."
@@ -126,8 +126,19 @@
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
+ }
131
142
  },
132
143
  "parts": {
133
144
  "type": "object",
@@ -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,13 @@ 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
+ export const PROP_KEYS = new Set(["type", "input", "description", "from", "hydrate", "enum", "oneOf", "minLength", "maxLength", "minItems", "maxItems", "items", "reuse", "answeredBy"]);
33
33
  export const LIMIT_KEYS = ["minLength", "maxLength", "minItems", "maxItems"];
34
34
 
35
35
  /** Words that left the object grammar and must not come back (README 11.7, 12.3, 12.4). */
@@ -117,7 +117,7 @@ export function envelopeFindings(name, envelope, file = `${name}.yaml`) {
117
117
  if (m.createFrom != null && !fields(m.createFrom)) refuse(`object ${name}: matching: createFrom is a list of line names (about)`);
118
118
  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
119
  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`);
120
+ 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
121
  }
122
122
  }
123
123
  return out;
@@ -158,6 +158,15 @@ export function propsFindings(name, ownProps, parentProps = null, base = null, f
158
158
  if (raw.enum != null) say(`object ${name}: prop "${k}" says both enum and oneOf; one or the other`);
159
159
  }
160
160
  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)`);
161
+ 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]`);
162
+ 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`);
163
+ }
164
+ // FILLED FROM DOCUMENTS, EVERY FIELD SAYS WHICH (proved-before-built.md, ruled 2026-10-07): an
165
+ // object one of whose fields names the documents that answer it is filled from documents, so
166
+ // every field it reads names them; a field without would never be asked.
167
+ const own = Object.entries(ownProps).filter(([k, raw]) => isRecord(raw) && !(parentProps && k in parentProps));
168
+ if (own.some(([, raw]) => raw.answeredBy != null)) {
169
+ 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
170
  }
162
171
  return out;
163
172
  }
@@ -304,7 +313,7 @@ export const PIPELINE_READ_KEYS = new Set(["each", "sourceUrl", "sourceId", "con
304
313
  const DROPPED_MAKE_KEYS = ["partsOf", "by", "under", "when", "from", "any", "index"];
305
314
 
306
315
  /** 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"]);
316
+ const ITEM_OBJECT_KEYS = new Set(["cardinality", "any", "parts", "where", "per", "read"]);
308
317
  const FIELD = /^[A-Za-z_][A-Za-z0-9_]*$/;
309
318
 
310
319
  /**
@@ -334,6 +343,7 @@ export function pipelineFindings(name, file, fileName = "pipeline.yaml") {
334
343
  return;
335
344
  }
336
345
  if (stepNames.has(s.name)) refuse(`pipeline ${name}: two collect steps named "${s.name}"`);
346
+ 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
347
  // A step reads only what came before it.
338
348
  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
349
  stepNames.add(s.name);
@@ -380,8 +390,10 @@ export function pipelineFindings(name, file, fileName = "pipeline.yaml") {
380
390
  }
381
391
  if (made.includes(o)) refuse(`pipeline ${name}: ${at}.${o} is made above already; one entry makes an object`);
382
392
  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})`);
393
+ 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 and read (${see})`);
394
+ 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})`);
395
+ 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})`);
396
+ 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
397
  // HOW MANY IS SAID by every object the model writes (owner, 2026-09-13).
386
398
  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
399
  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 +451,8 @@ export function pipelineFolderFindings(name, { file, config, test }, { nodeTypes
439
451
  const out = [];
440
452
  if (!isRecord(file)) return out;
441
453
  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` });
454
+ // The Input Trigger is the engine's own node, not a marketplace one: the pipeline's door (README, collect).
455
+ 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
456
  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
457
  const props = isRecord(config?.configSchema?.properties) ? new Set(Object.keys(config.configSchema.properties)) : null;
445
458
  const refs = configRefs(file);