> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_40/session_07_connection_probe_parity.md).

# Session 07: Connection Probe Parity

**Session ID**: `phase40-session07-connection-probe-parity` **Status**: Not Started **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Port useful upstream Hermes connection probing with safe, bounded, no-output process execution.

***

## Scope

### In Scope (MVP)

* Compare current AI OS connection scanning with upstream provider/auth/env scan behavior, gateway token checks, generic secret-service detection, TTY-unsafe `hermes mcp list` skip, and CLI-backed service probes.
* Port CLI probes for GitHub, Google Workspace, Linear, and Spotify with bounded, no-output, non-shell execution and allowlisted argv arrays.
* Prefer env parsing for token-only checks such as Notion and Airtable.
* Add a short 30 second cache for probe status only without caching secret values.
* Document the intentional skip for TTY-unsafe MCP probing until Hermes exposes a safe non-interactive command.

### Out of Scope

* Running broad shell snippets.
* Exposing command output or env values in connection responses.
* Adding MCP probing that can hang without a TTY.

***

## Prerequisites

* [ ] Session 01 decisions and invariants are recorded.
* [ ] Session 02 readiness helpers are available or their final shape is known.

***

## Deliverables

1. Safe connection probe parity for useful upstream service checks.
2. Status-only short cache for probe results.
3. Tests for connected/missing probes, timeout behavior, cache behavior, and no env/path/account leakage.

***

## Success Criteria

* [ ] Connection summaries include chosen CLI-backed service coverage.
* [ ] TTY-unsafe MCP probing is explicitly skipped with rationale.
* [ ] No public connection response exposes command output, env values, private paths, emails, account IDs, or tokens.

***

## Folded Source Session Split

The section below preserves the original Phase 40 session split detail for this session, including dependencies, decisions, outputs, and acceptance checks.

### Session 07: Connection Probe Parity

**Objective**: Port useful upstream Hermes connection probing with safe, bounded, no-output process execution.

**Scope**:

* Compare current AI OS connection scanning with upstream provider/auth/env scan behavior, gateway token checks, generic secret-service detection, TTY-unsafe `hermes mcp list` skip, and CLI-backed service probes.
* Port CLI probes for GitHub, Google Workspace, Linear, and Spotify with bounded, no-output, non-shell execution and allowlisted argv arrays.
* Prefer env parsing for token-only checks such as Notion and Airtable.
* Add a short 30 second cache for probe status only, without caching secret values.
* Keep `hermes mcp list` intentionally skipped until Hermes provides a non-TTY-safe command.

**Outputs**:

* Safe connection probe parity for the useful upstream service checks.
* A documented intentional skip for TTY-unsafe MCP probing.
* Tests for connected/missing probes, timeout behavior, cache behavior, and no env/path/account leakage.

**Dependencies / Notes**:

* Depends on Session 01 and should reuse Session 02 readiness helpers where possible.
* Decision: local-only laptop deployment makes no-output CLI probes valuable enough to port, provided they remain allowlisted, non-shell, timeout-bounded, and never expose command output.

**Acceptance Checks**:

* Connection summaries include the chosen CLI-backed service coverage and state why MCP probing is intentionally skipped.
* No public connection response exposes command output, env values, private paths, emails, account IDs, or tokens.
* TTY-unsafe MCP probing remains skipped unless Hermes provides a safe command.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_40/session_07_connection_probe_parity.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
