openvisio-agent 0.19.11 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -4
- package/USER_GUIDE.md +174 -0
- package/bin/cli.mjs +9 -0
- package/package.json +7 -3
- package/scenarios/index.mjs +16 -0
- package/scenarios/routing.scenarios.mjs +348 -0
- package/scenarios/runtime.scenarios.mjs +451 -0
- package/scenarios/transport.scenarios.mjs +407 -0
- package/scenarios/workspace.scenarios.mjs +324 -0
- package/scripts/certify.mjs +12 -8
- package/scripts/run-scenarios.mjs +32 -0
- package/src/agent-journal.mjs +138 -0
- package/src/assignment-routing.mjs +19 -7
- package/src/authorization-resume.mjs +1 -1
- package/src/channel-routing.mjs +15 -8
- package/src/codex-mcp-proxy.mjs +63 -18
- package/src/concurrency.mjs +5 -3
- package/src/cycle-queue.mjs +16 -3
- package/src/events.mjs +91 -39
- package/src/mastra-harness.mjs +128 -22
- package/src/mcp-http.mjs +72 -19
- package/src/memory.mjs +16 -3
- package/src/pr-push.mjs +21 -8
- package/src/runner-pool.mjs +14 -3
- package/src/studio-cli.mjs +60 -0
- package/src/studio-server.mjs +224 -0
- package/src/task-types.mjs +3 -2
- package/src/thread-context.mjs +62 -0
- package/src/watch.mjs +386 -114
- package/src/ws.mjs +20 -1
- package/studio/app.mjs +658 -0
- package/studio/guide.html +122 -0
- package/studio/index.html +61 -0
- package/studio/style.css +223 -0
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Connect your coding agent (**Claude Code, Codex, or OpenCode**) to an [OpenVisio](https://openvisio.app) team — in one command. No shell scripts, no `curl | bash`.
|
|
4
4
|
|
|
5
|
+
**New here?** Start with the [user guide](USER_GUIDE.md) for setup, everyday work, Agent Studio, and troubleshooting.
|
|
6
|
+
|
|
5
7
|
```bash
|
|
6
8
|
npx -y openvisio-agent@latest connect ovs_YOURCODE --host https://your-openvisio.app --name "Ada"
|
|
7
9
|
```
|
|
@@ -64,13 +66,13 @@ Backend/BYO watchers reconcile immediately whenever the process starts or the We
|
|
|
64
66
|
|
|
65
67
|
The backend MCP may be stateful or stateless. A successful initialize response without `Mcp-Session-Id` is accepted as stateless, so OpenCode agents do not stop with “MCP initialize returned no session id.” Each OpenCode lane keeps its MCP identity in a private per-agent config directory while the repository is supplied separately with `--dir`; stale workspace configuration therefore cannot swap one agent's credentials for another's. The generated remote configuration sends the agent headers directly, disables OAuth probing, and backend cycles never request relay-only inbox calls or MCP resource-discovery tools in place of team actions.
|
|
66
68
|
|
|
67
|
-
Codex BYO agents follow the repository's normative runtime specification in `docs/CODEX_BYO_AGENT_SPEC.md`: one WebSocket identity, independent
|
|
69
|
+
Codex BYO agents follow the repository's normative runtime specification in `docs/CODEX_BYO_AGENT_SPEC.md`: one WebSocket identity, independent reply/work queues, authoritative `get_ticket` verification for assignments, silent transient activity, persistent replay suppression, and runtime evidence gates before completion. Maintainers must run `npm run certify` before publishing.
|
|
68
70
|
|
|
69
|
-
|
|
71
|
+
Both `agent:mention` and organization `channel:message` events pass through the same source-recipient, ownership, and deduplication checks before any model starts. The watcher subscribes only to the organization verified from its own authenticated agent profile and restores that subscription after reconnect. Self-authored source messages are ignored; embedded old agent replies cannot hide a human follow-up. An explicit tag establishes durable ownership of that thread, so later human follow-ups remain addressed to the agent without another @mention. Messages redirected to another agent and unaddressed agent chatter stay silent, while a direct stand-down cancels queued/running work and releases ownership for that thread. Concrete roots verified as belonging to someone else have a bounded one-minute cache; missing authors and failed reads remain immediately retryable. The watcher does not broadcast working, thinking, or typing presence updates. Claude and OpenCode may add one concrete progress update after work begins, but must continue and post a distinct verified result or blocker afterward; Codex keeps cancellation-safe delivery watcher-owned and renders the verified final answer once.
|
|
70
72
|
|
|
71
73
|
Ticket references follow the board UI: BYO agents use the project-scoped slug, such as `OVS-57`, in messages, comments, PR descriptions, blockers, and results. Numeric `project_id` and `ticket_id` values remain internal MCP arguments and are never used as human-facing ticket names. If an older backend omits the slug, the agent uses the ticket title rather than inventing one.
|
|
72
74
|
|
|
73
|
-
Claude uses Haiku for routine coordination and Sonnet for repository work. Codex
|
|
75
|
+
Claude uses Haiku for routine coordination and Sonnet for repository work. Codex defaults to `gpt-5.6-sol`; configured code and chat models are preserved independently.
|
|
74
76
|
|
|
75
77
|
```bash
|
|
76
78
|
openvisio-agent watch --name ada # run in this terminal
|
|
@@ -103,7 +105,7 @@ Do not chase auto-changing watcher PIDs. `openvisio-agent stop --name <agent>` u
|
|
|
103
105
|
|
|
104
106
|
- **No opaque script.** You run a named, versioned npm package you can read here and on [npmjs.com](https://www.npmjs.com/package/openvisio-agent).
|
|
105
107
|
- **Single-use code.** The `ovs_` code is exchanged once for a key; a leaked code is already spent.
|
|
106
|
-
- **Least privilege.** Chat mode exposes only the `openvisio-team` MCP tools.
|
|
108
|
+
- **Least privilege.** Chat mode exposes only the `openvisio-team` MCP tools. Coding setup grants routine PR publishing inside its workspace through a no-argument `agent/*`-only helper. Repositories outside that workspace need an exact repository grant. The helper cannot merge or push protected branches.
|
|
107
109
|
- **Local secrets.** Your agent key lives in `~/.openvisio/` with `600` permissions — never printed, never committed.
|
|
108
110
|
|
|
109
111
|
## Requirements
|
|
@@ -125,3 +127,31 @@ rm -rf ~/.openvisio
|
|
|
125
127
|
```
|
|
126
128
|
|
|
127
129
|
MIT
|
|
130
|
+
|
|
131
|
+
## Agent studio
|
|
132
|
+
|
|
133
|
+
Agent Studio is available in `0.20.0` and later. Open the local viewer with:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npx -y openvisio-agent@latest studio
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
To run from source, see [the checkout instructions](USER_GUIDE.md#run-studio-from-this-checkout).
|
|
140
|
+
|
|
141
|
+
Select **User guide** in Studio for a local, printable guide to controls and statuses. Start with [the walkthrough](USER_GUIDE.md#open-agent-studio) if you have not used the viewer before.
|
|
142
|
+
|
|
143
|
+
Studio opens `http://127.0.0.1:4317` and follows the local agents' activity live. Select an agent or cycle to inspect its emitted plan, tool calls, command previews, file locations, progress messages, final result, and process status. The timeline distinguishes queued, running, completed, canceled, and failed work. Plans appear only when the runtime emits an explicit plan; internal reasoning is not recorded.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
openvisio-agent studio --demo # labeled sample activity; no model calls
|
|
147
|
+
openvisio-agent studio --no-open # print the URL without opening a browser
|
|
148
|
+
openvisio-agent studio --port 0 # choose an available local port
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Watchers running this version record bounded, credential-redacted activity under `~/.openvisio/observability`. Update and restart an older watcher once to start recording; its earlier plans and tool activity cannot be reconstructed. Closing Studio leaves the agents running. Studio uses local files and a loopback listener; it does not require a workspace or provider login. `--state-dir <dir>` selects an isolated watcher's state directory for local testing.
|
|
152
|
+
|
|
153
|
+
## Reliability scenarios
|
|
154
|
+
|
|
155
|
+
`npm test` includes the executable BYO scenario catalogue. `npm run test:scenarios -- --report /tmp/byo-results.json` writes every case, result, category, and duration. Cases cover routing, runtime lifecycle, transport, memory, authorization, and complete watcher sequences against simulated service/runtime boundaries. They do not invoke paid models or mutate a live workspace.
|
|
156
|
+
|
|
157
|
+
The watcher now stores pending threaded replies before posting and retries their authoritative delivery checks without rerunning the model. Distinct source message IDs remain distinct requests even when their text is identical. Stable agent IDs take precedence over display names at every assignment gate.
|
package/USER_GUIDE.md
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Your first OpenVisio agent
|
|
2
|
+
|
|
3
|
+
Connect your coding agent to your team, let it handle assigned work, and follow its progress in Agent Studio.
|
|
4
|
+
|
|
5
|
+
Already connected? Jump to [start your watcher](#start-your-watcher), [open Agent Studio](#open-agent-studio), or [solve a problem](#solve-a-problem).
|
|
6
|
+
|
|
7
|
+
## Before you begin
|
|
8
|
+
|
|
9
|
+
You need Node.js **22.13 or newer**, access to your OpenVisio team, and a supported coding agent: Claude Code, Codex, or OpenCode. Authenticate your chosen coding agent on this machine before asking it to work. Your provider’s usual usage limits and charges apply when the agent runs.
|
|
10
|
+
|
|
11
|
+
Check your installed versions in a terminal:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
node --version
|
|
15
|
+
openvisio-agent --version
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
If `openvisio-agent` is not installed, install the published package:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm install -g openvisio-agent@latest
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Studio availability:** Agent Studio requires `openvisio-agent` version `0.20.0` or newer. Update an older installation with the command above, or follow [run Studio from this checkout](#run-studio-from-this-checkout).
|
|
25
|
+
|
|
26
|
+
## Connect to your team
|
|
27
|
+
|
|
28
|
+
1. In OpenVisio, open **Agents** and choose the connection flow for your agent.
|
|
29
|
+
2. Select your coding runtime and copy the setup command OpenVisio provides. It contains the correct team address and connection details; use it as supplied.
|
|
30
|
+
3. Run the command in your terminal. Keep the agent name handy; the examples below use `ada`.
|
|
31
|
+
4. Read the command’s output. Some setups install a background watcher automatically. Others print a command for starting it yourself.
|
|
32
|
+
|
|
33
|
+
Treat the setup command and saved credentials as private. If a one-time setup code expires or was already used, obtain a new command from OpenVisio. Do not paste agent credentials into team messages or support reports.
|
|
34
|
+
|
|
35
|
+
Coding mode is enabled by default for backend connections. The agent can handle assigned repository work in its configured workspace, push an `agent/*` branch, and open a pull request. The default workspace is `~/openvisio-workspace`. Use the setup command’s `--workspace /path/to/workspace` option to choose another location, or `--chat-only` for chat and ticket work without local coding.
|
|
36
|
+
|
|
37
|
+
For advanced connection options, see the [command reference](README.md#what-it-does).
|
|
38
|
+
|
|
39
|
+
## Start your watcher
|
|
40
|
+
|
|
41
|
+
A **watcher** is the local program that listens for messages and assignments and runs your agent when there is work to do. Starting it can pick up existing assignments immediately.
|
|
42
|
+
|
|
43
|
+
If setup already started a background watcher, leave it running. Otherwise, replace `ada` with your configured agent name and run:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
openvisio-agent watch --name ada
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Keep this terminal open. For a service that starts at login on macOS or Linux, use:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
openvisio-agent watch --name ada --install
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Use one watcher per agent identity. To stop the named watcher and its background service:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
openvisio-agent stop --name ada
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Stopping a watcher interrupts its active work. When you are ready to resume, run the appropriate `watch` command again.
|
|
62
|
+
|
|
63
|
+
## Give the agent work
|
|
64
|
+
|
|
65
|
+
- **Ask a question:** mention the agent in an OpenVisio channel, such as “@Ada, what is the status of the login fix?”
|
|
66
|
+
- **Assign repository work:** assign an actionable ticket to the agent in a project with a linked codebase. Include the problem, expected behavior, and how the result should be checked.
|
|
67
|
+
- **Continue a conversation:** reply in the same thread. Keep follow-up instructions concrete, such as “The new test fails on an empty email address; please fix that case.”
|
|
68
|
+
|
|
69
|
+
Replies stay in their source thread. New completion messages use the agent’s dedicated channel. Check the ticket and any linked pull request for delivered results. A progress message describes ongoing work; wait for the final result or blocker.
|
|
70
|
+
|
|
71
|
+
## Open Agent Studio
|
|
72
|
+
|
|
73
|
+
In another terminal, using a Studio-capable installation:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
openvisio-agent studio
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The command opens a local browser page, usually at `http://127.0.0.1:4317`. Use the exact address printed in your terminal. Studio reads activity on this machine; it does not start agents or require a provider login of its own.
|
|
80
|
+
|
|
81
|
+
To explore sample activity without connecting an agent:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
openvisio-agent studio --demo
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The demo makes no model calls. Close it with `Ctrl+C` in its terminal and run Studio again without `--demo` to see your own agents.
|
|
88
|
+
|
|
89
|
+
### Find a result
|
|
90
|
+
|
|
91
|
+
1. Select an agent in the sidebar.
|
|
92
|
+
2. Select **Cycles**. A cycle is a group of actions for one unit of work.
|
|
93
|
+
3. Search for the ticket reference, such as `OVS-57`, and select the matching row.
|
|
94
|
+
4. Review its **Outcome**, tools, and **Final response**. Expand **Cycle history** for the recorded sequence.
|
|
95
|
+
|
|
96
|
+
Use **Activity** for individual events and **Processes** for watcher and runtime records. A completed tool is one completed step, not necessarily a completed task.
|
|
97
|
+
|
|
98
|
+
**Pause view** freezes the page while agents keep working. **Resume view** shows the latest available snapshot. Selecting a row turns **Follow latest** off; re-enable it to follow new activity.
|
|
99
|
+
|
|
100
|
+
Select **User guide** in Studio for the full guide to controls, status meanings, keyboard navigation, history, and troubleshooting. The guide is served locally at `/guide`, works without JavaScript, and supports browser printing.
|
|
101
|
+
|
|
102
|
+
### Understand what you see
|
|
103
|
+
|
|
104
|
+
| Label | Meaning and next step |
|
|
105
|
+
| --- | --- |
|
|
106
|
+
| Live | Your browser is connected to Studio. Each watcher has its own connection status. |
|
|
107
|
+
| Queued / Active | Work is waiting or running in the current watcher run. |
|
|
108
|
+
| Completed | The selected action or cycle reported completion. Review the final result and ticket. |
|
|
109
|
+
| Blocked / Failed / Timed out | Read the outcome and watcher log. Resolve the stated cause before requesting more work. |
|
|
110
|
+
| Offline | The watcher stopped reporting or restarted. An unfinished cycle has no known final outcome in the available history. |
|
|
111
|
+
| No explicit plan recorded | No plan was provided in the available history. This alone is not a failure. |
|
|
112
|
+
| PID not reported | The provider did not supply its process identifier. Studio cannot count it as a known operating-system process. |
|
|
113
|
+
| Simulated | Demo activity, with no real work running. |
|
|
114
|
+
|
|
115
|
+
## Update an older watcher
|
|
116
|
+
|
|
117
|
+
Installing a new package does not update a watcher that is already running. Update the package and restart each named watcher when you are ready to interrupt its work:
|
|
118
|
+
|
|
119
|
+
```sh
|
|
120
|
+
npm install -g openvisio-agent@latest
|
|
121
|
+
openvisio-agent stop --name ada
|
|
122
|
+
openvisio-agent watch --name ada --install
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Use `watch --name ada` without `--install` if you prefer a foreground terminal or your operating system does not support the background service.
|
|
126
|
+
|
|
127
|
+
Only new activity from an updated watcher appears in Studio. Earlier plans, tool calls, and results cannot be reconstructed from an older watcher.
|
|
128
|
+
|
|
129
|
+
## Solve a problem
|
|
130
|
+
|
|
131
|
+
| Problem | What to do |
|
|
132
|
+
| --- | --- |
|
|
133
|
+
| `studio` is not recognized | Check the installed version. Use a Studio-capable release or the checkout instructions below. |
|
|
134
|
+
| Browser did not open | Run `openvisio-agent studio --no-open` and open the URL it prints. |
|
|
135
|
+
| Port is already in use | Run `openvisio-agent studio --port 0` to choose an available port. |
|
|
136
|
+
| Studio shows no agents | Confirm the watcher runs under the same local account. Studio reads `~/.openvisio` by default. |
|
|
137
|
+
| “Restart watcher to connect” | Update and restart that watcher using the steps above. |
|
|
138
|
+
| No matching activity | Clear search, kind, and status filters, then select All agents. |
|
|
139
|
+
| Reconnecting | Keep Studio running in its terminal. The browser automatically reconnects when the server returns. |
|
|
140
|
+
| Agent is blocked | Read its outcome and ticket. Studio is a viewer; approvals and fixes happen in the relevant setup, repository, or team workflow. |
|
|
141
|
+
| Result is missing | Check the original ticket and channel. Studio shows recent, limited history and can omit older or oversized records. |
|
|
142
|
+
|
|
143
|
+
For a macOS background service, the watcher log is at `~/.openvisio/<agent>.log`. For Linux, use `journalctl --user -u openvisio-<agent>`. Foreground watchers print to their terminal.
|
|
144
|
+
|
|
145
|
+
When reporting a problem, include the package version, operating system, relevant ticket reference, what you expected, and the redacted error. Review logs and screenshots for private project details before sharing them.
|
|
146
|
+
|
|
147
|
+
## Read comfortably
|
|
148
|
+
|
|
149
|
+
Use `Tab` and `Shift+Tab` to move through controls, `Enter` to activate buttons or links, and `Space` to toggle checkboxes. Use the skip link to reach the activity area and your screen reader’s headings or landmarks to find selected details. Pause the view when reading long output. Browser zoom enlarges the interface, and details move below the list on narrow screens.
|
|
150
|
+
|
|
151
|
+
## Local history and privacy
|
|
152
|
+
|
|
153
|
+
Studio reads bounded journals in `~/.openvisio/observability`. It serves up to 500 recent events, subject to file and byte limits. Journals rotate, long text is shortened, and bursts may drop records. Use the team’s ticket and channel history for delivered results.
|
|
154
|
+
|
|
155
|
+
The journal excludes private reasoning and raw tool payloads and redacts known credentials and recognizable secret formats. Public progress and file paths may still contain private project information. Keep the local state directory private and review exports before sharing them.
|
|
156
|
+
|
|
157
|
+
Studio listens only on this machine. Closing it leaves agents running. Running watchers continue to contact their team and coding provider as configured.
|
|
158
|
+
|
|
159
|
+
## Run Studio from this checkout
|
|
160
|
+
|
|
161
|
+
From the repository root, install this package’s declared dependencies, then open the demo:
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
npm ci --prefix packages/openvisio-agent
|
|
165
|
+
node packages/openvisio-agent/bin/cli.mjs studio --demo
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
To view local activity, omit `--demo`. To record activity with this checkout’s watcher, stop an older watcher for that identity first, then run:
|
|
169
|
+
|
|
170
|
+
```sh
|
|
171
|
+
node packages/openvisio-agent/bin/cli.mjs watch --name ada
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Keep the watcher and Studio in separate terminals. The `studio --state-dir /path/to/state` option changes the directory the viewer reads; it does not reconfigure a watcher or move its files.
|
package/bin/cli.mjs
CHANGED
|
@@ -28,6 +28,7 @@ Usage:
|
|
|
28
28
|
openvisio-agent connect --backend <url> --key <api-key> --id <identifier> [--name "<agent>"] [--ws <wss-url>] [--mcp-url <url>] [--agent claude|codex|opencode]
|
|
29
29
|
openvisio-agent watch --name <agent> [--install] [--workspace <dir>] [--chat-only] [--model <m>] [--chat-model <m>] [--debug]
|
|
30
30
|
openvisio-agent stop --name <agent>
|
|
31
|
+
openvisio-agent studio [--port <number>] [--no-open] [--demo]
|
|
31
32
|
openvisio-agent authorize-pr-push [--repo <dir>]
|
|
32
33
|
openvisio-agent push-pr-branch
|
|
33
34
|
openvisio-agent revoke-pr-push [--repo <dir>]
|
|
@@ -81,6 +82,13 @@ stop
|
|
|
81
82
|
remaining watcher with that exact --name and clears its stale lock. Use this
|
|
82
83
|
instead of killing changing PIDs: openvisio-agent stop --name Alex
|
|
83
84
|
|
|
85
|
+
studio
|
|
86
|
+
Opens a local live viewer for agent cycles, plans, tool calls, coding progress,
|
|
87
|
+
and process status. Uses http://127.0.0.1:4317 by default; --port 0 selects an
|
|
88
|
+
available port. --no-open prints the URL without opening a browser. --demo
|
|
89
|
+
shows simulated activity without starting agents. --state-dir <dir> selects
|
|
90
|
+
an isolated watcher state directory. Closing the viewer leaves agents running.
|
|
91
|
+
|
|
84
92
|
Use --channel <id> during connect to select the dedicated channel for new threads.
|
|
85
93
|
|
|
86
94
|
PR publishing is enabled during connect for the coding workspace, including
|
|
@@ -310,6 +318,7 @@ async function main() {
|
|
|
310
318
|
const rest = parseFlags(argv.slice(1))
|
|
311
319
|
if (cmd === 'connect') return runConnect(rest)
|
|
312
320
|
if (cmd === 'watch') return (await import('../src/watch.mjs')).runWatch(rest)
|
|
321
|
+
if (cmd === 'studio') return (await import('../src/studio-cli.mjs')).runStudio(rest)
|
|
313
322
|
if (cmd === 'stop') {
|
|
314
323
|
const name = String(rest.flags.name || rest.positional[0] || '')
|
|
315
324
|
if (!name) fail('Missing agent name.\n Usage: openvisio-agent stop --name <agent>')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openvisio-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Connect Claude Code, Codex, or OpenCode to an OpenVisio team \u2014 MCP tools + optional autonomy \u2014 in one command.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,13 +8,17 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "node --test",
|
|
11
|
-
"certify": "node scripts/certify.mjs"
|
|
11
|
+
"certify": "node scripts/certify.mjs",
|
|
12
|
+
"test:scenarios": "node scripts/run-scenarios.mjs"
|
|
12
13
|
},
|
|
13
14
|
"files": [
|
|
14
15
|
"bin",
|
|
15
16
|
"scripts",
|
|
17
|
+
"scenarios",
|
|
18
|
+
"studio",
|
|
16
19
|
"src",
|
|
17
|
-
"README.md"
|
|
20
|
+
"README.md",
|
|
21
|
+
"USER_GUIDE.md"
|
|
18
22
|
],
|
|
19
23
|
"engines": {
|
|
20
24
|
"node": ">=22.13"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { scenarios as routing } from './routing.scenarios.mjs'
|
|
2
|
+
import { scenarios as runtime } from './runtime.scenarios.mjs'
|
|
3
|
+
import { scenarios as transport } from './transport.scenarios.mjs'
|
|
4
|
+
import { scenarios as workspace } from './workspace.scenarios.mjs'
|
|
5
|
+
|
|
6
|
+
export const scenarios = [...routing, ...runtime, ...transport, ...workspace]
|
|
7
|
+
export function validateCatalogue() {
|
|
8
|
+
const ids = new Set()
|
|
9
|
+
for (const entry of scenarios) {
|
|
10
|
+
if (!entry.id || ids.has(entry.id) || !entry.category || !entry.description || typeof entry.run !== 'function') {
|
|
11
|
+
throw new Error(`Invalid or duplicate scenario: ${entry.id}`)
|
|
12
|
+
}
|
|
13
|
+
ids.add(entry.id)
|
|
14
|
+
}
|
|
15
|
+
if (ids.size <= 1000) throw new Error(`Expected over 1000 scenarios; found ${ids.size}`)
|
|
16
|
+
}
|