Skip to main content

Task Required context API

Use the authenticated app tRPC client with current Anydayway access and Task permission. Include the selected organizationId with every call. These methods serve Organization Tasks. The owner-only Personal methods are described below. Cross-Organization research is excluded.

Attach an observed original​

  1. Open the Task's research context with knowledge.openTaskResearch({taskId, organizationId}). Read the original through documents.getJournal or documents.getSource with that Task binding. Keep its contentVersion, policyStamp and any original section or UTF-8 byte locators.
  2. Call taskRequiredContext.list({taskId, organizationId}) for the current requirements version. Listing does not establish readiness.
  3. A Member with Task edit permission calls taskRequiredContext.attach with that expectedVersion, the observed reference and optional note (up to 256 characters). Do not replace an old evidence stamp with a newly fetched stamp without reviewing the newly displayed evidence.
{
"organizationId": "your-organization-id",
"taskId": "your-task-id",
"expectedVersion": 1,
"reference": {
"kind": "journal",
"journalId": "observed-journal-id",
"contentVersion": 3,
"policyStamp": "policy-sha256:<64 hexadecimal characters>"
}
}

A Journal reference can include an observed sectionId. A Source reference uses kind: "source", sourceId, its sha256: content version, policyStamp, startByte and endByte. Select a complete positive window of at most 8,192 UTF-8 bytes. Missing or stale policy stamps return CONFLICT: reopen and review the original before retrying. The response identifies the slot by referenceId and returns the updated version, requiredVersion and status.

list accepts limit (1–16), maxBytes (4,096–32,768) and continuation. Continue the same request until the cursor is null. Unavailable cards withhold target details; their slots remain. At most 16 references of each active status can be designated. Organization-private and person-specific originals cannot become shared Task evidence.

propose accepts the same selection for Member review. A proposal does not become mandatory until a Member calls confirm with taskId, referenceId and the latest expectedVersion. replace takes those identifiers, the replacement observed reference and optional note. remove removes a required slot; dismiss dismisses a proposal. These Member decisions also require current Task permission.

Check and verify changes​

Call taskRequiredContext.readiness({taskId, organizationId}). It reads all explicit prerequisites through the Task's shared research allowance and returns checkId, state (available or blocked), per-reference states (available, missing, changed, conflicting), gaps and affected actions. Availability records a service read; it does not establish comprehension or complete research coverage.

A changed Source qualification, publication, Journal parent path or access policy can invalidate readiness even when its text or numeric revision is unchanged. Inspect the returned current evidence, adjust the work, then check again with verifyCheckId from the immediately preceding result. This verifies the observed change, not an instruction conflict. Legacy receipts also require fresh verification. Task completion checks current evidence again at the write boundary.

Use reportConflict({taskId, organizationId, referenceId, message}) for conflicting Task instructions (message: 1–512 characters). Only a Member can call resolveConflict({taskId, organizationId, conflictId, clarification}) with a 1–512 character clarification. status returns known blockers without a new original-read check. Provisional preparation can continue while affected actions wait. External systems must enforce the returned action restrictions themselves.

Personal Task context​

Use the authenticated owner's current browser session and eligible Anydayway access. Call personalTaskContext.research({taskId}) for the Task's saved Personal research context. It has taskId: null, direct User ownership and no Organization selection. Repeated requests and new browser sessions retain the same Task allowance. Use that researchContextId with personalDocuments.getJournal or personalDocuments.getSource to inspect exact original evidence.

personalTaskContext.list({taskId}) returns the current version, requiredVersion, direct ownership, research binding and bounded reference cards. Its limit, maxBytes and continuation follow the limits above. A cursor is bound to the current owner session, Task, research and requirements revision. Restart the list if it expires or the selection changes. Cancelled or exhausted research returns restricted reference slots and a gaps reason so the owner can manage prerequisites without exposing original details.

The Personal methods accept no organizationId:

  • attach and propose: taskId, expectedVersion, observed reference and an optional note. Include the original policyStamp. The same Source-window and version rules apply as for Organization references.
  • confirm, remove and dismiss: taskId, referenceId, expectedVersion. Confirmation refuses changed evidence; inspect the current original before submitting a new selection. Removed and dismissed records are retained.
  • replace: taskId, referenceId, expectedVersion, the replacement observed reference and optional note.
  • check: taskId and optional verifyCheckId from the immediately preceding result. It reads all confirmed prerequisites, rather than just the current card page, and returns the readiness contract above.
  • report: taskId, confirmed referenceId, and a 1–512 character message.
  • clarify: taskId, conflictId, and a 1–512 character clarification.
  • status: taskId; returns known blockers without another original-read check.

Only the owner can confirm, replace, remove or dismiss prerequisites and clarify conflicts. A freshly consented Personal Agent can read/check, propose evidence and report conflicts for its currently assigned Tasks through Personal Agent MCP, with independent Task and knowledge grants. Retained references naming an old Personal Organization remain unavailable until the owner replaces them with current direct-owner evidence. A changed Journal section can follow a unique recorded extraction while its originals and extraction history remain current; missing or ambiguous matches require replacement.

Use personalKnowledge.getUsage, setBudget and cancelResearch with the saved researchContextId for allocation controls. Renewal preserves accounted usage and invalidates prior checks. Completion also refuses a changed original, expired check, cancelled or renewed allocation, changed request or Brief, revoked owner session, lost sponsorship, or changed Personal content generation. No caller can submit a private completion proof or an available boolean to bypass these checks. A simultaneous request change and completion must be saved and reviewed as separate actions when confirmed prerequisites exist.

Owner controls stay in the browser API. The assigned-Task read/check/proposal/conflict methods also have explicit Personal Agent MCP bindings under fresh Task and knowledge consent. Personal task-assignment consent alone still enables neither execution nor automatic Deliveries.

See Plan work in Anydayway, Journal evidence API and Task context MCP tools.