@asteroidai/cli 1.9.139 → 1.9.142

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/asteroid.js CHANGED
@@ -1162,6 +1162,63 @@ var COMMANDS = [
1162
1162
  readOnly: false,
1163
1163
  destructive: true
1164
1164
  },
1165
+ {
1166
+ command: "environment totp",
1167
+ tool: "environment_totp",
1168
+ title: "Get a TOTP code",
1169
+ description: "Compute the current 2FA code for a secret field on the profile an environment was started with (`environment_start` with `profileId`). Name the field by its placeholder, e.g. `##MY_PORTAL.TOTP##`; `secret_get` lists a secret's placeholders. Returns `code` and `expiresInSeconds`; the seed itself is never returned. Optional `digits`, `period` and `algorithm` override what the field's otpauth URI says.",
1170
+ method: "POST",
1171
+ path: "/agents/v2/environments/{environmentId}/totp",
1172
+ args: [
1173
+ {
1174
+ name: "environmentId",
1175
+ flag: "environment-id",
1176
+ type: "string",
1177
+ required: true
1178
+ }
1179
+ ],
1180
+ query: [],
1181
+ binary: false,
1182
+ readOnly: true,
1183
+ destructive: false,
1184
+ body: {
1185
+ required: true,
1186
+ contentType: "application/json",
1187
+ fields: [
1188
+ {
1189
+ name: "field",
1190
+ flag: "field",
1191
+ type: "string",
1192
+ required: true,
1193
+ description: "The secret field to read, as the placeholder `secret get` prints for it, e.g. `##MY_PORTAL.TOTP##`. Copy it rather than building it: the item key is the secret's key upper-cased with dashes as underscores, the field key is upper-cased. The `##` and the case are optional. The field holds a base32 seed or an `otpauth://totp/` URI."
1194
+ },
1195
+ {
1196
+ name: "digits",
1197
+ flag: "digits",
1198
+ type: "integer",
1199
+ required: false,
1200
+ description: "Code length, 4 to 10. Defaults to the URI's `digits`, else 6."
1201
+ },
1202
+ {
1203
+ name: "period",
1204
+ flag: "period",
1205
+ type: "integer",
1206
+ required: false,
1207
+ description: "Seconds each code lasts. Defaults to the URI's `period`, else 30."
1208
+ },
1209
+ {
1210
+ name: "algorithm",
1211
+ flag: "algorithm",
1212
+ type: "string",
1213
+ required: false,
1214
+ description: "Hash. Defaults to the URI's `algorithm`, else sha1.",
1215
+ enum: ["sha1", "sha256", "sha512"]
1216
+ }
1217
+ ],
1218
+ files: [],
1219
+ credentialOrganization: false
1220
+ }
1221
+ },
1165
1222
  {
1166
1223
  command: "event-type list",
1167
1224
  tool: "event_types_list",
@@ -7434,7 +7491,7 @@ var ApiError = class extends Error {
7434
7491
  status;
7435
7492
  body;
7436
7493
  };
7437
- var VERSION = "1.9.139";
7494
+ var VERSION = "1.9.142";
7438
7495
  function problem(status, body, fallback) {
7439
7496
  if (body && typeof body === "object") {
7440
7497
  const record2 = body;
package/dist/core.js CHANGED
@@ -1183,6 +1183,63 @@ var COMMANDS = [
1183
1183
  readOnly: false,
1184
1184
  destructive: true
1185
1185
  },
1186
+ {
1187
+ command: "environment totp",
1188
+ tool: "environment_totp",
1189
+ title: "Get a TOTP code",
1190
+ description: "Compute the current 2FA code for a secret field on the profile an environment was started with (`environment_start` with `profileId`). Name the field by its placeholder, e.g. `##MY_PORTAL.TOTP##`; `secret_get` lists a secret's placeholders. Returns `code` and `expiresInSeconds`; the seed itself is never returned. Optional `digits`, `period` and `algorithm` override what the field's otpauth URI says.",
1191
+ method: "POST",
1192
+ path: "/agents/v2/environments/{environmentId}/totp",
1193
+ args: [
1194
+ {
1195
+ name: "environmentId",
1196
+ flag: "environment-id",
1197
+ type: "string",
1198
+ required: true
1199
+ }
1200
+ ],
1201
+ query: [],
1202
+ binary: false,
1203
+ readOnly: true,
1204
+ destructive: false,
1205
+ body: {
1206
+ required: true,
1207
+ contentType: "application/json",
1208
+ fields: [
1209
+ {
1210
+ name: "field",
1211
+ flag: "field",
1212
+ type: "string",
1213
+ required: true,
1214
+ description: "The secret field to read, as the placeholder `secret get` prints for it, e.g. `##MY_PORTAL.TOTP##`. Copy it rather than building it: the item key is the secret's key upper-cased with dashes as underscores, the field key is upper-cased. The `##` and the case are optional. The field holds a base32 seed or an `otpauth://totp/` URI."
1215
+ },
1216
+ {
1217
+ name: "digits",
1218
+ flag: "digits",
1219
+ type: "integer",
1220
+ required: false,
1221
+ description: "Code length, 4 to 10. Defaults to the URI's `digits`, else 6."
1222
+ },
1223
+ {
1224
+ name: "period",
1225
+ flag: "period",
1226
+ type: "integer",
1227
+ required: false,
1228
+ description: "Seconds each code lasts. Defaults to the URI's `period`, else 30."
1229
+ },
1230
+ {
1231
+ name: "algorithm",
1232
+ flag: "algorithm",
1233
+ type: "string",
1234
+ required: false,
1235
+ description: "Hash. Defaults to the URI's `algorithm`, else sha1.",
1236
+ enum: ["sha1", "sha256", "sha512"]
1237
+ }
1238
+ ],
1239
+ files: [],
1240
+ credentialOrganization: false
1241
+ }
1242
+ },
1186
1243
  {
1187
1244
  command: "event-type list",
1188
1245
  tool: "event_types_list",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteroidai/cli",
3
- "version": "1.9.139",
3
+ "version": "1.9.142",
4
4
  "description": "The asteroid command-line interface for the Asteroid platform.",
5
5
  "type": "module",
6
6
  "license": "MIT",