tools: the protocol group's landed/unlanded intent split (#20)

token.create now answers on its fields, so the 'not landed yet' examples move to
status.set and character.create (slices 7-8).
This commit is contained in:
2026-11-15 09:35:43 +01:00
parent ae6054ea94
commit c9de8c7116
+7 -2
View File
@@ -97,9 +97,14 @@ test('an unknown type is refused, unknown fields are ignored, and every intent g
assert.equal((await gm.ws.request({ t: 'token.teleport', id: 'x' })).code, 'unknown-type')
assert.equal((await gm.ws.request({ t: '' })).code, 'unknown-type')
assert.equal((await gm.ws.request({ t: 'TOKEN.MOVE', id: 'x' })).code, 'unknown-type')
// a catalogue intent whose slice has not landed still answers exactly once
assert.equal((await gm.ws.request({ t: 'token.create', scene: 1 })).code, 'unknown-type')
// a catalogue intent whose slice has not landed still answers exactly once (slices 6-8)
assert.equal((await gm.ws.request({ t: 'status.set', id: 'x', status: 'stuck' })).code,
'unknown-type')
assert.equal((await gm.ws.request({ t: 'scene.set', scene: 1 })).code, 'unknown-type')
assert.equal((await gm.ws.request({ t: 'character.create', descriptive_name: 'x',
actual_name: 'X' })).code, 'unknown-type')
// an intent whose slice HAS landed answers on its fields (empty token.create = invalid)
assert.equal((await gm.ws.request({ t: 'token.create', scene: 1 })).code, 'invalid')
// the reserved FFF hook is refused for everyone and is never ok
const act = await gm.ws.request({ t: 'act.do', actor: 1, action: 'x', args: {} })
assert.equal(act.ok, false)