@nervur-org/dock 0.3.1 → 0.4.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/GETTING_STARTED.md +22 -12
- package/{beings/GLOSSARY.md → GLOSSARY.md} +3 -3
- package/NOTICE +1 -1
- package/README.md +20 -16
- package/{beings/WORLDS.md → WORLDS.md} +6 -4
- package/api/route.ts +3 -3
- package/beings/avatar.ts +2 -2
- package/beings/carry.ts +2 -2
- package/beings/clock.ts +2 -2
- package/beings/courier.ts +2 -2
- package/beings/desk.ts +2 -2
- package/beings/doorbell.ts +2 -2
- package/beings/envoy.ts +2 -2
- package/beings/join.ts +2 -2
- package/beings/link.ts +5 -5
- package/beings/look.ts +1 -1
- package/beings/porter.ts +2 -2
- package/beings/presence.ts +1 -1
- package/beings/setup.ts +3 -3
- package/beings/side.ts +2 -2
- package/beings/user.ts +2 -2
- package/beings/way.ts +1 -1
- package/cli/client.ts +6 -6
- package/cli/daemon.ts +7 -7
- package/cli/estate/{quo.service → nervur.service} +12 -12
- package/cli/estate/org.nervur.plist +44 -0
- package/cli/estate.ts +6 -6
- package/cli/{quo.ts → nervur.ts} +43 -37
- package/cli/pilot.ts +3 -3
- package/cli/stand.ts +3 -3
- package/dist/api/route.d.ts +2 -2
- package/dist/api/route.js +2 -2
- package/dist/beings/avatar.d.ts +1 -1
- package/dist/beings/avatar.js +1 -1
- package/dist/beings/carry.d.ts +2 -2
- package/dist/beings/carry.js +1 -1
- package/dist/beings/clock.d.ts +2 -2
- package/dist/beings/clock.js +1 -1
- package/dist/beings/courier.d.ts +2 -2
- package/dist/beings/courier.js +1 -1
- package/dist/beings/desk.d.ts +3 -3
- package/dist/beings/desk.js +1 -1
- package/dist/beings/doorbell.d.ts +3 -3
- package/dist/beings/doorbell.js +1 -1
- package/dist/beings/envoy.d.ts +2 -2
- package/dist/beings/envoy.js +1 -1
- package/dist/beings/join.d.ts +2 -2
- package/dist/beings/link.d.ts +2 -2
- package/dist/beings/link.js +3 -3
- package/dist/beings/look.d.ts +1 -1
- package/dist/beings/porter.d.ts +2 -2
- package/dist/beings/porter.js +1 -1
- package/dist/beings/presence.d.ts +1 -1
- package/dist/beings/setup.d.ts +1 -1
- package/dist/beings/side.d.ts +1 -1
- package/dist/beings/side.js +1 -1
- package/dist/beings/user.d.ts +3 -3
- package/dist/beings/user.js +1 -1
- package/dist/beings/way.d.ts +1 -1
- package/dist/cli/client.js +4 -4
- package/dist/cli/daemon.d.ts +1 -1
- package/dist/cli/daemon.js +6 -6
- package/dist/cli/estate/{quo.service → nervur.service} +12 -12
- package/dist/cli/estate/org.nervur.plist +44 -0
- package/dist/cli/estate.js +6 -6
- package/dist/cli/{quo.js → nervur.js} +43 -37
- package/dist/cli/stand.d.ts +2 -2
- package/dist/dock/agents.d.ts +1 -1
- package/dist/dock/agents.js +1 -1
- package/dist/dock/apns.js +1 -1
- package/dist/dock/console.d.ts +1 -1
- package/dist/dock/dialers.d.ts +2 -2
- package/dist/dock/dialers.js +2 -2
- package/dist/dock/faculty.d.ts +2 -2
- package/dist/dock/faculty.js +1 -1
- package/dist/dock/grants.d.ts +1 -1
- package/dist/dock/grants.js +1 -1
- package/dist/dock/http2.js +1 -1
- package/dist/dock/index.d.ts +1 -1
- package/dist/dock/index.js +1 -1
- package/dist/dock/local.d.ts +2 -2
- package/dist/dock/location.d.ts +1 -1
- package/dist/dock/notifications.d.ts +1 -1
- package/dist/dock/notifications.js +1 -1
- package/dist/dock/push.d.ts +1 -1
- package/dist/dock/push.js +3 -3
- package/dist/dock/service.js +1 -1
- package/dist/dock/timer.d.ts +1 -1
- package/dist/harbor/browser.d.ts +2 -2
- package/dist/harbor/browser.js +4 -4
- package/dist/harbor/capacitor.d.ts +1 -1
- package/dist/harbor/capacitor.js +1 -1
- package/dist/harbor/disk.d.ts +4 -4
- package/dist/harbor/disk.js +5 -5
- package/dist/harbor/edge/edge.d.ts +2 -2
- package/dist/harbor/edge/edge.js +5 -5
- package/dist/harbor/edge/exercise.js +8 -8
- package/dist/harbor/edge/given.d.ts +1 -1
- package/dist/harbor/edge/platform.d.ts +1 -1
- package/dist/harbor/edge/storage.d.ts +1 -1
- package/dist/harbor/edge/storage.js +2 -2
- package/dist/harbor/edge/worker.js +2 -2
- package/dist/harbor/files.d.ts +1 -1
- package/dist/harbor/files.js +2 -2
- package/dist/harbor/http.d.ts +2 -2
- package/dist/harbor/http.js +1 -1
- package/dist/harbor/idb.d.ts +1 -1
- package/dist/harbor/idb.js +0 -0
- package/dist/harbor/quo.js +1 -1
- package/dist/harbor/seal.js +1 -1
- package/dist/harbor/sealed.d.ts +1 -1
- package/dist/harbor/sealed.js +4 -4
- package/dist/harbor/tauri.d.ts +1 -1
- package/dist/harbor/tauri.js +1 -1
- package/dist/harbor/ward.d.ts +1 -1
- package/dist/human/app.d.ts +2 -2
- package/dist/human/door.js +4 -4
- package/dist/human/guest.js +1 -1
- package/dist/human/html.d.ts +1 -1
- package/dist/human/html.js +1 -1
- package/dist/human/local.d.ts +1 -1
- package/dist/human/mark.js +2 -2
- package/dist/human/move.d.ts +2 -2
- package/dist/human/move.js +1 -1
- package/dist/human/screen.d.ts +1 -1
- package/dist/human/screen.js +3 -3
- package/dist/human/tab.bundle.txt +32 -32
- package/dist/human/tab.js +7 -7
- package/dist/human/tree.d.ts +1 -1
- package/dist/human/wake.d.ts +2 -2
- package/dist/human/wake.js +1 -1
- package/dist/human/web.d.ts +1 -1
- package/dist/human/web.js +4 -4
- package/dist/human/worker.bundle.txt +27 -27
- package/dist/human/worker.js +4 -4
- package/dist/human/worlds.d.ts +2 -2
- package/dist/human/worlds.js +4 -4
- package/dist/mcp/agent.d.ts +1 -1
- package/dist/mcp/allow.d.ts +1 -1
- package/dist/mcp/allow.js +2 -2
- package/dist/mcp/oauth.js +1 -1
- package/dist/mcp/runner.d.ts +1 -1
- package/dist/mcp/server.d.ts +2 -2
- package/dist/mcp/server.js +2 -2
- package/dock/agents.ts +2 -2
- package/dock/apns.ts +1 -1
- package/dock/console.ts +1 -1
- package/dock/dialers.ts +3 -3
- package/dock/faculty.ts +2 -2
- package/dock/grants.ts +2 -2
- package/dock/http2.ts +1 -1
- package/dock/index.ts +3 -3
- package/dock/local.ts +1 -1
- package/dock/location.ts +1 -1
- package/dock/notifications.ts +2 -2
- package/dock/push.ts +4 -4
- package/dock/service.ts +1 -1
- package/dock/timer.ts +1 -1
- package/harbor/browser.ts +5 -5
- package/harbor/capacitor.ts +2 -2
- package/harbor/disk.ts +8 -8
- package/harbor/edge/edge.ts +7 -7
- package/harbor/edge/exercise.ts +11 -11
- package/harbor/edge/given.ts +1 -1
- package/harbor/edge/platform.d.ts +1 -1
- package/harbor/edge/storage.ts +2 -2
- package/harbor/edge/worker.ts +2 -2
- package/harbor/edge/wrangler.toml +3 -3
- package/harbor/files.ts +2 -2
- package/harbor/http.ts +2 -2
- package/harbor/idb.ts +0 -0
- package/harbor/quo.ts +1 -1
- package/harbor/resolve.ts +1 -1
- package/harbor/seal.ts +1 -1
- package/harbor/sealed.ts +5 -5
- package/harbor/tauri.ts +2 -2
- package/harbor/ward.ts +1 -1
- package/human/app.ts +2 -2
- package/human/apps.ts +1 -1
- package/human/door.ts +4 -4
- package/human/guest.ts +2 -2
- package/human/html.ts +2 -2
- package/human/local.ts +1 -1
- package/human/mark.ts +2 -2
- package/human/move.ts +3 -3
- package/human/screen.ts +5 -5
- package/human/tab.bundle.txt +32 -32
- package/human/tab.ts +10 -10
- package/human/tree.ts +1 -1
- package/human/wake.ts +3 -3
- package/human/web.ts +5 -5
- package/human/worker.bundle.txt +27 -27
- package/human/worker.ts +6 -6
- package/human/worlds.ts +5 -5
- package/mcp/agent.ts +1 -1
- package/mcp/allow.ts +5 -5
- package/mcp/oauth.ts +1 -1
- package/mcp/runner.ts +1 -1
- package/mcp/server.ts +3 -3
- package/package.json +15 -7
- package/{api/quo-api.md → quo-api.md} +1 -1
- package/{beings/quo-dock.md → quo-dock.md} +74 -71
- package/{harbor/quo-harbor.md → quo-harbor.md} +54 -30
- package/{human/quo-human.md → quo-human.md} +7 -7
- package/{mcp/quo-mcp.md → quo-mcp.md} +10 -10
- package/cli/estate/systems.quo.plist +0 -44
- package/cli/quo-dock.md +0 -1942
- package/dist/cli/estate/systems.quo.plist +0 -44
- package/dock/quo-app-bells.md +0 -280
- package/dock/quo-dock.md +0 -1942
- /package/dist/cli/{quo.d.ts → nervur.d.ts} +0 -0
- /package/{beings/quo-app-bells.md → quo-app-bells.md} +0 -0
package/human/worker.bundle.txt
CHANGED
|
@@ -4,7 +4,7 @@ var __export = (target, all) => {
|
|
|
4
4
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
// ../
|
|
7
|
+
// ../nervur/dist/being/being.js
|
|
8
8
|
var RESERVED = /* @__PURE__ */ new Set(["answer", "describe", "stance", "cells", "standings", "occupants", "occupant", "invite", "knock", "take", "boot", "lend", "constructor"]);
|
|
9
9
|
var wrote = (self, name) => {
|
|
10
10
|
for (let p = Object.getPrototypeOf(self); p !== null && p !== Object.prototype; p = Object.getPrototypeOf(p)) {
|
|
@@ -96,7 +96,7 @@ var Being = class {
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
// ../
|
|
99
|
+
// ../nervur/dist/being/types.js
|
|
100
100
|
var OWNER = "OWNER";
|
|
101
101
|
var PUBLIC = "PUBLIC";
|
|
102
102
|
var RESERVED_IDS = [OWNER, PUBLIC];
|
|
@@ -119,7 +119,7 @@ var isBlueprint = (v) => {
|
|
|
119
119
|
};
|
|
120
120
|
var WORD_KEY = /* @__PURE__ */ Symbol.for("quo.word");
|
|
121
121
|
|
|
122
|
-
// ../
|
|
122
|
+
// ../nervur/dist/being/silence.js
|
|
123
123
|
var silence = /* @__PURE__ */ Symbol.for("quo.silence");
|
|
124
124
|
var isSilence = (x) => x === silence;
|
|
125
125
|
var DOOR_WORDS = ["removed", "absent", "unannounced", "repeated", "threw"];
|
|
@@ -135,7 +135,7 @@ var isWord = (x) => x !== null && typeof x === "object" && typeof x[WORD_KEY] ==
|
|
|
135
135
|
var wordOf = (x) => x[WORD_KEY];
|
|
136
136
|
var unreached = () => word("unreached");
|
|
137
137
|
|
|
138
|
-
// ../
|
|
138
|
+
// ../nervur/dist/being/digest.js
|
|
139
139
|
var absent = (v) => v === void 0 || typeof v === "function" || typeof v === "symbol";
|
|
140
140
|
var canonical = (v) => {
|
|
141
141
|
if (Array.isArray(v))
|
|
@@ -478,7 +478,7 @@ var Location = class extends Faculty {
|
|
|
478
478
|
}
|
|
479
479
|
};
|
|
480
480
|
|
|
481
|
-
// ../
|
|
481
|
+
// ../nervur/dist/ward/cells.js
|
|
482
482
|
var DEPTH = 64;
|
|
483
483
|
var BREADTH = 1 << 20;
|
|
484
484
|
var WELL_FORMED = /^(?:[^\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])*$/;
|
|
@@ -616,7 +616,7 @@ var guardCells = (cells, wrote2 = () => {
|
|
|
616
616
|
}) => guard(cells, "cells", wrote2, true);
|
|
617
617
|
var unguarded = (cells) => targets.get(cells) ?? cells;
|
|
618
618
|
|
|
619
|
-
// ../
|
|
619
|
+
// ../nervur/dist/ward/partition.js
|
|
620
620
|
var VERSION = "pre-1.0.0";
|
|
621
621
|
var READS = [VERSION];
|
|
622
622
|
function upgrade(p) {
|
|
@@ -780,7 +780,7 @@ var fromRows = (rows) => {
|
|
|
780
780
|
return out;
|
|
781
781
|
};
|
|
782
782
|
|
|
783
|
-
// ../
|
|
783
|
+
// ../nervur/dist/ward/heirs.js
|
|
784
784
|
var SPAN = 64;
|
|
785
785
|
var Heirs = class {
|
|
786
786
|
#p;
|
|
@@ -889,7 +889,7 @@ var Heirs = class {
|
|
|
889
889
|
}
|
|
890
890
|
};
|
|
891
891
|
|
|
892
|
-
// ../
|
|
892
|
+
// ../nervur/dist/ward/arithmetic.js
|
|
893
893
|
var arithmetic_exports = {};
|
|
894
894
|
__export(arithmetic_exports, {
|
|
895
895
|
KEY: () => KEY,
|
|
@@ -1084,7 +1084,7 @@ async function unbox(bytes, padlockSecret) {
|
|
|
1084
1084
|
return decrypt(shared, bytes.subarray(KEY), ephemeralPk);
|
|
1085
1085
|
}
|
|
1086
1086
|
|
|
1087
|
-
// ../
|
|
1087
|
+
// ../nervur/dist/ward/seal.js
|
|
1088
1088
|
var utf8 = new TextEncoder();
|
|
1089
1089
|
var text2 = new TextDecoder();
|
|
1090
1090
|
var WARD_SIGN = new TextEncoder().encode("quo-ward-sign");
|
|
@@ -1174,7 +1174,7 @@ async function openReply(bytes, ephemeralSecret, signPk) {
|
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
1176
|
|
|
1177
|
-
// ../
|
|
1177
|
+
// ../nervur/dist/ward/allowance.js
|
|
1178
1178
|
var DEFAULT = { time: 3e4 };
|
|
1179
1179
|
var CEILING = { time: 3e5 };
|
|
1180
1180
|
function allow(wanted, ceiling = CEILING, base = DEFAULT) {
|
|
@@ -1204,7 +1204,7 @@ async function within(ms, work, rang2) {
|
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
1206
|
|
|
1207
|
-
// ../
|
|
1207
|
+
// ../nervur/dist/ward/door.js
|
|
1208
1208
|
var SILENCE = { silence: true };
|
|
1209
1209
|
var said = (quo) => ({ quo });
|
|
1210
1210
|
async function answered2(door, asker, method, args, bound) {
|
|
@@ -1297,7 +1297,7 @@ function lid(bytes, random) {
|
|
|
1297
1297
|
return random(KEY);
|
|
1298
1298
|
}
|
|
1299
1299
|
|
|
1300
|
-
// ../
|
|
1300
|
+
// ../nervur/dist/ward/stance.js
|
|
1301
1301
|
var CALLS = ["knock", "take", "remove"];
|
|
1302
1302
|
function buildStance(inside, key, cells, bind) {
|
|
1303
1303
|
const named = (method) => method === void 0 || typeof method === "string";
|
|
@@ -1575,7 +1575,7 @@ function buildStance(inside, key, cells, bind) {
|
|
|
1575
1575
|
};
|
|
1576
1576
|
}
|
|
1577
1577
|
|
|
1578
|
-
// ../
|
|
1578
|
+
// ../nervur/dist/ward/owner.js
|
|
1579
1579
|
var str2 = { type: "string" };
|
|
1580
1580
|
var OWNER_ASKS = [
|
|
1581
1581
|
{ name: "boot", description: "boot a being by class name, under a key the owner chooses", input: { type: "object", properties: { key: str2, class: str2 }, required: ["key", "class"] } },
|
|
@@ -1718,7 +1718,7 @@ async function describe(w) {
|
|
|
1718
1718
|
};
|
|
1719
1719
|
}
|
|
1720
1720
|
|
|
1721
|
-
// ../
|
|
1721
|
+
// ../nervur/dist/ward/ward.js
|
|
1722
1722
|
async function Ward(ground) {
|
|
1723
1723
|
const w = await Self.boot(ground);
|
|
1724
1724
|
return { door: w.door, ask: w.ask };
|
|
@@ -2043,7 +2043,7 @@ var isToken = (v) => v !== null && typeof v === "object" && !Array.isArray(v) &&
|
|
|
2043
2043
|
var SEAL = 4096;
|
|
2044
2044
|
function banner(o) {
|
|
2045
2045
|
const text3 = (v) => typeof v === "string" && v.trim() ? v.trim() : "";
|
|
2046
|
-
const title = text3(o.title) || text3(o.from) || "
|
|
2046
|
+
const title = text3(o.title) || text3(o.from) || "Nervur";
|
|
2047
2047
|
const body = text3(o.body) || text3(o.said) || Object.entries(o).filter(([k]) => k !== "title" && k !== "from").map(([k, v]) => `${k}: ${typeof v === "string" ? v : JSON.stringify(v)}`).join(", ");
|
|
2048
2048
|
return { title, body };
|
|
2049
2049
|
}
|
|
@@ -2893,7 +2893,7 @@ var MINUTE2 = 6e4;
|
|
|
2893
2893
|
var HOUR = 36e5;
|
|
2894
2894
|
var SPAN2 = 23 * HOUR + 59 * MINUTE2;
|
|
2895
2895
|
|
|
2896
|
-
// ../
|
|
2896
|
+
// ../nervur/dist/ward/ground.js
|
|
2897
2897
|
var maker = (objects, ...registries) => (className, stance) => {
|
|
2898
2898
|
const r = registries.find((reg) => reg !== void 0 && Object.hasOwn(reg, className));
|
|
2899
2899
|
const C = r?.[className];
|
|
@@ -2912,7 +2912,7 @@ async function learnPk(w) {
|
|
|
2912
2912
|
return pk;
|
|
2913
2913
|
}
|
|
2914
2914
|
|
|
2915
|
-
// ../
|
|
2915
|
+
// ../nervur/dist/harbor/reach.js
|
|
2916
2916
|
var never = () => new Promise(() => {
|
|
2917
2917
|
});
|
|
2918
2918
|
function request(url) {
|
|
@@ -3036,14 +3036,14 @@ var Socket = class {
|
|
|
3036
3036
|
}
|
|
3037
3037
|
};
|
|
3038
3038
|
|
|
3039
|
-
// ../
|
|
3039
|
+
// ../nervur/dist/harbor/store.js
|
|
3040
3040
|
var values = (p) => JSON.parse(JSON.stringify(p));
|
|
3041
3041
|
var rowsOf = (partition, rows) => rows.map((row) => {
|
|
3042
3042
|
const value = rowOf(partition, row);
|
|
3043
3043
|
return [row, value === void 0 ? void 0 : values(value)];
|
|
3044
3044
|
});
|
|
3045
3045
|
|
|
3046
|
-
// ../
|
|
3046
|
+
// ../nervur/dist/harbor/core.js
|
|
3047
3047
|
var DEFAULT_CODE = "classes/index.ts";
|
|
3048
3048
|
var PROBE = 1e4;
|
|
3049
3049
|
var ANNOUNCE = 64;
|
|
@@ -3539,7 +3539,7 @@ var Harbor = class {
|
|
|
3539
3539
|
}
|
|
3540
3540
|
};
|
|
3541
3541
|
|
|
3542
|
-
// ../
|
|
3542
|
+
// ../nervur/dist/harbor/dial.js
|
|
3543
3543
|
function dial(harbor, url) {
|
|
3544
3544
|
const d = { url, socket: null, wake: () => {
|
|
3545
3545
|
}, close: () => {
|
|
@@ -3710,10 +3710,10 @@ var BrowserHarbor = class extends Harbor {
|
|
|
3710
3710
|
// `lend` is what this box lends the beings of the wards it hosts: a name
|
|
3711
3711
|
// to an invitation on a being of its own ward. `stand` builds one; a bare
|
|
3712
3712
|
// tab hands none and every name answers null.
|
|
3713
|
-
constructor(store = "
|
|
3713
|
+
constructor(store = "nervur", classes = {}, lend) {
|
|
3714
3714
|
const s = typeof store === "string" ? new Idb(store) : store;
|
|
3715
3715
|
super(s, async () => ({ ...BUILT_IN, ...classes }), lend);
|
|
3716
|
-
this.name = typeof store === "string" ? store : "
|
|
3716
|
+
this.name = typeof store === "string" ? store : "nervur";
|
|
3717
3717
|
this.#locked = typeof store === "string";
|
|
3718
3718
|
}
|
|
3719
3719
|
// What this box lends, by name. A bare tab says nothing, stands no ward of
|
|
@@ -3756,7 +3756,7 @@ var BrowserHarbor = class extends Harbor {
|
|
|
3756
3756
|
const locks = globalThis.navigator?.locks;
|
|
3757
3757
|
if (!locks) return;
|
|
3758
3758
|
const granted = await new Promise((ok) => {
|
|
3759
|
-
void locks.request(`
|
|
3759
|
+
void locks.request(`nervur:${this.name}`, { ifAvailable: true }, (lock) => {
|
|
3760
3760
|
if (!lock) {
|
|
3761
3761
|
ok(false);
|
|
3762
3762
|
return;
|
|
@@ -3829,14 +3829,14 @@ async function fromPage() {
|
|
|
3829
3829
|
const said2 = e.data ?? {};
|
|
3830
3830
|
if (Array.isArray(said2.missed)) ok(said2.missed);
|
|
3831
3831
|
};
|
|
3832
|
-
page.postMessage({
|
|
3832
|
+
page.postMessage({ nervur: "wake" }, [channel.port2]);
|
|
3833
3833
|
}
|
|
3834
3834
|
}),
|
|
3835
3835
|
null
|
|
3836
3836
|
);
|
|
3837
3837
|
}
|
|
3838
3838
|
async function here(cfg2) {
|
|
3839
|
-
const harbor = new BrowserHarbor("
|
|
3839
|
+
const harbor = new BrowserHarbor("nervur");
|
|
3840
3840
|
try {
|
|
3841
3841
|
await harbor.boot();
|
|
3842
3842
|
} catch {
|
|
@@ -3860,9 +3860,9 @@ async function woken(cfg2, said2) {
|
|
|
3860
3860
|
const objects = await fromPage() ?? await here(cfg2);
|
|
3861
3861
|
if (!said2 && objects.length === 0) return;
|
|
3862
3862
|
const { title, body } = said2 ?? notice(objects);
|
|
3863
|
-
await within2(5e3, sw.registration.showNotification(title, { body, tag: "
|
|
3863
|
+
await within2(5e3, sw.registration.showNotification(title, { body, tag: "nervur" }), void 0);
|
|
3864
3864
|
}
|
|
3865
|
-
var cfg = sw.
|
|
3865
|
+
var cfg = sw.nervur;
|
|
3866
3866
|
sw.addEventListener("install", () => void sw.skipWaiting());
|
|
3867
3867
|
sw.addEventListener("activate", (e) => e.waitUntil(sw.clients.claim()));
|
|
3868
3868
|
if (cfg) sw.addEventListener("push", (e) => e.waitUntil(woken(cfg, carried(e))));
|
package/human/worker.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
//
|
|
18
18
|
// Its config is the world's, written above the bundle by the route that
|
|
19
19
|
// serves it: the quo. route to dial and the wards of this world by pk.
|
|
20
|
-
import type { JsonObject } from '
|
|
20
|
+
import type { JsonObject } from 'nervur';
|
|
21
21
|
import { BrowserHarbor } from '../harbor/browser.ts';
|
|
22
22
|
import { drained, notice } from './wake.ts';
|
|
23
23
|
import type { Config } from './tab.ts';
|
|
@@ -27,7 +27,7 @@ import type { Config } from './tab.ts';
|
|
|
27
27
|
// shape it has here rather than by pulling a second global library in.
|
|
28
28
|
type Client = { postMessage(message: unknown, transfer?: unknown[]): void };
|
|
29
29
|
type Worker = {
|
|
30
|
-
|
|
30
|
+
nervur?: Config;
|
|
31
31
|
clients: { matchAll(o?: { type?: string; includeUncontrolled?: boolean }): Promise<Client[]>; claim(): Promise<void> };
|
|
32
32
|
registration: { showNotification(title: string, options?: { body?: string; tag?: string }): Promise<void> };
|
|
33
33
|
skipWaiting(): Promise<void>;
|
|
@@ -70,7 +70,7 @@ async function fromPage(): Promise<JsonObject[] | null> {
|
|
|
70
70
|
const said = (e.data ?? {}) as { missed?: unknown };
|
|
71
71
|
if (Array.isArray(said.missed)) ok(said.missed as JsonObject[]);
|
|
72
72
|
};
|
|
73
|
-
page.postMessage({
|
|
73
|
+
page.postMessage({ nervur: 'wake' }, [channel.port2]);
|
|
74
74
|
}
|
|
75
75
|
}),
|
|
76
76
|
null,
|
|
@@ -82,7 +82,7 @@ async function fromPage(): Promise<JsonObject[] | null> {
|
|
|
82
82
|
// answer, and this worker leaves it alone rather than opening a second
|
|
83
83
|
// harbor over one seed.
|
|
84
84
|
async function here(cfg: Config): Promise<JsonObject[]> {
|
|
85
|
-
const harbor = new BrowserHarbor('
|
|
85
|
+
const harbor = new BrowserHarbor('nervur');
|
|
86
86
|
try {
|
|
87
87
|
await harbor.boot();
|
|
88
88
|
} catch {
|
|
@@ -115,10 +115,10 @@ async function woken(cfg: Config, said: { title: string; body: string } | null):
|
|
|
115
115
|
// Bounded like every other step, because a browser build with no
|
|
116
116
|
// notification platform under it answers this call neither way, and a
|
|
117
117
|
// wake that waits on it is a worker the browser keeps alive for nothing.
|
|
118
|
-
await within(5000, sw.registration.showNotification(title, { body, tag: '
|
|
118
|
+
await within(5000, sw.registration.showNotification(title, { body, tag: 'nervur' }), undefined);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
const cfg = sw.
|
|
121
|
+
const cfg = sw.nervur;
|
|
122
122
|
sw.addEventListener('install', () => void sw.skipWaiting());
|
|
123
123
|
sw.addEventListener('activate', (e) => e.waitUntil(sw.clients.claim()));
|
|
124
124
|
if (cfg) sw.addEventListener('push', (e) => e.waitUntil(woken(cfg, carried(e))));
|
package/human/worlds.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// humans on one family tablet are two relations in one world; a shop and a
|
|
10
10
|
// friend in one far ward are two as well. Nothing here touches a document:
|
|
11
11
|
// `tab.ts` is the shell over this, and this is what the memory harbor proves.
|
|
12
|
-
import type { Harbor, Hosted } from '
|
|
12
|
+
import type { Harbor, Hosted } from 'nervur/harbor';
|
|
13
13
|
import { Avatar, USER } from '../beings/avatar.ts';
|
|
14
14
|
import { settled } from '../dock/faculty.ts';
|
|
15
15
|
|
|
@@ -27,10 +27,10 @@ import { settled } from '../dock/faculty.ts';
|
|
|
27
27
|
export type World = { pk: string; at: string; name: string; home?: boolean };
|
|
28
28
|
export type Joined = { read(): World[]; write(worlds: World[]): void };
|
|
29
29
|
|
|
30
|
-
// The list as a browser keeps it, the tab's and the app's alike: one item
|
|
31
|
-
// under
|
|
32
|
-
//
|
|
33
|
-
export const KEY = '
|
|
30
|
+
// The list as a browser keeps it, the tab's and the app's alike: one item
|
|
31
|
+
// under one key. A device with no storage still works and forgets, which is
|
|
32
|
+
// why every read has a floor.
|
|
33
|
+
export const KEY = 'nervur-worlds';
|
|
34
34
|
export function inStorage(storage: Pick<Storage, 'getItem' | 'setItem'>): Joined {
|
|
35
35
|
return {
|
|
36
36
|
read: () => {
|
package/mcp/agent.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// and not in this process. What a run may do is the gate; how it behaves
|
|
11
11
|
// is its constitution, the folder it runs in.
|
|
12
12
|
import { spawn } from 'node:child_process';
|
|
13
|
-
import type { Json, JsonObject } from '
|
|
13
|
+
import type { Json, JsonObject } from 'nervur';
|
|
14
14
|
import type { Avatar } from '../beings/avatar.ts';
|
|
15
15
|
import { word, wordText, SILENCE_TEXT, UNREACHED_TEXT, type Serving } from '../beings/side.ts';
|
|
16
16
|
|
package/mcp/allow.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// The allow page, the one page of the model side's credential exchange,
|
|
3
3
|
// mounted on the web route. It ends the credential exchange the way every
|
|
4
4
|
// way in ends: with a knock. Nothing is typed to get in but an invitation,
|
|
5
|
-
// the one the root minted for this client on the user being with `
|
|
5
|
+
// the one the root minted for this client on the user being with `nervur
|
|
6
6
|
// invite` and sent as a link or a line; the avatar the identity boots
|
|
7
7
|
// knocks with it, and the OAuth request completes with the identity the
|
|
8
8
|
// human chose. No password, no cookie, no session: the invitation is the
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// yet. The page grammar cannot say this page either, since its `form` node
|
|
17
17
|
// is one of a being's asks by name and this form is nobody's ask. So it is
|
|
18
18
|
// written out, like the door page and for the same reason: the claim that
|
|
19
|
-
// no world writes a page is about worlds, and this page is
|
|
19
|
+
// no world writes a page is about worlds, and this page is the dock's.
|
|
20
20
|
//
|
|
21
21
|
// What it does not do is dress itself. It wears the one stylesheet every
|
|
22
22
|
// screen wears, so a design that swaps the face swaps this page with it,
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
//
|
|
30
30
|
// The invitation names its ward, so the world the client lands in is the
|
|
31
31
|
// one the invitation was minted on, and there is nothing to choose.
|
|
32
|
-
import type { Invitation } from '
|
|
32
|
+
import type { Invitation } from 'nervur';
|
|
33
33
|
import type { OAuth } from './oauth.ts';
|
|
34
34
|
import { readForm } from './oauth.ts';
|
|
35
35
|
import { invitationOf } from '../beings/link.ts';
|
|
@@ -103,9 +103,9 @@ export class Exchange {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// The one stylesheet, and no colour of this page's own. The policy is the
|
|
106
|
-
// one every page
|
|
106
|
+
// one every page the dock writes itself is served under, `human/door.ts`, since
|
|
107
107
|
// this is one of them: it runs no script of its own and wants none.
|
|
108
|
-
const shell = (body: string) => `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>
|
|
108
|
+
const shell = (body: string) => `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>nervur</title>
|
|
109
109
|
<style>${CSS}</style>
|
|
110
110
|
</head><body><main class="door">${body}</main></body></html>`;
|
|
111
111
|
|
package/mcp/oauth.ts
CHANGED
|
@@ -101,7 +101,7 @@ export class OAuth {
|
|
|
101
101
|
grant_types_supported: ['authorization_code', 'refresh_token'],
|
|
102
102
|
code_challenge_methods_supported: ['S256'],
|
|
103
103
|
token_endpoint_auth_methods_supported: ['none'],
|
|
104
|
-
scopes_supported: ['
|
|
104
|
+
scopes_supported: ['nervur'],
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
|
package/mcp/runner.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// a tool message, and ends when the model answers with no tool call, or at
|
|
11
11
|
// the ceiling. Nothing here names a vendor: the endpoint is a base URL and a
|
|
12
12
|
// model name, which is LM Studio, OpenRouter, or a scripted fake alike.
|
|
13
|
-
import type { Blueprint, JsonObject } from '
|
|
13
|
+
import type { Blueprint, JsonObject } from 'nervur';
|
|
14
14
|
import type { Avatar } from '../beings/avatar.ts';
|
|
15
15
|
import { word, wordText, SILENCE_TEXT, UNREACHED_TEXT, type Serving } from '../beings/side.ts';
|
|
16
16
|
import { presentation } from '../beings/look.ts';
|
package/mcp/server.ts
CHANGED
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
12
12
|
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
|
|
13
13
|
import { ListToolsRequestSchema, CallToolRequestSchema, type CallToolResult, type Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
14
|
-
import type { Blueprint, JsonObject } from '
|
|
14
|
+
import type { Blueprint, JsonObject } from 'nervur';
|
|
15
15
|
import { word, wordText, SILENCE_TEXT, UNREACHED_TEXT, type Serving, type Subject } from '../beings/side.ts';
|
|
16
16
|
import { hintFor, presentation, sanitise, type Look } from '../beings/look.ts';
|
|
17
|
-
import { isSilence, isWord, digest } from '
|
|
17
|
+
import { isSilence, isWord, digest } from 'nervur';
|
|
18
18
|
|
|
19
|
-
export const NAME = '
|
|
19
|
+
export const NAME = 'nervur';
|
|
20
20
|
export const VERSION = '0.0.0';
|
|
21
21
|
|
|
22
22
|
export type { Subject } from '../beings/side.ts';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nervur-org/dock",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The dock: what every estate on Quo needs and nobody writes twice. A daemon and the
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "The dock: what every estate on Quo needs and nobody writes twice. A daemon and the nervur command, the front desk, the user being and the avatar, harbors on disk, in a tab and on the edge, the model sides and the screen.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"quo",
|
|
7
7
|
"estate",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"node": ">=22.18"
|
|
18
18
|
},
|
|
19
19
|
"bin": {
|
|
20
|
-
"
|
|
20
|
+
"nervur": "./dist/cli/nervur.js"
|
|
21
21
|
},
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"types": "./dist/harbor/disk.d.ts",
|
|
29
29
|
"default": "./dist/harbor/disk.js"
|
|
30
30
|
},
|
|
31
|
-
"./cli": "./dist/cli/
|
|
31
|
+
"./cli": "./dist/cli/nervur.js",
|
|
32
32
|
"./stand": {
|
|
33
33
|
"types": "./dist/cli/stand.d.ts",
|
|
34
34
|
"default": "./dist/cli/stand.js"
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
|
82
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json && node build/bundle.ts && chmod +x dist/cli/
|
|
82
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && node build/bundle.ts && chmod +x dist/cli/nervur.js && cp harbor/edge/platform.d.ts dist/harbor/edge/ && cp -R cli/estate dist/cli/ && cp ../../papers/quo-dock.md ../../papers/quo-app-bells.md ../../papers/quo-human.md ../../papers/quo-mcp.md ../../papers/quo-api.md ../../papers/quo-harbor.md ../../papers/GLOSSARY.md ../../papers/WORLDS.md ../../papers/GETTING_STARTED.md .",
|
|
83
83
|
"check": "node --test \"test/*.test.ts\"",
|
|
84
84
|
"deep": "node --test \"test/terrain/*.test.ts\"",
|
|
85
|
-
"prepublishOnly": "test \"$
|
|
85
|
+
"prepublishOnly": "test \"$NERVUR_GATED\" = 1 || { echo 'publish from the root, gated once: npm run release:dock' >&2; exit 1; }"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
88
|
"@aparajita/capacitor-secure-storage": "^8.0.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@capacitor/geolocation": "^8.2.2",
|
|
93
93
|
"@capacitor/local-notifications": "^8.3.1",
|
|
94
94
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
95
|
-
"
|
|
95
|
+
"nervur": "^0.17.0",
|
|
96
96
|
"@nervur-org/ui": "^0.3.0",
|
|
97
97
|
"ws": "^8.21.3"
|
|
98
98
|
},
|
|
@@ -113,6 +113,14 @@
|
|
|
113
113
|
"mcp",
|
|
114
114
|
"human",
|
|
115
115
|
"api",
|
|
116
|
+
"quo-dock.md",
|
|
117
|
+
"quo-app-bells.md",
|
|
118
|
+
"quo-human.md",
|
|
119
|
+
"quo-mcp.md",
|
|
120
|
+
"quo-api.md",
|
|
121
|
+
"quo-harbor.md",
|
|
122
|
+
"GLOSSARY.md",
|
|
123
|
+
"WORLDS.md",
|
|
116
124
|
"GETTING_STARTED.md",
|
|
117
125
|
"README.md",
|
|
118
126
|
"LICENSE",
|
|
@@ -81,7 +81,7 @@ is 404, never the public being.
|
|
|
81
81
|
The trade is the allow page of the model side without the page. Nobody at
|
|
82
82
|
a page vouches for a program, so a trade is a knock that spends: the
|
|
83
83
|
invitation is the one the root minted for that identity on the world's
|
|
84
|
-
being with `
|
|
84
|
+
being with `nervur invite`, sent as a line, and the avatar knocks with it
|
|
85
85
|
inside the trade. An identity already in is refused with `already in` and
|
|
86
86
|
refreshes instead, or is removed at the world's being and invited again,
|
|
87
87
|
and never re-enters on a spent invitation. What comes back is the box's
|