githolon 0.1.6 → 0.2.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.
- package/dist/cli.mjs +19 -8
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -78,8 +78,8 @@ export const ${n.pascal} = aggregate("${n.pascal}", {
|
|
|
78
78
|
function domainTemplate(raw) {
|
|
79
79
|
const n = namesFor(raw);
|
|
80
80
|
return `${HEADER(raw, "domain")}
|
|
81
|
-
import { z } from "zod";
|
|
82
81
|
import {
|
|
82
|
+
z,
|
|
83
83
|
aggregate,
|
|
84
84
|
directive,
|
|
85
85
|
t,
|
|
@@ -140,8 +140,7 @@ ${aggregateBlock(n)}
|
|
|
140
140
|
function intentTemplate(raw) {
|
|
141
141
|
const n = namesFor(raw);
|
|
142
142
|
return `${HEADER(raw, "intent (directive)")}
|
|
143
|
-
import { z } from "
|
|
144
|
-
import { aggregate, directive, t, Conflict, set } from "@githolon/dsl";
|
|
143
|
+
import { z, aggregate, directive, t, Conflict, set } from "@githolon/dsl";
|
|
145
144
|
|
|
146
145
|
// Stub target \u2014 in a real domain, import the existing aggregate handle instead.
|
|
147
146
|
export const ${n.pascal} = aggregate("${n.pascal}", {
|
|
@@ -332,12 +331,23 @@ async function logout() {
|
|
|
332
331
|
}
|
|
333
332
|
async function wsCreate(name, opts) {
|
|
334
333
|
const cloud = cloudBase(opts.cloud);
|
|
335
|
-
|
|
334
|
+
let principal = opts.principal ?? await sessionToken().catch((e) => (err(e.message), void 0)) ?? loadCreds().principal;
|
|
336
335
|
if (principal === void 0) {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
)
|
|
340
|
-
|
|
336
|
+
const d2 = await gotrue("/auth/v1/signup", "{}");
|
|
337
|
+
const s = sessionFromGotrue(d2);
|
|
338
|
+
if (s === void 0) {
|
|
339
|
+
err(
|
|
340
|
+
`a birth needs a principal, and automatic agent login failed: ${d2.error_description ?? d2.error ?? d2.msg ?? JSON.stringify(d2)}
|
|
341
|
+
githolon login --agent (self-onboarding), githolon login --token <refresh>,
|
|
342
|
+
or pass --principal <your-auth-uid or access token> (saved as the default)`
|
|
343
|
+
);
|
|
344
|
+
return 1;
|
|
345
|
+
}
|
|
346
|
+
saveSession(s);
|
|
347
|
+
out(`no principal on file \u2014 self-onboarded an anonymous agent identity (githolon login --agent)`);
|
|
348
|
+
out(` principal uid ${s.uid} (linkable to a full account later)`);
|
|
349
|
+
out(` session saved \u2192 ${credsPath()} (auto-refreshed; births ride x-nomos-auth)`);
|
|
350
|
+
principal = s.accessToken;
|
|
341
351
|
}
|
|
342
352
|
const r = await fetch(`${cloud}/v1/workspaces/${name}`, {
|
|
343
353
|
method: "POST",
|
|
@@ -960,6 +970,7 @@ Identity (~/.holon/credentials.json \u2014 sessions auto-refresh):
|
|
|
960
970
|
|
|
961
971
|
Nomos Cloud (secrets live in ~/.holon/credentials.json \u2014 never copy one by hand):
|
|
962
972
|
githolon ws create <name> [--principal <uid|token>] birth a workspace; SAVES its one-time secret
|
|
973
|
+
(no identity on file? it self-onboards an agent login)
|
|
963
974
|
githolon ws status <name> workspace status (lineage, phase, verdicts)
|
|
964
975
|
githolon ws retire <name> retire a workspace (owner) \u2014 quota freed; data retained
|
|
965
976
|
per the license; reads keep serving
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "githolon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
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",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@bjorn3/browser_wasi_shim": "0.4.2",
|
|
30
|
-
"@githolon/dsl": "^0.
|
|
30
|
+
"@githolon/dsl": "^0.2.0",
|
|
31
31
|
"isomorphic-git": "^1.38.4"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|