# Models: P

> API models starting with P.

## `PackEnvDeclaration`

The names the pack service reads from its process environment, as the image's `index.json` declares them (`env`), each list in name order. Names only, never a value. On a deployment: absent when it declares none, and from older servers.

- `required: list[str]`
- `optional: list[str]`

## `PackEnvNameStatus`

One name the deployment's pack declares: where it's set, and why it can't be given to the pack service, if it can't (for `ambiguous` only, `secretScope` names the secret's scope and `cloudSecretScope` the cloud secret's). Each name is looked for at the deployment's project, then its org, then the workspace (most specific wins); a workspace-wide deployment's, at the workspace's default project. Never a value.

- `name: str`
- `required: bool`
- `kind: Optional[Annotated[Union[Literal['env', 'secret', 'cloud-secret'], str], <kindgi.client._open.OpenEnum object at 0x1073beed0>]]`
- `scope: kindgi.client.PackEnvScope | None`
- `missing: bool`
- `problem: Optional[Annotated[Union[Literal['ambiguous', 'secret-not-yet', 'missing', 'unreadable'], str], <kindgi.client._open.OpenEnum object at 0x1073beed0>]]` (optional)
- `secret_scope: kindgi.client.PackEnvScope | None` (`secretScope` on the wire) (optional)
- `cloud_secret_scope: kindgi.client.PackEnvScope | None` (`cloudSecretScope` on the wire) (optional)

## `PackEnvNames`

Where each name the deployment's pack declares is set, at the env the server serves. Never a value.

- `env_name: str` (`envName` on the wire)
- `data: list[kindgi.client.PackEnvNameStatus]`
- `problem: Optional[Annotated[Union[Literal['pack-env-ambiguous', 'pack-env-secret-not-yet', 'pack-env-missing', 'pack-env-secret-unreadable'], str], <kindgi.client._open.OpenEnum object at 0x1073beed0>]]` (optional)

## `PackEnvProblem`

`ready` only: the pack service runs on the values it was last given, because the newest can't be given to it (a required one was removed, say, or a secret can't be given), or didn't start (`pack-env-update-failed`). Gone once they can, or do. For a name that can't be given, `GET /v1/deployments/{deploymentId}/pack-env` names it. Absent from older servers.

- `code: Union[Literal['pack-env-ambiguous', 'pack-env-secret-not-yet', 'pack-env-missing', 'pack-env-secret-unreadable', 'pack-env-update-failed', 'pack-env-secrets-unaudited', 'pack-env-secret-too-large', 'pack-env-name-too-long', 'pack-env-cloud-secret-unsupported', 'pack-env-secret-redeploy'], str]`
- `since: AwareDatetime`

## `PackEnvScope`

Where a value is set: the deployment's project, the project's org, or the workspace (`tenant`).

- `kind: Union[Literal['project', 'org', 'tenant'], str]`
- `id: str | None` (optional)

## `PackEnvSecretValue`

A secret given to the deployment's pack service: its value, read at the version `revision` names, and audited before the answer.

- `value: str`
- `revision: str`

## `PackSuspension`

- `suspended: bool`
- `since: AwareDatetime`

## `Parts`

A case's `expect` only: whether each part the case expects passed on every repetition. Each one is a check in `passRate`. Absent from older servers.

- `decisions: bool | None` (optional)
- `answer: bool | None` (optional)

## `PatchMailTriggerBody`

Change what it runs (the target fields, as at registration, which also needs `execute` on the new target), its mailbox (replaced whole), folder, pace or label. A personal trigger's change is its owner's or a project admin's; a shared one's, a project admin's; and the company's mailbox, before or after, takes a project admin. The owner stays.

- `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)
- `config: kindgi.client.PatchMailTriggerBodyConfig | None` (optional)
- `label: str | None` (optional)
- `tools_allowed_unattended: list[kindgi.client.ToolsAllowedUnattendedItem] | None` (`toolsAllowedUnattended` on the wire) (optional)

## `PatchMailTriggerBodyConfig`

A mail trigger's mailbox, folder or pace, to change. An absent field keeps its value.

- `mailbox: kindgi.client.MailTriggerMailbox | None` (optional)
- `folder: str | None` (optional)
- `poll_seconds: int | None` (`pollSeconds` on the wire) (optional)
- `runs_per_hour: int | None` (`runsPerHour` on the wire) (optional)

## `PatchScheduleBody`

Change what it runs (the target fields, as at registration, which also needs what registering it needs on the new target; a new `improve` target stays in the schedule's project), when, or its policies.

- `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)
- `improve: kindgi.client.ImproveScheduleTargetInput | None` (optional)
- `config: kindgi.client.PatchScheduleBodyConfig | None` (optional)
- `catch_up: Optional[Literal['latest', 'skip']]` (`catchUp` on the wire) (optional)
- `overlap: Optional[Literal['skip', 'allow']]` (optional)
- `starting_deadline_seconds: int | None` (`startingDeadlineSeconds` on the wire) (optional)
- `label: str | None` (optional)
- `tools_allowed_unattended: list[kindgi.client.ToolsAllowedUnattendedItem] | None` (`toolsAllowedUnattended` on the wire) (optional)

## `PatchScheduleBodyConfig`

- `cron_expression: str | None` (`cronExpression` on the wire) (optional)
- `timezone: str | None` (optional)
- `input: Any | None` (optional)

## `PatchWebhookEndpointBody`

Fields to change; absent fields are kept. `filter` is replaced as a whole.

- `url: AnyUrl | None` (optional)
- `events: list[Annotated[Union[Literal['run.finished', 'improve-run.finished', 'approval.requested'], str], <kindgi.client._open.OpenEnum object at 0x1073beed0>]] | None` (optional)
- `filter: kindgi.client.WebhookEndpointFilter | None` (optional)
- `secret_ref: kindgi.client.WebhookSecretRef | None` (`secretRef` on the wire) (optional)
- `description: str | None` (optional)

## `PatchWebhookTriggerBody`

- `config: kindgi.client.PatchWebhookTriggerBodyConfig | None` (optional)
- `label: str | None` (optional)
- `flow_version: str | None` (`flowVersion` on the wire) (optional)
- `hmac_secret_name: str | None` (`hmacSecretName` on the wire) (optional)
- `signature: Optional[Annotated[kindgi.client.WebhookSignatureHmacSha256 | kindgi.client.WebhookSignatureStandardWebhooks | kindgi.client.WebhookSignatureUnrecognized, <kindgi.client._open.OpenUnion object at 0x1080d0950>]]` (optional)
- `delivery_id_header: str | None` (`deliveryIdHeader` on the wire) (optional)
- `body_limit_bytes: int | None` (`bodyLimitBytes` on the wire) (optional)
- `rate_limit_per_minute: int | None` (`rateLimitPerMinute` on the wire) (optional)
- `tools_allowed_unattended: list[kindgi.client.ToolsAllowedUnattendedItem] | None` (`toolsAllowedUnattended` on the wire) (optional)

## `PatchWebhookTriggerBodyConfig`

- `input: Any | None` (optional)

## `PerDomainItem`

- `domain: Union[Literal['org', 'agent', 'flow', 'tool', 'test_set', 'guardrail', 'mcp_endpoint', 'env', 'secret', 'run', 'artifact', 'policy', 'correction', 'corrector_group', 'provider', 'memory', 'conversation', 'api_key', 'service_account', '*'], str]`
- `purged: int`
- `remaining: int`
- `policy_id: str | None` (`policyId` on the wire) (optional)
- `limit_applied: Optional[Literal[True]]` (`limitApplied` on the wire) (optional)
- `missing_adapter: Optional[Literal[True]]` (`missingAdapter` on the wire) (optional)

## `Permission`

- `root: str`

## `PersonGrantBody`

The grant to give or take: tenant admin. A person's project and team roles have their own membership routes.

- `kind: Literal['tenant-admin']`

## `PersonGrants`

What a person may do, as granted directly: tenant admin, a role on a project (its memberships), a role in a team, and the reviewer roster. What a team's or an org's grants imply is not expanded.

- `user_id: str` (`userId` on the wire)
- `tenant_admin: bool | None` (`tenantAdmin` on the wire) (optional)
- `tenant_member: bool | None` (`tenantMember` on the wire) (optional)
- `projects: list[kindgi.client.PersonProjectRole]`
- `teams: list[kindgi.client.PersonTeamRole]`
- `reviewer: kindgi.client.PersonReviewerRole | None` (optional)

## `PersonProjectRole`

A person's direct role on a project.

- `project_id: str` (`projectId` on the wire)
- `role: Union[Literal['viewer', 'editor', 'owner', 'admin', 'member'], str]`

## `PersonReviewerRole`

A person's active entry on the reviewer roster.

- `role: Union[Literal['standard', 'senior', 'admin'], str]`

## `PersonTeamRole`

A person's role in a team.

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

## `Pin`

One change of a scope's pinned version, kept for good: what was pinned before, what is after, who asked and why.

- `id: uuid.UUID`
- `agent_id: str` (`agentId` on the wire)
- `scope: kindgi.client.PinScopeTenant | kindgi.client.PinScopeOrg | kindgi.client.PinScopeProject | kindgi.client.PinScopeSegment | kindgi.client.AgentPinScopeUnrecognized`
- `action: Union[Literal['pin', 'unpin'], str]`
- `from_version: str | None` (`fromVersion` on the wire)
- `to_version: str | None` (`toVersion` on the wire)
- `requested_by: kindgi.client.RequestedBy` (`requestedBy` on the wire)
- `reason: str | None` (optional)
- `test_run_id: str | None` (`testRunId` on the wire) (optional)
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `status: Optional[Annotated[Union[Literal['pinned', 'pending-approval', 'refused', 'superseded', 'rejected', 'expired'], str], <kindgi.client._open.OpenEnum object at 0x1073beed0>]]` (optional)
- `release_gate: kindgi.client.ReleaseGateRef | None` (`releaseGate` on the wire) (optional)
- `checks: list[kindgi.client.GateCheck] | None` (optional)
- `approval_id: str | None` (`approvalId` on the wire) (optional)
- `resolved_at: AwareDatetime | None` (`resolvedAt` on the wire) (optional)
- `stopped_following_latest: bool | None` (`stoppedFollowingLatest` on the wire) (optional)

## `PinActor`

Who pinned or unpinned: a user, or a service token.

- `kind: Union[Literal['user', 'service'], str]`
- `id: str`

## `PinAnswer`

A pin, and the test runs that check it.

- `pin: kindgi.client.Pin`
- `test_runs: list[kindgi.client.PinTestRun]` (`testRuns` on the wire)
- `fixed: list[str]`
- `reopened: list[str]`

## `PinChange`

One pin that differs between two versions of an agent or a flow.

- `kind: Union[Literal['tool', 'prompt', 'setting', 'agent'], str]`
- `id: str`
- `from_: str | None` (`from` on the wire) (optional)
- `to: str | None` (optional)

## `PinCheck`

What the gate would say about a pin. Nothing is recorded.

- `outcome: Union[Literal['would-pin', 'needs-approval', 'gate-failed'], str]`
- `release_gate: kindgi.client.ReleaseGateRef | None` (`releaseGate` on the wire)
- `checks: list[kindgi.client.GateCheck]`
- `approval: kindgi.client.GateApproval | None` (optional)
- `uncommitted_files: list[str] | None` (`uncommittedFiles` on the wire) (optional)
- `not_in_git: Optional[Literal[True]]` (`notInGit` on the wire) (optional)

## `PinPage`

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

## `PinScopeOrg`

An org's projects.

- `kind: Literal['org']`
- `org_id: uuid.UUID` (`orgId` on the wire)

## `PinScopeProject`

One project.

- `kind: Literal['project']`
- `project_id: uuid.UUID` (`projectId` on the wire)

## `PinScopeSegment`

A segment path within a project: it covers every run whose path starts with it.

- `kind: Literal['segment']`
- `project_id: uuid.UUID` (`projectId` on the wire)
- `path: list[kindgi.client.ScopeSegment]`

## `PinScopeTenant`

The whole workspace.

- `kind: Literal['tenant']`

## `PinScopeUnrecognized`

A `kind` this client doesn't know yet, from a newer runtime: the object as it came, every field kept.

- `kind: str`

## `PinTestRun`

A test run a pin checks a project with: the one the pin named, reused, or one it started, with correlation id `pin:<changeId>`.

- `project_id: uuid.UUID` (`projectId` on the wire)
- `test_run_id: str` (`testRunId` on the wire)

## `PinVersionBody`

- `version: str`
- `scope: kindgi.client.PinScopeTenant | kindgi.client.PinScopeOrg | kindgi.client.PinScopeProject | kindgi.client.PinScopeUnrecognized`
- `reason: str | None` (optional)

## `Pinned`

Once `pinned`: its version, who pinned it, and when.

- `version: str`
- `by: kindgi.client.PinActor`
- `at: AwareDatetime`

## `Pinned1`

- `project_id: str | None` (`projectId` on the wire) (optional)
- `segments: list[kindgi.client.ScopeSegment] | None` (optional)

## `PinnedVersion`

- `item_id: str` (`itemId` on the wire)
- `scope: kindgi.client.PinScopeTenant | kindgi.client.PinScopeOrg | kindgi.client.PinScopeProject | kindgi.client.PinScopeUnrecognized`
- `version: str`
- `change_id: uuid.UUID` (`changeId` on the wire)
- `set_at: AwareDatetime` (`setAt` on the wire)
- `set_by: kindgi.client.PinActor` (`setBy` on the wire)

## `PinnedVersionChange`

One change of a scope's pin, kept for good: what was pinned before, what is after, who asked and why.

- `id: uuid.UUID`
- `item_id: str` (`itemId` on the wire)
- `scope: kindgi.client.PinScopeTenant | kindgi.client.PinScopeOrg | kindgi.client.PinScopeProject | kindgi.client.PinScopeUnrecognized`
- `action: Union[Literal['pin', 'unpin'], str]`
- `from_version: str | None` (`fromVersion` on the wire)
- `to_version: str | None` (`toVersion` on the wire)
- `requested_by: kindgi.client.PinActor` (`requestedBy` on the wire)
- `reason: str | None` (optional)
- `created_at: AwareDatetime` (`createdAt` on the wire)

## `PinnedVersionChangePage`

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

## `PinnedVersionList`

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

## `PinnedVersionResolution`

- `item_id: str` (`itemId` on the wire)
- `version: str`
- `via: Union[Literal['pinned', 'latest'], str]`
- `pinned_scope: Optional[Annotated[kindgi.client.PinScopeTenant | kindgi.client.PinScopeOrg | kindgi.client.PinScopeProject | kindgi.client.PinScopeUnrecognized, <kindgi.client._open.OpenUnion object at 0x107ea7350>]]` (`pinnedScope` on the wire) (optional)

## `Policy`

- `id: str`
- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `version: str`
- `kind: Union[Literal['access-control', 'model-routing', 'adapter-allowlist', 'rate-limit', 'retention', 'compliance', 'tool-errors', 'hitl'], str]`
- `description: str | None` (optional)
- `spec: dict[str, Any]`
- `unregistered_at: AwareDatetime | None` (`unregisteredAt` on the wire) (optional)

## `PolicyCollectionPage`

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

## `PolicyVersionCollectionPage`

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

## `PolicyVersionRow`

- `id: str`
- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `version: str`
- `kind: Union[Literal['access-control', 'model-routing', 'adapter-allowlist', 'rate-limit', 'retention', 'compliance', 'tool-errors', 'hitl'], str]`
- `description: str | None` (optional)
- `spec: dict[str, Any]`
- `unregistered_at: AwareDatetime | None` (`unregisteredAt` on the wire) (optional)

## `Pr`

The newest pull request opened for this version in the project, a draft on the pack's repository. Absent when none was opened: no repo connected, a pin wider than the project, or a version that came from the files.

- `number: int`
- `url: str`
- `state: Union[Literal['open', 'merged', 'closed'], str]`

## `Pr1`

The pull request opened for the newer version there, when one was.

- `url: str`

## `PrincipalId`

- `root: str`

## `ProductionAllowedBody`

- `allowed: bool`

## `Project`

- `id: str`
- `tenant_id: str` (`tenantId` on the wire)
- `org_id: str | None` (`orgId` on the wire) (optional)
- `name: str`
- `slug: str`
- `is_default: bool` (`isDefault` on the wire)
- `description: str | None` (optional)
- `production_since: AwareDatetime | None` (`productionSince` on the wire) (optional)
- `sort_end_user_corrections: bool | None` (`sortEndUserCorrections` on the wire) (optional)
- `repo_connection_id: str | None` (`repoConnectionId` on the wire) (optional)
- `created_at: str` (`createdAt` on the wire)
- `updated_at: str` (`updatedAt` on the wire)

## `ProjectAccess`

Someone with access to the project, their effective role, and every way in.

- `principal: kindgi.client.AccessPrincipal`
- `display_name: str | None` (`displayName` on the wire) (optional)
- `primary_email: str | None` (`primaryEmail` on the wire) (optional)
- `role: Union[Literal['owner', 'admin', 'editor', 'viewer'], str]`
- `via: list[Annotated[kindgi.client.ProjectAccessDirect | kindgi.client.ProjectAccessTeam | kindgi.client.ProjectAccessOrgAdmin | kindgi.client.ProjectAccessTenantAdmin | kindgi.client.ProjectAccessPathUnrecognized, <kindgi.client._open.OpenUnion object at 0x108080e90>]]`

## `ProjectAccessDirect`

The principal's own role on the project. `joinedAt` when a membership stands behind it: only then do the membership routes change or remove it.

- `kind: Literal['direct']`
- `role: Union[Literal['viewer', 'editor', 'owner', 'admin', 'member'], str]`
- `joined_at: AwareDatetime | None` (`joinedAt` on the wire) (optional)

## `ProjectAccessOrgAdmin`

An admin of the project's org (directly or through a team): admin on the project.

- `kind: Literal['org-admin']`
- `org_id: str` (`orgId` on the wire)
- `org_name: str | None` (`orgName` on the wire) (optional)

## `ProjectAccessPage`

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

## `ProjectAccessPathUnrecognized`

A `kind` this client doesn't know yet, from a newer runtime: the object as it came, every field kept.

- `kind: str`

## `ProjectAccessTeam`

A team's grant on the project, held by every member of the team.

- `kind: Literal['team']`
- `team_id: str` (`teamId` on the wire)
- `team_name: str | None` (`teamName` on the wire) (optional)
- `role: Union[Literal['viewer', 'editor', 'admin'], str]`

## `ProjectAccessTenantAdmin`

A tenant admin: admin on every project.

- `kind: Literal['tenant-admin']`

## `ProjectCollectionPage`

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

## `ProjectMembership`

- `project_id: str` (`projectId` on the wire)
- `user_id: str` (`userId` on the wire)
- `role: Union[Literal['viewer', 'editor', 'owner', 'admin', 'member'], str]`
- `joined_at: str` (`joinedAt` on the wire)

## `ProjectMembershipCollectionPage`

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

## `ProjectPatch`

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

## `ProjectPinnedVersionPage`

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

## `ProjectProduction`

- `project_id: str` (`projectId` on the wire)
- `production_since: AwareDatetime | None` (`productionSince` on the wire)

## `ProjectProductionBody`

- `production: bool`

## `ProjectRepoConnection`

- `project_id: str` (`projectId` on the wire)
- `repo_connection_id: str | None` (`repoConnectionId` on the wire)

## `ProjectRepoConnectionBody`

- `connection_id: str` (`connectionId` on the wire)

## `ProjectSpec`

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

## `ProjectSuspension`

- `project_id: uuid.UUID` (`projectId` on the wire)
- `suspended: bool`
- `suspended_at: AwareDatetime | None` (`suspendedAt` on the wire) (optional)
- `suspended_reason: str | None` (`suspendedReason` on the wire) (optional)

## `PromotionBlockCheck`

The build's blocks against what runs in the target; present only when `pin` was asked of a runtime that checks them.

- `checked: bool`
- `replaced: list[kindgi.client.ReplacedItem1]`
- `not_needed: list[str]` (`notNeeded` on the wire)

## `PromotionMovedVersion`

- `id: str`
- `version: str | None` (optional)
- `carried: Optional[Literal[True]]` (optional)

## `PromotionMoves`

- `pack_id: str | None` (`packId` on the wire) (optional)
- `image_digest: str` (`imageDigest` on the wire)
- `agents: list[kindgi.client.PromotionMovedVersion]`
- `flows: list[kindgi.client.PromotionMovedVersion]`
- `tools: list[kindgi.client.PromotionMovesTool]`
- `guardrails: list[kindgi.client.PromotionMovesGuardrail]`

## `PromotionMovesGuardrail`

- `id: str`
- `version: str | None` (optional)

## `PromotionMovesTool`

- `id: str`
- `version: str | None` (optional)

## `PromotionNextEnvironment`

- `project_id: str` (`projectId` on the wire)
- `position: int`

## `PromptBlockContent`

- `template: str`
- `parameters: list[kindgi.client.PromptParameter] | None` (optional)

## `PromptParameter`

- `name: str`
- `description: str | None` (optional)
- `type: Union[Literal['string', 'number', 'boolean', 'date'], str]`
- `required: bool | None` (optional)
- `default: Any | None` (optional)

## `PromptRef`

A prompt block an agent's instructions come from, by id and semver range.

- `prompt: str`
- `version: str`

## `Prompts`

- `template: str`

## `ProvenanceCollectionPage`

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

## `ProvenanceEdge`

- `from_: str` (`from` on the wire)
- `to: str`
- `kind: Literal['caused-by', 'influenced-by', 'retrieved-from', 'invoked', 'produced', 'checked-against', 'waited-on', 'resumed-from']`

## `ProvenanceEdgeKind`

- `root: Literal['caused-by', 'influenced-by', 'retrieved-from', 'invoked', 'produced', 'checked-against', 'waited-on', 'resumed-from']`

## `ProvenanceFlowRef`

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

## `ProvenanceNode`

- `id: str`
- `kind: Literal['input', 'prompt', 'retrieval', 'tool-call', 'tool-result', 'model-call', 'model-output', 'artifact', 'guardrail-check', 'event', 'policy-decision', 'memory-read', 'memory-write', 'wait', 'resume', 'step']`
- `timestamp: AwareDatetime`
- `actor: str | None` (optional)
- `content_hash: str | None` (`contentHash` on the wire) (optional)
- `content_ref: str | None` (`contentRef` on the wire) (optional)
- `model_version: str | None` (`modelVersion` on the wire) (optional)
- `policy_decision_id: str | None` (`policyDecisionId` on the wire) (optional)
- `attributes: dict[str, Any] | None` (optional)

## `ProvenanceNodeKind`

- `root: Literal['input', 'prompt', 'retrieval', 'tool-call', 'tool-result', 'model-call', 'model-output', 'artifact', 'guardrail-check', 'event', 'policy-decision', 'memory-read', 'memory-write', 'wait', 'resume', 'step']`

## `ProvenanceRecord`

Full provenance record including the DAG payload.

- `id: uuid.UUID`
- `run_id: uuid.UUID` (`runId` on the wire)
- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `version: str`
- `flow_ref: kindgi.client.FlowRef | None` (`flowRef` on the wire) (optional)
- `dag: kindgi.client.Dag`
- `signature: kindgi.client.Signature | None` (optional)
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `call_usage: dict[str, kindgi.client.CallUsage] | None` (`callUsage` on the wire) (optional)
- `step_usage: dict[str, kindgi.client.StepUsage] | None` (`stepUsage` on the wire) (optional)

## `ProvenanceRecordMetadata`

Lightweight metadata row returned by list. Excludes the full DAG payload — clients fetch the DAG via `GET /v1/provenance/{runId}`.

- `id: uuid.UUID`
- `run_id: uuid.UUID` (`runId` on the wire)
- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `version: str`
- `flow_ref: kindgi.client.FlowRef | None` (`flowRef` on the wire) (optional)
- `signed: bool`
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `project_id: uuid.UUID | None` (`projectId` on the wire) (optional)

## `ProvenanceRef`

- `run_id: uuid.UUID` (`runId` on the wire)
- `provenance_id: uuid.UUID | None` (`provenanceId` on the wire) (optional)

## `ProvenanceRef2`

- `run_id: str | None` (`runId` on the wire) (optional)
- `node_id: str | None` (`nodeId` on the wire) (optional)
- `record_id: str | None` (`recordId` on the wire) (optional)

## `ProvenanceSignature`

Runtime-side signature attached at emission time (if the deployment signs on write). Independent of the export-time signature returned by the export route.

- `algorithm: Literal['ed25519']`
- `key_id: str` (`keyId` on the wire)
- `value: str`
- `signed_at: AwareDatetime` (`signedAt` on the wire)

## `Provider`

- `id: str`
- `model: str`

## `ProviderCapabilitiesResult`

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

## `ProviderCheckResult`

- `provider_id: str` (`providerId` on the wire)
- `adapter_id: str` (`adapterId` on the wire)
- `checked: bool`
- `issues: list[kindgi.client.AdapterConfigProblem]`
- `warnings: list[kindgi.client.AdapterConfigProblem] | None` (optional)
- `secret_ref: kindgi.client.SecretRef1 | None` (`secretRef` on the wire) (optional)

## `ProviderCollectionPage`

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

## `ProviderCost`

USD per 1K tokens. An adapter may take more rate fields (see the adapter's README).

- `prompt_usd_per1k_tokens: float` (`promptUsdPer1kTokens` on the wire)
- `completion_usd_per1k_tokens: float` (`completionUsdPer1kTokens` on the wire)

## `ProviderMetadata`

- `id: str`
- `region: str`
- `models: list[kindgi.client.ModelInfo]`
- `default_model: str | None` (`defaultModel` on the wire) (optional)
- `attributes: list[str] | None` (optional)
- `description: str | None` (optional)
- `capability_kind: str | None` (`capabilityKind` on the wire) (optional)
- `fallback: bool | None` (optional)
- `labels: dict[Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern='^[a-z0-9]([a-z0-9._/-]{0,61}[a-z0-9])?$', ascii_only=None)], LabelsAdditionalProperty] | None` (optional)

## `PublishAgentBody`

Full `defineAgent` spec. Validated server-side via `@kindgi/agents.defineAgent` — validation failures return `400 validation-failed` with the issue list under `details.issues`.

- `id: str`
- `version: str`
- `name: str`
- `description: str | None` (optional)
- `project_id: uuid.UUID` (`projectId` on the wire)
- `instructions: kindgi.client.Instructions | kindgi.client.PromptRef`
- `parameters: list[kindgi.client.PromptParameter] | None` (optional)
- `settings: list[kindgi.client.BlockRef] | None` (optional)
- `model_settings: kindgi.client.BlockRef | None` (`modelSettings` on the wire) (optional)
- `capabilities: list[kindgi.client.Capability4]`
- `tools: list[kindgi.client.ToolRef]`
- `retrieval: list[kindgi.client.RetrievalIntent]`
- `memory: kindgi.client.AgentMemoryPolicy | None` (optional)
- `guardrails: list[str]`
- `preferred_provider: str | None` (`preferredProvider` on the wire) (optional)
- `preferred_model: str | None` (`preferredModel` on the wire) (optional)
- `conversation_policy: kindgi.client.ConversationPolicy | None` (`conversationPolicy` on the wire) (optional)
- `budget: kindgi.client.TurnBudget | None` (optional)
- `tags: list[str] | None` (optional)
- `output: kindgi.client.AgentOutputSpec | None` (optional)
- `tool_errors: kindgi.client.ToolErrorsSpec | None` (`toolErrors` on the wire) (optional)
- `parallel_tool_calls: bool | None` (`parallelToolCalls` on the wire) (optional)

## `PublishAgentResult`

- `agent_id: str` (`agentId` on the wire)
- `version: str`
- `warnings: list[kindgi.client.Warning] | None` (optional)

## `PublishBlockBody`

- `project_id: uuid.UUID` (`projectId` on the wire)
- `id: str`
- `version: str`
- `kind: Union[Literal['prompt', 'settings'], str]`
- `description: str | None` (optional)
- `content: kindgi.client.PromptBlockContent | kindgi.client.SettingsBlockContent`

## `PublishBlockResult`

- `block_id: str` (`blockId` on the wire)
- `version: str`

## `PublishFlowBody`

Full flow definition. Validated server-side via `@kindgi/flow.loadFlow` — validation failures return `400 validation-failed` with the issue list under `details.issues`.

- `id: str`
- `version: str`
- `name: str | None` (optional)
- `description: str | None` (optional)
- `project_id: uuid.UUID` (`projectId` on the wire)
- `nodes: list[kindgi.client.FlowNode]`
- `edges: list[kindgi.client.FlowEdge]`
- `max_parallelism: int | None` (`maxParallelism` on the wire) (optional)
- `metadata: dict[str, Any] | None` (optional)

## `PublishFlowResult`

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

## `PublishPolicyBody`

- `id: str`
- `tenant_id: uuid.UUID | None` (`tenantId` on the wire) (optional)
- `version: str`
- `kind: Union[Literal['access-control', 'model-routing', 'adapter-allowlist', 'rate-limit', 'retention', 'compliance', 'tool-errors', 'hitl'], str]`
- `description: str | None` (optional)
- `spec: dict[str, Any]`

## `PublishPolicyResult`

- `policy_id: str` (`policyId` on the wire)
- `version: str`

## `PublishReleaseGateBody`

- `id: str`
- `version: str`
- `agent_id: str` (`agentId` on the wire)
- `scope: kindgi.client.PinScopeTenant | kindgi.client.PinScopeOrg | kindgi.client.PinScopeProject | kindgi.client.PinScopeSegment | kindgi.client.AgentPinScopeUnrecognized`
- `spec: kindgi.client.ReleaseGateSpec`
- `description: str | None` (optional)

## `PublishTestSetBody`

- `id: str`
- `project_id: uuid.UUID` (`projectId` on the wire)
- `tenant_id: uuid.UUID | None` (`tenantId` 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]`

## `PublishTestSetResult`

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

## `PublishedBy`

Who published the version: a user, or a service token. Absent on a version published before it was recorded.

- `kind: Union[Literal['user', 'service'], str]`
- `id: str`

## `PurgeTenantBody`

- `confirm: str`
