# agents/job/watch

https://toip.tools/spec/agents/job/watch/0.1

The hirer tells the attester what to check before it attests the work complete: for a code job, the repository and the test command to run.

- **Sent**: hiring agent → attester (CI in the demo)
- **Kind**: One-way. No response is expected; any answer is a separate message.
- **Envelope**: Signed by the issuer, addressed to one recipient, timestamped, and encrypted in a TSP Direct message. The signature and recipient binding prevent its use as a bearer token.
- **Defined in**: [`projects/agents/src/protocol/tasks.ts:10`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agents/src/protocol/tasks.ts#L10) as `JOB_WATCH`
- **Handled in**: [`projects/agents/src/roles/ci.ts`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agents/src/roles/ci.ts), [`projects/agents/src/guard/guard.ts`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agents/src/guard/guard.ts)
- **Design**: [10.1 Types](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agents/docs/design.md#101-types) in `projects/agents/docs/design.md`

## Payload

projects/agents/src/protocol/tasks.ts:62:

```ts
export interface JobWatch {
  job: string;
  termsHash: string;
  check: CiCheck;
}
```

## Document envelope

Every Trust Task uses this envelope. Replace `payload` with the structure shown above.

Shape of a document of this type:

```json
{
  "id": "urn:uuid:…",
  "type": "https://toip.tools/spec/agents/job/watch/0.1",
  "issuer": "did:key:… (the sender)",
  "recipient": "did:key:… (the receiver)",
  "issuedAt": "2026-11-06T18:00:00.000Z",
  "payload": { … },
  "proof": {
    "type": "DataIntegrityProof",
    "cryptosuite": "eddsa-jcs-2022",
    "verificationMethod": "did:key:…#…",
    "proofPurpose": "assertionMethod",
    "proofValue": "z…"
  }
}
```

---

This is the Markdown version of https://toip.tools/spec/agents/job/watch/0.1/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
