@typeship-ax/cli 0.22.0 → 0.24.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.
- package/AGENTS.md +13 -9
- package/README.md +14 -27
- package/api.json +8898 -9026
- package/api.md +370 -328
- package/dist/arguments.d.ts +54 -0
- package/dist/arguments.d.ts.map +1 -0
- package/dist/arguments.js +265 -0
- package/dist/cli-agent.d.ts +73 -9
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +331 -44
- package/dist/cli.js +802 -291
- package/dist/core/http.d.ts +162 -19
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +381 -48
- package/dist/core/pagination.d.ts +42 -6
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +111 -17
- package/dist/credential-storage.d.ts +10 -3
- package/dist/credential-storage.d.ts.map +1 -1
- package/dist/credential-storage.js +15 -6
- package/dist/dates.d.ts +1 -1
- package/dist/dates.js +1 -1
- package/dist/errors.d.ts +20 -84
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -108
- package/dist/fields.d.ts +36 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +187 -0
- package/dist/index.d.ts +28 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -25
- package/dist/named-credentials.d.ts +19 -0
- package/dist/named-credentials.d.ts.map +1 -1
- package/dist/named-credentials.js +81 -1
- package/dist/oauth-login.d.ts +8 -2
- package/dist/oauth-login.d.ts.map +1 -1
- package/dist/oauth-login.js +31 -19
- package/dist/oauth-request.d.ts +7 -1
- package/dist/oauth-request.d.ts.map +1 -1
- package/dist/oauth-request.js +26 -4
- package/dist/oauth-session.d.ts +13 -1
- package/dist/oauth-session.d.ts.map +1 -1
- package/dist/oauth-session.js +34 -18
- package/dist/ops.d.ts +58 -5
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +110 -41
- package/dist/polling-login.d.ts +8 -2
- package/dist/polling-login.d.ts.map +1 -1
- package/dist/polling-login.js +25 -11
- package/dist/resources/api-keys.d.ts +10 -7
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +10 -31
- package/dist/resources/deliveries.d.ts +89 -5
- package/dist/resources/deliveries.d.ts.map +1 -1
- package/dist/resources/deliveries.js +96 -19
- package/dist/resources/drafts.d.ts +16 -16
- package/dist/resources/drafts.d.ts.map +1 -1
- package/dist/resources/drafts.js +12 -65
- package/dist/resources/files.d.ts +4 -4
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +3 -12
- package/dist/resources/generations.d.ts +16 -16
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +23 -47
- package/dist/resources/organization.d.ts +4 -4
- package/dist/resources/organization.d.ts.map +1 -1
- package/dist/resources/organization.js +3 -10
- package/dist/resources/{generate.d.ts → packages.d.ts} +16 -16
- package/dist/resources/packages.d.ts.map +1 -0
- package/dist/resources/{generate.js → packages.js} +13 -29
- package/dist/resources/projects.d.ts +50 -50
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +60 -116
- package/dist/resources/releases.d.ts +22 -17
- package/dist/resources/releases.d.ts.map +1 -1
- package/dist/resources/releases.js +19 -40
- package/dist/resources/spec-revisions.d.ts +16 -7
- package/dist/resources/spec-revisions.d.ts.map +1 -1
- package/dist/resources/spec-revisions.js +7 -29
- package/dist/resources/specs.d.ts +7 -7
- package/dist/resources/specs.d.ts.map +1 -1
- package/dist/resources/specs.js +6 -34
- package/dist/resources/targets.d.ts +49 -49
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +59 -115
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +83 -81
- package/dist/search.d.ts +54 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +421 -0
- package/dist/table.d.ts +28 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +167 -0
- package/dist/type-docs.d.ts +61 -0
- package/dist/type-docs.d.ts.map +1 -0
- package/dist/type-docs.js +174 -0
- package/dist/types.d.ts +499 -339
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +18 -18
- package/package.json +5 -2
- package/src/arguments.ts +254 -0
- package/src/cli-agent.ts +351 -46
- package/src/cli.ts +753 -266
- package/src/core/http.ts +457 -58
- package/src/core/pagination.ts +129 -18
- package/src/credential-storage.ts +16 -6
- package/src/dates.ts +1 -1
- package/src/errors.ts +46 -115
- package/src/fields.ts +167 -0
- package/src/index.ts +45 -28
- package/src/named-credentials.ts +66 -1
- package/src/oauth-login.ts +36 -21
- package/src/oauth-request.ts +32 -6
- package/src/oauth-session.ts +37 -19
- package/src/ops.ts +146 -45
- package/src/polling-login.ts +24 -11
- package/src/resources/api-keys.ts +34 -48
- package/src/resources/deliveries.ts +213 -32
- package/src/resources/drafts.ts +62 -109
- package/src/resources/files.ts +19 -20
- package/src/resources/generations.ts +61 -79
- package/src/resources/organization.ts +11 -16
- package/src/resources/{generate.ts → packages.ts} +43 -51
- package/src/resources/projects.ts +145 -200
- package/src/resources/releases.ts +50 -67
- package/src/resources/spec-revisions.ts +40 -49
- package/src/resources/specs.ts +39 -59
- package/src/resources/targets.ts +144 -194
- package/src/schemas.ts +83 -81
- package/src/search.ts +434 -0
- package/src/table.ts +167 -0
- package/src/type-docs.ts +205 -0
- package/src/types.ts +538 -357
- package/dist/console-login-check.d.ts +0 -21
- package/dist/console-login-check.d.ts.map +0 -1
- package/dist/console-login-check.js +0 -107
- package/dist/console-login-contract.d.ts +0 -45
- package/dist/console-login-contract.d.ts.map +0 -1
- package/dist/console-login-contract.js +0 -40
- package/dist/resources/generate.d.ts.map +0 -1
- package/dist/resources/publications.d.ts +0 -47
- package/dist/resources/publications.d.ts.map +0 -1
- package/dist/resources/publications.js +0 -70
- package/src/console-login-check.ts +0 -88
- package/src/console-login-contract.ts +0 -65
- package/src/resources/publications.ts +0 -140
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Argument checks shared by the generated CLI and MCP server: coerce a value
|
|
3
|
+
* toward its schema where the intent is unambiguous, and report every
|
|
4
|
+
* problem, nested ones included, with the dotted path of the argument it
|
|
5
|
+
* belongs to. Generated by Typeship — https://typeship.dev
|
|
6
|
+
* No external dependencies.
|
|
7
|
+
*/
|
|
8
|
+
export interface ArgumentIssue {
|
|
9
|
+
code: "UNKNOWN_ARGUMENT" | "INVALID_ARGUMENT" | "MISSING_ARGUMENT";
|
|
10
|
+
argument: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const normalizeName: (name: string) => string;
|
|
14
|
+
/** The closest accepted name: same letters ignoring case/punctuation first,
|
|
15
|
+
* then a small edit distance. Undefined when nothing is close. */
|
|
16
|
+
export declare function closestName(name: string, known: string[]): string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Coerce one value toward its schema when the intent is unambiguous: the
|
|
19
|
+
* strings agents produce for booleans and numbers, a JSON string for an
|
|
20
|
+
* object or array, a scalar for a one-element array, an enum member in the
|
|
21
|
+
* wrong case. Returns the value to send, or a message when it can't be made
|
|
22
|
+
* to fit. Untyped schemas (unions, anything) pass through. The first
|
|
23
|
+
* problem only; checkValue reports every nested one.
|
|
24
|
+
*/
|
|
25
|
+
export declare function coerceValue(value: unknown, schema: Record<string, unknown>): {
|
|
26
|
+
value: unknown;
|
|
27
|
+
} | {
|
|
28
|
+
error: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check one argument value against its schema, the way prepareCall checks
|
|
32
|
+
* top-level arguments, and return the value to send. Recurses into array
|
|
33
|
+
* items and object properties: types and enums are coerced where the intent
|
|
34
|
+
* is clear, required properties must be present, strings must match their
|
|
35
|
+
* pattern, and keys an object declares closed (`additionalProperties:
|
|
36
|
+
* false`, as every GraphQL input type is) must be known. Every problem is
|
|
37
|
+
* pushed to issues with its dotted path (input.priority, items[0].name).
|
|
38
|
+
*/
|
|
39
|
+
export declare function checkValue(value: unknown, schema: Record<string, unknown>, path: string, issues: ArgumentIssue[], options?: {
|
|
40
|
+
skipPattern?: boolean;
|
|
41
|
+
depth?: number;
|
|
42
|
+
meName?: string;
|
|
43
|
+
}): unknown;
|
|
44
|
+
/** A name that holds one user or a list of them: assignee, assigneeId,
|
|
45
|
+
* assignees, subscriberIds, owner, user_id. */
|
|
46
|
+
export declare function userShapedReference(name: string): boolean;
|
|
47
|
+
/** "me" given for a user-shaped argument or property, resolved through the
|
|
48
|
+
* identity tool. */
|
|
49
|
+
export declare function isMeReference(name: string, value: string): boolean;
|
|
50
|
+
/** What "me" becomes for a user-shaped name: the caller's id for an ID
|
|
51
|
+
* name (assigneeId, subscriberIds, user_id), otherwise their login
|
|
52
|
+
* (GitHub's owner and assignees take logins). */
|
|
53
|
+
export declare function meIdentityField(name: string): "id" | "login";
|
|
54
|
+
//# sourceMappingURL=arguments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arguments.d.ts","sourceRoot":"","sources":["../src/arguments.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,KAAG,MAAsD,CAAC;AAgBpG;kEACkE;AAClE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAU7E;AASD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAInH;AAgFD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,EAAE,EACvB,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GACvE,OAAO,CAyET;AAED;+CAC+C;AAC/C,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGzD;AAED;oBACoB;AACpB,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAElE;AAED;;iDAEiD;AACjD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAE5D"}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Argument checks shared by the generated CLI and MCP server: coerce a value
|
|
3
|
+
* toward its schema where the intent is unambiguous, and report every
|
|
4
|
+
* problem, nested ones included, with the dotted path of the argument it
|
|
5
|
+
* belongs to. Generated by Typeship — https://typeship.dev
|
|
6
|
+
* No external dependencies.
|
|
7
|
+
*/
|
|
8
|
+
import { dateKindOf, relativeDate } from "./dates.js";
|
|
9
|
+
export const normalizeName = (name) => name.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
10
|
+
function editDistance(a, b) {
|
|
11
|
+
const prev = Array.from({ length: b.length + 1 }, (_, i) => i);
|
|
12
|
+
for (let i = 1; i <= a.length; i++) {
|
|
13
|
+
let diag = prev[0];
|
|
14
|
+
prev[0] = i;
|
|
15
|
+
for (let j = 1; j <= b.length; j++) {
|
|
16
|
+
const tmp = prev[j];
|
|
17
|
+
prev[j] = Math.min(prev[j] + 1, prev[j - 1] + 1, diag + (a[i - 1] === b[j - 1] ? 0 : 1));
|
|
18
|
+
diag = tmp;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return prev[b.length];
|
|
22
|
+
}
|
|
23
|
+
/** The closest accepted name: same letters ignoring case/punctuation first,
|
|
24
|
+
* then a small edit distance. Undefined when nothing is close. */
|
|
25
|
+
export function closestName(name, known) {
|
|
26
|
+
const exact = known.filter((k) => normalizeName(k) === normalizeName(name));
|
|
27
|
+
if (exact.length === 1)
|
|
28
|
+
return exact[0];
|
|
29
|
+
if (exact.length > 1)
|
|
30
|
+
return undefined;
|
|
31
|
+
let best;
|
|
32
|
+
for (const k of known) {
|
|
33
|
+
const d = editDistance(name.toLowerCase(), k.toLowerCase());
|
|
34
|
+
if (d <= Math.max(1, Math.floor(k.length / 4)) && (best === undefined || d < best.d))
|
|
35
|
+
best = { name: k, d };
|
|
36
|
+
}
|
|
37
|
+
return best?.name;
|
|
38
|
+
}
|
|
39
|
+
function schemaTypes(schema) {
|
|
40
|
+
const t = schema.type;
|
|
41
|
+
if (typeof t === "string")
|
|
42
|
+
return [t];
|
|
43
|
+
if (Array.isArray(t))
|
|
44
|
+
return t.filter((x) => typeof x === "string");
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Coerce one value toward its schema when the intent is unambiguous: the
|
|
49
|
+
* strings agents produce for booleans and numbers, a JSON string for an
|
|
50
|
+
* object or array, a scalar for a one-element array, an enum member in the
|
|
51
|
+
* wrong case. Returns the value to send, or a message when it can't be made
|
|
52
|
+
* to fit. Untyped schemas (unions, anything) pass through. The first
|
|
53
|
+
* problem only; checkValue reports every nested one.
|
|
54
|
+
*/
|
|
55
|
+
export function coerceValue(value, schema) {
|
|
56
|
+
const issues = [];
|
|
57
|
+
const out = checkValue(value, schema, "", issues);
|
|
58
|
+
return issues.length > 0 ? { error: issues[0].message } : { value: out };
|
|
59
|
+
}
|
|
60
|
+
/** Coerce one scalar-level value (type and enum) without looking inside it. */
|
|
61
|
+
function coerceShallow(value, schema) {
|
|
62
|
+
if (value === null || value === undefined)
|
|
63
|
+
return { value };
|
|
64
|
+
// Date-shaped arguments take relative forms (-P7D, 7 days ago, today),
|
|
65
|
+
// resolved here so the API sees an absolute value.
|
|
66
|
+
const dateKind = dateKindOf(schema.format);
|
|
67
|
+
if (dateKind && typeof value === "string") {
|
|
68
|
+
const resolved = relativeDate(value, dateKind);
|
|
69
|
+
if (resolved && "error" in resolved)
|
|
70
|
+
return { error: resolved.error };
|
|
71
|
+
if (resolved)
|
|
72
|
+
value = resolved.value;
|
|
73
|
+
}
|
|
74
|
+
const types = schemaTypes(schema);
|
|
75
|
+
const enumValues = Array.isArray(schema.enum) ? schema.enum : undefined;
|
|
76
|
+
const accepts = (t) => types.length === 0 || types.includes(t);
|
|
77
|
+
const kind = Array.isArray(value) ? "array" : typeof value;
|
|
78
|
+
let out = value;
|
|
79
|
+
if (types.length > 0) {
|
|
80
|
+
if (kind === "boolean" && !accepts("boolean")) {
|
|
81
|
+
if (accepts("string"))
|
|
82
|
+
out = String(value);
|
|
83
|
+
else
|
|
84
|
+
return { error: "expected " + types.join(" or ") + ", got boolean" };
|
|
85
|
+
}
|
|
86
|
+
else if (kind === "number" && !accepts("number") && !accepts("integer")) {
|
|
87
|
+
if (accepts("string"))
|
|
88
|
+
out = String(value);
|
|
89
|
+
else if (accepts("array"))
|
|
90
|
+
out = [value];
|
|
91
|
+
else
|
|
92
|
+
return { error: "expected " + types.join(" or ") + ", got number" };
|
|
93
|
+
}
|
|
94
|
+
else if (kind === "number" && accepts("integer") && !accepts("number") && !Number.isInteger(value)) {
|
|
95
|
+
return { error: "expected an integer, got " + String(value) };
|
|
96
|
+
}
|
|
97
|
+
else if (kind === "string" && !accepts("string")) {
|
|
98
|
+
const s = value.trim();
|
|
99
|
+
if (accepts("boolean") && /^(true|false|yes|no|1|0)$/i.test(s))
|
|
100
|
+
out = /^(true|yes|1)$/i.test(s);
|
|
101
|
+
else if ((accepts("integer") || accepts("number")) && s !== "" && !Number.isNaN(Number(s))) {
|
|
102
|
+
const n = Number(s);
|
|
103
|
+
if (accepts("integer") && !accepts("number") && !Number.isInteger(n))
|
|
104
|
+
return { error: "expected an integer, got \"" + s + "\"" };
|
|
105
|
+
out = n;
|
|
106
|
+
}
|
|
107
|
+
else if ((accepts("object") || accepts("array")) && /^[[{]/.test(s)) {
|
|
108
|
+
try {
|
|
109
|
+
const parsed = JSON.parse(s);
|
|
110
|
+
const parsedKind = Array.isArray(parsed) ? "array" : parsed === null ? "null" : typeof parsed;
|
|
111
|
+
if (!accepts(parsedKind))
|
|
112
|
+
return { error: "expected " + types.join(" or ") + ", got a JSON " + parsedKind + " in a string" };
|
|
113
|
+
out = parsed;
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
return { error: "expected " + types.join(" or ") + ", got a string that is not valid JSON" };
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else if (accepts("array")) {
|
|
120
|
+
out = [value];
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
return { error: "expected " + types.join(" or ") + ", got string" };
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else if (kind === "object" && !accepts("object")) {
|
|
127
|
+
if (accepts("array"))
|
|
128
|
+
out = [value];
|
|
129
|
+
else
|
|
130
|
+
return { error: "expected " + types.join(" or ") + ", got object" };
|
|
131
|
+
}
|
|
132
|
+
else if (kind === "array" && !accepts("array")) {
|
|
133
|
+
return { error: "expected " + types.join(" or ") + ", got array" };
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (enumValues && typeof out === "string" && !enumValues.includes(out)) {
|
|
137
|
+
const match = enumValues.filter((e) => typeof e === "string" && e.toLowerCase() === out.toLowerCase());
|
|
138
|
+
if (match.length === 1)
|
|
139
|
+
out = match[0];
|
|
140
|
+
else
|
|
141
|
+
return { error: "must be one of " + enumValues.map((e) => JSON.stringify(e)).join(", ") + ", got " + JSON.stringify(out) };
|
|
142
|
+
}
|
|
143
|
+
return { value: out };
|
|
144
|
+
}
|
|
145
|
+
/** A nullable single-variant union (`anyOf: [X, {type: "null"}]`, the shape
|
|
146
|
+
* nullable GraphQL enums and objects take) validates as X; any other union
|
|
147
|
+
* passes through unchecked. */
|
|
148
|
+
function nullableVariant(schema) {
|
|
149
|
+
const variants = schema.anyOf ?? schema.oneOf;
|
|
150
|
+
if (!Array.isArray(variants) || variants.length !== 2 || schema.type !== undefined)
|
|
151
|
+
return undefined;
|
|
152
|
+
const isNull = (v) => Boolean(v) && typeof v === "object" && v.type === "null";
|
|
153
|
+
const others = variants.filter((v) => !isNull(v));
|
|
154
|
+
if (others.length !== 1 || !others[0] || typeof others[0] !== "object")
|
|
155
|
+
return undefined;
|
|
156
|
+
return others[0];
|
|
157
|
+
}
|
|
158
|
+
const MAX_CHECK_DEPTH = 16;
|
|
159
|
+
/**
|
|
160
|
+
* Check one argument value against its schema, the way prepareCall checks
|
|
161
|
+
* top-level arguments, and return the value to send. Recurses into array
|
|
162
|
+
* items and object properties: types and enums are coerced where the intent
|
|
163
|
+
* is clear, required properties must be present, strings must match their
|
|
164
|
+
* pattern, and keys an object declares closed (`additionalProperties:
|
|
165
|
+
* false`, as every GraphQL input type is) must be known. Every problem is
|
|
166
|
+
* pushed to issues with its dotted path (input.priority, items[0].name).
|
|
167
|
+
*/
|
|
168
|
+
export function checkValue(value, schema, path, issues, options = {}) {
|
|
169
|
+
const depth = options.depth ?? 0;
|
|
170
|
+
const at = (suffix) => path === "" ? suffix : path + ": " + suffix;
|
|
171
|
+
if (value === null || value === undefined)
|
|
172
|
+
return value;
|
|
173
|
+
const variant = nullableVariant(schema);
|
|
174
|
+
if (variant)
|
|
175
|
+
return checkValue(value, variant, path, issues, options);
|
|
176
|
+
const shallow = coerceShallow(value, schema);
|
|
177
|
+
if ("error" in shallow) {
|
|
178
|
+
issues.push({ code: "INVALID_ARGUMENT", argument: path, message: at(shallow.error) });
|
|
179
|
+
return value;
|
|
180
|
+
}
|
|
181
|
+
let out = shallow.value;
|
|
182
|
+
if (depth >= MAX_CHECK_DEPTH)
|
|
183
|
+
return out;
|
|
184
|
+
// "me" for a user-shaped property (or an item of one) is resolved to an
|
|
185
|
+
// ID or login later, so it skips the pattern the resolved value must meet.
|
|
186
|
+
const skipPattern = options.skipPattern || (typeof out === "string" && options.meName !== undefined && isMeReference(options.meName, out));
|
|
187
|
+
if (typeof out === "string" && typeof schema.pattern === "string" && !skipPattern) {
|
|
188
|
+
let pattern;
|
|
189
|
+
try {
|
|
190
|
+
pattern = new RegExp(schema.pattern, "u");
|
|
191
|
+
}
|
|
192
|
+
catch {
|
|
193
|
+
try {
|
|
194
|
+
pattern = new RegExp(schema.pattern);
|
|
195
|
+
}
|
|
196
|
+
catch { /* not an ECMAScript pattern: never false-alarm */ }
|
|
197
|
+
}
|
|
198
|
+
if (pattern && !pattern.test(out)) {
|
|
199
|
+
issues.push({ code: "INVALID_ARGUMENT", argument: path, message: at("must match the pattern " + schema.pattern + ", got " + JSON.stringify(out)) });
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
// Array items: check each against the items schema when it has one.
|
|
203
|
+
if (Array.isArray(out) && schema.items && typeof schema.items === "object" && !Array.isArray(schema.items)) {
|
|
204
|
+
const itemSchema = schema.items;
|
|
205
|
+
out = out.map((item, i) => checkValue(item, itemSchema, path + "[" + i + "]", issues, { depth: depth + 1, meName: options.meName }));
|
|
206
|
+
}
|
|
207
|
+
// Object properties: the same checks one level down, keyed by dotted path.
|
|
208
|
+
if (out && typeof out === "object" && !Array.isArray(out) && schema.properties && typeof schema.properties === "object") {
|
|
209
|
+
const properties = schema.properties;
|
|
210
|
+
const known = Object.keys(properties);
|
|
211
|
+
const closed = schema.additionalProperties === false;
|
|
212
|
+
const input = out;
|
|
213
|
+
const next = {};
|
|
214
|
+
const child = (key) => path === "" ? key : path + "." + key;
|
|
215
|
+
for (const [key, entry] of Object.entries(input)) {
|
|
216
|
+
if (entry === undefined)
|
|
217
|
+
continue;
|
|
218
|
+
let name = key;
|
|
219
|
+
if (properties[key] === undefined && closed) {
|
|
220
|
+
const close = closestName(key, known);
|
|
221
|
+
if (close !== undefined && normalizeName(close) === normalizeName(key) && input[close] === undefined) {
|
|
222
|
+
name = close;
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
const accepted = known.length <= 20 ? " Accepted: " + known.join(", ") + "." : "";
|
|
226
|
+
issues.push({
|
|
227
|
+
code: "UNKNOWN_ARGUMENT",
|
|
228
|
+
argument: child(key),
|
|
229
|
+
message: "Unknown property \"" + child(key) + "\"" + (close !== undefined ? "; did you mean \"" + child(close) + "\"?" : ".") + accepted,
|
|
230
|
+
});
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
const propSchema = properties[name];
|
|
235
|
+
next[name] = propSchema && typeof propSchema === "object"
|
|
236
|
+
? checkValue(entry, propSchema, child(name), issues, { depth: depth + 1, meName: name })
|
|
237
|
+
: entry;
|
|
238
|
+
}
|
|
239
|
+
for (const name of Array.isArray(schema.required) ? schema.required : []) {
|
|
240
|
+
if (next[name] === undefined && properties[name] !== undefined) {
|
|
241
|
+
const description = properties[name].description;
|
|
242
|
+
issues.push({ code: "MISSING_ARGUMENT", argument: child(name), message: "Missing required property \"" + child(name) + "\"" + (description ? ": " + String(description).split("\n")[0] : ".") });
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
out = next;
|
|
246
|
+
}
|
|
247
|
+
return out;
|
|
248
|
+
}
|
|
249
|
+
/** A name that holds one user or a list of them: assignee, assigneeId,
|
|
250
|
+
* assignees, subscriberIds, owner, user_id. */
|
|
251
|
+
export function userShapedReference(name) {
|
|
252
|
+
const normalized = name.toLowerCase().replace(/[^a-z0-9]/g, "").replace(/ids?$/, "").replace(/s$/, "");
|
|
253
|
+
return ["user", "assignee", "owner", "member", "actor", "creator", "account", "profile", "subscriber"].includes(normalized);
|
|
254
|
+
}
|
|
255
|
+
/** "me" given for a user-shaped argument or property, resolved through the
|
|
256
|
+
* identity tool. */
|
|
257
|
+
export function isMeReference(name, value) {
|
|
258
|
+
return value.trim().toLowerCase() === "me" && userShapedReference(name);
|
|
259
|
+
}
|
|
260
|
+
/** What "me" becomes for a user-shaped name: the caller's id for an ID
|
|
261
|
+
* name (assigneeId, subscriberIds, user_id), otherwise their login
|
|
262
|
+
* (GitHub's owner and assignees take logins). */
|
|
263
|
+
export function meIdentityField(name) {
|
|
264
|
+
return /ids?$/i.test(name.replace(/[^A-Za-z0-9]/g, "")) ? "id" : "login";
|
|
265
|
+
}
|
package/dist/cli-agent.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Stable codes an agent can branch on. The message is for people; the code
|
|
3
3
|
* is the contract. Additive only.
|
|
4
4
|
*/
|
|
5
|
-
export type IssueCode = "NO_AUTH" | "AUTH_INVALID" | "PLAN_LIMIT" | "NOT_FOUND" | "INVALID_REQUEST" | "SPEC_INVALID" | "RATE_LIMITED" | "SERVER_ERROR" | "NETWORK_ERROR" | "VALIDATION_FAILED" | "TTY_REQUIRED" | "CONFIRMATION_REQUIRED" | "INVALID_USAGE" | "UNKNOWN_COMMAND" | "UNKNOWN_FLAG" | "MISSING_ARGUMENT" | "CALL_FAILED";
|
|
5
|
+
export type IssueCode = "NO_AUTH" | "AUTH_INVALID" | "INSUFFICIENT_SCOPE" | "PLAN_LIMIT" | "NOT_FOUND" | "INVALID_REQUEST" | "SPEC_INVALID" | "RATE_LIMITED" | "SERVER_ERROR" | "NETWORK_ERROR" | "VALIDATION_FAILED" | "TTY_REQUIRED" | "LOGIN_FAILED" | "LOGIN_REQUIRED" | "CREDENTIAL_STORE_UNAVAILABLE" | "CONFIRMATION_REQUIRED" | "INVALID_USAGE" | "UNKNOWN_COMMAND" | "UNKNOWN_FLAG" | "MISSING_ARGUMENT" | "FIELDS_UNMATCHED" | "CALL_FAILED";
|
|
6
6
|
export interface Issue {
|
|
7
7
|
code: IssueCode;
|
|
8
8
|
message: string;
|
|
@@ -32,9 +32,25 @@ export declare function exitCodeFor(code: IssueCode): 1 | 2;
|
|
|
32
32
|
/** Interpret an SDK error result: HTTP status, body, transport, validation. */
|
|
33
33
|
export declare function classifyApiError(error: unknown, context: {
|
|
34
34
|
bin: string;
|
|
35
|
+
envPrefix: string;
|
|
35
36
|
hadCredential: boolean;
|
|
36
37
|
docsUrl: string | null;
|
|
38
|
+
requiredScopes?: string[];
|
|
39
|
+
canLogin?: boolean;
|
|
37
40
|
}): EnvelopeInput;
|
|
41
|
+
/** Login, saved-session and credential-store failures, recognised by error
|
|
42
|
+
* name (so this module needs no login runtime) on the error or its cause.
|
|
43
|
+
* Undefined when the error is none of them. */
|
|
44
|
+
export declare function classifyAuthFailure(error: unknown, context: {
|
|
45
|
+
bin: string;
|
|
46
|
+
envVars: string[];
|
|
47
|
+
storeVariable: string;
|
|
48
|
+
}): EnvelopeInput | undefined;
|
|
49
|
+
/** "Wait until <time>" when the API said when the limit resets. */
|
|
50
|
+
export declare function rateLimitNextStep(retryAt: Date | undefined, then: string): string;
|
|
51
|
+
/** Error codes APIs report inside a 2xx body (Slack's `error`), mapped to
|
|
52
|
+
* the stable codes when their meaning is unambiguous. */
|
|
53
|
+
export declare function payloadFailureCode(code: unknown): "AUTH_INVALID" | "RATE_LIMITED" | undefined;
|
|
38
54
|
export interface AgentModeInput {
|
|
39
55
|
flagMode: string | boolean | undefined;
|
|
40
56
|
envMode: string | undefined;
|
|
@@ -71,6 +87,13 @@ export interface McpClient {
|
|
|
71
87
|
write: (existing: string, name: string, entry: McpEntry) => string;
|
|
72
88
|
/** True when the client cannot speak the current MCP protocol; skipped by --all. */
|
|
73
89
|
incompatible?: string;
|
|
90
|
+
/**
|
|
91
|
+
* How the client expands an environment variable inside a header value.
|
|
92
|
+
* Entries carry `${VAR}`; each client gets its own spelling, and a client
|
|
93
|
+
* that expands nothing gets no Authorization header rather than a literal
|
|
94
|
+
* one it would send as-is. Defaults to "dollar".
|
|
95
|
+
*/
|
|
96
|
+
headerEnv?: "dollar" | "env-colon" | "brace-env" | "none";
|
|
74
97
|
}
|
|
75
98
|
export declare const MCP_CLIENTS: McpClient[];
|
|
76
99
|
export declare function findMcpClient(id: string): McpClient | undefined;
|
|
@@ -80,7 +103,7 @@ export interface McpWriteResult {
|
|
|
80
103
|
written: boolean;
|
|
81
104
|
note?: string;
|
|
82
105
|
}
|
|
83
|
-
/** Merge the entry into one client's config file. Never writes a literal secret: callers pass
|
|
106
|
+
/** Merge the entry into one client's config file. Never writes a literal secret: callers pass `${VAR}` references, which each client receives in its own syntax. */
|
|
84
107
|
export declare function writeMcpConfig(client: McpClient, cwd: string, name: string, entry: McpEntry): McpWriteResult;
|
|
85
108
|
/** Does a client's config already mention this server? For doctor. */
|
|
86
109
|
export declare function mcpConfigured(client: McpClient, cwd: string, name: string): boolean;
|
|
@@ -128,15 +151,13 @@ export interface AgentContext {
|
|
|
128
151
|
version: string;
|
|
129
152
|
envPrefix: string;
|
|
130
153
|
authEnvVars: string[];
|
|
154
|
+
/** The API Spec is silent on authentication: say so instead of "no auth". */
|
|
155
|
+
authNotDeclared?: boolean;
|
|
131
156
|
docsUrl: string | null;
|
|
132
157
|
docsIndexUrl?: string | null;
|
|
133
158
|
generatedOperationCount?: number;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
tool: string;
|
|
137
|
-
method: string;
|
|
138
|
-
path: string;
|
|
139
|
-
}[];
|
|
159
|
+
/** Operations in the API left out of a capped build; api.json lists them. */
|
|
160
|
+
omittedOperationCount?: number;
|
|
140
161
|
/** The API's hosted MCP endpoint, when it has one. */
|
|
141
162
|
mcpUrl: string | null;
|
|
142
163
|
/** Skills repository (owner/name) an agent can install with npx skills add. */
|
|
@@ -144,10 +165,18 @@ export interface AgentContext {
|
|
|
144
165
|
hasMcp: boolean;
|
|
145
166
|
builtins: string[];
|
|
146
167
|
}
|
|
147
|
-
/** One line per command, pipe-delimited: the compact index that goes into AGENTS.md. */
|
|
148
168
|
/** string, number, usd|eur, string[], usd|eur[], object, json — the type as a reader expects it. */
|
|
149
169
|
export declare function flagTypeLabel(f: CommandFlagSummary): string;
|
|
170
|
+
/** One line per command, pipe-delimited: the compact index that goes into AGENTS.md. */
|
|
150
171
|
export declare function compactIndex(commands: CommandSummary[]): string;
|
|
172
|
+
/** Bytes of command index the guide and AGENTS.md carry before they switch to one line per resource. */
|
|
173
|
+
export declare const COMMAND_INDEX_BUDGET = 8000;
|
|
174
|
+
/**
|
|
175
|
+
* One line per resource with its first command names, for an API whose
|
|
176
|
+
* per-command index would not fit COMMAND_INDEX_BUDGET. Resources past the
|
|
177
|
+
* budget are counted, not listed; help --json has them all.
|
|
178
|
+
*/
|
|
179
|
+
export declare function resourceIndex(bin: string, commands: CommandSummary[]): string;
|
|
151
180
|
/** The AGENTS.md block body. */
|
|
152
181
|
export declare function agentBlock(ctx: AgentContext, commands: CommandSummary[]): string;
|
|
153
182
|
/** What `agent-guide --format json` returns. */
|
|
@@ -209,4 +238,39 @@ export declare function summarizeDoctor(checks: DoctorCheck[]): {
|
|
|
209
238
|
checks: DoctorCheck[];
|
|
210
239
|
next_steps: string[];
|
|
211
240
|
};
|
|
241
|
+
/** Every OAuth scope an operation's security requirements name, in order. */
|
|
242
|
+
export declare function requiredScopes(security: Record<string, string[]>[] | undefined): string[];
|
|
243
|
+
/** What --dry-run prints: the request an API command would send, with
|
|
244
|
+
* every credential replaced by "<redacted>". Nothing in it was sent. */
|
|
245
|
+
export interface RequestPreview {
|
|
246
|
+
dry_run: true;
|
|
247
|
+
sent: false;
|
|
248
|
+
message: string;
|
|
249
|
+
request: {
|
|
250
|
+
method: string;
|
|
251
|
+
url: string;
|
|
252
|
+
path: string;
|
|
253
|
+
query: Record<string, string | string[]>;
|
|
254
|
+
headers: Record<string, string>;
|
|
255
|
+
body?: unknown;
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
export declare const REDACTED = "<redacted>";
|
|
259
|
+
/**
|
|
260
|
+
* The request a dry run captured, as --dry-run shows it. `sensitiveNames`
|
|
261
|
+
* are the header and query names the API's security schemes bind; `secrets`
|
|
262
|
+
* are the resolved credential values, redacted wherever they appear (a
|
|
263
|
+
* token pasted into a body field, a key in a URL).
|
|
264
|
+
*/
|
|
265
|
+
export declare function requestPreview(input: {
|
|
266
|
+
method: string;
|
|
267
|
+
url: string;
|
|
268
|
+
headers: Record<string, string>;
|
|
269
|
+
body?: unknown;
|
|
270
|
+
}, options?: {
|
|
271
|
+
sensitiveNames?: string[];
|
|
272
|
+
secrets?: string[];
|
|
273
|
+
}): Promise<RequestPreview>;
|
|
274
|
+
/** --dry-run for a person: the request line, then query, headers and body. */
|
|
275
|
+
export declare function formatRequestPreview(preview: RequestPreview): string;
|
|
212
276
|
//# sourceMappingURL=cli-agent.d.ts.map
|
package/dist/cli-agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-agent.d.ts","sourceRoot":"","sources":["../src/cli-agent.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,YAAY,GACZ,WAAW,GACX,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,cAAc,GACd,eAAe,GACf,mBAAmB,GACnB,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,kBAAkB,GAClB,aAAa,CAAC;AAElB,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,qGAAqG;IACrG,MAAM,EAAE,OAAO,GAAG,iBAAiB,CAAC;IACpC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,mFAAmF;IACnF,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,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