@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,511 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events Chips sends to a harness.
|
|
3
|
+
*
|
|
4
|
+
* The harness keeps its own loop, memory and tools. What it gains is structured asks and a
|
|
5
|
+
* stable multi-user story: it sees a sender id and a role, and treats Chips as one trusted
|
|
6
|
+
* account (blueprint, Connect).
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import { replyingTo, roomContext } from "../context.js";
|
|
10
|
+
import { defineEvent } from "../envelope.js";
|
|
11
|
+
import { deliveredExchange } from "../exchange.js";
|
|
12
|
+
import { agentId, autonomyLevel, budget, id, isoTimestamp, participantRef, policy, sessionRef, signedAttachment, trailEntry, } from "../primitives.js";
|
|
13
|
+
import { roomNote } from "../room-note.js";
|
|
14
|
+
const harnessManifest = z
|
|
15
|
+
.object({
|
|
16
|
+
harness_id: id("harness"),
|
|
17
|
+
display_name: z.string().min(1).max(120).describe("The harness's name in the workspace."),
|
|
18
|
+
owner_id: id("person").describe("The person accountable for this harness."),
|
|
19
|
+
capabilities: z
|
|
20
|
+
.array(z.string().max(120))
|
|
21
|
+
.max(64)
|
|
22
|
+
.optional()
|
|
23
|
+
.describe("What the harness can do."),
|
|
24
|
+
ephemeral: z
|
|
25
|
+
.boolean()
|
|
26
|
+
.default(false)
|
|
27
|
+
.describe("True for a transient child minted for one lane, which inherits its lead's settings."),
|
|
28
|
+
})
|
|
29
|
+
.describe("The harness this connection is, as Chips knows it.");
|
|
30
|
+
/** One of the harness's agents, as its `hello` lists them (ADR 0087). */
|
|
31
|
+
const agentManifest = z
|
|
32
|
+
.object({
|
|
33
|
+
agent_id: id("agent"),
|
|
34
|
+
key: z.string().min(1).max(400).describe("The harness's own name for it."),
|
|
35
|
+
name: z.string().min(1).max(120).describe("What it is called, and so its @handle."),
|
|
36
|
+
lead: z.boolean().describe("Whether it is the harness's Main agent."),
|
|
37
|
+
state: z.enum(["active", "archived"]).describe("Archived when its thing was put away."),
|
|
38
|
+
spaces: z
|
|
39
|
+
.array(id("space"))
|
|
40
|
+
.max(10_000)
|
|
41
|
+
.describe("The rooms it is in. One at most, once one room per agent is the rule."),
|
|
42
|
+
room: id("space")
|
|
43
|
+
.nullable()
|
|
44
|
+
.optional()
|
|
45
|
+
.describe("The open room it is in (ADR 0087: one at a time), or `null` while it is free. What it says while free is held."),
|
|
46
|
+
held: z
|
|
47
|
+
.int()
|
|
48
|
+
.nonnegative()
|
|
49
|
+
.optional()
|
|
50
|
+
.describe("How many of its words Chips is holding, said while it was in no room."),
|
|
51
|
+
})
|
|
52
|
+
.describe("An agent the harness speaks for.");
|
|
53
|
+
export const hello = defineEvent({
|
|
54
|
+
type: "hello",
|
|
55
|
+
direction: "chips_to_harness",
|
|
56
|
+
sender: "chips",
|
|
57
|
+
summary: "The server's half of the handshake: the protocol range it speaks, and who this connection is.",
|
|
58
|
+
requiresRun: false,
|
|
59
|
+
payload: z.object({
|
|
60
|
+
protocol: z
|
|
61
|
+
.object({
|
|
62
|
+
min: z.int().positive().describe("Oldest major version the server accepts."),
|
|
63
|
+
max: z.int().positive().describe("Newest major version the server speaks."),
|
|
64
|
+
})
|
|
65
|
+
.describe("The negotiated range. A client picks a version inside it or is refused."),
|
|
66
|
+
server: z
|
|
67
|
+
.object({
|
|
68
|
+
name: z.string().min(1).max(120).describe("Usually `chipsd`."),
|
|
69
|
+
version: z.string().min(1).max(60).describe("The server's own version."),
|
|
70
|
+
})
|
|
71
|
+
.describe("Who the client is talking to."),
|
|
72
|
+
harnesses: z
|
|
73
|
+
.array(harnessManifest)
|
|
74
|
+
.min(1)
|
|
75
|
+
.max(64)
|
|
76
|
+
.describe("The harness the token belongs to, and only that one. One connection speaks for all of the harness's agents (ADR 0087), which `agents` lists. A harness running inside another is a lane, not a duplicate."),
|
|
77
|
+
harness: harnessManifest
|
|
78
|
+
.optional()
|
|
79
|
+
.describe("The harness this connection is: `harnesses[0]`, said once. Read this rather than the list."),
|
|
80
|
+
agents: z
|
|
81
|
+
.array(agentManifest)
|
|
82
|
+
.max(10_000)
|
|
83
|
+
.optional()
|
|
84
|
+
.describe("The harness's agents, each with its rooms (ADR 0087). Everything the connection sends names one of them as `actor`; a harness's own id is read as its one agent in the room. Sent only to a harness that declares `agents`."),
|
|
85
|
+
autonomy: autonomyLevel.describe("The level in force for this connection."),
|
|
86
|
+
policy: policy.optional().describe("The rules that fill in the details."),
|
|
87
|
+
budget: budget.optional().describe("The ceiling, and what has been spent."),
|
|
88
|
+
spaces: z
|
|
89
|
+
.array(id("space"))
|
|
90
|
+
.max(10_000)
|
|
91
|
+
.optional()
|
|
92
|
+
.describe("The spaces this credential is a member of as it connects. A client that kept a cache drops what is not here: a membership it lost while away is the one event a replay can never bring it, because it is no longer in the space that event belongs to."),
|
|
93
|
+
workspace: z
|
|
94
|
+
.object({ name: z.string().min(1).max(120) })
|
|
95
|
+
.optional()
|
|
96
|
+
.describe("The workspace as it is called now. A device keeps the name it was told when it paired and takes this one when they differ, so a workspace renamed since is called by its new name without pairing again. Absent when the workspace has no name."),
|
|
97
|
+
}),
|
|
98
|
+
});
|
|
99
|
+
/** The message a reply answers, with its files as URLs this harness may fetch (ADR 0219). */
|
|
100
|
+
const deliveredReply = replyingTo.extend({
|
|
101
|
+
attachments: z
|
|
102
|
+
.array(signedAttachment)
|
|
103
|
+
.max(20)
|
|
104
|
+
.optional()
|
|
105
|
+
.describe("Its files, as the message's own are sent: URLs expire in ten minutes."),
|
|
106
|
+
});
|
|
107
|
+
/** What a harness is told of a message, whether it is for it or overheard: one shape, so the two cannot drift. */
|
|
108
|
+
const deliveredMessage = z.object({
|
|
109
|
+
message_id: id("message"),
|
|
110
|
+
from: participantRef.describe("Who sent it, and whether they are the owner, a member or a guest."),
|
|
111
|
+
text: z.string().max(64_000).describe("Markdown, with mentions resolved to participant ids."),
|
|
112
|
+
attachments: z.array(signedAttachment).max(20).optional().describe("URLs expire in ten minutes."),
|
|
113
|
+
mentions: z
|
|
114
|
+
.array(z.string().max(120))
|
|
115
|
+
.max(64)
|
|
116
|
+
.optional()
|
|
117
|
+
.describe("Participant ids mentioned in the text."),
|
|
118
|
+
reply_to: id("message").optional().describe("The message this answers."),
|
|
119
|
+
replying_to: deliveredReply
|
|
120
|
+
.optional()
|
|
121
|
+
.describe("The message `reply_to` names, as the room reads it now (ADR 0219): who said it, when, its words and its files, and with a turn, when it is older than `context`, the lines said just before it. Put it in the turn ahead of the words; the SDK's `promptFor` does. Absent on a message that answers none, or one no longer in the room."),
|
|
122
|
+
session_ref: sessionRef
|
|
123
|
+
.optional()
|
|
124
|
+
.describe("The visit the sender meant, when they named one (ADR 0040). A harness that works by visits delivers to it rather than choosing, and says so rather than delivering elsewhere when it cannot."),
|
|
125
|
+
addressed_to: z
|
|
126
|
+
.array(agentId)
|
|
127
|
+
.max(64)
|
|
128
|
+
.optional()
|
|
129
|
+
.describe("The agents the message is for, as Chips decided them (ADR 0081, ADR 0087). Absent on a message from before Chips said so, which was for every agent in the space."),
|
|
130
|
+
for: z
|
|
131
|
+
.array(agentId)
|
|
132
|
+
.max(64)
|
|
133
|
+
.optional()
|
|
134
|
+
.describe("Who of this connection takes a turn: its own among `addressed_to` (ADR 0087). Each is one of its agents, or the harness's own id where the harness itself is the member addressed: a room asked of it from the +, until it claims the room. Never empty on a `message.new`, and always empty on a `message.overheard`. Sent only to a harness that declares `agents`; one that has not is told its agents are itself."),
|
|
135
|
+
working_turns: z
|
|
136
|
+
.array(z.object({
|
|
137
|
+
agent_id: agentId.describe("One of this connection's agents."),
|
|
138
|
+
run_id: id("run").describe("Its turn going in the room."),
|
|
139
|
+
}))
|
|
140
|
+
.max(64)
|
|
141
|
+
.optional()
|
|
142
|
+
.describe("This connection's agents with a turn going in the room, other than the one who said it and those it is for (ADR 0106). Hand the words to each of those turns at its next step, as said to somebody else, and start no turn on them; post `message.heard` on the run once a turn has them, and the room shows it heard. A turn that ends first hears nothing, and is handed the words with its agent's next turn (ADR 0105). Absent when there are none."),
|
|
143
|
+
});
|
|
144
|
+
export const messageNew = defineEvent({
|
|
145
|
+
type: "message.new",
|
|
146
|
+
direction: "chips_to_harness",
|
|
147
|
+
sender: "chips",
|
|
148
|
+
summary: "Someone said something, with any attachments as signed URLs the harness can fetch.",
|
|
149
|
+
requiresRun: false,
|
|
150
|
+
payload: deliveredMessage.extend({
|
|
151
|
+
context: roomContext
|
|
152
|
+
.optional()
|
|
153
|
+
.describe("What was said in the room since this harness last spoke there, or since it joined when it has not, up to this message and without it (ADR 0088). From when the turn that said its last words began, so what was said while it worked is here, and its own words are not (ADR 0105). Worked out from the log, so a replay hands over the same lines. As many as the budget the harness gave in its `hello`: 40 lines and 16,000 characters when it gave none, and none when it asked for 0. When older lines were left out, the taker's room note says so."),
|
|
154
|
+
room: roomNote
|
|
155
|
+
.optional()
|
|
156
|
+
.describe("Who is in the room, with the handle that reaches each, and a note for each who takes the turn saying so and what an @ does (ADR 0092). A harness puts `notes[<taker>]` at the top of that turn. Absent on a message in no room."),
|
|
157
|
+
exchange: deliveredExchange
|
|
158
|
+
.optional()
|
|
159
|
+
.describe("How the agents' talk in the room stands, once it is worth a word (ADR 0097): from eight messages between agents since a person last acted or an agent last made something new. A harness puts `note` at the top of the turn, as Chips's, ahead of the room's note. Absent below that, and worked out from the log, so a replay hands over the same facts."),
|
|
160
|
+
handed: z
|
|
161
|
+
.literal(true)
|
|
162
|
+
.optional()
|
|
163
|
+
.describe("Chips held this message when it was said and hands it over now a person has acted (ADR 0097): the newest of an agent's held messages, once; or, with `lead`, hands it to the room's lead. Its seq and id are the hand-over's, its `message_id` the message's own."),
|
|
164
|
+
lead: z
|
|
165
|
+
.literal(true)
|
|
166
|
+
.optional()
|
|
167
|
+
.describe("Handed to the agent taking the turn as the room's lead (ADR 0104): the message was nobody's turn, and the room went still. Its note says so at the top, and `handed` is set too."),
|
|
168
|
+
}),
|
|
169
|
+
});
|
|
170
|
+
export const messageOverheard = defineEvent({
|
|
171
|
+
type: "message.overheard",
|
|
172
|
+
direction: "chips_to_harness",
|
|
173
|
+
sender: "chips",
|
|
174
|
+
summary: "Something said in a space this harness is in, for somebody else: context, not a turn (ADR 0081). A harness with a turn going in the space hands it to that turn at its next step (ADR 0105).",
|
|
175
|
+
requiresRun: false,
|
|
176
|
+
payload: deliveredMessage.extend({
|
|
177
|
+
held: z
|
|
178
|
+
.literal(true)
|
|
179
|
+
.optional()
|
|
180
|
+
.describe("The agents had sent each other more messages than Chips lets through without a person, or a person paused them, so Chips held this one from the agents it named (ADR 0097). The newest held message for each agent is handed over when a person acts."),
|
|
181
|
+
}),
|
|
182
|
+
});
|
|
183
|
+
export const runRequested = defineEvent({
|
|
184
|
+
type: "run.requested",
|
|
185
|
+
direction: "chips_to_harness",
|
|
186
|
+
sender: "chips",
|
|
187
|
+
summary: "A lane arrived from a lead, with the trail that led to it.",
|
|
188
|
+
requiresRun: false,
|
|
189
|
+
payload: z.object({
|
|
190
|
+
lane_id: id("lane"),
|
|
191
|
+
goal: z.string().min(1).max(4000).describe("What is being asked."),
|
|
192
|
+
constraints: z
|
|
193
|
+
.array(z.string().max(500))
|
|
194
|
+
.max(20)
|
|
195
|
+
.optional()
|
|
196
|
+
.describe("Bounds on how to do it."),
|
|
197
|
+
deadline: isoTimestamp.optional().describe("When it is needed by."),
|
|
198
|
+
on_behalf_of: z.string().min(1).max(120).describe("The person the work is ultimately for."),
|
|
199
|
+
requested_by: z.string().min(1).max(120).describe("The lead that routed it."),
|
|
200
|
+
specialist_id: z
|
|
201
|
+
.string()
|
|
202
|
+
.min(1)
|
|
203
|
+
.max(120)
|
|
204
|
+
.describe("The harness this lane runs on, which the run in the envelope belongs to. A lead may name an ephemeral child, which Chips has minted by the time this arrives."),
|
|
205
|
+
agent_id: id("agent")
|
|
206
|
+
.optional()
|
|
207
|
+
.describe("The agent of that harness that works the lane (ADR 0087): its one agent in the lane's room, the one the lead named, a lead's hand-off to one of its own, or a child minted for this lane."),
|
|
208
|
+
trail: z
|
|
209
|
+
.array(trailEntry)
|
|
210
|
+
.max(8)
|
|
211
|
+
.describe("How the work got here. Lanes deeper than three are flattened into steps, not rejected."),
|
|
212
|
+
autonomy: autonomyLevel.describe("The level for this lane."),
|
|
213
|
+
link_to: z
|
|
214
|
+
.array(id("space"))
|
|
215
|
+
.max(10)
|
|
216
|
+
.optional()
|
|
217
|
+
.describe("The lead spaces this lane is linked into, where its route card appears."),
|
|
218
|
+
origin: id("message")
|
|
219
|
+
.optional()
|
|
220
|
+
.describe("The message that caused the routing, quoted in the specialist's task card."),
|
|
221
|
+
attachments: z
|
|
222
|
+
.array(signedAttachment)
|
|
223
|
+
.max(20)
|
|
224
|
+
.optional()
|
|
225
|
+
.describe("Anything the specialist needs."),
|
|
226
|
+
label: z
|
|
227
|
+
.string()
|
|
228
|
+
.min(1)
|
|
229
|
+
.max(120)
|
|
230
|
+
.optional()
|
|
231
|
+
.describe("What the lead calls the specialist on this lane, when that is not its participant name: a Space's name, a subagent's type."),
|
|
232
|
+
}),
|
|
233
|
+
});
|
|
234
|
+
export const approvalResolved = defineEvent({
|
|
235
|
+
type: "approval.resolved",
|
|
236
|
+
direction: "chips_to_harness",
|
|
237
|
+
sender: "either",
|
|
238
|
+
summary: "A decision came back. More than yes or no: it carries a scope, optional edited input, and a reason.",
|
|
239
|
+
requiresRun: true,
|
|
240
|
+
payload: z.object({
|
|
241
|
+
approval_id: id("approval"),
|
|
242
|
+
decision: z
|
|
243
|
+
.enum(["approved", "edited", "denied", "expired"])
|
|
244
|
+
.describe("`expired` means nobody answered and the fallback applied."),
|
|
245
|
+
scope: z
|
|
246
|
+
.enum(["once", "session", "always"])
|
|
247
|
+
.default("once")
|
|
248
|
+
.describe("How far the answer reaches. `always` becomes a policy rule."),
|
|
249
|
+
everywhere: z
|
|
250
|
+
.boolean()
|
|
251
|
+
.optional()
|
|
252
|
+
.describe("With `always`: the rule is the harness's in every space, not only this one (ADR 0239). An owner or an admin only."),
|
|
253
|
+
updated_input: z
|
|
254
|
+
.unknown()
|
|
255
|
+
.optional()
|
|
256
|
+
.describe("The edited action input, when the decision is `edited`."),
|
|
257
|
+
reason: z.string().max(4000).optional().describe("Why. The harness gets to read this."),
|
|
258
|
+
resolved_by: z
|
|
259
|
+
.string()
|
|
260
|
+
.min(1)
|
|
261
|
+
.max(120)
|
|
262
|
+
.describe("The participant who answered, or `system` on expiry — a harness when it settles its own ask, answered in its own tools. Filled in by Chips from the credential that sent it; a value the sender writes is replaced."),
|
|
263
|
+
resolved_at: isoTimestamp.describe("When it was answered. Stamped by Chips."),
|
|
264
|
+
resolved_elsewhere: z
|
|
265
|
+
.boolean()
|
|
266
|
+
.default(false)
|
|
267
|
+
.describe("True on the surfaces that did not answer first. First answer wins."),
|
|
268
|
+
approvers: z
|
|
269
|
+
.array(z.string().min(1).max(120))
|
|
270
|
+
.max(64)
|
|
271
|
+
.optional()
|
|
272
|
+
.describe("Who could answer it, as ids, as they stood when it was decided. Written by Chips from the approval so that somebody named outside the room is sent the decision as well as the ask (ADR 0042); a value the sender writes is replaced."),
|
|
273
|
+
}),
|
|
274
|
+
});
|
|
275
|
+
export const questionAnswered = defineEvent({
|
|
276
|
+
type: "question.answered",
|
|
277
|
+
direction: "chips_to_harness",
|
|
278
|
+
sender: "either",
|
|
279
|
+
summary: "The chosen options or free text, or a note that the timeout passed.",
|
|
280
|
+
requiresRun: true,
|
|
281
|
+
payload: z.object({
|
|
282
|
+
ask_id: id("question"),
|
|
283
|
+
answers: z
|
|
284
|
+
.array(z.object({
|
|
285
|
+
question_id: z.string().min(1).max(120),
|
|
286
|
+
values: z.array(z.string().max(120)).max(4).describe("The chosen option values."),
|
|
287
|
+
free_text: z.string().max(4000).optional().describe("What the person typed instead."),
|
|
288
|
+
}))
|
|
289
|
+
.min(1)
|
|
290
|
+
.max(4)
|
|
291
|
+
.describe("One entry per question that was answered."),
|
|
292
|
+
answered_by: z
|
|
293
|
+
.string()
|
|
294
|
+
.min(1)
|
|
295
|
+
.max(120)
|
|
296
|
+
.describe("Who answered, or `system` on a timeout — a harness when it settles its own question, answered in its own tools. Filled in by Chips from the credential that sent it."),
|
|
297
|
+
answered_at: isoTimestamp.describe("When it was answered. Stamped by Chips."),
|
|
298
|
+
timed_out: z
|
|
299
|
+
.boolean()
|
|
300
|
+
.default(false)
|
|
301
|
+
.describe("True when the default was taken rather than a choice."),
|
|
302
|
+
}),
|
|
303
|
+
});
|
|
304
|
+
export const runSteer = defineEvent({
|
|
305
|
+
type: "run.steer",
|
|
306
|
+
direction: "chips_to_harness",
|
|
307
|
+
sender: "person",
|
|
308
|
+
summary: "A mid-run instruction, with a disposition: steer, follow up, or interrupt.",
|
|
309
|
+
requiresRun: true,
|
|
310
|
+
payload: z.object({
|
|
311
|
+
mode: z
|
|
312
|
+
.enum(["steer", "followup", "interrupt"])
|
|
313
|
+
.describe("`steer` redirects, `followup` queues, `interrupt` stops what is happening now."),
|
|
314
|
+
text: z.string().min(1).max(16_000).describe("The instruction."),
|
|
315
|
+
from: participantRef.describe("Who said it."),
|
|
316
|
+
}),
|
|
317
|
+
});
|
|
318
|
+
export const runPause = defineEvent({
|
|
319
|
+
type: "run.pause",
|
|
320
|
+
direction: "chips_to_harness",
|
|
321
|
+
sender: "person",
|
|
322
|
+
summary: "Stop where you are and hold. Sent by a person, or by Chips at a budget or context ceiling.",
|
|
323
|
+
requiresRun: true,
|
|
324
|
+
payload: z.object({
|
|
325
|
+
reason: z.string().max(1000).optional().describe("Why the run is pausing."),
|
|
326
|
+
by: z
|
|
327
|
+
.string()
|
|
328
|
+
.min(1)
|
|
329
|
+
.max(120)
|
|
330
|
+
.describe("Who paused it, or `system`. Filled in by Chips from the credential that sent it."),
|
|
331
|
+
}),
|
|
332
|
+
});
|
|
333
|
+
export const runResume = defineEvent({
|
|
334
|
+
type: "run.resume",
|
|
335
|
+
direction: "chips_to_harness",
|
|
336
|
+
sender: "person",
|
|
337
|
+
summary: "Carry on from where you paused.",
|
|
338
|
+
requiresRun: true,
|
|
339
|
+
payload: z.object({
|
|
340
|
+
by: z
|
|
341
|
+
.string()
|
|
342
|
+
.min(1)
|
|
343
|
+
.max(120)
|
|
344
|
+
.describe("Who resumed it. Filled in by Chips from the credential that sent it."),
|
|
345
|
+
resume_token: z
|
|
346
|
+
.string()
|
|
347
|
+
.max(500)
|
|
348
|
+
.optional()
|
|
349
|
+
.describe("For a run that was paused across processes."),
|
|
350
|
+
}),
|
|
351
|
+
});
|
|
352
|
+
export const runCancel = defineEvent({
|
|
353
|
+
type: "run.cancel",
|
|
354
|
+
direction: "chips_to_harness",
|
|
355
|
+
sender: "person",
|
|
356
|
+
summary: "Stop for good. The run ends as cancelled, and the audit log records who ended it.",
|
|
357
|
+
requiresRun: true,
|
|
358
|
+
payload: z.object({
|
|
359
|
+
reason: z.string().max(1000).optional().describe("Why."),
|
|
360
|
+
by: z
|
|
361
|
+
.string()
|
|
362
|
+
.min(1)
|
|
363
|
+
.max(120)
|
|
364
|
+
.describe("Who cancelled it, or `system`. Filled in by Chips from the credential that sent it."),
|
|
365
|
+
}),
|
|
366
|
+
});
|
|
367
|
+
export const policyUpdated = defineEvent({
|
|
368
|
+
type: "policy.updated",
|
|
369
|
+
direction: "chips_to_harness",
|
|
370
|
+
sender: "person",
|
|
371
|
+
summary: "The autonomy level or the rules changed. Takes effect on the next action, not retroactively.",
|
|
372
|
+
requiresRun: false,
|
|
373
|
+
payload: z.object({
|
|
374
|
+
harness_id: id("harness"),
|
|
375
|
+
policy,
|
|
376
|
+
workspace_max_autonomy: autonomyLevel.describe("The workspace cap. It always wins."),
|
|
377
|
+
budget_usd: z
|
|
378
|
+
.number()
|
|
379
|
+
.nonnegative()
|
|
380
|
+
.optional()
|
|
381
|
+
.describe("The harness's spending ceiling, in US dollars. Absent leaves it as it was; the harness's spend is what `usage` has added up."),
|
|
382
|
+
changed_by: z
|
|
383
|
+
.string()
|
|
384
|
+
.min(1)
|
|
385
|
+
.max(120)
|
|
386
|
+
.describe("Who changed it, or `system` for an earned promotion. Filled in by Chips from the credential that sent it."),
|
|
387
|
+
reason: z.string().max(1000).optional().describe("Why it changed."),
|
|
388
|
+
}),
|
|
389
|
+
});
|
|
390
|
+
/**
|
|
391
|
+
* Eighty percent of a ceiling spent, or all of it. For a harness's budget, or since ADR 0118 for a
|
|
392
|
+
* room's job (`scope: "job"`): the room's harnesses are told once per job at each, in the room
|
|
393
|
+
* (`space_id`), and at a hundred Chips has paused the agents there (`exchange.set` with `why:
|
|
394
|
+
* "spend"`) until a person acts. A harness that chains turns itself starts no new one in that
|
|
395
|
+
* room until then; one that runs a turn per message needs do nothing, since the room holds what
|
|
396
|
+
* its agents say to each other.
|
|
397
|
+
*/
|
|
398
|
+
export const budgetWarning = defineEvent({
|
|
399
|
+
type: "budget.warning",
|
|
400
|
+
direction: "chips_to_harness",
|
|
401
|
+
sender: "chips",
|
|
402
|
+
summary: "Eighty percent spent. At a hundred the run pauses rather than warning again; for a room's job, the room's agents pause.",
|
|
403
|
+
requiresRun: false,
|
|
404
|
+
payload: z.object({
|
|
405
|
+
budget: budget.describe("The ceiling and what was spent against it: the harness's budget, or for a job the room's ceiling and the job's spend."),
|
|
406
|
+
threshold: z
|
|
407
|
+
.union([z.literal(80), z.literal(100)])
|
|
408
|
+
.describe("Which ceiling was crossed, as a percentage."),
|
|
409
|
+
action: z.enum(["warn", "pause"]).describe("`warn` at eighty, `pause` at a hundred."),
|
|
410
|
+
scope: z
|
|
411
|
+
.enum(["harness", "job"])
|
|
412
|
+
.optional()
|
|
413
|
+
.describe("Whose ceiling: the harness's own budget (absent says the same), or the job in the room named by `space_id` (ADR 0118)."),
|
|
414
|
+
since_seq: z
|
|
415
|
+
.int()
|
|
416
|
+
.nonnegative()
|
|
417
|
+
.optional()
|
|
418
|
+
.describe("For a job: where it began, as `context.spend.since_seq` says it. A later job in the room is a new allowance."),
|
|
419
|
+
}),
|
|
420
|
+
});
|
|
421
|
+
export const laneUpdated = defineEvent({
|
|
422
|
+
type: "lane.updated",
|
|
423
|
+
direction: "chips_to_harness",
|
|
424
|
+
sender: "chips",
|
|
425
|
+
summary: "A lane you opened has news. Finishing and delivering are different states, and delivery travels with the lane.",
|
|
426
|
+
requiresRun: false,
|
|
427
|
+
payload: z.object({
|
|
428
|
+
lane_id: id("lane"),
|
|
429
|
+
state: z
|
|
430
|
+
.enum(["queued", "running", "waiting", "completed", "failed", "cancelled"])
|
|
431
|
+
.describe("Where the specialist got to."),
|
|
432
|
+
delivery: z
|
|
433
|
+
.enum(["pending", "direct", "queued_to_lead", "delivered", "failed"])
|
|
434
|
+
.describe("A lane completes when the specialist posts; the person is told when the lead delivers."),
|
|
435
|
+
summary: z
|
|
436
|
+
.string()
|
|
437
|
+
.max(20_000)
|
|
438
|
+
.optional()
|
|
439
|
+
.describe("The specialist's result, when there is one."),
|
|
440
|
+
cost_usd: z
|
|
441
|
+
.number()
|
|
442
|
+
.nonnegative()
|
|
443
|
+
.optional()
|
|
444
|
+
.describe("The lane's estimated cost, so the lead's panel can total the chain. Cost rolls up the trail; context does not."),
|
|
445
|
+
attachments: z
|
|
446
|
+
.array(signedAttachment)
|
|
447
|
+
.max(20)
|
|
448
|
+
.optional()
|
|
449
|
+
.describe("The files the specialist's answer carried, so an answer made of photos is an answer the lead has. Chips reads them off the lane run's own messages; URLs expire in ten minutes."),
|
|
450
|
+
}),
|
|
451
|
+
});
|
|
452
|
+
/**
|
|
453
|
+
* Sent by a person, like a steer: the direction says who hears it. Chips fills in `from` and
|
|
454
|
+
* delivers it to the harness whose message it is, and to everyone in the space.
|
|
455
|
+
*/
|
|
456
|
+
export const feedback = defineEvent({
|
|
457
|
+
type: "feedback",
|
|
458
|
+
direction: "chips_to_harness",
|
|
459
|
+
sender: "person",
|
|
460
|
+
summary: "A reaction, or a note about what went wrong, on one of the harness's messages.",
|
|
461
|
+
requiresRun: false,
|
|
462
|
+
payload: z.object({
|
|
463
|
+
message_id: id("message").describe("The message it is about: one a harness said, in the space the event names."),
|
|
464
|
+
kind: z.enum(["reaction", "correction"]).describe("A light signal, or a written note."),
|
|
465
|
+
reaction: z
|
|
466
|
+
.string()
|
|
467
|
+
.min(1)
|
|
468
|
+
.max(16)
|
|
469
|
+
.optional()
|
|
470
|
+
.describe("The emoji, when the kind is `reaction`. Required then."),
|
|
471
|
+
text: z
|
|
472
|
+
.string()
|
|
473
|
+
.min(1)
|
|
474
|
+
.max(4000)
|
|
475
|
+
.optional()
|
|
476
|
+
.describe("What went wrong, when the kind is `correction`. Required then."),
|
|
477
|
+
from: participantRef.describe("Who gave it. Filled in by Chips from the credential and the membership; a value the sender writes is replaced."),
|
|
478
|
+
}),
|
|
479
|
+
});
|
|
480
|
+
export const receipt = defineEvent({
|
|
481
|
+
type: "receipt",
|
|
482
|
+
direction: "chips_to_harness",
|
|
483
|
+
sender: "chips",
|
|
484
|
+
summary: "What Chips did with a message sent mid-run: queued it, or steered with it.",
|
|
485
|
+
requiresRun: true,
|
|
486
|
+
payload: z.object({
|
|
487
|
+
message_id: id("message"),
|
|
488
|
+
disposition: z
|
|
489
|
+
.enum(["queued", "steered"])
|
|
490
|
+
.describe("Whether the harness will see it now or after the step."),
|
|
491
|
+
}),
|
|
492
|
+
});
|
|
493
|
+
/** Every event Chips may send, in the order the reference lists them. */
|
|
494
|
+
export const CHIPS_TO_HARNESS = [
|
|
495
|
+
hello,
|
|
496
|
+
messageNew,
|
|
497
|
+
messageOverheard,
|
|
498
|
+
runRequested,
|
|
499
|
+
approvalResolved,
|
|
500
|
+
questionAnswered,
|
|
501
|
+
runSteer,
|
|
502
|
+
runPause,
|
|
503
|
+
runResume,
|
|
504
|
+
runCancel,
|
|
505
|
+
policyUpdated,
|
|
506
|
+
budgetWarning,
|
|
507
|
+
laneUpdated,
|
|
508
|
+
feedback,
|
|
509
|
+
receipt,
|
|
510
|
+
];
|
|
511
|
+
//# sourceMappingURL=chips-to-harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chips-to-harness.js","sourceRoot":"","sources":["../../../src/events/chips-to-harness.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,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;aACN,GAAG,CAAC,EAAE,CAAC;aACP,QAAQ,EAAE;aACV,QAAQ,CAAC,wDAAwD,CAAC;QACrE,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,IAAI,CAAC;aACT,QAAQ,EAAE;aACV,QAAQ,CAAC,gEAAgE,CAAC;QAC7E,IAAI,EAAE,cAAc,CAAC,QAAQ,CAC3B,gHAAgH,CACjH;KACF,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC;IACjC,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,kBAAkB;IAC7B,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,4EAA4E;IACrF,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,UAAU,EAAE,EAAE,CAAC,SAAS,CAAC;QACzB,WAAW,EAAE,CAAC;aACX,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;aAC3B,QAAQ,CAAC,wDAAwD,CAAC;KACtE,CAAC;CACH,CAAC,CAAC;AAEH,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,KAAK;IACL,UAAU;IACV,gBAAgB;IAChB,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,SAAS;IACT,aAAa;IACb,aAAa;IACb,WAAW;IACX,QAAQ;IACR,OAAO;CACC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events a harness sends to Chips.
|
|
3
|
+
*
|
|
4
|
+
* The interface is progressive (blueprint, Connect): the minimum is three events — a run
|
|
5
|
+
* started, a message, a run completed. Every extra event upgrades what the person sees. Send
|
|
6
|
+
* step logs and you get receipts; send approval requests and you get approval cards; send
|
|
7
|
+
* context usage and you get the context ring.
|
|
8
|
+
*/
|
|
9
|
+
export declare const sessionStarted: import("../envelope.js").EventDefinition<"session.started">;
|
|
10
|
+
export declare const sessionEnded: import("../envelope.js").EventDefinition<"session.ended">;
|
|
11
|
+
export declare const sessionRenamed: import("../envelope.js").EventDefinition<"session.renamed">;
|
|
12
|
+
export declare const runStarted: import("../envelope.js").EventDefinition<"run.started">;
|
|
13
|
+
export declare const runStatus: import("../envelope.js").EventDefinition<"run.status">;
|
|
14
|
+
export declare const runPlan: import("../envelope.js").EventDefinition<"run.plan">;
|
|
15
|
+
export declare const stepLog: import("../envelope.js").EventDefinition<"step.log">;
|
|
16
|
+
export declare const messagePost: import("../envelope.js").EventDefinition<"message.post">;
|
|
17
|
+
export declare const approvalRequest: import("../envelope.js").EventDefinition<"approval.request">;
|
|
18
|
+
export declare const questionAsk: import("../envelope.js").EventDefinition<"question.ask">;
|
|
19
|
+
export declare const artifactCreate: import("../envelope.js").EventDefinition<"artifact.create">;
|
|
20
|
+
/**
|
|
21
|
+
* A turn working in a room heard words said there (ADR 0106): for somebody else, when Chips named
|
|
22
|
+
* the turn in `working_turns` and the harness handed them to it at its next step; or for its own
|
|
23
|
+
* agent, when the harness joined them to that agent's turn going rather than start another
|
|
24
|
+
* (ADR 0109). On that run, said as the run's agent; the room shows that agent heard the message
|
|
25
|
+
* while it worked.
|
|
26
|
+
*/
|
|
27
|
+
export declare const messageHeard: import("../envelope.js").EventDefinition<"message.heard">;
|
|
28
|
+
export declare const checkpoint: import("../envelope.js").EventDefinition<"checkpoint">;
|
|
29
|
+
export declare const handoff: import("../envelope.js").EventDefinition<"handoff">;
|
|
30
|
+
export declare const task: import("../envelope.js").EventDefinition<"task">;
|
|
31
|
+
export declare const usage: import("../envelope.js").EventDefinition<"usage">;
|
|
32
|
+
export declare const contextUsage: import("../envelope.js").EventDefinition<"context.usage">;
|
|
33
|
+
export declare const approvalExecuted: import("../envelope.js").EventDefinition<"approval.executed">;
|
|
34
|
+
export declare const runCompleted: import("../envelope.js").EventDefinition<"run.completed">;
|
|
35
|
+
export declare const runFailed: import("../envelope.js").EventDefinition<"run.failed">;
|
|
36
|
+
/** Every event a harness may send, in the order the reference lists them. */
|
|
37
|
+
export declare const HARNESS_TO_CHIPS: readonly [import("../envelope.js").EventDefinition<"session.started">, import("../envelope.js").EventDefinition<"session.ended">, import("../envelope.js").EventDefinition<"session.renamed">, import("../envelope.js").EventDefinition<"run.started">, import("../envelope.js").EventDefinition<"run.status">, import("../envelope.js").EventDefinition<"run.plan">, import("../envelope.js").EventDefinition<"step.log">, import("../envelope.js").EventDefinition<"message.post">, import("../envelope.js").EventDefinition<"message.heard">, import("../envelope.js").EventDefinition<"approval.request">, import("../envelope.js").EventDefinition<"question.ask">, import("../envelope.js").EventDefinition<"artifact.create">, import("../envelope.js").EventDefinition<"checkpoint">, import("../envelope.js").EventDefinition<"handoff">, import("../envelope.js").EventDefinition<"task">, import("../envelope.js").EventDefinition<"usage">, import("../envelope.js").EventDefinition<"context.usage">, import("../envelope.js").EventDefinition<"approval.executed">, import("../envelope.js").EventDefinition<"run.completed">, import("../envelope.js").EventDefinition<"run.failed">];
|
|
38
|
+
//# sourceMappingURL=harness-to-chips.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness-to-chips.d.ts","sourceRoot":"","sources":["../../../src/events/harness-to-chips.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiCH,eAAO,MAAM,cAAc,6DAyBzB,CAAC;AAEH,eAAO,MAAM,YAAY,2DAcvB,CAAC;AAEH,eAAO,MAAM,cAAc,6DAgBzB,CAAC;AAEH,eAAO,MAAM,UAAU,yDA2BrB,CAAC;AAEH,eAAO,MAAM,SAAS,wDAyBpB,CAAC;AAEH,eAAO,MAAM,OAAO,sDAqBlB,CAAC;AAEH,eAAO,MAAM,OAAO,sDA6BlB,CAAC;AAEH,eAAO,MAAM,WAAW,0DAiGtB,CAAC;AAEH,eAAO,MAAM,eAAe,8DA2E1B,CAAC;AAkCH,eAAO,MAAM,WAAW,0DAoBtB,CAAC;AAEH,eAAO,MAAM,cAAc,6DAezB,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,2DAWvB,CAAC;AAEH,eAAO,MAAM,UAAU,wDAcrB,CAAC;AAEH,eAAO,MAAM,OAAO,qDAalB,CAAC;AAEH,eAAO,MAAM,IAAI,kDAkEf,CAAC;AAEH,eAAO,MAAM,KAAK,mDAwChB,CAAC;AAEH,eAAO,MAAM,YAAY,2DAavB,CAAC;AAEH,eAAO,MAAM,gBAAgB,+DAoB3B,CAAC;AAEH,eAAO,MAAM,YAAY,2DAgBvB,CAAC;AAEH,eAAO,MAAM,SAAS,wDAapB,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,soCAqBnB,CAAC"}
|