@agent-surface/core 0.17.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -720,7 +720,7 @@ type AgentCapabilityDescriptorUnion = AgentObservationDescriptor | AgentActionDe
720
720
  declare function matchesScope(type: string, scope: string[] | undefined): boolean;
721
721
 
722
722
  /** Contract format emitted by @agent-surface/compiler. */
723
- declare const CAPABILITY_CONTRACT_FORMAT_VERSION: 4;
723
+ declare const CAPABILITY_CONTRACT_FORMAT_VERSION: 5;
724
724
  type CapabilityContractKind = "observation" | "action" | "procedure" | "external";
725
725
  interface CapabilityPolicyAttachment {
726
726
  name: string;
@@ -741,17 +741,36 @@ interface CapabilityContractEntry {
741
741
  targets: string[];
742
742
  origin: string;
743
743
  }
744
- interface ExternalCapabilityContractDigest {
745
- package?: string;
744
+ /**
745
+ * How a dependency's capabilities entered this manifest.
746
+ *
747
+ * Two facts are recorded separately because they answer different questions.
748
+ * `contractDigest` is *integrity*: what the dependency actually contributed to
749
+ * this build. `authorization` is *consent*: what the consumer approved. A
750
+ * dependency that changes its contract moves the first and not the second, and
751
+ * the build fails until a human updates the allow list.
752
+ */
753
+ interface ExternalContractAttribution {
754
+ /** npm package name — the stable key an allow list is written against. */
755
+ package: string;
756
+ /** Where the contribution came from, relative to the build root. */
746
757
  source: string;
747
- digest: string;
758
+ /** How the dependency contributed. */
759
+ route: "sidecar" | "source";
760
+ /** sha256 of the contribution as this build computed it. */
761
+ contractDigest: string;
762
+ /** What the consumer explicitly approved. */
763
+ authorization: {
764
+ mode: "pinned";
765
+ expectedDigest: string;
766
+ };
748
767
  }
749
768
  interface CapabilityContractManifest {
750
769
  formatVersion: typeof CAPABILITY_CONTRACT_FORMAT_VERSION;
751
770
  compilerVersion: string;
752
771
  targets: string[];
753
772
  capabilities: CapabilityContractEntry[];
754
- externalContracts: ExternalCapabilityContractDigest[];
773
+ externalContracts: ExternalContractAttribution[];
755
774
  completeness: {
756
775
  status: "proven";
757
776
  };
@@ -948,4 +967,4 @@ interface AgentSurfaceRegistry {
948
967
  }
949
968
  declare function createAgentSurfaceRegistry(options?: RegistryOptions): AgentSurfaceRegistry;
950
969
 
951
- export { type AgentSurfaceLimits as $, type AgentRouteInfo as A, type AgentObservationContract as B, type AgentObservationDefinition as C, type DiscoveryDecision as D, type AgentObservationDescriptor as E, type AgentPolicy as F, type AgentPolicyContext as G, type AgentProcedureBinding as H, type AgentProcedureBindingRuntimeConfig as I, type JsonSchema as J, type AgentProcedureContract as K, type AgentProcedureContractDefinition as L, type AgentProcedureDescriptor as M, type AgentProcedureEffect as N, type AgentProcedureExecutor as O, type AgentProcedureRefDescriptor as P, type AgentReadContext as Q, type AgentRegistrationHandle as R, type SnapshotContext as S, type AgentSchema as T, type Unsubscribe as U, AgentSchemaError as V, type AgentSchemaIssue as W, AgentSurfaceDefinitionError as X, type AgentSurfaceDefinitionErrorCode as Y, AgentSurfaceError as Z, type AgentSurfaceEvent as _, type AgentConsumer as a, type AgentSurfaceSnapshot as a0, type AuditEvent as a1, type AuditSink as a2, CAPABILITY_CONTRACT_FORMAT_VERSION as a3, CONFIRMATION_ESCALATION as a4, type CapabilityAuthority as a5, type CapabilityContractEntry as a6, type CapabilityContractKind as a7, type CapabilityContractManifest as a8, type CapabilityPolicyAttachment as a9, defineAgentComponentContract as aA, defineAgentProcedureContract as aB, defineExternalAgentToolContract as aC, deriveAgentComponentBinding as aD, emptyObjectSchema as aE, environment as aF, evaluateDiscovery as aG, fromJsonSchema as aH, fromStandardSchema as aI, hasPermission as aJ, isAgentSurfaceError as aK, memoryAuditSink as aL, observation as aM, observationContract as aN, rateLimit as aO, requireConfirmation as aP, tenantBoundary as aQ, validateComponentDefinition as aR, validateJsonSchemaDocument as aS, validateValueAgainstSchema as aT, type CompiledExternalAgentTool as aa, type ConfirmationController as ab, type ConfirmationEscalation as ac, DEFAULT_LIMITS as ad, type ExternalAgentToolContract as ae, type ExternalAgentToolContractDefinition as af, type ExternalCapabilityContractDigest as ag, type InvokeOptions as ah, type PendingConfirmation as ai, type PreconditionFailure as aj, type ProcedureCallInfo as ak, type RegistrationCandidate as al, type RegistryOptions as am, type StandardSchemaV1 as an, action as ao, actionContract as ap, assertDefinitionAuthorized as aq, audit as ar, authenticated as as, authorizeAgentProcedureBinding as at, composeInvokeChain as au, consoleAuditSink as av, createAgentExposureGateway as aw, createAgentSurfaceRegistry as ax, createCapabilityAuthority as ay, defineAgentComponent as az, type AgentSurfaceRegistry as b, type JsonValue as c, type AgentInvocationResult as d, AGENT_CAPABILITY_ERROR_CODES as e, type AgentActionContext as f, type AgentActionContract as g, type AgentActionDefinition as h, type AgentActionDescriptor as i, type AgentAuthorizationContext as j, type AgentCapabilityDescriptorUnion as k, type AgentCapabilityErrorCode as l, matchesScope as m, type AgentCapabilityErrorPayload as n, type AgentComponentContract as o, type AgentComponentContractDefinition as p, type AgentComponentDefinition as q, type AgentComponentDescriptor as r, type AgentComponentRuntimeBindings as s, type AgentConcurrency as t, type AgentEffect as u, type AgentEnvironment as v, type AgentErrorRetry as w, type AgentExposureGateway as x, type AgentInvocation as y, type AgentInvocationPolicyContext as z };
970
+ export { type AgentSurfaceLimits as $, type AgentRouteInfo as A, type AgentObservationContract as B, type AgentObservationDefinition as C, type DiscoveryDecision as D, type AgentObservationDescriptor as E, type AgentPolicy as F, type AgentPolicyContext as G, type AgentProcedureBinding as H, type AgentProcedureBindingRuntimeConfig as I, type JsonSchema as J, type AgentProcedureContract as K, type AgentProcedureContractDefinition as L, type AgentProcedureDescriptor as M, type AgentProcedureEffect as N, type AgentProcedureExecutor as O, type AgentProcedureRefDescriptor as P, type AgentReadContext as Q, type AgentRegistrationHandle as R, type SnapshotContext as S, type AgentSchema as T, type Unsubscribe as U, AgentSchemaError as V, type AgentSchemaIssue as W, AgentSurfaceDefinitionError as X, type AgentSurfaceDefinitionErrorCode as Y, AgentSurfaceError as Z, type AgentSurfaceEvent as _, type AgentConsumer as a, type AgentSurfaceSnapshot as a0, type AuditEvent as a1, type AuditSink as a2, CAPABILITY_CONTRACT_FORMAT_VERSION as a3, CONFIRMATION_ESCALATION as a4, type CapabilityAuthority as a5, type CapabilityContractEntry as a6, type CapabilityContractKind as a7, type CapabilityContractManifest as a8, type CapabilityPolicyAttachment as a9, defineAgentComponentContract as aA, defineAgentProcedureContract as aB, defineExternalAgentToolContract as aC, deriveAgentComponentBinding as aD, emptyObjectSchema as aE, environment as aF, evaluateDiscovery as aG, fromJsonSchema as aH, fromStandardSchema as aI, hasPermission as aJ, isAgentSurfaceError as aK, memoryAuditSink as aL, observation as aM, observationContract as aN, rateLimit as aO, requireConfirmation as aP, tenantBoundary as aQ, validateComponentDefinition as aR, validateJsonSchemaDocument as aS, validateValueAgainstSchema as aT, type CompiledExternalAgentTool as aa, type ConfirmationController as ab, type ConfirmationEscalation as ac, DEFAULT_LIMITS as ad, type ExternalAgentToolContract as ae, type ExternalAgentToolContractDefinition as af, type ExternalContractAttribution as ag, type InvokeOptions as ah, type PendingConfirmation as ai, type PreconditionFailure as aj, type ProcedureCallInfo as ak, type RegistrationCandidate as al, type RegistryOptions as am, type StandardSchemaV1 as an, action as ao, actionContract as ap, assertDefinitionAuthorized as aq, audit as ar, authenticated as as, authorizeAgentProcedureBinding as at, composeInvokeChain as au, consoleAuditSink as av, createAgentExposureGateway as aw, createAgentSurfaceRegistry as ax, createCapabilityAuthority as ay, defineAgentComponent as az, type AgentSurfaceRegistry as b, type JsonValue as c, type AgentInvocationResult as d, AGENT_CAPABILITY_ERROR_CODES as e, type AgentActionContext as f, type AgentActionContract as g, type AgentActionDefinition as h, type AgentActionDescriptor as i, type AgentAuthorizationContext as j, type AgentCapabilityDescriptorUnion as k, type AgentCapabilityErrorCode as l, matchesScope as m, type AgentCapabilityErrorPayload as n, type AgentComponentContract as o, type AgentComponentContractDefinition as p, type AgentComponentDefinition as q, type AgentComponentDescriptor as r, type AgentComponentRuntimeBindings as s, type AgentConcurrency as t, type AgentEffect as u, type AgentEnvironment as v, type AgentErrorRetry as w, type AgentExposureGateway as x, type AgentInvocation as y, type AgentInvocationPolicyContext as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-surface/core",
3
- "version": "0.17.0",
3
+ "version": "0.19.0",
4
4
  "description": "Framework-agnostic registry, types, policies, errors, snapshot, invocation for frontend agent surfaces",
5
5
  "license": "MIT",
6
6
  "type": "module",