{
  "$schema": "https://json.schemastore.org/package.json",
  "contract": "fl03:shepherd@6.7.0",
  "adapter": "pi",
  "extension": "./src/extension.mjs",
  "provider": {
    "capability": "orchestration-provider",
    "requiredCapabilities": ["dispatch_once"],
    "selection": "operator-selected-explicit-capability-facts",
    "legacyDenyOnlyToolNames": ["subagent", "fabric_exec"],
    "publicApi": "explicit adapter capabilities plus pi.getAllTools() and an isolated real-process launch method",
    "requiredProviderMethod": "launch",
    "remediation": "Pi orchestration provider unavailable. Configure an operator-selected Native-bound adapter that explicitly provides dispatch_once, a launch method, and a registered tool identity; installing a host tool alone is insufficient.",
    "probeAt": "session_start",
    "includesInactiveTools": true,
    "failClosedForOrchestrationWhenAbsentOrMalformed": true
  },
  "component": {
    "moduleEnv": "SHEPHERD_COMPONENT_MODULE",
    "requiredExports": [
      "canonicalProfile",
      "compileCanonical",
      "measure",
      "guardEvalCanonical",
      "normalizeIdentity",
      "planLifecycle",
      "evaluateProvider",
      "validateResponse",
      "validateNativeResponse",
      "validateNativeExchange",
      "validatePendingDispatch",
      "validateLoadedCarrier",
      "validateReviewResult",
      "validateReviewRuling",
      "validateReviewCustody",
      "validateProfileLease",
      "validateLoadedProfile",
      "validateSkillUseChallenge",
      "validateLoadedSkill",
      "runtimeAuthority"
    ]
  },
  "hooksDispatchModel": "Pi loads src/extension.mjs once. At session_start it verifies the operator-selected adapter's explicit identity, dispatch_once capability, launch method, and exact registered tool through pi.getAllTools(); no provider brand or tool name is inferred. Native Shepherd remains the only process and lifecycle authority. The legacy subagent and fabric_exec names remain guarded when unselected so raw host orchestration cannot bypass denial. Provider objects, hook JSON, session files, and parent observers cannot activate or stop children. Missing or conflicting configured-adapter metadata and an unobserved selected tool produce the declared configuration remediation; an unselected raw orchestration call is denied as an unsupported handoff. Ordinary mutation remains governed independently by Component and Native identity checks.",
  "hooks": {
    "session_start": {
      "canonicalEvent": "SessionStart|SubagentStart",
      "surface": "pi.on",
      "behavior": "verifies one operator-selected adapter's explicit provider, dispatch_once, launch, and exact registered-tool facts, then binds a root session or completes the broker child start exchange for the registered process; adapter failures leave orchestration blocked without replacing ordinary mutation governance",
      "guardedTools": []
    },
    "message_end": {
      "canonicalEvent": "SubagentStop",
      "surface": "pi.on",
      "behavior": "attempts one exact broker completion for a child-local terminal assistant message; no parent status or path is accepted",
      "guardedTools": []
    },
    "tool_call": {
      "canonicalEvent": "PreToolUse",
      "surface": "pi.on",
      "behavior": "blocks selected or legacy raw orchestration calls when their exact adapter is unavailable, then independently resolves Native identity and evaluates the Component guard for ordinary mutations; child lifecycle data never comes from hook JSON or session files",
      "guardedTools": [
        "write",
        "edit",
        "bash"
      ]
    },
    "session_shutdown": {
      "canonicalEvent": "SubagentStop",
      "surface": "pi.on",
      "behavior": "performs one exact broker completion for the registered child and never accepts caller status, path, or report booleans",
      "guardedTools": []
    }
  },
  "transitions": {
    "start": "native-broker-start-register-child-connect-claim-activate",
    "resume": "native-broker-start-register-child-connect-claim-activate",
    "stop": "native-broker-child-event-complete"
  },
  "hostDiagnostics": {
    "surface": "ExtensionContext.ui.notify(message, level)",
    "authority": "diagnostic only; never changes a dispatch or guard decision",
    "durability": "run-scoped files remain the durable coordination authority"
  },
  "projectBinding": {
    "tool": "shepherd_project_bind",
    "source": "native run list/show plus root binding",
    "filesystemIdentity": "SHEPHERD_PROJECT_FILESYSTEM_ID is rechecked before mutation"
  }
}
