@senticor/hive 1.134.0 → 1.135.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 (2) hide show
  1. package/hive.cjs +48 -8
  2. package/package.json +1 -1
package/hive.cjs CHANGED
@@ -10511,22 +10511,22 @@ var artifactName = injectedString(
10511
10511
  true ? "hive-cli" : void 0
10512
10512
  ) || String(process.env.HIVE_CLI_ARTIFACT_NAME || "hive-cli").trim() || "hive-cli";
10513
10513
  var packageVersion = injectedString(
10514
- true ? "1.134.0" : void 0
10514
+ true ? "1.135.0" : void 0
10515
10515
  ) || String(process.env.HIVE_CLI_PACKAGE_VERSION || "").trim() || readPackageVersion();
10516
10516
  var releaseVersion = injectedString(
10517
- true ? "1.134.0" : void 0
10517
+ true ? "1.135.0" : void 0
10518
10518
  ) || String(process.env.HIVE_CLI_RELEASE_VERSION || "").trim() || packageVersion || "dev";
10519
10519
  var releaseChannel = injectedString(
10520
10520
  true ? "final" : void 0
10521
10521
  ) || String(process.env.HIVE_CLI_RELEASE_CHANNEL || "").trim() || (releaseVersion.includes("-rc.") ? "rc" : releaseVersion === "dev" ? "dev" : "final");
10522
10522
  var buildCommit = injectedString(
10523
- true ? "19343dd0f9de198f867ea07f8b6361379ceb6622" : void 0
10523
+ true ? "2dcdc064620ccf9ed99765b54edf01c4202bce6e" : void 0
10524
10524
  ) || String(process.env.HIVE_CLI_BUILD_COMMIT || "").trim() || "unknown";
10525
10525
  var buildTimestamp = injectedString(
10526
- true ? "2026-11-11T14:53:59Z" : void 0
10526
+ true ? "2026-11-11T15:38:30Z" : void 0
10527
10527
  ) || String(process.env.HIVE_CLI_BUILD_TIMESTAMP || "").trim() || "unknown";
10528
10528
  var ociRef = injectedString(
10529
- true ? "registry.onstackit.cloud/senticor/hive-cli:1.134.0" : void 0
10529
+ true ? "registry.onstackit.cloud/senticor/hive-cli:1.135.0" : void 0
10530
10530
  ) || String(process.env.HIVE_CLI_OCI_REF || "").trim() || `registry.onstackit.cloud/senticor/${artifactName}:${releaseVersion}`;
10531
10531
  var RELEASE_INFO = Object.freeze({
10532
10532
  packageVersion,
@@ -33444,7 +33444,7 @@ async function changeRoles2(args, action) {
33444
33444
  };
33445
33445
  }
33446
33446
  var members2 = defineCommand({
33447
- meta: { name: "members", description: "Manage the active tenant's members with your own user-manager role" },
33447
+ meta: { name: "members", description: "Manage the active tenant's members with your own user-manager or tenant-admin role" },
33448
33448
  args: withOwnArgs({ ...whoArgs, ...roleArgs, ...admitArgs, ...reasonArg }),
33449
33449
  default: "list",
33450
33450
  subCommands: {
@@ -34721,7 +34721,14 @@ var MEMBERSHIP_ERROR_CODES = {
34721
34721
  GRANTEE_MEMBERSHIP_NOT_ACTIVE: "GRANTEE_MEMBERSHIP_NOT_ACTIVE",
34722
34722
  CROSS_TENANT_GRANT_FORBIDDEN: "CROSS_TENANT_GRANT_FORBIDDEN",
34723
34723
  OWNER_CANNOT_BE_REMOVED: "OWNER_CANNOT_BE_REMOVED",
34724
- CANNOT_REMOVE_FROM_TENANT_WIDE: "CANNOT_REMOVE_FROM_TENANT_WIDE"
34724
+ CANNOT_REMOVE_FROM_TENANT_WIDE: "CANNOT_REMOVE_FROM_TENANT_WIDE",
34725
+ // #469: tenant admins manage any mission's members and hand a mission over.
34726
+ MISSION_MEMBER_ADMIN_FORBIDDEN: "MISSION_MEMBER_ADMIN_FORBIDDEN",
34727
+ MISSION_OWNER_TRANSFER_FORBIDDEN: "MISSION_OWNER_TRANSFER_FORBIDDEN",
34728
+ MISSION_OWNER_NOT_TENANT_MEMBER: "MISSION_OWNER_NOT_TENANT_MEMBER",
34729
+ MISSION_OWNER_TARGET_REQUIRED: "MISSION_OWNER_TARGET_REQUIRED",
34730
+ MISSION_OWNER_TARGET_INVALID: "MISSION_OWNER_TARGET_INVALID",
34731
+ MISSION_OWNER_TRANSFER_UNAVAILABLE: "MISSION_OWNER_TRANSFER_UNAVAILABLE"
34725
34732
  };
34726
34733
  function assertMissionMembershipOk(status2, data, action) {
34727
34734
  if (isHttpOk(status2)) return;
@@ -35158,6 +35165,7 @@ var missionArgs = withArgs({
35158
35165
  principalEmail: { type: "string", description: "Grantee email (resolved to an OIDC sub server-side)" },
35159
35166
  principalSub: { type: "string", description: "Grantee OIDC sub" },
35160
35167
  email: { type: "string", description: "Grantee email for `members admit` (works before first login; alias of --principal-email)" },
35168
+ reason: { type: "string", description: "mission members handover: why, recorded in the audit row" },
35161
35169
  tenantWideRead: { type: "string", description: "Mission access policy: tenant-wide read (true|false)" },
35162
35170
  yes: { type: "boolean", description: "Confirm a sensitive change (e.g. widening tenant-wide read)" },
35163
35171
  dryRun: { type: "boolean", description: "Print the request that would be sent; perform no write" },
@@ -35411,7 +35419,7 @@ var mission = defineCommand({
35411
35419
  }
35412
35420
  }),
35413
35421
  members: defineCommand({
35414
- meta: { name: "members", description: "Mission membership \u2014 list, check, grant, admit (by email, pre-login), revoke (+ invite/accept)" },
35422
+ meta: { name: "members", description: "Mission membership \u2014 list, check, grant, admit (by email, pre-login), revoke, handover (+ invite/accept)" },
35415
35423
  args: missionArgs,
35416
35424
  default: "list",
35417
35425
  subCommands: {
@@ -35575,6 +35583,38 @@ var mission = defineCommand({
35575
35583
  fmt
35576
35584
  );
35577
35585
  }
35586
+ }),
35587
+ handover: defineCommand({
35588
+ meta: {
35589
+ name: "handover",
35590
+ alias: "transfer-owner",
35591
+ description: "Hand the mission to another owner (tenant admin, #469). --principal-email | --principal-sub, --yes. The previous owner stays a member."
35592
+ },
35593
+ args: missionArgs,
35594
+ async run({ args }) {
35595
+ const { client, fmt } = ctx(args);
35596
+ printContextNotice(args, { mission: true });
35597
+ const missionId = requireMissionContext(args, "mission members handover");
35598
+ const principal = resolvePrincipal(args);
35599
+ const reason = String(args.reason ?? "").trim();
35600
+ const body = { ...principal, ...reason ? { reason } : {} };
35601
+ const path10 = `/api/missions/${enc(missionId)}/owner`;
35602
+ if (args.dryRun) return output(dryRunResult("PUT", path10, body), fmt);
35603
+ if (!args.yes) {
35604
+ throw commandError(
35605
+ "HANDOVER_CONFIRMATION_REQUIRED",
35606
+ 2,
35607
+ "Handing a mission over gives the new owner its owner rights and takes them from the current owner. Re-run with --yes."
35608
+ );
35609
+ }
35610
+ const res = await client.put(path10, body);
35611
+ assertMissionMembershipOk(res.status, res.data, "hand over mission");
35612
+ const data = recordOf3(res.data);
35613
+ return output(
35614
+ { handedOver: data.changed === true, owner: data.owner ?? null, previousOwners: data.previousOwners ?? [] },
35615
+ fmt
35616
+ );
35617
+ }
35578
35618
  })
35579
35619
  }
35580
35620
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@senticor/hive",
3
- "version": "1.134.0",
3
+ "version": "1.135.0",
4
4
  "description": "Cognitive Hive OS — unified CLI",
5
5
  "type": "commonjs",
6
6
  "bin": {