@sourcey/catalog-verifier 1.1.22 → 1.1.24

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.
Files changed (161) hide show
  1. package/README.md +4 -1
  2. package/SOURCEY-CLOSURE.json +277 -133
  3. package/dist/contracts/admission-results/src/index.d.ts +31 -0
  4. package/dist/contracts/admission-results/src/index.d.ts.map +1 -1
  5. package/dist/contracts/admission-results/src/index.js +29 -0
  6. package/dist/contracts/admission-results/src/index.js.map +1 -1
  7. package/dist/contracts/agent-readiness/src/binding.d.ts +28 -1
  8. package/dist/contracts/agent-readiness/src/binding.d.ts.map +1 -1
  9. package/dist/contracts/agent-readiness/src/binding.js +75 -16
  10. package/dist/contracts/agent-readiness/src/binding.js.map +1 -1
  11. package/dist/contracts/agent-readiness/src/client.d.ts +30 -0
  12. package/dist/contracts/agent-readiness/src/client.d.ts.map +1 -0
  13. package/dist/contracts/agent-readiness/src/client.js +25 -0
  14. package/dist/contracts/agent-readiness/src/client.js.map +1 -0
  15. package/dist/contracts/agent-readiness/src/declaration-acquisition.d.ts +91 -0
  16. package/dist/contracts/agent-readiness/src/declaration-acquisition.d.ts.map +1 -1
  17. package/dist/contracts/agent-readiness/src/declaration-acquisition.js +6 -0
  18. package/dist/contracts/agent-readiness/src/declaration-acquisition.js.map +1 -1
  19. package/dist/contracts/agent-readiness/src/declaration.d.ts +362 -0
  20. package/dist/contracts/agent-readiness/src/declaration.d.ts.map +1 -1
  21. package/dist/contracts/agent-readiness/src/declaration.js +47 -80
  22. package/dist/contracts/agent-readiness/src/declaration.js.map +1 -1
  23. package/dist/contracts/agent-readiness/src/{operate-policy.d.ts → grade-policy.d.ts} +31 -79
  24. package/dist/contracts/agent-readiness/src/grade-policy.d.ts.map +1 -0
  25. package/dist/contracts/agent-readiness/src/grade-policy.js +93 -0
  26. package/dist/contracts/agent-readiness/src/grade-policy.js.map +1 -0
  27. package/dist/contracts/agent-readiness/src/index.d.ts +3 -1
  28. package/dist/contracts/agent-readiness/src/index.d.ts.map +1 -1
  29. package/dist/contracts/agent-readiness/src/index.js +3 -1
  30. package/dist/contracts/agent-readiness/src/index.js.map +1 -1
  31. package/dist/contracts/agent-readiness/src/jobs.d.ts +12 -3
  32. package/dist/contracts/agent-readiness/src/jobs.d.ts.map +1 -1
  33. package/dist/contracts/agent-readiness/src/jobs.js +8 -1
  34. package/dist/contracts/agent-readiness/src/jobs.js.map +1 -1
  35. package/dist/contracts/agent-readiness/src/offer-relations.d.ts +89 -0
  36. package/dist/contracts/agent-readiness/src/offer-relations.d.ts.map +1 -1
  37. package/dist/contracts/agent-readiness/src/operation.d.ts +106 -0
  38. package/dist/contracts/agent-readiness/src/operation.d.ts.map +1 -0
  39. package/dist/contracts/agent-readiness/src/operation.js +228 -0
  40. package/dist/contracts/agent-readiness/src/operation.js.map +1 -0
  41. package/dist/contracts/agent-readiness/src/release-index.d.ts +277 -89
  42. package/dist/contracts/agent-readiness/src/release-index.d.ts.map +1 -1
  43. package/dist/contracts/agent-readiness/src/revision.d.ts +500 -166
  44. package/dist/contracts/agent-readiness/src/revision.d.ts.map +1 -1
  45. package/dist/contracts/agent-readiness/src/revision.js +100 -37
  46. package/dist/contracts/agent-readiness/src/revision.js.map +1 -1
  47. package/dist/contracts/agent-readiness/src/run.d.ts +386 -98
  48. package/dist/contracts/agent-readiness/src/run.d.ts.map +1 -1
  49. package/dist/contracts/agent-readiness/src/run.js +333 -52
  50. package/dist/contracts/agent-readiness/src/run.js.map +1 -1
  51. package/dist/contracts/agent-readiness/src/shared.d.ts +51 -17
  52. package/dist/contracts/agent-readiness/src/shared.d.ts.map +1 -1
  53. package/dist/contracts/agent-readiness/src/shared.js +52 -23
  54. package/dist/contracts/agent-readiness/src/shared.js.map +1 -1
  55. package/dist/contracts/agent-readiness/src/surfaces.d.ts +25 -0
  56. package/dist/contracts/agent-readiness/src/surfaces.d.ts.map +1 -0
  57. package/dist/contracts/agent-readiness/src/surfaces.js +76 -0
  58. package/dist/contracts/agent-readiness/src/surfaces.js.map +1 -0
  59. package/dist/contracts/api/src/endpoints.d.ts +895 -254
  60. package/dist/contracts/api/src/endpoints.d.ts.map +1 -1
  61. package/dist/contracts/api/src/read.d.ts +354 -109
  62. package/dist/contracts/api/src/read.d.ts.map +1 -1
  63. package/dist/contracts/api/src/read.js +1 -1
  64. package/dist/contracts/api/src/read.js.map +1 -1
  65. package/dist/contracts/api/src/routes.d.ts +27 -23
  66. package/dist/contracts/api/src/routes.d.ts.map +1 -1
  67. package/dist/contracts/api/src/routes.js +2 -3
  68. package/dist/contracts/api/src/routes.js.map +1 -1
  69. package/dist/contracts/api/src/submissions.d.ts +141 -0
  70. package/dist/contracts/api/src/submissions.d.ts.map +1 -1
  71. package/dist/contracts/api/src/submissions.js +28 -4
  72. package/dist/contracts/api/src/submissions.js.map +1 -1
  73. package/dist/contracts/datasets/src/index.d.ts +13 -10
  74. package/dist/contracts/datasets/src/index.d.ts.map +1 -1
  75. package/dist/contracts/publication/src/index.d.ts +64 -0
  76. package/dist/contracts/publication/src/index.d.ts.map +1 -1
  77. package/dist/contracts/publication/src/index.js +20 -0
  78. package/dist/contracts/publication/src/index.js.map +1 -1
  79. package/dist/contracts/startup-credits-commercial/src/requests.d.ts +2 -0
  80. package/dist/contracts/startup-credits-commercial/src/requests.d.ts.map +1 -1
  81. package/dist/modules/agent-readiness-engine/src/assertions.d.ts.map +1 -1
  82. package/dist/modules/agent-readiness-engine/src/assertions.js +25 -0
  83. package/dist/modules/agent-readiness-engine/src/assertions.js.map +1 -1
  84. package/dist/modules/agent-readiness-engine/src/authority.d.ts +81 -0
  85. package/dist/modules/agent-readiness-engine/src/authority.d.ts.map +1 -0
  86. package/dist/modules/agent-readiness-engine/src/authority.js +189 -0
  87. package/dist/modules/agent-readiness-engine/src/authority.js.map +1 -0
  88. package/dist/modules/agent-readiness-engine/src/challenges.d.ts +13 -0
  89. package/dist/modules/agent-readiness-engine/src/challenges.d.ts.map +1 -0
  90. package/dist/modules/agent-readiness-engine/src/challenges.js +67 -0
  91. package/dist/modules/agent-readiness-engine/src/challenges.js.map +1 -0
  92. package/dist/modules/agent-readiness-engine/src/documents.d.ts +21 -0
  93. package/dist/modules/agent-readiness-engine/src/documents.d.ts.map +1 -0
  94. package/dist/modules/agent-readiness-engine/src/documents.js +69 -0
  95. package/dist/modules/agent-readiness-engine/src/documents.js.map +1 -0
  96. package/dist/modules/agent-readiness-engine/src/naming.d.ts +19 -0
  97. package/dist/modules/agent-readiness-engine/src/naming.d.ts.map +1 -0
  98. package/dist/modules/agent-readiness-engine/src/naming.js +28 -0
  99. package/dist/modules/agent-readiness-engine/src/naming.js.map +1 -0
  100. package/dist/modules/agent-readiness-engine/src/path.d.ts +68 -15
  101. package/dist/modules/agent-readiness-engine/src/path.d.ts.map +1 -1
  102. package/dist/modules/agent-readiness-engine/src/path.js +467 -153
  103. package/dist/modules/agent-readiness-engine/src/path.js.map +1 -1
  104. package/dist/modules/agent-readiness-engine/src/profile.d.ts +85 -0
  105. package/dist/modules/agent-readiness-engine/src/profile.d.ts.map +1 -0
  106. package/dist/modules/agent-readiness-engine/src/profile.js +176 -0
  107. package/dist/modules/agent-readiness-engine/src/profile.js.map +1 -0
  108. package/dist/modules/agent-readiness-engine/src/rate.d.ts +10 -20
  109. package/dist/modules/agent-readiness-engine/src/rate.d.ts.map +1 -1
  110. package/dist/modules/agent-readiness-engine/src/rate.js +29 -47
  111. package/dist/modules/agent-readiness-engine/src/rate.js.map +1 -1
  112. package/dist/modules/agent-readiness-engine/src/records.d.ts +30 -0
  113. package/dist/modules/agent-readiness-engine/src/records.d.ts.map +1 -0
  114. package/dist/modules/agent-readiness-engine/src/records.js +59 -0
  115. package/dist/modules/agent-readiness-engine/src/records.js.map +1 -0
  116. package/dist/modules/agent-readiness-jobs/src/index.d.ts +16 -8
  117. package/dist/modules/agent-readiness-jobs/src/index.d.ts.map +1 -1
  118. package/dist/modules/agent-readiness-jobs/src/index.js +12 -7
  119. package/dist/modules/agent-readiness-jobs/src/index.js.map +1 -1
  120. package/dist/modules/agent-readiness-policy/src/current-policy.d.ts +13 -17
  121. package/dist/modules/agent-readiness-policy/src/current-policy.d.ts.map +1 -1
  122. package/dist/modules/agent-readiness-policy/src/current-policy.js +1 -1
  123. package/dist/modules/agent-readiness-policy/src/current-policy.js.map +1 -1
  124. package/dist/modules/agent-readiness-policy/src/{operate-policy.d.ts → grade-policy.d.ts} +3 -3
  125. package/dist/modules/agent-readiness-policy/src/grade-policy.d.ts.map +1 -0
  126. package/dist/modules/agent-readiness-policy/src/grade-policy.js +82 -0
  127. package/dist/modules/agent-readiness-policy/src/grade-policy.js.map +1 -0
  128. package/dist/modules/agent-readiness-policy/src/index.d.ts +4 -4
  129. package/dist/modules/agent-readiness-policy/src/index.d.ts.map +1 -1
  130. package/dist/modules/agent-readiness-policy/src/index.js +35 -22
  131. package/dist/modules/agent-readiness-policy/src/index.js.map +1 -1
  132. package/dist/modules/agent-readiness-policy/src/revision.d.ts +3 -3
  133. package/dist/modules/agent-readiness-policy/src/revision.d.ts.map +1 -1
  134. package/dist/modules/agent-readiness-policy/src/revision.js +40 -32
  135. package/dist/modules/agent-readiness-policy/src/revision.js.map +1 -1
  136. package/dist/modules/artifact/src/policy-closure.js +1 -1
  137. package/dist/modules/artifact/src/policy-closure.js.map +1 -1
  138. package/dist/modules/catalog-admission/src/index.d.ts +13 -0
  139. package/dist/modules/catalog-admission/src/index.d.ts.map +1 -1
  140. package/dist/modules/catalog-admission/src/submission-input.d.ts.map +1 -1
  141. package/dist/modules/catalog-admission/src/submission-input.js +1 -1
  142. package/dist/modules/catalog-admission/src/submission-input.js.map +1 -1
  143. package/dist/modules/catalog-admission/src/submission.d.ts +30 -0
  144. package/dist/modules/catalog-admission/src/submission.d.ts.map +1 -1
  145. package/dist/modules/catalog-admission/src/submission.js +29 -16
  146. package/dist/modules/catalog-admission/src/submission.js.map +1 -1
  147. package/dist/modules/release/src/verification-policies.d.ts +13 -17
  148. package/dist/modules/release/src/verification-policies.d.ts.map +1 -1
  149. package/dist/modules/release/src/verification-policies.js +1 -1
  150. package/dist/modules/release/src/verification-policies.js.map +1 -1
  151. package/dist/modules/sourcey-publication/src/verifier.d.ts +5 -0
  152. package/dist/modules/sourcey-publication/src/verifier.d.ts.map +1 -1
  153. package/dist/modules/sourcey-publication/src/verifier.js +13 -0
  154. package/dist/modules/sourcey-publication/src/verifier.js.map +1 -1
  155. package/package.json +1 -1
  156. package/dist/contracts/agent-readiness/src/operate-policy.d.ts.map +0 -1
  157. package/dist/contracts/agent-readiness/src/operate-policy.js +0 -86
  158. package/dist/contracts/agent-readiness/src/operate-policy.js.map +0 -1
  159. package/dist/modules/agent-readiness-policy/src/operate-policy.d.ts.map +0 -1
  160. package/dist/modules/agent-readiness-policy/src/operate-policy.js +0 -110
  161. package/dist/modules/agent-readiness-policy/src/operate-policy.js.map +0 -1
@@ -59,54 +59,88 @@ export declare const agentReadinessSurfaceReferenceSchema: z.ZodObject<{
59
59
  }>;
60
60
  node_id: z.ZodString;
61
61
  }, z.core.$strict>;
62
- /** A revision rests on at most this many runs: its latest and the earlier refusals it reproduces. */
63
- export declare const AGENT_READINESS_MAXIMUM_REVISION_RUNS = 4;
64
- /** The Operate path, in order: how a principal's authority becomes a completed, confirmed job. */
65
- export declare const AGENT_READINESS_STEPS: readonly ["discover", "delegation", "pay", "job", "confirm", "sustain"];
62
+ /**
63
+ * The earlier runs of each group a refresh reads, newest first: the profile's
64
+ * probe runs, and each binding's (north star §5.4).
65
+ */
66
+ export declare const AGENT_READINESS_PRIOR_RUNS_READ = 4;
67
+ /** The most runs a policy asks to hold one finding before it counts (its reproduction's `attempts`). */
68
+ export declare const AGENT_READINESS_MAXIMUM_ATTEMPTS = 2;
69
+ /**
70
+ * A revision rests on at most this many runs: its probe runs from the earliest
71
+ * its grade rests on through the latest (the earlier ones a refresh reads, and
72
+ * its own), and its binding's runs that decide.
73
+ */
74
+ export declare const AGENT_READINESS_MAXIMUM_REVISION_RUNS: number;
75
+ /**
76
+ * The roles of the pages a person's or a vendor's step happens on, which a
77
+ * listing names and the probe requests (north star §5.3).
78
+ */
79
+ export declare const AGENT_READINESS_PAGE_ROLES: readonly ["registration", "access_request", "access_setting", "checkout"];
80
+ /** A probe run requests each declared page once, and a listing names at most this many. */
81
+ export declare const AGENT_READINESS_MAXIMUM_PAGES = 8;
82
+ /**
83
+ * The path, in the shape's order: the agent finds the job, gets authority for
84
+ * it, registers, pays, confirms, and keeps its access up (north star §5.1).
85
+ */
86
+ export declare const AGENT_READINESS_STEPS: readonly ["discover", "authority", "onboard", "pay", "confirm", "sustain"];
66
87
  export declare const agentReadinessStepSchema: z.ZodEnum<{
88
+ authority: "authority";
67
89
  confirm: "confirm";
68
- delegation: "delegation";
69
90
  discover: "discover";
70
- job: "job";
91
+ onboard: "onboard";
71
92
  pay: "pay";
72
93
  sustain: "sustain";
73
94
  }>;
74
95
  export type AgentReadinessStep = z.infer<typeof agentReadinessStepSchema>;
75
96
  /**
76
- * What happened at one step: done by the agent, a legitimate principal decision,
77
- * a human doing the agent's work, reproducibly impossible, proved absent by the
78
- * executed path, or not yet evidenced.
97
+ * What happened at one step (north star §5.2): done by the agent, absent
98
+ * (nothing to do), a principal's one-time decision, a person doing the
99
+ * agent's work, or a vendor's decision standing in the way. `not_assessed` is
100
+ * a step a run did not settle; a published revision holds one only on an F
101
+ * card whose listing names no interface for the job.
79
102
  */
80
103
  export declare const agentReadinessStepOutcomeSchema: z.ZodEnum<{
81
104
  approval: "approval";
82
- blocked: "blocked";
105
+ gated: "gated";
83
106
  machine: "machine";
84
107
  not_applicable: "not_applicable";
85
108
  not_assessed: "not_assessed";
86
109
  workaround: "workaround";
87
110
  }>;
88
111
  export type AgentReadinessStepOutcome = z.infer<typeof agentReadinessStepOutcomeSchema>;
89
- /** Once per principal or credential lifetime, or on every job, purchase or period. */
90
- export declare const agentReadinessHandoffTimingSchema: z.ZodEnum<{
112
+ /**
113
+ * The job itself, which is not a step (north star §5.1): an interface for it
114
+ * answers and the job has not been run, a run did it, or no machine interface
115
+ * performs it (F). `not_assessed` until the probes settle it.
116
+ */
117
+ export declare const agentReadinessJobOutcomeSchema: z.ZodEnum<{
118
+ not_assessed: "not_assessed";
119
+ reachable: "reachable";
120
+ unavailable: "unavailable";
121
+ verified: "verified";
122
+ }>;
123
+ export type AgentReadinessJobOutcome = z.infer<typeof agentReadinessJobOutcomeSchema>;
124
+ /** Once (per principal or credential lifetime), or every run, purchase or period. */
125
+ export declare const agentReadinessHumanStepTimingSchema: z.ZodEnum<{
91
126
  recurring: "recurring";
92
127
  setup: "setup";
93
128
  }>;
94
- export declare const agentReadinessOperateLetterSchema: z.ZodEnum<{
129
+ /** The scale, best first (north star §5.7). */
130
+ export declare const agentReadinessLetterSchema: z.ZodEnum<{
95
131
  A: "A";
96
132
  "A+": "A+";
97
133
  B: "B";
98
134
  "B+": "B+";
99
135
  C: "C";
100
- "C+": "C+";
101
136
  D: "D";
102
137
  F: "F";
103
138
  }>;
104
- export type AgentReadinessOperateLetter = z.infer<typeof agentReadinessOperateLetterSchema>;
105
- /** 1 no account needed … 6 sales-gated; absence is "not yet assessed". */
106
- export declare const agentReadinessOnboardLevelSchema: z.ZodNumber;
139
+ export type AgentReadinessLetter = z.infer<typeof agentReadinessLetterSchema>;
107
140
  export declare const agentReadinessEvidenceLabelSchema: z.ZodEnum<{
108
141
  probed: "probed";
109
142
  sourcey_run: "sourcey_run";
110
143
  vendor_run_verified: "vendor_run_verified";
111
144
  }>;
145
+ export type AgentReadinessEvidenceLabel = z.infer<typeof agentReadinessEvidenceLabelSchema>;
112
146
  //# sourceMappingURL=shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../contracts/agent-readiness/src/shared.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,0BAA0B,aAAmC,CAAC;AAC3E,eAAO,MAAM,4BAA4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
68
68
  .strict();
69
- /** A revision rests on at most this many runs: its latest and the earlier refusals it reproduces. */
70
- export const AGENT_READINESS_MAXIMUM_REVISION_RUNS = 4;
71
- /** The Operate path, in order: how a principal's authority becomes a completed, confirmed job. */
69
+ /**
70
+ * The earlier runs of each group a refresh reads, newest first: the profile's
71
+ * probe runs, and each binding's (north star §5.4).
72
+ */
73
+ export const AGENT_READINESS_PRIOR_RUNS_READ = 4;
74
+ /** The most runs a policy asks to hold one finding before it counts (its reproduction's `attempts`). */
75
+ export const AGENT_READINESS_MAXIMUM_ATTEMPTS = 2;
76
+ /**
77
+ * A revision rests on at most this many runs: its probe runs from the earliest
78
+ * its grade rests on through the latest (the earlier ones a refresh reads, and
79
+ * its own), and its binding's runs that decide.
80
+ */
81
+ export const AGENT_READINESS_MAXIMUM_REVISION_RUNS = AGENT_READINESS_PRIOR_RUNS_READ + 1 + AGENT_READINESS_MAXIMUM_ATTEMPTS;
82
+ /**
83
+ * The roles of the pages a person's or a vendor's step happens on, which a
84
+ * listing names and the probe requests (north star §5.3).
85
+ */
86
+ export const AGENT_READINESS_PAGE_ROLES = [
87
+ "registration",
88
+ "access_request",
89
+ "access_setting",
90
+ "checkout",
91
+ ];
92
+ /** A probe run requests each declared page once, and a listing names at most this many. */
93
+ export const AGENT_READINESS_MAXIMUM_PAGES = 8;
94
+ /**
95
+ * The path, in the shape's order: the agent finds the job, gets authority for
96
+ * it, registers, pays, confirms, and keeps its access up (north star §5.1).
97
+ */
72
98
  export const AGENT_READINESS_STEPS = [
73
99
  "discover",
74
- "delegation",
100
+ "authority",
101
+ "onboard",
75
102
  "pay",
76
- "job",
77
103
  "confirm",
78
104
  "sustain",
79
105
  ];
80
106
  export const agentReadinessStepSchema = z.enum(AGENT_READINESS_STEPS);
81
107
  /**
82
- * What happened at one step: done by the agent, a legitimate principal decision,
83
- * a human doing the agent's work, reproducibly impossible, proved absent by the
84
- * executed path, or not yet evidenced.
108
+ * What happened at one step (north star §5.2): done by the agent, absent
109
+ * (nothing to do), a principal's one-time decision, a person doing the
110
+ * agent's work, or a vendor's decision standing in the way. `not_assessed` is
111
+ * a step a run did not settle; a published revision holds one only on an F
112
+ * card whose listing names no interface for the job.
85
113
  */
86
114
  export const agentReadinessStepOutcomeSchema = z.enum([
87
115
  "machine",
116
+ "not_applicable",
88
117
  "approval",
89
118
  "workaround",
90
- "blocked",
91
- "not_applicable",
119
+ "gated",
92
120
  "not_assessed",
93
121
  ]);
94
- /** Once per principal or credential lifetime, or on every job, purchase or period. */
95
- export const agentReadinessHandoffTimingSchema = z.enum(["setup", "recurring"]);
96
- export const agentReadinessOperateLetterSchema = z.enum([
97
- "A+",
98
- "A",
99
- "B+",
100
- "B",
101
- "C+",
102
- "C",
103
- "D",
104
- "F",
122
+ /**
123
+ * The job itself, which is not a step (north star §5.1): an interface for it
124
+ * answers and the job has not been run, a run did it, or no machine interface
125
+ * performs it (F). `not_assessed` until the probes settle it.
126
+ */
127
+ export const agentReadinessJobOutcomeSchema = z.enum([
128
+ "reachable",
129
+ "verified",
130
+ "unavailable",
131
+ "not_assessed",
105
132
  ]);
106
- /** 1 no account needed … 6 sales-gated; absence is "not yet assessed". */
107
- export const agentReadinessOnboardLevelSchema = z.number().int().min(1).max(6);
133
+ /** Once (per principal or credential lifetime), or every run, purchase or period. */
134
+ export const agentReadinessHumanStepTimingSchema = z.enum(["setup", "recurring"]);
135
+ /** The scale, best first (north star §5.7). */
136
+ export const agentReadinessLetterSchema = z.enum(["A+", "A", "B+", "B", "C", "D", "F"]);
108
137
  export const agentReadinessEvidenceLabelSchema = z.enum([
109
138
  "sourcey_run",
110
139
  "vendor_run_verified",
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../contracts/agent-readiness/src/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAA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AAC,MAAM,qBAAqB,GAAG;IACnC,UAAU;IACV,YAAY;IACZ,KAAK;IACL,KAAK;IACL,SAAS;IACT,SAAS;CACD,CAAC;AACX,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAGtE;;;;GAIG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,IAAI,CAAC;IACpD,SAAS;IACT,UAAU;IACV,YAAY;IACZ,SAAS;IACT,gBAAgB;IAChB,cAAc;CACf,CAAC,CAAC;AAGH,sFAAsF;AACtF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;AAEhF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,IAAI,CAAC;IACtD,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;CACJ,CAAC,CAAC;AAGH,0EAA0E;AAC1E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,IAAI,CAAC;IACtD,aAAa;IACb,qBAAqB;IACrB,QAAQ;CACT,CAAC,CAAC"}
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../contracts/agent-readiness/src/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,kCAAkC,EAClC,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,kDAAkD,CAAC;AAE1D,MAAM,CAAC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G,CAAC,GAAG,gCAAgC,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,cAAc;IACd,gBAAgB;IAChB,gBAAgB;IAChB,UAAU;CACF,CAAC;AAEX,2FAA2F;AAC3F,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,UAAU;IACV,WAAW;IACX,SAAS;IACT,KAAK;IACL,SAAS;IACT,SAAS;CACD,CAAC;AACX,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAGtE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,IAAI,CAAC;IACpD,SAAS;IACT,gBAAgB;IAChB,UAAU;IACV,YAAY;IACZ,OAAO;IACP,cAAc;CACf,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,IAAI,CAAC;IACnD,WAAW;IACX,UAAU;IACV,aAAa;IACb,cAAc;CACf,CAAC,CAAC;AAGH,qFAAqF;AACrF,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;AAElF,+CAA+C;AAC/C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAGxF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,IAAI,CAAC;IACtD,aAAa;IACb,qBAAqB;IACrB,QAAQ;CACT,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { z } from "zod";
2
+ /**
3
+ * What the probe reads of a listing's own surfaces: the roles it rules out, its
4
+ * checkout or that the job needs none, and the pages a person's or a vendor's
5
+ * step happens on, each requested once, an access setting on the interface it
6
+ * turns on.
7
+ */
8
+ export declare function validateProbedSurfaces(value: {
9
+ readonly resources: readonly {
10
+ readonly roles: readonly string[];
11
+ }[];
12
+ readonly endpoints: readonly {
13
+ readonly endpoint_id: string;
14
+ readonly roles: readonly string[];
15
+ }[];
16
+ readonly interfaces: readonly {
17
+ readonly endpoint_ids: readonly string[];
18
+ }[];
19
+ readonly job_operations: readonly unknown[];
20
+ readonly surface_exclusions: readonly {
21
+ readonly exclusion_id: string;
22
+ readonly role: string;
23
+ }[];
24
+ }, context: z.RefinementCtx): void;
25
+ //# sourceMappingURL=surfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../../../contracts/agent-readiness/src/surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE;IACL,QAAQ,CAAC,SAAS,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;IACrE,QAAQ,CAAC,SAAS,EAAE,SAAS;QAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;KACnC,EAAE,CAAC;IACJ,QAAQ,CAAC,UAAU,EAAE,SAAS;QAAE,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;IAC7E,QAAQ,CAAC,cAAc,EAAE,SAAS,OAAO,EAAE,CAAC;IAC5C,QAAQ,CAAC,kBAAkB,EAAE,SAAS;QACpC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;KACvB,EAAE,CAAC;CACL,EACD,OAAO,EAAE,CAAC,CAAC,aAAa,GACvB,IAAI,CAuEN"}
@@ -0,0 +1,76 @@
1
+ import { AGENT_READINESS_MAXIMUM_PAGES, AGENT_READINESS_PAGE_ROLES } from "./shared.js";
2
+ /**
3
+ * What the probe reads of a listing's own surfaces: the roles it rules out, its
4
+ * checkout or that the job needs none, and the pages a person's or a vendor's
5
+ * step happens on, each requested once, an access setting on the interface it
6
+ * turns on.
7
+ */
8
+ export function validateProbedSurfaces(value, context) {
9
+ const ruledOut = value.surface_exclusions;
10
+ const exclusionIds = ruledOut.map(({ exclusion_id }) => exclusion_id);
11
+ if (new Set(exclusionIds).size !== exclusionIds.length) {
12
+ context.addIssue({
13
+ code: "custom",
14
+ path: ["surface_exclusions"],
15
+ message: "Surface exclusion IDs must be unique.",
16
+ });
17
+ }
18
+ const roles = ruledOut.map(({ role }) => role);
19
+ if (new Set(roles).size !== roles.length) {
20
+ context.addIssue({
21
+ code: "custom",
22
+ path: ["surface_exclusions"],
23
+ message: "A surface role may be excluded only once.",
24
+ });
25
+ }
26
+ const declared = new Set(value.resources.flatMap((resource) => resource.roles));
27
+ for (const [index, surface] of ruledOut.entries()) {
28
+ if (declared.has(surface.role)) {
29
+ context.addIssue({
30
+ code: "custom",
31
+ path: ["surface_exclusions", index, "role"],
32
+ message: `Role '${surface.role}' is declared by a resource and cannot also be excluded.`,
33
+ });
34
+ }
35
+ }
36
+ // An access setting turns on the interface that lists it (north star §5.6, Onboard).
37
+ const listed = new Set(value.interfaces.flatMap(({ endpoint_ids }) => endpoint_ids));
38
+ for (const [index, endpoint] of value.endpoints.entries()) {
39
+ if (endpoint.roles.includes("access_setting") && !listed.has(endpoint.endpoint_id)) {
40
+ context.addIssue({
41
+ code: "custom",
42
+ path: ["endpoints", index, "roles"],
43
+ message: "An access setting is listed by the interface it turns on.",
44
+ });
45
+ }
46
+ }
47
+ // Pay rests on the checkout the listing names, or on the listing ruling it out (north star §5.6).
48
+ const checkoutNamed = declared.has("checkout") ||
49
+ value.endpoints.some((endpoint) => endpoint.roles.includes("checkout"));
50
+ const checkoutRuledOut = roles.includes("checkout");
51
+ if (checkoutNamed && checkoutRuledOut) {
52
+ context.addIssue({
53
+ code: "custom",
54
+ path: ["surface_exclusions"],
55
+ message: "A declaration names its checkout or rules it out, not both.",
56
+ });
57
+ }
58
+ if (value.job_operations.length > 0 && !checkoutNamed && !checkoutRuledOut) {
59
+ context.addIssue({
60
+ code: "custom",
61
+ path: ["surface_exclusions"],
62
+ message: "A declaration with job operations names its checkout, or rules it out where the job needs none.",
63
+ });
64
+ }
65
+ const pageRole = (role) => AGENT_READINESS_PAGE_ROLES.includes(role);
66
+ const pages = value.endpoints.flatMap(({ roles }) => roles.filter(pageRole)).length +
67
+ value.resources.flatMap(({ roles }) => roles.filter((role) => role === "checkout")).length;
68
+ if (pages > AGENT_READINESS_MAXIMUM_PAGES) {
69
+ context.addIssue({
70
+ code: "custom",
71
+ path: ["endpoints"],
72
+ message: `A declaration names at most ${AGENT_READINESS_MAXIMUM_PAGES} pages for a person's or a vendor's step.`,
73
+ });
74
+ }
75
+ }
76
+ //# sourceMappingURL=surfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surfaces.js","sourceRoot":"","sources":["../../../../contracts/agent-readiness/src/surfaces.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAExF;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAYC,EACD,OAAwB;IAExB,MAAM,QAAQ,GAAG,KAAK,CAAC,kBAAkB,CAAC;IAC1C,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC;IACtE,IAAI,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,MAAM,EAAE,CAAC;QACvD,OAAO,CAAC,QAA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