Skip to content
Open
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
17 changes: 17 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ Implemented:
- `ti fs delete-file-system`
- `ti fs list-file-systems`
- `ti fs describe-file-system`
- `ti fs describe-file-system-extract-configuration`
- `ti fs update-file-system-extract-configuration`
- `ti fs describe-file-system-embedding-configuration`
- `ti fs update-file-system-embedding-configuration`
- `ti fs check-file-system`
- `ti fs copy-file`
- `ti fs read-file`
Expand Down Expand Up @@ -160,6 +164,9 @@ Implemented:
- direct TiDB Cloud Filesystem tenant create/list/describe/delete control plane,
authoritative display metadata, quota output, and inventory filters from
`docs/spec/done/0031-fs-tenant-metadata-control-plane.md`
- optional tenant-scoped media extraction and embedding provider configuration,
provider-secret redaction, and media quota output from
`docs/spec/done/0032-file-system-ai-provider-configuration.md`
- ti fs/fs-git/fs-journal/fs-vault commands routed through the bundled
`ti-drive9` companion, with ti-owned profile loading, credential storage,
region resolution, and output/error handling
Expand Down Expand Up @@ -341,6 +348,7 @@ internal/db/sqlsingle/ one-statement validation
internal/db/validate/ DB flag and request validation helpers
internal/dryrun/ shared dry-run result envelope
internal/fs/ ti fs control-plane, data-plane, and mount use cases
internal/fs/aiconfig/ optional Filesystem extraction and embedding configuration
internal/fs/fscred/ ID-keyed ti fs credentials, selection, and legacy migration
internal/fs/mountlocator/ non-secret Drive9 background mount routing state
internal/fs/tokenmgmt/ Filesystem token lifecycle and local rotation safety
Expand Down Expand Up @@ -421,6 +429,11 @@ Follow these rules unless `docs/priciples.md` is updated:
- Filesystem token refresh is bearer-only and non-idempotent. Do not retry it
after an ambiguous network failure. Generate, list, enable, disable, and
delete use only TiDB Cloud public/private keys.
- Filesystem AI provider configuration is optional and uses only TiDB Cloud
public/private keys. Provider secrets come only from
`TI_FS_AI_PROVIDER_API_KEY`, are never persisted locally, and must be
redacted from every output and diagnostic path. Provider-validating PUTs are
not retried after ambiguous failures.
- Reject refresh, disable, or deletion of a token correlated with a known
active local mount. The error must show exact drain and unmount commands.
- Read-only commands reject `--dry-run`.
Expand Down Expand Up @@ -552,6 +565,10 @@ Implemented command behavior:
- `ti fs delete-file-system --file-system-id <file-system-id> --dry-run`
- `ti fs list-file-systems`
- `ti fs describe-file-system --file-system-id <file-system-id>`
- `ti fs describe-file-system-extract-configuration --file-system-id <file-system-id> --media-type image`
- `ti fs update-file-system-extract-configuration --file-system-id <file-system-id> --media-type image --enabled false`
- `ti fs describe-file-system-embedding-configuration --file-system-id <file-system-id>`
- `ti fs update-file-system-embedding-configuration --file-system-id <file-system-id> --enabled false`
- `ti fs check-file-system`
- `ti fs check-file-system --file-system-id <file-system-id>`
- `ti fs copy-file --from-local ./README.md --to-remote /workspace/README.md`
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,24 @@ ti fs generate-file-system-scoped-token \

An owner FS token authorizes Filesystem use and token management, but it is not a TiDB Cloud administrative credential. Creating, listing, describing, and deleting Filesystem resources require TiDB Cloud API keys. In particular, `ti fs delete-file-system` always requires an explicit `--file-system-id`; `TI_FS_TOKEN` cannot select or authorize deletion of the Filesystem itself. For token list, enable, disable, and delete commands, `--file-system-id` is required only when the command uses TiDB Cloud API keys. When an owner token is supplied through `--fs-token` or `TI_FS_TOKEN`, `ti` derives the Filesystem ID from that token.

Filesystem AI provider configuration is optional. Without it, existing create, mount, file, search, layer, vault, journal, and Git workflows continue to work normally. Organization administrators can inspect or customize image, audio, and video extraction and OpenAI-compatible 1024-dimension embedding for an explicit Filesystem ID:

```shell
ti fs describe-file-system-extract-configuration \
--file-system-id "$FILE_SYSTEM_ID" \
--media-type image

TI_FS_AI_PROVIDER_API_KEY="<provider-api-key>" \
ti fs update-file-system-extract-configuration \
--file-system-id "$FILE_SYSTEM_ID" \
--media-type image \
--enabled true \
--provider-api-base https://api.openai.com/v1 \
--provider-model "<vision-model>"
```

Extraction supports the `openai` protocol for image, audio, and video. Audio also supports Alibaba Cloud Model Studio Qwen ASR through `--provider-protocol qwen-asr`. Exact OpenAI-compatible endpoints can work when they implement the required API contract; native Anthropic, Gemini, Vertex AI, Bedrock, and Azure OpenAI interfaces are not supported. Enabling or replacing a provider sends a real validation request that can incur a small provider charge. After enablement, Filesystem content is sent to the selected extraction provider, and text or descriptions are sent to the selected embedding provider. The provider key is accepted only through `TI_FS_AI_PROVIDER_API_KEY`, is not stored locally, and is returned by the backend only in masked form.

Generation does not modify local credentials by default. Add `--store-locally` to select the new token locally; if a selected token already exists, add `--replace` explicitly. Replacing local selection does not revoke the previous remote token. Use immutable `token_id` values from the list response to disable, enable, or permanently revoke a token:

```shell
Expand Down Expand Up @@ -295,6 +313,10 @@ ti fs refresh-file-system-token
ti fs delete-file-system
ti fs list-file-systems
ti fs describe-file-system
ti fs describe-file-system-extract-configuration
ti fs update-file-system-extract-configuration
ti fs describe-file-system-embedding-configuration
ti fs update-file-system-embedding-configuration
ti fs check-file-system
ti fs copy-file
ti fs read-file
Expand Down
2 changes: 1 addition & 1 deletion docs/pingcap-docs/docs
Submodule docs updated 39 files
+14 −3 TOC-ai.md
+0 −1 ai/_index.md
+1 −10 ai/ti/reference/commands/db/ti-db-create-db-cluster.md
+3 −5 ai/ti/reference/commands/fs-vault/ti-fs-vault-mount-vault.md
+2 −2 ai/ti/reference/commands/fs/ti-fs-copy-file.md
+10 −2 ai/ti/reference/commands/fs/ti-fs-create-file-system.md
+55 −0 ai/ti/reference/commands/fs/ti-fs-delete-file-system-token.md
+2 −2 ai/ti/reference/commands/fs/ti-fs-delete-file-system.md
+58 −0 ai/ti/reference/commands/fs/ti-fs-delete-layer.md
+43 −0 ai/ti/reference/commands/fs/ti-fs-describe-file-system-embedding-configuration.md
+57 −0 ai/ti/reference/commands/fs/ti-fs-describe-file-system-extract-configuration.md
+2 −2 ai/ti/reference/commands/fs/ti-fs-describe-file-system.md
+57 −0 ai/ti/reference/commands/fs/ti-fs-disable-file-system-token.md
+55 −0 ai/ti/reference/commands/fs/ti-fs-enable-file-system-token.md
+66 −0 ai/ti/reference/commands/fs/ti-fs-fork-layer.md
+83 −0 ai/ti/reference/commands/fs/ti-fs-generate-file-system-scoped-token.md
+76 −0 ai/ti/reference/commands/fs/ti-fs-generate-file-system-token.md
+68 −0 ai/ti/reference/commands/fs/ti-fs-list-file-system-tokens.md
+14 −1 ai/ti/reference/commands/fs/ti-fs-list-file-systems.md
+47 −0 ai/ti/reference/commands/fs/ti-fs-list-layer-chain.md
+21 −3 ai/ti/reference/commands/fs/ti-fs-mount-file-system.md
+63 −0 ai/ti/reference/commands/fs/ti-fs-refresh-file-system-token.md
+82 −0 ai/ti/reference/commands/fs/ti-fs-update-file-system-embedding-configuration.md
+101 −0 ai/ti/reference/commands/fs/ti-fs-update-file-system-extract-configuration.md
+0 −51 ai/ti/reference/commands/organization/ti-organization-list-projects.md
+4 −0 ai/ti/reference/ti-agent-sandbox-example.md
+12 −9 ai/ti/reference/ti-cli-reference.md
+12 −13 ai/ti/reference/ti-configuration-and-credentials.md
+2 −3 ai/ti/reference/ti-daily-workflow-example.md
+1 −1 ai/ti/reference/ti-filesystem-vault.md
+169 −13 ai/ti/reference/ti-filesystem.md
+1 −1 ai/ti/reference/ti-install-configure-update.md
+0 −74 ai/ti/reference/ti-organization.md
+18 −6 ai/ti/reference/ti-regions-security-and-limitations.md
+12 −3 ai/ti/reference/ti-share-filesystem-across-machines-example.md
+1 −1 ai/ti/reference/ti-starter-database.md
+39 −17 ai/ti/reference/ti-troubleshooting.md
+3 −4 ai/ti/ti-overview.md
+4 −4 ai/ti/ti-quick-start.md
4 changes: 2 additions & 2 deletions docs/spec/done/0012-install-and-update-distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Goal

Make `tdc` installable and updatable through deterministic GitHub Releases artifacts. The MVP channel is GoReleaser plus GitHub Releases, with shell and PowerShell installers. Homebrew and Scoop are intentionally deferred to `docs/spec/0032-homebrew-and-scoop-distribution.md`.
Make `tdc` installable and updatable through deterministic GitHub Releases artifacts. The MVP channel is GoReleaser plus GitHub Releases, with shell and PowerShell installers. Homebrew and Scoop are intentionally deferred to `docs/spec/0033-homebrew-and-scoop-distribution.md`.

## User-facing Commands

Expand Down Expand Up @@ -266,7 +266,7 @@ Installer scripts:
- Silent auto-update.
- Updating TiDB Cloud credentials or DB SQL credentials.
- Config migrations that modify user config during update.
- Homebrew tap and Scoop bucket publishing. See `0032-homebrew-and-scoop-distribution.md`.
- Homebrew tap and Scoop bucket publishing. See `0033-homebrew-and-scoop-distribution.md`.
- Linux apt/yum repositories.
- Winget publishing.
- Notarization or binary signing beyond SHA-256 checksums for MVP.
Loading