Skip to content

Feat/gateway v1#37

Merged
xaviave merged 1 commit into
mainfrom
feat/gateway-v1
Jul 15, 2026
Merged

Feat/gateway v1#37
xaviave merged 1 commit into
mainfrom
feat/gateway-v1

Conversation

@xaviave

@xaviave xaviave commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@xaviave xaviave self-assigned this Jul 8, 2026
@xaviave
xaviave requested a review from GuillaumeSachet July 8, 2026 07:12
@xaviave
xaviave force-pushed the feat/gateway-v1 branch from 6010540 to d76de00 Compare July 8, 2026 07:13
  Introduces a central broker that fully isolates modules — they only
  talk to the Gateway + Redis, never to each other directly.

  RPCs:
  - StartStream: Module B requests execution of Module A (ACK + task_id)
  - ProduceStream: BiDi for Module A to emit output / receive input,
    persisted to Redis Streams
  - ConsumeStream: BiDi for Module B to read Module A's output and send
    data back through the Gateway
  - SendSignal: out-of-band control signals (cancel, pause) via Redis
    pub/sub

  Gateway injects ModuleStartInfo as the first entry of the Redis
  output stream.

refactor(gateway)!: simplify to single Stream RPC and add cache-invalidation signals
  Collapse ProduceStream and ConsumeStream into a single

  Stream(StreamRequest) -> stream StreamOutput between consumer and
  Gateway. Producers no longer connect back through the Gateway; outputs
  land in Redis and are replayed to consumers in seq order.

  - Drop ProduceStream / ConsumeStream RPCs and their message families
    (GatewayResponse, StreamStatus, StreamError, ServerHeartbeat).
  - Lifecycle rides as sentinels in StreamOutput.data (module_start_info
    first, end_of_stream last); StreamState enum removed.
  - Document stateless (from_seq=0) vs. stateful (from_seq=highest_seq)
    consumer resume contract, gap detection, and Redis retention bounds.
  - Errors surface only via gRPC status codes.
  - Extend SignalAction with server-wide INVALIDATE_ALL / _CHANNELS /
    _MODELS / _SETUP / _TOOLS / _SHARED; drop PAUSE; strip SIGNAL_ACTION_
    prefix. Renumber StartStream{Request,Response} fields; rename
    Module A/B to producer/consumer in docstrings.

  Other proto changes bundled here: remove deprecated module_registry/v1
  and task_manager/v1 packages (discovery/registration moved into
  registry/v1); minor touch-ups across cost, filesystem, module
  (information, monitoring, service), setup, storage, user_profile, and
  buf.lock.

  BREAKING CHANGE: removes ProduceStream/ConsumeStream RPCs and the
  GatewayResponse/StreamStatus/StreamError/ServerHeartbeat/StreamState
  messages; renames SIGNAL_ACTION_* enum values; renumbers StartStream
  request/response fields; deletes module_registry.v1 and task_manager.v1.

feat(gateway): rename the stream reponse/request

feat(gateway): add task_id to the streamoutput

feat(gateway): update amp to 1.0.0.dev2 - fix stream rpc

feat(proto): add user info and secret retrieval messages and RPCs

feat(user_profile): add CheckResourceAccess RPC

Add a CheckResourceAccess RPC to UserProfileService that returns whether
the calling task (resolved from the request metadata) is authorized to
access a given resource.

Access is reported as a boolean flag with an OK status rather than a
PERMISSION_DENIED error, keeping "denied" a normal answer and reserving
non-OK statuses for actual failures. Introduces the ResourceType enum and
the CheckResourceAccess request/response messages.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

feat(gateway): add AssociateTask RPC to mint sub-task_ids

Add GatewayService.AssociateTask, which generates and registers a new
sub-task_id linked to a running parent task (and its mission) before it
is dispatched via StartStream. Introduces AssociateTaskRequest
(parent_task_id) and AssociateTaskResponse (task_id, parent_task_id).

Also apply buf format normalization to filesystem, registry, and setup
protos (single-line field options, import ordering, 2-space indent).

feat(context): allow user and organisation scoping in filesystem and storage

Extend the context validation patterns to accept `users:` and
`organizations:` prefixes (in addition to missions/setups) for filesystem
file queries (FileFilter, GetFilesRequest) and storage ListRecordsRequest.
DeleteFilesRequest stays restricted to missions/setups.

@thibaud-perrin thibaud-perrin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@xaviave
xaviave merged commit 9beeb8e into main Jul 15, 2026
1 check passed
@xaviave
xaviave deleted the feat/gateway-v1 branch July 21, 2026 09:25
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