Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .agents/skills/sync-openapi-spec/references/sync-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ These tags back Agent Memory, which is a research preview. The tag was renamed `
### `harness-support`
The `/harness-support/*` endpoints form the worker-to-server contract used by Oz workers (transcripts, snapshots, finish-task signaling, etc.). They are not part of the public API contract — customers should not call them directly. Excluded permanently.

### `factory`
Oz Factory has not shipped publicly. Its `FactoryMcp` flag is dogfood and the `@warp/factory` front end is internal, so none of its endpoints belong in the public reference. Remove this tag when Factory goes GA.
### `factory` (no longer excluded)
The `factory` tag was excluded while Warp Factories was pre-launch. It came out of `EXCLUDED_TAGS` (and `/factory` out of `EXCLUDED_PATH_PREFIXES`) when Warp Factories shipped in Early Access and `/factories/factory-api/` began documenting `GET /factory`, `GET /factory/{uid}`, and `POST /factory/{uid}/runs`. Factory operations now follow the `x-internal` markers like every other kept tag: the server spec marks each private factory operation individually, so only the public discover-and-dispatch and scorer operations reach the reference. Do not re-add a blanket exclusion; ask the server team to mark specific operations `x-internal` instead.

## Excluded paths (within otherwise-public tags)

Expand All @@ -99,7 +99,7 @@ If any of these become stable public surfaces, remove them from `EXCLUDED_PATHS`

## Excluded path prefixes

`EXCLUDED_PATH_PREFIXES` drops a path by prefix regardless of how its operations are tagged. Today it holds a single entry, `/factory`, because some Factory operations are tagged `agent` upstream — `GET /factory/scorers/{scorer_id}/results` is one — so a tags-only rule leaks them into the public reference. Use a prefix only when a whole URL namespace is private; prefer a tag or an explicit path everywhere else.
`EXCLUDED_PATH_PREFIXES` drops a path by prefix regardless of how its operations are tagged or marked. It is empty today; `/factory` was its only entry while Warp Factories was pre-launch (see "`factory` (no longer excluded)" above). Use a prefix only when a whole URL namespace is private; prefer a tag or an explicit path everywhere else.

## `x-internal` operations are dropped

Expand Down
28 changes: 17 additions & 11 deletions .agents/skills/sync-openapi-spec/scripts/sync_openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,16 @@
# Tags whose paths and tag entry should be removed entirely.
# `memory_stores` / `memory` back Agent Memory, which is a research preview.
# `harness-support` is the worker-to-server contract — not a public API.
# `factory` is Oz Factory, which has not shipped publicly.
# These are belt-and-braces on top of the `x-internal` filter below: a tag can
# be private even when individual operations aren't marked internal yet.
#
# `factory` is deliberately NOT excluded. Warp Factories shipped in Early
# Access, /factories/factory-api/ documents the public endpoints, and the
# server spec marks every private factory operation `x-internal`
# individually — so the `x-internal` filter is the source of truth for
# which factory operations are public, same as the `agent` tag.
EXCLUDED_TAGS: frozenset[str] = frozenset(
{"memory_stores", "memory", "harness-support", "factory"}
{"memory_stores", "memory", "harness-support"}
)

# OpenAPI extension warp-server uses to mark an operation private. Mirrors
Expand Down Expand Up @@ -98,11 +103,12 @@
}
)

# Path prefixes that are private no matter how the operation is tagged. Tag
# checks alone are not enough here: some Factory operations are tagged `agent`
# upstream (for example `GET /factory/scorers/{scorer_id}/results`), so a
# tags-only rule would leak them into the public reference.
EXCLUDED_PATH_PREFIXES: tuple[str, ...] = ("/factory",)
# Path prefixes that are private no matter how the operation is tagged,
# regardless of `x-internal` markers. Empty today: `/factory` was listed here
# while Warp Factories was pre-launch, and came out when the factory API went
# public (see references/sync-policy.md). Use a prefix only when a whole URL
# namespace is private.
EXCLUDED_PATH_PREFIXES: tuple[str, ...] = ()

# Default checkout layout: docs/ and warp-server/ as siblings.
DEFAULT_SOURCE = Path("../warp-server/public_api/openapi.yaml")
Expand Down Expand Up @@ -470,11 +476,11 @@ def _summarize_drift(
def _unknown_classifications(source: dict[str, Any]) -> list[str]:
"""Flag tags or paths the policy doesn't already cover.

The skill's policy currently knows about the `agent` and `schedules`
tags (kept) and `memory_stores`/`harness-support` (dropped). Anything
else needs human triage.
The skill's policy currently knows about the `agent`, `schedules`, and
`factory` tags (kept) and `memory_stores`/`memory`/`harness-support`
(dropped). Anything else needs human triage.
"""
KNOWN_TAGS = {"agent", "schedules"} | set(EXCLUDED_TAGS)
KNOWN_TAGS = {"agent", "schedules", "factory"} | set(EXCLUDED_TAGS)

notes: list[str] = []
for tag in source.get("tags") or []:
Expand Down
Loading
Loading