@ours.network/cowork 1.1.0 → 1.1.1

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/daemon.js CHANGED
@@ -6368,25 +6368,22 @@ var init_intake = __esm({
6368
6368
  continue;
6369
6369
  }
6370
6370
  if (file !== void 0) {
6371
- const author = file.author_alias === void 0 ? file.author : {
6372
- identity: file.author_alias.participant_id,
6373
- display_name: file.author_alias.alias,
6374
- role: file.author.role
6375
- };
6376
- const metadata = await sendRoomBody(packet, intent.recipient_identity, {
6371
+ const uploader = file.author_alias?.alias ?? file.author.display_name;
6372
+ const notice = await sendRoomBody(packet, intent.recipient_identity, {
6377
6373
  version: 1,
6378
- kind: "room_file",
6374
+ kind: "room_msg",
6379
6375
  room_id: roomId,
6380
6376
  room_name: room.room_name,
6381
- file_id: file.file_id,
6382
- author,
6383
- filename: file.filename,
6384
- mime: file.mime,
6385
- size: file.size,
6386
- sha256: file.sha256,
6377
+ message_id: file.file_id,
6378
+ author: {
6379
+ identity: room.identity_cid,
6380
+ display_name: room.identity_name,
6381
+ role: ROOM_ROLE
6382
+ },
6383
+ text: `${uploader} sent a file`,
6387
6384
  at: file.at
6388
6385
  });
6389
- if (metadata.status === "send_failed") {
6386
+ if (notice.status === "send_failed") {
6390
6387
  const failed = await this.store.append(roomId, {
6391
6388
  version: 1,
6392
6389
  kind: "relay_result",
@@ -6416,7 +6413,7 @@ var init_intake = __esm({
6416
6413
  recipient_identity: intent.recipient_identity,
6417
6414
  status: outcome2.status,
6418
6415
  ...outcome2.wire_id === void 0 || outcome2.wire_id === "" ? {} : { wire_id: outcome2.wire_id },
6419
- ...metadata.wire_id === void 0 || metadata.wire_id === "" ? {} : { metadata_wire_id: metadata.wire_id }
6416
+ ...notice.wire_id === void 0 || notice.wire_id === "" ? {} : { metadata_wire_id: notice.wire_id }
6420
6417
  });
6421
6418
  if (appended2.kind !== "relay_result") throw new Error("storage returned the wrong relay result kind");
6422
6419
  continue;
@@ -50,9 +50,9 @@ name, slug, or room ID.
50
50
 
51
51
  Incoming message listings contain authorization metadata but no body. Cowork resolves each selected wire ID through persistent SDK history, verifies that the history row matches the listing, archives the message and complete recipient-intent fan-out, and then asks the SDK to read one oldest unread row. If an older introduction becomes unread between listing and acknowledgement, that authoritative row is archived through the same intake path before cowork retries the expected row. There is no defer operation; an empty acknowledgement means another reader already advanced the expected row.
52
52
 
53
- For a file, cowork reads the identity-scoped immutable blob while the item is still unread and verifies its length and SHA-256 against SDK metadata. It then durably archives the exact bytes as canonical base64 together with the reply reference and every per-recipient relay intent before selecting that exact 64-hex wire ID with `getFiles`. Each other active seat receives two SDK items: an authenticated `room_file` metadata envelope and a binary file containing the original bytes. The SDK receives bytes, never a local filesystem path, so there is no staging-file or path-permission dependency. A seat removed after fan-out is skipped terminally without receiving metadata or bytes. A crash can redrive an unfinished recipient from the cowork archive; an already terminal recipient is not retried.
53
+ For a file, cowork reads the identity-scoped immutable blob while the item is still unread and verifies its length and SHA-256 against SDK metadata. It then durably archives the exact bytes as canonical base64 together with the reply reference and every per-recipient relay intent before selecting that exact 64-hex wire ID with `getFiles`. Each other active seat receives two SDK items: a standard `room_msg` envelope authored by the room with the text `<Participant> sent a file`, followed by a binary file containing the original bytes. The notice text uses the stored participant display name, or the room-scoped alias in anonymous rooms. This replaces the previous `room_file` JSON notice; the full author and file metadata remain in Cowork’s archive. The file still identifies the room as its transport sender. These are separate deliveries, so sending the notice first does not guarantee adjacent display. The SDK receives bytes, never a local filesystem path, so there is no staging-file or path-permission dependency. A seat removed after fan-out is skipped terminally without receiving the notice or bytes. A crash can redrive an unfinished recipient from the cowork archive; an already terminal recipient is not retried.
54
54
 
55
- In an anonymous room, SDK-authenticated file metadata identifies the author only by participant ID and alias. The operator archive still retains the real author and exact file bytes. The participant-facing history projection currently contains messages only; file records remain visible in the complete operator Archive/CLI history, while recipients retrieve file bytes through their ordinary ours file inbox.
55
+ In an anonymous room, the notice text names only the room-scoped alias; it includes no participant ID or real participant identity. The envelope author is the room. The binary file’s authenticated sender remains the room. The operator archive still retains the real author and exact file bytes. The participant-facing history projection currently contains messages only; file records remain visible in the complete operator Archive/CLI history, while recipients retrieve file bytes through their ordinary ours file inbox.
56
56
 
57
57
  Cowork history records include messages, files, and the durable relay intent/result trail used for restart recovery. This application archive is distinct from the shared daemon's per-identity `history.sqlite3` and immutable blob store; neither is a substitute backup for the other.
58
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ours.network/cowork",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Durable ours mission rooms on the shared ours daemon.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",