@chipschat/protocol 0.0.0-stage → 1.0.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/LICENSE +201 -0
- package/README.md +56 -2
- package/dist/envelope.d.ts +54 -0
- package/dist/envelope.d.ts.map +1 -0
- package/dist/envelope.js +48 -0
- package/dist/envelope.js.map +1 -0
- package/dist/events/agent-to-chips.d.ts +27 -0
- package/dist/events/agent-to-chips.d.ts.map +1 -0
- package/dist/events/agent-to-chips.js +392 -0
- package/dist/events/agent-to-chips.js.map +1 -0
- package/dist/events/catalogue.d.ts +48 -0
- package/dist/events/catalogue.d.ts.map +1 -0
- package/dist/events/catalogue.js +67 -0
- package/dist/events/catalogue.js.map +1 -0
- package/dist/events/chips-to-agent.d.ts +24 -0
- package/dist/events/chips-to-agent.d.ts.map +1 -0
- package/dist/events/chips-to-agent.js +324 -0
- package/dist/events/chips-to-agent.js.map +1 -0
- package/dist/events/chips-to-harness.d.ts +24 -0
- package/dist/events/chips-to-harness.d.ts.map +1 -0
- package/dist/events/chips-to-harness.js +324 -0
- package/dist/events/chips-to-harness.js.map +1 -0
- package/dist/events/harness-to-chips.d.ts +27 -0
- package/dist/events/harness-to-chips.d.ts.map +1 -0
- package/dist/events/harness-to-chips.js +390 -0
- package/dist/events/harness-to-chips.js.map +1 -0
- package/dist/events/index.d.ts +6 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +5 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/workspace.d.ts +19 -0
- package/dist/events/workspace.d.ts.map +1 -0
- package/dist/events/workspace.js +79 -0
- package/dist/events/workspace.js.map +1 -0
- package/dist/frames.d.ts +175 -0
- package/dist/frames.d.ts.map +1 -0
- package/dist/frames.js +161 -0
- package/dist/frames.js.map +1 -0
- package/dist/generated/types.d.ts +4052 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +7 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/ids/index.d.ts +3 -0
- package/dist/ids/index.d.ts.map +1 -0
- package/dist/ids/index.js +2 -0
- package/dist/ids/index.js.map +1 -0
- package/dist/ids/ulid.d.ts +83 -0
- package/dist/ids/ulid.d.ts.map +1 -0
- package/dist/ids/ulid.js +199 -0
- package/dist/ids/ulid.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/primitives.d.ts +194 -0
- package/dist/primitives.d.ts.map +1 -0
- package/dist/primitives.js +193 -0
- package/dist/primitives.js.map +1 -0
- package/dist/src/address.d.ts +106 -0
- package/dist/src/address.d.ts.map +1 -0
- package/dist/src/address.js +141 -0
- package/dist/src/address.js.map +1 -0
- package/dist/src/agent-context-windows.d.ts +235 -0
- package/dist/src/agent-context-windows.d.ts.map +1 -0
- package/dist/src/agent-context-windows.js +213 -0
- package/dist/src/agent-context-windows.js.map +1 -0
- package/dist/src/agent-heartbeats.d.ts +106 -0
- package/dist/src/agent-heartbeats.d.ts.map +1 -0
- package/dist/src/agent-heartbeats.js +111 -0
- package/dist/src/agent-heartbeats.js.map +1 -0
- package/dist/src/agent-models.d.ts +158 -0
- package/dist/src/agent-models.d.ts.map +1 -0
- package/dist/src/agent-models.js +171 -0
- package/dist/src/agent-models.js.map +1 -0
- package/dist/src/agent-place.d.ts +76 -0
- package/dist/src/agent-place.d.ts.map +1 -0
- package/dist/src/agent-place.js +80 -0
- package/dist/src/agent-place.js.map +1 -0
- package/dist/src/agents.d.ts +24 -0
- package/dist/src/agents.d.ts.map +1 -0
- package/dist/src/agents.js +58 -0
- package/dist/src/agents.js.map +1 -0
- package/dist/src/capabilities.d.ts +121 -0
- package/dist/src/capabilities.d.ts.map +1 -0
- package/dist/src/capabilities.js +120 -0
- package/dist/src/capabilities.js.map +1 -0
- package/dist/src/checklist.d.ts +19 -0
- package/dist/src/checklist.d.ts.map +1 -0
- package/dist/src/checklist.js +22 -0
- package/dist/src/checklist.js.map +1 -0
- package/dist/src/commands.d.ts +50 -0
- package/dist/src/commands.d.ts.map +1 -0
- package/dist/src/commands.js +274 -0
- package/dist/src/commands.js.map +1 -0
- package/dist/src/connectors.d.ts +90 -0
- package/dist/src/connectors.d.ts.map +1 -0
- package/dist/src/connectors.js +119 -0
- package/dist/src/connectors.js.map +1 -0
- package/dist/src/context-files.d.ts +304 -0
- package/dist/src/context-files.d.ts.map +1 -0
- package/dist/src/context-files.js +247 -0
- package/dist/src/context-files.js.map +1 -0
- package/dist/src/context.d.ts +369 -0
- package/dist/src/context.d.ts.map +1 -0
- package/dist/src/context.js +526 -0
- package/dist/src/context.js.map +1 -0
- package/dist/src/direct-asks.d.ts +36 -0
- package/dist/src/direct-asks.d.ts.map +1 -0
- package/dist/src/direct-asks.js +43 -0
- package/dist/src/direct-asks.js.map +1 -0
- package/dist/src/envelope.d.ts +70 -0
- package/dist/src/envelope.d.ts.map +1 -0
- package/dist/src/envelope.js +46 -0
- package/dist/src/envelope.js.map +1 -0
- package/dist/src/events/catalogue.d.ts +50 -0
- package/dist/src/events/catalogue.d.ts.map +1 -0
- package/dist/src/events/catalogue.js +70 -0
- package/dist/src/events/catalogue.js.map +1 -0
- package/dist/src/events/chips-to-harness.d.ts +37 -0
- package/dist/src/events/chips-to-harness.d.ts.map +1 -0
- package/dist/src/events/chips-to-harness.js +511 -0
- package/dist/src/events/chips-to-harness.js.map +1 -0
- package/dist/src/events/harness-to-chips.d.ts +38 -0
- package/dist/src/events/harness-to-chips.d.ts.map +1 -0
- package/dist/src/events/harness-to-chips.js +593 -0
- package/dist/src/events/harness-to-chips.js.map +1 -0
- package/dist/src/events/index.d.ts +6 -0
- package/dist/src/events/index.d.ts.map +1 -0
- package/dist/src/events/index.js +5 -0
- package/dist/src/events/index.js.map +1 -0
- package/dist/src/events/workspace.d.ts +222 -0
- package/dist/src/events/workspace.d.ts.map +1 -0
- package/dist/src/events/workspace.js +1039 -0
- package/dist/src/events/workspace.js.map +1 -0
- package/dist/src/exchange.d.ts +262 -0
- package/dist/src/exchange.d.ts.map +1 -0
- package/dist/src/exchange.js +413 -0
- package/dist/src/exchange.js.map +1 -0
- package/dist/src/first-names.d.ts +29 -0
- package/dist/src/first-names.d.ts.map +1 -0
- package/dist/src/first-names.js +80 -0
- package/dist/src/first-names.js.map +1 -0
- package/dist/src/frames.d.ts +526 -0
- package/dist/src/frames.d.ts.map +1 -0
- package/dist/src/frames.js +346 -0
- package/dist/src/frames.js.map +1 -0
- package/dist/src/harness-jobs.d.ts +313 -0
- package/dist/src/harness-jobs.d.ts.map +1 -0
- package/dist/src/harness-jobs.js +210 -0
- package/dist/src/harness-jobs.js.map +1 -0
- package/dist/src/ids/index.d.ts +3 -0
- package/dist/src/ids/index.d.ts.map +1 -0
- package/dist/src/ids/index.js +2 -0
- package/dist/src/ids/index.js.map +1 -0
- package/dist/src/ids/ulid.d.ts +96 -0
- package/dist/src/ids/ulid.d.ts.map +1 -0
- package/dist/src/ids/ulid.js +212 -0
- package/dist/src/ids/ulid.js.map +1 -0
- package/dist/src/index.d.ts +81 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +47 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/invite-link.d.ts +64 -0
- package/dist/src/invite-link.d.ts.map +1 -0
- package/dist/src/invite-link.js +99 -0
- package/dist/src/invite-link.js.map +1 -0
- package/dist/src/join.d.ts +188 -0
- package/dist/src/join.d.ts.map +1 -0
- package/dist/src/join.js +190 -0
- package/dist/src/join.js.map +1 -0
- package/dist/src/limits.d.ts +50 -0
- package/dist/src/limits.d.ts.map +1 -0
- package/dist/src/limits.js +106 -0
- package/dist/src/limits.js.map +1 -0
- package/dist/src/matters.d.ts +22 -0
- package/dist/src/matters.d.ts.map +1 -0
- package/dist/src/matters.js +26 -0
- package/dist/src/matters.js.map +1 -0
- package/dist/src/mentions.d.ts +63 -0
- package/dist/src/mentions.d.ts.map +1 -0
- package/dist/src/mentions.js +129 -0
- package/dist/src/mentions.js.map +1 -0
- package/dist/src/names.d.ts +58 -0
- package/dist/src/names.d.ts.map +1 -0
- package/dist/src/names.js +192 -0
- package/dist/src/names.js.map +1 -0
- package/dist/src/no-reply.d.ts +17 -0
- package/dist/src/no-reply.d.ts.map +1 -0
- package/dist/src/no-reply.js +48 -0
- package/dist/src/no-reply.js.map +1 -0
- package/dist/src/notifications.d.ts +81 -0
- package/dist/src/notifications.d.ts.map +1 -0
- package/dist/src/notifications.js +65 -0
- package/dist/src/notifications.js.map +1 -0
- package/dist/src/pages.d.ts +32 -0
- package/dist/src/pages.d.ts.map +1 -0
- package/dist/src/pages.js +32 -0
- package/dist/src/pages.js.map +1 -0
- package/dist/src/pairing.d.ts +99 -0
- package/dist/src/pairing.d.ts.map +1 -0
- package/dist/src/pairing.js +163 -0
- package/dist/src/pairing.js.map +1 -0
- package/dist/src/primitives.d.ts +267 -0
- package/dist/src/primitives.d.ts.map +1 -0
- package/dist/src/primitives.js +279 -0
- package/dist/src/primitives.js.map +1 -0
- package/dist/src/project.d.ts +335 -0
- package/dist/src/project.d.ts.map +1 -0
- package/dist/src/project.js +499 -0
- package/dist/src/project.js.map +1 -0
- package/dist/src/ranges.d.ts +31 -0
- package/dist/src/ranges.d.ts.map +1 -0
- package/dist/src/ranges.js +51 -0
- package/dist/src/ranges.js.map +1 -0
- package/dist/src/relay.d.ts +177 -0
- package/dist/src/relay.d.ts.map +1 -0
- package/dist/src/relay.js +147 -0
- package/dist/src/relay.js.map +1 -0
- package/dist/src/room-files.d.ts +146 -0
- package/dist/src/room-files.d.ts.map +1 -0
- package/dist/src/room-files.js +135 -0
- package/dist/src/room-files.js.map +1 -0
- package/dist/src/room-note.d.ts +213 -0
- package/dist/src/room-note.d.ts.map +1 -0
- package/dist/src/room-note.js +457 -0
- package/dist/src/room-note.js.map +1 -0
- package/dist/src/space-icons.d.ts +68 -0
- package/dist/src/space-icons.d.ts.map +1 -0
- package/dist/src/space-icons.js +142 -0
- package/dist/src/space-icons.js.map +1 -0
- package/dist/src/spend.d.ts +57 -0
- package/dist/src/spend.d.ts.map +1 -0
- package/dist/src/spend.js +94 -0
- package/dist/src/spend.js.map +1 -0
- package/dist/src/visibility.d.ts +170 -0
- package/dist/src/visibility.d.ts.map +1 -0
- package/dist/src/visibility.js +218 -0
- package/dist/src/visibility.js.map +1 -0
- package/fixtures/agent.asked.json +15 -0
- package/fixtures/agent.attached.json +15 -0
- package/fixtures/agent.deleted.json +16 -0
- package/fixtures/agent.fork.json +14 -0
- package/fixtures/agent.lock_set.json +13 -0
- package/fixtures/agent.registered.json +17 -0
- package/fixtures/agent.released.json +16 -0
- package/fixtures/agent.updated.json +14 -0
- package/fixtures/approval.executed.json +16 -0
- package/fixtures/approval.request.json +45 -0
- package/fixtures/approval.resolved.json +20 -0
- package/fixtures/approval.routed.json +20 -0
- package/fixtures/artifact.create.json +18 -0
- package/fixtures/attachment.fetched.json +15 -0
- package/fixtures/attachment.limits_set.json +15 -0
- package/fixtures/budget.warning.json +20 -0
- package/fixtures/checkpoint.json +16 -0
- package/fixtures/context.compacted.json +16 -0
- package/fixtures/context.usage.json +17 -0
- package/fixtures/exchange.limits_set.json +15 -0
- package/fixtures/exchange.set.json +13 -0
- package/fixtures/feedback.json +21 -0
- package/fixtures/frames/ack.json +6 -0
- package/fixtures/frames/context.edit.json +11 -0
- package/fixtures/frames/context_window.change.json +9 -0
- package/fixtures/frames/context_window.compact.json +8 -0
- package/fixtures/frames/error.json +6 -0
- package/fixtures/frames/event.json +20 -0
- package/fixtures/frames/events.json +39 -0
- package/fixtures/frames/folder.open.json +6 -0
- package/fixtures/frames/folder.open.page.json +7 -0
- package/fixtures/frames/folder.run.json +8 -0
- package/fixtures/frames/folder.run_state.json +12 -0
- package/fixtures/frames/heartbeat.change.json +10 -0
- package/fixtures/frames/hello.json +18 -0
- package/fixtures/frames/job.change.json +9 -0
- package/fixtures/frames/join.json +19 -0
- package/fixtures/frames/model.change.json +10 -0
- package/fixtures/frames/ping.json +4 -0
- package/fixtures/frames/pong.json +4 -0
- package/fixtures/frames/presence.json +12 -0
- package/fixtures/frames/receipt.json +5 -0
- package/fixtures/frames/restart.json +5 -0
- package/fixtures/frames/subscribe.json +6 -0
- package/fixtures/handoff.json +20 -0
- package/fixtures/harness.removed.json +15 -0
- package/fixtures/harness.transferred.json +15 -0
- package/fixtures/hello.json +61 -0
- package/fixtures/join.allowed.json +20 -0
- package/fixtures/join.denied.json +17 -0
- package/fixtures/lane.updated.json +17 -0
- package/fixtures/membership.added.json +16 -0
- package/fixtures/membership.removed.json +14 -0
- package/fixtures/membership.replaced.json +15 -0
- package/fixtures/message.deleted.json +15 -0
- package/fixtures/message.edited.json +15 -0
- package/fixtures/message.handed.json +14 -0
- package/fixtures/message.heard.json +14 -0
- package/fixtures/message.held.json +14 -0
- package/fixtures/message.hidden.json +14 -0
- package/fixtures/message.new.json +96 -0
- package/fixtures/message.overheard.json +22 -0
- package/fixtures/message.pinned.json +14 -0
- package/fixtures/message.post.json +14 -0
- package/fixtures/message.shown.json +14 -0
- package/fixtures/message.unpinned.json +14 -0
- package/fixtures/person.face_set.json +17 -0
- package/fixtures/person.joined.json +16 -0
- package/fixtures/person.removed.json +16 -0
- package/fixtures/person.renamed.json +14 -0
- package/fixtures/policy.updated.json +30 -0
- package/fixtures/project.changed.json +21 -0
- package/fixtures/question.answered.json +23 -0
- package/fixtures/question.ask.json +37 -0
- package/fixtures/receipt.json +15 -0
- package/fixtures/relay.set.json +12 -0
- package/fixtures/role.changed.json +15 -0
- package/fixtures/run.cancel.json +15 -0
- package/fixtures/run.completed.json +20 -0
- package/fixtures/run.failed.json +20 -0
- package/fixtures/run.pause.json +15 -0
- package/fixtures/run.plan.json +24 -0
- package/fixtures/run.requested.json +34 -0
- package/fixtures/run.resume.json +15 -0
- package/fixtures/run.started.json +33 -0
- package/fixtures/run.status.json +17 -0
- package/fixtures/run.steer.json +21 -0
- package/fixtures/session.ended.json +15 -0
- package/fixtures/session.renamed.json +15 -0
- package/fixtures/session.started.json +17 -0
- package/fixtures/space.claimed.json +15 -0
- package/fixtures/space.created.json +14 -0
- package/fixtures/space.erased.json +13 -0
- package/fixtures/space.lead_set.json +13 -0
- package/fixtures/space.lock_set.json +13 -0
- package/fixtures/space.spend_ceiling_set.json +13 -0
- package/fixtures/space.updated.json +14 -0
- package/fixtures/step.log.json +26 -0
- package/fixtures/task.json +22 -0
- package/fixtures/turn.passed.json +14 -0
- package/fixtures/usage.json +21 -0
- package/fixtures/workspace.renamed.json +13 -0
- package/generated/agent-connect.json +13966 -0
- package/generated/schema/agent.asked.json +114 -0
- package/generated/schema/agent.attached.json +465 -0
- package/generated/schema/agent.deleted.json +127 -0
- package/generated/schema/agent.fork.json +107 -0
- package/generated/schema/agent.lock_set.json +105 -0
- package/generated/schema/agent.registered.json +130 -0
- package/generated/schema/agent.released.json +129 -0
- package/generated/schema/agent.updated.json +151 -0
- package/generated/schema/approval.executed.json +125 -0
- package/generated/schema/approval.request.json +279 -0
- package/generated/schema/approval.resolved.json +162 -0
- package/generated/schema/approval.routed.json +185 -0
- package/generated/schema/artifact.create.json +206 -0
- package/generated/schema/attachment.fetched.json +114 -0
- package/generated/schema/attachment.limits_set.json +136 -0
- package/generated/schema/budget.warning.json +152 -0
- package/generated/schema/checkpoint.json +111 -0
- package/generated/schema/context.compacted.json +124 -0
- package/generated/schema/context.usage.json +120 -0
- package/generated/schema/exchange.limits_set.json +127 -0
- package/generated/schema/exchange.set.json +144 -0
- package/generated/schema/feedback.json +173 -0
- package/generated/schema/handoff.json +122 -0
- package/generated/schema/harness.removed.json +122 -0
- package/generated/schema/harness.transferred.json +117 -0
- package/generated/schema/hello.json +509 -0
- package/generated/schema/join.allowed.json +176 -0
- package/generated/schema/join.denied.json +150 -0
- package/generated/schema/lane.updated.json +223 -0
- package/generated/schema/membership.added.json +153 -0
- package/generated/schema/membership.removed.json +126 -0
- package/generated/schema/membership.replaced.json +106 -0
- package/generated/schema/message.deleted.json +105 -0
- package/generated/schema/message.edited.json +107 -0
- package/generated/schema/message.handed.json +111 -0
- package/generated/schema/message.heard.json +100 -0
- package/generated/schema/message.held.json +181 -0
- package/generated/schema/message.hidden.json +100 -0
- package/generated/schema/message.new.json +1369 -0
- package/generated/schema/message.overheard.json +701 -0
- package/generated/schema/message.pinned.json +100 -0
- package/generated/schema/message.post.json +290 -0
- package/generated/schema/message.shown.json +100 -0
- package/generated/schema/message.unpinned.json +100 -0
- package/generated/schema/person.face_set.json +134 -0
- package/generated/schema/person.joined.json +128 -0
- package/generated/schema/person.removed.json +133 -0
- package/generated/schema/person.renamed.json +114 -0
- package/generated/schema/policy.updated.json +277 -0
- package/generated/schema/project.changed.json +199 -0
- package/generated/schema/question.answered.json +154 -0
- package/generated/schema/question.ask.json +194 -0
- package/generated/schema/receipt.json +109 -0
- package/generated/schema/relay.set.json +99 -0
- package/generated/schema/role.changed.json +116 -0
- package/generated/schema/run.cancel.json +106 -0
- package/generated/schema/run.completed.json +139 -0
- package/generated/schema/run.failed.json +135 -0
- package/generated/schema/run.pause.json +106 -0
- package/generated/schema/run.plan.json +128 -0
- package/generated/schema/run.requested.json +309 -0
- package/generated/schema/run.resume.json +106 -0
- package/generated/schema/run.started.json +142 -0
- package/generated/schema/run.status.json +120 -0
- package/generated/schema/run.steer.json +163 -0
- package/generated/schema/session.ended.json +106 -0
- package/generated/schema/session.renamed.json +108 -0
- package/generated/schema/session.started.json +116 -0
- package/generated/schema/space.claimed.json +107 -0
- package/generated/schema/space.created.json +148 -0
- package/generated/schema/space.erased.json +129 -0
- package/generated/schema/space.lead_set.json +108 -0
- package/generated/schema/space.lock_set.json +99 -0
- package/generated/schema/space.spend_ceiling_set.json +102 -0
- package/generated/schema/space.updated.json +112 -0
- package/generated/schema/step.log.json +187 -0
- package/generated/schema/task.json +268 -0
- package/generated/schema/turn.passed.json +99 -0
- package/generated/schema/usage.json +155 -0
- package/generated/schema/workspace.renamed.json +107 -0
- package/generated/types.ts +4178 -0
- package/package.json +37 -3
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What an agent is told of the room with each turn (ADR 0092): who is in it, how to reach each of
|
|
3
|
+
* them with an @, and what an @ does.
|
|
4
|
+
*
|
|
5
|
+
* Chips knows the room and its rules; a harness knew only what it had heard. So Chips words the
|
|
6
|
+
* note, once, here, and sends it on `message.new` as `room`: the members, each with the handle
|
|
7
|
+
* that reaches them, and the note itself for each who takes the turn. The server that sends it,
|
|
8
|
+
* the conformance fake that plays the server and the SDK that hands it over read the same words.
|
|
9
|
+
* It no longer says when Chips holds the agents (ADR 0187): the referee's warning says that, when
|
|
10
|
+
* it matters, in the workspace's own numbers.
|
|
11
|
+
*
|
|
12
|
+
* Each agent is listed with the harness it runs on (ADR 0101): "ASCII Art (Jacobian agent,
|
|
13
|
+
* @ASCIIArt)". A brief that said "Jacobian is the lead" left two agents asking "@Jacobian" in a room
|
|
14
|
+
* where Jacobian's agent was called ASCII Art.
|
|
15
|
+
*
|
|
16
|
+
* A room may have a lead (ADR 0104): the agent that hands out the work, and that Chips hands what
|
|
17
|
+
* was nobody's turn once the room goes still. The note says who it is, which of the others have a
|
|
18
|
+
* turn going and how long each has been without one, and, to the one taking the turn, what is
|
|
19
|
+
* news to it: that it has just joined, who joined since it last spoke, or, to the lead, that this
|
|
20
|
+
* message is its because it was nobody's. People in a team see all that for themselves; an agent
|
|
21
|
+
* exists only in its turns, so Chips says it at the top of each. And when older lines of what was
|
|
22
|
+
* said since its last turn were left out of the turn, it says that too (ADR 0105).
|
|
23
|
+
*
|
|
24
|
+
* In a room with other agents, every taker is told it may answer `NO_REPLY` when a message asks
|
|
25
|
+
* nothing of it now, and the lead that a step handed from one agent to another needs no word from
|
|
26
|
+
* it (ADR 0109). ASCII Art's OpenClaw agents, named for a step that was theirs later, said "Ready
|
|
27
|
+
* for J2's updated HTML", and J1, copied on each hand-off, said it again to the next agent.
|
|
28
|
+
*/
|
|
29
|
+
import { z } from "zod";
|
|
30
|
+
import { type JobSpend } from "./spend.js";
|
|
31
|
+
export declare const roomMember: z.ZodObject<{
|
|
32
|
+
participant_id: z.ZodString;
|
|
33
|
+
kind: z.ZodEnum<{
|
|
34
|
+
person: "person";
|
|
35
|
+
harness: "harness";
|
|
36
|
+
agent: "agent";
|
|
37
|
+
}>;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
harness: z.ZodOptional<z.ZodString>;
|
|
40
|
+
handle: z.ZodOptional<z.ZodString>;
|
|
41
|
+
lead: z.ZodOptional<z.ZodLiteral<true>>;
|
|
42
|
+
time_zone: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type RoomMember = z.infer<typeof roomMember>;
|
|
45
|
+
export declare const roomWork: z.ZodObject<{
|
|
46
|
+
participant_id: z.ZodString;
|
|
47
|
+
minutes: z.ZodInt;
|
|
48
|
+
step: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export type RoomWork = z.infer<typeof roomWork>;
|
|
51
|
+
export declare const roomIdle: z.ZodObject<{
|
|
52
|
+
participant_id: z.ZodString;
|
|
53
|
+
minutes: z.ZodInt;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type RoomIdle = z.infer<typeof roomIdle>;
|
|
56
|
+
export declare const roomNote: z.ZodObject<{
|
|
57
|
+
members: z.ZodArray<z.ZodObject<{
|
|
58
|
+
participant_id: z.ZodString;
|
|
59
|
+
kind: z.ZodEnum<{
|
|
60
|
+
person: "person";
|
|
61
|
+
harness: "harness";
|
|
62
|
+
agent: "agent";
|
|
63
|
+
}>;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
harness: z.ZodOptional<z.ZodString>;
|
|
66
|
+
handle: z.ZodOptional<z.ZodString>;
|
|
67
|
+
lead: z.ZodOptional<z.ZodLiteral<true>>;
|
|
68
|
+
time_zone: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
notes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
71
|
+
rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
72
|
+
working: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
73
|
+
participant_id: z.ZodString;
|
|
74
|
+
minutes: z.ZodInt;
|
|
75
|
+
step: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strip>>>;
|
|
77
|
+
idle: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
78
|
+
participant_id: z.ZodString;
|
|
79
|
+
minutes: z.ZodInt;
|
|
80
|
+
}, z.core.$strip>>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
export type RoomNote = z.infer<typeof roomNote>;
|
|
83
|
+
/** A member as the server and the fake know them. */
|
|
84
|
+
export interface NoteMember {
|
|
85
|
+
readonly id: string;
|
|
86
|
+
readonly kind: "person" | "agent";
|
|
87
|
+
readonly name: string;
|
|
88
|
+
/**
|
|
89
|
+
* For an agent, its harness's name; for a harness waiting under the first name its room holds
|
|
90
|
+
* for its agent, its own (ADR 0150).
|
|
91
|
+
*/
|
|
92
|
+
readonly harness?: string | undefined;
|
|
93
|
+
/** The room's lead (ADR 0104). */
|
|
94
|
+
readonly lead?: boolean | undefined;
|
|
95
|
+
/** For a person, the IANA zone of their newest phone (ADR 0157). */
|
|
96
|
+
readonly timeZone?: string | undefined;
|
|
97
|
+
}
|
|
98
|
+
/** Who has a turn going in the room, and how long the others have been without one (ADR 0104). */
|
|
99
|
+
export interface RoomNow {
|
|
100
|
+
readonly working: readonly RoomWork[];
|
|
101
|
+
readonly idle: readonly RoomIdle[];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* What is news to one who takes the turn (ADR 0104), with who did it by name: that it joined the
|
|
105
|
+
* room and has not spoken there since; who joined since it last spoke there; to the lead, that
|
|
106
|
+
* the message is its because it was nobody's turn, who said it, and which person to tell; or that
|
|
107
|
+
* the message is the taker's though nobody @-mentioned it.
|
|
108
|
+
*/
|
|
109
|
+
export interface TakerNews {
|
|
110
|
+
readonly joined?: {
|
|
111
|
+
readonly minutes: number;
|
|
112
|
+
readonly by?: string | undefined;
|
|
113
|
+
/** Whether the room has files, which the turn lists at their current versions. */
|
|
114
|
+
readonly files: boolean;
|
|
115
|
+
};
|
|
116
|
+
readonly newcomers?: readonly {
|
|
117
|
+
readonly id: string;
|
|
118
|
+
readonly by?: string | undefined;
|
|
119
|
+
}[];
|
|
120
|
+
readonly nobodys?: {
|
|
121
|
+
readonly saidBy: string;
|
|
122
|
+
readonly tell?: string | undefined;
|
|
123
|
+
};
|
|
124
|
+
/** That the message is the taker's though it has no @ for it, and who sent it (`yoursWithoutAt`). */
|
|
125
|
+
readonly yours?: {
|
|
126
|
+
readonly saidBy: string;
|
|
127
|
+
};
|
|
128
|
+
/** That the message went to every agent here, and who sent it (`toEveryAgent`, ADR 0249). */
|
|
129
|
+
readonly toAll?: {
|
|
130
|
+
readonly saidBy: string;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* How many lines of what was said since its last turn come with this one, when older ones were
|
|
134
|
+
* left out to fit its harness's budget (ADR 0105).
|
|
135
|
+
*/
|
|
136
|
+
readonly cut?: {
|
|
137
|
+
readonly shown: number;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The handle that reaches a member among these, with its @: the whole name without spaces, else
|
|
142
|
+
* the first word, whichever is a handle a text can hold and names them (ADR 0091). Its own case,
|
|
143
|
+
* so `@OpenClaw2` rather than `@openclaw2`.
|
|
144
|
+
*/
|
|
145
|
+
export declare function noteHandle(member: NoteMember, members: readonly NoteMember[]): string | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* The members as the note lists them, each with its handle: people first, then agents, each by
|
|
148
|
+
* name, numbers in order ("OpenClaw 2" before "OpenClaw 10"). Not the order they joined, which two
|
|
149
|
+
* Chipses can break a tie in differently; this reads the same from both.
|
|
150
|
+
*/
|
|
151
|
+
export declare function roomMembers(members: readonly NoteMember[]): RoomMember[];
|
|
152
|
+
/**
|
|
153
|
+
* The note for one who takes the turn:
|
|
154
|
+
*
|
|
155
|
+
* > In this room: Arjun (person, @Arjun), ASCII Art (Jacobian agent, @ASCIIArt), and you,
|
|
156
|
+
* > OpenClaw 2 (OpenClaw agent, @OpenClaw2). ASCII Art leads here: it hands out the work, and what
|
|
157
|
+
* > is nobody's turn goes to it. Working now: O1, 2 minutes in (last step: Editing
|
|
158
|
+
* > ascii-alphabet.html). Not working: ASCII Art for 3 minutes. This job has spent $1.20 of the
|
|
159
|
+
* > $3.00 this room allows a job; at $3.00 Chips holds the agents until a person acts. Everyone
|
|
160
|
+
* > here reads what you write; only those you @-mention act on it. To hand work to an agent or ask
|
|
161
|
+
* > it something, @-mention it. If a message asks nothing of you now, as when it names a step that
|
|
162
|
+
* > is yours later, answer NO_REPLY and nothing else: the room shows nothing, and nobody needs to
|
|
163
|
+
* > hear that you are ready or waiting.
|
|
164
|
+
*
|
|
165
|
+
* What is news to the taker comes first (ADR 0104): the lead's "Nobody has this turn", "You joined
|
|
166
|
+
* this room", "New since your last turn". What the job has spent comes after who is working, when
|
|
167
|
+
* Chips said (ADR 0117), in a room with other agents or none. The note ends with its rules
|
|
168
|
+
* (`roomRules`, ADR 0250), the same from turn to turn: with no other agent in the room, only
|
|
169
|
+
* "Everyone here reads what you write."
|
|
170
|
+
*
|
|
171
|
+
* Given the instant the turn is sent (`at`), each person's time there follows the room's line
|
|
172
|
+
* (ADR 0157): "Arjun's time now: 9:12 am, Tuesday 13 October 2026 (2026-10-13T09:12-07:00,
|
|
173
|
+
* America/Los_Angeles)." An agent asked for something at 10am, or in 50 minutes, has the date,
|
|
174
|
+
* the clock and the offset to write it with.
|
|
175
|
+
*/
|
|
176
|
+
export declare function renderRoomNote(members: readonly RoomMember[], youId: string, now?: RoomNow, news?: TakerNews, spend?: JobSpend, at?: string): string;
|
|
177
|
+
/**
|
|
178
|
+
* How the space works, the words a taker's note ends with (ADR 0250): that everyone here reads what
|
|
179
|
+
* it writes, and beside other agents, what an @ does and when to answer NO_REPLY. They stay the same
|
|
180
|
+
* from turn to turn while the space's agents do. Said with every turn, they were a quarter of what a
|
|
181
|
+
* turn in a busy room carried, and in a session that keeps its turns they piled up, so `message.new`
|
|
182
|
+
* carries them apart too (`room.rules`) for a harness to say once a session.
|
|
183
|
+
*/
|
|
184
|
+
export declare function roomRules(members: readonly RoomMember[], youId: string): string;
|
|
185
|
+
/**
|
|
186
|
+
* A taker's note without the rules it ends with (ADR 0250), for a turn whose session already holds
|
|
187
|
+
* them: the whole note from a Chips that sent no rules, and nothing for a taker with no note.
|
|
188
|
+
*/
|
|
189
|
+
export declare function noteWithoutRules(room: Pick<RoomNote, "notes" | "rules"> | undefined, taker: string): string | undefined;
|
|
190
|
+
export declare const MONTHS: readonly ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
191
|
+
/**
|
|
192
|
+
* Whether a message is for this taker though it does not @ it (ADR 0081): its sender chose it in
|
|
193
|
+
* the composer, answered its words, or wrote on to it. Not one for every agent, nor one that
|
|
194
|
+
* @-mentions it. Its note says so beside other agents, where it otherwise reads that only those
|
|
195
|
+
* @-mentioned act, and an agent that was not the lead took a person's choice as nobody's turn
|
|
196
|
+
* (ADR 0104 addendum, 15 October 2026).
|
|
197
|
+
*/
|
|
198
|
+
export declare function yoursWithoutAt(payload: Readonly<Record<string, unknown>>, taker: string): boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Whether a message went to every agent in the room (ADR 0081's All). Its note says so beside other
|
|
201
|
+
* agents (ADR 0249), where it otherwise reads that only those @-mentioned act: in a room of four
|
|
202
|
+
* agents on 30 October 2026 the lead passed a person's question for all of them on with an @ to the
|
|
203
|
+
* three who already had it, one of them had asked the others the same, and each answered twice.
|
|
204
|
+
*/
|
|
205
|
+
export declare function toEveryAgent(payload: Readonly<Record<string, unknown>>): boolean;
|
|
206
|
+
/**
|
|
207
|
+
* The room as `message.new` carries it: the members, and a note for each who takes the turn; with
|
|
208
|
+
* who has a turn going when Chips said (ADR 0104), what is news to each taker, what the job has
|
|
209
|
+
* spent (ADR 0117), and each person's time at the instant it is sent (`at`, ADR 0157); and the
|
|
210
|
+
* rules each note ends with (ADR 0250).
|
|
211
|
+
*/
|
|
212
|
+
export declare function roomNoteFor(members: readonly NoteMember[], takers: readonly string[], now?: RoomNow, news?: Readonly<Record<string, TakerNews>>, spend?: JobSpend, at?: string): RoomNote;
|
|
213
|
+
//# sourceMappingURL=room-note.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-note.d.ts","sourceRoot":"","sources":["../../src/room-note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,QAAQ,EAAc,MAAM,YAAY,CAAC;AAEvD,eAAO,MAAM,UAAU;;;;;;;;;;;;iBAqCrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,QAAQ;;;;iBASnB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,eAAO,MAAM,QAAQ;;;iBAMnB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;iBA8BnB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,qDAAqD;AACrD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IAClC,QA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