@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,390 @@
|
|
|
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
|
+
import { z } from "zod";
|
|
10
|
+
import { defineEvent } from "../envelope.js";
|
|
11
|
+
import { action, approverRef, attachment, autonomyLevel, cost, id, isoTimestamp, preview, riskClass, source, } from "../primitives.js";
|
|
12
|
+
const plannedStep = z
|
|
13
|
+
.object({
|
|
14
|
+
step_id: z
|
|
15
|
+
.string()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(120)
|
|
18
|
+
.describe("Stable for the life of the run, so updates land on the right row."),
|
|
19
|
+
title: z.string().min(1).max(300).describe("What this step will do."),
|
|
20
|
+
})
|
|
21
|
+
.describe("One step of a plan, shown as a hollow dot until it completes.");
|
|
22
|
+
export const runStarted = defineEvent({
|
|
23
|
+
type: "run.started",
|
|
24
|
+
direction: "harness_to_chips",
|
|
25
|
+
summary: "A harness has begun a unit of work, optionally with the plan it intends to follow.",
|
|
26
|
+
requiresRun: true,
|
|
27
|
+
payload: z.object({
|
|
28
|
+
goal: z
|
|
29
|
+
.string()
|
|
30
|
+
.min(1)
|
|
31
|
+
.max(4000)
|
|
32
|
+
.describe("What the run is for, in the person's words where possible."),
|
|
33
|
+
plan: z
|
|
34
|
+
.array(plannedStep)
|
|
35
|
+
.max(64)
|
|
36
|
+
.optional()
|
|
37
|
+
.describe("The steps the harness expects to take. The run panel draws one hollow dot each."),
|
|
38
|
+
session_ref: z
|
|
39
|
+
.string()
|
|
40
|
+
.max(500)
|
|
41
|
+
.optional()
|
|
42
|
+
.describe("A pointer back to the harness's own transcript, so a person can jump to it."),
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
export const runStatus = defineEvent({
|
|
46
|
+
type: "run.status",
|
|
47
|
+
direction: "harness_to_chips",
|
|
48
|
+
summary: "What the harness is doing right now. This is the harness's typing indicator.",
|
|
49
|
+
requiresRun: true,
|
|
50
|
+
payload: z.object({
|
|
51
|
+
phase: z.string().min(1).max(120).describe("A short machine-ish label, for example `reading`."),
|
|
52
|
+
verb_phrase: z
|
|
53
|
+
.string()
|
|
54
|
+
.min(1)
|
|
55
|
+
.max(200)
|
|
56
|
+
.describe('What to show under the harness\'s name, for example "Reading PO #4471…".'),
|
|
57
|
+
progress: z
|
|
58
|
+
.number()
|
|
59
|
+
.min(0)
|
|
60
|
+
.max(1)
|
|
61
|
+
.optional()
|
|
62
|
+
.describe("Fraction complete, when the harness knows."),
|
|
63
|
+
estimate_seconds: z
|
|
64
|
+
.int()
|
|
65
|
+
.nonnegative()
|
|
66
|
+
.optional()
|
|
67
|
+
.describe("Seconds remaining, when the harness knows."),
|
|
68
|
+
}),
|
|
69
|
+
});
|
|
70
|
+
export const runPlan = defineEvent({
|
|
71
|
+
type: "run.plan",
|
|
72
|
+
direction: "harness_to_chips",
|
|
73
|
+
summary: "The plan changed. Replaces the steps not yet done; the ones already done or failed keep their place.",
|
|
74
|
+
requiresRun: true,
|
|
75
|
+
payload: z.object({
|
|
76
|
+
plan: z
|
|
77
|
+
.array(plannedStep)
|
|
78
|
+
.min(1)
|
|
79
|
+
.max(64)
|
|
80
|
+
.describe("The steps still to come, in order. Steps already done or failed stay ahead of these; a step still to do that is not here is dropped."),
|
|
81
|
+
reason: z
|
|
82
|
+
.string()
|
|
83
|
+
.max(1000)
|
|
84
|
+
.optional()
|
|
85
|
+
.describe("Why the plan changed, in a sentence: a steer, a surprise, a shortcut."),
|
|
86
|
+
}),
|
|
87
|
+
});
|
|
88
|
+
export const stepLog = defineEvent({
|
|
89
|
+
type: "step.log",
|
|
90
|
+
direction: "harness_to_chips",
|
|
91
|
+
summary: "One tool call or reasoning step, for the receipt and the run timeline.",
|
|
92
|
+
requiresRun: true,
|
|
93
|
+
payload: z.object({
|
|
94
|
+
step_id: z
|
|
95
|
+
.string()
|
|
96
|
+
.min(1)
|
|
97
|
+
.max(120)
|
|
98
|
+
.describe("Stable across the started and done events for one step."),
|
|
99
|
+
status: z.enum(["started", "done", "failed"]).describe("Where this step got to."),
|
|
100
|
+
title: z
|
|
101
|
+
.string()
|
|
102
|
+
.max(300)
|
|
103
|
+
.optional()
|
|
104
|
+
.describe("What the step is, when it was not in the plan."),
|
|
105
|
+
tool: z.string().max(120).optional().describe("The tool called, for example `drive.read`."),
|
|
106
|
+
summary: z.string().max(2000).optional().describe("One line for the receipt."),
|
|
107
|
+
sources: z.array(source).max(32).optional().describe("Where the information came from."),
|
|
108
|
+
duration_ms: z.int().nonnegative().optional().describe("How long the step took."),
|
|
109
|
+
error: z.string().max(2000).optional().describe("Why it failed, when it did."),
|
|
110
|
+
}),
|
|
111
|
+
});
|
|
112
|
+
export const messagePost = defineEvent({
|
|
113
|
+
type: "message.post",
|
|
114
|
+
direction: "harness_to_chips",
|
|
115
|
+
summary: "A harness says something in a space, with any attachments.",
|
|
116
|
+
requiresRun: false,
|
|
117
|
+
payload: z.object({
|
|
118
|
+
text: z.string().max(64_000).describe("Markdown, with mentions."),
|
|
119
|
+
attachments: z
|
|
120
|
+
.array(attachment)
|
|
121
|
+
.max(20)
|
|
122
|
+
.optional()
|
|
123
|
+
.describe("Photos, video, voice notes, files, as the upload described them."),
|
|
124
|
+
upload_ids: z
|
|
125
|
+
.array(id("attachment"))
|
|
126
|
+
.max(20)
|
|
127
|
+
.optional()
|
|
128
|
+
.describe("Uploads to attach, by the id `POST /v1/uploads` gave. Chips fills in `attachments` from what it stored."),
|
|
129
|
+
reply_to: id("message").optional().describe("The message being answered, when it is a reply."),
|
|
130
|
+
}),
|
|
131
|
+
});
|
|
132
|
+
export const approvalRequest = defineEvent({
|
|
133
|
+
type: "approval.request",
|
|
134
|
+
direction: "harness_to_chips",
|
|
135
|
+
summary: "The thing a group chat cannot do: an action, a preview, a risk class, who may answer, and an audit record.",
|
|
136
|
+
requiresRun: true,
|
|
137
|
+
payload: z.object({
|
|
138
|
+
approval_id: id("approval").describe("Minted by the harness, so a retry after a reconnect is the same ask."),
|
|
139
|
+
step_id: z.string().min(1).max(120).optional().describe("The plan step this ask belongs to."),
|
|
140
|
+
action,
|
|
141
|
+
preview: preview
|
|
142
|
+
.optional()
|
|
143
|
+
.describe("What the approver sees. Omit only when the action speaks for itself."),
|
|
144
|
+
risk: z
|
|
145
|
+
.array(riskClass)
|
|
146
|
+
.max(8)
|
|
147
|
+
.describe("Risk classes. The policy engine matches rules against these."),
|
|
148
|
+
sources: z
|
|
149
|
+
.array(source)
|
|
150
|
+
.max(32)
|
|
151
|
+
.optional()
|
|
152
|
+
.describe("Where the harness got what it is about to act on."),
|
|
153
|
+
expires_in: z
|
|
154
|
+
.int()
|
|
155
|
+
.positive()
|
|
156
|
+
.max(604_800)
|
|
157
|
+
.describe("Seconds until the approval expires. Every approval has an expiry and a fallback."),
|
|
158
|
+
fallback: z
|
|
159
|
+
.enum(["deny", "allow"])
|
|
160
|
+
.default("deny")
|
|
161
|
+
.describe("What happens on expiry. Denying is the default, and the safe one."),
|
|
162
|
+
approvers: z
|
|
163
|
+
.array(approverRef)
|
|
164
|
+
.max(16)
|
|
165
|
+
.optional()
|
|
166
|
+
.describe("Who may answer. Chips resolves roles."),
|
|
167
|
+
editable: z
|
|
168
|
+
.boolean()
|
|
169
|
+
.default(false)
|
|
170
|
+
.describe("Whether the approver may change the input before allowing."),
|
|
171
|
+
resume_token: z
|
|
172
|
+
.string()
|
|
173
|
+
.max(500)
|
|
174
|
+
.optional()
|
|
175
|
+
.describe("Lets a paused command-line run continue hours later. Approvals outlive processes."),
|
|
176
|
+
}),
|
|
177
|
+
});
|
|
178
|
+
const questionOption = z
|
|
179
|
+
.object({
|
|
180
|
+
value: z.string().min(1).max(120).describe("What comes back in `question.answered`."),
|
|
181
|
+
label: z.string().min(1).max(200).describe("What the person taps."),
|
|
182
|
+
description: z.string().max(500).optional().describe("What choosing it means."),
|
|
183
|
+
})
|
|
184
|
+
.describe("One tappable option.");
|
|
185
|
+
const question = z
|
|
186
|
+
.object({
|
|
187
|
+
question_id: z
|
|
188
|
+
.string()
|
|
189
|
+
.min(1)
|
|
190
|
+
.max(120)
|
|
191
|
+
.describe("Stable, so answers land on the right question."),
|
|
192
|
+
prompt: z.string().min(1).max(2000).describe("What is being asked."),
|
|
193
|
+
options: z.array(questionOption).min(2).max(4).describe("Two to four options."),
|
|
194
|
+
multi_select: z
|
|
195
|
+
.boolean()
|
|
196
|
+
.default(false)
|
|
197
|
+
.describe("Whether more than one option may be chosen."),
|
|
198
|
+
allow_free_text: z.boolean().default(false).describe("Whether the person may type instead."),
|
|
199
|
+
default_value: z
|
|
200
|
+
.string()
|
|
201
|
+
.max(120)
|
|
202
|
+
.optional()
|
|
203
|
+
.describe("What the harness will take if nobody answers. Its presence lowers the notification tier."),
|
|
204
|
+
})
|
|
205
|
+
.describe("One question, with its options.");
|
|
206
|
+
export const questionAsk = defineEvent({
|
|
207
|
+
type: "question.ask",
|
|
208
|
+
direction: "harness_to_chips",
|
|
209
|
+
summary: "One to four questions with tappable options, a default, and a timeout.",
|
|
210
|
+
requiresRun: true,
|
|
211
|
+
payload: z.object({
|
|
212
|
+
ask_id: id("question").describe("Minted by the harness, so a retry is the same ask."),
|
|
213
|
+
questions: z.array(question).min(1).max(4).describe("One to four questions."),
|
|
214
|
+
timeout_seconds: z
|
|
215
|
+
.int()
|
|
216
|
+
.positive()
|
|
217
|
+
.max(604_800)
|
|
218
|
+
.optional()
|
|
219
|
+
.describe("How long to wait for an answer."),
|
|
220
|
+
on_no_answer: z
|
|
221
|
+
.enum(["use_default", "cancel", "continue"])
|
|
222
|
+
.default("use_default")
|
|
223
|
+
.describe("What the harness will do if the timeout passes."),
|
|
224
|
+
}),
|
|
225
|
+
});
|
|
226
|
+
export const artifactCreate = defineEvent({
|
|
227
|
+
type: "artifact.create",
|
|
228
|
+
direction: "harness_to_chips",
|
|
229
|
+
summary: "A file, document, code, image or table the harness produced, with a version.",
|
|
230
|
+
requiresRun: false,
|
|
231
|
+
payload: z.object({
|
|
232
|
+
artifact_id: id("attachment").describe("Content-addressed, like every attachment."),
|
|
233
|
+
kind: z.enum(["file", "document", "code", "image", "table"]).describe("How to render it."),
|
|
234
|
+
title: z.string().min(1).max(300).describe("What to call it."),
|
|
235
|
+
version: z.int().positive().default(1).describe("Bumped when the harness revises it."),
|
|
236
|
+
attachment: attachment.optional().describe("The bytes, when the artifact is a file."),
|
|
237
|
+
body: z.string().max(1_000_000).optional().describe("The content, when the artifact is text."),
|
|
238
|
+
language: z.string().max(60).optional().describe("For code, the language to highlight."),
|
|
239
|
+
}),
|
|
240
|
+
});
|
|
241
|
+
export const checkpoint = defineEvent({
|
|
242
|
+
type: "checkpoint",
|
|
243
|
+
direction: "harness_to_chips",
|
|
244
|
+
summary: "A milestone reached and what is next. Compaction is a checkpoint. FYI tier.",
|
|
245
|
+
requiresRun: true,
|
|
246
|
+
payload: z.object({
|
|
247
|
+
label: z.string().min(1).max(300).describe("The milestone reached."),
|
|
248
|
+
next: z.string().max(300).optional().describe("What the harness will do next."),
|
|
249
|
+
compacted: z
|
|
250
|
+
.boolean()
|
|
251
|
+
.default(false)
|
|
252
|
+
.describe("True when the harness just compacted its context."),
|
|
253
|
+
}),
|
|
254
|
+
});
|
|
255
|
+
export const handoff = defineEvent({
|
|
256
|
+
type: "handoff",
|
|
257
|
+
direction: "harness_to_chips",
|
|
258
|
+
summary: "Passing work to a person or another harness, with a context summary and what is still open.",
|
|
259
|
+
requiresRun: false,
|
|
260
|
+
payload: z.object({
|
|
261
|
+
to: z.string().min(1).max(120).describe("The participant id receiving the work."),
|
|
262
|
+
context_summary: z.string().min(1).max(20_000).describe("What the recipient needs to know."),
|
|
263
|
+
open_items: z.array(z.string().max(500)).max(50).optional().describe("What is still undone."),
|
|
264
|
+
reason: z.string().max(1000).optional().describe("Why the work is moving."),
|
|
265
|
+
}),
|
|
266
|
+
});
|
|
267
|
+
export const task = defineEvent({
|
|
268
|
+
type: "task",
|
|
269
|
+
direction: "harness_to_chips",
|
|
270
|
+
summary: "Route work to another harness. From a lead this becomes a lane: one object, two views, never a copy.",
|
|
271
|
+
requiresRun: false,
|
|
272
|
+
payload: z.object({
|
|
273
|
+
task_id: id("lane").describe("The lane this task opens."),
|
|
274
|
+
to: z
|
|
275
|
+
.string()
|
|
276
|
+
.min(1)
|
|
277
|
+
.max(120)
|
|
278
|
+
.describe("The specialist's participant id, or a label for an ephemeral child."),
|
|
279
|
+
child: z
|
|
280
|
+
.object({
|
|
281
|
+
label: z
|
|
282
|
+
.string()
|
|
283
|
+
.min(1)
|
|
284
|
+
.max(120)
|
|
285
|
+
.describe("A name for a transient participant Chips will mint."),
|
|
286
|
+
})
|
|
287
|
+
.optional()
|
|
288
|
+
.describe("Names an ephemeral child, which inherits owner, autonomy and budget from the lead."),
|
|
289
|
+
on_behalf_of: z.string().min(1).max(120).describe("The person the work is ultimately for."),
|
|
290
|
+
origin: id("message").optional().describe("The message that caused this routing."),
|
|
291
|
+
goal: z.string().min(1).max(4000).describe("What the specialist is being asked to do."),
|
|
292
|
+
constraints: z
|
|
293
|
+
.array(z.string().max(500))
|
|
294
|
+
.max(20)
|
|
295
|
+
.optional()
|
|
296
|
+
.describe("Bounds on how to do it."),
|
|
297
|
+
deadline: isoTimestamp.optional().describe("When it is needed by."),
|
|
298
|
+
autonomy: autonomyLevel
|
|
299
|
+
.optional()
|
|
300
|
+
.describe("The level for this lane. Never above the lead's own."),
|
|
301
|
+
attachments: z.array(attachment).max(20).optional().describe("Anything the specialist needs."),
|
|
302
|
+
link_to: id("space").optional().describe("The lead's space, where the route card appears."),
|
|
303
|
+
}),
|
|
304
|
+
});
|
|
305
|
+
export const usage = defineEvent({
|
|
306
|
+
type: "usage",
|
|
307
|
+
direction: "harness_to_chips",
|
|
308
|
+
summary: "Tokens and cost for a step, a run or a lane. Cost rolls up the trail and is always an estimate.",
|
|
309
|
+
requiresRun: true,
|
|
310
|
+
payload: z.object({
|
|
311
|
+
scope: z.enum(["step", "run", "lane"]).describe("What the numbers cover."),
|
|
312
|
+
model: z.string().min(1).max(120).describe("The model that did the work."),
|
|
313
|
+
input_tokens: z.int().nonnegative().describe("Tokens in."),
|
|
314
|
+
output_tokens: z.int().nonnegative().describe("Tokens out."),
|
|
315
|
+
cost: cost.optional().describe("The estimated cost, when the harness can compute one."),
|
|
316
|
+
}),
|
|
317
|
+
});
|
|
318
|
+
export const contextUsage = defineEvent({
|
|
319
|
+
type: "context.usage",
|
|
320
|
+
direction: "harness_to_chips",
|
|
321
|
+
summary: "How full the harness's context is. Drives the context ring; context stays per harness, never rolled up.",
|
|
322
|
+
requiresRun: true,
|
|
323
|
+
payload: z.object({
|
|
324
|
+
used_tokens: z.int().nonnegative().describe("Tokens currently held."),
|
|
325
|
+
limit_tokens: z.int().positive().describe("The window size."),
|
|
326
|
+
model: z.string().min(1).max(120).describe("The model whose window this is."),
|
|
327
|
+
compacted: z.boolean().default(false).describe("True when the harness just compacted."),
|
|
328
|
+
}),
|
|
329
|
+
});
|
|
330
|
+
export const approvalExecuted = defineEvent({
|
|
331
|
+
type: "approval.executed",
|
|
332
|
+
direction: "harness_to_chips",
|
|
333
|
+
summary: "What happened after a yes. The card changes from `approved` to `sent`, or to `failed`.",
|
|
334
|
+
requiresRun: true,
|
|
335
|
+
payload: z.object({
|
|
336
|
+
approval_id: id("approval"),
|
|
337
|
+
outcome: z
|
|
338
|
+
.enum(["executed", "failed", "skipped"])
|
|
339
|
+
.describe("Whether the action actually happened."),
|
|
340
|
+
detail: z.string().max(4000).optional().describe("What was sent, or why it failed."),
|
|
341
|
+
}),
|
|
342
|
+
});
|
|
343
|
+
export const runCompleted = defineEvent({
|
|
344
|
+
type: "run.completed",
|
|
345
|
+
direction: "harness_to_chips",
|
|
346
|
+
summary: "The run is done. Posts a summary card and moves the status pill to Done.",
|
|
347
|
+
requiresRun: true,
|
|
348
|
+
payload: z.object({
|
|
349
|
+
summary: z.string().min(1).max(20_000).describe("The outcome, in the product voice."),
|
|
350
|
+
changed: z.array(z.string().max(500)).max(50).optional().describe("What changed in the world."),
|
|
351
|
+
follow_ups: z
|
|
352
|
+
.array(z.string().max(500))
|
|
353
|
+
.max(50)
|
|
354
|
+
.optional()
|
|
355
|
+
.describe("What is worth doing next."),
|
|
356
|
+
cost: cost.optional().describe("The run's estimated cost."),
|
|
357
|
+
}),
|
|
358
|
+
});
|
|
359
|
+
export const runFailed = defineEvent({
|
|
360
|
+
type: "run.failed",
|
|
361
|
+
direction: "harness_to_chips",
|
|
362
|
+
summary: "The run stopped without finishing. Says what was left undone, so a person can pick it up.",
|
|
363
|
+
requiresRun: true,
|
|
364
|
+
payload: z.object({
|
|
365
|
+
error: z.string().min(1).max(4000).describe("What went wrong."),
|
|
366
|
+
left_undone: z.array(z.string().max(500)).max(50).optional().describe("What did not get done."),
|
|
367
|
+
retryable: z.boolean().default(false).describe("Whether running it again might work."),
|
|
368
|
+
cost: cost.optional().describe("What was spent before it failed."),
|
|
369
|
+
}),
|
|
370
|
+
});
|
|
371
|
+
/** Every event a harness may send, in the order the reference lists them. */
|
|
372
|
+
export const HARNESS_TO_CHIPS = [
|
|
373
|
+
runStarted,
|
|
374
|
+
runStatus,
|
|
375
|
+
runPlan,
|
|
376
|
+
stepLog,
|
|
377
|
+
messagePost,
|
|
378
|
+
approvalRequest,
|
|
379
|
+
questionAsk,
|
|
380
|
+
artifactCreate,
|
|
381
|
+
checkpoint,
|
|
382
|
+
handoff,
|
|
383
|
+
task,
|
|
384
|
+
usage,
|
|
385
|
+
contextUsage,
|
|
386
|
+
approvalExecuted,
|
|
387
|
+
runCompleted,
|
|
388
|
+
runFailed,
|
|
389
|
+
];
|
|
390
|
+
//# sourceMappingURL=harness-to-chips.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness-to-chips.js","sourceRoot":"","sources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AE,YAAY;IAClB,SAAS,EAAE,kBAAkB;IAC7B,OAAO,EACL,2FAA2F;IAC7F,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QAC/D,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QAC/F,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;QACtF,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;KACnE,CAAC;CACH,CAAC,CAAC;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU;IACV,SAAS;IACT,OAAO;IACP,OAAO;IACP,WAAW;IACX,eAAe;IACf,WAAW;IACX,cAAc;IACd,UAAU;IACV,OAAO;IACP,IAAI;IACJ,KAAK;IACL,YAAY;IACZ,gBAAgB;IAChB,YAAY;IACZ,SAAS;CACD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./agent-to-chips.js";
|
|
2
|
+
export type { AgentToChipsType, ChipsToAgentType, EventType, ParseFailure, WorkspaceEventType, } from "./catalogue.js";
|
|
3
|
+
export { EVENT_SCHEMAS, EVENT_TYPES, EVENTS, eventDefinition, parseEvent, schemaFor, UnknownEventTypeError, } from "./catalogue.js";
|
|
4
|
+
export * from "./chips-to-agent.js";
|
|
5
|
+
export * from "./workspace.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,WAAW,EACX,MAAM,EACN,eAAe,EACf,UAAU,EACV,SAAS,EACT,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./agent-to-chips.js";
|
|
2
|
+
export { EVENT_SCHEMAS, EVENT_TYPES, EVENTS, eventDefinition, parseEvent, schemaFor, UnknownEventTypeError, } from "./catalogue.js";
|
|
3
|
+
export * from "./chips-to-agent.js";
|
|
4
|
+
export * from "./workspace.js";
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AAQpC,OAAO,EACL,aAAa,EACb,WAAW,EACX,MAAM,EACN,eAAe,EACf,UAAU,EACV,SAAS,EACT,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events Chips records about itself.
|
|
3
|
+
*
|
|
4
|
+
* Agent Connect is the vocabulary an agent speaks. It is not the whole log. Decision 4 says
|
|
5
|
+
* every Agent Connect event **and every human action** is an event, and creating a conversation
|
|
6
|
+
* or adding somebody to one is a human action. Without these, `conversations` and `memberships`
|
|
7
|
+
* would be read models that no replay could reconstruct — which would make `rebuild` a lie.
|
|
8
|
+
*
|
|
9
|
+
* These never travel to an agent. An agent learns that it was added to a conversation from
|
|
10
|
+
* `message.new`, not from here. See ADR 0018 for the line between what is event-sourced and
|
|
11
|
+
* what is a registry.
|
|
12
|
+
*/
|
|
13
|
+
export declare const conversationCreated: import("../envelope.js").EventDefinition<"conversation.created">;
|
|
14
|
+
export declare const membershipAdded: import("../envelope.js").EventDefinition<"membership.added">;
|
|
15
|
+
export declare const membershipRemoved: import("../envelope.js").EventDefinition<"membership.removed">;
|
|
16
|
+
export declare const attachmentFetched: import("../envelope.js").EventDefinition<"attachment.fetched">;
|
|
17
|
+
/** Every event Chips records about a workspace, in the order the reference lists them. */
|
|
18
|
+
export declare const WORKSPACE_EVENTS: readonly [import("../envelope.js").EventDefinition<"conversation.created">, import("../envelope.js").EventDefinition<"membership.added">, import("../envelope.js").EventDefinition<"membership.removed">, import("../envelope.js").EventDefinition<"attachment.fetched">];
|
|
19
|
+
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/events/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,eAAO,MAAM,mBAAmB,kEAc9B,CAAC;AAEH,eAAO,MAAM,eAAe,8DAc1B,CAAC;AAEH,eAAO,MAAM,iBAAiB,gEAc5B,CAAC;AAEH,eAAO,MAAM,iBAAiB,gEAW5B,CAAC;AAEH,0FAA0F;AAC1F,eAAO,MAAM,gBAAgB,2QAKnB,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events Chips records about itself.
|
|
3
|
+
*
|
|
4
|
+
* Agent Connect is the vocabulary an agent speaks. It is not the whole log. Decision 4 says
|
|
5
|
+
* every Agent Connect event **and every human action** is an event, and creating a conversation
|
|
6
|
+
* or adding somebody to one is a human action. Without these, `conversations` and `memberships`
|
|
7
|
+
* would be read models that no replay could reconstruct — which would make `rebuild` a lie.
|
|
8
|
+
*
|
|
9
|
+
* These never travel to an agent. An agent learns that it was added to a conversation from
|
|
10
|
+
* `message.new`, not from here. See ADR 0018 for the line between what is event-sourced and
|
|
11
|
+
* what is a registry.
|
|
12
|
+
*/
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
import { defineEvent } from "../envelope.js";
|
|
15
|
+
import { id, isoTimestamp } from "../primitives.js";
|
|
16
|
+
export const conversationCreated = defineEvent({
|
|
17
|
+
type: "conversation.created",
|
|
18
|
+
direction: "workspace",
|
|
19
|
+
summary: "A conversation was opened: a direct message, a group, a channel or a thread.",
|
|
20
|
+
requiresRun: false,
|
|
21
|
+
payload: z.object({
|
|
22
|
+
kind: z
|
|
23
|
+
.enum(["direct", "group", "channel", "thread"])
|
|
24
|
+
.describe("Mixed membership is the norm; the kind is about shape, not about who is in it."),
|
|
25
|
+
title: z.string().max(200).optional().describe("What to call it. Direct messages have none."),
|
|
26
|
+
parent_conversation_id: id("conversation")
|
|
27
|
+
.optional()
|
|
28
|
+
.describe("The conversation this is a thread of."),
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
31
|
+
export const membershipAdded = defineEvent({
|
|
32
|
+
type: "membership.added",
|
|
33
|
+
direction: "workspace",
|
|
34
|
+
summary: "A person or an agent joined a conversation. Shows as a muted centred line.",
|
|
35
|
+
requiresRun: false,
|
|
36
|
+
payload: z.object({
|
|
37
|
+
participant_id: z.string().min(1).max(120).describe("Who joined."),
|
|
38
|
+
participant_kind: z.enum(["person", "agent"]).describe("A person or an agent, in one room."),
|
|
39
|
+
role: z
|
|
40
|
+
.enum(["owner", "member", "guest"])
|
|
41
|
+
.default("member")
|
|
42
|
+
.describe("Their standing here, which is what every `from` field reports."),
|
|
43
|
+
joined_at: isoTimestamp.optional().describe("Defaults to the event's own timestamp."),
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
46
|
+
export const membershipRemoved = defineEvent({
|
|
47
|
+
type: "membership.removed",
|
|
48
|
+
direction: "workspace",
|
|
49
|
+
summary: "A person or an agent left a conversation, or was removed from it.",
|
|
50
|
+
requiresRun: false,
|
|
51
|
+
payload: z.object({
|
|
52
|
+
participant_id: z.string().min(1).max(120).describe("Who left."),
|
|
53
|
+
removed_by: z
|
|
54
|
+
.string()
|
|
55
|
+
.min(1)
|
|
56
|
+
.max(120)
|
|
57
|
+
.optional()
|
|
58
|
+
.describe("Who removed them, if not themselves."),
|
|
59
|
+
}),
|
|
60
|
+
});
|
|
61
|
+
export const attachmentFetched = defineEvent({
|
|
62
|
+
type: "attachment.fetched",
|
|
63
|
+
direction: "workspace",
|
|
64
|
+
summary: "An agent downloaded an attachment. Every fetch is an audit event: “Scout read IMG_2210.jpg”.",
|
|
65
|
+
requiresRun: false,
|
|
66
|
+
payload: z.object({
|
|
67
|
+
attachment_id: id("attachment"),
|
|
68
|
+
filename: z.string().min(1).max(255).describe("What the file was called when it was sent."),
|
|
69
|
+
by: z.string().min(1).max(120).describe("The agent that fetched it. Recorded by Chips."),
|
|
70
|
+
}),
|
|
71
|
+
});
|
|
72
|
+
/** Every event Chips records about a workspace, in the order the reference lists them. */
|
|
73
|
+
export const WORKSPACE_EVENTS = [
|
|
74
|
+
conversationCreated,
|
|
75
|
+
membershipAdded,
|
|
76
|
+
membershipRemoved,
|
|
77
|
+
attachmentFetched,
|
|
78
|
+
];
|
|
79
|
+
//# sourceMappingURL=workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/events/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC7C,IAAI,EAAE,sBAAsB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