Skip to content

Commit 358150e

Browse files
committed
docs(knowledge): state saved-credential availability and rollback limits
Catalog and connector credentialId descriptions say saved credentials work once the deployment enables them, the connector credentialId field covers saved credentials, and the flag notes that a release rollback is unsafe once any connector uses one. Regenerates OpenAPI, CLI API and CLI docs.
1 parent 585c718 commit 358150e

9 files changed

Lines changed: 17 additions & 10 deletions

File tree

‎apps/docs/content/docs/cli/knowledge.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ sim knowledge connectors create <knowledgeBaseId> [options]
10401040
| Option | Required | Description |
10411041
| --- | --- | --- |
10421042
| `--connector-type <value>` | Yes | Registered connector type. |
1043-
| `--credential-id <value>` | No | OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors. |
1043+
| `--credential-id <value>` | No | OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or, when this deployment enables it, a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors. |
10441044
| `--api-key <value>` | No | Write-only API key for connector types whose `auth.mode` is `apiKey` (see connector types), or a personal access token for an OAuth connector that also accepts one, such as GitHub. Send it instead of `credentialId`. Pass a raw key, or a secret reference written as the whole value `{{SECRET_NAME}}`, which the server resolves; `$SECRET_NAME` is not a reference. |
10451045
| `--source-config <json\|@file>` | Yes | Connector-specific source selection and filtering configuration. (JSON, or @path / @- to read a file or stdin). |
10461046
| `--sync-interval-minutes <value>` | No | Scheduled synchronization interval in minutes; zero disables scheduling. Defaults to 1440. |

‎apps/docs/content/docs/cli/reference.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2645,7 +2645,7 @@ sim knowledge connectors create <knowledgeBaseId> [options]
26452645
| Option | Required | Description |
26462646
| --- | --- | --- |
26472647
| `--connector-type <value>` | Yes | Registered connector type. |
2648-
| `--credential-id <value>` | No | OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors. |
2648+
| `--credential-id <value>` | No | OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or, when this deployment enables it, a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors. |
26492649
| `--api-key <value>` | No | Write-only API key for connector types whose `auth.mode` is `apiKey` (see connector types), or a personal access token for an OAuth connector that also accepts one, such as GitHub. Send it instead of `credentialId`. Pass a raw key, or a secret reference written as the whole value `{{SECRET_NAME}}`, which the server resolves; `$SECRET_NAME` is not a reference. |
26502650
| `--source-config <json\|@file>` | Yes | Connector-specific source selection and filtering configuration. (JSON, or @path / @- to read a file or stdin). |
26512651
| `--sync-interval-minutes <value>` | No | Scheduled synchronization interval in minutes; zero disables scheduling. Defaults to 1440. |

‎apps/docs/openapi-v2-knowledge.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6933,7 +6933,7 @@
69336933
"type": "null"
69346934
}
69356935
],
6936-
"description": "OAuth credential identifier, or null for API-key and unauthenticated sources."
6936+
"description": "OAuth credential identifier, or the saved credential an `apiKey` source syncs with (see `auth.savedCredential`); null for API-key and unauthenticated sources."
69376937
},
69386938
"sourceConfig": {
69396939
"type": "object",
@@ -7155,7 +7155,7 @@
71557155
"description": "Registered connector type."
71567156
},
71577157
"credentialId": {
7158-
"description": "OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors.",
7158+
"description": "OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or, when this deployment enables it, a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors.",
71597159
"type": "string",
71607160
"minLength": 1,
71617161
"maxLength": 255
@@ -7331,7 +7331,7 @@
73317331
"type": "null"
73327332
}
73337333
],
7334-
"description": "OAuth credential identifier, or null for API-key and unauthenticated sources."
7334+
"description": "OAuth credential identifier, or the saved credential an `apiKey` source syncs with (see `auth.savedCredential`); null for API-key and unauthenticated sources."
73357335
},
73367336
"sourceConfig": {
73377337
"type": "object",

‎apps/docs/openapi-v2-resources.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21715,7 +21715,7 @@
2171521715
"description": "Whether the key may be left blank, for a source reachable without authentication."
2171621716
},
2171721717
"savedCredential": {
21718-
"description": "When present, a saved credential of this service may be passed as `credentialId` instead of `apiKey`. Fields marked `apiKeyOnly` are then omitted.",
21718+
"description": "When present, a saved credential of this service may be passed as `credentialId` instead of `apiKey`, once saved-credential setup is enabled on this deployment (until then it is refused with a validation error). Fields marked `apiKeyOnly` are then omitted.",
2171921719
"type": "object",
2172021720
"properties": {
2172121721
"provider": {

‎apps/sim/lib/api/contracts/v2/catalog.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ export const v2ConnectorTypeSchema = z
755755
})
756756
.optional()
757757
.describe(
758-
'When present, a saved credential of this service may be passed as `credentialId` instead of `apiKey`. Fields marked `apiKeyOnly` are then omitted.'
758+
'When present, a saved credential of this service may be passed as `credentialId` instead of `apiKey`, once saved-credential setup is enabled on this deployment (until then it is refused with a validation error). Fields marked `apiKeyOnly` are then omitted.'
759759
),
760760
}),
761761
])

‎apps/sim/lib/api/contracts/v2/knowledge.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,9 @@ export const v2KnowledgeConnectorSchema = z
17771777
credentialId: z
17781778
.string()
17791779
.nullable()
1780-
.describe('OAuth credential identifier, or null for API-key and unauthenticated sources.'),
1780+
.describe(
1781+
'OAuth credential identifier, or the saved credential an `apiKey` source syncs with (see `auth.savedCredential`); null for API-key and unauthenticated sources.'
1782+
),
17811783
sourceConfig: z
17821784
.record(z.string(), z.unknown().describe('Connector-specific source configuration value.'))
17831785
.describe('Connector-specific source selection and filtering configuration.'),
@@ -1932,7 +1934,7 @@ export const v2CreateKnowledgeConnectorBodySchema = z
19321934
.max(255)
19331935
.optional()
19341936
.describe(
1935-
'OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors.'
1937+
'OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or, when this deployment enables it, a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors.'
19361938
),
19371939
apiKey: z
19381940
.string()

‎apps/sim/lib/core/config/feature-flags.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ const FEATURE_FLAGS = {
120120
'with a saved AWS credential) be set up with that credential. Global on/off only; gates new ' +
121121
'setup and credential changes, never syncing of connectors already using a credential. Turn ' +
122122
'on only after the release that adds it is live on both the app and Trigger.dev workers. ' +
123+
'Once any connector uses a saved credential, rolling back to an earlier release is unsafe ' +
124+
'even with the flag off: older workers unschedule those connectors as credential-removed. ' +
123125
'Off-AppConfig falls back to KNOWLEDGE_CONNECTOR_SAVED_CREDENTIALS.',
124126
fallback: 'KNOWLEDGE_CONNECTOR_SAVED_CREDENTIALS',
125127
},

‎apps/sim/lib/knowledge/connectors/saved-credential-rollout.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import type { ConnectorAuthConfig } from '@/connectors/types'
88
* A global switch that gates setup only. Workers from an older release read a key
99
* connector without a key as one whose credential was removed and unschedule it, so
1010
* the switch stays off until every app and worker runs a release that reads these rows.
11+
* Turning it off later does not protect rows already set up: once any exist, a release
12+
* rollback unschedules them as credential-removed, and they stay idle until edited or
13+
* synced manually.
1114
*/
1215
export function isConnectorSavedCredentialSetupEnabled(): Promise<boolean> {
1316
return isFeatureEnabled('knowledge-connector-saved-credentials')

‎packages/sim-cli/src/generated/v2-api.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17349,7 +17349,7 @@ export const V2_OPERATIONS = {
1734917349
credentialId: {
1735017350
kind: 'string',
1735117351
describe:
17352-
'OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors.',
17352+
'OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or, when this deployment enables it, a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors.',
1735317353
},
1735417354
apiKey: {
1735517355
kind: 'string',

0 commit comments

Comments
 (0)