Skip to content

docs(den-api): describe remaining summary-only operations (dashboards, policies, SSO, analytics, credentials, tool policy) - #4702

Merged
yomgui merged 9 commits into
devfrom
api/descriptions-remaining
Sep 10, 2026
Merged

yomgui merged 9 commits into
devfrom
api/descriptions-remaining

Conversation

@yomgui

@yomgui yomgui commented Sep 9, 2026

Copy link
Copy Markdown
Member

What changed

Adds description to the 24 summary-only operations that are not tagged Workflows / Codemode Runs / Apps (a sibling PR owns those). Each description was written after reading the handler and states behaviour the summary does not make obvious: who may call it, side effects, replace-vs-partial semantics, and non-obvious error codes.

Tag Operations File
Dashboards 8 (list, create, get, patch, delete, list grants, revoke grant, GET /v1/me/dashboards) routes/org/dashboards.ts
Desktop Policies 4 (list, create, patch, delete) routes/org/desktop-policies.ts
SSO 3 (/enable, /disable, /test/{intentId}/cancel) routes/org/sso.ts
LLM Providers 2 (DELETE …/my-credential, POST …/member-credentials/{id}/block) routes/org/llm-providers.ts
Capability Sources / Authentication 3 (tool-policy GET/PUT, DELETE /v1/mcp-connections/{connectionId}) routes/org/mcp-connections.ts
Inference 4 (analytics settings GET/PATCH, activity, consumption) routes/org/models-analytics.ts

Follows the "Add a description when the summary does not make the behaviour obvious" convention in docs/api-style.md.

Warnings before -> after (pnpm api:lint)

Rule Before After
operation-description 42 18
array-items 2 2
oas3-unused-component 25 25
ow-200-has-content 6 6
ow-list-pagination 26 26
ow-timestamps-date-time 155 155
Total (baseline) 256 232

0 errors before and after. .spectral-baseline.json ratcheted down to 232. The remaining 18 operation-description findings are exactly Workflows (11), Apps (5) and Codemode Runs (2), owned by the sibling PR.

Metadata-only proof

git diff --stat origin/feat/api-quality-spectral..HEAD lists only:

  • 6 route files under ee/apps/den-api/src/routes/org/ — every added line is a description: inside describeRoute() (verified with a diff filter: no other +/- lines)
  • packages/docs/openapi.json (regenerated snapshot)
  • packages/sdk/src/gen/sdk.gen.ts (regenerated JSDoc only; pnpm sdk:check passes)
  • .spectral-baseline.json

No handlers, validators, guards, or request/response schemas were touched.

MCP catalog note: Desktop Policies, LLM Providers and Capability Sources are in SAFE_INCLUDED_TAGS (src/mcp/policy.ts), so search_capabilities tool text changes for 9 operations (4 desktop-policy CRUD, 2 LLM provider credential ops, 2 tool-policy ops — the Authentication-tagged DELETE is excluded). The tool set does not change. Inference, Dashboards and SSO are not in the safe list.

Verification

pnpm exec tsc -p ee/apps/den-api/tsconfig.json --noEmit --pretty false   # clean
pnpm api:snapshot                                                         # regenerated
pnpm api:lint                                                             # 0 errors, 232 warnings
pnpm api:lint --update-baseline                                           # 256 -> 232
pnpm sdk:generate && pnpm sdk:check                                       # "Generated SDK matches the Den route schemas."
pnpm --filter @openwork-ee/den-api test                                   # 24 pass, 0 fail

Docs-only change (OpenAPI metadata); no runtime proof needed beyond the contract gate above.

Merge note

Like every follow-up in this series, this PR regenerates openapi.json, .spectral-baseline.json and the SDK, so it will conflict with sibling PRs at merge time. Resolution is mechanical: merge the base, then re-run pnpm api:snapshot && pnpm api:lint --update-baseline && pnpm sdk:generate && pnpm sdk:check.

Noticed but not touched (out of scope)

  • DELETE /v1/desktop-policies/{id} and PATCH /v1/desktop-policies/{id} can answer 400 default_policy_required; the DELETE does not document any 400.
  • POST /v1/sso/enable documents only 204 and 409, but the handler also produces 401/403/404 (via ensureSsoManager) and a plan-entitlement failure (checkEntitlement(..., "sso")).
  • PATCH /v1/inference/analytics/settings, GET …/activity, GET …/consumption document only 200; handlers also answer 401/403 (models_analytics_unavailable) and, for consumption, 400 narrow_date_range. GET …/settings documents no 4xx at all (it is guarded by orgMemberRoute).
  • DELETE /v1/mcp-connections/{connectionId} documents 200 with emptyResponse but returns { ok: true } — one of the ow-200-has-content findings.
  • DELETE /v1/mcp-connections/{connectionId} is tagged Authentication while its sibling tool-policy routes are Capability Sources; the file comment explains the intent (keep mutations off the agent surface), so probably fine, just noting.
  • desktopPolicyListResponseSchema / desktopPolicyResponseSchema are z.object({}).passthrough() — the response shape is undocumented in the spec.

@vercel

vercel Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 7:56pm UTC
openwork-den Ready Ready Preview Sep 10, 2026 7:56pm UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 7:56pm UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 7:56pm UTC

@yomgui
yomgui changed the base branch from feat/api-quality-spectral to dev September 10, 2026 19:55
@yomgui
yomgui force-pushed the api/descriptions-remaining branch from 11242a7 to 31720cf Compare September 10, 2026 19:55
@mintlify

mintlify Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
differentai 🟢 Ready View Preview Sep 10, 2026, 7:56 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@github-actions

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (35509 ms), confidentiality-review (60938 ms), desktop-den-sync-review (55970 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@diff-warden diff-warden Bot 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.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (31720cf347c996fb4b2c162618dcf610e7cd5bb9). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@github-actions

Copy link
Copy Markdown
Contributor

Passed · 12/12 tests · 18/18 assertions · 8 images

Commit 31720cf347c996fb4b2c162618dcf610e7cd5bb9 · selected evidence

Open review report

@yomgui
yomgui merged commit e4e316d into dev Sep 10, 2026
38 checks passed

This branch was successfully deployed

5 active deployments
Preview – openwork-den — 31720cf3 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-landing — 31720cf3 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-app — 31720cf3 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — 31720cf3 Deployed Sep 10, 2026 by vercel[bot]
staging - packages/docs — 31720cf3 Deployed Sep 10, 2026 by mintlify[bot]
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.

1 participant