@isoplan/protocol 0.15.1 → 0.17.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/README.md CHANGED
@@ -19,7 +19,8 @@ ES module only, with TypeScript types. Depends on zod 4.
19
19
  - **Stop the reply, end and remove** (0.12.0): `drive` `interrupt` stops the reply in progress and keeps the session open; its turn ends `turn-ended` `stopped`, and with no turn running it does nothing. `stop` may say `remove: true`: the runner also forgets the session, never to open it again, and answers `released` with the new `why` `removed`, which it also sends when its person ends and removes the session on the machine itself. A runner from before 0.12.0 drops `interrupt` and ignores `remove`; a server from before it drops a `released` `removed`.
20
20
  - **Experts** (0.13.0): read-only agents a machine's runner hosts, each grounded in one repo, which a session in an office that holds that repo may ask from any machine, through the server. A runner that hosts them says `experts` in its hello; the server answers it `hosting`, which experts of that runner it shows in at least one office, and the runner sends `experts`, its listing (name, project, subject and `state`: `starting`, `ready` or `failed`), only on a connection that has had a `hosting`, only while its link is up, and again when it changes. A session whose fact says `asksExperts` is sent `expert-rights`, the experts it may ask now. It asks with `ask-expert` (expert, question, `blocking`, and the tool call's id as `key`), polls with `ask-check` and acks the end with `asked-ack`, as for a room question; `asked` gains `expert`, an `EXPERT_*` `code`, and the `commit` and `branch` an answer describes. The server asks the host's runner with the `request` kind `answer-expert` (the question's own id as `questionId`, and the asking session as `asker`), which answers with the `reply` kind `answer-expert`, its citations in the answer, or refuses `unavailable` with an `expert` reason (`EXPERT_CAP`, with the cap, its limit and when it frees, `EXPERT_FORK_FAILED` or `EXPERT_UNKNOWN`). Names, subjects, answers and lists are bounded by `MAX_EXPERTS`, `MAX_EXPERT_SUBJECT_LENGTH` and `MAX_EXPERT_ANSWER_LENGTH`. An older side meets none of it: a server from before 0.13.0 drops the hello's `experts` and never sends `hosting`, so its runners never send `experts`, and it refuses `ask-expert` rather than asking a room; a runner or session plugin from before it doesn't say `experts` or `asksExperts`, so it is sent no `hosting`, `answer-expert` or `expert-rights`; and the new `asked` and `unavailable` fields are optional.
21
21
  - **Experts' seniors, and hidden starts** (0.14.0): an expert's listing may say `senior`, that it has a senior generation its junior can ask; an older server ignores it. A server that reads it says `expertSenior` on every `hosting`, and only then does the runner send `expert-senior`, under the `answer-expert` request's `id` and with no text, when the junior answering it first asks its senior. A drive start in a folder may say `hidden`, never with mode `orca`: the session works in a clone Isoplan keeps for itself (a worktree of it, with `branch`), so the person's other tools don't list its folder. A runner that can says `hiddenStarts` in its hello, and only such a runner is sent `hidden`; one from before 0.14.0 would drop it and start in the person's own checkout. `EXPERT_ANSWER_WITHHELD` is gone from the expert codes: an expert refuses a secret-matched answer at once, so no released runner ever led a server to send it. An `asked` carrying it no longer parses, and code that names it no longer compiles.
22
- - **Expert creation suggestions** (0.15.0): Isoplan suggests creating an expert where a session would have been helped by one. A session's facts may carry `areas` (`AreaFactSchema`): per repo-relative folder, the files read and searches made in it, their results' estimated tokens, the time they took and the person's corrections there; counts only, never contents or search patterns. A runner that can says `canCreateExpertsFromSuggestions` in its hello; the server sends it `expert-creation-suggestion-dismissals`, its person's dismissed areas (until a time, or forever), once its hello is let in and whenever they change, and the runner sends no expert creation suggestion messages on a connection before the first, so a server from before 0.15.0 is never sent one. The runner sends `expert-creation-suggestion` (a draft: key, subject, area, proof question and answer, and why it is suggested), `expert-creation-suggestion-ended` (`withdrawn`, or `no-draft`) and `expert-creation-progress` (`cloning`, `grounding`, `proof`, `ready` or `failed`). The server sends `create-expert-from-suggestion`, what the person confirmed, to one of their own runners, `draft-office-wide-expert-creation-suggestion`, asking for an office-wide expert creation suggestion on a folder several sessions searched, and `expert-creation-suggestion-ended` (`made`, with the expert's key; `dismissed`, only by a person on the floor; `refused`, a suggestion the office won't keep, such as one for a repo it doesn't take or someone else's session; or `expired`). `isDismissed(dismissals, project, folder, now)` is the one rule both sides use for whether a dismissal holds: one for the same project whose folder is that folder or one it is in (`.` every folder), for good or until a time later than now, letter case ignored. An expert's listing may say `areas`, the folders and globs it covers; `areaCovers(areas, folder)` is the one rule both sides use for whether they cover a folder: an area whose part before its first wildcard part is that folder or one it is in, `.` every folder, letter case ignored. Area paths are `AreaPathSchema`: relative, with forward slashes, never outside the repo. `expertDisplayName(key)` is the name people read (`pairing-tokens` is "Pairing Tokens Expert").
22
+ - **Expert creation suggestions** (0.15.0): Isoplan suggests creating an expert where a session would have been helped by one. A session's facts may carry `areas` (`AreaFactSchema`): per repo-relative folder, the files read and searches made in it, their results' estimated tokens, the time they took and the person's corrections there; counts only, never contents or search patterns. A runner that can says `canCreateExpertsFromSuggestions` in its hello; the server sends it `expert-creation-suggestion-dismissals`, its person's dismissed areas (until a time, or forever), once its hello is let in and whenever they change, and the runner sends no expert creation suggestion messages on a connection before the first, so a server from before 0.15.0 is never sent one. The runner sends `expert-creation-suggestion` (a draft: key, subject, area, proof question and answer, and why it is suggested), `expert-creation-suggestion-ended` (`withdrawn`, or `no-draft`) and `expert-creation-progress` (`cloning`, `grounding`, `proof`, `ready` or `failed`). The server sends `create-expert-from-suggestion`, what the person confirmed, to one of their own runners, `draft-office-wide-expert-creation-suggestion`, asking for an office-wide expert creation suggestion on a folder several sessions searched, and `expert-creation-suggestion-ended` (`made`, with the expert's key; `dismissed`, only by a person on the floor; `refused`, a suggestion the office won't keep, such as one for a repo it doesn't take or someone else's session; or `expired`). `isDismissed(dismissals, project, folder, now)` is the one rule both sides use for whether a dismissal holds: one for the same project whose folder is that folder or one it is in (`.` every folder), for good or until a time later than now, letter case ignored. An expert's listing may say `areas`, the folders and globs it covers; `areaCovers(areas, folder)` is the one rule both sides use for whether they cover a folder: an area whose part before its first wildcard part is that folder or one it is in, `.` every folder, letter case ignored. Area paths are `AreaPathSchema`: relative, with forward slashes, never outside the repo. `expertDisplayName(key)` is the name people read (`pairing-tokens` is "Pairing Tokens Expert"). From 0.16.0 a session's `expert-creation-suggestion` may say `repetition`, what was done in its area again, which suggested it: its folder, the file read most, read in so many turns over so many sessions with so many of the area's files, or its folder searched so many times; counts only. An older runner sends none, and an older side ignores it.
23
+ - **Expert records and instances** (0.17.0, isoplan-app#340): each computer keeps its own instance of an expert, set up from its expert record on the office server, and answers its own sessions' questions from it; neither a question nor its answer leaves the computer. A runner that does says `expertInstances` in its hello. The server sends such a runner `expert-directory` once its hello is let in, even an empty one, and whenever it changes: every expert record whose project an office holds (key, the record's id, project, owner, `yours` for that runner's person, revision), with the caps of asks.json the runner checks. It also sends `expert-record`, a record's definition (`ExpertDefinitionSchema`: key, a project with a remote, subject, model, `promoteAtTokens`, areas and proof), in answer to `expert-record-wanted` or when its revision changes; `expert-definition-result`, the answer to a publish (`published`, or `refused` as `edited-elsewhere` with the record's definition, `key-taken`, `not-owner`, `project-not-in-an-office` or `deleted`); `expert-deleted`; `set-up-expert-instance`, a person's click to set one up on one of their computers, whose `by` is the account that runner said hello as; `expert-set-up-offer-ended`; and `expert-questions-asked-on-your-other-computers`, which the runner adds its own questions to before it checks the caps. The runner sends `expert-definition` (its owner's publish, `basedOn` the record and revision it last had), `expert-record-wanted` (only once it has the project), `expert-instance-states` (its instances of that server's records: `setting-up` with its step, `ready`, or `failed` with why), `expert-question` (a question's record with no words: its id, the expert, the session, whether it blocked, its state and code, and when it was asked and ended), `expert-set-up-offered` and `expert-proof-failed`, none of them on a connection before its first `expert-directory`, and only while the link is up; the server takes a repeat as the same message. A record is named by `ExpertRecordIdSchema`, a UUID the server makes, so a key used again after a deletion names a new record. `EXPERT_NOT_SET_UP` joins the expert codes, and `EXPERT_QUESTION_HELD` is gone. The relay goes: `experts`, `hosting`, `expert-senior` and the `answer-expert` request and reply no longer parse, a hello's `experts` and an `unavailable` refusal's `expert` are dropped, and code that names `ExpertListing`, `ExpertState`, `ExpertCap`, `ExpertRefusal`, `ExpertsMessage`, `HostingMessage` or `ExpertSeniorMessage` no longer compiles. `ask-expert` stays, answered only `EXPERT_PLUGIN_OLD`, and `expert-rights`' `host` names the expert's owner. An older side: a server from before 0.17.0 sends no `expert-directory`, so its runners send nothing of the family, and it reads a 0.17.0 runner's hello as one without `experts`, so it takes that person's experts off the floor and ends questions to them with `EXPERT_PLUGIN_OLD` naming the host's plugin; so every office server is updated before its plugins. A runner from before 0.17.0 doesn't say `expertInstances`, so it is sent none of the family, and its `ask-expert` is answered `EXPERT_PLUGIN_OLD`.
23
24
  - **`PROTOCOL_VERSION`**: the version both sides speak. A message's `v` must match it.
24
25
  - **`projectId(remoteUrl, { machine, root })`**: a repository's project id, `host/owner/repo` from its git remote whatever form the remote is written in, or `local:<machine>/<root>` without one.
25
26