{
  "schemaVersion": "1.0",
  "title": "Run the Cal.diy connector quickstart",
  "description": "In this tutorial, you will start the repository's deterministic Cal.diy fleet path and route one signed cap:caldiy:profile.get action from aipctl, through product-neutral aipd, to the standalone aip-host-cal-diy process.",
  "canonical": "https://getaip.org/docs/connectors/cal-diy/getting-started/quickstart",
  "route": "/docs/connectors/cal-diy/getting-started/quickstart",
  "source": "docs/connectors/cal-diy/getting-started/quickstart.md",
  "protocol": "Agent Interoperability Protocol",
  "protocolVersion": "1.0",
  "section": "Connectors",
  "documentType": "Connector",
  "language": "en",
  "downloads": {
    "md": "/docs/download/connectors/cal-diy/getting-started/quickstart.md",
    "txt": "/docs/download/connectors/cal-diy/getting-started/quickstart.txt",
    "json": "/docs/download/connectors/cal-diy/getting-started/quickstart.json",
    "pdf": "/docs/download/connectors/cal-diy/getting-started/quickstart.pdf"
  },
  "content": {
    "format": "text/markdown",
    "markdown": "---\ntitle: Run the Cal.diy connector quickstart\ndescription: Route one signed profile read through the deterministic Cal.diy standalone-host topology\nkind: tutorial\naudience: application-developer\nappliesTo: \"1.x\"\nwritingStandard: \"aip-docs/1.0\"\nlastReviewedRevision: \"97be86e9efedf07ecf1783b03800f683f107fb04\"\nconnector: cal-diy\n---\n\n# Run the Cal.diy connector quickstart\n\nIn this tutorial, you will start the repository's deterministic Cal.diy fleet\npath and route one signed `cap:cal_diy:profile.get` action from `aipctl`, through\nproduct-neutral `aipd`, to the standalone `aip-host-cal-diy` process.\n\nThe provider is a controlled local fixture. You do not need a Cal.diy account\nor credential, and the procedure does not call an external Cal.diy service.\nThis is a learning exercise, not a production deployment or qualification run.\n\n## What you will verify\n\nBy the end, you will have observed:\n\n- source-derived local images and connector release identities;\n- registry admission before the Cal.diy host starts;\n- a healthy account-specific host registered for one tenant;\n- one signed, low-risk Cal.diy profile read with a completed result;\n- the same durable action state through a second `aipd` replica;\n- cleanup limited to the named tutorial Compose project.\n\nYou will not test a provider mutation, approval, webhook, restart, failover,\nexternal service, or production security boundary.\n\n## Prerequisites\n\nYou need:\n\n- a clean `aip-core` checkout at the reviewed source revision;\n- Docker Engine, Docker Compose v2, and BuildKit;\n- enough CPU, memory, and disk for the source-owned fleet images;\n- TCP port `18443` free on loopback;\n- a POSIX-compatible shell and `lsof`.\n\nRun every command from the `aip-core` repository root. Image preparation builds\nthe gateway, control plane, fixtures, and product hosts, so the first run can\ntake substantially longer than a native single-process example.\n\nThe Compose project name is fixed as `aip-connector-fleet-qualification`. Do\nnot continue if another investigation or retained qualification run owns that\nproject or its volumes.\n\n## 1. Verify the source boundary\n\nSet and verify the reviewed revision:\n\n```sh\nexport AIP_SOURCE_REVISION=97be86e9efedf07ecf1783b03800f683f107fb04\n\ntest \"$(git rev-parse HEAD)\" = \"$AIP_SOURCE_REVISION\"\ntest -z \"$(git status --porcelain)\"\n```\n\nBoth checks must exit with status `0`. Use a separate clean checkout if you\nhave local work; do not hide or discard changes to satisfy the preflight.\n\nConfirm that Docker and Compose are available:\n\n```sh\ndocker info >/dev/null\ndocker compose version\n```\n\nConfirm that the fixed edge port is unused:\n\n```sh\nif ! command -v lsof >/dev/null; then\n  echo \"lsof is required for the port preflight\" >&2\n  exit 1\nfi\n\nif lsof -nP -iTCP:18443 -sTCP:LISTEN | grep -q .; then\n  echo \"Port 18443 is already in use\" >&2\n  exit 1\nfi\n```\n\nExpected result: the port check prints nothing and exits with status `0`.\nIdentify an existing listener before changing it; this tutorial does not\nauthorize stopping an unrelated process.\n\n## 2. Prepare source-derived images\n\nRun the repository preparation script:\n\n```sh\n./deploy/connector-fleet/prepare.sh\ntest -s deploy/connector-fleet/.env.qualification\n```\n\nExpected result: preparation ends with `connector fleet preparation: PASS` and\nthe generated environment file contains the exact local source, image, and\nconnector release identities used by Compose.\n\nThe file contains fixture identities, not a production admission package or a\nCal.diy credential.\n\nDefine a helper that always selects the source-owned file, environment, and\nproduct profile:\n\n```sh\ncompose() {\n  docker compose \\\n    --profile products \\\n    --env-file deploy/connector-fleet/.env.qualification \\\n    -f deploy/connector-fleet/compose.yml \\\n    \"$@\"\n}\n```\n\nInspect the fixed project before starting it:\n\n```sh\ncompose ps --all\n```\n\nStop here if the command reveals resources you need to retain. Do not run\ncleanup merely because the project already exists.\n\n## 3. Start the Cal.diy path\n\nStart the Cal.diy host and the dependencies declared by the Compose graph:\n\n```sh\ncompose up --detach --wait --wait-timeout 300 cal-acme-a\n```\n\nExpected result: the command exits with status `0`. The dependency graph starts\nPostgreSQL, identity and policy initialization, registry admission, the\nlifecycle control plane, the TLS edge, two product-neutral gateway replicas,\nthe controlled product upstream, and `cal-acme-a`.\n\nInspect one-shot and long-running services:\n\n```sh\ncompose ps --all\n```\n\nThe Cal.diy host, both gateways, control plane, edge, PostgreSQL, and product\nfixture should be running and healthy. Initialization and admission jobs may be\nexited with status `0`; that is their successful terminal state.\n\nDo not bypass a failed admission job or start the host outside its declared\nidentity. Preserve the failed job's logs and correct the source-owned input.\n\n## 4. Call the Cal.diy profile capability\n\nRun `aipctl` inside the isolated network with the generated client identity and\ntrust material:\n\n```sh\ncompose run --rm --no-deps \\\n  --entrypoint /usr/local/bin/aipctl \\\n  -e AIPCTL_NATIVE_PRINCIPAL_ID=service:aipctl:qualification-acme \\\n  -e AIPCTL_NATIVE_TRUST_DOMAIN=fleet.test \\\n  -e AIPCTL_NATIVE_SIGNING_SEED_FILE=/fleet-state/secrets/client-acme-signing-seed.hex \\\n  -e AIPCTL_NATIVE_PEER_DID_FILE=/fleet-state/public/gateway.did \\\n  -e AIPCTL_NATIVE_TLS_CA_FILE=/caddy-data/caddy/pki/authorities/local/root.crt \\\n  qualification action call \\\n  https://aipd.fleet.test:8443 \\\n  cap:cal_diy:profile.get \\\n  --action-id act_cal_diy_quickstart_001 \\\n  --input '{}'\n```\n\nExpected result: the response identifies\n`act_cal_diy_quickstart_001`, names\n`cap:cal_diy:profile.get`, and reports a completed action result. Its output is\nthe deterministic profile returned by the controlled upstream.\n\nThis proves the configured local path through signature verification, tenant\nrouting, standalone host execution, and result persistence. It does not prove\nthat a real Cal.diy deployment accepts the same credential or payload.\n\n## 5. Read the durable result through the second gateway\n\nQuery the stored action through `aipd-b` without repeating the provider call:\n\n```sh\ncompose run --rm --no-deps \\\n  --entrypoint /usr/local/bin/aipctl \\\n  -e AIPCTL_NATIVE_PRINCIPAL_ID=service:aipctl:qualification-acme \\\n  -e AIPCTL_NATIVE_TRUST_DOMAIN=fleet.test \\\n  -e AIPCTL_NATIVE_SIGNING_SEED_FILE=/fleet-state/secrets/client-acme-signing-seed.hex \\\n  -e AIPCTL_NATIVE_PEER_DID_FILE=/fleet-state/public/gateway.did \\\n  -e AIPCTL_NATIVE_TLS_CA_FILE=/caddy-data/caddy/pki/authorities/local/root.crt \\\n  -e AIPCTL_NATIVE_BEARER_TOKEN_FILE=/fleet-state/secrets/native-bearer-token \\\n  qualification action status \\\n  https://aipd-b.fleet.test:8443 \\\n  act_cal_diy_quickstart_001 \\\n  --include-result \\\n  --include-receipts\n```\n\nExpected result: the lifecycle view contains the same action and capability,\nreports a terminal completed result, and includes the stored output. This\ndemonstrates shared durable lookup; it is not a gateway failover test.\n\n## 6. Verify the tutorial outcome\n\nRequire the named product host and both gateway replicas to remain running:\n\n```sh\ntest \"$(compose ps --status running --services | grep -cx 'cal-acme-a')\" -eq 1\ntest \"$(compose ps --status running --services | grep -Ec '^aipd(-b)?$')\" -eq 2\n```\n\nRepeat a non-mutating status lookup through the first gateway:\n\n```sh\ncompose run --rm --no-deps \\\n  --entrypoint /usr/local/bin/aipctl \\\n  -e AIPCTL_NATIVE_PRINCIPAL_ID=service:aipctl:qualification-acme \\\n  -e AIPCTL_NATIVE_TRUST_DOMAIN=fleet.test \\\n  -e AIPCTL_NATIVE_SIGNING_SEED_FILE=/fleet-state/secrets/client-acme-signing-seed.hex \\\n  -e AIPCTL_NATIVE_PEER_DID_FILE=/fleet-state/public/gateway.did \\\n  -e AIPCTL_NATIVE_TLS_CA_FILE=/caddy-data/caddy/pki/authorities/local/root.crt \\\n  -e AIPCTL_NATIVE_BEARER_TOKEN_FILE=/fleet-state/secrets/native-bearer-token \\\n  qualification action status \\\n  https://aipd.fleet.test:8443 \\\n  act_cal_diy_quickstart_001 \\\n  --include-result >/dev/null\n```\n\nAll commands must exit with status `0`. You have now completed the tutorial's\nsingle learning outcome: one signed Cal.diy read crossed the admitted\nstandalone-host boundary and remained durably observable.\n\n## Diagnose before cleanup\n\nIf any step fails, capture bounded state first:\n\n```sh\ncompose ps --all\ncompose logs --no-color --tail 200 \\\n  aipd aipd-b control-plane cal-acme-a product-upstream\n```\n\n| Symptom | Check |\n|---|---|\n| Preparation cannot reach Docker | Repair the daemon, then repeat the source and project checks |\n| Port `18443` is occupied | Identify the owner; do not terminate it without confirming scope |\n| Admission exits nonzero | Read that job's bounded log; do not bypass the package or trust policy |\n| Cal.diy host is unhealthy | Check its declared dependencies, identity, database, and provider fixture |\n| Signed action is rejected | Keep the generated principal, key, peer DID, CA, and tenant unchanged |\n| Second lookup fails | Preserve both gateway and PostgreSQL logs before changing shared state |\n\nThis tutorial does not authorize regenerating identities, deleting the\ndatabase, weakening TLS, or replacing admission with manual host startup as a\nrepair.\n\n## Stop and remove the tutorial project\n\nOnly after confirming that the fixed project contains no evidence or state you\nmust retain, remove its containers, network, and volumes:\n\n```sh\ncompose down --volumes --remove-orphans --timeout 30\ntest -z \"$(compose ps --all --quiet)\"\n```\n\nThe first command permanently deletes the named project's PostgreSQL state,\ngenerated keys, and retained evidence. It does not prune unrelated containers,\nimages, volumes, or build cache. Any broader cleanup requires a separate scope\ndecision.\n\n## What to do next\n\n- Read the [Cal.diy connector overview](../README.md) for supported families and\n  safety boundaries.\n- Use the [fleet quickstart](../../../getting-started/connector-fleet-quickstart.md)\n  to understand the cross-connector learning path.\n- Follow [Deploy the connector fleet](../../../guides/deploy-connector-fleet.md)\n  only after production admission material and identities exist.\n- Use [connector fleet qualification](../../../testing/connector-fleet-qualification.md)\n  for failure, restart, isolation, and evidence claims.\n- Read the [historical isolated-live report](../../../testing/cal-diy-isolated-live.md)\n  before interpreting external Cal.diy evidence.\n",
    "text": "Run the Cal.diy connector quickstart\n\nIn this tutorial, you will start the repository's deterministic Cal.diy fleet\npath and route one signed cap:caldiy:profile.get action from aipctl, through\nproduct-neutral aipd, to the standalone aip-host-cal-diy process.\n\nThe provider is a controlled local fixture. You do not need a Cal.diy account\nor credential, and the procedure does not call an external Cal.diy service.\nThis is a learning exercise, not a production deployment or qualification run.\n\nWhat you will verify\n\nBy the end, you will have observed:\n• source-derived local images and connector release identities;\n• registry admission before the Cal.diy host starts;\n• a healthy account-specific host registered for one tenant;\n• one signed, low-risk Cal.diy profile read with a completed result;\n• the same durable action state through a second aipd replica;\n• cleanup limited to the named tutorial Compose project.\n\nYou will not test a provider mutation, approval, webhook, restart, failover,\nexternal service, or production security boundary.\n\nPrerequisites\n\nYou need:\n• a clean aip-core checkout at the reviewed source revision;\n• Docker Engine, Docker Compose v2, and BuildKit;\n• enough CPU, memory, and disk for the source-owned fleet images;\n• TCP port 18443 free on loopback;\n• a POSIX-compatible shell and lsof.\n\nRun every command from the aip-core repository root. Image preparation builds\nthe gateway, control plane, fixtures, and product hosts, so the first run can\ntake substantially longer than a native single-process example.\n\nThe Compose project name is fixed as aip-connector-fleet-qualification. Do\nnot continue if another investigation or retained qualification run owns that\nproject or its volumes.\n1. Verify the source boundary\n\nSet and verify the reviewed revision:\n\nexport AIPSOURCEREVISION=97be86e9efedf07ecf1783b03800f683f107fb04\n\ntest \"$(git rev-parse HEAD)\" = \"$AIPSOURCEREVISION\"\ntest -z \"$(git status --porcelain)\"\n\nBoth checks must exit with status 0. Use a separate clean checkout if you\nhave local work; do not hide or discard changes to satisfy the preflight.\n\nConfirm that Docker and Compose are available:\n\ndocker info >/dev/null\ndocker compose version\n\nConfirm that the fixed edge port is unused:\n\nif ! command -v lsof >/dev/null; then\n  echo \"lsof is required for the port preflight\" >&2\n  exit 1\nfi\n\nif lsof -nP -iTCP:18443 -sTCP:LISTEN | grep -q .; then\n  echo \"Port 18443 is already in use\" >&2\n  exit 1\nfi\n\nExpected result: the port check prints nothing and exits with status 0.\nIdentify an existing listener before changing it; this tutorial does not\nauthorize stopping an unrelated process.\n2. Prepare source-derived images\n\nRun the repository preparation script:\n\n./deploy/connector-fleet/prepare.sh\ntest -s deploy/connector-fleet/.env.qualification\n\nExpected result: preparation ends with connector fleet preparation: PASS and\nthe generated environment file contains the exact local source, image, and\nconnector release identities used by Compose.\n\nThe file contains fixture identities, not a production admission package or a\nCal.diy credential.\n\nDefine a helper that always selects the source-owned file, environment, and\nproduct profile:\n\ncompose() {\n  docker compose \\\n    --profile products \\\n    --env-file deploy/connector-fleet/.env.qualification \\\n    -f deploy/connector-fleet/compose.yml \\\n    \"$@\"\n}\n\nInspect the fixed project before starting it:\n\ncompose ps --all\n\nStop here if the command reveals resources you need to retain. Do not run\ncleanup merely because the project already exists.\n3. Start the Cal.diy path\n\nStart the Cal.diy host and the dependencies declared by the Compose graph:\n\ncompose up --detach --wait --wait-timeout 300 cal-acme-a\n\nExpected result: the command exits with status 0. The dependency graph starts\nPostgreSQL, identity and policy initialization, registry admission, the\nlifecycle control plane, the TLS edge, two product-neutral gateway replicas,\nthe controlled product upstream, and cal-acme-a.\n\nInspect one-shot and long-running services:\n\ncompose ps --all\n\nThe Cal.diy host, both gateways, control plane, edge, PostgreSQL, and product\nfixture should be running and healthy. Initialization and admission jobs may be\nexited with status 0; that is their successful terminal state.\n\nDo not bypass a failed admission job or start the host outside its declared\nidentity. Preserve the failed job's logs and correct the source-owned input.\n4. Call the Cal.diy profile capability\n\nRun aipctl inside the isolated network with the generated client identity and\ntrust material:\n\ncompose run --rm --no-deps \\\n  --entrypoint /usr/local/bin/aipctl \\\n  -e AIPCTLNATIVEPRINCIPALID=service:aipctl:qualification-acme \\\n  -e AIPCTLNATIVETRUSTDOMAIN=fleet.test \\\n  -e AIPCTLNATIVESIGNINGSEEDFILE=/fleet-state/secrets/client-acme-signing-seed.hex \\\n  -e AIPCTLNATIVEPEERDIDFILE=/fleet-state/public/gateway.did \\\n  -e AIPCTLNATIVETLSCAFILE=/caddy-data/caddy/pki/authorities/local/root.crt \\\n  qualification action call \\\n  https://aipd.fleet.test:8443 \\\n  cap:caldiy:profile.get \\\n  --action-id actcaldiyquickstart001 \\\n  --input '{}'\n\nExpected result: the response identifies\nactcaldiyquickstart001, names\ncap:caldiy:profile.get, and reports a completed action result. Its output is\nthe deterministic profile returned by the controlled upstream.\n\nThis proves the configured local path through signature verification, tenant\nrouting, standalone host execution, and result persistence. It does not prove\nthat a real Cal.diy deployment accepts the same credential or payload.\n5. Read the durable result through the second gateway\n\nQuery the stored action through aipd-b without repeating the provider call:\n\ncompose run --rm --no-deps \\\n  --entrypoint /usr/local/bin/aipctl \\\n  -e AIPCTLNATIVEPRINCIPALID=service:aipctl:qualification-acme \\\n  -e AIPCTLNATIVETRUSTDOMAIN=fleet.test \\\n  -e AIPCTLNATIVESIGNINGSEEDFILE=/fleet-state/secrets/client-acme-signing-seed.hex \\\n  -e AIPCTLNATIVEPEERDIDFILE=/fleet-state/public/gateway.did \\\n  -e AIPCTLNATIVETLSCAFILE=/caddy-data/caddy/pki/authorities/local/root.crt \\\n  -e AIPCTLNATIVEBEARERTOKENFILE=/fleet-state/secrets/native-bearer-token \\\n  qualification action status \\\n  https://aipd-b.fleet.test:8443 \\\n  actcaldiyquickstart001 \\\n  --include-result \\\n  --include-receipts\n\nExpected result: the lifecycle view contains the same action and capability,\nreports a terminal completed result, and includes the stored output. This\ndemonstrates shared durable lookup; it is not a gateway failover test.\n6. Verify the tutorial outcome\n\nRequire the named product host and both gateway replicas to remain running:\n\ntest \"$(compose ps --status running --services | grep -cx 'cal-acme-a')\" -eq 1\ntest \"$(compose ps --status running --services | grep -Ec '^aipd(-b)?$')\" -eq 2\n\nRepeat a non-mutating status lookup through the first gateway:\n\ncompose run --rm --no-deps \\\n  --entrypoint /usr/local/bin/aipctl \\\n  -e AIPCTLNATIVEPRINCIPALID=service:aipctl:qualification-acme \\\n  -e AIPCTLNATIVETRUSTDOMAIN=fleet.test \\\n  -e AIPCTLNATIVESIGNINGSEEDFILE=/fleet-state/secrets/client-acme-signing-seed.hex \\\n  -e AIPCTLNATIVEPEERDIDFILE=/fleet-state/public/gateway.did \\\n  -e AIPCTLNATIVETLSCAFILE=/caddy-data/caddy/pki/authorities/local/root.crt \\\n  -e AIPCTLNATIVEBEARERTOKENFILE=/fleet-state/secrets/native-bearer-token \\\n  qualification action status \\\n  https://aipd.fleet.test:8443 \\\n  actcaldiyquickstart001 \\\n  --include-result >/dev/null\n\nAll commands must exit with status 0. You have now completed the tutorial's\nsingle learning outcome: one signed Cal.diy read crossed the admitted\nstandalone-host boundary and remained durably observable.\n\nDiagnose before cleanup\n\nIf any step fails, capture bounded state first:\n\ncompose ps --all\ncompose logs --no-color --tail 200 \\\n  aipd aipd-b control-plane cal-acme-a product-upstream\n\n| Symptom | Check |\n\n| Preparation cannot reach Docker | Repair the daemon, then repeat the source and project checks |\n| Port 18443 is occupied | Identify the owner; do not terminate it without confirming scope |\n| Admission exits nonzero | Read that job's bounded log; do not bypass the package or trust policy |\n| Cal.diy host is unhealthy | Check its declared dependencies, identity, database, and provider fixture |\n| Signed action is rejected | Keep the generated principal, key, peer DID, CA, and tenant unchanged |\n| Second lookup fails | Preserve both gateway and PostgreSQL logs before changing shared state |\n\nThis tutorial does not authorize regenerating identities, deleting the\ndatabase, weakening TLS, or replacing admission with manual host startup as a\nrepair.\n\nStop and remove the tutorial project\n\nOnly after confirming that the fixed project contains no evidence or state you\nmust retain, remove its containers, network, and volumes:\n\ncompose down --volumes --remove-orphans --timeout 30\ntest -z \"$(compose ps --all --quiet)\"\n\nThe first command permanently deletes the named project's PostgreSQL state,\ngenerated keys, and retained evidence. It does not prune unrelated containers,\nimages, volumes, or build cache. Any broader cleanup requires a separate scope\ndecision.\n\nWhat to do next\n• Read the Cal.diy connector overview (../README.md) for supported families and\n  safety boundaries.\n• Use the fleet quickstart (../../../getting-started/connector-fleet-quickstart.md)\n  to understand the cross-connector learning path.\n• Follow Deploy the connector fleet (../../../guides/deploy-connector-fleet.md)\n  only after production admission material and identities exist.\n• Use connector fleet qualification (../../../testing/connector-fleet-qualification.md)\n  for failure, restart, isolation, and evidence claims.\n• Read the historical isolated-live report (../../../testing/cal-diy-isolated-live.md)\n  before interpreting external Cal.diy evidence.\n"
  },
  "integrity": {
    "algorithm": "sha256",
    "sourceDigest": "5fa07b183a75d8dcc8827a8218a5b73d79f575ce55c0903d795fcc340a7000f6"
  }
}
