@typeship-ax/cli 0.8.0 → 0.9.1

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 (106) hide show
  1. package/AGENTS.md +31 -0
  2. package/README.md +26 -9
  3. package/api.json +1875 -684
  4. package/api.md +352 -500
  5. package/dist/api-identity.d.ts +40 -0
  6. package/dist/api-identity.d.ts.map +1 -0
  7. package/dist/api-identity.js +128 -0
  8. package/dist/auth-profiles.d.ts +30 -0
  9. package/dist/auth-profiles.d.ts.map +1 -0
  10. package/dist/auth-profiles.js +138 -0
  11. package/dist/cli.js +522 -355
  12. package/dist/console-login-check.d.ts +21 -0
  13. package/dist/console-login-check.d.ts.map +1 -0
  14. package/dist/console-login-check.js +107 -0
  15. package/dist/console-login-contract.d.ts +45 -0
  16. package/dist/console-login-contract.d.ts.map +1 -0
  17. package/dist/console-login-contract.js +40 -0
  18. package/dist/core/http.d.ts +17 -2
  19. package/dist/core/http.d.ts.map +1 -1
  20. package/dist/core/http.js +78 -17
  21. package/dist/credential-storage.d.ts +24 -0
  22. package/dist/credential-storage.d.ts.map +1 -0
  23. package/dist/credential-storage.js +207 -0
  24. package/dist/docs.d.ts +25 -0
  25. package/dist/docs.d.ts.map +1 -1
  26. package/dist/docs.js +144 -0
  27. package/dist/errors.d.ts +18 -10
  28. package/dist/errors.d.ts.map +1 -1
  29. package/dist/errors.js +24 -14
  30. package/dist/index.d.ts +10 -3
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +20 -4
  33. package/dist/named-credentials.d.ts +21 -0
  34. package/dist/named-credentials.d.ts.map +1 -0
  35. package/dist/named-credentials.js +86 -0
  36. package/dist/oauth-login.d.ts +39 -0
  37. package/dist/oauth-login.d.ts.map +1 -0
  38. package/dist/oauth-login.js +171 -0
  39. package/dist/oauth-request.d.ts +21 -0
  40. package/dist/oauth-request.d.ts.map +1 -0
  41. package/dist/oauth-request.js +119 -0
  42. package/dist/oauth-session.d.ts +106 -0
  43. package/dist/oauth-session.d.ts.map +1 -0
  44. package/dist/oauth-session.js +244 -0
  45. package/dist/ops.d.ts +14 -1
  46. package/dist/ops.d.ts.map +1 -1
  47. package/dist/ops.js +30 -30
  48. package/dist/polling-login.d.ts +57 -0
  49. package/dist/polling-login.d.ts.map +1 -0
  50. package/dist/polling-login.js +204 -0
  51. package/dist/resources/account.d.ts +2 -2
  52. package/dist/resources/account.d.ts.map +1 -1
  53. package/dist/resources/account.js +1 -0
  54. package/dist/resources/api-keys.d.ts +3 -3
  55. package/dist/resources/api-keys.d.ts.map +1 -1
  56. package/dist/resources/api-keys.js +2 -0
  57. package/dist/resources/definition-revisions.d.ts +5 -5
  58. package/dist/resources/definition-revisions.d.ts.map +1 -1
  59. package/dist/resources/definition-revisions.js +4 -0
  60. package/dist/resources/definitions.d.ts +15 -4
  61. package/dist/resources/definitions.d.ts.map +1 -1
  62. package/dist/resources/definitions.js +11 -2
  63. package/dist/resources/generate.d.ts +14 -3
  64. package/dist/resources/generate.d.ts.map +1 -1
  65. package/dist/resources/generate.js +10 -2
  66. package/dist/resources/generations.d.ts +3 -3
  67. package/dist/resources/generations.d.ts.map +1 -1
  68. package/dist/resources/generations.js +2 -0
  69. package/dist/resources/projects.d.ts +56 -20
  70. package/dist/resources/projects.d.ts.map +1 -1
  71. package/dist/resources/projects.js +40 -4
  72. package/dist/resources/targets.d.ts +20 -9
  73. package/dist/resources/targets.d.ts.map +1 -1
  74. package/dist/resources/targets.js +14 -1
  75. package/dist/schemas.d.ts.map +1 -1
  76. package/dist/schemas.js +38 -22
  77. package/dist/types.d.ts +385 -119
  78. package/dist/types.d.ts.map +1 -1
  79. package/dist/types.js +11 -0
  80. package/package.json +2 -1
  81. package/src/api-identity.ts +98 -0
  82. package/src/auth-profiles.ts +114 -0
  83. package/src/cli.ts +444 -332
  84. package/src/console-login-check.ts +88 -0
  85. package/src/console-login-contract.ts +65 -0
  86. package/src/core/http.ts +88 -19
  87. package/src/credential-storage.ts +183 -0
  88. package/src/docs.ts +138 -0
  89. package/src/errors.ts +26 -15
  90. package/src/index.ts +29 -4
  91. package/src/named-credentials.ts +74 -0
  92. package/src/oauth-login.ts +184 -0
  93. package/src/oauth-request.ts +90 -0
  94. package/src/oauth-session.ts +258 -0
  95. package/src/ops.ts +44 -31
  96. package/src/polling-login.ts +165 -0
  97. package/src/resources/account.ts +3 -0
  98. package/src/resources/api-keys.ts +5 -0
  99. package/src/resources/definition-revisions.ts +9 -0
  100. package/src/resources/definitions.ts +25 -0
  101. package/src/resources/generate.ts +23 -0
  102. package/src/resources/generations.ts +5 -0
  103. package/src/resources/projects.ts +95 -7
  104. package/src/resources/targets.ts +32 -0
  105. package/src/schemas.ts +38 -22
  106. package/src/types.ts +404 -119
@@ -0,0 +1,244 @@
1
+ import { createHash, randomBytes } from "node:crypto";
2
+ import { closeSync, existsSync, linkSync, mkdirSync, openSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
3
+ import { dirname } from "node:path";
4
+ import { assertApiIdentity } from "./api-identity.js";
5
+ import { oauthJsonRequest } from "./oauth-request.js";
6
+ export function assertCredentialDestination(credentials, destination) {
7
+ const saved = credentials.destination;
8
+ if (!saved)
9
+ throw new Error("Saved credentials have no API and profile binding. Log in again before using them.");
10
+ if (new URL(saved.apiBaseUrl).href !== new URL(destination.apiBaseUrl).href)
11
+ throw new Error("The API destination changed. Log in again before using saved credentials.");
12
+ if ((saved.environment ?? null) !== (destination.environment ?? null) || (saved.profile ?? null) !== (destination.profile ?? null))
13
+ throw new Error("The credential environment or profile changed. Log in again before using saved credentials.");
14
+ }
15
+ /** Bind minimal identity evidence to this credential set and its configured read. */
16
+ export function credentialIdentityBinding(credentials, identity) {
17
+ return createHash("sha256").update(JSON.stringify({
18
+ destination: credentials.destination, scalars: credentials.scalars, named: credentials.named, basic: credentials.basic,
19
+ oauth: credentials.oauth ? { sessionId: credentials.oauth.sessionId, binding: credentials.oauth.binding } : undefined,
20
+ operation: identity.operation, fields: Object.entries(identity.fields).sort(([a], [b]) => a.localeCompare(b)),
21
+ })).digest("hex");
22
+ }
23
+ export function assertStoredIdentity(credentials, identity) {
24
+ if (!identity)
25
+ return;
26
+ if (!credentials.identity?.values || credentials.identity.binding !== credentialIdentityBinding(credentials, identity) || Object.keys(identity.fields).some((kind) => !Object.hasOwn(credentials.identity.values, kind))) {
27
+ throw new Error("The saved login has no matching API identity verification. Sign in again to verify the current account and organization.");
28
+ }
29
+ }
30
+ /** Bind the login to effective nonsecret settings. Scope ordering is irrelevant. */
31
+ export function sessionBinding(config) {
32
+ const url = (value) => value ? new URL(value).href : null;
33
+ return createHash("sha256").update(JSON.stringify({
34
+ apiBaseUrl: url(config.apiBaseUrl), environment: config.environment ?? null, profile: config.profile ?? null,
35
+ clientId: config.clientId ?? null, issuer: config.issuer ?? null,
36
+ tokenUrl: url(config.tokenUrl), discoveryUrl: url(config.discoveryUrl), authorizationUrl: url(config.authorizationUrl),
37
+ scopes: [...new Set(config.scopes ?? [])].sort(), audience: config.audience ?? null, resource: config.resource ?? null,
38
+ organizationParameter: config.organizationParameter ?? null,
39
+ identity: config.identity ? { operation: config.identity.operation, fields: Object.entries(config.identity.fields).sort(([a], [b]) => a.localeCompare(b)) } : null,
40
+ })).digest("hex");
41
+ }
42
+ function code(error) { return error?.code; }
43
+ function alive(pid) {
44
+ try {
45
+ process.kill(pid, 0);
46
+ return true;
47
+ }
48
+ catch (error) {
49
+ return code(error) !== "ESRCH";
50
+ }
51
+ }
52
+ export class CredentialStorageError extends Error {
53
+ }
54
+ /** Private file adapter. All writers (login, refresh and logout) use the same
55
+ * cross-process lock. Credential storage can be replaced independently of OAuth. */
56
+ export class FileCredentialStore {
57
+ path;
58
+ lockTimeoutMs;
59
+ codec;
60
+ constructor(path, lockTimeoutMs = 40_000, codec) {
61
+ this.path = path;
62
+ this.lockTimeoutMs = lockTimeoutMs;
63
+ this.codec = codec;
64
+ }
65
+ get backend() { return this.codec?.name ?? "private plaintext file"; }
66
+ /** Check storage access before starting an interactive login. */
67
+ async prepare() { await this.withLock(async () => { this.codec?.prepare(); }); }
68
+ read() {
69
+ try {
70
+ const encoded = readFileSync(this.path, "utf8");
71
+ const data = JSON.parse(this.codec ? this.codec.decode(encoded) : encoded);
72
+ if (!data || typeof data !== "object" || Array.isArray(data))
73
+ throw new Error();
74
+ return data;
75
+ }
76
+ catch (error) {
77
+ if (code(error) === "ENOENT")
78
+ return null;
79
+ if (error instanceof CredentialStorageError)
80
+ throw error;
81
+ throw new Error("Cannot read saved credentials. Check the credential store before logging in again.");
82
+ }
83
+ }
84
+ write(credentials) {
85
+ if (credentials === null) {
86
+ rmSync(this.path, { force: true });
87
+ return;
88
+ }
89
+ const temporary = this.path + "." + randomBytes(16).toString("hex") + ".tmp";
90
+ try {
91
+ const plaintext = JSON.stringify(credentials, null, 2);
92
+ writeFileSync(temporary, (this.codec ? this.codec.encode(plaintext) : plaintext) + "\n", { mode: 0o600, flag: "wx", flush: true });
93
+ renameSync(temporary, this.path);
94
+ }
95
+ finally {
96
+ rmSync(temporary, { force: true });
97
+ }
98
+ }
99
+ async withLock(work) {
100
+ mkdirSync(dirname(this.path), { recursive: true, mode: 0o700 });
101
+ const lock = this.path + ".lock";
102
+ const owner = { pid: process.pid, nonce: randomBytes(16).toString("hex") };
103
+ const claim = lock + "." + owner.nonce;
104
+ // Hard-link a complete owner record: no empty-file window if the process dies.
105
+ writeFileSync(claim, JSON.stringify(owner), { mode: 0o600, flag: "wx" });
106
+ let acquired = false;
107
+ const deadline = Date.now() + this.lockTimeoutMs;
108
+ try {
109
+ while (!acquired) {
110
+ try {
111
+ linkSync(claim, lock);
112
+ acquired = true;
113
+ }
114
+ catch (error) {
115
+ if (code(error) !== "EEXIST")
116
+ throw new Error("Cannot lock the credential store.");
117
+ this.recoverDeadOwner(lock);
118
+ if (Date.now() >= deadline)
119
+ throw new Error("The credential store is busy. Wait for the other login or refresh to finish and retry. If its process stopped, inspect " + lock + ".");
120
+ await new Promise((resolve) => setTimeout(resolve, 25));
121
+ }
122
+ }
123
+ return await work({ read: () => this.read(), write: (value) => this.write(value) });
124
+ }
125
+ finally {
126
+ if (acquired)
127
+ rmSync(lock, { force: true });
128
+ rmSync(claim, { force: true });
129
+ }
130
+ }
131
+ recoverDeadOwner(lock) {
132
+ let previous;
133
+ try {
134
+ previous = JSON.parse(readFileSync(lock, "utf8"));
135
+ }
136
+ catch {
137
+ return;
138
+ }
139
+ if (!Number.isSafeInteger(previous?.pid) || previous.pid <= 0 || typeof previous.nonce !== "string" || !/^[a-f0-9]{32}$/.test(previous.nonce) || alive(previous.pid))
140
+ return;
141
+ // One reclaimer per dead owner. Keep this empty marker: deleting it lets a
142
+ // delayed contender remove a later owner's lock (the ABA race). A double
143
+ // crash during reclamation fails closed with the bounded busy diagnostic.
144
+ const marker = lock + ".reaped-" + previous.nonce;
145
+ try {
146
+ closeSync(openSync(marker, "wx", 0o600));
147
+ }
148
+ catch {
149
+ return;
150
+ }
151
+ try {
152
+ const current = JSON.parse(readFileSync(lock, "utf8"));
153
+ if (current.nonce === previous.nonce)
154
+ rmSync(lock);
155
+ }
156
+ catch { /* another process already completed recovery */ }
157
+ }
158
+ async update(change) {
159
+ await this.withLock(async (store) => { store.write(change(store.read() ?? {})); });
160
+ }
161
+ /** Explicit local-only logout can remove an unreadable encrypted session. */
162
+ async clear() {
163
+ return this.withLock(async (store) => { const existed = existsSync(this.path); store.write(null); return existed; });
164
+ }
165
+ /** Remove under the refresh lock, then revoke the latest token outside it. */
166
+ async take() {
167
+ return this.withLock(async (store) => { const current = store.read(); store.write(null); return current; });
168
+ }
169
+ }
170
+ function validSession(credentials, config, sessionId, allowPending = false) {
171
+ const session = credentials?.oauth;
172
+ if (!session || !session.sessionId || session.sessionId !== sessionId)
173
+ throw new Error("The saved OAuth session changed or was logged out. Run login again and retry the request.");
174
+ if (session.apiBaseUrl && new URL(session.apiBaseUrl).href !== new URL(config.apiBaseUrl).href)
175
+ throw new Error("The API destination changed. Log in again.");
176
+ if (session.issuer && config.issuer && session.issuer !== config.issuer)
177
+ throw new Error("The configured issuer changed. Log in again.");
178
+ if (session.configuredClientId !== (config.clientId ?? null))
179
+ throw new Error("The OAuth client changed. Log in again.");
180
+ if (!session.binding || session.binding !== sessionBinding(config))
181
+ throw new Error("The API or OAuth configuration changed. Log in again before using saved credentials.");
182
+ if (session.refreshPending && !allowPending)
183
+ throw new Error("The previous OAuth refresh did not finish safely. Log in again; its refresh token will not be reused.");
184
+ if (typeof session.accessToken !== "string" || !session.accessToken)
185
+ throw new Error("The saved OAuth session is invalid. Log in again.");
186
+ assertStoredIdentity(credentials, config.identity);
187
+ return session;
188
+ }
189
+ /** Re-read on every request attempt; only one process may rotate the token.
190
+ * A failed or interrupted exchange requires login, since the server may have
191
+ * consumed its refresh token even when no response reached this process. */
192
+ export async function oauthSessionToken(store, config, sessionId, tokenParams = {}) {
193
+ const fresh = (session) => session.expiresAt === undefined || (Number.isFinite(session.expiresAt) && session.expiresAt > Date.now() + 60_000);
194
+ const first = validSession(store.read(), config, sessionId, true);
195
+ if (!first.refreshPending && fresh(first))
196
+ return first.accessToken;
197
+ return store.withLock(async (locked) => {
198
+ const credentials = locked.read();
199
+ const session = validSession(credentials, config, sessionId);
200
+ if (fresh(session))
201
+ return session.accessToken;
202
+ if (!session.refreshToken || !session.tokenUrl || !session.clientId)
203
+ throw new Error("The OAuth session expired and cannot be refreshed. Log in again.");
204
+ const endpoint = new URL(session.tokenUrl);
205
+ if ((endpoint.protocol !== "https:" && !(endpoint.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(endpoint.hostname))) || endpoint.username || endpoint.password || endpoint.hash)
206
+ throw new Error("The OAuth token endpoint requires HTTPS; loopback HTTP is allowed for development.");
207
+ locked.write({ ...credentials, oauth: { ...session, refreshPending: true } });
208
+ try {
209
+ const response = await oauthJsonRequest(endpoint, {
210
+ method: "POST",
211
+ headers: { "Content-Type": "application/x-www-form-urlencoded", Accept: "application/json" },
212
+ body: new URLSearchParams({ ...tokenParams, grant_type: "refresh_token", refresh_token: session.refreshToken, client_id: session.clientId }),
213
+ });
214
+ const body = response.data;
215
+ if (response.status !== 200 || !body || typeof body.access_token !== "string" || !body.access_token || typeof body.token_type !== "string" || body.token_type.toLowerCase() !== "bearer")
216
+ throw new Error();
217
+ if (body.expires_in !== undefined && (typeof body.expires_in !== "number" || !Number.isFinite(body.expires_in) || body.expires_in <= 0))
218
+ throw new Error();
219
+ if (body.refresh_token !== undefined && (typeof body.refresh_token !== "string" || !body.refresh_token))
220
+ throw new Error();
221
+ if (body.scope !== undefined && typeof body.scope !== "string")
222
+ throw new Error();
223
+ const next = {
224
+ ...session, accessToken: body.access_token, refreshToken: body.refresh_token ?? session.refreshToken,
225
+ expiresAt: typeof body.expires_in === "number" ? Date.now() + body.expires_in * 1000 : undefined,
226
+ ...(typeof body.scope === "string" ? { scopes: body.scope.split(/\s+/).filter(Boolean) } : {}), refreshPending: undefined,
227
+ };
228
+ let identity = credentials?.identity;
229
+ if (config.identity) {
230
+ if (!config.verifyIdentity || !identity)
231
+ throw new Error();
232
+ const verified = await config.verifyIdentity(next.accessToken);
233
+ assertApiIdentity(identity.values, verified.values);
234
+ identity = { ...identity, ...verified };
235
+ }
236
+ locked.write({ ...credentials, oauth: next, ...(identity ? { identity } : {}) });
237
+ return next.accessToken;
238
+ }
239
+ catch {
240
+ // Never expose an error body, a refresh token, or fetch's nested cause.
241
+ throw new Error("The OAuth session could not be refreshed safely. Log in again.");
242
+ }
243
+ });
244
+ }
package/dist/ops.d.ts CHANGED
@@ -23,6 +23,16 @@ export interface ParamSpec {
23
23
  description?: string;
24
24
  /** Settable once on the client (globals option); optional per call. */
25
25
  global?: boolean;
26
+ /** False opts out. Otherwise exact human references are resolved through
27
+ * this one read operation before the requested call. */
28
+ resolve?: false | {
29
+ via: string;
30
+ match: string[];
31
+ id: string;
32
+ idPattern?: string;
33
+ filterParam?: string;
34
+ inferred?: boolean;
35
+ };
26
36
  }
27
37
  export interface OpSpec {
28
38
  resource: string;
@@ -85,6 +95,9 @@ export interface OpSpec {
85
95
  /** The spec's security requirement: "required" fails fast without a
86
96
  * credential; "none" works anonymously; "optional" is either. */
87
97
  auth: "required" | "optional" | "none";
98
+ security?: Record<string, string[]>[];
99
+ /** Complete credential-option combinations for this operation. */
100
+ credentialOptions?: string[][];
88
101
  /** Whether calling this operation only reads, writes, or destroys state. */
89
102
  safety: "read" | "write" | "destructive";
90
103
  params: ParamSpec[];
@@ -99,7 +112,7 @@ export declare const OPS: OpSpec[];
99
112
  /** Operations present in the API Definition but omitted by this
100
113
  * generation's operation cap. Kept deliberately small: enough for honest
101
114
  * discovery and PLAN_LIMIT errors, never enough to call an absent method. */
102
- export type OmittedOpSpec = Pick<OpSpec, "resource" | "method" | "command" | "commandAlias" | "tool" | "httpMethod" | "path" | "summary" | "description" | "toolDescription" | "paginated" | "select" | "safety" | "auth" | "params" | "inputSchema">;
115
+ export type OmittedOpSpec = Pick<OpSpec, "resource" | "method" | "command" | "commandAlias" | "tool" | "httpMethod" | "path" | "summary" | "description" | "toolDescription" | "paginated" | "select" | "safety" | "auth" | "security" | "params" | "inputSchema">;
103
116
  export declare const OMITTED_OPS: OmittedOpSpec[];
104
117
  /** Parameters settable once on the client (globals option): CLI/MCP fill
105
118
  * them from flags or environment; the SDK falls back per request. */
package/dist/ops.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../src/ops.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C;;;uDAGmD;IACnD,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ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