Skip to content

Commit 1bce9ed

Browse files
committed
docs(skills/automation): teach clientSource 'installer' in the OAuth recipe
Recipe 6 now shows the installer-supplied client beside the declared client, with when to use which: the administrator registers a client against the redirectUri the status read answers, connects with { clientId, clientSecret }, and the connection reads client: { source: 'installer', clientId, hasSecret }. Facts from content/docs/automation/connectors.mdx and the merged connector-auth schema. Two restatements are deleted first; the file's token ceiling moves by the measured remainder (2488 -> 2598) under the standing raise path recorded in the row comment. Claude-Session: https://claude.ai/code/session_01J8VVAnmBmMPE4eUyJhJRfx Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4e0c5d3 commit 1bce9ed

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

‎scripts/check-skills-token-ratchet.mjs‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,25 @@ export const CEILINGS = new Map([
957957
// and untranslated: 「A:先削重复,余额按实测提高」 — the standing path of
958958
// ruling record 6513306068 on #27847.
959959
// ceil($(wc -c < skills/objectstack-automation/references/integration-recipes.md) / 4) == ceil(9949 / 4)
960-
['skills/objectstack-automation/references/integration-recipes.md', 2488],
960+
// 9926 -> 10391 (card #29255; the file had shrunk 23 bytes under the row
961+
// since, headroom 6 tokens): recipe 6 teaches `clientSource: 'installer'`
962+
// beside the declared client — when to use which, the administrator's
963+
// `{ clientId, clientSecret }` connect body against the status read's
964+
// `redirectUri`, and the connection's `client: { source, clientId,
965+
// hasSecret }` read — from content/docs/automation/connectors.mdx and the
966+
// merged connector-auth schema. Paid down first, two restatements each with
967+
// a surviving home: the authorization_code comment's "A user grants access
968+
// once" (the paragraph under the block says an administrator connects it,
969+
// once per organization), and "`client_credentials` and `app-credential`
970+
// dispatch once the ref is set." (the file's opening paragraph says an unset
971+
// ref leaves its instance degraded until set). Arithmetic: 9926 -> 10391
972+
// (+465 net: -100 cut, +565 added) -> ceil(10391 / 4) = 2598; the ceiling
973+
// moves +110, pinned AT the measurement. Maintainer ruling 2026-10-27 on the
974+
// seat's decision card 「skills 修复卡的教学和 eval 都撞 token 天花板,怎么付?」,
975+
// tap A verbatim and untranslated: 「A:先削重复,余额按实测提高」 — the
976+
// standing path of ruling record 6513306068 on #27847.
977+
// ceil($(wc -c < skills/objectstack-automation/references/integration-recipes.md) / 4) == ceil(10391 / 4)
978+
['skills/objectstack-automation/references/integration-recipes.md', 2598],
961979
// 5569 -> 5587 (card #26298, audit #26184 row A2): the approval config table
962980
// gains `excludeSubmitter` (refused beside `onEmptyApprovers: 'auto_approve'`),
963981
// +105 tokens. Paid down first: Best Practices 1 and 4 restated the Branching

‎skills/objectstack-automation/references/integration-recipes.md‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,20 +159,25 @@ Recipe 1's shape with a grant-bearing `auth`, served on `rest`, `openapi` and
159159
token is fetched per dispatch; no metadata key holds it.
160160

161161
```ts
162-
// A user grants access once (PKCE always on); the ref is the client secret, omitted for a public client.
162+
// PKCE always on; the ref is the client secret, omitted for a public client.
163163
auth: { type: 'oauth2', grant: 'authorization_code', authorizationUrl: 'https://account.docusign.com/oauth/auth',
164164
tokenUrl: 'https://account.docusign.com/oauth/token', scopes: ['signature'],
165165
clientId: 'objectstack-prod', credentialRef: 'DOCUSIGN_CLIENT_SECRET' }
166+
// Or each deployment's own client: clientSource: 'installer' in place of clientId + credentialRef.
166167
// Server to server: grant: 'client_credentials' with tokenUrl, clientId, credentialRef (`resource` optional).
167168
// Vendor app id + app secret (`vendor`: `feishu` / `dingtalk` / `wecom`):
168169
auth: { type: 'app-credential', vendor: 'feishu', appId: 'cli_a1b2', credentialRef: 'FEISHU_APP_SECRET' }
169170
```
170171

171-
`client_credentials` and `app-credential` dispatch once the ref is set.
172172
`authorization_code` is degraded "not connected" until an administrator holding
173173
`manage_connector_connections` connects it, once per organization, from a
174174
signed-in session (an agent or API key is refused):
175175
`POST /api/v1/automation/connectors/:name/connection` answers `{ authorizationUrl }`;
176176
the vendor redirects to `GET …/connectors/oauth/callback`. An `authorization_code`
177177
instance on `mcp` may omit the `https://` endpoints and `clientId`, discovered at connect.
178+
Name `clientId` for an app its publisher deploys; `clientSource: 'installer'` for one installed
179+
on deployments the publisher never sees: the administrator registers a client with the vendor
180+
against the `redirectUri` a `GET` on that path answers, then connects with `{ clientId, clientSecret }`
181+
(no secret for a public client; a reconnect naming none keeps it). The connection keeps it
182+
encrypted; a read shows `client: { source: 'installer', clientId, hasSecret }`.
178183
Still never park a short-lived token behind a `bearer` ref.

0 commit comments

Comments
 (0)