@orkestrel/scaffold 0.0.135 → 0.0.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/skills/orkestrel-parallel/scripts/lane.js +167 -4
- package/dist/agents/skills/orkestrel-publish/scripts/wave.js +20 -5
- package/dist/bin/main.js +12 -12
- package/dist/host/AGENTS.md +1 -1
- package/dist/host/agents/orchestration.md +2 -2
- package/dist/host/agents/skills/orkestrel-parallel/scripts/lane.ts +201 -8
- package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +24 -5
- package/dist/host/claude/agents/orkestrel.md +52 -52
- package/dist/host/claude/agents/reviewer.md +1 -1
- package/dist/host/claude/rules/documentation.md +1 -1
- package/dist/host/claude/rules/patterns.md +2 -2
- package/dist/host/claude/rules/workspace.md +9 -4
- package/dist/host/configs/helpers.ts +21 -6
- package/dist/host/guides/agent.md +3 -1
- package/dist/host/guides/brief.md +16 -16
- package/dist/host/guides/browser.md +1 -1
- package/dist/host/guides/contract.md +198 -163
- package/dist/host/guides/database.md +773 -310
- package/dist/host/guides/indexeddb.md +80 -66
- package/dist/host/guides/reason.md +1 -1
- package/dist/host/guides/relation.md +56 -32
- package/dist/host/guides/scaffold.md +8 -2
- package/dist/host/guides/sqlite.md +44 -23
- package/dist/host/guides/test.md +7 -3
- package/dist/host/guides/tool.md +2 -1
- package/dist/host/guides/toolbox.md +44 -44
- package/dist/host/guides/workflow.md +2 -2
- package/dist/host/manifest.json +26 -26
- package/dist/host/tests/config.test.ts +71 -3
- package/dist/src/core/index.cjs +112 -35
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +31 -5
- package/dist/src/core/index.d.ts +31 -5
- package/dist/src/core/index.js +112 -36
- package/dist/src/core/index.js.map +1 -1
- package/package.json +12 -12
|
@@ -161,44 +161,44 @@ The shape values each `create*Tool` factory (and `createWorkflowDraftContract`)
|
|
|
161
161
|
|
|
162
162
|
### Constants
|
|
163
163
|
|
|
164
|
-
| Name | Kind | Signature
|
|
165
|
-
| ------------------------------ | ----- |
|
|
166
|
-
| `AGENT_TOOL_NAME` | const | `"agent"`
|
|
167
|
-
| `AGENT_TOOL_DEPTH` | const | `8`
|
|
168
|
-
| `AGENT_TOOL_DESCRIPTION` | const | `string`
|
|
169
|
-
| `AGENT_TOOL_SUMMARY` | const | `"Delegate a task to a sub-agent and return its result; each call runs one sub-agent turn to completion. Call describe('agent') for the full description."`
|
|
170
|
-
| `MAX_WORKFLOW_CHAIN` | const | `8`
|
|
171
|
-
| `WORKFLOW_TOOL_NAME` | const | `"workflow"`
|
|
172
|
-
| `WORKFLOW_TOOL_FLAT_EXAMPLE` | const | `WorkflowSteps`
|
|
173
|
-
| `WORKFLOW_TOOL_NESTED_EXAMPLE` | const | `WorkflowDefinition`
|
|
174
|
-
| `WORKFLOW_TOOL_DESCRIPTION` | const | `string`
|
|
175
|
-
| `WORKFLOW_TOOL_SUMMARY` | const | `"Author and run a multi-phase workflow in one call \u2014 phases run in sequence, tasks within a phase run concurrently. Call describe('workflow') for the full authoring schema and examples."`
|
|
176
|
-
| `WORKSPACE_TOOL_NAME` | const | `"workspace"`
|
|
177
|
-
| `WORKSPACE_TOOL_EXAMPLE` | const | `WorkspaceOperation`
|
|
178
|
-
| `WORKSPACE_TOOL_DESCRIPTION` | const | `string`
|
|
179
|
-
| `WORKSPACE_TOOL_SUMMARY` | const | `"Read and edit files in a workspace \u2014 one operation per call (read, write, list, search, replace, splice, move, remove), chosen by the 'operation' field. Call describe('workspace') for the full operation list and fields."`
|
|
180
|
-
| `DESCRIBE_TOOL_NAME` | const | `"describe"`
|
|
181
|
-
| `DESCRIBE_TOOL_SUMMARY` | const | `"Return the full description of a named registered tool."`
|
|
182
|
-
| `DESCRIBE_TOOL_DESCRIPTION` | const | `"Return the full description of a registered tool by its name. Required: name - the registered tool name (see another tool listing for available names)."`
|
|
183
|
-
| `PROMPT_TOOL_NAME` | const | `"ask"`
|
|
184
|
-
| `PROMPT_TOOL_SUMMARY` | const | `"Ask another terminal a multi-field form and BLOCK until it answers; the call resolves with the values record. Call describe('ask') for the schema."`
|
|
185
|
-
| `PROMPT_TOOL_DESCRIPTION` | const | `string`
|
|
186
|
-
| `ANSWER_TOOL_NAME` | const | `"answer"`
|
|
187
|
-
| `ANSWER_TOOL_SUMMARY` | const | `"List forms addressed to this terminal, or answer one by id with a values record. Call describe('answer') for the required fields."`
|
|
188
|
-
| `ANSWER_TOOL_DESCRIPTION` | const | `string`
|
|
189
|
-
| `DATABASE_TOOL_NAME` | const | `"database"`
|
|
190
|
-
| `DATABASE_TOOL_SUMMARY` | const | `"Create and query a database \u2014 one operation per call (create, tables, get, records, count, aggregate, add, set, update, remove, destroy), chosen by the 'operation' field. Call describe('database') for the full operation list, the query form, and the column DSL."` | Holds the lean `ToolInterface.summary` `createDatabaseTool` advertises in place of `DATABASE_TOOL_DESCRIPTION` — one sentence offering the `operation`-keyed database call and pointing at `describe` for the operation list, the query form, and the column DSL. |
|
|
191
|
-
| `DATABASE_TOOL_DESCRIPTION` | const | `string`
|
|
192
|
-
| `DATABASE_TOOL_LIMIT` | const | `1000`
|
|
193
|
-
| `DATABASE_TOOL_MUTATIONS` | const | `readonly string[]`
|
|
194
|
-
| `RELATION_TOOL_NAME` | const | `"relation"`
|
|
195
|
-
| `RELATION_TOOL_SUMMARY` | const | `"Traverse and edit relationships between database rows \u2014 one operation per call (load, find, link, unlink, links), chosen by the 'operation' field. Call describe('relation') for the include-path syntax."`
|
|
196
|
-
| `RELATION_TOOL_DESCRIPTION` | const | `string`
|
|
197
|
-
| `RELATION_TOOL_LIMIT` | const | `1000`
|
|
198
|
-
| `RELATION_TOOL_DEPTH` | const | `3`
|
|
199
|
-
| `INFER_TOOL_NAME` | const | `"infer"`
|
|
200
|
-
| `INFER_TOOL_SUMMARY` | const | `"Infer a JSON Schema (as advertised tool parameters) from one or more example values. Call describe('infer') for the required fields."`
|
|
201
|
-
| `INFER_TOOL_DESCRIPTION` | const | `string`
|
|
164
|
+
| Name | Kind | Signature | Summary |
|
|
165
|
+
| ------------------------------ | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
166
|
+
| `AGENT_TOOL_NAME` | const | `"agent"` | Holds the name `createAgentTool` advertises by default, `'agent'` — the key a model calls and the `ToolManagerInterface` (`@orkestrel/tool`) registers under. |
|
|
167
|
+
| `AGENT_TOOL_DEPTH` | const | `8` | Holds the maximum nesting depth a delegation chain (agent tool → sub-agent → agent tool → …) may reach, `8` — the bound `createAgentTool`'s depth/cycle guard enforces. |
|
|
168
|
+
| `AGENT_TOOL_DESCRIPTION` | const | `string` | Holds the description `createAgentTool` advertises — a short guide covering the one field a call sends, `task`, and that the host fixes the sub-agent. |
|
|
169
|
+
| `AGENT_TOOL_SUMMARY` | const | `"Delegate a task to a sub-agent and return its result; each call runs one sub-agent turn to completion. Call describe('agent') for the full description."` | Holds the lean `ToolInterface.summary` `createAgentTool` advertises in place of `AGENT_TOOL_DESCRIPTION` — one sentence offering sub-agent delegation and pointing at `describe` for the full description. |
|
|
170
|
+
| `MAX_WORKFLOW_CHAIN` | const | `8` | Holds the maximum nesting depth a workflow → agent → workflow chain may reach, `8` — the bound `createAgentFunction` and `createWorkflowTool`'s depth/cycle guards enforce. |
|
|
171
|
+
| `WORKFLOW_TOOL_NAME` | const | `"workflow"` | Holds the name `createWorkflowTool` advertises by default, `'workflow'` — the key a model calls and the `ToolManagerInterface` (`@orkestrel/tool`) registers under, and the name `createAgentFunction` binds the depth/cycle-aware workflow tool under onto a wrapped agent's `context.tools`. |
|
|
172
|
+
| `WORKFLOW_TOOL_FLAT_EXAMPLE` | const | `WorkflowSteps` | Holds a complete flat authoring example — the primary way a small model authors a workflow through `createWorkflowTool`: `{ name, steps: [{ name }] }`. |
|
|
173
|
+
| `WORKFLOW_TOOL_NESTED_EXAMPLE` | const | `WorkflowDefinition` | Holds a minimal nested authoring example — the advanced escape-hatch form a model can use instead of the flat shape: a full `WorkflowDefinition` (`@orkestrel/workflow`). |
|
|
174
|
+
| `WORKFLOW_TOOL_DESCRIPTION` | const | `string` | Holds the description `createWorkflowTool` advertises — the flat authoring form, its worked example, and the advanced nested definition form. |
|
|
175
|
+
| `WORKFLOW_TOOL_SUMMARY` | const | `"Author and run a multi-phase workflow in one call \u2014 phases run in sequence, tasks within a phase run concurrently. Call describe('workflow') for the full authoring schema and examples."` | Holds the lean `ToolInterface.summary` `createWorkflowTool` advertises in place of `WORKFLOW_TOOL_DESCRIPTION` — one sentence offering multi-phase authoring and pointing at `describe` for the authoring schema and its examples. |
|
|
176
|
+
| `WORKSPACE_TOOL_NAME` | const | `"workspace"` | Holds the name `createWorkspaceTool` advertises by default, `'workspace'` — the key a model calls and the `ToolManagerInterface` (`@orkestrel/tool`) registers under. |
|
|
177
|
+
| `WORKSPACE_TOOL_EXAMPLE` | const | `WorkspaceOperation` | Holds a valid `WorkspaceOperation` object — the canonical example embedded verbatim in `WORKSPACE_TOOL_DESCRIPTION`. |
|
|
178
|
+
| `WORKSPACE_TOOL_DESCRIPTION` | const | `string` | Holds the description `createWorkspaceTool` advertises — the operation-keyed workspace protocol, all supported operations, and worked examples. |
|
|
179
|
+
| `WORKSPACE_TOOL_SUMMARY` | const | `"Read and edit files in a workspace \u2014 one operation per call (read, write, list, search, replace, splice, move, remove), chosen by the 'operation' field. Call describe('workspace') for the full operation list and fields."` | Holds the lean `ToolInterface.summary` `createWorkspaceTool` advertises in place of `WORKSPACE_TOOL_DESCRIPTION` — one sentence offering the `operation`-keyed file editing and pointing at `describe` for the operation list and its fields. |
|
|
180
|
+
| `DESCRIBE_TOOL_NAME` | const | `"describe"` | Holds the name `createDescribeTool` advertises by default, `'describe'` — the key a model calls and the `ToolManagerInterface` (`@orkestrel/tool`) registers under. |
|
|
181
|
+
| `DESCRIBE_TOOL_SUMMARY` | const | `"Return the full description of a named registered tool."` | Holds the lean `ToolInterface.summary` `createDescribeTool` advertises — this tool needs no teaching of its own, so its summary and description are both short. |
|
|
182
|
+
| `DESCRIBE_TOOL_DESCRIPTION` | const | `"Return the full description of a registered tool by its name. Required: name - the registered tool name (see another tool listing for available names). Arguments admit lossless repair alone: a text field accepts a finite number; any other mismatch is refused, and the refusal names every fault."` | Holds the description `createDescribeTool` advertises — the registered tool `name` it requires, and the full description of that tool it returns. |
|
|
183
|
+
| `PROMPT_TOOL_NAME` | const | `"ask"` | Holds the name `createPromptTool` advertises by default, `'ask'` — the key a model calls and the `ToolManagerInterface` (`@orkestrel/tool`) registers under. |
|
|
184
|
+
| `PROMPT_TOOL_SUMMARY` | const | `"Ask another terminal a multi-field form and BLOCK until it answers; the call resolves with the values record. Call describe('ask') for the schema."` | Holds the lean `ToolInterface.summary` `createPromptTool` advertises in place of `PROMPT_TOOL_DESCRIPTION` — one sentence offering the blocking multi-field ask and pointing at `describe` for the schema. |
|
|
185
|
+
| `PROMPT_TOOL_DESCRIPTION` | const | `string` | Holds the form protocol `createPromptTool` advertises — the required `to` and `schema`, how a field declares its control and its rules, and a worked example. |
|
|
186
|
+
| `ANSWER_TOOL_NAME` | const | `"answer"` | Holds the name `createAnswerTool` advertises by default, `'answer'` — the key a model calls and the `ToolManagerInterface` (`@orkestrel/tool`) registers under. |
|
|
187
|
+
| `ANSWER_TOOL_SUMMARY` | const | `"List forms addressed to this terminal, or answer one by id with a values record. Call describe('answer') for the required fields."` | Holds the lean `ToolInterface.summary` `createAnswerTool` advertises in place of `ANSWER_TOOL_DESCRIPTION` — one sentence offering the pending listing and the answer call, and pointing at `describe` for the fields each takes. |
|
|
188
|
+
| `ANSWER_TOOL_DESCRIPTION` | const | `string` | Holds the protocol `createAnswerTool` advertises — the `pending` and `answer` operations and the `values` record an answer supplies, each with a worked example. |
|
|
189
|
+
| `DATABASE_TOOL_NAME` | const | `"database"` | Holds the name `createDatabaseTool` advertises by default, `'database'` — the key a model calls and the `ToolManagerInterface` (`@orkestrel/tool`) registers under. |
|
|
190
|
+
| `DATABASE_TOOL_SUMMARY` | const | `"Create and query a database \u2014 one operation per call (create, tables, get, records, count, aggregate, add, set, update, remove, destroy), chosen by the 'operation' field. Every row and query value must match its column's declared type, and a refusal names every fault. Call describe('database') for the full operation list, the query form, and the column DSL."` | Holds the lean `ToolInterface.summary` `createDatabaseTool` advertises in place of `DATABASE_TOOL_DESCRIPTION` — one sentence offering the `operation`-keyed database call and pointing at `describe` for the operation list, the query form, and the column DSL. |
|
|
191
|
+
| `DATABASE_TOOL_DESCRIPTION` | const | `string` | Holds the description `createDatabaseTool` advertises — a multi-line guide that teaches a small model the operation list, the serialized query form, and the `TableSpec` column DSL. |
|
|
192
|
+
| `DATABASE_TOOL_LIMIT` | const | `1000` | Holds the default cap on rows a `records` call returns when the caller omits `query.limit`, `1000` — the database tool's default row ceiling. |
|
|
193
|
+
| `DATABASE_TOOL_MUTATIONS` | const | `readonly string[]` | Lists the runtime-frozen database-tool mutation names disabled by `DatabaseToolOptions.readonly`. |
|
|
194
|
+
| `RELATION_TOOL_NAME` | const | `"relation"` | Holds the name `createRelationTool` advertises by default, `'relation'` — the key a model calls and the `ToolManagerInterface` (`@orkestrel/tool`) registers under. |
|
|
195
|
+
| `RELATION_TOOL_SUMMARY` | const | `"Traverse and edit relationships between database rows \u2014 one operation per call (load, find, link, unlink, links), chosen by the 'operation' field. Call describe('relation') for the include-path syntax."` | Holds the lean `ToolInterface.summary` `createRelationTool` advertises in place of `RELATION_TOOL_DESCRIPTION` — one sentence offering the `operation`-keyed relationship traversal and pointing at `describe` for the include-path syntax. |
|
|
196
|
+
| `RELATION_TOOL_DESCRIPTION` | const | `string` | Holds the description `createRelationTool` advertises — a multi-line guide that teaches a small model the operation list and the flat dot-path `include` syntax. |
|
|
197
|
+
| `RELATION_TOOL_LIMIT` | const | `1000` | Holds the default cap on rows a `find` or `links` call returns when the caller omits `limit`, `1000` — the relation tool's default row ceiling. |
|
|
198
|
+
| `RELATION_TOOL_DEPTH` | const | `3` | Holds the default cap on how many `include` path segments deep a `load` or `find` call may traverse, `3` — the relation tool's default include-depth ceiling. |
|
|
199
|
+
| `INFER_TOOL_NAME` | const | `"infer"` | Holds the name `createInferTool` advertises by default, `'infer'` — the key a model calls and the `ToolManagerInterface` (`@orkestrel/tool`) registers under. |
|
|
200
|
+
| `INFER_TOOL_SUMMARY` | const | `"Infer a JSON Schema (as advertised tool parameters) from one or more example values. Call describe('infer') for the required fields."` | Holds the lean `ToolInterface.summary` `createInferTool` advertises in place of `INFER_TOOL_DESCRIPTION` — one sentence offering schema inference from example values and pointing at `describe` for the fields it takes. |
|
|
201
|
+
| `INFER_TOOL_DESCRIPTION` | const | `string` | Holds the schema-inference protocol `createInferTool` advertises — the required `samples`, the optional `format`, `enum`, and `candidates` arguments, and a worked example of the bare return and of the `candidates`-wrapped return. |
|
|
202
202
|
|
|
203
203
|
### Types
|
|
204
204
|
|
|
@@ -329,7 +329,7 @@ These invariants hold across `src/core` ↔ `toolbox.md`:
|
|
|
329
329
|
|
|
330
330
|
2. **One tool = one behavior; the runtime supplies the envelope, this package supplies the handler.** Each `create*Tool` factory returns a plain `ToolInterface` (`@orkestrel/tool`). Under AGENTS' narrow-untrusted-input-with-guards rule, malformed model-supplied `args` refuse before the handler acts, as a `ToolError` with code `ARGUMENTS` whose text says what to send and whose `context.faults` lists every fault (see [`tool.md`](tool.md)). The handler reads a typed value from the compiled [contract](contract.md), dispatches, and either returns a plain value on success or throws a typed error on every failure path — it never builds a `ToolResult` itself. Every refusal a model can read names the subject, what to send, and the candidates where there are some, encodes each untrusted identifier and candidate through `preview` (`renderCandidates`), and stays within 2048 characters: where a message joins parts this package cannot bound one by one, a head beside a report or an upstream error's text, `limitRefusal` caps the whole. A `WorkspaceError`, `WorkflowError`, or `AgentError` that passes through by identity carries its owner's text. The runtime supplies registry execution and result isolation; see [`tool.md`](tool.md). Through that registry, a failure's flattened message text appears exactly once, identically, over both the agent loop and MCP.
|
|
331
331
|
|
|
332
|
-
3. **Contract-compiled schemas throughout.** The workspace, answer, database, relation, agent, describe, prompt, and infer tools pass their shapes through `contract`, so the Tool door enforces the advertised schema. A union value selecting one operation reports that arm's faults and admits lossless leaf repairs: `find` with `limit: '5'` reaches the handler as `5`, while `'many'` names `limit` and `'0x10'` refuses. A value selecting no arm receives a bounded summary of alternatives. Handlers use `requireToolCall` to type the parsed arguments. The workflow tool advertises its flat schema through `parameters` and uses `strict: false` because its handler accepts several authoring forms; `resolveWorkflowTarget` applies the matching contract through `requireToolCall`.
|
|
332
|
+
3. **Contract-compiled schemas throughout.** The workspace, answer, database, relation, agent, describe, prompt, and infer tools pass their shapes through `contract`, so the Tool door enforces the advertised schema. A union value selecting one operation reports that arm's faults and admits lossless leaf repairs: `find` with `limit: '5'` reaches the handler as `5`, while `'many'` names `limit` and `'0x10'` refuses. A value selecting no arm receives a bounded summary of alternatives. Handlers use `requireToolCall` to type the parsed arguments; it admits through `@orkestrel/contract`'s `repairValue`, so it keeps the same lossless leaf repairs, and each tool description built on it states them. The workflow tool advertises its flat schema through `parameters` and uses `strict: false` because its handler accepts several authoring forms; `resolveWorkflowTarget` applies the matching contract through `requireToolCall`.
|
|
333
333
|
|
|
334
334
|
4. **Workflow/agent recursion is lineage-derived and contextually composed.** `WorkflowLineage` is a copied, frozen chain of nonempty unique tags, strictly alternating `workflow:` then `agent:`. Malformed configured lineage or a factory-incompatible final tag throws `ToolboxError('TOOL')`; runtime workflow mismatch, repeated workflow/agent id, or over-depth target throws `ToolboxError('DEPTH')` before agent, tool, or runner activity. Depth is zero-based and derived only from workflow-tag count minus one (empty/root is `0`): root plus eight nested workflows is allowed, the ninth nested workflow is rejected. `createWorkflowFunctions` is the sole composition engine: it snapshots opaque `functions`, rejects a marked `AgentFunction` supplied through that opaque channel, rejects function/agent key collisions, and contextually adapts raw `agents` for the exact target lineage. Its frozen registry has a null prototype, so the workflow runner's native bracket lookup cannot resolve unregistered inherited names such as `toString`, `constructor`, `valueOf`, `hasOwnProperty`, or `__proto__`; those remain genuine native `WorkflowError('TRANSITION')` failures. Opaque wrappers or spoofed metadata that hide their real agent behavior are not covered; hosts must not use them to share one live agent concurrently.
|
|
335
335
|
|
|
@@ -353,7 +353,7 @@ Before shape branching or property reads, the handler snapshots untrusted `args`
|
|
|
353
353
|
|
|
354
354
|
13. **The lean `summary` / full `description` split, and `createDescribeTool`'s expansion seam.** `createWorkflowTool`, `createWorkspaceTool`, and `createAgentTool` each set `ToolInterface.summary` (`@orkestrel/tool`) to a frozen one-sentence constant (`WORKFLOW_TOOL_SUMMARY` / `WORKSPACE_TOOL_SUMMARY` / `AGENT_TOOL_SUMMARY`) alongside their unchanged full teaching `description`; `ToolManagerInterface.definitions()` advertises `summary ?? description`, so a model sees the lean text by default. `createDescribeTool(tools)` is the on-demand expansion: given a registered `name`, it looks the tool up through `tools.tool(name)` and returns its full `tool.description` (falling back to `tool.summary`, then an explicit `null` when a tool has neither) — never truncated, never re-derived. An unknown `name` lists the registered names. Each summary's text points the model at `describe('<name>')` for the full schema. An `@orkestrel/agent` host holds teaching text and tools back through Agent's skills and its `load` built-in instead, which shows a skill's text and releases its tools when the model asks for it; see [Agent](agent.md) § Enabling the built-in tools.
|
|
355
355
|
|
|
356
|
-
14. **`createDatabaseTool` and `createRelationTool` are single-tool-many-operations, matching `createWorkspaceTool`'s shape.** `createDatabaseTool` dispatches `create` / `tables` / `get` / `records` / `count` / `aggregate` / `add` / `set` / `update` / `remove` / `destroy` off `databaseToolShape`; `createRelationTool` dispatches `load` / `find` / `link` / `unlink` / `links` off `relationToolShape`. Both set `ToolInterface.summary` (`DATABASE_TOOL_SUMMARY` / `RELATION_TOOL_SUMMARY`) alongside their full teaching `description`, retrievable through `createDescribeTool`, per invariant 13. Every `'get'` / `'add'` / `'set'` / `'update'` / `'remove'` and `'load'` operation's `key` field takes either a single key or an array of keys (AGENTS' batch overload mold, with the array form resolving first); a single-key call returns a singular result field (`row` / `key` / `updated`
|
|
356
|
+
14. **`createDatabaseTool` and `createRelationTool` are single-tool-many-operations, matching `createWorkspaceTool`'s shape.** `createDatabaseTool` dispatches `create` / `tables` / `get` / `records` / `count` / `aggregate` / `add` / `set` / `update` / `remove` / `destroy` off `databaseToolShape`; `createRelationTool` dispatches `load` / `find` / `link` / `unlink` / `links` off `relationToolShape`. Both set `ToolInterface.summary` (`DATABASE_TOOL_SUMMARY` / `RELATION_TOOL_SUMMARY`) alongside their full teaching `description`, retrievable through `createDescribeTool`, per invariant 13. Every `'get'` / `'add'` / `'set'` / `'update'` / `'remove'` and `'load'` operation's `key` field takes either a single key or an array of keys (AGENTS' batch overload mold, with the array form resolving first); a single-key call returns a singular result field (`row` / `key` / `updated`), and an array-key call returns the plural (`rows` / `keys` / `updated` as arrays). `'remove'` replies `{ removed }` in either form, one boolean that is `true` only when every listed key held a row, because `Table.remove` reports the batch as one boolean. A row a `'get'` or `'load'` misses is an explicit `null` in either form, where JSON would otherwise drop the key. The database tool's values stay strict: each value in a `row`, in `changes`, and in a condition's `values` must match its column's declared type, as `'tables'` reports, so `'36'` never fills an integer column. The database refuses a nonconforming write or query with `VALIDATION`, which the tool forwards as a `DATABASE` `ToolboxError` carrying `context.code`, and the message names every fault. The tool's descriptions state that strictness, and the `like` and `glob` wildcards.
|
|
357
357
|
|
|
358
358
|
15. **The database tool's query form is serialized, never fluent.** `databaseToolShape`'s `query` is a flat object — `{ conditions?: [{ column, operator, values, connector? }], order?, limit?, offset? }` — where `values` is always an array, even for a single-value operator (`{ column: 'age', operator: 'from', values: [18] }`), so a small model never chains method calls or guesses arity. `normalizeQuery` normalizes the parsed form into a live `@orkestrel/database` `QueryInput`, defaulting an omitted condition `connector` to `'and'` (the wire form lets a caller drop `connector` on the last condition, because it joins nothing forward).
|
|
359
359
|
|
|
@@ -885,10 +885,10 @@ restored?.id // 'audit'
|
|
|
885
885
|
|
|
886
886
|
Register a live relation manager and load a row with a nested dot-path `include` list:
|
|
887
887
|
|
|
888
|
-
The tool opens no transaction. `unlink` removes
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
888
|
+
The tool opens no transaction. `unlink` removes the pair's one junction row, the row `link` wrote
|
|
889
|
+
under the pair's computed key, through the manager's bound storage. A failed removal leaves the pair
|
|
890
|
+
linked, and `links` still lists the target. Repeat `unlink` to complete removal. To unlink several
|
|
891
|
+
pairs as one unit, build the manager with `createRelationManager({ storage, relations })`
|
|
892
892
|
inside the host's `database.transaction(async (storage) => ...)` callback and use its tool only
|
|
893
893
|
within that scope. Let the failure propagate out of the callback so the transaction rolls back.
|
|
894
894
|
|
|
@@ -890,7 +890,7 @@ result.workflow.results() // every settled task's TaskResult, lineage-navigable
|
|
|
890
890
|
|
|
891
891
|
A run refuses what it cannot do before any task starts, and the promise rejects with a `SCHEDULE` `WorkflowError`. The definition door refuses a key the contract does not declare, so a misspelt `behaviour` reports an `extra` fault at `phases.0.tasks.0.behaviour` in `context.faults` instead of running a no-op. A tree with no task refuses too: `createWorkflow({ id: 'w', name: 'W', phases: [] })` still builds so a caller can `add` to it, and a refused live workflow stays unclaimed, so a corrected call can drive the same object. The same door guards `createWorkflow` and `WorkflowManager.add`, which throw, and a live `add`, which returns a `MUTATION` failure. One refusal lists every fault and every undeclared key, and a definition whose reads change refuses as unreadable.
|
|
892
892
|
|
|
893
|
-
The door repairs a leaf the way `parse` does, so a definition's `timeout: '5'` enters as `5`. A run option is not a definition and gets no repair, so `execute(definition, { timeout: '5' })` refuses the same value.
|
|
893
|
+
The definition door admits through the `repairValue` function, which repairs a lossless leaf the way `parse` does, so a definition's `timeout: '5'` enters as `5`. A run option is not a definition and gets no repair, so `execute(definition, { timeout: '5' })` refuses the same value.
|
|
894
894
|
|
|
895
895
|
### The `bail` policy — graceful vs halt
|
|
896
896
|
|
|
@@ -1086,7 +1086,7 @@ phase.patch({ concurrency: 2 }) // throws MUTATION unless this phase is `pending
|
|
|
1086
1086
|
|
|
1087
1087
|
Every one of these is refused gracefully (a `MUTATION` `Result` failure, never a throw) when a definition or a patch fails its contract or a patch is empty, each with `context.faults` listing every fault, when the container is terminal / `destroyed`, the target does not exist or is not `pending`, or the position falls outside the pending suffix; a `running` phase accepts an `add` only as a pure append — a live runner subscribed to that phase's own `add` event picks the new task up for same-run execution.
|
|
1088
1088
|
|
|
1089
|
-
|
|
1089
|
+
The patch door admits through the `repairValue` function, as the definition door does, so a lossless type repair enters repaired: `workflow.update(phase.id, { concurrency: '4' })` applies `concurrency: 4`, so the phase's `concurrency` reads `4` afterwards. An undeclared key, a lossy repair such as `'4.5'` for an integer, and a value that cannot be read refuse with their faults.
|
|
1090
1090
|
|
|
1091
1091
|
### Building the live tree by hand — `append`
|
|
1092
1092
|
|
package/dist/host/manifest.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"storage": "AGENTS.md",
|
|
5
5
|
"destination": "AGENTS.md",
|
|
6
6
|
"executable": false,
|
|
7
|
-
"digest": "
|
|
7
|
+
"digest": "4eba53632a4307a099e267a34742d9f469c64e663991fc859c56dbdd73bdaa6e"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"storage": "LICENSE",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"storage": "agents/orchestration.md",
|
|
17
17
|
"destination": ".agents/orchestration.md",
|
|
18
18
|
"executable": false,
|
|
19
|
-
"digest": "
|
|
19
|
+
"digest": "b124bab4ce8b541b43084deeed4a562a63b700cc8e03c4e0a9b573af7cfc714e"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"storage": "agents/platforms/posix.md",
|
|
@@ -442,7 +442,7 @@
|
|
|
442
442
|
"storage": "agents/skills/orkestrel-parallel/scripts/lane.ts",
|
|
443
443
|
"destination": ".agents/skills/orkestrel-parallel/scripts/lane.ts",
|
|
444
444
|
"executable": false,
|
|
445
|
-
"digest": "
|
|
445
|
+
"digest": "b5ed16532f3f6e010ce9f37c377c622aa3cddef1b61516597e08c5ad0c38545c"
|
|
446
446
|
},
|
|
447
447
|
{
|
|
448
448
|
"storage": "agents/skills/orkestrel-polish/SKILL.md",
|
|
@@ -526,7 +526,7 @@
|
|
|
526
526
|
"storage": "agents/skills/orkestrel-publish/scripts/wave.ts",
|
|
527
527
|
"destination": ".agents/skills/orkestrel-publish/scripts/wave.ts",
|
|
528
528
|
"executable": false,
|
|
529
|
-
"digest": "
|
|
529
|
+
"digest": "257759ce9b18b21e08aea1e15e859d77b13e5a36691ac6ff264f0b12eb41d8f0"
|
|
530
530
|
},
|
|
531
531
|
{
|
|
532
532
|
"storage": "agents/skills/orkestrel-publish/scripts/window.ts",
|
|
@@ -628,7 +628,7 @@
|
|
|
628
628
|
"storage": "claude/agents/orkestrel.md",
|
|
629
629
|
"destination": ".claude/agents/orkestrel.md",
|
|
630
630
|
"executable": false,
|
|
631
|
-
"digest": "
|
|
631
|
+
"digest": "888f199f9b5ba273e554f1db961c45e3325c45284bb432065d07ea52dd3663b2"
|
|
632
632
|
},
|
|
633
633
|
{
|
|
634
634
|
"storage": "claude/agents/planner.md",
|
|
@@ -646,7 +646,7 @@
|
|
|
646
646
|
"storage": "claude/agents/reviewer.md",
|
|
647
647
|
"destination": ".claude/agents/reviewer.md",
|
|
648
648
|
"executable": false,
|
|
649
|
-
"digest": "
|
|
649
|
+
"digest": "015709ddfb46997c8125df2e4759e19256a1f0e9ac40f658d29ee85d81fc8f38"
|
|
650
650
|
},
|
|
651
651
|
{
|
|
652
652
|
"storage": "claude/agents/scout.md",
|
|
@@ -688,7 +688,7 @@
|
|
|
688
688
|
"storage": "claude/rules/documentation.md",
|
|
689
689
|
"destination": ".claude/rules/documentation.md",
|
|
690
690
|
"executable": false,
|
|
691
|
-
"digest": "
|
|
691
|
+
"digest": "d6fd22a39159770582fb0ab6cfa1a67bd67c5ce68035f23f348bfc53f524260c"
|
|
692
692
|
},
|
|
693
693
|
{
|
|
694
694
|
"storage": "claude/rules/names.md",
|
|
@@ -700,7 +700,7 @@
|
|
|
700
700
|
"storage": "claude/rules/patterns.md",
|
|
701
701
|
"destination": ".claude/rules/patterns.md",
|
|
702
702
|
"executable": false,
|
|
703
|
-
"digest": "
|
|
703
|
+
"digest": "3e4a6598d11e2c59baf9e5872fcc584d3125e16414b06c8bd07e890d83c5c446"
|
|
704
704
|
},
|
|
705
705
|
{
|
|
706
706
|
"storage": "claude/rules/portability.md",
|
|
@@ -736,7 +736,7 @@
|
|
|
736
736
|
"storage": "claude/rules/workspace.md",
|
|
737
737
|
"destination": ".claude/rules/workspace.md",
|
|
738
738
|
"executable": false,
|
|
739
|
-
"digest": "
|
|
739
|
+
"digest": "7124c162e3f6bf56d57dd0dcdc1dca1cf0beab8d292a653d615230a3cd500f62"
|
|
740
740
|
},
|
|
741
741
|
{
|
|
742
742
|
"storage": "claude/rules/writing.md",
|
|
@@ -910,7 +910,7 @@
|
|
|
910
910
|
"storage": "configs/helpers.ts",
|
|
911
911
|
"destination": "configs/helpers.ts",
|
|
912
912
|
"executable": false,
|
|
913
|
-
"digest": "
|
|
913
|
+
"digest": "115090268cf9bef75a1fee37d10faa3944c765463e7cafe60f4ff29c953ada41"
|
|
914
914
|
},
|
|
915
915
|
{
|
|
916
916
|
"storage": "configs/policy.ts",
|
|
@@ -994,19 +994,19 @@
|
|
|
994
994
|
"storage": "guides/agent.md",
|
|
995
995
|
"destination": "guides/agent.md",
|
|
996
996
|
"executable": false,
|
|
997
|
-
"digest": "
|
|
997
|
+
"digest": "9985c8acc0c7debf976280b98735e7e071e49d9d8a248828e80223b20613e5f2"
|
|
998
998
|
},
|
|
999
999
|
{
|
|
1000
1000
|
"storage": "guides/brief.md",
|
|
1001
1001
|
"destination": "guides/brief.md",
|
|
1002
1002
|
"executable": false,
|
|
1003
|
-
"digest": "
|
|
1003
|
+
"digest": "86170e867caf9d33f06e6f8a734329ae38ef9ef1585606dc493f269be0658959"
|
|
1004
1004
|
},
|
|
1005
1005
|
{
|
|
1006
1006
|
"storage": "guides/browser.md",
|
|
1007
1007
|
"destination": "guides/browser.md",
|
|
1008
1008
|
"executable": false,
|
|
1009
|
-
"digest": "
|
|
1009
|
+
"digest": "cb79077f8e0df55e3eed41eb6636bcc732cb25b0e0e8be79f63a05c72445864c"
|
|
1010
1010
|
},
|
|
1011
1011
|
{
|
|
1012
1012
|
"storage": "guides/budget.md",
|
|
@@ -1036,7 +1036,7 @@
|
|
|
1036
1036
|
"storage": "guides/contract.md",
|
|
1037
1037
|
"destination": "guides/contract.md",
|
|
1038
1038
|
"executable": false,
|
|
1039
|
-
"digest": "
|
|
1039
|
+
"digest": "99a5bba7aea85328bde9be5e29b709d20349a23ed0cb471d97b3a37b6f851d5c"
|
|
1040
1040
|
},
|
|
1041
1041
|
{
|
|
1042
1042
|
"storage": "guides/csv.md",
|
|
@@ -1048,7 +1048,7 @@
|
|
|
1048
1048
|
"storage": "guides/database.md",
|
|
1049
1049
|
"destination": "guides/database.md",
|
|
1050
1050
|
"executable": false,
|
|
1051
|
-
"digest": "
|
|
1051
|
+
"digest": "f6e19ac07185cab14342702d4e128d60e1bab85d593311af1045a1ab7b8b498a"
|
|
1052
1052
|
},
|
|
1053
1053
|
{
|
|
1054
1054
|
"storage": "guides/emitter.md",
|
|
@@ -1078,7 +1078,7 @@
|
|
|
1078
1078
|
"storage": "guides/indexeddb.md",
|
|
1079
1079
|
"destination": "guides/indexeddb.md",
|
|
1080
1080
|
"executable": false,
|
|
1081
|
-
"digest": "
|
|
1081
|
+
"digest": "51d809fd2f555e3f671b2edb25e8c18b43464ebbf4b327e78b16787d3b3b6b94"
|
|
1082
1082
|
},
|
|
1083
1083
|
{
|
|
1084
1084
|
"storage": "guides/interpret.md",
|
|
@@ -1180,13 +1180,13 @@
|
|
|
1180
1180
|
"storage": "guides/reason.md",
|
|
1181
1181
|
"destination": "guides/reason.md",
|
|
1182
1182
|
"executable": false,
|
|
1183
|
-
"digest": "
|
|
1183
|
+
"digest": "768ee916f2931219be0e8d69610d4037530b7edbbf33f5a77aa3e4b4bcb816cb"
|
|
1184
1184
|
},
|
|
1185
1185
|
{
|
|
1186
1186
|
"storage": "guides/relation.md",
|
|
1187
1187
|
"destination": "guides/relation.md",
|
|
1188
1188
|
"executable": false,
|
|
1189
|
-
"digest": "
|
|
1189
|
+
"digest": "ddd837ae70670dbe48cf52c98e1f4b28bd7ce388eaa9a32c07b4f6d588aeeefc"
|
|
1190
1190
|
},
|
|
1191
1191
|
{
|
|
1192
1192
|
"storage": "guides/router.md",
|
|
@@ -1198,7 +1198,7 @@
|
|
|
1198
1198
|
"storage": "guides/scaffold.md",
|
|
1199
1199
|
"destination": "guides/scaffold.md",
|
|
1200
1200
|
"executable": false,
|
|
1201
|
-
"digest": "
|
|
1201
|
+
"digest": "b01fb8c25003a490b54617012fd83fc31b41cfa0d8c62ac69fd00c9d4178eecc"
|
|
1202
1202
|
},
|
|
1203
1203
|
{
|
|
1204
1204
|
"storage": "guides/sea.md",
|
|
@@ -1216,7 +1216,7 @@
|
|
|
1216
1216
|
"storage": "guides/sqlite.md",
|
|
1217
1217
|
"destination": "guides/sqlite.md",
|
|
1218
1218
|
"executable": false,
|
|
1219
|
-
"digest": "
|
|
1219
|
+
"digest": "7226a742a4a202d4696792477e139a4f924e0dce769f2ccb07a20e1033853b0a"
|
|
1220
1220
|
},
|
|
1221
1221
|
{
|
|
1222
1222
|
"storage": "guides/sse.md",
|
|
@@ -1252,7 +1252,7 @@
|
|
|
1252
1252
|
"storage": "guides/test.md",
|
|
1253
1253
|
"destination": "guides/test.md",
|
|
1254
1254
|
"executable": false,
|
|
1255
|
-
"digest": "
|
|
1255
|
+
"digest": "4d98bccf675ca5d0a35c91a6a4b0368c7931e271a276227f094a8a9051654c84"
|
|
1256
1256
|
},
|
|
1257
1257
|
{
|
|
1258
1258
|
"storage": "guides/timeout.md",
|
|
@@ -1264,13 +1264,13 @@
|
|
|
1264
1264
|
"storage": "guides/tool.md",
|
|
1265
1265
|
"destination": "guides/tool.md",
|
|
1266
1266
|
"executable": false,
|
|
1267
|
-
"digest": "
|
|
1267
|
+
"digest": "1a6baa0dbd4bf96d676a54820e168b04d605acf10f7cd494c66e645085f4f648"
|
|
1268
1268
|
},
|
|
1269
1269
|
{
|
|
1270
1270
|
"storage": "guides/toolbox.md",
|
|
1271
1271
|
"destination": "guides/toolbox.md",
|
|
1272
1272
|
"executable": false,
|
|
1273
|
-
"digest": "
|
|
1273
|
+
"digest": "220541231fd071268ab3d58c1a83ccbbd06f35fa3574007bce2239724f258e9d"
|
|
1274
1274
|
},
|
|
1275
1275
|
{
|
|
1276
1276
|
"storage": "guides/websocket.md",
|
|
@@ -1288,7 +1288,7 @@
|
|
|
1288
1288
|
"storage": "guides/workflow.md",
|
|
1289
1289
|
"destination": "guides/workflow.md",
|
|
1290
1290
|
"executable": false,
|
|
1291
|
-
"digest": "
|
|
1291
|
+
"digest": "325bb83cf2a30b3189703d26695f73ab5f3aebd074e1f8002af6a2d58b2af60f"
|
|
1292
1292
|
},
|
|
1293
1293
|
{
|
|
1294
1294
|
"storage": "guides/workspace.md",
|
|
@@ -1336,7 +1336,7 @@
|
|
|
1336
1336
|
"storage": "tests/config.test.ts",
|
|
1337
1337
|
"destination": "tests/config.test.ts",
|
|
1338
1338
|
"executable": false,
|
|
1339
|
-
"digest": "
|
|
1339
|
+
"digest": "6654cb7240a0d3b2ce29344699a248f81ef9d7634e04b16d63b7be3ecdf98487"
|
|
1340
1340
|
},
|
|
1341
1341
|
{
|
|
1342
1342
|
"storage": "tests/policy.test.ts",
|
|
@@ -1417,5 +1417,5 @@
|
|
|
1417
1417
|
"scripts"
|
|
1418
1418
|
],
|
|
1419
1419
|
"surface": [],
|
|
1420
|
-
"digest": "
|
|
1420
|
+
"digest": "81c6ca1d8161422d27bf430a38f65129cea8d35333a3f62bcfe167f6f8f66f4a"
|
|
1421
1421
|
}
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
cpSync,
|
|
12
12
|
existsSync,
|
|
13
13
|
globSync,
|
|
14
|
-
lstatSync,
|
|
15
14
|
mkdirSync,
|
|
16
15
|
openSync,
|
|
17
16
|
readdirSync,
|
|
@@ -126,6 +125,7 @@ import {
|
|
|
126
125
|
POLICY_VUE_DOMAIN_CASES,
|
|
127
126
|
} from './setupPolicy.js'
|
|
128
127
|
import { describe, expect, it } from 'vitest'
|
|
128
|
+
import { defaultExclude } from 'vitest/config'
|
|
129
129
|
|
|
130
130
|
describe('selected faces', () => {
|
|
131
131
|
it('collects each selected sheet proof from the effective project root and rejects a wrong root', async () => {
|
|
@@ -624,6 +624,7 @@ describe('selected faces', () => {
|
|
|
624
624
|
'srcVue',
|
|
625
625
|
'appVue',
|
|
626
626
|
'setupBrowser',
|
|
627
|
+
'benchBrowser',
|
|
627
628
|
'sheetProject',
|
|
628
629
|
'integration',
|
|
629
630
|
]) {
|
|
@@ -725,6 +726,69 @@ describe('root configuration', () => {
|
|
|
725
726
|
}
|
|
726
727
|
})
|
|
727
728
|
|
|
729
|
+
it('runs the browser benches in a Chromium bench project and keeps them out of the Node workbench', () => {
|
|
730
|
+
const factories = readConfigRecord(rootConfiguration)
|
|
731
|
+
const manifest = readConfigRecord(
|
|
732
|
+
JSON.parse(readFileSync(resolve(POLICY_ROOT, 'package.json'), 'utf8')),
|
|
733
|
+
)
|
|
734
|
+
// Every face that runs in Chromium: each sheet, the themes target without a base sheet, each
|
|
735
|
+
// browser environment, and each framework face.
|
|
736
|
+
const sheets = collectSheets(POLICY_ROOT)
|
|
737
|
+
const browserBenches = [
|
|
738
|
+
...sheets.map((face) => `src/${face}`),
|
|
739
|
+
...(!sheets.includes('styles') &&
|
|
740
|
+
existsSync(resolve(POLICY_ROOT, 'src/styles/themes/index.scss'))
|
|
741
|
+
? ['src/styles/themes']
|
|
742
|
+
: []),
|
|
743
|
+
...['src/browser', 'app/browser'].filter((path) => existsSync(resolve(POLICY_ROOT, path))),
|
|
744
|
+
...collectFrameworks(POLICY_ROOT),
|
|
745
|
+
]
|
|
746
|
+
.map((path) => `tests/${path}/**/*.bench.ts`)
|
|
747
|
+
.sort()
|
|
748
|
+
const browser = browserBenches.length > 0
|
|
749
|
+
const projects = configuration.test?.projects
|
|
750
|
+
if (!Array.isArray(projects)) throw new Error('The root configuration carries no projects')
|
|
751
|
+
expect(
|
|
752
|
+
projects.some((entry) => typeof entry === 'function' && entry.name === 'benchBrowser'),
|
|
753
|
+
).toBe(browser)
|
|
754
|
+
expect(typeof factories.benchBrowser === 'function').toBe(browser)
|
|
755
|
+
|
|
756
|
+
const probe = factories.probe
|
|
757
|
+
if (typeof probe !== 'function') throw new Error('The root configuration exports no probe')
|
|
758
|
+
const workbench = readConfigRecord(
|
|
759
|
+
readConfigRecord(readConfigRecord(Reflect.apply(probe, undefined, [])).test).benchmark,
|
|
760
|
+
)
|
|
761
|
+
expect(workbench.include).toStrictEqual(['tmp/probes/**/*.bench.ts', 'tests/**/*.bench.ts'])
|
|
762
|
+
// The exclusion keeps Vitest's default exclude, which a set `exclude` otherwise replaces, and
|
|
763
|
+
// a workspace with no browser-hosted face sets none.
|
|
764
|
+
expect(
|
|
765
|
+
Array.isArray(workbench.exclude) ? [...workbench.exclude].sort() : workbench.exclude,
|
|
766
|
+
).toStrictEqual(browser ? [...defaultExclude, ...browserBenches].sort() : undefined)
|
|
767
|
+
|
|
768
|
+
// The script names each bench project it runs; a reporter flag beside them stays the package's.
|
|
769
|
+
const script = readConfigScript(readConfigRecord(manifest.scripts), 'test:bench')
|
|
770
|
+
expect(script.startsWith('vitest bench ')).toBe(true)
|
|
771
|
+
expect(
|
|
772
|
+
[...script.matchAll(/--project(?:=|\s+)("[^"]*"|\S+)/gu)].map(([, name]) =>
|
|
773
|
+
(name ?? '').replace(/^"(.*)"$/u, '$1'),
|
|
774
|
+
),
|
|
775
|
+
).toStrictEqual(['probe (bench)', ...(browser ? ['bench:browser'] : [])])
|
|
776
|
+
|
|
777
|
+
const factory = factories.benchBrowser
|
|
778
|
+
if (typeof factory !== 'function') return
|
|
779
|
+
const test = readConfigRecord(readConfigRecord(Reflect.apply(factory, undefined, [])).test)
|
|
780
|
+
expect(test.name).toStrictEqual({ label: 'bench:browser', color: 'black' })
|
|
781
|
+
expect(test.include).toStrictEqual([])
|
|
782
|
+
expect(test.setupFiles).toStrictEqual(['./tests/setup.ts', './tests/setupBrowser.ts'])
|
|
783
|
+
expect(test.globalSetup).toBeUndefined()
|
|
784
|
+
const included = readConfigRecord(test.benchmark).include
|
|
785
|
+
expect(Array.isArray(included) ? [...included].sort() : included).toStrictEqual(browserBenches)
|
|
786
|
+
expect(readConfigRecord(test.browser).enabled).toBe(true)
|
|
787
|
+
expect(readConfigRecord(test.browser).instances).toStrictEqual([
|
|
788
|
+
{ browser: 'chromium', headless: true, name: 'bench:browser (chromium)' },
|
|
789
|
+
])
|
|
790
|
+
})
|
|
791
|
+
|
|
728
792
|
it('registers every workspace project with its fixed include and setup files', () => {
|
|
729
793
|
const browserProofs = ['tests/setupBrowser.test.ts', 'tests/setupStyles.test.ts']
|
|
730
794
|
const setupProofs = globSync('tests/setup*.test.ts', { cwd: POLICY_ROOT })
|
|
@@ -5492,8 +5556,12 @@ describe('configuration helpers', () => {
|
|
|
5492
5556
|
const expected = realpathSync.native(packageRoot)
|
|
5493
5557
|
const absent = resolve(packageRoot, 'src/absent.ts')
|
|
5494
5558
|
const beneathFile = resolve(source, 'child')
|
|
5495
|
-
expect(
|
|
5496
|
-
expect(
|
|
5559
|
+
expect(existsSync(absent)).toBe(false)
|
|
5560
|
+
expect(existsSync(beneathFile)).toBe(false)
|
|
5561
|
+
expect(configHelpers.isDirectoryPath(packageRoot)).toBe(true)
|
|
5562
|
+
expect(configHelpers.isDirectoryPath(source)).toBe(false)
|
|
5563
|
+
expect(configHelpers.isDirectoryPath(absent)).toBe(false)
|
|
5564
|
+
expect(configHelpers.isDirectoryPath(beneathFile)).toBe(false)
|
|
5497
5565
|
expect(configHelpers.packageRootOf('@sample/package', absent)).toBe(expected)
|
|
5498
5566
|
expect(configHelpers.packageRootForResolved(beneathFile)).toBe(expected)
|
|
5499
5567
|
} finally {
|