Skip to content

Document platform architecture - #12

Merged
serge-ivo merged 1 commit into
mainfrom
agent/architecture-docs
Jul 11, 2026
Merged

Document platform architecture#12
serge-ivo merged 1 commit into
mainfrom
agent/architecture-docs

Conversation

@serge-ivo

Copy link
Copy Markdown
Contributor

Summary

  • add a current-state architecture map for the ProAgentStore platform
  • document runtime planes, data ownership, MCP/API/console boundaries, connectors, observability, risks, and refactor roadmap
  • link the architecture document from the README

Verification

  • git diff --check
  • ASCII check for docs/architecture.md

@serge-ivo
serge-ivo merged commit 79703e1 into main Jul 11, 2026
1 check passed
@serge-ivo
serge-ivo deleted the agent/architecture-docs branch July 11, 2026 10:15
serge-ivo pushed a commit that referenced this pull request Aug 8, 2026
… to a button (#407)

`ensureActiveSession` already reused a live session, re-attached one whose engine
process had gone, opened a fresh one, and reported why when it could not. It had
exactly one caller: the Loop driver. The chat tools called
`getActiveSessionForRepo` and gave up.

So the same agent, in the same conversation, about the same repo:

  "go fix issue #12"        → start_work → a `claude --dangerously-skip-
                              permissions` child process appears on your laptop
  "what's the terminal at?" → read_terminal → "No active session for X."

The path with the LARGER consequence was the one that self-served, and the
harmless half — reading a pane — was the one that needed a human in the console.

`read_terminal` and `send_to_cli` now go through a new `ensureSessionForChat`,
which wraps the same `ensureActiveSession` the Loop uses and adds the two things
a chat surface needs that a Loop does not:

* CONNECTIVITY FIRST, from `runtimeConnectivity` + `classifySubordinateConnectivity`
  — the same resolver delegation uses. Not politeness: `ensureActiveSession`
  INSERTS a `coding_sessions` row before it discovers there is no runner to
  launch on, then ends it. A 409'ing Loop can absorb that; a read tool a user
  calls repeatedly on a train would write and end a row every time, and the
  refusal has to blame the runner, which is what `noSessionMessage` says. Runner
  offline now means the runner diagnosis and NO row.
* THE NOTICE. A process just appeared on somebody's machine and they did not ask
  for one, so the tool result names the session it started and instructs the
  model to say so. That string is the only lever available here — the prompt
  builder is a different file.

The six-hour idle reap (#275) is untouched, and pinned by a test that asserts the
exact constant: "chat can reopen it, so reap sooner" is the plausible wrong
inference, and reaping early destroys a CLI context that cannot be recovered.
What the reap gained is a reader. Its only durable trace was a `coding_timeline`
sentence rendered in the Co-pilot view — the one place a chat user never looks —
so from chat a session simply stopped existing and the next question failed for a
reason nothing had stated. `lastIdleReapForRepo` reads that sentence back (marker
and writer now share a constant, and a test fails if either drifts) and the
opened-session notice explains it. No migration: the fact was already durable, it
was just unreadable from the other side.

Rejected: keeping it manual because spawning a process deserves an explicit act.
That argument was already lost to `start_work` in the same chat; the split only
made the safe half harder than the consequential one.

read_terminal's offline degradation survives — `ensureActiveSession` now returns
the session it FAILED to re-attach, so the last saved snapshot is still offered,
labelled with the real diagnosis rather than presented as live.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants