@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,304 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An agent's context (ADR 0134): the files its harness builds it from at every turn, apart from
|
|
3
|
+
* the room — who it is, how it works, what it knows of the person it serves — listed in Chips and
|
|
4
|
+
* edited there, in the harness's own files.
|
|
5
|
+
*
|
|
6
|
+
* Chips adds no context of its own and knows nothing of any harness's files. A harness that
|
|
7
|
+
* declares `context_files` sends a copy of each agent's set, and of its own (what its agents share,
|
|
8
|
+
* and what a new agent starts with), and keeps them current; each file says what it is called,
|
|
9
|
+
* what its row says, whether it may be edited, and whether the agent reads a shared one instead of
|
|
10
|
+
* its own. A person's edit goes down the harness's socket as a `context.edit` frame, and is done
|
|
11
|
+
* when the harness sends its copy back answering it, or refused when the file changed under it.
|
|
12
|
+
*
|
|
13
|
+
* At most eight files are shown: a harness names the rest in `not_shown`, and the page says Chips
|
|
14
|
+
* does not show them. A file over 64 KB is named there too. Neither is lost in silence: a ninth
|
|
15
|
+
* file, or a larger text, is refused.
|
|
16
|
+
*
|
|
17
|
+
* The copies live in a registry, not the log: what a person wrote about themselves is not
|
|
18
|
+
* replayed to every device, and an edit is never sent to a harness twice.
|
|
19
|
+
*/
|
|
20
|
+
import { z } from "zod";
|
|
21
|
+
/** The most files an agent's page, or a harness's, shows. The rest are named in `not_shown`. */
|
|
22
|
+
export declare const CONTEXT_FILES_SHOWN = 8;
|
|
23
|
+
/** The most a file's text may hold, in UTF-8 bytes. A larger one is named in `not_shown`. */
|
|
24
|
+
export declare const CONTEXT_FILE_BYTES = 65536;
|
|
25
|
+
/** The most files `not_shown` names. */
|
|
26
|
+
export declare const CONTEXT_NOT_SHOWN_MAX = 64;
|
|
27
|
+
/**
|
|
28
|
+
* How long an edit waits for its harness's answer: the minute a fork or a new agent has. After it
|
|
29
|
+
* the edit is missed, and the person is told the harness hasn't answered; an answer after it still
|
|
30
|
+
* counts.
|
|
31
|
+
*/
|
|
32
|
+
export declare const CONTEXT_EDIT_WAIT_MS = 60000;
|
|
33
|
+
/** The code an edit is refused with when the file changed after the person opened it. */
|
|
34
|
+
export declare const STALE_CONTEXT = "stale_context";
|
|
35
|
+
/**
|
|
36
|
+
* What a file is for, so the same kind of file wears the same mark on every harness. The one word
|
|
37
|
+
* list harnesses share; it picks a row's mark and nothing else.
|
|
38
|
+
*/
|
|
39
|
+
export declare const CONTEXT_ROLES: readonly ["identity", "instructions", "about_you", "memory", "other"];
|
|
40
|
+
export declare const contextRole: z.ZodEnum<{
|
|
41
|
+
memory: "memory";
|
|
42
|
+
other: "other";
|
|
43
|
+
identity: "identity";
|
|
44
|
+
instructions: "instructions";
|
|
45
|
+
about_you: "about_you";
|
|
46
|
+
}>;
|
|
47
|
+
export type ContextRole = z.infer<typeof contextRole>;
|
|
48
|
+
/** The size of a text in UTF-8 bytes. */
|
|
49
|
+
export declare function contextBytes(text: string): number;
|
|
50
|
+
export declare const contextFile: z.ZodObject<{
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
title: z.ZodString;
|
|
53
|
+
about: z.ZodOptional<z.ZodString>;
|
|
54
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
memory: "memory";
|
|
56
|
+
other: "other";
|
|
57
|
+
identity: "identity";
|
|
58
|
+
instructions: "instructions";
|
|
59
|
+
about_you: "about_you";
|
|
60
|
+
}>>;
|
|
61
|
+
text: z.ZodOptional<z.ZodString>;
|
|
62
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
63
|
+
editable: z.ZodBoolean;
|
|
64
|
+
why_read_only: z.ZodOptional<z.ZodString>;
|
|
65
|
+
shared: z.ZodOptional<z.ZodString>;
|
|
66
|
+
replaceable: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export type ContextFile = z.infer<typeof contextFile>;
|
|
69
|
+
export declare const sharedContextFile: z.ZodObject<{
|
|
70
|
+
id: z.ZodString;
|
|
71
|
+
used_by: z.ZodOptional<z.ZodInt>;
|
|
72
|
+
for_new_agents: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
name: z.ZodString;
|
|
74
|
+
title: z.ZodString;
|
|
75
|
+
about: z.ZodOptional<z.ZodString>;
|
|
76
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
memory: "memory";
|
|
78
|
+
other: "other";
|
|
79
|
+
identity: "identity";
|
|
80
|
+
instructions: "instructions";
|
|
81
|
+
about_you: "about_you";
|
|
82
|
+
}>>;
|
|
83
|
+
text: z.ZodOptional<z.ZodString>;
|
|
84
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
85
|
+
editable: z.ZodBoolean;
|
|
86
|
+
why_read_only: z.ZodOptional<z.ZodString>;
|
|
87
|
+
shared: z.ZodOptional<z.ZodString>;
|
|
88
|
+
replaceable: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
export type SharedContextFile = z.infer<typeof sharedContextFile>;
|
|
91
|
+
export declare const notShownFile: z.ZodObject<{
|
|
92
|
+
name: z.ZodString;
|
|
93
|
+
title: z.ZodOptional<z.ZodString>;
|
|
94
|
+
reason: z.ZodEnum<{
|
|
95
|
+
count: "count";
|
|
96
|
+
too_large: "too_large";
|
|
97
|
+
}>;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
export type NotShownFile = z.infer<typeof notShownFile>;
|
|
100
|
+
export declare const contextAnswer: {
|
|
101
|
+
answers: z.ZodOptional<z.ZodString>;
|
|
102
|
+
refuses: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
edit_id: z.ZodString;
|
|
104
|
+
reason: z.ZodEnum<{
|
|
105
|
+
failed: "failed";
|
|
106
|
+
changed: "changed";
|
|
107
|
+
}>;
|
|
108
|
+
message: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
};
|
|
111
|
+
export declare const agentContextPut: z.ZodObject<{
|
|
112
|
+
answers: z.ZodOptional<z.ZodString>;
|
|
113
|
+
refuses: z.ZodOptional<z.ZodObject<{
|
|
114
|
+
edit_id: z.ZodString;
|
|
115
|
+
reason: z.ZodEnum<{
|
|
116
|
+
failed: "failed";
|
|
117
|
+
changed: "changed";
|
|
118
|
+
}>;
|
|
119
|
+
message: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
files: z.ZodArray<z.ZodObject<{
|
|
122
|
+
name: z.ZodString;
|
|
123
|
+
title: z.ZodString;
|
|
124
|
+
about: z.ZodOptional<z.ZodString>;
|
|
125
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
126
|
+
memory: "memory";
|
|
127
|
+
other: "other";
|
|
128
|
+
identity: "identity";
|
|
129
|
+
instructions: "instructions";
|
|
130
|
+
about_you: "about_you";
|
|
131
|
+
}>>;
|
|
132
|
+
text: z.ZodOptional<z.ZodString>;
|
|
133
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
134
|
+
editable: z.ZodBoolean;
|
|
135
|
+
why_read_only: z.ZodOptional<z.ZodString>;
|
|
136
|
+
shared: z.ZodOptional<z.ZodString>;
|
|
137
|
+
replaceable: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
not_shown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
140
|
+
name: z.ZodString;
|
|
141
|
+
title: z.ZodOptional<z.ZodString>;
|
|
142
|
+
reason: z.ZodEnum<{
|
|
143
|
+
count: "count";
|
|
144
|
+
too_large: "too_large";
|
|
145
|
+
}>;
|
|
146
|
+
}, z.core.$strip>>>;
|
|
147
|
+
read_note: z.ZodOptional<z.ZodString>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
export type AgentContextPut = z.infer<typeof agentContextPut>;
|
|
150
|
+
export declare const harnessContextPut: z.ZodObject<{
|
|
151
|
+
answers: z.ZodOptional<z.ZodString>;
|
|
152
|
+
refuses: z.ZodOptional<z.ZodObject<{
|
|
153
|
+
edit_id: z.ZodString;
|
|
154
|
+
reason: z.ZodEnum<{
|
|
155
|
+
failed: "failed";
|
|
156
|
+
changed: "changed";
|
|
157
|
+
}>;
|
|
158
|
+
message: z.ZodOptional<z.ZodString>;
|
|
159
|
+
}, z.core.$strip>>;
|
|
160
|
+
shared: z.ZodArray<z.ZodObject<{
|
|
161
|
+
id: z.ZodString;
|
|
162
|
+
used_by: z.ZodOptional<z.ZodInt>;
|
|
163
|
+
for_new_agents: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
name: z.ZodString;
|
|
165
|
+
title: z.ZodString;
|
|
166
|
+
about: z.ZodOptional<z.ZodString>;
|
|
167
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
168
|
+
memory: "memory";
|
|
169
|
+
other: "other";
|
|
170
|
+
identity: "identity";
|
|
171
|
+
instructions: "instructions";
|
|
172
|
+
about_you: "about_you";
|
|
173
|
+
}>>;
|
|
174
|
+
text: z.ZodOptional<z.ZodString>;
|
|
175
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
176
|
+
editable: z.ZodBoolean;
|
|
177
|
+
why_read_only: z.ZodOptional<z.ZodString>;
|
|
178
|
+
shared: z.ZodOptional<z.ZodString>;
|
|
179
|
+
replaceable: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
+
}, z.core.$strip>>;
|
|
181
|
+
not_shown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
182
|
+
name: z.ZodString;
|
|
183
|
+
title: z.ZodOptional<z.ZodString>;
|
|
184
|
+
reason: z.ZodEnum<{
|
|
185
|
+
count: "count";
|
|
186
|
+
too_large: "too_large";
|
|
187
|
+
}>;
|
|
188
|
+
}, z.core.$strip>>>;
|
|
189
|
+
new_agents_note: z.ZodOptional<z.ZodString>;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
export type HarnessContextPut = z.infer<typeof harnessContextPut>;
|
|
192
|
+
export declare const contextEditAsk: z.ZodObject<{
|
|
193
|
+
name: z.ZodString;
|
|
194
|
+
text: z.ZodString;
|
|
195
|
+
base_hash: z.ZodNullable<z.ZodString>;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
export type ContextEditAsk = z.infer<typeof contextEditAsk>;
|
|
198
|
+
export declare const CONTEXT_EDIT_STATES: readonly ["waiting", "saved", "changed", "failed", "missed"];
|
|
199
|
+
export declare const contextEditState: z.ZodEnum<{
|
|
200
|
+
waiting: "waiting";
|
|
201
|
+
saved: "saved";
|
|
202
|
+
failed: "failed";
|
|
203
|
+
missed: "missed";
|
|
204
|
+
changed: "changed";
|
|
205
|
+
}>;
|
|
206
|
+
export type ContextEditState = z.infer<typeof contextEditState>;
|
|
207
|
+
export declare const contextEditView: z.ZodObject<{
|
|
208
|
+
edit_id: z.ZodString;
|
|
209
|
+
name: z.ZodString;
|
|
210
|
+
state: z.ZodEnum<{
|
|
211
|
+
waiting: "waiting";
|
|
212
|
+
saved: "saved";
|
|
213
|
+
failed: "failed";
|
|
214
|
+
missed: "missed";
|
|
215
|
+
changed: "changed";
|
|
216
|
+
}>;
|
|
217
|
+
asked_at: z.ZodISODateTime;
|
|
218
|
+
answered_at: z.ZodOptional<z.ZodISODateTime>;
|
|
219
|
+
message: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
export type ContextEditView = z.infer<typeof contextEditView>;
|
|
222
|
+
export declare const agentContextView: z.ZodObject<{
|
|
223
|
+
agent_id: z.ZodString;
|
|
224
|
+
harness_id: z.ZodString;
|
|
225
|
+
files: z.ZodArray<z.ZodObject<{
|
|
226
|
+
name: z.ZodString;
|
|
227
|
+
title: z.ZodString;
|
|
228
|
+
about: z.ZodOptional<z.ZodString>;
|
|
229
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
230
|
+
memory: "memory";
|
|
231
|
+
other: "other";
|
|
232
|
+
identity: "identity";
|
|
233
|
+
instructions: "instructions";
|
|
234
|
+
about_you: "about_you";
|
|
235
|
+
}>>;
|
|
236
|
+
text: z.ZodOptional<z.ZodString>;
|
|
237
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
238
|
+
editable: z.ZodBoolean;
|
|
239
|
+
why_read_only: z.ZodOptional<z.ZodString>;
|
|
240
|
+
shared: z.ZodOptional<z.ZodString>;
|
|
241
|
+
replaceable: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
+
}, z.core.$strip>>;
|
|
243
|
+
not_shown: z.ZodArray<z.ZodObject<{
|
|
244
|
+
name: z.ZodString;
|
|
245
|
+
title: z.ZodOptional<z.ZodString>;
|
|
246
|
+
reason: z.ZodEnum<{
|
|
247
|
+
count: "count";
|
|
248
|
+
too_large: "too_large";
|
|
249
|
+
}>;
|
|
250
|
+
}, z.core.$strip>>;
|
|
251
|
+
read_note: z.ZodOptional<z.ZodString>;
|
|
252
|
+
read_at: z.ZodISODateTime;
|
|
253
|
+
away: z.ZodBoolean;
|
|
254
|
+
}, z.core.$strip>;
|
|
255
|
+
export type AgentContextView = z.infer<typeof agentContextView>;
|
|
256
|
+
export declare const harnessContextView: z.ZodObject<{
|
|
257
|
+
harness_id: z.ZodString;
|
|
258
|
+
shared: z.ZodArray<z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
used_by: z.ZodOptional<z.ZodInt>;
|
|
261
|
+
for_new_agents: z.ZodOptional<z.ZodBoolean>;
|
|
262
|
+
name: z.ZodString;
|
|
263
|
+
title: z.ZodString;
|
|
264
|
+
about: z.ZodOptional<z.ZodString>;
|
|
265
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
266
|
+
memory: "memory";
|
|
267
|
+
other: "other";
|
|
268
|
+
identity: "identity";
|
|
269
|
+
instructions: "instructions";
|
|
270
|
+
about_you: "about_you";
|
|
271
|
+
}>>;
|
|
272
|
+
text: z.ZodOptional<z.ZodString>;
|
|
273
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
274
|
+
editable: z.ZodBoolean;
|
|
275
|
+
why_read_only: z.ZodOptional<z.ZodString>;
|
|
276
|
+
shared: z.ZodOptional<z.ZodString>;
|
|
277
|
+
replaceable: z.ZodOptional<z.ZodBoolean>;
|
|
278
|
+
}, z.core.$strip>>;
|
|
279
|
+
not_shown: z.ZodArray<z.ZodObject<{
|
|
280
|
+
name: z.ZodString;
|
|
281
|
+
title: z.ZodOptional<z.ZodString>;
|
|
282
|
+
reason: z.ZodEnum<{
|
|
283
|
+
count: "count";
|
|
284
|
+
too_large: "too_large";
|
|
285
|
+
}>;
|
|
286
|
+
}, z.core.$strip>>;
|
|
287
|
+
new_agents_note: z.ZodOptional<z.ZodString>;
|
|
288
|
+
read_at: z.ZodISODateTime;
|
|
289
|
+
away: z.ZodBoolean;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
export type HarnessContextView = z.infer<typeof harnessContextView>;
|
|
292
|
+
export declare const contextEditFrame: z.ZodObject<{
|
|
293
|
+
frame: z.ZodLiteral<"context.edit">;
|
|
294
|
+
edit_id: z.ZodString;
|
|
295
|
+
harness_id: z.ZodString;
|
|
296
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
297
|
+
name: z.ZodString;
|
|
298
|
+
text: z.ZodString;
|
|
299
|
+
base_hash: z.ZodNullable<z.ZodString>;
|
|
300
|
+
asked_by: z.ZodString;
|
|
301
|
+
asked_at: z.ZodISODateTime;
|
|
302
|
+
}, z.core.$strip>;
|
|
303
|
+
export type ContextEditFrame = z.infer<typeof contextEditFrame>;
|
|
304
|
+
//# sourceMappingURL=context-files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-files.d.ts","sourceRoot":"","sources":["../../src/context-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,gGAAgG;AAChG,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,6FAA6F;AAC7F,eAAO,MAAM,kBAAkB,QAAS,CAAC;AACzC,wCAAwC;AACxC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC;;;;GAIG;AACH,eAAO,MA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AAc,CAAC,CAAC;AAE5D,eAAO,MAAM,mBAAmB,8DAA+D,CAAC;AAChG,eAAO,MAAM,gBAAgB;;;;;;EAA8B,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,eAAe;;;;;;;;;;;;;iBAWgD,CAAC;AAC7E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUwC,CAAC;AACtE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASyC,CAAC;AACzE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,gBAAgB;;;;;;;;;;iBAgB1B,CAAC;AACJ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An agent's context (ADR 0134): the files its harness builds it from at every turn, apart from
|
|
3
|
+
* the room — who it is, how it works, what it knows of the person it serves — listed in Chips and
|
|
4
|
+
* edited there, in the harness's own files.
|
|
5
|
+
*
|
|
6
|
+
* Chips adds no context of its own and knows nothing of any harness's files. A harness that
|
|
7
|
+
* declares `context_files` sends a copy of each agent's set, and of its own (what its agents share,
|
|
8
|
+
* and what a new agent starts with), and keeps them current; each file says what it is called,
|
|
9
|
+
* what its row says, whether it may be edited, and whether the agent reads a shared one instead of
|
|
10
|
+
* its own. A person's edit goes down the harness's socket as a `context.edit` frame, and is done
|
|
11
|
+
* when the harness sends its copy back answering it, or refused when the file changed under it.
|
|
12
|
+
*
|
|
13
|
+
* At most eight files are shown: a harness names the rest in `not_shown`, and the page says Chips
|
|
14
|
+
* does not show them. A file over 64 KB is named there too. Neither is lost in silence: a ninth
|
|
15
|
+
* file, or a larger text, is refused.
|
|
16
|
+
*
|
|
17
|
+
* The copies live in a registry, not the log: what a person wrote about themselves is not
|
|
18
|
+
* replayed to every device, and an edit is never sent to a harness twice.
|
|
19
|
+
*/
|
|
20
|
+
import { z } from "zod";
|
|
21
|
+
import { id, isoTimestamp } from "./primitives.js";
|
|
22
|
+
/** The most files an agent's page, or a harness's, shows. The rest are named in `not_shown`. */
|
|
23
|
+
export const CONTEXT_FILES_SHOWN = 8;
|
|
24
|
+
/** The most a file's text may hold, in UTF-8 bytes. A larger one is named in `not_shown`. */
|
|
25
|
+
export const CONTEXT_FILE_BYTES = 65_536;
|
|
26
|
+
/** The most files `not_shown` names. */
|
|
27
|
+
export const CONTEXT_NOT_SHOWN_MAX = 64;
|
|
28
|
+
/**
|
|
29
|
+
* How long an edit waits for its harness's answer: the minute a fork or a new agent has. After it
|
|
30
|
+
* the edit is missed, and the person is told the harness hasn't answered; an answer after it still
|
|
31
|
+
* counts.
|
|
32
|
+
*/
|
|
33
|
+
export const CONTEXT_EDIT_WAIT_MS = 60_000;
|
|
34
|
+
/** The code an edit is refused with when the file changed after the person opened it. */
|
|
35
|
+
export const STALE_CONTEXT = "stale_context";
|
|
36
|
+
/**
|
|
37
|
+
* What a file is for, so the same kind of file wears the same mark on every harness. The one word
|
|
38
|
+
* list harnesses share; it picks a row's mark and nothing else.
|
|
39
|
+
*/
|
|
40
|
+
export const CONTEXT_ROLES = ["identity", "instructions", "about_you", "memory", "other"];
|
|
41
|
+
export const contextRole = z.enum(CONTEXT_ROLES);
|
|
42
|
+
/**
|
|
43
|
+
* A file's own name, one path segment (SEC-14): no slash either way, no NUL, not `.` or `..`. A
|
|
44
|
+
* harness writes a person's edit to the file the edit names, under the agent's folder; a name that
|
|
45
|
+
* climbed out of it would write wherever a stranger's server, or a man in the middle on the plain
|
|
46
|
+
* network link, cared to say. Every name a file is written under is one of these; a file that is
|
|
47
|
+
* only named as not shown may be called anything, since nothing is written under it.
|
|
48
|
+
*/
|
|
49
|
+
const ONE_SEGMENT = /^(?!\.{1,2}$)[^/\\\0]+$/;
|
|
50
|
+
const fileName = z
|
|
51
|
+
.string()
|
|
52
|
+
.min(1)
|
|
53
|
+
.max(255)
|
|
54
|
+
.regex(ONE_SEGMENT, "a file's own name: one segment, no slash, not `.` or `..`");
|
|
55
|
+
const shownName = z.string().min(1).max(255);
|
|
56
|
+
const title = z.string().min(1).max(80);
|
|
57
|
+
const hash = z.string().min(1).max(128);
|
|
58
|
+
/** The size of a text in UTF-8 bytes. */
|
|
59
|
+
export function contextBytes(text) {
|
|
60
|
+
return new TextEncoder().encode(text).length;
|
|
61
|
+
}
|
|
62
|
+
const fileFields = {
|
|
63
|
+
name: fileName.describe("Its own name, shown small under the title: `PERSONA.md`."),
|
|
64
|
+
title: title.describe("What its row says, in the harness's words: `Who it is`."),
|
|
65
|
+
about: z.string().max(200).optional().describe("The row's line. Absent: the text's first line."),
|
|
66
|
+
role: contextRole.optional().describe("What it is for, which picks its mark. Absent: `other`."),
|
|
67
|
+
text: z
|
|
68
|
+
.string()
|
|
69
|
+
.optional()
|
|
70
|
+
.describe("Its text. Absent only for a file the agent reads from its harness's set (`shared`)."),
|
|
71
|
+
hash: hash
|
|
72
|
+
.optional()
|
|
73
|
+
.describe("The harness's own hash of `text`, which an edit names as what it was made from."),
|
|
74
|
+
editable: z.boolean().describe("Whether a person may change it from Chips."),
|
|
75
|
+
why_read_only: z
|
|
76
|
+
.string()
|
|
77
|
+
.max(120)
|
|
78
|
+
.optional()
|
|
79
|
+
.describe("Why it may not be, in the harness's words: `Built into Lathe`."),
|
|
80
|
+
shared: z
|
|
81
|
+
.string()
|
|
82
|
+
.min(1)
|
|
83
|
+
.max(64)
|
|
84
|
+
.optional()
|
|
85
|
+
.describe("The `id` of a file in the harness's own set that this agent reads instead of a file of its own."),
|
|
86
|
+
replaceable: z
|
|
87
|
+
.boolean()
|
|
88
|
+
.optional()
|
|
89
|
+
.describe("For a `shared` file: whether the agent may be given its own, begun from the shared text."),
|
|
90
|
+
};
|
|
91
|
+
function textFits(file) {
|
|
92
|
+
return file.text === undefined || contextBytes(file.text) <= CONTEXT_FILE_BYTES;
|
|
93
|
+
}
|
|
94
|
+
export const contextFile = z
|
|
95
|
+
.object(fileFields)
|
|
96
|
+
.refine((file) => file.text !== undefined || file.shared !== undefined, {
|
|
97
|
+
message: "A file has its text, or names the shared file the agent reads.",
|
|
98
|
+
})
|
|
99
|
+
.refine(textFits, {
|
|
100
|
+
message: "A file's text is 64 KB at most: name a larger one in `not_shown`.",
|
|
101
|
+
})
|
|
102
|
+
.describe("One file an agent is built from, as its harness names it (ADR 0134).");
|
|
103
|
+
export const sharedContextFile = z
|
|
104
|
+
.object({
|
|
105
|
+
...fileFields,
|
|
106
|
+
id: z.string().min(1).max(64).describe("What an agent's file names in `shared`."),
|
|
107
|
+
used_by: z
|
|
108
|
+
.int()
|
|
109
|
+
.nonnegative()
|
|
110
|
+
.optional()
|
|
111
|
+
.describe("How many of its agents read it, `0` when none does now. Left out: no agent reads it, and each new agent is given a copy of its own (`for_new_agents`)."),
|
|
112
|
+
for_new_agents: z
|
|
113
|
+
.boolean()
|
|
114
|
+
.optional()
|
|
115
|
+
.describe("Whether a new agent starts with it, or with a copy of it."),
|
|
116
|
+
})
|
|
117
|
+
.refine((file) => file.text !== undefined, { message: "A shared file has its text." })
|
|
118
|
+
.refine(textFits, {
|
|
119
|
+
message: "A file's text is 64 KB at most: name a larger one in `not_shown`.",
|
|
120
|
+
})
|
|
121
|
+
.describe("One file of a harness's own set: read by several of its agents, or copied into a new one (ADR 0134).");
|
|
122
|
+
export const notShownFile = z
|
|
123
|
+
.object({
|
|
124
|
+
name: shownName,
|
|
125
|
+
title: title.optional(),
|
|
126
|
+
reason: z.enum(["count", "too_large"]).describe("Past the eighth, or over 64 KB."),
|
|
127
|
+
})
|
|
128
|
+
.describe("A file the agent has that Chips does not show (ADR 0134).");
|
|
129
|
+
export const contextAnswer = {
|
|
130
|
+
answers: id("edit")
|
|
131
|
+
.optional()
|
|
132
|
+
.describe("The edit this copy answers: saved, and this is the file as it is now."),
|
|
133
|
+
refuses: z
|
|
134
|
+
.object({
|
|
135
|
+
edit_id: id("edit"),
|
|
136
|
+
reason: z
|
|
137
|
+
.enum(["changed", "failed"])
|
|
138
|
+
.describe("`changed`: the file was changed since the edit's version. `failed`: otherwise."),
|
|
139
|
+
message: z.string().min(1).max(300).optional().describe("What went wrong, for the person."),
|
|
140
|
+
})
|
|
141
|
+
.optional()
|
|
142
|
+
.describe("An edit not made. The copy beside it is the file as it is now."),
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* When the agent reads its files, in its harness's words, for the foot under them on its page (ADR
|
|
146
|
+
* 0238): a harness that reads them only when a conversation starts says so, and what a change
|
|
147
|
+
* waits for. Absent: Chips says the harness gives them at the start of every turn.
|
|
148
|
+
*/
|
|
149
|
+
const readNote = z
|
|
150
|
+
.string()
|
|
151
|
+
.min(1)
|
|
152
|
+
.max(300)
|
|
153
|
+
.describe("When the agent reads these, in the harness's words: `Hermes reads these when a conversation starts.` Absent: at the start of every turn.");
|
|
154
|
+
function uniqueNames(files) {
|
|
155
|
+
return new Set(files.map((file) => file.name)).size === files.length;
|
|
156
|
+
}
|
|
157
|
+
export const agentContextPut = z
|
|
158
|
+
.object({
|
|
159
|
+
files: z
|
|
160
|
+
.array(contextFile)
|
|
161
|
+
.max(CONTEXT_FILES_SHOWN)
|
|
162
|
+
.refine(uniqueNames, { message: "Each file is named once." })
|
|
163
|
+
.describe("The agent's files, in the order its page shows them: eight at most."),
|
|
164
|
+
not_shown: z.array(notShownFile).max(CONTEXT_NOT_SHOWN_MAX).optional(),
|
|
165
|
+
read_note: readNote.optional(),
|
|
166
|
+
...contextAnswer,
|
|
167
|
+
})
|
|
168
|
+
.describe("`PUT /v1/agents/:id/context`: a harness's copy of one of its agents' files.");
|
|
169
|
+
export const harnessContextPut = z
|
|
170
|
+
.object({
|
|
171
|
+
shared: z
|
|
172
|
+
.array(sharedContextFile)
|
|
173
|
+
.max(CONTEXT_FILES_SHOWN)
|
|
174
|
+
.refine(uniqueNames, { message: "Each file is named once." })
|
|
175
|
+
.refine((files) => new Set(files.map((file) => file.id)).size === files.length, {
|
|
176
|
+
message: "Each shared file has its own id.",
|
|
177
|
+
}),
|
|
178
|
+
not_shown: z.array(notShownFile).max(CONTEXT_NOT_SHOWN_MAX).optional(),
|
|
179
|
+
new_agents_note: z
|
|
180
|
+
.string()
|
|
181
|
+
.min(1)
|
|
182
|
+
.max(300)
|
|
183
|
+
.optional()
|
|
184
|
+
.describe("What else a new agent starts with, in the harness's words, for its page."),
|
|
185
|
+
...contextAnswer,
|
|
186
|
+
})
|
|
187
|
+
.describe("`PUT /v1/harnesses/:id/context`: a harness's copy of its own set.");
|
|
188
|
+
export const contextEditAsk = z
|
|
189
|
+
.object({
|
|
190
|
+
name: fileName.describe("The file to change."),
|
|
191
|
+
text: z.string().refine((text) => contextBytes(text) <= CONTEXT_FILE_BYTES, {
|
|
192
|
+
message: "A file's text is 64 KB at most.",
|
|
193
|
+
}),
|
|
194
|
+
base_hash: hash
|
|
195
|
+
.nullable()
|
|
196
|
+
.describe("The version the person changed, as the copy they read said. `null` to give the agent its own of a shared file."),
|
|
197
|
+
})
|
|
198
|
+
.describe("`POST /v1/agents/:id/context/edits` and `/v1/harnesses/:id/context/edits`.");
|
|
199
|
+
export const CONTEXT_EDIT_STATES = ["waiting", "saved", "changed", "failed", "missed"];
|
|
200
|
+
export const contextEditState = z.enum(CONTEXT_EDIT_STATES);
|
|
201
|
+
export const contextEditView = z
|
|
202
|
+
.object({
|
|
203
|
+
edit_id: id("edit"),
|
|
204
|
+
name: fileName,
|
|
205
|
+
state: contextEditState.describe("`missed` once `CONTEXT_EDIT_WAIT_MS` has passed with no answer; read, never stored."),
|
|
206
|
+
asked_at: isoTimestamp,
|
|
207
|
+
answered_at: isoTimestamp.optional(),
|
|
208
|
+
message: z.string().max(300).optional().describe("The harness's words, for a failure."),
|
|
209
|
+
})
|
|
210
|
+
.describe("An edit a person asked for, and what became of it (ADR 0134).");
|
|
211
|
+
export const agentContextView = z
|
|
212
|
+
.object({
|
|
213
|
+
agent_id: id("agent"),
|
|
214
|
+
harness_id: id("harness"),
|
|
215
|
+
files: z.array(contextFile),
|
|
216
|
+
not_shown: z.array(notShownFile),
|
|
217
|
+
read_note: readNote.optional(),
|
|
218
|
+
read_at: isoTimestamp.describe("When the harness last sent its copy."),
|
|
219
|
+
away: z.boolean().describe("No socket of the harness hears edits now: read, but not saved."),
|
|
220
|
+
})
|
|
221
|
+
.describe("`GET /v1/agents/:id/context`, for the harness's owner.");
|
|
222
|
+
export const harnessContextView = z
|
|
223
|
+
.object({
|
|
224
|
+
harness_id: id("harness"),
|
|
225
|
+
shared: z.array(sharedContextFile),
|
|
226
|
+
not_shown: z.array(notShownFile),
|
|
227
|
+
new_agents_note: z.string().optional(),
|
|
228
|
+
read_at: isoTimestamp,
|
|
229
|
+
away: z.boolean(),
|
|
230
|
+
})
|
|
231
|
+
.describe("`GET /v1/harnesses/:id/context`, for the harness's owner.");
|
|
232
|
+
export const contextEditFrame = z
|
|
233
|
+
.object({
|
|
234
|
+
frame: z.literal("context.edit"),
|
|
235
|
+
edit_id: id("edit"),
|
|
236
|
+
harness_id: id("harness"),
|
|
237
|
+
agent_id: id("agent")
|
|
238
|
+
.optional()
|
|
239
|
+
.describe("The agent whose file it is; absent for the harness's own."),
|
|
240
|
+
name: fileName,
|
|
241
|
+
text: z.string(),
|
|
242
|
+
base_hash: hash.nullable().describe("`null`: make the agent its own, from the shared file."),
|
|
243
|
+
asked_by: id("person"),
|
|
244
|
+
asked_at: isoTimestamp,
|
|
245
|
+
})
|
|
246
|
+
.describe("A person changed a context file (ADR 0134). Sent to a harness's socket that said `context` in its `hello`, now or never: it is not in the log. The harness answers with its copy, `answers` or `refuses` naming `edit_id`.");
|
|
247
|
+
//# sourceMappingURL=context-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-files.js","sourceRoot":"","sources":["../../src/context-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEnD,gGAAgG;AAChG,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AACrC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACzC,wCAAwC;AACxC,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAC3C,yFAAyF;AACzF,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AACnG,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAGjD;;;;;;GAMG;AACH,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAC9C,MAAM,QAAQ,GAAG,CAAC;KACf,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,GAAG,CAAC;KACR,KAAK,CAAC,WAAW,EAAE,2DAA2D,CAAC,CAAC;AACnF,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC7C,MAAM,KA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