{
  "$schema": "./package-envelope-profile.v1.schema.json",
  "contractVersion": "1.0.0",
  "topic": "portable-package-safe-reader-signature-envelope",
  "availability": "contract_only",
  "authority": {
    "decisionRecord": "RFC-005",
    "currentDecisionOwnerPlan": "12",
    "humanSpecPath": "Report_Doc/docs/specification/serialization-and-files.md",
    "machineProfilePath": "Report_Doc/docs/public/contracts/package-envelope-profile.v1.json",
    "machineProfileSchemaPath": "Report_Doc/docs/public/contracts/package-envelope-profile.v1.schema.json",
    "diagnosticProfilePath": "Report_Doc/docs/public/contracts/type-diagnostic-profile.v1.json"
  },
  "container": {
    "physicalForm": "zip-compatible-archive",
    "packageExtensions": [
      ".pxreport",
      ".pxproject",
      ".pxcomponent"
    ],
    "nonContainerExtension": ".pxflow",
    "entryKinds": [
      {
        "kind": "mimetype",
        "reserved": true,
        "inContentClosure": false,
        "purpose": "physical container marker that never replaces a schema version"
      },
      {
        "kind": "manifest",
        "reserved": true,
        "inContentClosure": false,
        "purpose": "declares the exact path, bytes and digest wire for every content entry"
      },
      {
        "kind": "content",
        "reserved": false,
        "inContentClosure": true,
        "purpose": "manifested root artifact, dependency, SDK source, asset, evidence and selected snapshot bytes"
      },
      {
        "kind": "detachedSignature",
        "reserved": true,
        "inContentClosure": false,
        "purpose": "optional detached signature that exists only when policy approves it"
      }
    ],
    "reservedEnvelopeEntryKinds": [
      "mimetype",
      "manifest",
      "detachedSignature"
    ],
    "contentEntryKind": "content",
    "manifestEntryMembers": [
      "path",
      "bytes",
      "digest"
    ],
    "packageManifestAllowedMembers": [
      "schemaVersion",
      "packageKind",
      "publisher",
      "packageKey",
      "packageVersion",
      "requiredFeatures",
      "requiredContractVersion",
      "capabilities",
      "pythonDependencies",
      "projectSnapshot",
      "entries"
    ],
    "packageManifestRequiredMembers": [
      "schemaVersion",
      "packageKind",
      "publisher",
      "packageKey",
      "packageVersion",
      "requiredFeatures",
      "requiredContractVersion",
      "entries"
    ],
    "optionalEmptyCollectionWire": {
      "members": [
        "capabilities",
        "pythonDependencies"
      ],
      "acceptedEmptyRepresentations": [
        "absent",
        "explicit-empty-array"
      ],
      "decodedValue": "empty-array",
      "canonicalSerialization": "member-omitted"
    },
    "projectManifestMembers": [
      "schemaVersion",
      "packageKind",
      "publisher",
      "packageKey",
      "packageVersion",
      "requiredFeatures",
      "requiredContractVersion",
      "projectSnapshot",
      "entries"
    ],
    "zipCompression": {
      "allowedMethods": [
        "stored",
        "deflated"
      ],
      "namedThirdMethodCase": "bzip2",
      "otherMethodRefusal": "encrypted-or-unsupported-entry"
    },
    "projectSnapshot": {
      "requiredForPackageKind": "project",
      "forbiddenForPackageKinds": [
        "flow",
        "report",
        "component"
      ],
      "members": [
        "snapshotRevisionRef",
        "copiedDocuments",
        "settingsSnapshot",
        "dependencySnapshots",
        "controlPlaneReferences"
      ],
      "copyMembers": [
        "path",
        "revisionRef"
      ],
      "controlPlaneReferenceMembers": [
        "kind",
        "targetRef",
        "revisionRef"
      ],
      "controlPlaneReferenceKinds": [
        "history",
        "comment",
        "output-revision",
        "execution-record"
      ],
      "copyRoles": [
        "document",
        "settings",
        "dependency"
      ],
      "referenceRoles": [
        "history",
        "comment",
        "output-revision",
        "execution-record"
      ],
      "consistencyRule": "all copied revisions and control-plane revision references are selected by one snapshotRevisionRef authority read"
    },
    "rootKinds": [
      "flow",
      "report",
      "component"
    ],
    "identityExcludedPhysicalTraits": [
      "archive-entry-order",
      "compression-metadata"
    ],
    "digest": {
      "algorithm": "sha256",
      "jsonEntryPreimage": "rfc8785-jcs-semantic-bytes",
      "binaryEntryPreimage": "exact-uncompressed-bytes"
    },
    "separateVersionAxes": [
      "container-format-version",
      "entry-schema-version",
      "function-component-version",
      "runtime-version"
    ],
    "rules": [
      "a content entry never hashes the manifest that declares it",
      "the detached signature entry is never part of the content closure",
      "the same logical package has one manifest revision and one content-entry closure regardless of physical storage",
      "a Project copies document, settings and dependency snapshot bytes while history, comments, output revisions and execution records remain pinned control-plane references"
    ]
  },
  "safeReader": {
    "openIsInspectionOnly": true,
    "executesEmbeddedCodeOnOpen": false,
    "signatureBypassesAuthorization": false,
    "rejectedConditions": [
      "path-traversal",
      "absolute-path",
      "nul-byte-in-path",
      "excessive-path-depth",
      "duplicate-normalized-path",
      "symlink-or-hardlink-entry",
      "encrypted-or-unsupported-entry",
      "oversized-entry",
      "compression-bomb",
      "unsupported-required-feature",
      "unmanifested-content-entry",
      "missing-manifested-entry",
      "entry-digest-mismatch"
    ],
    "unsupportedVersionDiagnostic": "PX_SCHEMA_UNSUPPORTED_VERSION",
    "unsupportedVersionBehavior": "read-only-recovery",
    "unknownCoreFieldBehavior": "reject",
    "unknownOptionalEntryBehavior": "preserve-without-silent-drop",
    "unknownRequiredFeatureBehavior": "reject-and-open-read-only",
    "forbiddenDiagnosticContent": [
      "host-absolute-path",
      "archive-entry-bytes"
    ],
    "limits": {
      "entryCountMax": 2000,
      "compressedTotalMax": 200,
      "expandedTotalMax": 512,
      "singleEntryMax": 100,
      "compressionRatioMax": 100,
      "pathDepthMax": 20
    },
    "limitUnits": {
      "entryCountMax": "entries",
      "compressedTotalMax": "MB",
      "expandedTotalMax": "MB",
      "singleEntryMax": "MB",
      "compressionRatioMax": "to-one",
      "pathDepthMax": "path-segments"
    },
    "limitPurpose": "attack-defense",
    "productSizeTier": "single-report-or-project-package-authored-by-one-team",
    "bulkArchiveSupported": false,
    "limitsAreV1CapacityPromise": false,
    "totalLimitRejectionReason": {
      "appliesTo": [
        "compressedTotalMax",
        "expandedTotalMax"
      ],
      "reason": "compression-bomb",
      "distinguishesRatioAttackFromTotalSizeOverrun": false
    }
  },
  "packageIdentityDigests": {
    "algorithm": "sha256",
    "implementationState": "projection-contract-only",
    "framing": "length-prefixed-fields",
    "commonPreimage": {
      "source": "container-signature-preimage",
      "fields": [
        "canonical-manifest-core",
        "ordered-content-entry-closure"
      ],
      "entryOrdering": "path-ascending",
      "entryFields": [
        "path",
        "expandedSize",
        "digest"
      ]
    },
    "domainProjections": [
      {
        "name": "byteDigest",
        "additionalFields": [
          "ordered-content-entry-exact-uncompressed-bytes"
        ]
      },
      {
        "name": "semanticDigest",
        "additionalFields": [
          "ordered-content-entry-semantic-projections",
          "ordered-binary-entry-exact-uncompressed-bytes"
        ]
      },
      {
        "name": "executionDigest",
        "additionalFields": [
          "ordered-executable-entry-explicit-execution-projections",
          "resolved-required-feature-set"
        ]
      }
    ],
    "physicalTraitsExcludedFromIdentity": [
      "archive-entry-order",
      "compression-metadata"
    ]
  },
  "storageBaseline": {
    "objectUnit": "whole-object",
    "address": "sha256-of-exact-bytes",
    "chunking": "not-supported-in-v1",
    "automaticGarbageCollection": "not-supported-in-v1",
    "readabilityAuthority": "relational-reachability",
    "readIntegrity": "recompute-address-digest",
    "atRest": {
      "encryption": "not-supported-in-v1",
      "keyId": "absent",
      "rotation": "absent",
      "keyCustody": "absent",
      "ciphertextSemanticsImplicitlyEnterPackageDigest": false
    }
  },
  "closure": {
    "authoredSelectorAndResolvedClosureAreDistinct": true,
    "resolvedClosureIsReinterpretedByLaterPolicy": false,
    "portabilityStatusValues": [
      "portable",
      "external-dependencies",
      "incomplete"
    ],
    "portableConditions": [
      "root-document-and-metadata-hash-verified",
      "embedded-logic-dependency-owner-and-revision-verified",
      "required-function-and-component-version-resolved",
      "required-local-asset-and-evidence-included",
      "pinned-result-snapshot-closure-complete",
      "no-unresolved-cross-report-value-source",
      "host-runtime-compatibility-declared"
    ],
    "externalDependencyReasons": [
      "private-organization-function",
      "non-redistributable-component",
      "large-remote-dataset",
      "external-evidence-service",
      "host-runtime"
    ],
    "adapterRegistryRepository": {
      "owner": "pxflow-local-adapters",
      "lookupMembers": [
        "adapterCategory",
        "formatKey",
        "categoryContractVersion",
        "formatContractVersion"
      ],
      "dependencyRefGrammar": "adapter:<category>:<formatKey>:<categoryContractVersion>:<formatContractVersion>",
      "installedReleaseRule": "the Project dependency pin digest must equal releaseByteDigest",
      "revocationReader": "ops/trust/publisher-revocation-list.v1.json",
      "serverV1Binding": "not-applicable-behind-rfc012-server-authoring-repository-composition"
    },
    "rules": [
      "Save and Save As preflight report the count and reason of every remaining external dependency",
      "a package with a remaining external dependency is never presented as self-contained",
      "import creates a new scope and grant and preserves only permitted provenance as lineage",
      "a portable package embeds SDK source together with its dependency lock when it preserves SDK-linked editing"
    ]
  },
  "signatureEnvelope": {
    "detachedSignatureIsOptional": true,
    "detachedSignatureEntryKind": "detachedSignature",
    "releaseEnvelopeMembers": [
      "schemaVersion",
      "packageKey",
      "packageVersion",
      "platform",
      "artifactDigest",
      "descriptorDigest",
      "dependencyLockDigest",
      "functions",
      "components",
      "optionalContributions",
      "signature"
    ],
    "signatureMembers": [
      "keyId",
      "algorithm",
      "value"
    ],
    "coveredBySignature": [
      "canonical-manifest-core",
      "ordered-content-entry-closure",
      "content-entry-path",
      "content-entry-size",
      "content-entry-digest"
    ],
    "notCoveredBySignature": [
      "manifest-entry-self-digest",
      "detached-signature-entry",
      "mimetype-entry-bytes",
      "archive-entry-order",
      "compression-metadata"
    ],
    "containerAndReleaseEnvelopesAreDistinct": true,
    "containerDetachedSignatureAlgorithm": "ed25519",
    "releaseEnvelopeSignatureAlgorithm": "ed25519",
    "publisherKeyTrustStore": "product-managed-trust-store",
    "trustArtifacts": {
      "trustStorePath": "pipelineXlab_pxflow/ops/trust/publisher-trust-store.v1.json",
      "revocationListPath": "pipelineXlab_pxflow/ops/trust/publisher-revocation-list.v1.json",
      "trustStoreMembers": [
        "schemaVersion",
        "packageSigningKeys",
        "revocationListSigningKeys"
      ],
      "trustedKeyMembers": [
        "keyId",
        "publicKeyBase64"
      ],
      "revocationListMembers": [
        "schemaVersion",
        "listVersion",
        "notBefore",
        "notAfter",
        "revokedKeys",
        "signedByKeyId",
        "signatureValue"
      ],
      "revokedKeyMembers": [
        "keyId",
        "revokedAt",
        "reason"
      ],
      "canonicalJson": "RFC-8785",
      "signatureInput": "canonical revocation object without signatureValue",
      "validityInclusive": true,
      "validityWindowMaxSeconds": 7776000
    },
    "revocation": {
      "mechanism": "signed-revocation-list",
      "validityWindow": "required",
      "staleOrUnavailableListBehavior": "reject-verification",
      "revokedAfterSigningBehavior": "reject-on-verification-after-revocation",
      "trustedTimestampException": "none-in-v1"
    }
  },
  "forbiddenPackageContent": [
    "auth-session-or-publish-token",
    "password-api-key-or-unredacted-environment-secret",
    "host-absolute-path",
    "other-user-workspace-path",
    "version-control-dependency-or-build-cache",
    "server-log-queue-worker-or-deployment-state",
    "browser-storage-dump-recent-file-list-or-ui-preference",
    "unapplied-ai-prompt-session-or-hidden-tool-trace",
    "tenant-workspace-custody-membership-or-access-grant",
    "invite-or-link-secret",
    "collaboration-session-or-presence",
    "publication-delivery-ticket",
    "local-permission-handle",
    "mutable-latest-reference"
  ],
  "forbiddenPackageContentEnforcement": {
    "state": "closed-reader-publisher-partition",
    "classCount": 14,
    "readerObservation": "entry-path-only",
    "entryPathReaderRules": [
      "host-absolute-path",
      "other-user-workspace-path",
      "version-control-dependency-or-build-cache",
      "browser-storage-dump-recent-file-list-or-ui-preference"
    ],
    "publisherSignatureObligations": [
      "auth-session-or-publish-token",
      "password-api-key-or-unredacted-environment-secret",
      "server-log-queue-worker-or-deployment-state",
      "unapplied-ai-prompt-session-or-hidden-tool-trace",
      "tenant-workspace-custody-membership-or-access-grant",
      "invite-or-link-secret",
      "collaboration-session-or-presence",
      "publication-delivery-ticket",
      "local-permission-handle",
      "mutable-latest-reference"
    ],
    "readerChecksArchiveAndManifestPaths": true,
    "readerRejectionCarriesClassName": true,
    "publisherMustExcludeBeforeSigning": true,
    "publisherClassesUseByteHeuristics": false,
    "safeReaderSuccessMeaning": "envelope-metadata-and-four-entry-path-rules-valid-only",
    "safeReaderSuccessIsAllContentSafetyDecision": false,
    "rules": [
      "the reader rejects each of the four entry-path classes by class name on both archive and manifest paths",
      "the remaining ten classes are publisher obligations excluded before signing",
      "the reader does not invent byte heuristics for the ten publisher-signature classes",
      "safe-reader success does not assert that the ten publisher-signature classes are absent from entry bytes"
    ]
  },
  "diagnosticCodes": [
    "PX_SCHEMA_UNSUPPORTED_VERSION",
    "PX_SCHEMA_UNKNOWN_FIELD",
    "PX_RESOURCE_LIMIT",
    "PX_PERMISSION_DENIED",
    "PX_TARGET_NOT_PORTABLE",
    "PX_DOCUMENT_LEGACY_FORMAT"
  ],
  "unapprovedDecisions": []
}
