omp packages

@mrclrchtr/supi-consulting19.0.0

Bounded consultations with external agents for the Pi coding agent, with explicit workspace selection and observed evidence

GitHub Actions Published 18 hours ago MIT ~2.7K downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@mrclrchtr/supi-consulting

@mrclrchtr/supi-consulting adds the beta consulting_run tool to Pi. It runs bounded Consultations with explicit agent, model, and workspace selection and reports observed evidence. Antigravity is the only supported Consulting Agent.

Install

pi install npm:@mrclrchtr/supi-consulting

The package is not part of the recommended or full SuPi installer. Run /reload after installation.

Switch from supi-antigravity

This is a clean break. Remove the old package before you install the new one:

pi remove npm:@mrclrchtr/supi-antigravity
pi install npm:@mrclrchtr/supi-consulting

Use the same personal or project scope as the original install. Update local extension paths to packages/supi-consulting/src/extension.ts, then reload Pi.

  • antigravity_run has no alias. Use consulting_run and supply new.agent.
  • The setting is now consulting.agentToolEnabled. The old antigravity section is ignored, including an old disabled value. The new setting defaults to true; set it to false before reload if you want to skip discovery. While an antigravity section remains in the global or project configuration, Pi shows one warning per session start or reload. It names both keys and the effective value. SuPi does not rewrite the configuration.
  • Old Conversation Handles and tool results are not restored as consulting state. Start a new Consultation.
  • The isolated home has moved to a new namespace. Sign in again. The package does not read, move, copy, or delete the old <Pi agent dir>/supi/antigravity/ data.

First sign-in

The Antigravity adapter never uses the normal Antigravity profile. It creates these stable, agent-specific directories:

<Pi agent dir>/supi/consulting/antigravity/home/
<Pi agent dir>/supi/consulting/antigravity/consultation-workspace/

After Pi starts, the package checks availability without making startup wait. The footer shows a spinning icon during the check. The tool appears only after discovery succeeds. The ready footer uses the terminal-safe ✦ icon; the SuPi footer shows it before the model name.

When sign-in is needed, Pi shows a command with the resolved paths:

cd "<consultation-workspace>" &&
HOME="<isolated-home>" AGY_CLI_DISABLE_AUTO_UPDATE=true agy

On macOS, the adapter creates and unlocks a private keychain inside the Isolated Antigravity Home. It exposes that keychain as the login keychain without prompting for the normal keychain password. Run the displayed command, sign in, exit Antigravity, and reload Pi. The installed agy version must be at least 1.4.9.

If macOS displays antigravity. in a warning, the final . is sentence punctuation, not part of a keychain name.

consulting_run

A new Consultation requires the agent, an available model, and Workspace Access:

{
  "prompt": "Explain this API design.",
  "new": {
    "agent": "antigravity",
    "workspace": false,
    "model": "gemini-4-hydrogen-low"
  }
}

The Model Catalogue is the intersection of the curated Antigravity models and the models available to the signed-in account. It stays fixed until the next session start or reload. There is no default model or automatic agent fallback. The model parameter tells the calling agent what each available model is for: the gemini-4-hydrogen entries are one model at rising reasoning levels (low, medium, high, xhigh), and higher levels are slower and cost more.

Set workspace to true only when the Consultation needs repository evidence. This exposes the current Pi workspace. Set it to false to use the empty Consultation Workspace. Explicitly configured additional directories remain accessible with either selection.

The agent can run commands and change files in every exposed directory. It is instructed to change files or run state-changing commands only when the request explicitly asks for it, but SuPi does not enforce that. See Security limits.

A follow-up supplies only a returned Conversation Handle:

{
  "prompt": "Now compare the alternatives.",
  "continue": { "handle": "consult_..." }
}

Supply exactly one of new and continue. Follow-ups retain the original agent, model, working directory, and Workspace Access. A handle is opaque and branch-aware. It is retired if a follow-up fails or is canceled after process work starts, or if its continuation state is incompatible. Overlapping follow-ups on the same handle are rejected.

Results report web use, workspace use, observed and claimed references, warnings, token use, and the Conversation Handle. An answer can claim a reference without matching tool activity; SuPi labels that reference as claimed, not observed.

Agent tools and existing handles

New Antigravity conversations use a package-owned temporary agent definition with Antigravity's native tools: file reading (read_file), file changes (edit_file, write_file), commands (run_command, with manage_task for its background tasks), web search (search_web), and structured completion (finish). The default Antigravity agent's tool selection is not used.

The gemini-4-hydrogen models have no directory-listing, file-search, or URL-reading tool. read_file reads only files, and search_web returns search results, not page content. The agent lists and searches directories and fetches pages with run_command. Antigravity adds manage_task whenever run_command or read_file is selected.

The definition lives in the Isolated Antigravity Home under a random name to avoid workspace-agent name collisions. SuPi removes it after the process, including ordinary failures, timeouts, and cancellation. A hard process crash can leave a temporary definition behind. Follow-ups resume the saved conversation without a new agent override; Antigravity retains the original definition even after its file is removed.

Start a new Consultation after upgrading. Old Conversation Handles cannot acquire the current tools by resuming. SuPi rejects legacy or incompatible profile continuations before starting any Antigravity process, retires the handle, and asks for a new Consultation. Profile compatibility is tracked privately; the calling tool's input shape is unchanged.

Follow-up prompts get one fixed line asking the agent to end with finish using the current schema. Without it, a follow-up such as "do not use any tools" can skip finish, and Antigravity then replays the previous turn's answer, which SuPi rejects as unbound.

Antigravity caches fetched pages inside its own conversation state and may read them back with read_file. File activity whose path resolves outside the selected workspace and configured additional directories is treated as agent-internal: it does not count as workspace use or workspace evidence. File calls without a classifiable path remain counted.

Web activity alone does not prove a cited page was read. For research, the agent is instructed to search for sources and read relevant pages before citing them. SuPi still classifies references from observed activity, not from the agent's claims. A source becomes observed when a URL-reading tool received its URL, or when a successful curl or wget command (exit code 0) requested it; the gemini-4-hydrogen models fetch pages this way. The URL fragment (#…) is ignored when matching. Such fetch commands also count as web use. URLs in other commands, such as echo or grep, and search_web queries are not page reads. Only files opened with a file tool become observed workspace evidence, not files searched with run_command. The CLI's startup tool inventory is not treated as proof that a tool is active for the selected agent.

Use /supi-settings → Consulting to disable the tool. Disabling it skips availability checks and removes consulting_run from the active tool list.

Additional directories

Use /supi-settings → Consulting → Additional directories to enter comma-separated absolute directory paths. The agent can read and change these directories like the selected workspace. The default is an empty list. No shell expansion or glob matching is performed. For paths containing commas, edit the JSON configuration instead.

Global configuration lives at ~/.pi/agent/supi/config.json; project configuration lives at .pi/supi/config.json:

{
  "consulting": {
    "additionalDirectories": ["/tmp/octalog-filter-previews"]
  }
}
  • The former consulting.additionalReadOnlyDirectories key is ignored, because it granted only reads. While it remains in the global or project configuration, Pi shows one warning per session start or reload. To keep a directory, add it to additionalDirectories and remove the old key. SuPi does not rewrite the configuration.
  • Project values replace the global list, rather than extending it. An explicit [] removes inherited grants; Inherit/Reset deletes the scoped key. Untrusted project configuration cannot grant access; global grants still apply.
  • Directories must exist and be accessible when a Consultation starts. Symlinks are resolved and duplicate roots are removed, so /tmp resolves to /private/tmp on macOS without needing both entries.
  • Settings are read from the current Pi workspace before each new Consultation and follow-up. Changes apply to the next invocation without reloading. They do not modify an already-running process.
  • The directories are registered with Antigravity per process using --add-dir, not persisted as permission grants in the shared profile. The agent can read and change files in them like in the selected workspace; allowNonWorkspaceAccess stays false.
  • Configured directories are available even with workspace: false. Prefer task-specific artifact folders over all of /tmp, which may contain unrelated sensitive files.
  • File calls in extra directories count as workspace activity, but not as workspace use, and references outside the selected workspace are not reported as validated workspace-relative evidence. They therefore do not trigger the warning that workspace use produced no observed workspace path. When the agent lists a file in an additional directory as workspace evidence anyway, SuPi omits it without a warning.

Directory registration and permission rules follow Antigravity's CLI reference and permissions reference. These are Antigravity policy restrictions, not a new operating-system security boundary.

Failure diagnostics

Execution failures report a fixed reason when the adapter can identify it:

  • Missing final result, missing structured answer, answer schema mismatch, or an answer not bound to the current request.
  • approval-required: Antigravity ended the run without an answer because an action needed approval, which non-interactive Consultations cannot give. Antigravity reports this only on stderr; the failure keeps the usual denial diagnostics.
  • Unsuccessful final result or data received after the final result.
  • Malformed JSON, a non-object event, or an output limit exceeded.
  • Missing conversation identifier, process failure, timeout, or cancellation.

Each invocation adds a unique response token to its private answer schema and validates the returned token locally before accepting the answer. The token is removed from public results and excluded from failure diagnostics. This prevents a resumed Antigravity conversation's previous structured answer from being accepted as the current result. Missing or mismatched tokens fail with unbound-answer; plain-text answers are not substituted for the structured contract. A started follow-up that fails retires its Conversation Handle; start a new Consultation.

An observed tool permission denial is reported separately. It does not prove the cause of a later failure. A denial does not fail a Consultation that returns a valid answer. Workspace Access alone does not grant file-tool access outside the selected workspace; configure additional directories explicitly.

Failure messages returned to the calling agent include the observed terminal status and denial counts by fixed operation category (command, file-read, file-write, web-read, browser, mcp, or other). They distinguish a successful agent terminal status from a usable final answer and recommend permitted tools or a limited/blocked report rather than repeating denied actions unchanged. This feedback remains available when Debug is disabled.

When SuPi Debug is enabled, failed executions emit one consulting/consultation.failed event at error level. Cancellations emit consulting/consultation.cancelled at info level. Rejected incompatible Conversation Handles emit consulting/consultation.rejected at info level; no process was started for them. Use the debug tool:

{ "source": "consulting", "level": "error", "limit": 10 }

Omit level to include cancellations and rejected handles. Add sessionFile to inspect events persisted in a saved Pi session. A response aborted before the adapter starts has no Consulting event.

Events contain the execution phase, timing, selected model, workspace-access and follow-up flags, failure category and reason, and available event counts, terminal-state flags, permission-denial count, and exit code. permissionDenialsByOperation breaks down deduplicated denials by fixed category; unknown tool names become other. deniedFileAccessOutsideApprovedRoots counts denied file operations whose requested paths resolve outside the selected directory and configured additional directories, following symlinks and existing parents of missing targets. Unavailable path information, dangling symlink destinations, and paths containing parent traversal (..) remain unclassified rather than risking an incorrect outside-root claim. This location observation does not identify which rule caused a denial.

Antigravity's terminal denied_actions summary can establish a denial even when its detailed tool-error update is absent. It establishes a minimum of one observation per operation category, not additional calls on top of already-correlated denials. Summary entries have no tool-call IDs or file parameters, so the adapter does not attribute them to nearby or unfinished file requests.

Failures also include bounded requested file-target metadata in both Debug and caller-visible feedback:

  • deniedResources lists at most eight distinct { operation, requestedPath } references for known file operations observed as denied. Targets come from structured parameters on the denied event or earlier updates correlated by tool-call ID, never from error text, command parsing, nearby calls, or transcripts.
  • requestedPath preserves the supplied path, including significant whitespace. It is not a canonical filesystem path or the permission checker's resolved target, and does not identify a permanent path blacklist or the denying rule. Paths are limited to 1,024 UTF-16 characters; longer paths are unavailable rather than silently shortened.
  • deniedResourcesOmitted counts file-denial observations whose known targets were omitted because the list was full, not unique omitted paths. Repeated denials for listed targets do not duplicate entries.
  • deniedResourcePathsUnavailable counts known file-denial observations without an available, bounded structured target. Missing correlation or parameters remain unknown; the adapter does not infer a path from prose. Explicit replacement targets supersede earlier metadata, including when the replacement is invalid or overlong; only omitted path parameters preserve an earlier target.
  • unfinishedResources separately lists at most eight distinct requested targets from ID-correlated file calls with no observed terminal outcome. These are unknown outcomes, not confirmed denials, even if a terminal summary reports the same operation category. Successful and already-denied calls are excluded. unfinishedResourcesOmitted counts capacity-omitted observations; unfinishedResourcePathsUnavailable counts observations lacking a usable target. The same path limits, replacement semantics, and deduplication rules apply as for denied resources.
  • Caller-visible references are JSON-quoted, with terminal control characters and line separators escaped. Denied and unfinished requested paths can contain sensitive metadata and are exposed to the calling agent and persisted with enabled Debug events.

Events otherwise exclude prompts, answers, arbitrary tool names, raw stdout, stderr, complete tool payloads, and error causes, even when raw Debug access is enabled. The event's cwd identifies the selected working directory. Successful Consultations do not gain a failure event merely because an action was denied.

Security limits

The Antigravity adapter writes its Consultation Permission Set to the Isolated Antigravity Home. It allows URL reads (read_url(*)) and commands (command(*)) and denies nothing. Antigravity runs non-interactively, so it does not ask before an action; an action that would need approval is denied and ends the run without an answer.

  • Commands and file tools can change the selected workspace and every additional directory. run_command runs in Antigravity's terminal sandbox (--sandbox). On macOS, that sandbox blocked command writes outside the selected directories and the temporary directory, but it is Antigravity's mechanism, not a SuPi guarantee. SuPi deliberately does not allow write_file(*): that rule also opens the terminal sandbox to the whole file system.
  • Outside the selected directories, Antigravity's own approval policy still lets file tools create new files without asking, for example in your home directory. Changing existing files there needs approval, so it is denied and the Consultation fails with approval-required.
  • Commands can read files outside the selected directories, such as other repositories, unless the sandbox blocks them, and they have network access. Instructions in fetched pages or workspace files can therefore steer the agent into changes or data exfiltration (prompt injection).
  • Without Workspace Access, the agent works in the empty Consultation Workspace, but configured additional directories remain writable.

Expose the workspace only to Consultations you would trust with it, and commit or stash work you want to keep first.

For Consultations with Workspace Access or additional directories, project-local hooks can run commands, read the Antigravity transcript, and cause side effects outside these permission rules. The adapter probes hook state with the additional roots before the paid process and warns when hooks are active or unknown. Directory grants are intended for trusted directories, not untrusted project customizations.

URL reads and commands can reach local, private-network, and link-local endpoints. SuPi does not enforce public-internet-only access.

These limits describe the Antigravity integration. The private adapter interface does not promise that future agents have the same permissions or isolation. There is no supi-agent-runtime integration in this package.

Development and live probe

The live probe requires separate approval and sign-in. It never runs in normal tests or CI:

SUPI_CONSULTING_LIVE=1 pnpm exec jiti packages/supi-consulting/scripts/live-probe.ts

It uses the isolated profile and requires a successful web search, a page fetched with curl as an observed source, and a schema-validated follow-up that retains context and web search after the temporary definition has been removed. It also checks that the agent finds unnamed fixture files, observed workspace evidence, and byte-identical fixture state after a request not to change files. The web checks use the private process interface; workspace checks use the Consulting Agent adapter. No paid capability checks run during normal discovery.