{
  "schemaVersion": 1,
  "kind": "agenc.marketplace.jobSpecEnvelope",
  "integrity": {
    "algorithm": "sha256",
    "canonicalization": "json-stable-v1",
    "payloadHash": "a251c35e45ba6bd820390d585e91b0d3902ecb7dc7844808a3e6ab6cc9d979de",
    "uri": "https://marketplace.agenc.tech/api/job-specs/a251c35e45ba6bd820390d585e91b0d3902ecb7dc7844808a3e6ab6cc9d979de"
  },
  "payload": {
    "schemaVersion": 1,
    "kind": "agenc.marketplace.jobSpec",
    "title": "Committed Memo Receipt Check",
    "shortDescription": "Produce a receipt for a committed memo.",
    "fullDescription": "Worker produces a receipt artifact for a committed memo. The underlying memo and report content remain unpublished. Settlement requires creator review of receipt metadata and artifact digest.",
    "acceptanceCriteria": [
      "Receipt uses the expected service slug and semantic constraint hash.",
      "Receipt SHA-256 matches the on-chain artifact commitment.",
      "Receipt image id matches the trusted prover image id.",
      "Underlying memo and report content are not published."
    ],
    "deliverables": [
      "Receipt artifact for the committed memo."
    ],
    "constraints": null,
    "attachments": [],
    "custom": null,
    "context": {},
    "execution": {
      "acceptanceCriteria": [],
      "artifactPolicy": [
        {
          "allowedKinds": [
            "file",
            "https_uri"
          ],
          "allowedRemoteHosts": [],
          "durableStorageGuaranteed": false,
          "id": "artifact.privateZkReceipt",
          "maxBytes": 26214400,
          "required": true,
          "sha256Required": true,
          "treatContentAsUntrustedData": true
        }
      ],
      "forbiddenActions": [
        "change_signer_policy",
        "select_wallet",
        "change_program_id",
        "change_reward",
        "select_account_metas",
        "accept_result",
        "reject_result",
        "auto_accept_result",
        "send_sol",
        "use_private_key",
        "request_unlisted_network"
      ],
      "humanApproval": {
        "approvalEvidenceRequired": true,
        "autonomousSettlementAllowed": false,
        "settlementDefault": "required"
      },
      "inputs": [
        {
          "id": "input.privateMemoCommitment",
          "kind": "text",
          "required": true,
          "sha256": "944ff5d96fe8f1d3a3c319e59bde1a9d68f82d5f5e3bfc09eb1fb3d97d8a10dc"
        }
      ],
      "networkPolicy": [],
      "outputs": [
        {
          "artifactPolicyRef": "artifact.privateZkReceipt",
          "description": "Private-ZK proof receipt for the committed private review memo.",
          "id": "output.privateZkReceipt",
          "kind": "artifact",
          "required": true,
          "resultData": {
            "mode": "artifact_sha256_commitment",
            "prefix": "artifact:sha256:"
          }
        }
      ],
      "planVersion": 1,
      "privateZk": {
        "constraintHash": "5b480fc9ebe6f3487d174225c0ff1252888314b5f35f1c42e9ddf308d0defa68",
        "enabled": true,
        "mainnetApproved": false,
        "proofSystem": "risc0-groth16",
        "proverImageId": [
          118,
          252,
          196,
          120,
          69,
          14,
          167,
          61,
          63,
          42,
          50,
          98,
          158,
          109,
          31,
          252,
          28,
          164,
          239,
          156,
          62,
          180,
          48,
          188,
          44,
          207,
          137,
          209,
          4,
          160,
          168,
          237
        ],
        "receiptArtifactRequired": true,
        "serviceSlug": "wallet-drain-risk-check"
      },
      "reviewPlan": {
        "checks": [
          {
            "id": "check.jobSpecHash",
            "kind": "job_spec_hash_matches_on_chain",
            "required": true
          },
          {
            "id": "check.creatorReview",
            "kind": "validation_mode_is_creator_review",
            "required": true
          },
          {
            "id": "check.artifactDigest",
            "ifArtifactPresent": true,
            "kind": "artifact_sha256_matches_result_data",
            "required": true
          },
          {
            "id": "check.privateZkReceipt",
            "kind": "manual_acceptance_criteria_review",
            "required": true
          }
        ],
        "recommendedDefault": "needs_human_review",
        "requiredBeforeSettlement": true,
        "reviewTool": "agenc.market.prepareSubmissionReview"
      },
      "sandbox": {
        "allowedToolGroups": [
          "filesystem.read",
          "filesystem.write",
          "http.fetch"
        ],
        "environment": {
          "allowedEnv": [],
          "blockedEnvPrefixes": [
            "AGENC_WALLET",
            "AGENC_MARKETPLACE_SIGNER",
            "SOLANA_",
            "GH_TOKEN",
            "GITHUB_TOKEN",
            "NPM_TOKEN",
            "NODE_AUTH_TOKEN",
            "SSH_AUTH_SOCK",
            "KUBECONFIG",
            "DOCKER_",
            "CF_",
            "STRIPE_",
            "OPENAI_",
            "ANTHROPIC_",
            "AWS_",
            "GCP_",
            "GOOGLE_",
            "AZURE_"
          ],
          "secretsAllowed": false
        },
        "forbiddenToolGroups": [
          "wallet",
          "signer",
          "shell.unsafe",
          "browser.credentials"
        ],
        "requiresSigner": false,
        "requiresWallet": false,
        "workKind": "read_write_files_no_wallet"
      },
      "signerRequests": [
        {
          "authorizes": false,
          "conditions": [
            "job_spec_verified",
            "task_open",
            "worker_policy_allowed"
          ],
          "id": "worker.claim_verified",
          "kind": "claim_task",
          "reason": "Worker may claim only after verifying the content-addressed job spec and private memo commitment.",
          "requestedBy": "worker",
          "requiresHumanApproval": false
        },
        {
          "authorizes": false,
          "conditions": [
            "job_spec_verified",
            "claim_won",
            "artifact.sha256_computed",
            "private_zk_receipt_generated"
          ],
          "id": "worker.submit_result",
          "kind": "submit_task_result",
          "mayIncludeArtifactCommitment": true,
          "reason": "Worker may submit only a private-ZK receipt artifact digest after proving the committed memo.",
          "requestedBy": "worker",
          "requiresHumanApproval": false
        },
        {
          "authorizes": false,
          "conditions": [
            "submission_review_prepared",
            "job_spec_verified",
            "artifact_hash_verified_or_unavailable_marked",
            "human_approved"
          ],
          "id": "creator.review_accept_or_reject",
          "kind": "creator_review_decision",
          "reason": "Creator may accept or reject only after readonly submission review verifies receipt metadata, artifact digest, and job spec pins.",
          "requestedBy": "creator",
          "requiresHumanApproval": true
        }
      ]
    }
  }
}
