@senticor/hive 1.67.1 → 1.69.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.
Files changed (3) hide show
  1. package/chive.cjs +1 -1
  2. package/hive.cjs +56 -10
  3. package/package.json +1 -1
package/chive.cjs CHANGED
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.43_@swc+helpers@0.5.23__jiti@2.7.0_postcss@8.5.30_supports-co_e29a584da27b04f558275b0592907167/node_modules/tsup/assets/cjs_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.43_@swc+helpers@0.5.23__jiti@2.7.0_postcss@8.5.31_supports-co_52216a32a8b074e4b0705a3c327edd4f/node_modules/tsup/assets/cjs_shims.js
31
31
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
32
32
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
33
33
 
package/hive.cjs CHANGED
@@ -42,10 +42,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
42
42
  mod
43
43
  ));
44
44
 
45
- // ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.43_@swc+helpers@0.5.23__jiti@2.7.0_postcss@8.5.30_supports-co_e29a584da27b04f558275b0592907167/node_modules/tsup/assets/cjs_shims.js
45
+ // ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.43_@swc+helpers@0.5.23__jiti@2.7.0_postcss@8.5.31_supports-co_52216a32a8b074e4b0705a3c327edd4f/node_modules/tsup/assets/cjs_shims.js
46
46
  var getImportMetaUrl, importMetaUrl;
47
47
  var init_cjs_shims = __esm({
48
- "../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.43_@swc+helpers@0.5.23__jiti@2.7.0_postcss@8.5.30_supports-co_e29a584da27b04f558275b0592907167/node_modules/tsup/assets/cjs_shims.js"() {
48
+ "../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.43_@swc+helpers@0.5.23__jiti@2.7.0_postcss@8.5.31_supports-co_52216a32a8b074e4b0705a3c327edd4f/node_modules/tsup/assets/cjs_shims.js"() {
49
49
  "use strict";
50
50
  getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
51
51
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
@@ -10376,22 +10376,22 @@ var artifactName = injectedString(
10376
10376
  true ? "hive-cli" : void 0
10377
10377
  ) || String(process.env.HIVE_CLI_ARTIFACT_NAME || "hive-cli").trim() || "hive-cli";
10378
10378
  var packageVersion = injectedString(
10379
- true ? "1.67.1" : void 0
10379
+ true ? "1.69.0" : void 0
10380
10380
  ) || String(process.env.HIVE_CLI_PACKAGE_VERSION || "").trim() || readPackageVersion();
10381
10381
  var releaseVersion = injectedString(
10382
- true ? "1.67.1" : void 0
10382
+ true ? "1.69.0" : void 0
10383
10383
  ) || String(process.env.HIVE_CLI_RELEASE_VERSION || "").trim() || packageVersion || "dev";
10384
10384
  var releaseChannel = injectedString(
10385
10385
  true ? "final" : void 0
10386
10386
  ) || String(process.env.HIVE_CLI_RELEASE_CHANNEL || "").trim() || (releaseVersion.includes("-rc.") ? "rc" : releaseVersion === "dev" ? "dev" : "final");
10387
10387
  var buildCommit = injectedString(
10388
- true ? "deeefb3a7297d3e9f35476350db673ba289f5a25" : void 0
10388
+ true ? "d49ed87879a92437dc482ad7759e67a5f36c33b6" : void 0
10389
10389
  ) || String(process.env.HIVE_CLI_BUILD_COMMIT || "").trim() || "unknown";
10390
10390
  var buildTimestamp = injectedString(
10391
- true ? "2026-10-22T15:17:31Z" : void 0
10391
+ true ? "2026-10-22T16:09:27Z" : void 0
10392
10392
  ) || String(process.env.HIVE_CLI_BUILD_TIMESTAMP || "").trim() || "unknown";
10393
10393
  var ociRef = injectedString(
10394
- true ? "registry.onstackit.cloud/senticor/hive-cli:1.67.1" : void 0
10394
+ true ? "registry.onstackit.cloud/senticor/hive-cli:1.69.0" : void 0
10395
10395
  ) || String(process.env.HIVE_CLI_OCI_REF || "").trim() || `registry.onstackit.cloud/senticor/${artifactName}:${releaseVersion}`;
10396
10396
  var RELEASE_INFO = Object.freeze({
10397
10397
  packageVersion,
@@ -11502,12 +11502,21 @@ var config = defineCommand({
11502
11502
  }
11503
11503
  });
11504
11504
  var auth = defineCommand({
11505
- meta: { name: "auth", description: "Authentication aliases (login, logout, status)" },
11505
+ meta: { name: "auth", description: "Authentication aliases (login, logout, status) and the server view of you (me)" },
11506
11506
  args: withArgs(),
11507
11507
  default: "status",
11508
11508
  subCommands: {
11509
11509
  login,
11510
11510
  logout,
11511
+ me: defineCommand({
11512
+ meta: { name: "me", description: "Show who the API says you are: memberships, the roles you hold in each tenant, platform admin (GET /api/me)" },
11513
+ args: withArgs({ activeOnly: { type: "boolean", description: "Only active memberships (leave out suspended and revoked)" } }),
11514
+ async run({ args }) {
11515
+ const { client, fmt } = ctx(args);
11516
+ const status2 = args.activeOnly ? "active" : "all";
11517
+ return output((await client.get(`/api/me?membershipStatus=${status2}`)).data, fmt);
11518
+ }
11519
+ }),
11511
11520
  status: defineCommand({
11512
11521
  meta: { name: "status", description: "Show active auth/session state" },
11513
11522
  args: withArgs(),
@@ -29033,7 +29042,9 @@ var missionArgs = withArgs({
29033
29042
  tenantWideRead: { type: "string", description: "Mission access policy: tenant-wide read (true|false)" },
29034
29043
  yes: { type: "boolean", description: "Confirm a sensitive change (e.g. widening tenant-wide read)" },
29035
29044
  dryRun: { type: "boolean", description: "Print the request that would be sent; perform no write" },
29036
- pin: { type: "boolean", description: "Pin created/reused mission as CLI context" }
29045
+ pin: { type: "boolean", description: "Pin created/reused mission as CLI context" },
29046
+ view: { type: "string", description: "mission list: summary (public summaries) or full (raw mission cells, default)" },
29047
+ allTenants: { type: "boolean", description: "mission list: summaries across every tenant you are an active member of (GET /api/me/missions)" }
29037
29048
  });
29038
29049
  var missionTransferArgs = withArgs({
29039
29050
  out: { type: "string", description: "mission export: directory to write export.jsonl and objects/ into (must not hold an export yet)" },
@@ -29055,6 +29066,41 @@ function readPrincipalMap(file2) {
29055
29066
  }
29056
29067
  return raw;
29057
29068
  }
29069
+ var MISSION_PAGE_MAX = 200;
29070
+ var MISSION_LIST_MAX_PAGES = 100;
29071
+ async function listMissionPages(client, args) {
29072
+ const allTenants = Boolean(args.allTenants);
29073
+ const view = String(args.view || (allTenants ? "summary" : "full"));
29074
+ if (view !== "summary" && view !== "full") throw commandError("INVALID_VIEW", 2, "--view must be summary or full");
29075
+ if (allTenants && view !== "summary") throw commandError("INVALID_VIEW", 2, "--all-tenants lists summaries only; drop --view full or --all-tenants");
29076
+ const path10 = allTenants ? "/api/me/missions" : "/api/missions";
29077
+ const cap = args.limit === void 0 ? Infinity : Number(args.limit);
29078
+ if (args.limit !== void 0 && (!Number.isInteger(cap) || cap < 1)) {
29079
+ throw commandError("INVALID_LIMIT", 2, "--limit must be a positive integer");
29080
+ }
29081
+ const missions = [];
29082
+ const failures = [];
29083
+ let cursor = args.cursor ? String(args.cursor) : null;
29084
+ let nextCursor = null;
29085
+ for (let page = 0; page < MISSION_LIST_MAX_PAGES; page += 1) {
29086
+ const qs = new URLSearchParams({ view, limit: String(Math.min(MISSION_PAGE_MAX, cap - missions.length)) });
29087
+ if (cursor) qs.set("cursor", cursor);
29088
+ const res = await client.get(`${path10}?${qs}`);
29089
+ const body = asObject2(res.data);
29090
+ if (!isHttpOk(res.status)) return body;
29091
+ if (view === "summary" && body.view !== "summary") {
29092
+ throw commandError("SUMMARY_UNSUPPORTED", 1, "this API does not offer the mission summary view; use --view full");
29093
+ }
29094
+ if (Array.isArray(body.missions)) missions.push(...body.missions);
29095
+ if (Array.isArray(body.failures)) failures.push(...body.failures);
29096
+ nextCursor = body.hasMore === true && typeof body.nextCursor === "string" ? body.nextCursor : null;
29097
+ if (!nextCursor || missions.length >= cap) break;
29098
+ cursor = nextCursor;
29099
+ }
29100
+ const paging = { hasMore: nextCursor !== null, nextCursor };
29101
+ if (allTenants) return { ok: true, view: "summary", scope: "activeMemberships", missions, failures, ...paging };
29102
+ return view === "summary" ? { ok: true, view: "summary", missions, failures, ...paging } : { ok: true, missions, rows: missions, ...paging };
29103
+ }
29058
29104
  var mission = defineCommand({
29059
29105
  meta: { name: "mission", description: "Missions, their cases, bundles and members" },
29060
29106
  args: missionArgs,
@@ -29065,7 +29111,7 @@ var mission = defineCommand({
29065
29111
  args: missionArgs,
29066
29112
  async run({ args }) {
29067
29113
  const { client, fmt } = ctx(args);
29068
- return output((await client.get(`/api/missions?limit=${args.limit || 50}`)).data, fmt);
29114
+ return output(await listMissionPages(client, args), fmt);
29069
29115
  }
29070
29116
  }),
29071
29117
  get: defineCommand({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@senticor/hive",
3
- "version": "1.67.1",
3
+ "version": "1.69.0",
4
4
  "description": "Cognitive Hive OS — unified CLI",
5
5
  "type": "commonjs",
6
6
  "bin": {