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

# Session 14: Channels And Scope

**Session ID**: `phase19-session14-channels-and-scope` **Packages**: packages/protocol, apps/server, apps/web, apps/adapters **Status**: Complete **Completed**: 2026-06-27 **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Add external command intake and cross-project/session scoping to the Orchestration command flow.

***

## Scope

### In Scope (MVP)

* Channel health, pairing, provider config, validation status, source attribution, generic webhooks, GitHub webhooks, replay guards, and inbound command proposals
* Conversion of Telegram, Discord, GitHub, and generic webhook events into queue entries, attention items, or guarded actions through existing permission and execution machinery
* Scope labels and filters for current project, all projects, active room, imported sessions, remote context, project/worktree/source, and session roster state
* Path-safe project labels without absolute path leakage
* Tests for webhook validation, replay protection, source attribution, command conversion, and filtering

### Out of Scope

* Trusted automatic execution from external channels by default
* Hosted identity or production collaboration claims

***

## Prerequisites

* [x] Sessions 04 through 06 and 13 complete
* [x] Existing outbound adapter and webhook boundary docs inspected

***

## Deliverables

1. Channel command manager and intake routes
2. Command intake UI and source attribution
3. Scope controls across queue, graph, attention, and guarded actions
4. Tests for intake validation, replay guards, and scope filtering

***

## Source Coverage And Evidence

Source coverage:

* Session Split Plan Session 14: Channels And Scope
* Implementation Targets 24 and 25 for cross-project/session scope and channel or webhook command intake
* Balls-To-The-Wall Track B `channelCommandManager` routes
* Execution Family Order item 9 for channel/webhook intake after core execution machinery exists

Key EXAMPLES links:

* [Project filter guide](https://github.com/AI-with-Apex-VIP/factionos/tree/main/.spec_system/EXAMPLES/1st-pass-artifacts/skills/factionos-guide/SKILL.md#L337-L345)
* [Session routes](https://github.com/AI-with-Apex-VIP/factionos/tree/main/.spec_system/EXAMPLES/findings/api-routes.txt#L19-L24)
* [Session roster event](https://github.com/AI-with-Apex-VIP/factionos/tree/main/.spec_system/EXAMPLES/findings/websocket-events.txt#L134-L134)
* [Channel routes](https://github.com/AI-with-Apex-VIP/factionos/tree/main/.spec_system/EXAMPLES/findings/api-routes.txt#L35-L39)
* [Webhook routes](https://github.com/AI-with-Apex-VIP/factionos/tree/main/.spec_system/EXAMPLES/findings/api-routes.txt#L208-L209)
* [Telegram and Discord adapter notes](https://github.com/AI-with-Apex-VIP/factionos/tree/main/.spec_system/EXAMPLES/findings/external-services.md#L50-L66)

***

## Success Criteria

* [x] Inbound channel or webhook events can become visible proposals with source and validation state
* [x] Scope filters consistently affect queue, lineage, attention, and guarded actions
* [x] External payloads create proposals first unless explicitly trusted
* [x] Project labels avoid absolute path leakage


---

# 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://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/phases/phase_19/session_14_channels_and_scope.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.
