@iniesta8888/agent-live 0.3.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/CODE_OF_CONDUCT.md +7 -0
- package/CONTRIBUTING.md +56 -0
- package/LICENSE +21 -0
- package/README.md +92 -0
- package/SECURITY.md +13 -0
- package/dist/adapter-sdk/index.d.ts +45 -0
- package/dist/adapter-sdk/index.d.ts.map +1 -0
- package/dist/adapter-sdk/index.js +106 -0
- package/dist/adapter-sdk/index.js.map +1 -0
- package/dist/content/compiler.d.ts +31 -0
- package/dist/content/compiler.d.ts.map +1 -0
- package/dist/content/compiler.js +218 -0
- package/dist/content/compiler.js.map +1 -0
- package/dist/content/graph-validator.d.ts +56 -0
- package/dist/content/graph-validator.d.ts.map +1 -0
- package/dist/content/graph-validator.js +226 -0
- package/dist/content/graph-validator.js.map +1 -0
- package/dist/content/library.d.ts +4 -0
- package/dist/content/library.d.ts.map +1 -0
- package/dist/content/library.js +45 -0
- package/dist/content/library.js.map +1 -0
- package/dist/content/registry.d.ts +34 -0
- package/dist/content/registry.d.ts.map +1 -0
- package/dist/content/registry.js +130 -0
- package/dist/content/registry.js.map +1 -0
- package/dist/content/runtime-content.d.ts +63 -0
- package/dist/content/runtime-content.d.ts.map +1 -0
- package/dist/content/runtime-content.js +78 -0
- package/dist/content/runtime-content.js.map +1 -0
- package/dist/content/schema.d.ts +142 -0
- package/dist/content/schema.d.ts.map +1 -0
- package/dist/content/schema.js +280 -0
- package/dist/content/schema.js.map +1 -0
- package/dist/content/validator.d.ts +35 -0
- package/dist/content/validator.d.ts.map +1 -0
- package/dist/content/validator.js +205 -0
- package/dist/content/validator.js.map +1 -0
- package/dist/core/agents.d.ts +56 -0
- package/dist/core/agents.d.ts.map +1 -0
- package/dist/core/agents.js +148 -0
- package/dist/core/agents.js.map +1 -0
- package/dist/core/limits.d.ts +15 -0
- package/dist/core/limits.d.ts.map +1 -0
- package/dist/core/limits.js +16 -0
- package/dist/core/limits.js.map +1 -0
- package/dist/core/mapping.d.ts +17 -0
- package/dist/core/mapping.d.ts.map +1 -0
- package/dist/core/mapping.js +94 -0
- package/dist/core/mapping.js.map +1 -0
- package/dist/core/protocol.d.ts +105 -0
- package/dist/core/protocol.d.ts.map +1 -0
- package/dist/core/protocol.js +6 -0
- package/dist/core/protocol.js.map +1 -0
- package/dist/core/state.d.ts +49 -0
- package/dist/core/state.d.ts.map +1 -0
- package/dist/core/state.js +216 -0
- package/dist/core/state.js.map +1 -0
- package/dist/creator/commands.d.ts +19 -0
- package/dist/creator/commands.d.ts.map +1 -0
- package/dist/creator/commands.js +44 -0
- package/dist/creator/commands.js.map +1 -0
- package/dist/creator/mode.d.ts +10 -0
- package/dist/creator/mode.d.ts.map +1 -0
- package/dist/creator/mode.js +23 -0
- package/dist/creator/mode.js.map +1 -0
- package/dist/creator/service.d.ts +199 -0
- package/dist/creator/service.d.ts.map +1 -0
- package/dist/creator/service.js +159 -0
- package/dist/creator/service.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/runtime/agent-live-runtime.d.ts +17 -0
- package/dist/runtime/agent-live-runtime.d.ts.map +1 -0
- package/dist/runtime/agent-live-runtime.js +50 -0
- package/dist/runtime/agent-live-runtime.js.map +1 -0
- package/dist/runtime/content-service.d.ts +75 -0
- package/dist/runtime/content-service.d.ts.map +1 -0
- package/dist/runtime/content-service.js +60 -0
- package/dist/runtime/content-service.js.map +1 -0
- package/dist/runtime/resource-guard.d.ts +17 -0
- package/dist/runtime/resource-guard.d.ts.map +1 -0
- package/dist/runtime/resource-guard.js +54 -0
- package/dist/runtime/resource-guard.js.map +1 -0
- package/dist/runtime/server.d.ts +39 -0
- package/dist/runtime/server.d.ts.map +1 -0
- package/dist/runtime/server.js +286 -0
- package/dist/runtime/server.js.map +1 -0
- package/dist/web/app.d.ts +1 -0
- package/dist/web/app.js +1317 -0
- package/dist/web/index.html +45 -0
- package/dist/web/office.js +350 -0
- package/dist/web/sprites.js +185 -0
- package/dist/web/style.css +288 -0
- package/dist/web/v2/bootstrap.js +276 -0
- package/dist/web/v2/content/README.md +17 -0
- package/dist/web/v2/content/agent-skins/studio-team.json +33 -0
- package/dist/web/v2/content/agent-skins/tiny-developers.json +33 -0
- package/dist/web/v2/content/atmospheres/default.json +13 -0
- package/dist/web/v2/content/atmospheres/rainy-night.json +37 -0
- package/dist/web/v2/content/catalog.json +14 -0
- package/dist/web/v2/content/component-library/activity-implementations.json +873 -0
- package/dist/web/v2/content/component-library/activity-recipes.json +25 -0
- package/dist/web/v2/content/component-library/agent-profile-templates.json +18 -0
- package/dist/web/v2/content/component-library/catalog.json +38 -0
- package/dist/web/v2/content/component-library/npc-templates.json +42 -0
- package/dist/web/v2/content/component-library/props.json +41 -0
- package/dist/web/v2/content/environments/local-office.json +31 -0
- package/dist/web/v2/content/environments/rainy-night.json +28 -0
- package/dist/web/v2/content/environments/static-office.json +27 -0
- package/dist/web/v2/content/layouts/boardroom-office.json +122 -0
- package/dist/web/v2/content/layouts/demo-office.json +88 -0
- package/dist/web/v2/content/layouts/lively-office.json +96 -0
- package/dist/web/v2/content/layouts/old-school-office.json +154 -0
- package/dist/web/v2/content/layouts/tech-open-office.json +132 -0
- package/dist/web/v2/content/life-activities/boardroom-routines.json +67 -0
- package/dist/web/v2/content/life-activities/none.json +10 -0
- package/dist/web/v2/content/life-activities/office-basics.json +39 -0
- package/dist/web/v2/content/life-activities/old-school-routines.json +74 -0
- package/dist/web/v2/content/life-activities/tech-office-routines.json +148 -0
- package/dist/web/v2/content/npcs/boardroom-staff.json +54 -0
- package/dist/web/v2/content/npcs/none.json +10 -0
- package/dist/web/v2/content/npcs/office-staff.json +25 -0
- package/dist/web/v2/content/npcs/old-school-staff.json +39 -0
- package/dist/web/v2/content/npcs/tech-office-staff.json +40 -0
- package/dist/web/v2/content/official-offices/boardroom-office.json +25 -0
- package/dist/web/v2/content/official-offices/old-school-office.json +25 -0
- package/dist/web/v2/content/official-offices/tech-open-office.json +25 -0
- package/dist/web/v2/content/presets/boardroom-office.json +21 -0
- package/dist/web/v2/content/presets/cozy-studio.json +19 -0
- package/dist/web/v2/content/presets/demo-office.json +19 -0
- package/dist/web/v2/content/presets/lively-office.json +19 -0
- package/dist/web/v2/content/presets/night-shift.json +19 -0
- package/dist/web/v2/content/presets/old-school-office.json +20 -0
- package/dist/web/v2/content/presets/refined-demo.json +20 -0
- package/dist/web/v2/content/presets/tech-open-office.json +21 -0
- package/dist/web/v2/content/props/default-office.json +23 -0
- package/dist/web/v2/content/props/extended-office.json +39 -0
- package/dist/web/v2/content/props/tech-office.json +28 -0
- package/dist/web/v2/content/styles/pixel-classic.json +160 -0
- package/dist/web/v2/content/styles/warm-studio.json +150 -0
- package/dist/web/v2/environment-runtime.d.ts +1 -0
- package/dist/web/v2/environment-runtime.js +138 -0
- package/dist/web/v2/graph-validator.d.ts +55 -0
- package/dist/web/v2/graph-validator.js +225 -0
- package/dist/web/v2/i18n.js +54 -0
- package/dist/web/v2/locales/en.json +209 -0
- package/dist/web/v2/locales/zh-CN.json +52 -0
- package/dist/web/v2/office-engine.d.ts +1 -0
- package/dist/web/v2/office-engine.js +145 -0
- package/dist/web/v2/office-renderer.d.ts +1 -0
- package/dist/web/v2/office-renderer.js +843 -0
- package/dist/web/v2/parity.html +10 -0
- package/dist/web/v2/parity.js +82 -0
- package/dist/web/v2/sprite-renderer.d.ts +1 -0
- package/dist/web/v2/sprite-renderer.js +242 -0
- package/dist/web/v2/static-content.js +48 -0
- package/dist/web/v2/style.css +140 -0
- package/dist/web/v2.html +68 -0
- package/docs/ADAPTER-DEVELOPMENT.md +328 -0
- package/docs/ADAPTER-SDK.md +109 -0
- package/docs/ARCHITECTURE.md +223 -0
- package/docs/COMPONENT-LIBRARY.md +212 -0
- package/docs/CUSTOMIZATION.md +163 -0
- package/docs/DEVELOPER.md +186 -0
- package/docs/DSH-ADAPTER-DESIGN.md +173 -0
- package/docs/OFFICE-THEMES.md +516 -0
- package/docs/PRESET-CONFIG.md +460 -0
- package/docs/RELEASE-CHECK.md +23 -0
- package/docs/TECHNICAL.md +515 -0
- package/docs/USING-CODEX.md +24 -0
- package/docs/USING-DSH.md +44 -0
- package/docs/USING-PI.md +50 -0
- package/docs/VISION.md +146 -0
- package/examples/adapter/local-office.mjs +52 -0
- package/package.json +89 -0
- package/skills/agent-live-adapter-builder/SKILL.md +30 -0
- package/skills/agent-live-adapter-builder/agents/openai.yaml +4 -0
- package/skills/agent-live-adapter-builder/references/investigation.md +9 -0
- package/skills/agent-live-adapter-builder/references/review.md +7 -0
- package/skills/agent-live-adapter-builder/scripts/create-adapter.mjs +26 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
We want Agent Live to be a welcoming project for product thinkers, artists and engineers of different experience levels.
|
|
4
|
+
|
|
5
|
+
Be respectful, constructive and specific. Critique ideas and code rather than people; respect privacy and attribution; avoid harassment, discrimination, threats and unwanted personal attention. Maintainers may edit or remove harmful contributions and may temporarily or permanently restrict participation when necessary to protect the community.
|
|
6
|
+
|
|
7
|
+
Report conduct concerns privately to the repository owner through the contact method on their GitHub profile. Reports will be handled as confidentially as practical.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Contributing to Agent Live
|
|
2
|
+
|
|
3
|
+
Thanks for helping coding agents feel more legible and alive. Small, focused changes are easiest to review.
|
|
4
|
+
|
|
5
|
+
## Before opening a change
|
|
6
|
+
|
|
7
|
+
- Use Node.js 22 or newer and install with `npm ci`.
|
|
8
|
+
- Run the minimum local validation for every change:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm test
|
|
12
|
+
npm run typecheck
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- Run `npm run build` when changing exported TypeScript or generated browser code.
|
|
16
|
+
- After changing public SDK exports, run `npm run build && npm run validate:sdk-example`. This exercises a public-API consumer with a real temporary HTTP server, selection, Creator, persistence and cleanup, without a coding-agent login or model call.
|
|
17
|
+
- Run the complete release-equivalent validation before a pull request when the DSH dependencies are available:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm run check:ci
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This additionally installs the isolated DSH dependencies, builds both packages, verifies committed generated output and performs package dry-runs. It downloads more dependencies than the minimum validation; contributors who cannot run it should state that clearly in the pull request.
|
|
24
|
+
- Do not commit credentials, local session logs, generated caches, or user Custom Offices.
|
|
25
|
+
|
|
26
|
+
## Tests and generated files
|
|
27
|
+
|
|
28
|
+
The core repository uses focused `plugins/agent-live/scripts/validate-*.ts` contract checks. When adding one, give it a named `validate:*` script in `package.json` and add it to the root `check` chain. Independent Adapter packages generated by the Adapter Builder use Node's built-in `node --test`; follow the package you are changing rather than converting between the two styles.
|
|
29
|
+
|
|
30
|
+
Some generated artifacts are intentionally committed because browsers and DSH consume built JavaScript:
|
|
31
|
+
|
|
32
|
+
- Changes to `src/content/graph-validator.ts` require `npm run build:validator`; commit the resulting `web/v2/graph-validator.js` and `.d.ts` files.
|
|
33
|
+
- Changes affecting the DSH View require `npm run build --prefix plugins/agent-live/dsh`; commit the resulting `plugins/agent-live/dsh/lib` changes.
|
|
34
|
+
- `npm run validate:web-validator` and `npm run validate:generated` reject stale committed output. The full `npm run check:ci` runs both guards.
|
|
35
|
+
|
|
36
|
+
## Adapter contributions
|
|
37
|
+
|
|
38
|
+
Read [the Adapter SDK manual](docs/ADAPTER-SDK.md) and [the investigation guide](docs/ADAPTER-DEVELOPMENT.md). A new Adapter must cite the host's official public API, include an event mapping and automated tests, document unsupported capabilities, and record what still requires a real-host test.
|
|
39
|
+
|
|
40
|
+
You can also give the bundled [`agent-live-adapter-builder`](skills/agent-live-adapter-builder/SKILL.md) Skill to your coding agent. Its scaffold creates an independent package and does not modify Agent Live internals.
|
|
41
|
+
|
|
42
|
+
## Product and content contributions
|
|
43
|
+
|
|
44
|
+
Keep host facts, office behavior, and rendering separate. Adapters translate official host data into `OfficeEvent`; the Engine owns office state and local resources; content defines layouts, props, NPCs and activities. Do not add host-specific fields to the public event protocol.
|
|
45
|
+
|
|
46
|
+
Visual assets and copied code must have a compatible redistribution license. Describe any third-party source and license in the pull request.
|
|
47
|
+
|
|
48
|
+
## Pull request checklist
|
|
49
|
+
|
|
50
|
+
- Explain the user-visible behavior and scope.
|
|
51
|
+
- Add or update the smallest relevant automated test.
|
|
52
|
+
- State which real hosts and versions were tested.
|
|
53
|
+
- Note compatibility, privacy, resource, and migration implications.
|
|
54
|
+
- Keep unrelated formatting or generated-file churn out of the change.
|
|
55
|
+
|
|
56
|
+
By participating, you agree to follow the [Code of Conduct](CODE_OF_CONDUCT.md). Security issues should follow [SECURITY.md](SECURITY.md), not public issue reports.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ssssnail
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Agent Live
|
|
2
|
+
|
|
3
|
+
[](https://github.com/ssssnail/agent-live/actions/workflows/ci.yml)
|
|
4
|
+
|
|
5
|
+
Watch your coding agents work in a live pixel office.
|
|
6
|
+
|
|
7
|
+
Agent Live is a local-first visualization engine. Host adapters translate supported coding-agent events into a shared `OfficeEvent` protocol; the common engine turns those events into movement, work, collaboration and office life. No cloud backend is required.
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
Coding Agent → Adapter → OfficeEvent → Agent Live Engine → Viewer
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Official adapters currently cover Pi, Codex and DeepSeek Harness. The product ships three offices: `tech`, `meetingroom` and `oldschool`.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
### Pi
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pi install npm:@iniesta8888/agent-live-pi-adapter
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Restart Pi and run `/agent-live`. Use `/agent-live custom` to enter Creator Mode and `/agent-live exit` to return to normal work. See [Using Agent Live with Pi](docs/USING-PI.md).
|
|
24
|
+
|
|
25
|
+
### Codex
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
codex plugin marketplace add ssssnail/agent-live --ref main
|
|
29
|
+
codex plugin add agent-live@agent-live-marketplace
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Invoke the Agent Live Skill to open its local Codex client. Codex customization is an explicit single invocation. See [Using Agent Live with Codex](docs/USING-CODEX.md).
|
|
33
|
+
|
|
34
|
+
### DeepSeek Harness
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
dsh plugin --profile web add @iniesta8888/agent-live-dsh-adapter
|
|
38
|
+
dsh plugin --profile web install
|
|
39
|
+
dsh web
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Open a session and switch to the `Agent Live` view. See [Using Agent Live with DSH](docs/USING-DSH.md).
|
|
43
|
+
|
|
44
|
+
## Develop
|
|
45
|
+
|
|
46
|
+
Requires Node.js 22 or newer.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm ci
|
|
50
|
+
npm run check
|
|
51
|
+
npm run preview
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The preview command prints the configurable V2 demo URL and the frozen original visual baseline. Before release, run:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm run check:ci
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Architecture
|
|
61
|
+
|
|
62
|
+
- `plugins/agent-live/src/core` — shared protocol, state and work semantics.
|
|
63
|
+
- `plugins/agent-live/src/runtime` — local Viewer service and owned-resource cleanup.
|
|
64
|
+
- `plugins/agent-live/src/content` — Office Spec compiler, registry and validation.
|
|
65
|
+
- `plugins/agent-live/src/creator` — constrained natural-language customization tools.
|
|
66
|
+
- `plugins/agent-live/src/adapters/codex` — Codex App Server integration source.
|
|
67
|
+
- `plugins/agent-live/web/v2` — office engine, renderers and packaged content.
|
|
68
|
+
- `plugins/agent-live/dsh` — native DSH `conversation.view` source and npm package.
|
|
69
|
+
- `packages/pi` — isolated Pi npm distribution.
|
|
70
|
+
- `dist/codex-plugin` — generated self-contained Codex Marketplace distribution.
|
|
71
|
+
- `skills/agent-live-adapter-builder` — guided third-party adapter scaffolding.
|
|
72
|
+
|
|
73
|
+
Start with [Architecture](docs/ARCHITECTURE.md), [Developer Guide](docs/DEVELOPER.md), [Adapter SDK](docs/ADAPTER-SDK.md), or [Customization Boundaries](docs/CUSTOMIZATION.md).
|
|
74
|
+
|
|
75
|
+
## Packages
|
|
76
|
+
|
|
77
|
+
- `@iniesta8888/agent-live` — host-neutral engine, viewer, Creator and Adapter SDK.
|
|
78
|
+
- `@iniesta8888/agent-live-pi-adapter` — self-contained Pi extension.
|
|
79
|
+
- `@iniesta8888/agent-live-dsh-adapter` — native DSH View plugin.
|
|
80
|
+
- Codex installs from this repository's Marketplace and is not published to npm.
|
|
81
|
+
|
|
82
|
+
## Local data and safety
|
|
83
|
+
|
|
84
|
+
Agent Live binds its standalone service to `127.0.0.1`. Custom Offices and lightweight replay data stay on the user's machine. Adapters own their host-specific integration; Agent Live always cleans up the local services and temporary resources it creates itself.
|
|
85
|
+
|
|
86
|
+
## Inspiration
|
|
87
|
+
|
|
88
|
+
Agent Live was inspired by [ChatDev](https://github.com/OpenBMB/ChatDev). It began as a product manager's small vibe-coding experiment and grew into an exploration of how AI work, collaboration and organizations might become visible and understandable.
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
[MIT](LICENSE)
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a vulnerability
|
|
4
|
+
|
|
5
|
+
Please do not disclose vulnerabilities in a public issue. Use GitHub's private vulnerability reporting for this repository when available. If it is unavailable, contact the repository owner privately through the contact method on their GitHub profile.
|
|
6
|
+
|
|
7
|
+
Include affected versions, reproduction steps, impact, and any suggested mitigation. Do not include real user prompts, source code, credentials, session logs, or local access tokens unless they are strictly necessary and have been redacted.
|
|
8
|
+
|
|
9
|
+
## Security boundaries
|
|
10
|
+
|
|
11
|
+
Agent Live is local-first. Its standalone viewer binds to `127.0.0.1`; sensitive state, event, and control endpoints require a local access token and reject non-local `Host` or `Origin` values. URL tokens are local access credentials, so do not share authenticated viewer URLs. Adapters must use documented host extension APIs and must not inspect private host storage by default.
|
|
12
|
+
|
|
13
|
+
Agent Live cleans up resources it creates. An Adapter must release its own subscriptions, timers and child processes, and must never terminate a host process it does not own.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { OfficeDelta } from "../core/protocol.ts";
|
|
2
|
+
import type { OfficeState } from "../core/state.ts";
|
|
3
|
+
export type MaybePromise<T> = T | Promise<T>;
|
|
4
|
+
export type AdapterCleanup = () => MaybePromise<void>;
|
|
5
|
+
export interface AdapterCapabilities {
|
|
6
|
+
observe: boolean;
|
|
7
|
+
prompt: boolean;
|
|
8
|
+
interrupt: boolean;
|
|
9
|
+
approve: boolean;
|
|
10
|
+
modelSelect: boolean;
|
|
11
|
+
embeddedView: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface AdapterControls {
|
|
14
|
+
prompt?(text: string): Promise<unknown>;
|
|
15
|
+
interrupt?(): Promise<unknown>;
|
|
16
|
+
approve?(id: string, allowed: boolean): MaybePromise<unknown>;
|
|
17
|
+
selectModel?(model: string): MaybePromise<unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface OfficeEventPublisher {
|
|
20
|
+
publish(event: OfficeDelta): void;
|
|
21
|
+
}
|
|
22
|
+
export interface AdapterContext<Host> {
|
|
23
|
+
readonly host: Host;
|
|
24
|
+
readonly office: OfficeEventPublisher;
|
|
25
|
+
}
|
|
26
|
+
export interface AdapterDefinition<Host = unknown> {
|
|
27
|
+
readonly id: string;
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly connect: (context: AdapterContext<Host>) => MaybePromise<void | AdapterCleanup | {
|
|
30
|
+
close(): MaybePromise<void>;
|
|
31
|
+
}>;
|
|
32
|
+
readonly controls?: AdapterControls;
|
|
33
|
+
readonly mountView?: (host: Host) => MaybePromise<void | AdapterCleanup>;
|
|
34
|
+
}
|
|
35
|
+
export interface ConnectedAdapter {
|
|
36
|
+
readonly id: string;
|
|
37
|
+
readonly name: string;
|
|
38
|
+
readonly capabilities: Readonly<AdapterCapabilities>;
|
|
39
|
+
close(): Promise<void>;
|
|
40
|
+
}
|
|
41
|
+
export declare function defineAdapter<Host>(definition: AdapterDefinition<Host>): AdapterDefinition<Host>;
|
|
42
|
+
export declare function adapterCapabilities<Host>(definition: AdapterDefinition<Host>): Readonly<AdapterCapabilities>;
|
|
43
|
+
export declare function connectAdapter<Host>(definition: AdapterDefinition<Host>, context: AdapterContext<Host>): Promise<ConnectedAdapter>;
|
|
44
|
+
export declare function createOfficeEventPublisher(state: OfficeState): OfficeEventPublisher;
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../plugins/agent-live/src/adapter-sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC7C,MAAM,MAAM,cAAc,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;AAEtD,MAAM,WAAW,mBAAmB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC/B,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACxC,SAAS,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IAC9D,WAAW,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;CACnD;AAED,MAAM,WAAW,oBAAoB;IACpC,OAA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AAC,IAAI,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA2BxI;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,WAAW,GAAG,oBAAoB,CAyBnF"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export function defineAdapter(definition) {
|
|
2
|
+
if (typeof definition?.id !== "string" || !/^[a-z0-9][a-z0-9-]*$/.test(definition.id)) {
|
|
3
|
+
throw new TypeError("adapter id must use lowercase letters, numbers, and hyphens");
|
|
4
|
+
}
|
|
5
|
+
if (typeof definition.name !== "string" || !definition.name.trim())
|
|
6
|
+
throw new TypeError("adapter name is required");
|
|
7
|
+
if (typeof definition.connect !== "function")
|
|
8
|
+
throw new TypeError("adapter connect() is required");
|
|
9
|
+
return Object.freeze({ ...definition });
|
|
10
|
+
}
|
|
11
|
+
export function adapterCapabilities(definition) {
|
|
12
|
+
return Object.freeze({
|
|
13
|
+
observe: true,
|
|
14
|
+
prompt: typeof definition.controls?.prompt === "function",
|
|
15
|
+
interrupt: typeof definition.controls?.interrupt === "function",
|
|
16
|
+
approve: typeof definition.controls?.approve === "function",
|
|
17
|
+
modelSelect: typeof definition.controls?.selectModel === "function",
|
|
18
|
+
embeddedView: typeof definition.mountView === "function",
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export async function connectAdapter(definition, context) {
|
|
22
|
+
const connection = await definition.connect(context);
|
|
23
|
+
let viewCleanup;
|
|
24
|
+
try {
|
|
25
|
+
viewCleanup = definition.mountView ? await definition.mountView(context.host) : undefined;
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
if (typeof connection === "function")
|
|
29
|
+
await connection();
|
|
30
|
+
else if (connection && typeof connection.close === "function")
|
|
31
|
+
await connection.close();
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
let closed = false;
|
|
35
|
+
const dispose = async (value) => {
|
|
36
|
+
if (typeof value === "function")
|
|
37
|
+
await value();
|
|
38
|
+
else if (value && typeof value.close === "function")
|
|
39
|
+
await value.close();
|
|
40
|
+
};
|
|
41
|
+
return {
|
|
42
|
+
id: definition.id,
|
|
43
|
+
name: definition.name,
|
|
44
|
+
capabilities: adapterCapabilities(definition),
|
|
45
|
+
async close() {
|
|
46
|
+
if (closed)
|
|
47
|
+
return;
|
|
48
|
+
closed = true;
|
|
49
|
+
const results = await Promise.allSettled([dispose(viewCleanup), dispose(connection)]);
|
|
50
|
+
const failures = results.filter((result) => result.status === "rejected").map((result) => result.reason);
|
|
51
|
+
if (failures.length)
|
|
52
|
+
throw new AggregateError(failures, `adapter ${definition.id} did not close cleanly`);
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export function createOfficeEventPublisher(state) {
|
|
57
|
+
return {
|
|
58
|
+
publish(event) {
|
|
59
|
+
switch (event.type) {
|
|
60
|
+
case "session":
|
|
61
|
+
state.updateSession(event.session);
|
|
62
|
+
break;
|
|
63
|
+
case "agent_join": {
|
|
64
|
+
const agent = event.agent;
|
|
65
|
+
state.join(agent.id, { name: agent.name, role: agent.role, parent: agent.parent, model: agent.model, task: agent.task });
|
|
66
|
+
if (agent.state !== "idle")
|
|
67
|
+
state.setState(agent.id, agent.state, agent.detail);
|
|
68
|
+
if (agent.tokens || agent.cost)
|
|
69
|
+
state.addUsage(agent.id, agent.tokens, agent.cost);
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
case "agent_leave":
|
|
73
|
+
state.leave(event.id, event.ok);
|
|
74
|
+
break;
|
|
75
|
+
case "agent_state":
|
|
76
|
+
state.setState(event.id, event.state, event.detail);
|
|
77
|
+
break;
|
|
78
|
+
case "task":
|
|
79
|
+
state.setTask(event.id, event.task);
|
|
80
|
+
break;
|
|
81
|
+
case "thought":
|
|
82
|
+
state.pushThought(event.id, event.text);
|
|
83
|
+
break;
|
|
84
|
+
case "say":
|
|
85
|
+
state.say(event.id, event.text);
|
|
86
|
+
break;
|
|
87
|
+
case "action":
|
|
88
|
+
state.startAction(event.id, event.toolCallId, event.action, event.label);
|
|
89
|
+
break;
|
|
90
|
+
case "action_end":
|
|
91
|
+
state.endAction(event.id, event.toolCallId, event.ok);
|
|
92
|
+
break;
|
|
93
|
+
case "delegate":
|
|
94
|
+
state.delegate(event.from, event.to, event.task);
|
|
95
|
+
break;
|
|
96
|
+
case "usage":
|
|
97
|
+
state.addUsage(event.id, event.tokens, event.cost);
|
|
98
|
+
break;
|
|
99
|
+
case "log":
|
|
100
|
+
state.addLog(event.item.agentId, event.item.kind, event.item.text);
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../plugins/agent-live/src/adapter-sdk/index.ts"],"names":[],"mappings":"AA8CA,MAAM,UAAU,aAAa,CAAO,UAAmC;IACtE,IAAI,OAAO,UAAU,EAAE,EAAE,KAAK,QAAQ,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC;QACvF,MAAM,IAAI,SAAS,CAAC,6DAA6D,CAAC,CAAC;IACpF,CAAC;IACD,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE;QAAE,MAAM,IAAI,SAAS,CAAC,0BAA0B,CAAC,CAAC;IACpH,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,UAAU;QAAE,MAAM,IAAI,SAAS,CAAC,+BAA+B,CAAC,CAAC;IACnG,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,UAAU,EAAE,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAO,UAAmC;IAC5E,OAAO,MAAM,CAAC,MAAM,CAAC;QACpB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,OAAO,UAAU,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,KAAK,UAAU;oBAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;oBAAC,MAAM;gBACzE,KAAK,OAAO;oBAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;oBAAC,MAAM;gBACxE,KAAK,KAAK;oBAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAAC,MAAM;YACvF,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type OfficeSpec } from "./schema.ts";
|
|
2
|
+
import { type ComponentLibraryView, type ValidationIssue } from "./validator.ts";
|
|
3
|
+
export interface CompileAdjustment {
|
|
4
|
+
code: string;
|
|
5
|
+
path: string;
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CompileResult {
|
|
9
|
+
draft?: OfficeSpec;
|
|
10
|
+
errors: ValidationIssue[];
|
|
11
|
+
adjustments: CompileAdjustment[];
|
|
12
|
+
}
|
|
13
|
+
/** The common compilation gate used by both Official and Custom Office Specs. */
|
|
14
|
+
export declare function compileOfficeSpec(input: unknown, library: ComponentLibraryView): CompileResult;
|
|
15
|
+
/**
|
|
16
|
+
* Creates the smallest valid custom office around a registered room.
|
|
17
|
+
* Internal primitive: Creator never starts from an empty room, it edits the
|
|
18
|
+
* Preset Office that already owns the room (see CreatorService.customize).
|
|
19
|
+
*/
|
|
20
|
+
export declare function compileOfficeSeed(input: unknown, library: ComponentLibraryView): CompileResult;
|
|
21
|
+
/**
|
|
22
|
+
* The id a patch targets when it does not name one: a Custom Office keeps its
|
|
23
|
+
* identity, a Preset Office is copied into its single editable local Office.
|
|
24
|
+
*/
|
|
25
|
+
export declare function patchOfficeId(base: OfficeSpec): string;
|
|
26
|
+
/** The Preset a `local/<preset>` Office id is reserved for. */
|
|
27
|
+
export declare function presetIdForLocalId(localId: string): string | undefined;
|
|
28
|
+
/** The Preset an Office descends from; an official Office is its own Preset. */
|
|
29
|
+
export declare function ownerPresetId(base: OfficeSpec): string | undefined;
|
|
30
|
+
export declare function compileOfficePatch(base: OfficeSpec, patchInput: unknown, library: ComponentLibraryView): CompileResult;
|
|
31
|
+
//# sourceMappingURL=compiler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../../plugins/agent-live/src/content/compiler.ts"],"names":[],"mappings":"AACA,OAAO,EAON,KAAK,UAAU,EAGf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAsB,KAAK,oBAAoB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAErG,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC7B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,WAAW,EAAE,iBAAiB,EAAE,CAAC;CACjC;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAI9F;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAqB9F;AA0FD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEtD;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEtE;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAElE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAkEtH"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { SCENE_LIMITS } from "../core/limits.js";
|
|
2
|
+
import { OFFICE_SPEC_SCHEMA_VERSION, OFFICE_SPEC_DEFAULTS, validateOfficePatchShape, validateOfficeSeedShape, } from "./schema.js";
|
|
3
|
+
import { validateOfficeSpec } from "./validator.js";
|
|
4
|
+
/** The common compilation gate used by both Official and Custom Office Specs. */
|
|
5
|
+
export function compileOfficeSpec(input, library) {
|
|
6
|
+
const validation = validateOfficeSpec(input, library);
|
|
7
|
+
if (!validation.valid)
|
|
8
|
+
return { errors: validation.issues, adjustments: [] };
|
|
9
|
+
return { draft: structuredClone(input), errors: [], adjustments: [] };
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Creates the smallest valid custom office around a registered room.
|
|
13
|
+
* Internal primitive: Creator never starts from an empty room, it edits the
|
|
14
|
+
* Preset Office that already owns the room (see CreatorService.customize).
|
|
15
|
+
*/
|
|
16
|
+
export function compileOfficeSeed(input, library) {
|
|
17
|
+
const shapeIssues = validateOfficeSeedShape(input).map((entry) => ({ ...entry, code: "invalid-seed-shape" }));
|
|
18
|
+
if (shapeIssues.length)
|
|
19
|
+
return { errors: shapeIssues, adjustments: [] };
|
|
20
|
+
const seed = input;
|
|
21
|
+
const draft = {
|
|
22
|
+
schemaVersion: OFFICE_SPEC_SCHEMA_VERSION,
|
|
23
|
+
kind: "office-spec",
|
|
24
|
+
id: seed.id,
|
|
25
|
+
name: seed.name,
|
|
26
|
+
origin: "custom",
|
|
27
|
+
layout: seed.layout,
|
|
28
|
+
style: seed.style ?? OFFICE_SPEC_DEFAULTS.style,
|
|
29
|
+
agentSkin: seed.agentSkin ?? OFFICE_SPEC_DEFAULTS.agentSkin,
|
|
30
|
+
placements: [],
|
|
31
|
+
npcs: [],
|
|
32
|
+
activities: [],
|
|
33
|
+
atmosphere: seed.atmosphere ?? OFFICE_SPEC_DEFAULTS.atmosphere,
|
|
34
|
+
environment: seed.environment ?? OFFICE_SPEC_DEFAULTS.environment,
|
|
35
|
+
agentProfile: structuredClone(seed.agentProfile ?? OFFICE_SPEC_DEFAULTS.agentProfile),
|
|
36
|
+
};
|
|
37
|
+
return compileOfficeSpec(draft, library);
|
|
38
|
+
}
|
|
39
|
+
function hash(value) {
|
|
40
|
+
let result = 2166136261;
|
|
41
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
42
|
+
result ^= value.charCodeAt(index);
|
|
43
|
+
result = Math.imul(result, 16777619);
|
|
44
|
+
}
|
|
45
|
+
return result >>> 0;
|
|
46
|
+
}
|
|
47
|
+
function upsertById(base, updates, removals, path, adjustments, merge = (previous, update) => ({ ...(previous ?? {}), ...structuredClone(update) })) {
|
|
48
|
+
const values = new Map(base.map((entry) => [entry.id, structuredClone(entry)]));
|
|
49
|
+
for (const id of removals) {
|
|
50
|
+
if (!values.delete(id))
|
|
51
|
+
adjustments.push({ code: "remove-missing", path, message: `${id} did not exist and was ignored` });
|
|
52
|
+
}
|
|
53
|
+
for (const update of updates)
|
|
54
|
+
values.set(update.id, merge(values.get(update.id), update));
|
|
55
|
+
return [...values.values()];
|
|
56
|
+
}
|
|
57
|
+
function truncate(values, maximum, path, adjustments) {
|
|
58
|
+
if (values.length <= maximum)
|
|
59
|
+
return values;
|
|
60
|
+
adjustments.push({ code: "capacity-truncated", path, message: `${values.length - maximum} extra item(s) were ignored; maximum is ${maximum}` });
|
|
61
|
+
return values.slice(0, maximum);
|
|
62
|
+
}
|
|
63
|
+
function resolveNpc(npc, library, layout) {
|
|
64
|
+
const templateId = npc.template ?? library.defaultNpcTemplate;
|
|
65
|
+
const template = library.npcTemplates.get(templateId);
|
|
66
|
+
if (!template)
|
|
67
|
+
return { ...npc, template: templateId };
|
|
68
|
+
const profiles = template.defaultProfiles ?? [];
|
|
69
|
+
const selected = npc.profile ? profiles.find((profile) => profile.id === npc.profile) : profiles.length ? profiles[hash(npc.id) % profiles.length] : undefined;
|
|
70
|
+
const role = template.role;
|
|
71
|
+
const spawnCandidates = (layout.npcSpawns ?? []).filter((spawn) => {
|
|
72
|
+
if (role === "boss")
|
|
73
|
+
return /boss|director|manager/.test(spawn);
|
|
74
|
+
if (role === "cleaner")
|
|
75
|
+
return /clean|service|staff|entry/.test(spawn) && !/boss/.test(spawn);
|
|
76
|
+
if (role === "receptionist")
|
|
77
|
+
return /reception|staff|entry/.test(spawn) && !/boss/.test(spawn);
|
|
78
|
+
if (role === "secretary" || role === "attendant")
|
|
79
|
+
return /secretary|service|staff|entry/.test(spawn) && !/boss/.test(spawn);
|
|
80
|
+
return /staff|entry/.test(spawn) && !/boss|clean|service|reception|secretary/.test(spawn);
|
|
81
|
+
});
|
|
82
|
+
const requestedSpawn = npc.spawn;
|
|
83
|
+
const requestedIsRoleSafe = requestedSpawn && (spawnCandidates.includes(requestedSpawn) || role !== "colleague");
|
|
84
|
+
const fallbackSpawn = spawnCandidates[hash(`${npc.id}:spawn`) % Math.max(1, spawnCandidates.length)]
|
|
85
|
+
?? layout.npcSpawns?.[hash(`${npc.id}:spawn`) % Math.max(1, layout.npcSpawns?.length ?? 0)];
|
|
86
|
+
return {
|
|
87
|
+
id: npc.id,
|
|
88
|
+
template: templateId,
|
|
89
|
+
...(selected?.id ? { profile: selected.id } : {}),
|
|
90
|
+
name: npc.name ?? selected?.name ?? template.name,
|
|
91
|
+
title: npc.title ?? template.defaultTitle,
|
|
92
|
+
gender: npc.gender ?? selected?.gender ?? template.defaultGender,
|
|
93
|
+
appearance: { ...template.defaultAppearance, ...(selected?.appearance ?? {}), ...(npc.appearance ?? {}) },
|
|
94
|
+
spawn: requestedIsRoleSafe ? requestedSpawn : fallbackSpawn,
|
|
95
|
+
...(npc.shift ? { shift: structuredClone(npc.shift) } : {}),
|
|
96
|
+
pose: npc.pose ?? template.defaultPose,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function mergeNpc(previous, update) {
|
|
100
|
+
return {
|
|
101
|
+
...(previous ?? {}),
|
|
102
|
+
...structuredClone(update),
|
|
103
|
+
...(previous?.appearance || update.appearance ? { appearance: { ...(previous?.appearance ?? {}), ...(update.appearance ?? {}) } } : {}),
|
|
104
|
+
...(previous?.shift || update.shift ? { shift: { ...(previous?.shift ?? {}), ...(update.shift ?? {}) } } : {}),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function mergeEnvironment(base, patch) {
|
|
108
|
+
const clock = patch.clock ? { ...(base?.clock ?? {}), ...patch.clock } : base?.clock;
|
|
109
|
+
if (clock?.mode === "local")
|
|
110
|
+
delete clock.fixedTime;
|
|
111
|
+
const npcSchedule = patch.npcSchedule
|
|
112
|
+
? {
|
|
113
|
+
...(base?.npcSchedule ?? {}),
|
|
114
|
+
...patch.npcSchedule,
|
|
115
|
+
roleOverrides: { ...(base?.npcSchedule?.roleOverrides ?? {}), ...(patch.npcSchedule.roleOverrides ?? {}) },
|
|
116
|
+
}
|
|
117
|
+
: base?.npcSchedule;
|
|
118
|
+
return {
|
|
119
|
+
...(clock ? { clock } : {}),
|
|
120
|
+
...(patch.weather || base?.weather ? { weather: { ...(base?.weather ?? {}), ...(patch.weather ?? {}) } } : {}),
|
|
121
|
+
...(patch.lighting || base?.lighting ? { lighting: { ...(base?.lighting ?? {}), ...(patch.lighting ?? {}) } } : {}),
|
|
122
|
+
...(npcSchedule ? { npcSchedule } : {}),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function duplicates(values) {
|
|
126
|
+
const seen = new Set();
|
|
127
|
+
return values.filter((value) => seen.has(value) || !seen.add(value));
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The id a patch targets when it does not name one: a Custom Office keeps its
|
|
131
|
+
* identity, a Preset Office is copied into its single editable local Office.
|
|
132
|
+
*/
|
|
133
|
+
export function patchOfficeId(base) {
|
|
134
|
+
return base.origin === "custom" ? base.id : `local/${base.id.replace(/^builtin\//, "")}`;
|
|
135
|
+
}
|
|
136
|
+
/** The Preset a `local/<preset>` Office id is reserved for. */
|
|
137
|
+
export function presetIdForLocalId(localId) {
|
|
138
|
+
return localId.startsWith("local/") ? `builtin/${localId.slice("local/".length)}` : undefined;
|
|
139
|
+
}
|
|
140
|
+
/** The Preset an Office descends from; an official Office is its own Preset. */
|
|
141
|
+
export function ownerPresetId(base) {
|
|
142
|
+
return base.origin === "official" ? base.id : base.basePreset;
|
|
143
|
+
}
|
|
144
|
+
export function compileOfficePatch(base, patchInput, library) {
|
|
145
|
+
const shapeIssues = validateOfficePatchShape(patchInput).map((entry) => ({ ...entry, code: "invalid-patch-shape" }));
|
|
146
|
+
if (shapeIssues.length)
|
|
147
|
+
return { errors: shapeIssues, adjustments: [] };
|
|
148
|
+
const patch = patchInput;
|
|
149
|
+
if (patch.base !== base.id)
|
|
150
|
+
return { errors: [{ code: "base-mismatch", path: "$.base", message: `patch base ${patch.base} does not match ${base.id}` }], adjustments: [] };
|
|
151
|
+
const baseValidation = validateOfficeSpec(base, library);
|
|
152
|
+
if (!baseValidation.valid)
|
|
153
|
+
return { errors: baseValidation.issues.map((entry) => ({ ...entry, path: `$.base${entry.path.slice(1)}` })), adjustments: [] };
|
|
154
|
+
const operationErrors = [];
|
|
155
|
+
for (const [path, values] of [
|
|
156
|
+
["$.placements.upsert", (patch.placements?.upsert ?? []).map((entry) => entry.id)],
|
|
157
|
+
["$.placements.remove", patch.placements?.remove ?? []],
|
|
158
|
+
["$.npcs.upsert", (patch.npcs?.upsert ?? []).map((entry) => entry.id)],
|
|
159
|
+
["$.npcs.remove", patch.npcs?.remove ?? []],
|
|
160
|
+
["$.activities.enable", patch.activities?.enable ?? []],
|
|
161
|
+
["$.activities.disable", patch.activities?.disable ?? []],
|
|
162
|
+
]) {
|
|
163
|
+
for (const id of new Set(duplicates(values)))
|
|
164
|
+
operationErrors.push({ code: "duplicate-operation", path, message: `${id} appears more than once` });
|
|
165
|
+
}
|
|
166
|
+
const enabled = new Set(patch.activities?.enable ?? []);
|
|
167
|
+
for (const id of patch.activities?.disable ?? [])
|
|
168
|
+
if (enabled.has(id))
|
|
169
|
+
operationErrors.push({ code: "conflicting-operation", path: "$.activities", message: `${id} cannot be enabled and disabled together` });
|
|
170
|
+
if (operationErrors.length)
|
|
171
|
+
return { errors: operationErrors, adjustments: [] };
|
|
172
|
+
const adjustments = [];
|
|
173
|
+
const components = patch.components ?? {};
|
|
174
|
+
// An Office keeps the room it was created with; `components.layout` is rejected by the shape check.
|
|
175
|
+
const layoutId = base.layout;
|
|
176
|
+
const layout = library.layouts.get(layoutId);
|
|
177
|
+
if (!layout)
|
|
178
|
+
return { errors: [{ code: "unknown-layout", path: "$.layout", message: `unknown layout ${layoutId}` }], adjustments: [] };
|
|
179
|
+
const placements = upsertById(base.placements, patch.placements?.upsert ?? [], patch.placements?.remove ?? [], "$.placements", adjustments);
|
|
180
|
+
const npcs = upsertById(base.npcs, patch.npcs?.upsert ?? [], patch.npcs?.remove ?? [], "$.npcs", adjustments, mergeNpc);
|
|
181
|
+
const activities = new Set(base.activities);
|
|
182
|
+
for (const id of patch.activities?.disable ?? []) {
|
|
183
|
+
if (!activities.delete(id))
|
|
184
|
+
adjustments.push({ code: "disable-missing", path: "$.activities.disable", message: `${id} was not enabled and was ignored` });
|
|
185
|
+
}
|
|
186
|
+
for (const id of patch.activities?.enable ?? [])
|
|
187
|
+
activities.add(id);
|
|
188
|
+
const draft = {
|
|
189
|
+
schemaVersion: OFFICE_SPEC_SCHEMA_VERSION,
|
|
190
|
+
kind: "office-spec",
|
|
191
|
+
id: patch.id ?? patchOfficeId(base),
|
|
192
|
+
name: patch.name ?? base.name,
|
|
193
|
+
origin: "custom",
|
|
194
|
+
basePreset: base.origin === "official" ? base.id : base.basePreset,
|
|
195
|
+
layout: layoutId,
|
|
196
|
+
style: components.style ?? base.style,
|
|
197
|
+
agentSkin: components.agentSkin ?? base.agentSkin,
|
|
198
|
+
placements: truncate(placements, SCENE_LIMITS.props, "$.placements", adjustments),
|
|
199
|
+
npcs: truncate(npcs, SCENE_LIMITS.npcs, "$.npcs", adjustments).map((npc) => resolveNpc(npc, library, layout)),
|
|
200
|
+
activities: truncate([...activities], SCENE_LIMITS.activities, "$.activities", adjustments),
|
|
201
|
+
atmosphere: components.atmosphere ?? base.atmosphere,
|
|
202
|
+
environment: components.environment ?? base.environment,
|
|
203
|
+
...(patch.texts === null ? {} : base.texts || patch.texts ? { texts: { ...base.texts, ...patch.texts } } : {}),
|
|
204
|
+
...(patch.environmentOverrides === null
|
|
205
|
+
? {}
|
|
206
|
+
: patch.environmentOverrides || base.environmentOverrides
|
|
207
|
+
? { environmentOverrides: mergeEnvironment(base.environmentOverrides, patch.environmentOverrides ?? {}) }
|
|
208
|
+
: {}),
|
|
209
|
+
...(patch.agentProfile === null
|
|
210
|
+
? {}
|
|
211
|
+
: patch.agentProfile || base.agentProfile
|
|
212
|
+
? { agentProfile: { ...(base.agentProfile ?? OFFICE_SPEC_DEFAULTS.agentProfile), ...(patch.agentProfile ?? {}), appearance: { ...(base.agentProfile?.appearance ?? {}), ...(patch.agentProfile?.appearance ?? {}) } } }
|
|
213
|
+
: {}),
|
|
214
|
+
};
|
|
215
|
+
const compiled = compileOfficeSpec(draft, library);
|
|
216
|
+
return { draft: compiled.draft, errors: compiled.errors, adjustments: [...adjustments, ...compiled.adjustments] };
|
|
217
|
+
}
|
|
218
|
+
//# sourceMappingURL=compiler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler.js","sourceRoot":"","sources":["../../plugins/agent-live/src/content/compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACN,0BA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