Skip to content

ApprovalRecordV1

PromptScript API


Defined in: core/src/types/approval.ts:25

Approval of one exact prompt version by one approver in one role, version 1. Unsigned: the record is a claim until the change adding it is reviewed.

Properties

$schema

$schema: "https://getpromptscript.dev/schema/approval-record/v1.json"

Defined in: core/src/types/approval.ts:30

Schema URL, the version tag of the record.

Example

"https://getpromptscript.dev/schema/approval-record/v1.json"

approver

approver: ApprovalApproverV1

Defined in: core/src/types/approval.ts:45

Who approved


comment?

optional comment?: string

Defined in: core/src/types/approval.ts:60

Note of the approver, without control characters except newline and without lone surrogates.

Max Length

2000

Pattern

^(?:[^\p{Cc}\p{Cs}]|\n){0,2000}$


contentHash

contentHash: string

Defined in: core/src/types/approval.ts:41

Content hash of the approved bundle.

Pattern

^sha256-[0-9a-f]{64}$


createdAt

createdAt: string

Defined in: core/src/types/approval.ts:51

Creation time, self-asserted and never used to decide.

Pattern

^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$

Example

"2026-10-22T09:14:03.120Z"

environment?

optional environment?: ReleaseEnvironmentName

Defined in: core/src/types/approval.ts:53

The only environment the approval counts for. Absent means every environment.


maxWeight?

optional maxWeight?: number

Defined in: core/src/types/approval.ts:68

Highest arm weight, in basis points, the approval counts for. A record with it never approves the entry hash and names its environment. Absent: a full approval.

As Type

integer

Minimum

1

Maximum

10000


prompt

prompt: string

Defined in: core/src/types/approval.ts:36

Prompt id, <@meta.id>/<key>. No segment ends with a dot.

Pattern

^(?!.*..)(?:@?[A-Za-z0-9][A-Za-z0-9_.-]{0,63}(?<!.)/)+[A-Za-z0-9][A-Za-z0-9_-]{0,63}$

Example

"acme-support/refund-reply"

role

role: GovernanceRoleName

Defined in: core/src/types/approval.ts:43

Approval role from governance.roles


signature?

optional signature?: string

Defined in: core/src/types/approval.ts:79

Armored SSH signature over the UTF-8 bytes of the RFC 8785 canonical JSON (canonicalizeJson) of the record without signature; signatureType is included. The signing namespace is promptscript-approval-<role>. Reserved, not written or read in this version.

Max Length

8192

Pattern

^-----BEGIN SSH SIGNATURE-----\n[A-Za-z0-9+/=\n]{1,8192}-----END SSH SIGNATURE-----\n?$


signatureType?

optional signatureType?: "ssh"

Defined in: core/src/types/approval.ts:70

Signature format, see signature. Reserved, not written or read in this version.