Schema · write_intent.v1

Write Intent schema

Clear, versioned metadata every orchestrator emits to check_write before a mutating side effect. TekCapitol™ does not query the system of record.

Identity

schemaVersionwrite_intent.v1 (const)
Canonical JSON Schema/schema/write-intent/v1/write-intent.v1.json
Alias/schemas/write-intent-v1.json
$idhttps://tekcapitol.com/schema/write-intent/v1/write-intent.v1.json

Required fields

FieldMeaning
schemaVersionMust be write_intent.v1.
systemSystem of record id (e.g. Salesforce, SAP, Snowflake).
objectTypeObject / entity type (e.g. Opportunity).
objectRefRecord id in that system.
intendedChangesArray of { field, newValue }. At least one change.

Recommended fields

FieldMeaning
authorityIndependent entitlement / SoR value the write must match. Prefer billing_sor / crm_entitlement, not prompt text.
authority.checkedAtISO-8601 time the orchestrator read authority.
authority.maxAgeMsFreshness window for checkedAt.
authority.stalePolicywarn | pause | block. Default in Live API: warn.
freshness.recordVersione.g. Salesforce SystemModstamp or row version.
freshness.stampTypee.g. SystemModstamp, hash, etag.
freshness.hashOptional hash of critical fields known to the orchestrator.
agentIdentityWhich agent / service identity is writing.
workflowId / runIdCorrelation for Trace and audit.
requireApprovalIf true, Check Write™ returns pause even when values match (HITL).
idempotencyKeyOptional dedupe key for the write attempt.
writeIntentEnvelopeSigned attestation envelope for identity, workflow attestation, and authority revalidation. Includes the signature and is verified by TC Protect.

Freshness and authorityStalePolicy

The gate is only as strong as the signals the orchestrator emits. If the orchestrator only has stale context and sends no freshness window, the freshness check is weak.

stalePolicyWhen authority age > maxAgeMs
warnDecision may still allow; response flags freshness warn. Default for backward compatibility.
pauseDecision pause. Do not write until a human clears or authority is re-read.
blockDecision block. Fail closed on stale authority.
High-assurance workflows should set authority.stalePolicy to pause or block, and emit a lightweight SoR stamp (for example orchestrator reads Salesforce SystemModstamp only and includes it in freshness). TekCapitol™ never opens Salesforce for you.

Minimal example

{
  "schemaVersion": "write_intent.v1",
  "system": "Salesforce",
  "objectType": "Opportunity",
  "objectRef": "006XXXXXXXXXXXX",
  "intendedChanges": [
    { "field": "StageName", "newValue": "Approved" }
  ],
  "authority": {
    "value": "eligible",
    "source": "billing_sor",
    "checkedAt": "2026-08-11T18:00:00.000Z",
    "maxAgeMs": 5000,
    "stalePolicy": "pause"
  },
  "freshness": {
    "recordVersion": "2026-08-11T17:59:58.000Z",
    "stampType": "SystemModstamp"
  },
  "agentIdentity": "renewal-agent-v3",
  "workflowId": "sf-renewal-opp",
  "runId": "run_abc123"
}

Full writeIntentEnvelope (signed attestation)

The envelope shape below matches what the SDK builds into check_write input. TC Protect™ verifies the signature, then attests the JWT payload (agent, workflow, write, and context) against the envelope fields.

{
  "run_id": "run_123",
  "agent": {
    "agent_id": "renewal-agent-17",
    "agent_version": "2.4.1",
    "service_account": "svc-renewal-prod",
    "identity_provider": "okta-workload",
    "token_issuer": "https://issuer.example.com"
  },
  "workflow": {
    "workflow_id": "salesforce-renewal",
    "workflow_version": "3.2",
    "orchestrator": "langgraph",
    "deployment_id": "prod-west-1",
    "definition_hash": "sha256:demo_definition_fingerprint"
  },
  "actor": {
    "on_behalf_of": "user_456"
  },
  "write": {
    "system": "Salesforce",
    "object": "Opportunity",
    "record_id": "006XXXXXXXXXXXX",
    "operation": "update",
    "fields": {
      "StageName": "Approved"
    }
  },
  "context": {
    "approval_id": "approval_789",
    "approval_expires_at": "2026-08-19T12:25:00.000Z",
    "approval_checked_at": "2026-08-19T12:00:00.000Z",
    "policy_version": "2026-08-19",
    "timestamp": "2026-08-19T12:00:00.000Z"
  },
  "signature": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9........"
}

Signature validation (JWT and JWKS)

  • Preferred: signature is a JWT (JWS compact) string with header.payload.signature. TC Protect™ verifies alg and validates the signature.
  • HS256: verifies using signing_secret in the Agent Registry.
  • RS256 and ES256: verifies using a public key derived from the Agent Registry trust material:
    • JWKS keys (matched by JWT kid when present)
    • or inline public_key_pem / certificate_pem
  • Issuer attestation: when the Agent Registry sets expected_issuer, TC Protect compares it to the JWT iss claim.
  • Payload attestation: if the JWT payload fields do not exactly match the envelope fields (agent, workflow, write, and context), TC Protect blocks with SIGNATURE_INVALID.
  • Legacy fallback: if signature is not a JWT compact string, TC Protect uses legacy HMAC-SHA256 hex verification over canonicalized envelope payload (excluding signature).

SDK helpers

Private package @tekcapitol/tc-protect-sdk (folder drop / file dependency): buildWriteIntent, withRecordFreshness, evaluateWriteIntent, guardedWrite. See Check Write™ design.

Also in Docs