Skip to content

Ai spaces - #12

Merged
ikimpriv merged 5 commits into
mainfrom
ai-spaces
Nov 25, 2026
Merged

ikimpriv merged 5 commits into
mainfrom
ai-spaces

Conversation

@ikimpriv

Copy link
Copy Markdown
Owner

Change

Describe the problem and the resulting behavior.

Validation

List the checks run and any manual verification. Include screenshots for visible UI changes.

Compatibility

Note any changes to shortcuts, stored settings, metadata preservation, or supported filesystems.

Igor Kim added 5 commits November 20, 2026 22:20
An AI Space groups Envs; each Env is a role with its own agents and its
own view of a project, made of live references to host folders plus a
private folder. Agents run on a PTY inside a sandbox profile and reach
project files only through an Env-scoped MCP server.

- internal/aispaces: catalog, virtual filesystem with read/write and
  read-only references, hide-on-remove, portable @id references, MCP
  tools (vfs_*, workspace_pull/push, agent_peers/send/reply), per-Env
  call log, messaging with directional contact rules, automatic start
  of a stopped agent, native session resume.
- Operator MCP (--ai-mcp-operator) for an agent the user runs outside
  any Env: spaces_list, agent_status, agent_send, agent_wait.
- internal/ui: AI Spaces panel backend, agent consoles, context menu
  for agents, communication rules, message and MCP logs.
- docs/AI_SPACES_ARCHITECTURE_DRAFT.md: design draft with a table of
  what the proof of concept implements.
The agent sandbox allowed reading the login keychain but not writing to
it. Once the CLI's token expired it refreshed it, could not store the
result, and the agent was logged out ("can't save to the Keychain",
401). Writes to ~/Library/Keychains are now allowed; the rest of the
home folder stays closed.
Recorded sessions were priced by what the model is billed for: output,
new context, and the context re-read on every step. File reads, text
the model types twice, and the CLI's own tool definitions were the
largest parts; the tools and the launch now spend less of each.

- Reads: vfs_outline shows headings or declarations of a file or a
  folder, vfs_read takes a section, and a file the conversation already
  holds is answered with "unchanged" or with a diff. The CLI's hooks
  report a compacted or cleared conversation so the text is sent again.
- vfs_list is a tree that folds large folders to a count; vfs_search
  groups matches by file, cuts long lines and stops at a size budget.
- vfs_write creates missing folders.
- Messages are kept with their attachments: agent_send and agent_reply
  take attach (a file, a line range, a section, or a thread to
  forward), msg_read reads a part or a thread again, and a message
  lists the shared files its sender changed. The operator server gains
  message_read.
- Launch: the Env tools are loaded up front and the CLI is offered a
  narrow set of its own tools; model, effort and tools can be set per
  agent.

Efficiency is checked at three levels: priced scenarios taken from real
logs with ratios and budgets, a cap on tool definitions and
instructions, and a per-agent report built from CLI transcripts
(context menu, Efficiency report). A gated benchmark runs a real CLI on
fixed tasks.
Add predefined and custom roles, model and effort controls, bounded MCP workflows, immutable artifacts, and recorded browser and workspace checks. Improve agent usage accounting and document the test6 through test10 evaluations.

Validation: ./scripts/check.sh --race passed.
Delay console EOF and lifecycle completion until pending messages have been saved. This prevents store cleanup from racing the final catalog write, which caused intermittent failures in TestAnAgentDirectsAnother on macOS CI.

Add a blocked-write regression covering both completion signals and pending task recovery. Validation: regression passed 20 times with the race detector; scripts/check.sh --race and scripts/build.sh passed.
@ikimpriv
ikimpriv merged commit 6b0db73 into main Nov 25, 2026
1 check passed
@ikimpriv
ikimpriv deleted the ai-spaces branch November 25, 2026 03:05
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.

1 participant