@sourcey/catalog-verifier 1.1.21 → 1.1.23
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.
- package/README.md +4 -1
- package/SOURCEY-CLOSURE.json +265 -121
- package/dist/contracts/agent-readiness/src/binding.d.ts +28 -1
- package/dist/contracts/agent-readiness/src/binding.d.ts.map +1 -1
- package/dist/contracts/agent-readiness/src/binding.js +75 -16
- package/dist/contracts/agent-readiness/src/binding.js.map +1 -1
- package/dist/contracts/agent-readiness/src/client.d.ts +30 -0
- package/dist/contracts/agent-readiness/src/client.d.ts.map +1 -0
- package/dist/contracts/agent-readiness/src/client.js +25 -0
- package/dist/contracts/agent-readiness/src/client.js.map +1 -0
- package/dist/contracts/agent-readiness/src/declaration-acquisition.d.ts +91 -0
- package/dist/contracts/agent-readiness/src/declaration-acquisition.d.ts.map +1 -1
- package/dist/contracts/agent-readiness/src/declaration-acquisition.js +6 -0
- package/dist/contracts/agent-readiness/src/declaration-acquisition.js.map +1 -1
- package/dist/contracts/agent-readiness/src/declaration.d.ts +358 -0
- package/dist/contracts/agent-readiness/src/declaration.d.ts.map +1 -1
- package/dist/contracts/agent-readiness/src/declaration.js +34 -79
- package/dist/contracts/agent-readiness/src/declaration.js.map +1 -1
- package/dist/contracts/agent-readiness/src/{operate-policy.d.ts → grade-policy.d.ts} +31 -79
- package/dist/contracts/agent-readiness/src/grade-policy.d.ts.map +1 -0
- package/dist/contracts/agent-readiness/src/grade-policy.js +93 -0
- package/dist/contracts/agent-readiness/src/grade-policy.js.map +1 -0
- package/dist/contracts/agent-readiness/src/index.d.ts +3 -1
- package/dist/contracts/agent-readiness/src/index.d.ts.map +1 -1
- package/dist/contracts/agent-readiness/src/index.js +3 -1
- package/dist/contracts/agent-readiness/src/index.js.map +1 -1
- package/dist/contracts/agent-readiness/src/jobs.d.ts +12 -3
- package/dist/contracts/agent-readiness/src/jobs.d.ts.map +1 -1
- package/dist/contracts/agent-readiness/src/jobs.js +8 -1
- package/dist/contracts/agent-readiness/src/jobs.js.map +1 -1
- package/dist/contracts/agent-readiness/src/offer-relations.d.ts +89 -0
- package/dist/contracts/agent-readiness/src/offer-relations.d.ts.map +1 -1
- package/dist/contracts/agent-readiness/src/operation.d.ts +106 -0
- package/dist/contracts/agent-readiness/src/operation.d.ts.map +1 -0
- package/dist/contracts/agent-readiness/src/operation.js +228 -0
- package/dist/contracts/agent-readiness/src/operation.js.map +1 -0
- package/dist/contracts/agent-readiness/src/release-index.d.ts +277 -89
- package/dist/contracts/agent-readiness/src/release-index.d.ts.map +1 -1
- package/dist/contracts/agent-readiness/src/revision.d.ts +500 -166
- package/dist/contracts/agent-readiness/src/revision.d.ts.map +1 -1
- package/dist/contracts/agent-readiness/src/revision.js +100 -37
- package/dist/contracts/agent-readiness/src/revision.js.map +1 -1
- package/dist/contracts/agent-readiness/src/run.d.ts +386 -98
- package/dist/contracts/agent-readiness/src/run.d.ts.map +1 -1
- package/dist/contracts/agent-readiness/src/run.js +333 -52
- package/dist/contracts/agent-readiness/src/run.js.map +1 -1
- package/dist/contracts/agent-readiness/src/shared.d.ts +51 -17
- package/dist/contracts/agent-readiness/src/shared.d.ts.map +1 -1
- package/dist/contracts/agent-readiness/src/shared.js +52 -23
- package/dist/contracts/agent-readiness/src/shared.js.map +1 -1
- package/dist/contracts/agent-readiness/src/surfaces.d.ts +25 -0
- package/dist/contracts/agent-readiness/src/surfaces.d.ts.map +1 -0
- package/dist/contracts/agent-readiness/src/surfaces.js +76 -0
- package/dist/contracts/agent-readiness/src/surfaces.js.map +1 -0
- package/dist/contracts/api/src/endpoints.d.ts +885 -254
- package/dist/contracts/api/src/endpoints.d.ts.map +1 -1
- package/dist/contracts/api/src/read.d.ts +354 -109
- package/dist/contracts/api/src/read.d.ts.map +1 -1
- package/dist/contracts/api/src/read.js +1 -1
- package/dist/contracts/api/src/routes.d.ts +27 -23
- package/dist/contracts/api/src/routes.d.ts.map +1 -1
- package/dist/contracts/api/src/routes.js +2 -3
- package/dist/contracts/api/src/routes.js.map +1 -1
- package/dist/contracts/api/src/submissions.d.ts +91 -0
- package/dist/contracts/api/src/submissions.d.ts.map +1 -1
- package/dist/contracts/datasets/src/index.d.ts +13 -10
- package/dist/contracts/datasets/src/index.d.ts.map +1 -1
- package/dist/contracts/startup-credits-commercial/src/product.js +1 -1
- package/dist/contracts/startup-credits-commercial/src/product.js.map +1 -1
- package/dist/modules/agent-readiness-engine/src/assertions.d.ts.map +1 -1
- package/dist/modules/agent-readiness-engine/src/assertions.js +25 -0
- package/dist/modules/agent-readiness-engine/src/assertions.js.map +1 -1
- package/dist/modules/agent-readiness-engine/src/authority.d.ts +81 -0
- package/dist/modules/agent-readiness-engine/src/authority.d.ts.map +1 -0
- package/dist/modules/agent-readiness-engine/src/authority.js +189 -0
- package/dist/modules/agent-readiness-engine/src/authority.js.map +1 -0
- package/dist/modules/agent-readiness-engine/src/challenges.d.ts +13 -0
- package/dist/modules/agent-readiness-engine/src/challenges.d.ts.map +1 -0
- package/dist/modules/agent-readiness-engine/src/challenges.js +67 -0
- package/dist/modules/agent-readiness-engine/src/challenges.js.map +1 -0
- package/dist/modules/agent-readiness-engine/src/documents.d.ts +21 -0
- package/dist/modules/agent-readiness-engine/src/documents.d.ts.map +1 -0
- package/dist/modules/agent-readiness-engine/src/documents.js +69 -0
- package/dist/modules/agent-readiness-engine/src/documents.js.map +1 -0
- package/dist/modules/agent-readiness-engine/src/naming.d.ts +19 -0
- package/dist/modules/agent-readiness-engine/src/naming.d.ts.map +1 -0
- package/dist/modules/agent-readiness-engine/src/naming.js +28 -0
- package/dist/modules/agent-readiness-engine/src/naming.js.map +1 -0
- package/dist/modules/agent-readiness-engine/src/path.d.ts +68 -15
- package/dist/modules/agent-readiness-engine/src/path.d.ts.map +1 -1
- package/dist/modules/agent-readiness-engine/src/path.js +467 -153
- package/dist/modules/agent-readiness-engine/src/path.js.map +1 -1
- package/dist/modules/agent-readiness-engine/src/profile.d.ts +85 -0
- package/dist/modules/agent-readiness-engine/src/profile.d.ts.map +1 -0
- package/dist/modules/agent-readiness-engine/src/profile.js +176 -0
- package/dist/modules/agent-readiness-engine/src/profile.js.map +1 -0
- package/dist/modules/agent-readiness-engine/src/rate.d.ts +10 -20
- package/dist/modules/agent-readiness-engine/src/rate.d.ts.map +1 -1
- package/dist/modules/agent-readiness-engine/src/rate.js +29 -47
- package/dist/modules/agent-readiness-engine/src/rate.js.map +1 -1
- package/dist/modules/agent-readiness-engine/src/records.d.ts +30 -0
- package/dist/modules/agent-readiness-engine/src/records.d.ts.map +1 -0
- package/dist/modules/agent-readiness-engine/src/records.js +59 -0
- package/dist/modules/agent-readiness-engine/src/records.js.map +1 -0
- package/dist/modules/agent-readiness-jobs/src/index.d.ts +16 -8
- package/dist/modules/agent-readiness-jobs/src/index.d.ts.map +1 -1
- package/dist/modules/agent-readiness-jobs/src/index.js +12 -7
- package/dist/modules/agent-readiness-jobs/src/index.js.map +1 -1
- package/dist/modules/agent-readiness-policy/src/current-policy.d.ts +13 -17
- package/dist/modules/agent-readiness-policy/src/current-policy.d.ts.map +1 -1
- package/dist/modules/agent-readiness-policy/src/current-policy.js +1 -1
- package/dist/modules/agent-readiness-policy/src/current-policy.js.map +1 -1
- package/dist/modules/agent-readiness-policy/src/{operate-policy.d.ts → grade-policy.d.ts} +3 -3
- package/dist/modules/agent-readiness-policy/src/grade-policy.d.ts.map +1 -0
- package/dist/modules/agent-readiness-policy/src/grade-policy.js +82 -0
- package/dist/modules/agent-readiness-policy/src/grade-policy.js.map +1 -0
- package/dist/modules/agent-readiness-policy/src/index.d.ts +4 -4
- package/dist/modules/agent-readiness-policy/src/index.d.ts.map +1 -1
- package/dist/modules/agent-readiness-policy/src/index.js +35 -22
- package/dist/modules/agent-readiness-policy/src/index.js.map +1 -1
- package/dist/modules/agent-readiness-policy/src/revision.d.ts +3 -3
- package/dist/modules/agent-readiness-policy/src/revision.d.ts.map +1 -1
- package/dist/modules/agent-readiness-policy/src/revision.js +40 -32
- package/dist/modules/agent-readiness-policy/src/revision.js.map +1 -1
- package/dist/modules/artifact/src/policy-closure.js +1 -1
- package/dist/modules/artifact/src/policy-closure.js.map +1 -1
- package/dist/modules/catalog-admission/src/publication-dependencies.d.ts +0 -4
- package/dist/modules/catalog-admission/src/publication-dependencies.d.ts.map +1 -1
- package/dist/modules/catalog-admission/src/publication-dependencies.js +1 -1
- package/dist/modules/catalog-admission/src/publication-dependencies.js.map +1 -1
- package/dist/modules/release/src/identity.d.ts +0 -1
- package/dist/modules/release/src/identity.d.ts.map +1 -1
- package/dist/modules/release/src/identity.js +1 -1
- package/dist/modules/release/src/identity.js.map +1 -1
- package/dist/modules/release/src/verification-policies.d.ts +13 -17
- package/dist/modules/release/src/verification-policies.d.ts.map +1 -1
- package/dist/modules/release/src/verification-policies.js +1 -1
- package/dist/modules/release/src/verification-policies.js.map +1 -1
- package/dist/modules/sourcey-publication/src/verifier.d.ts +5 -0
- package/dist/modules/sourcey-publication/src/verifier.d.ts.map +1 -1
- package/dist/modules/sourcey-publication/src/verifier.js +13 -0
- package/dist/modules/sourcey-publication/src/verifier.js.map +1 -1
- package/package.json +1 -1
- package/dist/contracts/agent-readiness/src/operate-policy.d.ts.map +0 -1
- package/dist/contracts/agent-readiness/src/operate-policy.js +0 -86
- package/dist/contracts/agent-readiness/src/operate-policy.js.map +0 -1
- package/dist/modules/agent-readiness-policy/src/operate-policy.d.ts.map +0 -1
- package/dist/modules/agent-readiness-policy/src/operate-policy.js +0 -110
- 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
|
-
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
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,
|
|
77
|
-
*
|
|
78
|
-
*
|
|
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
|
-
|
|
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
|
-
/**
|
|
90
|
-
|
|
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
|
-
|
|
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
|
|
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,4BAA4B,aAAsC,CAAC;AAChF,eAAO,MAAM,2BAA2B,aAAqC,CAAC;AAC9E,eAAO,MAAM,6BAA6B,aAAuD,CAAC;AAClG,eAAO,MAAM,8BAA8B,aAAuC,CAAC;AACnF,eAAO,MAAM,2BAA2B,kBAAmC,CAAC;AAC5E,eAAO,MAAM,4BAA4B,aAAiC,CAAC;AAC3E,eAAO,MAAM,4BAA4B,aAKqD,CAAC;AAE/F,yFAAyF;AACzF,eAAO,MAAM,6BAA6B;;;EAA6B,CAAC;AASxE,uFAAuF;AACvF,eAAO,MAAM,yBAAyB;;;;;;;;;kBAK3B,CAAC;AAEZ,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB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ceReferenceSchema = z
|
|
|
66
66
|
node_id: agentReadinessScopeKeySchema,
|
|
67
67
|
})
|
|
68
68
|
.strict();
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
"
|
|
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,
|
|
83
|
-
*
|
|
84
|
-
*
|
|
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
|
-
"
|
|
91
|
-
"not_applicable",
|
|
119
|
+
"gated",
|
|
92
120
|
"not_assessed",
|
|
93
121
|
]);
|
|
94
|
-
/**
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
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
|
-
/**
|
|
107
|
-
export const
|
|
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,CAAC;AACxB,OAAO,EACL,kCAAkC,EAClC,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,kDAAkD,CAAC;AAE1D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;AAClG,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;AACnF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,4BAA4B,GAAG,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,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,E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