githolon 0.1.3 → 0.1.5

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/LICENSE.md CHANGED
@@ -24,6 +24,15 @@ with it; we keep the rest for now.
24
24
  - offer the Nomos runtime, or anything materially similar, as a hosted service;
25
25
  - reverse-engineer the holon wasm runtime.
26
26
 
27
+ ## Data retention
28
+
29
+ This is a pre-release we are actively evaluating. Workspaces you retire stop
30
+ counting toward your quota but are NOT deleted: **we retain all workspace data
31
+ (ledgers, law, intents) and may examine it to evaluate how the product is
32
+ used.** Don't put anything in a pre-release workspace you wouldn't want the
33
+ builders to read. If you need something truly expunged, ask:
34
+ jack@captainapp.co.uk.
35
+
27
36
  ## The rest
28
37
 
29
38
  Provided **as is**, with no warranty of any kind; to the maximum extent
package/dist/cli.mjs CHANGED
@@ -372,6 +372,35 @@ async function wsStatus(name, opts) {
372
372
  out(text);
373
373
  return 0;
374
374
  }
375
+ async function wsRetire(ws, opts) {
376
+ const cloud = cloudBase(opts.cloud);
377
+ const secret = getSecret(cloud, ws);
378
+ if (secret === void 0) {
379
+ err(
380
+ `no stored secret for ${ws} on ${cloud} \u2014 retirement is owner-gated
381
+ githolon secret set ${ws} <secret> (import the workspaceSecret you hold)`
382
+ );
383
+ return 1;
384
+ }
385
+ const r = await fetch(`${cloud}/v1/workspaces/${ws}/retire`, {
386
+ method: "POST",
387
+ headers: { authorization: `Bearer ${secret}` }
388
+ });
389
+ const d = await r.json().catch(() => void 0);
390
+ if (r.status === 401) {
391
+ err(`retire refused (401) \u2014 the stored secret for ${ws} is not the workspace's. githolon secret set ${ws} <secret>`);
392
+ return 1;
393
+ }
394
+ if (!r.ok || d?.ok !== true) {
395
+ err(`retire '${ws}' failed (${r.status}): ${d ? JSON.stringify(d) : "no body"}`);
396
+ return 1;
397
+ }
398
+ out(`\u2713 workspace ${ws} retired on ${cloud}${d.alreadyRetired === true ? " (it was already retired)" : ""}`);
399
+ out(" nothing was deleted \u2014 the ledger and its data are retained per the Nomos Pre-Release License");
400
+ out(" it no longer counts toward your workspace allowance; reads keep serving, deploys/pushes refuse");
401
+ out(" to un-retire: contact the operator (an admin restores the record via POST /v1/root/governance)");
402
+ return 0;
403
+ }
375
404
  async function deploy(ws, opts) {
376
405
  const cloud = cloudBase(opts.cloud);
377
406
  let file;
@@ -915,7 +944,7 @@ async function ledgerVerify(dir, opts) {
915
944
 
916
945
  // src/cli.ts
917
946
  var KINDS = ["domain", "aggregate", "intent"];
918
- var DEFAULT_OUT = "src/domains";
947
+ var DEFAULT_OUT = "domains";
919
948
  var USAGE = `githolon \u2014 the Nomos developer CLI
920
949
 
921
950
  Authoring:
@@ -932,6 +961,8 @@ Identity (~/.holon/credentials.json \u2014 sessions auto-refresh):
932
961
  Nomos Cloud (secrets live in ~/.holon/credentials.json \u2014 never copy one by hand):
933
962
  githolon ws create <name> [--principal <uid|token>] birth a workspace; SAVES its one-time secret
934
963
  githolon ws status <name> workspace status (lineage, phase, verdicts)
964
+ githolon ws retire <name> retire a workspace (owner) \u2014 quota freed; data retained
965
+ per the license; reads keep serving
935
966
  githolon deploy <ws> [--file <deploy.json>] POST build/*.deploy.json with the stored secret
936
967
  githolon secret set <ws> <secret> import a secret you already hold
937
968
  githolon secret rotate <ws> rotate (and re-save) the workspace secret
@@ -986,7 +1017,8 @@ ${USAGE}`);
986
1017
  const [sub2, name] = pos;
987
1018
  if (sub2 === "create" && name !== void 0) return wsCreate(name, opts);
988
1019
  if (sub2 === "status" && name !== void 0) return wsStatus(name, opts);
989
- return usageFail("expected: githolon ws <create|status> <name>");
1020
+ if (sub2 === "retire" && name !== void 0) return wsRetire(name, opts);
1021
+ return usageFail("expected: githolon ws <create|status|retire> <name>");
990
1022
  }
991
1023
  if (command === "deploy") {
992
1024
  const [ws2] = pos;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githolon",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "githolon — the Nomos developer CLI: Rails-style generators for @githolon/dsl domains + the package compiler. Kernel-independent.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",