@cleocode/contracts 2026.9.25 → 2026.10.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.
- package/dist/data-accessor.d.ts +44 -4
- package/dist/data-accessor.d.ts.map +1 -1
- package/dist/data-accessor.js.map +1 -1
- package/dist/exit-codes.d.ts +9 -0
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +9 -0
- package/dist/exit-codes.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/nexus-account.d.ts +106 -1
- package/dist/nexus-account.d.ts.map +1 -1
- package/dist/nexus-account.js +23 -0
- package/dist/nexus-account.js.map +1 -1
- package/dist/nexus-cloud.d.ts +703 -0
- package/dist/nexus-cloud.d.ts.map +1 -0
- package/dist/nexus-cloud.js +406 -0
- package/dist/nexus-cloud.js.map +1 -0
- package/dist/operations/output-contracts-data.js +1 -1
- package/dist/operations/output-contracts-data.js.map +1 -1
- package/dist/operations/tasks.d.ts +11 -2
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/tasks.js.map +1 -1
- package/dist/task.d.ts +27 -1
- package/dist/task.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/data-accessor.ts +47 -4
- package/src/exit-codes.ts +9 -0
- package/src/index.ts +68 -0
- package/src/nexus-account.ts +129 -0
- package/src/nexus-cloud.ts +644 -0
- package/src/operations/output-contracts-data.ts +1 -1
- package/src/operations/tasks.ts +11 -2
- package/src/task.ts +28 -1
package/dist/nexus-account.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare const NEXUS_CLI_CLIENT_ID = "cleo-cli";
|
|
|
28
28
|
*/
|
|
29
29
|
export declare const NEXUS_LOGIN_TARGET = "nexus";
|
|
30
30
|
/** Stable error codes of the Nexus account flows. */
|
|
31
|
-
export declare const NEXUS_ACCOUNT_ERROR_CODES: readonly ["E_NEXUS_INVALID_API_URL", "E_NEXUS_NOT_SIGNED_IN", "E_NEXUS_SESSION_EXPIRED", "E_NEXUS_DEVICE_CODE_START_FAILED", "E_NEXUS_UNTRUSTED_VERIFICATION_URI", "E_NEXUS_DEVICE_CODE_EXPIRED", "E_NEXUS_ACCESS_DENIED", "E_NEXUS_DEVICE_CODE_FAILED", "E_NEXUS_REVOKE_FAILED", "E_NEXUS_REQUEST_FAILED", "E_NEXUS_NOT_A_PROJECT", "E_NEXUS_INVALID_LABEL"];
|
|
31
|
+
export declare const NEXUS_ACCOUNT_ERROR_CODES: readonly ["E_NEXUS_INVALID_API_URL", "E_NEXUS_NOT_SIGNED_IN", "E_NEXUS_SESSION_EXPIRED", "E_NEXUS_DEVICE_CODE_START_FAILED", "E_NEXUS_UNTRUSTED_VERIFICATION_URI", "E_NEXUS_DEVICE_CODE_EXPIRED", "E_NEXUS_ACCESS_DENIED", "E_NEXUS_DEVICE_CODE_FAILED", "E_NEXUS_REVOKE_FAILED", "E_NEXUS_REQUEST_FAILED", "E_NEXUS_NOT_A_PROJECT", "E_NEXUS_INVALID_LABEL", "E_NEXUS_UNREACHABLE", "E_NEXUS_REVOKE_PENDING", "E_NEXUS_DEVICE_SIGNED_OUT", "E_NEXUS_DEVICE_REVOKED", "E_NEXUS_CREDENTIAL_COMPROMISED", "E_NEXUS_INSUFFICIENT_SCOPE", "E_NEXUS_REPLICA_COPIED", "E_NEXUS_BUSY", "E_NEXUS_ACCOUNT_AMBIGUOUS", "E_NEXUS_DEVICE_REQUIRED", "E_NEXUS_LINK_FILE_UNSUPPORTED"];
|
|
32
32
|
/** One of {@link NEXUS_ACCOUNT_ERROR_CODES}. */
|
|
33
33
|
export type NexusAccountErrorCode = (typeof NEXUS_ACCOUNT_ERROR_CODES)[number];
|
|
34
34
|
/** The signed-in user, as `/v1/account/me` reports it. */
|
|
@@ -93,6 +93,19 @@ export interface NexusAccountStatus {
|
|
|
93
93
|
/** One human line: "signed in as a@b.c (Org)", "session expired", "not signed in". */
|
|
94
94
|
summary: string;
|
|
95
95
|
}
|
|
96
|
+
/** The enrolled device, as `cleo login nexus` reports it (device contract §3.3 step 10). */
|
|
97
|
+
export interface NexusLoginDevice {
|
|
98
|
+
/** The Nexus device id (UUIDv7, scoped to this CLEO home, origin and user). */
|
|
99
|
+
deviceId: string;
|
|
100
|
+
/** Display name the server holds. */
|
|
101
|
+
name: string;
|
|
102
|
+
/** Server-side state (`active` right after a login). */
|
|
103
|
+
state: string;
|
|
104
|
+
/** Credential profile: `device` or `read-only`. */
|
|
105
|
+
profile: string | null;
|
|
106
|
+
/** `true` when E1 created the device row, `false` when it re-enrolled it. */
|
|
107
|
+
created: boolean | null;
|
|
108
|
+
}
|
|
96
109
|
/** Result of `cleo login nexus` (never carries the token). */
|
|
97
110
|
export interface NexusLoginResult {
|
|
98
111
|
/** API origin the session belongs to. */
|
|
@@ -107,6 +120,10 @@ export interface NexusLoginResult {
|
|
|
107
120
|
credentialsPath: string;
|
|
108
121
|
/** Non-fatal problems, e.g. the account lookup failed after a good login. */
|
|
109
122
|
warnings: string[];
|
|
123
|
+
/** The enrolled device; present only with device credentials (the default; off with `CLEO_NEXUS_DEVICE=0`). */
|
|
124
|
+
device?: NexusLoginDevice;
|
|
125
|
+
/** Scopes of the stored device credential; present only with device credentials. */
|
|
126
|
+
scopes?: string[];
|
|
110
127
|
}
|
|
111
128
|
/** Result of `cleo logout nexus`. */
|
|
112
129
|
export interface NexusLogoutResult {
|
|
@@ -124,6 +141,53 @@ export interface NexusLogoutResult {
|
|
|
124
141
|
/** Non-fatal problems. */
|
|
125
142
|
warnings: string[];
|
|
126
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* What happened to one device's sign-out (E9) or revoke (E10) in
|
|
146
|
+
* `cleo logout nexus [--revoke]` with device credentials (the default; `CLEO_NEXUS_DEVICE=0` turns them off) (cleo-nexus
|
|
147
|
+
* device contract §3.5, M3). Holds no secret.
|
|
148
|
+
*
|
|
149
|
+
* - `confirmed`: the server answered 200, or 401 `device-signed-out` /
|
|
150
|
+
* `device-revoked` (a revoke accepts only `device-revoked`);
|
|
151
|
+
* - `pending`: no usable answer (network, timeout, 429, 5xx, or a route the
|
|
152
|
+
* server does not have yet); the credentials stay in their slot and the
|
|
153
|
+
* next `cleo logout nexus`, `cleo login nexus` or cloud command retries;
|
|
154
|
+
* - `unconfirmed`: every credential held was refused as stale, so the CLI
|
|
155
|
+
* cannot finish it; the slot is kept, and a sign-out or revoke of the
|
|
156
|
+
* device on cleocode.dev lets the next retry confirm it;
|
|
157
|
+
* - `signed-out`: a revoke found the device already signed out (E10 401
|
|
158
|
+
* `device-signed-out`). Its credentials are dead, so the CLI cannot revoke
|
|
159
|
+
* it; the revoke slot is cleared (never retried) and the device must be
|
|
160
|
+
* revoked on cleocode.dev.
|
|
161
|
+
*/
|
|
162
|
+
export type NexusDeviceEndOutcome = 'confirmed' | 'pending' | 'unconfirmed' | 'signed-out';
|
|
163
|
+
/** One device row of a {@link NexusDeviceLogoutResult}. */
|
|
164
|
+
export interface NexusDeviceLogoutRow {
|
|
165
|
+
/** Nexus user id of the entry. */
|
|
166
|
+
userId: string;
|
|
167
|
+
/** The device the request ended. */
|
|
168
|
+
deviceId: string;
|
|
169
|
+
/** `sign-out` (E9) or `revoke` (E10). */
|
|
170
|
+
action: 'sign-out' | 'revoke';
|
|
171
|
+
/** `true` for a replaced device's leftover request retried from `retired`. */
|
|
172
|
+
retired: boolean;
|
|
173
|
+
/** Server-side outcome. */
|
|
174
|
+
outcome: NexusDeviceEndOutcome;
|
|
175
|
+
/** `true` when a confirmed revoke removed the (origin, user) entry from `nexus-device.json`. */
|
|
176
|
+
removedLocally: boolean;
|
|
177
|
+
}
|
|
178
|
+
/** Result of `cleo logout nexus [--revoke]` with device credentials. Holds no secret. */
|
|
179
|
+
export interface NexusDeviceLogoutResult {
|
|
180
|
+
/** API origin. */
|
|
181
|
+
apiUrl: string;
|
|
182
|
+
/** `sign-out` or `revoke` (`--revoke`). */
|
|
183
|
+
action: 'sign-out' | 'revoke';
|
|
184
|
+
/** One row per device request settled or retried in this run, sorted by user then device. */
|
|
185
|
+
devices: NexusDeviceLogoutRow[];
|
|
186
|
+
/** The 9.24 session sign-out, when a leftover session was found for the origin. */
|
|
187
|
+
session: NexusLogoutResult | null;
|
|
188
|
+
/** Non-fatal problems: every non-`confirmed` row is named here. */
|
|
189
|
+
warnings: string[];
|
|
190
|
+
}
|
|
127
191
|
/**
|
|
128
192
|
* The binding of a local CLEO project to its Nexus registration, persisted in
|
|
129
193
|
* the project's machine-local `.cleo/nexus-link.json`, keyed by API origin.
|
|
@@ -143,6 +207,30 @@ export interface NexusProjectLink {
|
|
|
143
207
|
streamId: string;
|
|
144
208
|
/** ISO time of the last successful link. */
|
|
145
209
|
linkedAt: string;
|
|
210
|
+
/**
|
|
211
|
+
* This store's replica id as attached on the server (device contract
|
|
212
|
+
* §3.6, §3.7). A cache, not the source of truth: the store's active
|
|
213
|
+
* `_sync_replica` row is. Absent before the first device-credential link.
|
|
214
|
+
*/
|
|
215
|
+
replicaId?: string;
|
|
216
|
+
/** The Nexus device id that attached {@link NexusProjectLink.replicaId}. */
|
|
217
|
+
nexusDeviceId?: string;
|
|
218
|
+
/** ISO time the replica was last attached or confirmed. */
|
|
219
|
+
attachedAt?: string;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* What `cleo project link` did for this machine's copy of the project with a
|
|
223
|
+
* device credential (contract §3.6 steps 3 to 5). Holds no path or secret.
|
|
224
|
+
*/
|
|
225
|
+
export interface NexusReplicaAttachment {
|
|
226
|
+
/** The store's replica id (UUIDv7), now attached on the server. */
|
|
227
|
+
replicaId: string;
|
|
228
|
+
/** The Nexus device that holds it. */
|
|
229
|
+
deviceId: string;
|
|
230
|
+
/** The retired replica id when this link rebound the store (a copy, or a re-enrolled device). */
|
|
231
|
+
reboundFrom: string | null;
|
|
232
|
+
/** Server time the presence report was received, or `null` when sending it failed (see warnings). */
|
|
233
|
+
presenceAt: string | null;
|
|
146
234
|
}
|
|
147
235
|
/** Result of `cleo project link`. */
|
|
148
236
|
export interface NexusProjectLinkResult {
|
|
@@ -156,5 +244,22 @@ export interface NexusProjectLinkResult {
|
|
|
156
244
|
alreadyLinked: boolean;
|
|
157
245
|
/** Absolute path of the local binding file. */
|
|
158
246
|
linkPath: string;
|
|
247
|
+
/**
|
|
248
|
+
* The replica attach and presence report, with device credentials; `null`
|
|
249
|
+
* with the 9.24 session (`CLEO_NEXUS_DEVICE=0`), which cannot attach.
|
|
250
|
+
*/
|
|
251
|
+
replica: NexusReplicaAttachment | null;
|
|
252
|
+
/**
|
|
253
|
+
* Why this machine's copy was not attached, when device mode tried and
|
|
254
|
+
* failed (for example `E_NEXUS_REPLICA_COPIED`); `null` otherwise. The same
|
|
255
|
+
* text is also in {@link NexusProjectLinkResult.warnings}.
|
|
256
|
+
*/
|
|
257
|
+
attachError: {
|
|
258
|
+
code: string;
|
|
259
|
+
message: string;
|
|
260
|
+
fix: string | null;
|
|
261
|
+
} | null;
|
|
262
|
+
/** Non-fatal problems (for example, presence could not be sent). */
|
|
263
|
+
warnings: string[];
|
|
159
264
|
}
|
|
160
265
|
//# sourceMappingURL=nexus-account.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nexus-account.d.ts","sourceRoot":"","sources":["../src/nexus-account.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wCAAwC;AACxC,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAEhE,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C,qDAAqD;AACrD,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"nexus-account.d.ts","sourceRoot":"","sources":["../src/nexus-account.ts"],"names":[],"mappings":"AAAA;;;;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AAW,sBAAsB;IACrC,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,iGAAiG;IACjG,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,qGAAqG;IACrG,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,qCAAqC;AACrC,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;;OAIG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACvC;;;;OAIG;IACH,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IAC1E,oEAAoE;IACpE,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
package/dist/nexus-account.js
CHANGED
|
@@ -41,6 +41,29 @@ export const NEXUS_ACCOUNT_ERROR_CODES = [
|
|
|
41
41
|
'E_NEXUS_REQUEST_FAILED',
|
|
42
42
|
'E_NEXUS_NOT_A_PROJECT',
|
|
43
43
|
'E_NEXUS_INVALID_LABEL',
|
|
44
|
+
// Device credentials (cleo-nexus device contract §3.3, §4.0.4; T12868).
|
|
45
|
+
/** No answer from the API (network error or timeout). */
|
|
46
|
+
'E_NEXUS_UNREACHABLE',
|
|
47
|
+
/** `cleo login nexus` while a revoke of this device is unconfirmed (§3.3, v2.9). */
|
|
48
|
+
'E_NEXUS_REVOKE_PENDING',
|
|
49
|
+
/** The device was signed out (E9, E11): 401 `device-signed-out`. */
|
|
50
|
+
'E_NEXUS_DEVICE_SIGNED_OUT',
|
|
51
|
+
/** The device was revoked (E10, E12): 401 `device-revoked`. */
|
|
52
|
+
'E_NEXUS_DEVICE_REVOKED',
|
|
53
|
+
/** A credential replaced or revoked elsewhere, or a `rotation-conflict` (R2). */
|
|
54
|
+
'E_NEXUS_CREDENTIAL_COMPROMISED',
|
|
55
|
+
/** The device credential lacks the scope (a read-only device): 403 `insufficient-scope`. */
|
|
56
|
+
'E_NEXUS_INSUFFICIENT_SCOPE',
|
|
57
|
+
/** A replica attach from a second device: 409 `replica-copied`. */
|
|
58
|
+
'E_NEXUS_REPLICA_COPIED',
|
|
59
|
+
/** Another cleo process holds the device file or an upgrade in flight; retry. */
|
|
60
|
+
'E_NEXUS_BUSY',
|
|
61
|
+
/** Several accounts hold a device credential on one origin and none was named. */
|
|
62
|
+
'E_NEXUS_ACCOUNT_AMBIGUOUS',
|
|
63
|
+
/** An option that needs device credentials (`--read-only`) with `CLEO_NEXUS_DEVICE=0`. */
|
|
64
|
+
'E_NEXUS_DEVICE_REQUIRED',
|
|
65
|
+
/** `.cleo/nexus-link.json` is in a format this CLEO cannot update (written by a newer CLEO). */
|
|
66
|
+
'E_NEXUS_LINK_FILE_UNSUPPORTED',
|
|
44
67
|
];
|
|
45
68
|
/** The signed-in user, as `/v1/account/me` reports it. */
|
|
46
69
|
export const nexusAccountUserSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nexus-account.js","sourceRoot":"","sources":["../src/nexus-account.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wCAAwC;AACxC,MAAM,CAAC,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAEhE,2EAA2E;AAC3E,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAE1C,qDAAqD;AACrD,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,yBAAyB;IACzB,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