# Models: T

> API models starting with T.

## `TakeTriggerOwnerBody`

Who the trigger's runs act as from now: for a trigger whose owner left, or to make one shared or personal. Absent, or an empty body: the caller takes it over (today's behaviour). With `runAsServiceAccountId`: that service account becomes the owner. With `runAsProject`: the project's own account does. A take-over keeps the trigger's `toolsAllowedUnattended`: change that with PATCH.

- `run_as_service_account_id: str | None` (`runAsServiceAccountId` on the wire) (optional)
- `run_as_project: bool | None` (`runAsProject` on the wire) (optional)

## `Team`

- `id: str`
- `tenant_id: str` (`tenantId` on the wire)
- `org_id: str | None` (`orgId` on the wire) (optional)
- `name: str`
- `slug: str`
- `description: str | None` (optional)
- `created_at: str` (`createdAt` on the wire)
- `updated_at: str` (`updatedAt` on the wire)

## `TeamCollectionPage`

- `data: list[kindgi.client.Team]`
- `has_more: bool` (`hasMore` on the wire)
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)

## `TeamMembership`

- `team_id: str` (`teamId` on the wire)
- `user_id: str` (`userId` on the wire)
- `role: Union[Literal['admin', 'member'], str]`
- `joined_at: str` (`joinedAt` on the wire)

## `TeamMembershipCollectionPage`

- `data: list[kindgi.client.TeamMembership]`
- `has_more: bool` (`hasMore` on the wire)
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)

## `TeamPatch`

- `name: str | None` (optional)
- `slug: str | None` (optional)
- `description: str | None` (optional)
- `org_id: str | None` (`orgId` on the wire) (optional)

## `TeamProjectGrant`

A team's role on a project.

- `team_id: str` (`teamId` on the wire)
- `project_id: str` (`projectId` on the wire)
- `role: Union[Literal['viewer', 'runner', 'editor', 'admin'], str]`
- `granted_at: AwareDatetime | None` (`grantedAt` on the wire) (optional)
- `team_name: str | None` (`teamName` on the wire) (optional)
- `project_name: str | None` (`projectName` on the wire) (optional)

## `TeamProjectGrantCollectionPage`

- `data: list[kindgi.client.TeamProjectGrant]`
- `has_more: bool` (`hasMore` on the wire)
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)

## `TeamSpec`

- `name: str`
- `slug: str`
- `description: str | None` (optional)
- `org_id: str | None` (`orgId` on the wire) (optional)

## `Tenant`

- `id: uuid.UUID`
- `name: str`
- `slug: str`
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `updated_at: AwareDatetime` (`updatedAt` on the wire)
- `production_allowed: bool | None` (`productionAllowed` on the wire) (optional)
- `production_next: str | None` (`productionNext` on the wire) (optional)
- `state: Optional[Annotated[Union[Literal['active', 'suspended', 'closing'], str], <kindgi.client._open.OpenEnum object at 0x1072cab50>]]` (optional)
- `limits: kindgi.client.TenantLimits | None` (optional)
- `storage: kindgi.client.TenantStorage | None` (optional)
- `egress: kindgi.client.EgressAddresses | None` (optional)

## `TenantAdminContacts`

- `data: list[kindgi.client.Datum3]`

## `TenantConfigCollectionPage`

- `data: list[kindgi.client.TenantConfigEntry]`
- `has_more: bool` (`hasMore` on the wire)
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)

## `TenantConfigEntry`

- `tenant_id: str` (`tenantId` on the wire)
- `kind: Union[Literal['env', 'config', 'secret'], str]`
- `key: str`
- `value: str`
- `sensitive: bool`
- `revision: int`
- `updated_at: str` (`updatedAt` on the wire)

## `TenantLimits`

The workspace's limits that are set. A limit that isn't set is absent, and isn't enforced.

- `api_requests_per_minute: int | None` (`apiRequestsPerMinute` on the wire) (optional)
- `webhook_receives_per_minute: int | None` (`webhookReceivesPerMinute` on the wire) (optional)
- `runs_at_once: int | None` (`runsAtOnce` on the wire) (optional)
- `runs_pending: int | None` (`runsPending` on the wire) (optional)
- `tool_calls_in_flight: int | None` (`toolCallsInFlight` on the wire) (optional)
- `approvals_pending: int | None` (`approvalsPending` on the wire) (optional)
- `projects_in_production: int | None` (`projectsInProduction` on the wire) (optional)
- `storage_mi_b: int | None` (`storageMiB` on the wire) (optional)
- `flows_in_production: int | None` (`flowsInProduction` on the wire) (optional)
- `agents_in_production: int | None` (`agentsInProduction` on the wire) (optional)

## `TenantLimitsInUse`

How much of each limit that counts something the tenant uses now, whether the limit is set or not: on `GET …/limits` only, and only from a runtime that counts it. A limit can be lowered below it: nothing is taken back, and the next one waits until the count is under the limit.

- `projects_in_production: int` (`projectsInProduction` on the wire)
- `storage_used_bytes: int | None` (`storageUsedBytes` on the wire) (optional)
- `flows_in_production: int | None` (`flowsInProduction` on the wire) (optional)
- `agents_in_production: int | None` (`agentsInProduction` on the wire) (optional)

## `TenantLimitsResult`

- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `limits: kindgi.client.TenantLimits`
- `in_use: kindgi.client.TenantLimitsInUse | None` (`inUse` on the wire) (optional)
- `plan: str | None` (optional)

## `TenantPatch`

A new name, a new slug, or both; a field left out stays as it is. The id stays, so whatever names the workspace by its id keeps working.

- `name: str | None` (optional)
- `slug: str | None` (optional)

## `TenantPlan`

- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `plan: str | None`

## `TenantPlanBody`

- `plan: str | None`

## `TenantProductionAllowed`

- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `production_allowed: bool` (`productionAllowed` on the wire)

## `TenantStorage`

What the workspace's files take now. Only from a runtime that counts them. Compare it with `limits.storageMiB`, in MiB of 1,048,576 bytes.

- `used_bytes: int` (`usedBytes` on the wire)

## `TenantTableRows`

A tenant's rows in one table: the table's name and a count.

- `table: str`
- `rows: int`

## `TestAdapterBody`

## `TestCase`

- `id: str`
- `kind: Union[Literal['correction', 'hand'], str]`
- `project_id: uuid.UUID` (`projectId` on the wire)
- `run_id: str` (`runId` on the wire)
- `made_on: str` (`madeOn` on the wire)
- `expect: kindgi.client.TestCaseExpect`
- `added_by: kindgi.client.CorrectionMadeBy` (`addedBy` on the wire)
- `added_at: AwareDatetime` (`addedAt` on the wire)
- `updated_at: AwareDatetime` (`updatedAt` on the wire)
- `retired: kindgi.client.TestCaseRetired | None` (optional)
- `expert: Optional[Literal[True]]` (optional)

## `TestCaseAnswer`

A judging model checks it. `right`: it says what the corrected run's answer said. `wrong`: it does what `shouldSay` or `why` asks.

- `verdict: Union[Literal['right', 'wrong'], str]`
- `should_say: str | None` (`shouldSay` on the wire) (optional)
- `why: str | None` (optional)

## `TestCaseCollectionPage`

- `data: list[kindgi.client.TestCase]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `TestCaseDecisions`

`right`: it calls the same tools the corrected run called, by name, in any order (args aren't compared). `wrong`: it calls every `shouldCall` tool (with its `args` where given) and none of `mustNotCall`, checked exactly, without a model.

- `verdict: Union[Literal['right', 'wrong'], str]`
- `should_call: list[kindgi.client.ExpectedCall] | None` (`shouldCall` on the wire) (optional)
- `must_not_call: list[str] | None` (`mustNotCall` on the wire) (optional)

## `TestCaseExpect`

One part for each part its correction gave a verdict on; at least one.

- `decisions: kindgi.client.TestCaseDecisions | None` (optional)
- `answer: kindgi.client.TestCaseAnswer | None` (optional)
- `items: list[kindgi.client.CorrectedAnswerItem] | None` (optional)

## `TestCaseRetired`

- `reason: str`
- `by: kindgi.client.CorrectionMadeBy`
- `at: AwareDatetime`

## `TestRun`

- `test_run_id: uuid.UUID` (`testRunId` on the wire)
- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `project_id: uuid.UUID | None` (`projectId` on the wire) (optional)
- `test_set_id: str` (`testSetId` on the wire)
- `test_set_version: str` (`testSetVersion` on the wire)
- `kind: Union[Literal['accuracy', 'pairwise', 'regression', 'human-review', 'benchmark', 'custom', 'corrections'], str]`
- `agent_ref: kindgi.client.TestRunAgentRef | None` (`agentRef` on the wire) (optional)
- `flow_ref: kindgi.client.TestRunFlowRef | None` (`flowRef` on the wire) (optional)
- `status: Union[Literal['pending', 'running', 'completed', 'failed', 'cancelled'], str]`
- `dry_run: bool` (`dryRun` on the wire)
- `started_at: AwareDatetime` (`startedAt` on the wire)
- `completed_at: AwareDatetime | None` (`completedAt` on the wire) (optional)
- `result: dict[str, Any] | None` (optional)
- `error: str | None` (optional)
- `cancel_reason: str | None` (`cancelReason` on the wire) (optional)
- `correlation_id: str | None` (`correlationId` on the wire) (optional)
- `comparison: kindgi.client.TestRunComparison | None` (optional)

## `TestRunAgentRef`

- `agent_id: str` (`agentId` on the wire)
- `version: str | None` (optional)

## `TestRunBaseline1`

What a comparison compares the candidate against: `'recorded'` (each case's recorded output, what was corrected), a version (`{ agentId, version }`, replayed under the same rules), or the version pinned in a scope (`{ pinned: { projectId?, segments? } }`, `segments` a path in the project, coarse to fine). Only `'recorded'` runs today; the others are refused when the run starts.

- `agent_id: str` (`agentId` on the wire)
- `version: str`

## `TestRunBaseline2`

What a comparison compares the candidate against: `'recorded'` (each case's recorded output, what was corrected), a version (`{ agentId, version }`, replayed under the same rules), or the version pinned in a scope (`{ pinned: { projectId?, segments? } }`, `segments` a path in the project, coarse to fine). Only `'recorded'` runs today; the others are refused when the run starts.

- `pinned: kindgi.client.Pinned1`

## `TestRunCollectionPage`

- `data: list[kindgi.client.TestRun]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `TestRunComparison`

A comparison test run's settings (a `corrections` test set).

- `baseline: Union[Annotated[Union[Literal['recorded'], str], <kindgi.client._open.OpenEnum object at 0x1072cab50>], kindgi.client.TestRunBaseline1, kindgi.client.TestRunBaseline2]`
- `reads: Union[Literal['recorded', 'live'], str]`
- `repetitions: int`
- `k: int`
- `versions: kindgi.client.FlowVersionOverrides | None` (optional)
- `group_weights: Optional[Annotated[Union[Literal['as-recorded', 'experts-only'], str], <kindgi.client._open.OpenEnum object at 0x1072cab50>]]` (`groupWeights` on the wire) (optional)
- `overrides: kindgi.client.TestRunOverrides | None` (optional)
- `sample: kindgi.client.TestRunSample | None` (optional)
- `rescore_of: str | None` (`rescoreOf` on the wire) (optional)

## `TestRunFlowRef`

- `flow_id: str` (`flowId` on the wire)
- `version: str | None` (optional)

## `TestRunOverrides`

For an agent candidate: block content its replays run instead of the version's pinned content (an Improve run's search). `settings`: values by settings block id, each a block the version pins, satisfying its schema. `prompts`: a template for the prompt block the version pins, which reads and names only what the agent has (its parameters, the variables the current template reads, the settings blocks it pins, its tools' and blocks' ids) and is at most twice as long. Anything else is `400 validation-failed`. A comparison with overrides can't gate a pin.

- `settings: dict[str, dict[str, Any]] | None` (optional)
- `prompts: dict[str, kindgi.client.Prompts] | None` (optional)

## `TestRunSample`

Only part of the test set's cases: split once into a hold-out part (about `holdOutShare` of them) and a search part (the rest), stratified (the cases that carry a correction, then of the others the cases with a "no" and the rest, each split on its own, a stratum of two or more giving each part at least one, so both parts check a correction when two cases carry one), in the order of a hash of each case id and `seed`. The same seed always splits the same test set the same way. A release gate refuses a comparison on the search part (`comparison.sample`).

- `part: Union[Literal['search', 'hold-out'], str]`
- `seed: str`
- `hold_out_share: float` (`holdOutShare` on the wire)

## `TestRunStatus`

- `root: Literal['pending', 'running', 'completed', 'failed', 'cancelled']`

## `TestSet`

- `id: str`
- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `project_id: uuid.UUID | None` (`projectId` on the wire) (optional)
- `version: str`
- `kind: Union[Literal['accuracy', 'pairwise', 'regression', 'human-review', 'benchmark', 'custom', 'corrections'], str]`
- `description: str | None` (optional)
- `spec: dict[str, Any]`
- `unregistered_at: AwareDatetime | None` (`unregisteredAt` on the wire) (optional)

## `TestSetCaseCounts`

- `active: int`
- `retired: int`

## `TestSetCollectionPage`

- `data: list[kindgi.client.TestSet]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `TestSetFrozenVersion`

The newest version frozen of this project's test set, which a test run checks: its cases are at `GET /v1/test-sets/{testSetId}/versions/{version}/cases`.

- `test_set_id: str` (`testSetId` on the wire)
- `version: str`

## `TextFire`

One text a text trigger was given and what came of it.

- `fire_id: str` (`fireId` on the wire)
- `trigger_id: str` (`triggerId` on the wire)
- `fired_at: AwareDatetime` (`firedAt` on the wire)
- `outcome: Union[Literal['pending', 'started', 'skipped', 'refused', 'failed'], str]`
- `run_id: uuid.UUID | None` (`runId` on the wire) (optional)
- `version: int | None` (optional)
- `detail: str | None` (optional)
- `counts_toward_pause: bool | None` (`countsTowardPause` on the wire) (optional)

## `TextFirePage`

- `data: list[kindgi.client.TextFire]`
- `has_more: bool` (`hasMore` on the wire)
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)

## `TextTriggerCollectionPage`

- `data: list[kindgi.client.TextTriggerRecord]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `TextTriggerDefinition`

What a text trigger's version runs, as whom, and which number it answers at what pace, as its record names them, and never its state (status, next or last fire).

- `flow_id: str | None` (`flowId` on the wire) (optional)
- `flow_version: str | None` (`flowVersion` on the wire) (optional)
- `agent_id: str | None` (`agentId` on the wire) (optional)
- `agent_version: str | None` (`agentVersion` on the wire) (optional)
- `project_id: uuid.UUID` (`projectId` on the wire)
- `owner: kindgi.client.TriggerOwner`
- `connection_id: uuid.UUID` (`connectionId` on the wire)
- `runs_per_hour: int` (`runsPerHour` on the wire)
- `per_sender_per_hour: int` (`perSenderPerHour` on the wire)
- `label: str | None`
- `tools_allowed_unattended: list[kindgi.client.ToolsAllowedUnattendedItem] | None` (`toolsAllowedUnattended` on the wire) (optional)

## `TextTriggerRecord`

A text trigger: each text (SMS or WhatsApp) to its business number starts a run of its agent or flow, with the text as the run's input, as its owner. A flow's input is `{ text, thread }`: `text` is `{ from, channel, body, receivedAt }` (`channel` `sms` or `whatsapp`), and `thread` is `{ connectionId, channel, sender }`. In such a run, every call that changes something, except handing the conversation to a person (`kindgi_hand_to_person`), waits for a person's yes unless the trigger lists it (`toolsAllowedUnattended`); a text that isn't a reply always waits.

- `trigger_id: str` (`triggerId` on the wire)
- `flow_id: str | None` (`flowId` on the wire) (optional)
- `flow_version: str | None` (`flowVersion` on the wire) (optional)
- `agent_id: str | None` (`agentId` on the wire) (optional)
- `agent_version: str | None` (`agentVersion` on the wire) (optional)
- `project_id: uuid.UUID` (`projectId` on the wire)
- `owner: kindgi.client.TriggerOwner`
- `connection_id: uuid.UUID` (`connectionId` on the wire)
- `runs_per_hour: int` (`runsPerHour` on the wire)
- `per_sender_per_hour: int` (`perSenderPerHour` on the wire)
- `label: str | None`
- `status: Union[Literal['active', 'paused'], str]`
- `status_reason: str | None` (`statusReason` on the wire) (optional)
- `version: int | None` (optional)
- `tools_allowed_unattended: list[kindgi.client.ToolsAllowedUnattendedItem] | None` (`toolsAllowedUnattended` on the wire) (optional)
- `last_fired_at: AwareDatetime | None` (`lastFiredAt` on the wire)
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `updated_at: AwareDatetime` (`updatedAt` on the wire)
- `unregistered_at: AwareDatetime | None` (`unregisteredAt` on the wire) (optional)

## `TextTriggerVersion`

One version of a text trigger: what it was from `createdAt` until the next. A text's run uses the newest when it starts, and keeps it.

- `trigger_id: str` (`triggerId` on the wire)
- `version: int`
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `created_by: str | None` (`createdBy` on the wire) (optional)
- `cause: Union[Literal['register', 'edit', 'owner', 'first-fire', 'unversioned-edit', 'pin'], str]`
- `unregistered_at: AwareDatetime | None` (`unregisteredAt` on the wire) (optional)
- `definition: kindgi.client.TextTriggerDefinition`

## `TextTriggerVersionPage`

Newest first.

- `data: list[kindgi.client.TextTriggerVersion]`
- `has_more: bool` (`hasMore` on the wire)
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)

## `TimeRange`

- `from_: AwareDatetime` (`from` on the wire)
- `to: AwareDatetime`

## `TokenSignInResult`

- `user_id: str` (`userId` on the wire)
- `expires_at: AwareDatetime` (`expiresAt` on the wire)

## `Tool`

- `id: str`
- `project_id: uuid.UUID | None` (`projectId` on the wire) (optional)
- `description: str`
- `version: str | None` (optional)
- `input: dict[str, Any]`
- `output: dict[str, Any]`
- `needs: list[kindgi.client.ToolNeed] | None` (optional)
- `effects: list[kindgi.client.ToolEffect] | None` (optional)
- `transport: Optional[Annotated[Union[Literal['auto', 'native', 'mcp'], str], <kindgi.client._open.OpenEnum object at 0x1072cab50>]]` (optional)
- `mcp_endpoint: str | None` (`mcpEndpoint` on the wire) (optional)
- `metadata: dict[str, Any] | None` (optional)
- `mutating: bool | None` (optional)
- `needs_approval_when_unattended: bool | None` (`needsApprovalWhenUnattended` on the wire) (optional)
- `pauses: bool | None` (optional)
- `stores_files: bool | None` (`storesFiles` on the wire) (optional)
- `reads_files: bool | None` (`readsFiles` on the wire) (optional)
- `updates_files: bool | None` (`updatesFiles` on the wire) (optional)
- `result_is_outside_data: bool | None` (`resultIsOutsideData` on the wire) (optional)
- `sandbox: Optional[Annotated[Union[Literal['none', 'context-isolated', 'strict'], str], <kindgi.client._open.OpenEnum object at 0x1072cab50>]]` (optional)
- `limits: kindgi.client.RuntimeLimits | None` (optional)
- `network: Optional[Annotated[kindgi.client.NetworkPolicy1 | kindgi.client.NetworkPolicy2 | kindgi.client.NetworkPolicyUnrecognized, <kindgi.client._open.OpenUnion object at 0x108198110>]]` (optional)
- `needs_spec: kindgi.client.TypedNeeds | None` (`needsSpec` on the wire) (optional)
- `code_artifact_ref: Optional[Annotated[kindgi.client.CodeArtifactRefOci | kindgi.client.CodeArtifactRefFilesystem | kindgi.client.CodeArtifactRefUnrecognized, <kindgi.client._open.OpenUnion object at 0x108198410>]]` (`codeArtifactRef` on the wire) (optional)
- `spec: kindgi.client.ToolSpec | None` (optional)
- `unregistered_at: AwareDatetime | None` (`unregisteredAt` on the wire) (optional)
- `secret_scopes: dict[str, Optional[Annotated[kindgi.client.RecordedSecretScopeTenant | kindgi.client.RecordedSecretScopeOrg | kindgi.client.RecordedSecretScopeProject | kindgi.client.RecordedSecretScopeUnrecognized, <kindgi.client._open.OpenUnion object at 0x108198810>]]] | None` (`secretScopes` on the wire) (optional)

## `ToolCall`

- `tool_id: str` (`toolId` on the wire)
- `invocation_id: str` (`invocationId` on the wire)

## `ToolCollectionPage`

- `data: list[kindgi.client.Tool]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `ToolEffect`

- `kind: Union[Literal['reads', 'writes', 'deletes', 'network', 'spawns-run', 'emits-event', 'external-side-effect', 'sensitive-data-egress'], str]`
- `resource: str | None` (optional)
- `notes: str | None` (optional)

## `ToolErrorsSpec`

- `max_retries: int | None` (`maxRetries` on the wire) (optional)
- `retry_on: list[Annotated[Union[Literal['invalid-arguments', 'unknown-tool', 'tool-error', 'tool-failed'], str], <kindgi.client._open.OpenEnum object at 0x1072cab50>]] | None` (`retryOn` on the wire) (optional)

## `ToolFileNotRead`

Why a pack tool's read of a stored file answered no bytes. The read's bytes come as `application/octet-stream` instead.

- `not_read: Literal['rule', 'gone', 'changed', 'size']` (`notRead` on the wire)

## `ToolFileStoreAnswer`

- `root: kindgi.client.ToolFileStoreAnswer1 | kindgi.client.ToolFileStoreAnswer2`

## `ToolFileStoreAnswer1`

What a pack tool's file store answers: the stored file (`file`), for the tool to return in its result's top-level `files`, or why nothing was stored (`notStored`).

- `file: kindgi.client.FileValue`

## `ToolFileStoreAnswer2`

What a pack tool's file store answers: the stored file (`file`), for the tool to return in its result's top-level `files`, or why nothing was stored (`notStored`).

- `not_stored: Literal['type', 'size', 'limit', 'storage']` (`notStored` on the wire)

## `ToolFileUpdateAnswer`

- `root: kindgi.client.ToolFileUpdateAnswer1 | kindgi.client.ToolFileUpdateAnswer2 | kindgi.client.ToolFileUpdateAnswer3 | kindgi.client.ToolFileUpdateAnswer4`

## `ToolFileUpdateAnswer1`

What a pack tool's file update answers: the new version (`file`), for the tool to return in its result's top-level `files`; Latest, when it already has these bytes (`same`) or isn't the expected version any more (`conflict`); or why no version was added (`notUpdated`).

- `file: kindgi.client.FileValue`

## `ToolFileUpdateAnswer2`

What a pack tool's file update answers: the new version (`file`), for the tool to return in its result's top-level `files`; Latest, when it already has these bytes (`same`) or isn't the expected version any more (`conflict`); or why no version was added (`notUpdated`).

- `same: kindgi.client.FileValue`

## `ToolFileUpdateAnswer3`

What a pack tool's file update answers: the new version (`file`), for the tool to return in its result's top-level `files`; Latest, when it already has these bytes (`same`) or isn't the expected version any more (`conflict`); or why no version was added (`notUpdated`).

- `conflict: kindgi.client.FileValue`

## `ToolFileUpdateAnswer4`

What a pack tool's file update answers: the new version (`file`), for the tool to return in its result's top-level `files`; Latest, when it already has these bytes (`same`) or isn't the expected version any more (`conflict`); or why no version was added (`notUpdated`).

- `not_updated: Literal['rule', 'denied', 'gone', 'type', 'size', 'storage']` (`notUpdated` on the wire)

## `ToolHitlPolicy`

The agent's tool gates. A tool `overrides` doesn't name takes `default`. Without `default`, a read-only tool (`mutating: false`) runs without asking and any other tool asks on first use. Without `tools`, the agent's own rules gate no tool.

- `default: Optional[Annotated[Union[Literal['never_ask', 'ask_on_first_use', 'always_ask'], str], <kindgi.client._open.OpenEnum object at 0x1072cab50>]]` (optional)
- `overrides: dict[str, Union[kindgi.client.ToolHitlRule, Annotated[Union[Literal['never_ask', 'ask_on_first_use', 'always_ask'], str], <kindgi.client._open.OpenEnum object at 0x1072cab50>]]] | None` (optional)

## `ToolHitlRule`

A tool's gate, and the reviewer role its approvals need. Without `requiredRole`, the agent's `defaultReviewerRole`.

- `mode: Union[Literal['never_ask', 'ask_on_first_use', 'always_ask'], str]`
- `required_role: Optional[Annotated[Union[Literal['standard', 'senior', 'admin'], str], <kindgi.client._open.OpenEnum object at 0x1072cab50>]]` (`requiredRole` on the wire) (optional)

## `ToolNeed`

- `name: str`
- `optional: bool | None` (optional)

## `ToolRef`

Typed tool reference. `version` is a semver **range** (npm-style: `1.2.3` exact pin, `^1.2.3` compatible-updates, `~1.2.3` patch-updates-only, `>=1.0.0 <2.0.0` explicit range). Dispatch resolves the range to a concrete active version via `semver.maxSatisfying` at run start. No implicit "latest" — every tool ref names both id and range.

- `id: str`
- `version: str`

## `ToolSecretRef`

- `env_name: str | None` (`envName` on the wire) (optional)
- `name: str`

## `ToolSpec`

- `root: kindgi.client.HttpToolSpec`

## `ToolVersionCollectionPage`

- `data: list[kindgi.client.ToolVersionRow]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `ToolVersionRow`

- `id: str`
- `project_id: uuid.UUID | None` (`projectId` on the wire) (optional)
- `description: str`
- `version: str | None` (optional)
- `input: dict[str, Any]`
- `output: dict[str, Any]`
- `needs: list[kindgi.client.ToolNeed] | None` (optional)
- `effects: list[kindgi.client.ToolEffect] | None` (optional)
- `transport: Optional[Annotated[Union[Literal['auto', 'native', 'mcp'], str], <kindgi.client._open.OpenEnum object at 0x1072cab50>]]` (optional)
- `mcp_endpoint: str | None` (`mcpEndpoint` on the wire) (optional)
- `metadata: dict[str, Any] | None` (optional)
- `mutating: bool | None` (optional)
- `needs_approval_when_unattended: bool | None` (`needsApprovalWhenUnattended` on the wire) (optional)
- `pauses: bool | None` (optional)
- `stores_files: bool | None` (`storesFiles` on the wire) (optional)
- `reads_files: bool | None` (`readsFiles` on the wire) (optional)
- `updates_files: bool | None` (`updatesFiles` on the wire) (optional)
- `result_is_outside_data: bool | None` (`resultIsOutsideData` on the wire) (optional)
- `sandbox: Optional[Annotated[Union[Literal['none', 'context-isolated', 'strict'], str], <kindgi.client._open.OpenEnum object at 0x1072cab50>]]` (optional)
- `limits: kindgi.client.RuntimeLimits | None` (optional)
- `network: Optional[Annotated[kindgi.client.NetworkPolicy1 | kindgi.client.NetworkPolicy2 | kindgi.client.NetworkPolicyUnrecognized, <kindgi.client._open.OpenUnion object at 0x1081a7d10>]]` (optional)
- `needs_spec: kindgi.client.TypedNeeds | None` (`needsSpec` on the wire) (optional)
- `code_artifact_ref: Optional[Annotated[kindgi.client.CodeArtifactRefOci | kindgi.client.CodeArtifactRefFilesystem | kindgi.client.CodeArtifactRefUnrecognized, <kindgi.client._open.OpenUnion object at 0x1081a7f90>]]` (`codeArtifactRef` on the wire) (optional)
- `spec: kindgi.client.ToolSpec | None` (optional)
- `unregistered_at: AwareDatetime | None` (`unregisteredAt` on the wire) (optional)
- `secret_scopes: dict[str, Optional[Annotated[kindgi.client.RecordedSecretScopeTenant | kindgi.client.RecordedSecretScopeOrg | kindgi.client.RecordedSecretScopeProject | kindgi.client.RecordedSecretScopeUnrecognized, <kindgi.client._open.OpenUnion object at 0x1081b8450>]]] | None` (`secretScopes` on the wire) (optional)

## `ToolsAllowedUnattendedItem`

- `root: str`

## `TopK`

- `yes_weight: float` (`yesWeight` on the wire)
- `total_weight: float` (`totalWeight` on the wire)

## `Trigger`

The improve schedule and fire that started it (`GET /v1/schedules/{triggerId}/fires`); absent for an Improve run a person started.

- `trigger_id: str` (`triggerId` on the wire)
- `fire_id: str` (`fireId` on the wire)

## `TriggerOwner`

- `kind: Union[Literal['user', 'service'], str]`
- `id: str`
- `display_name: str | None` (`displayName` on the wire) (optional)
- `is_project_account: Optional[Literal[True]]` (`isProjectAccount` on the wire) (optional)

## `TrustSigningKeyBody`

- `key_id: str` (`keyId` on the wire)
- `algorithm: Optional[Literal['ed25519']]` (optional)
- `public_key: str` (`publicKey` on the wire)
- `label: str | None` (optional)

## `TrustedSigningKey`

A public key the workspace trusts to sign deployments (`POST /v1/deployments`). A revoked key stays readable, with `revokedAt`, so the deployments it signed can be audited; it verifies no new ones.

- `key_id: str` (`keyId` on the wire)
- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `algorithm: Union[Literal['ed25519'], str]`
- `public_key: str` (`publicKey` on the wire)
- `label: str | None` (optional)
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `revoked_at: AwareDatetime | None` (`revokedAt` on the wire) (optional)
- `revoked_reason: str | None` (`revokedReason` on the wire) (optional)

## `TrustedSigningKeyPage`

- `data: list[kindgi.client.TrustedSigningKey]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `TurnBudget`

- `max_steps: int | None` (`maxSteps` on the wire) (optional)
- `max_cost_usd: float | None` (`maxCostUsd` on the wire) (optional)
- `max_wall_ms: int | None` (`maxWallMs` on the wire) (optional)

## `Type`

- `root: str`

## `TypedNeeds`

Typed discriminated needs (env / secrets / config / capabilities / bindings / connections). Optional additive field.

- `env: dict[str, dict[str, Any]] | None` (optional)
- `secrets: dict[str, dict[str, Any]] | None` (optional)
- `config: dict[str, dict[str, Any]] | None` (optional)
- `capabilities: list[kindgi.client.Capability5] | None` (optional)
- `bindings: list[kindgi.client.Binding] | None` (optional)
- `connections: dict[Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern='^[a-z][a-zA-Z0-9_]{0,63}$', ascii_only=None)], kindgi.client.ConnectionNeed] | None` (optional)
