Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions documentor/FORK.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ what a rebase meets.
| `packages/opencode/src/event-v2-bridge.ts` | Routes `publishMany` with the same instance location as `publish` | The bridge implements `EventV2.Interface` |
| `packages/core/test/session-runner-tool-events.test.ts` | Its `EventV2.Service` double has a `publishMany` | The interface requires it |
| `packages/core/src/v1/config/config.ts`, `packages/opencode/src/session/llm.ts`, `packages/opencode/src/agent/agent.ts` | `experimental.openTelemetryChatContent` is a config key; both `experimental_telemetry` blocks pass it as the AI SDK's `recordInputs` and `recordOutputs`, so unless it is `true` the `ai.*` spans carry no prompt and no response text | The prompts DocuMentor sends hold personal data about third parties. Upstream's bare `openTelemetry` boolean records them on every span, and DocuMentor's collector had to strip them downstream |
| `packages/sdk/js/src/v2/gen/*` | `session.create` takes `id`; `session.prompt` and `session.promptAsync` take `author` and `answerable`, `UserMessage` declares both, and `Config.experimental` declares `openTelemetryChatContent` | Generated by `packages/sdk/js/script/build.ts` from the server's OpenAPI |
| `packages/sdk/js/src/v2/gen/*` | `session.create` takes `id`; `session.prompt` and `session.promptAsync` take `author` and `answerable`, `UserMessage` declares both, `Config.experimental` declares `openTelemetryChatContent`, and `session.title` generates a title on demand | Generated by `packages/sdk/js/script/build.ts` from the server's OpenAPI |
| `packages/opencode/src/acp/event.ts` | `agent_message_chunk`, `agent_thought_chunk`, `tool_call` and `tool_call_update`, live and replayed, carry `_meta.opencode = { messageId, parentId }`: the assistant message and the user message it answers. The subscription caches each assistant message's `parentID` from `message.updated` for the sessions it tracks. On a miss it fetches the message once, shared by concurrent updates; a failed fetch is remembered until the session goes idle, and meanwhile the updates carry `parentId: null`. A session's cache is forgotten when it goes idle, and the whole cache when the event stream disconnects | DocuMentor detects from the ACP stream alone, in order, the moment the agent starts answering a message sent while the turn ran |
| `packages/opencode/src/acp/event.ts` | A replayed `user_message_chunk` carries `_meta.opencode = { messageId, parentId: null, author?, answerable?, partMetadata? }` | DocuMentor rebuilds a discussion from the replay with authors and mention metadata |
| `packages/opencode/src/session/prompt.ts` | `Service.title` runs the first-turn title agent over the newest 1–50 real messages of a session on demand, with an optional compare-and-set on the current title; `ensureTitle` and `title` share one `generateTitle` | DocuMentor titles a project discussion after its first message and offers *Suggest a title* on any chat; the first-turn step never runs for a discussion, whose title is set before any turn |
| `packages/opencode/src/server/routes/instance/httpapi/{groups,handlers}/session.ts` | `POST /session/:sessionID/title` | The only channel DocuMentor's web tier has to the title agent |
| `packages/opencode/test/lib/llm-server.ts` | A title request is served by a queued entry whose `match` matches it before the fixed `E2E Title` answer | The on-demand title tests choose the answer |
| `packages/opencode/src/session/prompt.ts` | `Service.title` runs the first-turn title agent over the newest 1–50 real messages of a session on demand, read newest first, with an optional compare-and-set on the current title. A model the caller names must exist; without one it uses the newest user message's model, then the default model. `ensureTitle` and `title` share one `generateTitle` | DocuMentor titles a project discussion after its first message and offers _Suggest a title_ on any chat; the first-turn step never runs for a discussion, whose title is set before any turn |
| `packages/opencode/src/server/routes/instance/httpapi/{groups,handlers}/session.ts` | `POST /session/:sessionID/title` | The only channel DocuMentor's web tier has to the title agent |
| `packages/opencode/test/lib/llm-server.ts` | Title requests have their own queue (`pushTitle`, `textTitle`), answered before the fixed `E2E Title` answer; the main queue never serves one | The on-demand title tests choose the answer |
| Fork cases in `packages/opencode/test/acp/event.test.ts`, `test/acp/service-session.test.ts`, `test/session/prompt.test.ts`, `test/session/message-v2.test.ts`, `test/session/compaction.test.ts`, `test/session/session.test.ts` `test/session/llm.test.ts` and `test/session/fork-batch.test.ts`, and `packages/core/test/event-publish-many.test.ts` | Tests named `documentor: …` | They pin the ACP, session and telemetry rows above; a rebase keeps them |
| `packages/core/src/integration.ts` | An OAuth attempt's credential is stored before the attempt reads as complete, inside one update of the attempts map | The attempt was marked complete first and the credential written after. On SQLite nothing could look in between; on a network database a caller that saw "complete" could list no credential |
| `patches/effect@4.0.0-beta.83.patch` | Adds Effect's own fix for re-entrant interruption, first released in `4.0.0-beta.100` | A fiber that woke another fiber which interrupted it synchronously had its continuation stack corrupted once its cleanup awaited anything. With Postgres that leaked a pooled connection. Drop these hunks when upstream moves to `beta.100` or later |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export const SummarizePayload = Schema.Struct({
modelID: ModelV2.ID,
auto: Schema.optional(Schema.Boolean),
})
export const TitlePayload = Schema.Struct(Struct.omit(SessionPrompt.TitleInput.fields, ["sessionID"]))
export const TitlePayload = Schema.Struct(Struct.omit(SessionPrompt.TitleInput.fields, ["sessionID"])).check(
SessionPrompt.titleModelPair,
)
export const PromptPayload = Schema.Struct(Struct.omit(SessionPrompt.PromptInput.fields, ["sessionID"]))
export const CommandPayload = Schema.Struct(Struct.omit(SessionPrompt.CommandInput.fields, ["sessionID"]))
export const ShellPayload = Schema.Struct(Struct.omit(SessionPrompt.ShellInput.fields, ["sessionID"]))
Expand Down
Loading
Loading