@ours.network/cowork 1.0.5 → 1.0.7
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/README.md +3 -2
- package/dist/cli.js +9 -0
- package/dist/daemon.js +334 -45
- package/dist/web/assets/app.js +1 -1
- package/docs/03-configuration.md +2 -2
- package/docs/05-room-workflow.md +6 -2
- package/docs/08-backup-restore.md +1 -1
- package/docs/10-limitations.md +1 -1
- package/docs/11-web-console.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@ ours-cowork web
|
|
|
7
7
|
ours-cowork docs
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
`ours-cowork web` starts the daemon if it is absent, waits for the console, and opens `http://127.0.0.1:3052/`. Create a room with a name first, then add each invitation requirement from its Invite panel. Names are trimmed, normalized to Unicode NFC, and may contain 1–64 Unicode characters excluding control and format characters.
|
|
10
|
+
`ours-cowork web` starts the daemon if it is absent, waits for the console, and opens `http://127.0.0.1:3052/`. Create a room with a name first, then add each invitation requirement from its Invite panel. Names are trimmed, normalized to Unicode NFC, and may contain 1–64 Unicode characters excluding control and format characters. The bounded identity name must not collide with an identity in the shared daemon. The Communication view contains the human-readable room chat; operational records remain in Events and the complete ordered stream remains in Archive.
|
|
11
11
|
|
|
12
|
-
Each room identity is
|
|
12
|
+
Each room identity is `ours-cowork:<bounded room name>`. Cowork NFC-normalizes the creation name and retains its first 52 Unicode code points so the complete SDK identity stays within 64 code points. The authenticated identity name is frozen at creation; later room settings may change `room_name` but do not rename the identity, CID, contacts, or history. Identity CIDs, not names, remain the authorization and routing keys. Because identity names are daemon-global, equal names—including distinct long titles with the same retained prefix—collide cleanly. Earlier unreleased ID- and slug-based identity formats are unsupported; no migration is provided for this unreleased major.
|
|
13
13
|
|
|
14
14
|
The localhost HTTP console has no authentication. Keep it bound to `127.0.0.1`; do not proxy, forward, or expose the port to other hosts. Room state is refreshed by periodic polling, not pushed to the browser.
|
|
15
15
|
|
|
@@ -41,3 +41,4 @@ ours-cowork docs web
|
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
Before production use, read the limitations topic. In particular, backups require a stopped daemon and restore uses the complete state directory.
|
|
44
|
+
Lost room identity leases are recovered automatically with a non-force bind and exact persisted-CID proof. Operators can invoke the same safe path explicitly with `ours-cowork room rebind <room-id>`; it never recreates an established identity or steals a live lease.
|
package/dist/cli.js
CHANGED
|
@@ -4298,6 +4298,7 @@ var MAX_FILE_NAME_BYTES = 255;
|
|
|
4298
4298
|
var MAX_MIME_BYTES = 255;
|
|
4299
4299
|
var MAX_ROLE_BYTES = 256;
|
|
4300
4300
|
var MAX_ROOM_NAME_CHARACTERS = 64;
|
|
4301
|
+
var MAX_ROOM_IDENTITY_NAME_CHARACTERS = 64;
|
|
4301
4302
|
function utf8Bounded(label, maximumBytes) {
|
|
4302
4303
|
return external_exports.string().refine((value) => Buffer.byteLength(value, "utf8") >= 1, `${label} must be at least 1 UTF-8 byte`).refine(
|
|
4303
4304
|
(value) => Buffer.byteLength(value, "utf8") <= maximumBytes,
|
|
@@ -4345,6 +4346,7 @@ var RoomNameSchema = external_exports.string().refine(
|
|
|
4345
4346
|
}
|
|
4346
4347
|
});
|
|
4347
4348
|
var ROOM_IDENTITY_PREFIX = "ours-cowork:";
|
|
4349
|
+
var MAX_ROOM_IDENTITY_TITLE_CHARACTERS = MAX_ROOM_IDENTITY_NAME_CHARACTERS - Array.from(ROOM_IDENTITY_PREFIX).length;
|
|
4348
4350
|
function isPersistedRoomIdentityName(roomId, identityName) {
|
|
4349
4351
|
if (!LowerCrockfordUlidSchema.safeParse(roomId).success || !identityName.startsWith(ROOM_IDENTITY_PREFIX)) {
|
|
4350
4352
|
return false;
|
|
@@ -5053,6 +5055,7 @@ var NATIVE_MUTATION_METHODS = /* @__PURE__ */ new Set([
|
|
|
5053
5055
|
"room.close",
|
|
5054
5056
|
"room.recover",
|
|
5055
5057
|
"room.recover.confirm",
|
|
5058
|
+
"room.rebind",
|
|
5056
5059
|
"room.participant.remove",
|
|
5057
5060
|
"room.participant.replace"
|
|
5058
5061
|
]);
|
|
@@ -5105,6 +5108,7 @@ Room commands:
|
|
|
5105
5108
|
close <room-id>
|
|
5106
5109
|
delete <room-id> --yes
|
|
5107
5110
|
recover <room-id> [--confirm <old-invite-id> <new-invite-id>]
|
|
5111
|
+
rebind <room-id>
|
|
5108
5112
|
|
|
5109
5113
|
Run \u2018ours-cowork docs\u2019 for the offline documentation index.`;
|
|
5110
5114
|
}
|
|
@@ -5349,6 +5353,11 @@ async function roomRequest(command, args) {
|
|
|
5349
5353
|
exactPositionals(parsed, 1, "room recover");
|
|
5350
5354
|
return { method: "room.recover", params: { room_id: roomId } };
|
|
5351
5355
|
}
|
|
5356
|
+
case "rebind": {
|
|
5357
|
+
const parsed = parseOptions(args, []);
|
|
5358
|
+
const [roomId] = exactPositionals(parsed, 1, "room rebind");
|
|
5359
|
+
return { method: "room.rebind", params: { room_id: roomId } };
|
|
5360
|
+
}
|
|
5352
5361
|
default:
|
|
5353
5362
|
usageError(`unknown room command: ${command}`);
|
|
5354
5363
|
}
|