@sajou/mcp-server 0.6.0 → 0.7.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/dist/index.js +0 -0
- package/dist/resources/guide-choreography-patterns.d.ts +12 -0
- package/dist/resources/guide-choreography-patterns.d.ts.map +1 -0
- package/dist/resources/guide-choreography-patterns.js +125 -0
- package/dist/resources/guide-choreography-patterns.js.map +1 -0
- package/dist/resources/guide-entity-naming.d.ts +12 -0
- package/dist/resources/guide-entity-naming.d.ts.map +1 -0
- package/dist/resources/guide-entity-naming.js +84 -0
- package/dist/resources/guide-entity-naming.js.map +1 -0
- package/dist/resources/guide-signal-protocol.d.ts +12 -0
- package/dist/resources/guide-signal-protocol.d.ts.map +1 -0
- package/dist/resources/guide-signal-protocol.js +105 -0
- package/dist/resources/guide-signal-protocol.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +33 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/describe-scene.d.ts.map +1 -1
- package/dist/tools/describe-scene.js +17 -5
- package/dist/tools/describe-scene.js.map +1 -1
- package/dist/tools/get-entity.d.ts +26 -0
- package/dist/tools/get-entity.d.ts.map +1 -0
- package/dist/tools/get-entity.js +109 -0
- package/dist/tools/get-entity.js.map +1 -0
- package/dist/tools/list-entities.d.ts +24 -0
- package/dist/tools/list-entities.d.ts.map +1 -0
- package/dist/tools/list-entities.js +63 -0
- package/dist/tools/list-entities.js.map +1 -0
- package/dist/tools/place-entity.d.ts +6 -6
- package/dist/tools/place-entity.d.ts.map +1 -1
- package/dist/tools/place-entity.js +2 -1
- package/dist/tools/place-entity.js.map +1 -1
- package/dist/tools/remove-item.d.ts.map +1 -1
- package/dist/tools/remove-item.js +16 -3
- package/dist/tools/remove-item.js.map +1 -1
- package/dist/tools/set-entity-state.d.ts +30 -0
- package/dist/tools/set-entity-state.d.ts.map +1 -0
- package/dist/tools/set-entity-state.js +90 -0
- package/dist/tools/set-entity-state.js.map +1 -0
- package/dist/tools/update-entity.d.ts +59 -0
- package/dist/tools/update-entity.d.ts.map +1 -0
- package/dist/tools/update-entity.js +136 -0
- package/dist/tools/update-entity.js.map +1 -0
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP resource: sajou://guide/choreography-patterns
|
|
3
|
+
*
|
|
4
|
+
* Common choreography patterns for agents composing scenes.
|
|
5
|
+
* Each pattern shows the create_choreography tool call structure.
|
|
6
|
+
*/
|
|
7
|
+
export declare const name = "Choreography Patterns";
|
|
8
|
+
export declare const uri = "sajou://guide/choreography-patterns";
|
|
9
|
+
export declare const description: string;
|
|
10
|
+
export declare const mimeType = "text/plain";
|
|
11
|
+
export declare const content = "# Choreography Patterns\n\n## Pattern 1: Arrive \u2192 Work \u2192 Leave\n\nEntity walks to destination, does something, returns.\n\n steps:\n setAnimation entity=agent state=walk\n move entity=agent target=workstation duration=1200\n onArrive:\n setAnimation entity=agent state=work\n flash entity=workstation color=#E8A851\n wait duration=2000\n setAnimation entity=agent state=walk\n move entity=agent target=idle-agent duration=1200\n onArrive:\n setAnimation entity=agent state=idle\n\nWhen: agent processes a tool call, task, or request.\n\n## Pattern 2: Flash on event\n\nInstant visual feedback, no movement.\n\n steps:\n flash entity=indicator-status color=#4ade80 intensity=0.8\n\nWhen: quick acknowledgment \u2014 result arrived, state changed.\n\n## Pattern 3: State toggle\n\nTwo choreographies for binary states (open/closed, on/off).\n\n Choreography A (on: task_dispatch):\n setAnimation entity=door-main state=open\n flash entity=door-main color=#E8A851\n\n Choreography B (on: completion):\n setAnimation entity=door-main state=closed\n\nWhen: doors, machines, indicators.\n\n## Pattern 4: Follow route\n\nMove along a predefined path.\n\n steps:\n setAnimation entity=agent state=walk\n followRoute entity=agent target=patrol-loop duration=5000\n onArrive:\n setAnimation entity=agent state=idle\n\nWhen: patrolling, complex non-linear movement.\n\n## Pattern 5: Parallel coordination\n\nMultiple things happen simultaneously.\n\n steps:\n parallel:\n setAnimation entity=agent state=walk\n move entity=agent target=forge duration=1500\n flash entity=forge color=#E8A851\n setAnimation entity=worker-forge state=prepare\n\nWhen: multiple actors react to the same event.\n\n## Pattern 6: Spawn \u2192 Animate \u2192 Destroy\n\nTemporary entities that appear and vanish.\n\n steps:\n spawn entityId=fx-spark x=500 y=300 semanticId=result-spark\n flash entity=result-spark color=#4ade80\n wait duration=800\n destroy entity=result-spark\n\nWhen: visual effects, projectiles, temporary notifications.\n\n## Pattern 7: Conditional (when filter)\n\nDifferent choreographies based on signal payload.\n\n Choreography A (on: tool_call, when: toolName=Read):\n move entity=agent target=library duration=1000\n onArrive: setAnimation entity=agent state=read\n\n Choreography B (on: tool_call, when: toolName=Write):\n move entity=agent target=workstation duration=1000\n onArrive: setAnimation entity=agent state=write\n\nWhen: different behaviors for the same signal type.\n\n## Choreography vs direct update\n\n Animated movement \u2192 create_choreography (move/fly)\n Instant teleport \u2192 update_entity (x, y)\n State in a sequence \u2192 setAnimation step in choreography\n State in isolation \u2192 set_entity_state\n One-time setup \u2192 update_entity\n Reactive animation \u2192 create_choreography + create_wire\n Continuous binding \u2192 create_binding\n\n## Scene composition order\n\n 1. describe_scene \u2192 understand current state\n 2. list_entities(filter: \"actors\") \u2192 see existing actors\n 3. place_entity \u2192 add actors with semanticId\n 4. create_choreography \u2192 define animations\n 5. create_wire \u2192 wire signals to choreographies\n 6. emit_signal \u2192 test\n 7. update_entity / set_entity_state \u2192 refine\n";
|
|
12
|
+
//# sourceMappingURL=guide-choreography-patterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-choreography-patterns.d.ts","sourceRoot":"","sources":["../../src/resources/guide-choreography-patterns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,IAAI,0BAA0B,CAAC;AAC5C,eAAO,MAAM,GAAG,wCAAwC,CAAC;AACzD,eAAO,MAAM,WAAW,QAEwE,CAAC;AACjG,eAAO,MAAM,QAAQ,eAAe,CAAC;AAErC,eAAO,MAAM,OAAO,83GAgHnB,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP resource: sajou://guide/choreography-patterns
|
|
3
|
+
*
|
|
4
|
+
* Common choreography patterns for agents composing scenes.
|
|
5
|
+
* Each pattern shows the create_choreography tool call structure.
|
|
6
|
+
*/
|
|
7
|
+
export const name = "Choreography Patterns";
|
|
8
|
+
export const uri = "sajou://guide/choreography-patterns";
|
|
9
|
+
export const description = "Common animation patterns: arrive-work-leave, flash, state toggle, follow route, " +
|
|
10
|
+
"parallel coordination, spawn-destroy, conditional. Read this before creating choreographies.";
|
|
11
|
+
export const mimeType = "text/plain";
|
|
12
|
+
export const content = `# Choreography Patterns
|
|
13
|
+
|
|
14
|
+
## Pattern 1: Arrive → Work → Leave
|
|
15
|
+
|
|
16
|
+
Entity walks to destination, does something, returns.
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
setAnimation entity=agent state=walk
|
|
20
|
+
move entity=agent target=workstation duration=1200
|
|
21
|
+
onArrive:
|
|
22
|
+
setAnimation entity=agent state=work
|
|
23
|
+
flash entity=workstation color=#E8A851
|
|
24
|
+
wait duration=2000
|
|
25
|
+
setAnimation entity=agent state=walk
|
|
26
|
+
move entity=agent target=idle-agent duration=1200
|
|
27
|
+
onArrive:
|
|
28
|
+
setAnimation entity=agent state=idle
|
|
29
|
+
|
|
30
|
+
When: agent processes a tool call, task, or request.
|
|
31
|
+
|
|
32
|
+
## Pattern 2: Flash on event
|
|
33
|
+
|
|
34
|
+
Instant visual feedback, no movement.
|
|
35
|
+
|
|
36
|
+
steps:
|
|
37
|
+
flash entity=indicator-status color=#4ade80 intensity=0.8
|
|
38
|
+
|
|
39
|
+
When: quick acknowledgment — result arrived, state changed.
|
|
40
|
+
|
|
41
|
+
## Pattern 3: State toggle
|
|
42
|
+
|
|
43
|
+
Two choreographies for binary states (open/closed, on/off).
|
|
44
|
+
|
|
45
|
+
Choreography A (on: task_dispatch):
|
|
46
|
+
setAnimation entity=door-main state=open
|
|
47
|
+
flash entity=door-main color=#E8A851
|
|
48
|
+
|
|
49
|
+
Choreography B (on: completion):
|
|
50
|
+
setAnimation entity=door-main state=closed
|
|
51
|
+
|
|
52
|
+
When: doors, machines, indicators.
|
|
53
|
+
|
|
54
|
+
## Pattern 4: Follow route
|
|
55
|
+
|
|
56
|
+
Move along a predefined path.
|
|
57
|
+
|
|
58
|
+
steps:
|
|
59
|
+
setAnimation entity=agent state=walk
|
|
60
|
+
followRoute entity=agent target=patrol-loop duration=5000
|
|
61
|
+
onArrive:
|
|
62
|
+
setAnimation entity=agent state=idle
|
|
63
|
+
|
|
64
|
+
When: patrolling, complex non-linear movement.
|
|
65
|
+
|
|
66
|
+
## Pattern 5: Parallel coordination
|
|
67
|
+
|
|
68
|
+
Multiple things happen simultaneously.
|
|
69
|
+
|
|
70
|
+
steps:
|
|
71
|
+
parallel:
|
|
72
|
+
setAnimation entity=agent state=walk
|
|
73
|
+
move entity=agent target=forge duration=1500
|
|
74
|
+
flash entity=forge color=#E8A851
|
|
75
|
+
setAnimation entity=worker-forge state=prepare
|
|
76
|
+
|
|
77
|
+
When: multiple actors react to the same event.
|
|
78
|
+
|
|
79
|
+
## Pattern 6: Spawn → Animate → Destroy
|
|
80
|
+
|
|
81
|
+
Temporary entities that appear and vanish.
|
|
82
|
+
|
|
83
|
+
steps:
|
|
84
|
+
spawn entityId=fx-spark x=500 y=300 semanticId=result-spark
|
|
85
|
+
flash entity=result-spark color=#4ade80
|
|
86
|
+
wait duration=800
|
|
87
|
+
destroy entity=result-spark
|
|
88
|
+
|
|
89
|
+
When: visual effects, projectiles, temporary notifications.
|
|
90
|
+
|
|
91
|
+
## Pattern 7: Conditional (when filter)
|
|
92
|
+
|
|
93
|
+
Different choreographies based on signal payload.
|
|
94
|
+
|
|
95
|
+
Choreography A (on: tool_call, when: toolName=Read):
|
|
96
|
+
move entity=agent target=library duration=1000
|
|
97
|
+
onArrive: setAnimation entity=agent state=read
|
|
98
|
+
|
|
99
|
+
Choreography B (on: tool_call, when: toolName=Write):
|
|
100
|
+
move entity=agent target=workstation duration=1000
|
|
101
|
+
onArrive: setAnimation entity=agent state=write
|
|
102
|
+
|
|
103
|
+
When: different behaviors for the same signal type.
|
|
104
|
+
|
|
105
|
+
## Choreography vs direct update
|
|
106
|
+
|
|
107
|
+
Animated movement → create_choreography (move/fly)
|
|
108
|
+
Instant teleport → update_entity (x, y)
|
|
109
|
+
State in a sequence → setAnimation step in choreography
|
|
110
|
+
State in isolation → set_entity_state
|
|
111
|
+
One-time setup → update_entity
|
|
112
|
+
Reactive animation → create_choreography + create_wire
|
|
113
|
+
Continuous binding → create_binding
|
|
114
|
+
|
|
115
|
+
## Scene composition order
|
|
116
|
+
|
|
117
|
+
1. describe_scene → understand current state
|
|
118
|
+
2. list_entities(filter: "actors") → see existing actors
|
|
119
|
+
3. place_entity → add actors with semanticId
|
|
120
|
+
4. create_choreography → define animations
|
|
121
|
+
5. create_wire → wire signals to choreographies
|
|
122
|
+
6. emit_signal → test
|
|
123
|
+
7. update_entity / set_entity_state → refine
|
|
124
|
+
`;
|
|
125
|
+
//# sourceMappingURL=guide-choreography-patterns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-choreography-patterns.js","sourceRoot":"","sources":["../../src/resources/guide-choreography-patterns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,IAAI,GAAG,uBAAuB,CAAC;AAC5C,MAAM,CAAC,MAAM,GAAG,GAAG,qCAAqC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GACtB,mFAAmF;IACnF,8FAA8F,CAAC;AACjG,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;AAErC,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHtB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP resource: sajou://guide/entity-naming
|
|
3
|
+
*
|
|
4
|
+
* Naming conventions for semantic IDs, positions, routes, and zones.
|
|
5
|
+
* Agents read this to learn how to name things consistently.
|
|
6
|
+
*/
|
|
7
|
+
export declare const name = "Entity Naming Guide";
|
|
8
|
+
export declare const uri = "sajou://guide/entity-naming";
|
|
9
|
+
export declare const description: string;
|
|
10
|
+
export declare const mimeType = "text/plain";
|
|
11
|
+
export declare const content = "# Entity Naming Guide\n\n## Semantic IDs (actor names)\n\nThe semanticId is how choreographies and agents target an entity. It's the entity's role, not its type.\n\n### Pattern: role-qualifier (kebab-case)\n\n role \u2192 \"agent\" (single entity with that role)\n role-qualifier \u2192 \"agent-main\" (multiple of the same role)\n role-location \u2192 \"door-kitchen\" (defined by where it is)\n role-function \u2192 \"indicator-status\" (defined by what it does)\n role-N \u2192 \"guard-1\" (numbered instances)\n\n### Common role prefixes\n\n agent AI agent representation agent, agent-main, agent-research\n worker Task executor worker, worker-forge, worker-1\n door Openable passage door-kitchen, door-main\n indicator Status display indicator-status, indicator-progress\n machine Process/tool machine-forge, machine-press\n panel Information display panel-dashboard, panel-log\n light Light source entity light-forge, light-alarm\n npc Non-player character npc-merchant, npc-guard\n fx Visual effect fx-spark, fx-smoke\n prop Interactive object prop-lever, prop-chest\n\n### Rules\n\n- kebab-case only: \"agent-main\" not \"agentMain\"\n- Role first: \"door-kitchen\" not \"kitchen-door\"\n- Unique per scene\n- Use the role, not the sprite name: \"worker\" not \"peon\"\n- 2 segments max\n\n### Decoration (no semanticId)\n\nPassive elements (trees, rocks, floor tiles) have no semanticId. They don't participate in choreographies.\nUse list_entities(filter: \"decoration\") to see them.\n\n## Positions (waypoints)\n\n noun \u2192 \"forge\", \"entrance\", \"exit\"\n area-function \u2192 \"kitchen-counter\", \"lab-bench\"\n spawn-qualifier \u2192 \"spawn-agent\", \"spawn-npc\"\n idle-qualifier \u2192 \"idle-agent\", \"idle-worker\"\n queue-N \u2192 \"queue-1\", \"queue-2\"\n\nType hints: spawn \u2192 \"spawn-*\", destination \u2192 descriptive noun, waypoint \u2192 \"via-*\", generic \u2192 any.\n\n## Routes (paths)\n\n from-to \u2192 \"entrance-to-forge\"\n descriptive \u2192 \"patrol-perimeter\"\n role-path \u2192 \"worker-commute\"\n\nUse \"sharp\" corners for indoor paths, \"smooth\" for organic outdoor paths.\n\n## Zones\n\nCapitalized singular noun: Command, Production, Perimeter, Storage, Transit.\n\n## Quick reference\n\n semanticId kebab-case, role-first agent-main, door-kitchen\n Position name descriptive or area-function forge, spawn-agent\n Route name from-to or descriptive entrance-to-forge\n Zone type Capitalized singular noun Command, Production\n Signal type snake_case tool_call, task_dispatch\n Choreography act camelCase move, setAnimation\n Entity type kebab-case peon, building-townhall\n";
|
|
12
|
+
//# sourceMappingURL=guide-entity-naming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-entity-naming.d.ts","sourceRoot":"","sources":["../../src/resources/guide-entity-naming.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,IAAI,wBAAwB,CAAC;AAC1C,eAAO,MAAM,GAAG,gCAAgC,CAAC;AACjD,eAAO,MAAM,WAAW,QAEyC,CAAC;AAClE,eAAO,MAAM,QAAQ,eAAe,CAAC;AAErC,eAAO,MAAM,OAAO,4hGAuEnB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP resource: sajou://guide/entity-naming
|
|
3
|
+
*
|
|
4
|
+
* Naming conventions for semantic IDs, positions, routes, and zones.
|
|
5
|
+
* Agents read this to learn how to name things consistently.
|
|
6
|
+
*/
|
|
7
|
+
export const name = "Entity Naming Guide";
|
|
8
|
+
export const uri = "sajou://guide/entity-naming";
|
|
9
|
+
export const description = "Naming conventions for entity semantic IDs, positions, routes, and zones. " +
|
|
10
|
+
"Read this before placing entities or creating choreographies.";
|
|
11
|
+
export const mimeType = "text/plain";
|
|
12
|
+
export const content = `# Entity Naming Guide
|
|
13
|
+
|
|
14
|
+
## Semantic IDs (actor names)
|
|
15
|
+
|
|
16
|
+
The semanticId is how choreographies and agents target an entity. It's the entity's role, not its type.
|
|
17
|
+
|
|
18
|
+
### Pattern: role-qualifier (kebab-case)
|
|
19
|
+
|
|
20
|
+
role → "agent" (single entity with that role)
|
|
21
|
+
role-qualifier → "agent-main" (multiple of the same role)
|
|
22
|
+
role-location → "door-kitchen" (defined by where it is)
|
|
23
|
+
role-function → "indicator-status" (defined by what it does)
|
|
24
|
+
role-N → "guard-1" (numbered instances)
|
|
25
|
+
|
|
26
|
+
### Common role prefixes
|
|
27
|
+
|
|
28
|
+
agent AI agent representation agent, agent-main, agent-research
|
|
29
|
+
worker Task executor worker, worker-forge, worker-1
|
|
30
|
+
door Openable passage door-kitchen, door-main
|
|
31
|
+
indicator Status display indicator-status, indicator-progress
|
|
32
|
+
machine Process/tool machine-forge, machine-press
|
|
33
|
+
panel Information display panel-dashboard, panel-log
|
|
34
|
+
light Light source entity light-forge, light-alarm
|
|
35
|
+
npc Non-player character npc-merchant, npc-guard
|
|
36
|
+
fx Visual effect fx-spark, fx-smoke
|
|
37
|
+
prop Interactive object prop-lever, prop-chest
|
|
38
|
+
|
|
39
|
+
### Rules
|
|
40
|
+
|
|
41
|
+
- kebab-case only: "agent-main" not "agentMain"
|
|
42
|
+
- Role first: "door-kitchen" not "kitchen-door"
|
|
43
|
+
- Unique per scene
|
|
44
|
+
- Use the role, not the sprite name: "worker" not "peon"
|
|
45
|
+
- 2 segments max
|
|
46
|
+
|
|
47
|
+
### Decoration (no semanticId)
|
|
48
|
+
|
|
49
|
+
Passive elements (trees, rocks, floor tiles) have no semanticId. They don't participate in choreographies.
|
|
50
|
+
Use list_entities(filter: "decoration") to see them.
|
|
51
|
+
|
|
52
|
+
## Positions (waypoints)
|
|
53
|
+
|
|
54
|
+
noun → "forge", "entrance", "exit"
|
|
55
|
+
area-function → "kitchen-counter", "lab-bench"
|
|
56
|
+
spawn-qualifier → "spawn-agent", "spawn-npc"
|
|
57
|
+
idle-qualifier → "idle-agent", "idle-worker"
|
|
58
|
+
queue-N → "queue-1", "queue-2"
|
|
59
|
+
|
|
60
|
+
Type hints: spawn → "spawn-*", destination → descriptive noun, waypoint → "via-*", generic → any.
|
|
61
|
+
|
|
62
|
+
## Routes (paths)
|
|
63
|
+
|
|
64
|
+
from-to → "entrance-to-forge"
|
|
65
|
+
descriptive → "patrol-perimeter"
|
|
66
|
+
role-path → "worker-commute"
|
|
67
|
+
|
|
68
|
+
Use "sharp" corners for indoor paths, "smooth" for organic outdoor paths.
|
|
69
|
+
|
|
70
|
+
## Zones
|
|
71
|
+
|
|
72
|
+
Capitalized singular noun: Command, Production, Perimeter, Storage, Transit.
|
|
73
|
+
|
|
74
|
+
## Quick reference
|
|
75
|
+
|
|
76
|
+
semanticId kebab-case, role-first agent-main, door-kitchen
|
|
77
|
+
Position name descriptive or area-function forge, spawn-agent
|
|
78
|
+
Route name from-to or descriptive entrance-to-forge
|
|
79
|
+
Zone type Capitalized singular noun Command, Production
|
|
80
|
+
Signal type snake_case tool_call, task_dispatch
|
|
81
|
+
Choreography act camelCase move, setAnimation
|
|
82
|
+
Entity type kebab-case peon, building-townhall
|
|
83
|
+
`;
|
|
84
|
+
//# sourceMappingURL=guide-entity-naming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-entity-naming.js","sourceRoot":"","sources":["../../src/resources/guide-entity-naming.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC;AAC1C,MAAM,CAAC,MAAM,GAAG,GAAG,6BAA6B,CAAC;AACjD,MAAM,CAAC,MAAM,WAAW,GACtB,4EAA4E;IAC5E,+DAA+D,CAAC;AAClE,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;AAErC,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEtB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP resource: sajou://guide/signal-protocol
|
|
3
|
+
*
|
|
4
|
+
* Signal types, their payloads, and how they map to choreographies.
|
|
5
|
+
* Agents read this to understand what signals they can emit and wire.
|
|
6
|
+
*/
|
|
7
|
+
export declare const name = "Signal Protocol";
|
|
8
|
+
export declare const uri = "sajou://guide/signal-protocol";
|
|
9
|
+
export declare const description: string;
|
|
10
|
+
export declare const mimeType = "text/plain";
|
|
11
|
+
export declare const content = "# Signal Protocol\n\n## Signal flow\n\n Signal Source \u2192 Signal Type \u2192 Choreography \u2192 Entity\n\nWiring connects these layers:\n create_wire(fromZone: \"signal-type\", fromId: \"tool_call\", toZone: \"choreographer\", toId: choreographyId)\n\n## Well-known signal types\n\n### Agent lifecycle\n\n task_dispatch New task assigned to agent\n payload: { task, input, parentTask? }\n\n agent_state_change Agent changed state (idle \u2192 thinking \u2192 working)\n payload: { from, to, reason? }\n\n completion Agent finished a task\n payload: { result?, summary?, duration? }\n\n error Something went wrong\n payload: { message, code?, recoverable? }\n\n### Tool usage\n\n tool_call Agent is calling a tool\n payload: { toolName, input? }\n\n tool_result Tool returned a result\n payload: { toolName, output?, duration?, success? }\n\n### Streaming\n\n text_delta Incremental text output (streaming)\n payload: { delta, role? }\n\n thinking Agent's internal reasoning\n payload: { delta }\n\n### Resource usage\n\n token_usage Token consumption report\n payload: { input, output, total?, model? }\n\n### User interaction\n\n user.click User clicked on scene\n payload: { x, y, entityId?, semanticId? }\n\n user.move User moved cursor\n payload: { x, y }\n\n user.zone User entered/left a zone\n payload: { zoneId, action: \"enter\"|\"leave\" }\n\n user.command User issued a command\n payload: { command, args? }\n\n user.point User pointed at an entity\n payload: { entityId?, semanticId? }\n\n## Custom signal types\n\nAny string is a valid signal type. Custom types get Record<string, unknown> payloads.\n\n emit_signal(type: \"my_custom_event\", payload: { key: \"value\" })\n\nWire them like well-known types \u2014 the system is fully open.\n\n## MIDI signals (when MIDI source connected)\n\n midi.note_on key, velocity, channel\n midi.note_off key, velocity, channel\n midi.control_change controller, value, channel\n\n## Conditional triggers\n\nChoreographies can filter on payload fields:\n\n create_choreography:\n on: \"tool_call\"\n when: { field: \"toolName\", operator: \"eq\", value: \"Read\" }\n\nOperators: eq, neq, gt, lt, gte, lte, contains, startsWith, endsWith.\n\n## Emitting signals for testing\n\n emit_signal(type: \"tool_call\", payload: { toolName: \"Read\", input: \"/src/main.ts\" })\n\nThis triggers any choreography wired to the \"tool_call\" signal type.\n";
|
|
12
|
+
//# sourceMappingURL=guide-signal-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-signal-protocol.d.ts","sourceRoot":"","sources":["../../src/resources/guide-signal-protocol.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,IAAI,oBAAoB,CAAC;AACtC,eAAO,MAAM,GAAG,kCAAkC,CAAC;AACnD,eAAO,MAAM,WAAW,QAEyC,CAAC;AAClE,eAAO,MAAM,QAAQ,eAAe,CAAC;AAErC,eAAO,MAAM,OAAO,klFA4FnB,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP resource: sajou://guide/signal-protocol
|
|
3
|
+
*
|
|
4
|
+
* Signal types, their payloads, and how they map to choreographies.
|
|
5
|
+
* Agents read this to understand what signals they can emit and wire.
|
|
6
|
+
*/
|
|
7
|
+
export const name = "Signal Protocol";
|
|
8
|
+
export const uri = "sajou://guide/signal-protocol";
|
|
9
|
+
export const description = "Signal types available in sajou: well-known types with typed payloads, " +
|
|
10
|
+
"custom types, and how signals flow through the wiring system.";
|
|
11
|
+
export const mimeType = "text/plain";
|
|
12
|
+
export const content = `# Signal Protocol
|
|
13
|
+
|
|
14
|
+
## Signal flow
|
|
15
|
+
|
|
16
|
+
Signal Source → Signal Type → Choreography → Entity
|
|
17
|
+
|
|
18
|
+
Wiring connects these layers:
|
|
19
|
+
create_wire(fromZone: "signal-type", fromId: "tool_call", toZone: "choreographer", toId: choreographyId)
|
|
20
|
+
|
|
21
|
+
## Well-known signal types
|
|
22
|
+
|
|
23
|
+
### Agent lifecycle
|
|
24
|
+
|
|
25
|
+
task_dispatch New task assigned to agent
|
|
26
|
+
payload: { task, input, parentTask? }
|
|
27
|
+
|
|
28
|
+
agent_state_change Agent changed state (idle → thinking → working)
|
|
29
|
+
payload: { from, to, reason? }
|
|
30
|
+
|
|
31
|
+
completion Agent finished a task
|
|
32
|
+
payload: { result?, summary?, duration? }
|
|
33
|
+
|
|
34
|
+
error Something went wrong
|
|
35
|
+
payload: { message, code?, recoverable? }
|
|
36
|
+
|
|
37
|
+
### Tool usage
|
|
38
|
+
|
|
39
|
+
tool_call Agent is calling a tool
|
|
40
|
+
payload: { toolName, input? }
|
|
41
|
+
|
|
42
|
+
tool_result Tool returned a result
|
|
43
|
+
payload: { toolName, output?, duration?, success? }
|
|
44
|
+
|
|
45
|
+
### Streaming
|
|
46
|
+
|
|
47
|
+
text_delta Incremental text output (streaming)
|
|
48
|
+
payload: { delta, role? }
|
|
49
|
+
|
|
50
|
+
thinking Agent's internal reasoning
|
|
51
|
+
payload: { delta }
|
|
52
|
+
|
|
53
|
+
### Resource usage
|
|
54
|
+
|
|
55
|
+
token_usage Token consumption report
|
|
56
|
+
payload: { input, output, total?, model? }
|
|
57
|
+
|
|
58
|
+
### User interaction
|
|
59
|
+
|
|
60
|
+
user.click User clicked on scene
|
|
61
|
+
payload: { x, y, entityId?, semanticId? }
|
|
62
|
+
|
|
63
|
+
user.move User moved cursor
|
|
64
|
+
payload: { x, y }
|
|
65
|
+
|
|
66
|
+
user.zone User entered/left a zone
|
|
67
|
+
payload: { zoneId, action: "enter"|"leave" }
|
|
68
|
+
|
|
69
|
+
user.command User issued a command
|
|
70
|
+
payload: { command, args? }
|
|
71
|
+
|
|
72
|
+
user.point User pointed at an entity
|
|
73
|
+
payload: { entityId?, semanticId? }
|
|
74
|
+
|
|
75
|
+
## Custom signal types
|
|
76
|
+
|
|
77
|
+
Any string is a valid signal type. Custom types get Record<string, unknown> payloads.
|
|
78
|
+
|
|
79
|
+
emit_signal(type: "my_custom_event", payload: { key: "value" })
|
|
80
|
+
|
|
81
|
+
Wire them like well-known types — the system is fully open.
|
|
82
|
+
|
|
83
|
+
## MIDI signals (when MIDI source connected)
|
|
84
|
+
|
|
85
|
+
midi.note_on key, velocity, channel
|
|
86
|
+
midi.note_off key, velocity, channel
|
|
87
|
+
midi.control_change controller, value, channel
|
|
88
|
+
|
|
89
|
+
## Conditional triggers
|
|
90
|
+
|
|
91
|
+
Choreographies can filter on payload fields:
|
|
92
|
+
|
|
93
|
+
create_choreography:
|
|
94
|
+
on: "tool_call"
|
|
95
|
+
when: { field: "toolName", operator: "eq", value: "Read" }
|
|
96
|
+
|
|
97
|
+
Operators: eq, neq, gt, lt, gte, lte, contains, startsWith, endsWith.
|
|
98
|
+
|
|
99
|
+
## Emitting signals for testing
|
|
100
|
+
|
|
101
|
+
emit_signal(type: "tool_call", payload: { toolName: "Read", input: "/src/main.ts" })
|
|
102
|
+
|
|
103
|
+
This triggers any choreography wired to the "tool_call" signal type.
|
|
104
|
+
`;
|
|
105
|
+
//# sourceMappingURL=guide-signal-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-signal-protocol.js","sourceRoot":"","sources":["../../src/resources/guide-signal-protocol.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,IAAI,GAAG,iBAAiB,CAAC;AACtC,MAAM,CAAC,MAAM,GAAG,GAAG,+BAA+B,CAAC;AACnD,MAAM,CAAC,MAAM,WAAW,GACtB,yEAAyE;IACzE,+DAA+D,CAAC;AAClE,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;AAErC,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FtB,CAAC"}
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAkCpE;;GAEG;AACH,wBAAgB,YAAY,IAAI,SAAS,CAgNxC"}
|
package/dist/server.js
CHANGED
|
@@ -18,11 +18,20 @@ import * as createChoreographyTool from "./tools/create-choreography.js";
|
|
|
18
18
|
import * as createBindingTool from "./tools/create-binding.js";
|
|
19
19
|
import * as createWireTool from "./tools/create-wire.js";
|
|
20
20
|
import * as removeItemTool from "./tools/remove-item.js";
|
|
21
|
+
// Entity management tools
|
|
22
|
+
import * as listEntitiesTool from "./tools/list-entities.js";
|
|
23
|
+
import * as getEntityTool from "./tools/get-entity.js";
|
|
24
|
+
import * as updateEntityTool from "./tools/update-entity.js";
|
|
25
|
+
import * as setEntityStateTool from "./tools/set-entity-state.js";
|
|
21
26
|
// Shader tools
|
|
22
27
|
import * as createShaderTool from "./tools/create-shader.js";
|
|
23
28
|
import * as updateShaderTool from "./tools/update-shader.js";
|
|
24
29
|
import * as getShadersTool from "./tools/get-shaders.js";
|
|
25
30
|
import * as setUniformTool from "./tools/set-uniform.js";
|
|
31
|
+
// Resources — agent guides
|
|
32
|
+
import * as entityNamingGuide from "./resources/guide-entity-naming.js";
|
|
33
|
+
import * as choreographyPatternsGuide from "./resources/guide-choreography-patterns.js";
|
|
34
|
+
import * as signalProtocolGuide from "./resources/guide-signal-protocol.js";
|
|
26
35
|
/**
|
|
27
36
|
* Create and configure the sajou MCP server with all tools registered.
|
|
28
37
|
*/
|
|
@@ -81,6 +90,23 @@ export function createServer() {
|
|
|
81
90
|
description: removeItemTool.description,
|
|
82
91
|
inputSchema: removeItemTool.inputSchema,
|
|
83
92
|
}, removeItemTool.handler);
|
|
93
|
+
// --- Entity management tools ---
|
|
94
|
+
server.registerTool(listEntitiesTool.name, {
|
|
95
|
+
description: listEntitiesTool.description,
|
|
96
|
+
inputSchema: listEntitiesTool.inputSchema,
|
|
97
|
+
}, listEntitiesTool.handler);
|
|
98
|
+
server.registerTool(getEntityTool.name, {
|
|
99
|
+
description: getEntityTool.description,
|
|
100
|
+
inputSchema: getEntityTool.inputSchema,
|
|
101
|
+
}, getEntityTool.handler);
|
|
102
|
+
server.registerTool(updateEntityTool.name, {
|
|
103
|
+
description: updateEntityTool.description,
|
|
104
|
+
inputSchema: updateEntityTool.inputSchema,
|
|
105
|
+
}, updateEntityTool.handler);
|
|
106
|
+
server.registerTool(setEntityStateTool.name, {
|
|
107
|
+
description: setEntityStateTool.description,
|
|
108
|
+
inputSchema: setEntityStateTool.inputSchema,
|
|
109
|
+
}, setEntityStateTool.handler);
|
|
84
110
|
// --- Shader tools ---
|
|
85
111
|
server.registerTool(createShaderTool.name, {
|
|
86
112
|
description: createShaderTool.description,
|
|
@@ -98,6 +124,13 @@ export function createServer() {
|
|
|
98
124
|
description: setUniformTool.description,
|
|
99
125
|
inputSchema: setUniformTool.inputSchema,
|
|
100
126
|
}, setUniformTool.handler);
|
|
127
|
+
// --- Resources — agent guides ---
|
|
128
|
+
const guides = [entityNamingGuide, choreographyPatternsGuide, signalProtocolGuide];
|
|
129
|
+
for (const guide of guides) {
|
|
130
|
+
server.registerResource(guide.name, guide.uri, { description: guide.description, mimeType: guide.mimeType }, () => ({
|
|
131
|
+
contents: [{ uri: guide.uri, text: guide.content, mimeType: guide.mimeType }],
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
101
134
|
return server;
|
|
102
135
|
}
|
|
103
136
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,iBAAiB,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,iBAAiB,MAAM,2BAA2B,CAAC;AAE/D,kCAAkC;AAClC,OAAO,KAAK,eAAe,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,sBAAsB,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,iBAAiB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AAEzD,eAAe;AACf,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AAEzD;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,MAAM,GAAG,IAAI,S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AAO,MAAM,WAAW,QAIwC,CAAC;AAEjE,2CAA2C;AAC3C,eAAO,MAAM,WAAW,gDAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"describe-scene.d.ts","sourceRoot":"","sources":["../../src/tools/describe-scene.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,iBAAiB;AACjB,eAAO,MAAM,IAAI,mBAAmB,CAAC;AAErC,8CAA8C;AAC9C,eAAO,MAAM,WAAW,QAIwC,CAAC;AAEjE,2CAA2C;AAC3C,eAAO,MAAM,WAAW,gDAAe,CAAC;AA0DxC,mFAAmF;AACnF,wBAAsB,OAAO,IAAI,OAAO,CAAC;IACvC,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD,CAAC,CAsJD"}
|
|
@@ -22,11 +22,12 @@ function describeEntity(e) {
|
|
|
22
22
|
const pos = `at (${Math.round(e["x"])}, ${Math.round(e["y"])})`;
|
|
23
23
|
const vis = e["visible"] ? "" : " [hidden]";
|
|
24
24
|
const lock = e["locked"] ? " [locked]" : "";
|
|
25
|
+
const z = e["zIndex"] != null ? `, z=${e["zIndex"]}` : "";
|
|
25
26
|
const topology = e["topology"];
|
|
26
27
|
const topo = topology
|
|
27
28
|
? `, topology: home=${topology["home"] ?? "none"}, waypoints=[${(topology["waypoints"] ?? []).join(", ")}]`
|
|
28
29
|
: "";
|
|
29
|
-
return ` - ${label} ${pos}${vis}${lock}, layer=${e["layerId"]}, state=${e["activeState"]}${topo}`;
|
|
30
|
+
return ` - ${label} ${pos}${vis}${lock}, layer=${e["layerId"]}${z}, state=${e["activeState"]}${topo}`;
|
|
30
31
|
}
|
|
31
32
|
/** Format a choreography for the description. */
|
|
32
33
|
function describeChoreography(c) {
|
|
@@ -116,11 +117,22 @@ export async function handler() {
|
|
|
116
117
|
const d = sceneState["dimensions"];
|
|
117
118
|
lines.push(`## Canvas: ${d?.["width"] ?? "?"}×${d?.["height"] ?? "?"} px, mode: ${editor["mode"] ?? "unknown"}, view: ${editor["viewMode"] ?? "unknown"}`);
|
|
118
119
|
lines.push("");
|
|
119
|
-
// Entities
|
|
120
|
+
// Entities — split actors (with semanticId) from decoration
|
|
121
|
+
const actors = entities.filter((e) => e["semanticId"] != null && e["semanticId"] !== "");
|
|
122
|
+
const decoration = entities.filter((e) => e["semanticId"] == null || e["semanticId"] === "");
|
|
120
123
|
if (entities.length > 0) {
|
|
121
|
-
lines.push(`## Entities (${entities.length})`);
|
|
122
|
-
|
|
123
|
-
lines.push(
|
|
124
|
+
lines.push(`## Entities (${entities.length}: ${actors.length} actors, ${decoration.length} decoration)`);
|
|
125
|
+
if (actors.length > 0) {
|
|
126
|
+
lines.push("Actors (targetable by semanticId via update_entity, set_entity_state, remove_item):");
|
|
127
|
+
for (const e of actors) {
|
|
128
|
+
lines.push(describeEntity(e));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (decoration.length > 0) {
|
|
132
|
+
lines.push("Decoration:");
|
|
133
|
+
for (const e of decoration) {
|
|
134
|
+
lines.push(describeEntity(e));
|
|
135
|
+
}
|
|
124
136
|
}
|
|
125
137
|
}
|
|
126
138
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe-scene.js","sourceRoot":"","sources":["../../src/tools/describe-scene.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,SAAS,GACV,MAAM,mBAAmB,CAAC;AAE3B,iBAAiB;AACjB,MAAM,CAAC,MAAM,IAAI,GAAG,gBAAgB,CAAC;AAErC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,WAAW,GACtB,8EAA8E;IAC9E,8EA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CAAC;IACH,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;KAC7D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tool: get_entity
|
|
3
|
+
*
|
|
4
|
+
* Returns the full state of a single entity, resolved by semanticId or
|
|
5
|
+
* instance id. Useful for an agent monitoring a specific actor.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
export declare const name = "get_entity";
|
|
9
|
+
export declare const description: string;
|
|
10
|
+
export declare const inputSchema: z.ZodObject<{
|
|
11
|
+
semanticId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
id: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
semanticId?: string | undefined;
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
semanticId?: string | undefined;
|
|
18
|
+
id?: string | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function handler(params: z.infer<typeof inputSchema>): Promise<{
|
|
21
|
+
content: Array<{
|
|
22
|
+
type: "text";
|
|
23
|
+
text: string;
|
|
24
|
+
}>;
|
|
25
|
+
}>;
|
|
26
|
+
//# sourceMappingURL=get-entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-entity.d.ts","sourceRoot":"","sources":["../../src/tools/get-entity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,IAAI,eAAe,CAAC;AAEjC,eAAO,MAAM,WAAW,QAIqB,CAAC;AAE9C,eAAO,MAAM,WAAW;;;;;;;;;EAetB,CAAC;AAiBH,wBAAsB,OAAO,CAC3B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAClC,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA8E7D"}
|