01 · One small integration, with visible checkpoints
Goal: describe a read-only status.read operation for your own service. Its input is a service name; its declared output is the service name and a Boolean health flag. Start with the document below, then use the result and error examples to learn what the Helper checks.
Local example scope: source-document discovery was checked using an existing macOS Helper binary. Its exact build revision and customer distribution are unproven. Complete customer request envelopes, target binding and connected execution remain pending. The downloads alone do not reproduce the full Helper run.
02 · Contract declaration: describe intent and reference the target
The operation brief records what your service does. The CUSTOM_API document expresses that input/output shape in the supported bounded format. A product Contract is the supplier-maintained target that the Helper must match; writing a new name in JSON does not create one. The contract-reference fragment identifies the reference fields, with explicit supplier-provided placeholders. It is not a complete request and has not passed target validation.
Planning brief, not a product schema or request.
# Status read integration brief
Illustrative requirements brief; this Markdown is not a VibePackr parser input.
- Goal: read the health status of one service.
- Caller input: `service`, a string such as `catalog`.
- Result: `service` (string) and `healthy` (boolean).
- Operation: read only; no restart or configuration changes.
- Credentials: none in this offline example; do not paste tokens into the document.
- Target contract and adapter: obtain the exact supported identifiers and revisions from the supplier.
- Completion for this example: a source document is accepted for discovery. No live service is called.
Use the fragment below to understand which target values must come from the supported product package. Keep it separate from the source document; pasting these keys into status-document.json would change the input shape.
Incomplete target-reference fragment. Replace every SUPPLIER_PUBLISHED_* value only with the exact supplied reference; not a passed request.
{
"capability_id": "SUPPLIER_PUBLISHED_CAPABILITY_ID",
"contract_id": "SUPPLIER_PUBLISHED_CONTRACT_ID",
"contract_revision": "SUPPLIER_PUBLISHED_CONTRACT_REVISION",
"adapter_id": "SUPPLIER_PUBLISHED_ADAPTER_ID",
"adapter_revision": "SUPPLIER_PUBLISHED_ADAPTER_REVISION",
"operation_id": "status.read"
}
| Field | Where the value comes from |
|---|---|
capability_id / contract_id | Exact identifiers supplied for the supported integration. |
contract_revision | The supplied target revision, not your source document revision. |
adapter_id / adapter_revision | The supported adapter identity and compatible revision. |
operation_id | The operation selected from the declared source; status.read here. |
Completion check: every target reference is traceable to the supplied package. If the package supplies no target, record that missing standard input; do not create a custom Contract name to move forward.
03 · Document declaration: a complete source example
Describe a read-only status operation for your own service. The sample accepts a service name and describes two result fields: service and healthy. It is a fresh synthetic document; it does not announce support for a real provider. Download status-document.json and read the field table before changing it.
Complete source document; accepted by local discovery inside an internal test envelope. Not a complete CLI request.
{
"document_kind": "CUSTOM_API",
"protocol_revision": "1",
"operations": {
"status.read": {
"input_schema": {
"type": "object",
"properties": {
"service": {
"type": "string"
}
},
"required": [
"service"
]
},
"output_schema": {
"type": "object",
"properties": {
"service": {
"type": "string"
},
"healthy": {
"type": "boolean"
}
},
"required": [
"service",
"healthy"
]
}
}
}
}
Keep the JSON structure and protocol revision. Adapt the operation name, property names and primitive types to the service you actually own. Update every required list when you rename a property. Do not add comments or explanatory description keys to this bounded document format. JSON is case-sensitive.
04 · Field reference and common editing mistakes
| Field | Sample value | How to edit it |
|---|---|---|
document_kind | CUSTOM_API | Selects the bounded custom API document input, not an OpenAPI document. |
protocol_revision | 1 | Supported document format revision; retain this value for this sample. |
operations.status.read | operation name | Your operation identifier. It describes the source; it does not create a registered product capability. |
input_schema | service: string | Declares the values that the described operation accepts. No operation is invoked by this declaration. |
output_schema | service: string, healthy: boolean | Declares the result shape, not an observed live result. |
type | object / primitive | Each top-level schema is an object. Properties use only string, integer, number or boolean in this bounded format. |
properties | named primitive fields | Every required name must exist here. Arrays, nested objects and extra JSON Schema keywords are not supported by this example path. |
required | field-name list | Lists mandatory fields; it does not supply values. Keep names unique and present in properties. |
A schema describes possible values. It is not the actual request {"service":"demo-service"} or an observed service reply. The sample requires both output fields; a missing healthy value would not meet that declared shape.
05 · Local preparation: syntax, request envelope and result
- Download
status-document.jsoninto a new folder. Keep the original before editing a copy. - If Python 3 is available, run the syntax check below from that folder. No product or network call is made. No output and exit code 0 means JSON syntax parsed successfully.
- Inspect the fields above. A syntax check does not validate a product contract.
- Use a complete, version-matched supplier request envelope only when available. The second command is its syntax reference; the source-document download is not that envelope.
python3 -m json.tool status-document.json > /dev/nullstatus-document.json is the complete source document, not the complete CLI request. R2 reads a request envelope containing request_id, correlation_id and draft; this document occupies draft.source. The local discovery check used a separate internal envelope with deliberately unbound target references and an unexecuted fixture. Do not run r2-discover directly on status-document.json or combine fragments into a claimed valid request. The full customer request package still needs an approved target binding and distribution projection.
packr-integration-helper r2-discover request.jsonCommand shape for a supplier-provided complete request envelope. The standalone document download is not request.json. The verified local run used an internal envelope, so this line is a command reference rather than a replayable public download workflow.
Actual local output excerpt; omitted fields are not reconstructed. Not a live service response.
{
"operation": "DISCOVER",
"request_id": "example-status-discover-001",
"status": "PASSED",
"reason": "NONE",
"lifecycle_stage": "DISCOVERED"
}
PASSED with lifecycle_stage DISCOVERED means the source document was accepted for discovery. It does not validate the target contract, call status.read, test reachability or grant authority. The selected result fields are verbatim values from the local run; other envelope fields are omitted. Normalizing the deliberately unbound target returned DENIED / CONTRACT_INCOMPATIBLE.
Actual local normalization result with an intentionally unbound target.
{
"operation": "NORMALIZE",
"request_id": "example-status-discover-001",
"status": "DENIED",
"reason": "CONTRACT_INCOMPATIBLE",
"lifecycle_stage": null
}
Always inspect the JSON status and reason. R2 semantic denial can return process exit code 0. Do not build a success check that looks only at the exit code.
06 · MCP document: inspect saved observations
The MCP example is a stored initialize + tools/list transcript for the exact supported revision 2025-03-26. It uses the same status.read shapes. A bounded local discovery accepted it. This does not start an MCP server, install an agent extension or prove compatibility with an arbitrary agent. Keep the actual observed negotiated revision; changing the text cannot make a newer transcript compatible.
Synthetic stored transcript for 2025-03-26; local document discovery only. No live MCP connection.
{
"document_kind": "MCP_TRANSCRIPT",
"initialize": {
"request": {
"jsonrpc": "2.0",
"id": "example-init-1",
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": {},
"clientInfo": {
"name": "example-doc-client",
"version": "1.0"
}
}
},
"response": {
"jsonrpc": "2.0",
"id": "example-init-1",
"result": {
"protocolVersion": "2025-03-26",
"capabilities": {
"tools": {}
},
"serverInfo": {
"name": "example-status-service",
"version": "1.0"
}
}
}
},
"tools_list": {
"request": {
"jsonrpc": "2.0",
"id": "example-tools-2",
"method": "tools/list",
"params": {}
},
"response": {
"jsonrpc": "2.0",
"id": "example-tools-2",
"result": {
"tools": [
{
"name": "status.read",
"inputSchema": {
"type": "object",
"properties": {
"service": {
"type": "string"
}
},
"required": [
"service"
]
},
"outputSchema": {
"type": "object",
"properties": {
"service": {
"type": "string"
},
"healthy": {
"type": "boolean"
}
},
"required": [
"service",
"healthy"
]
}
}
]
}
}
}
}
Read it in order: initialize request → negotiated initialize response → tools/list request → described tool schemas. Matching request/response IDs identify each pair. This stored example omits a running transport; do not infer a server URL from the tool name.
Actual local output excerpt; not tools/call execution.
{
"operation": "DISCOVER",
"request_id": "example-mcp-discover-001",
"status": "PASSED",
"reason": "NONE",
"lifecycle_stage": "DISCOVERED"
}
For agent-assisted review of the same file, use the MCP observation recipe.
07 · R0 and R2 use different inputs
R0 source metadata and the R2 protocol document are different inputs. The R0 metadata fragment describes a declared endpoint and unknown observations; it does not contain the required complete R0 envelope. In the full local R0 lab, discover and normalize passed, while validate failed with ENDPOINT_UNREACHABLE because reachability was unknown. Never change unknown observation flags to true to make an example pass; obtain real bounded observations. The example.invalid endpoint is intentionally non-operational and was not contacted.
Fragment only. Unknown observations stay null; the .invalid endpoint was not contacted.
{
"schema_version": "packr.integration-helper.v1",
"integration_class": "HTTP_REST",
"source_kind": "SERVICE_METADATA",
"source_reference": "status-document.json",
"source_revision": "example-1",
"source_digest_sha256": "5844f2cce8405450a782f50a0b62210a417a5ef66139be138fa78761559440b5",
"declared_protocol": "HTTPS",
"declared_endpoint": "https://status.example.invalid/status",
"read_only": true,
"reachable": null,
"security_validated": null,
"identity_satisfied": null
}
When the supplier provides a complete R0 input, use it with the R0 command family. When a complete R2 request envelope is provided, use it with the R2 command family. Renaming one file to the other name does not convert the format.
The metadata fragment download cannot run by itself.
08 · Negative examples: diagnose, correct, recheck
| Controlled change | Observed result | Smallest useful correction |
|---|---|---|
| Add uptime to output_schema.required without defining it in properties. | DENIED / SCHEMA_INCOMPATIBLE | Add a matching primitive property if it is genuinely required, or remove uptime from required. Recheck the corrected document. |
| Add a description field to the protocol document. | DENIED / INVALID_REQUEST | Keep explanatory prose in the guide or brief; remove unsupported fields from the machine input. |
| Use unsupported MCP revision 2099-01-01. | DENIED / PROTOCOL_REVISION_MISMATCH | Use a transcript from the supported negotiated revision; do not relabel a different protocol. |
| Use a target named example.unbound.contract. | DENIED / CONTRACT_INCOMPATIBLE | Obtain the exact published target contract and adapter reference for your supported integration. This step needs product-side standardization; a new invented name does not fix it. |
Actual negative local discovery output; use with the documented mutation.
{
"operation": "DISCOVER",
"request_id": "example-status-discover-001",
"status": "DENIED",
"reason": "SCHEMA_INCOMPATIBLE",
"lifecycle_stage": null
}
Actual local parsing result, not a proposed response shape.
{
"operation": "DISCOVER",
"request_id": "UNAVAILABLE",
"status": "DENIED",
"reason": "INVALID_REQUEST",
"lifecycle_stage": null
}
Actual local output after a deliberately unsupported revision.
{
"operation": "DISCOVER",
"request_id": "example-mcp-discover-001",
"status": "DENIED",
"reason": "PROTOCOL_REVISION_MISMATCH",
"lifecycle_stage": null
}
Make one correction at a time in a copy, preserve the original result, and rerun the same supported preparation stage when its complete request package is available. Do not bypass an authority error, rename a protocol revision or assert connectivity to obtain a passing result.
09 · Mapping example: propose a correspondence
Suppose your source calls the result field service, and the approved target output calls it service_name. If both sides declare string, a rename may be represented by the supported IDENTITY transform once the exact mapping format and target are supplied. This table is a review aid, not mapping JSON.
| Source output | Target output | Review |
|---|---|---|
service: string | service_name: string | Possible rename; confirm target and requiredness. |
healthy: boolean | status: string | Different types and meaning. No Boolean-to-string transform is established by this example. |
"42": string | 42: integer | STRING_TO_INTEGER exists in the bounded reference; use only when the approved target calls for it. |
An agent can propose this table. The Helper still checks the real request. A generated scaffold marked REQUIRES_IMPLEMENTATION is not a working adapter.
10 · A useful support record without a custom integration project
Record: product/tool version (or unknown), document kind/revision, stage reached, exact status/reason, expected result, and the one field or supplied reference in question. Use the support route with a short sanitized excerpt. Keep credentials, full logs, customer payloads and internal bundles out of the request.
Ask for a missing standard deliverable: a complete versioned example package, installation instructions, supported target reference or registration procedure. A customer-specific script should not silently become the normal onboarding path.
11 · What is complete, and what still prevents self-service
| Checkpoint | Current evidence |
|---|---|
| Document authoring | Complete CUSTOM_API and MCP source examples, explained fields and downloads. |
| Local source discovery | Positive and negative observations on an existing local binary; exact build identity unproven. |
| Copy-and-run product preparation | Pending complete public request envelope, target package and customer installation. |
| Registration and execution | Not performed; preparation does not confer execution authority. |
| AI and customer E2E | Separate setup and connected verification remain pending. |
For a self-service success route, publish a versioned complete request package with supported target references, an approved customer Helper installation path and independently tested preparation results. This research closes the concrete document example gap, not those product delivery gaps.