aimeat 1.20.1 → 1.20.3

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.
Files changed (88) hide show
  1. package/README.md +1 -1
  2. package/dist/locales/en.json +53 -1
  3. package/dist/locales/fi.json +53 -1
  4. package/dist/public/css/views/agents-detail.css +4 -0
  5. package/dist/public/css/views/profile.css +81 -5
  6. package/dist/public/css/views/public-workspace-viewer.css +206 -0
  7. package/dist/public/js/services/organisms.js +127 -1
  8. package/dist/public/llms-template.txt +7 -2
  9. package/dist/public/spa.html +2 -0
  10. package/dist/public/views/profile/agents-tab.js +1 -1
  11. package/dist/public/views/profile/organisms-tab.js +255 -9
  12. package/dist/public/views/public-workspace-viewer.js +128 -0
  13. package/dist/src/cli/connect/auth.js +1 -1
  14. package/dist/src/cli/connect/auth.js.map +1 -1
  15. package/dist/src/cli/connect/config.d.ts +1 -1
  16. package/dist/src/cli/connect/config.d.ts.map +1 -1
  17. package/dist/src/cli/connect/mcp/server.d.ts.map +1 -1
  18. package/dist/src/cli/connect/mcp/server.js +5 -1
  19. package/dist/src/cli/connect/mcp/server.js.map +1 -1
  20. package/dist/src/cli/connect/mcp/tools/agent-management.js +1 -1
  21. package/dist/src/cli/connect/mcp/tools/agent-management.js.map +1 -1
  22. package/dist/src/cli/connect/mcp/tools/workspaces.d.ts.map +1 -1
  23. package/dist/src/cli/connect/mcp/tools/workspaces.js +8 -4
  24. package/dist/src/cli/connect/mcp/tools/workspaces.js.map +1 -1
  25. package/dist/src/cli/connect/tool-call.d.ts.map +1 -1
  26. package/dist/src/cli/connect/tool-call.js +6 -3
  27. package/dist/src/cli/connect/tool-call.js.map +1 -1
  28. package/dist/src/generated/api-types.d.ts +246 -0
  29. package/dist/src/generated/api-types.d.ts.map +1 -1
  30. package/dist/src/index.js +1 -1
  31. package/dist/src/mcp/agent-management.d.ts.map +1 -1
  32. package/dist/src/mcp/agent-management.js +4 -3
  33. package/dist/src/mcp/agent-management.js.map +1 -1
  34. package/dist/src/mcp/catalog/definitions.d.ts.map +1 -1
  35. package/dist/src/mcp/catalog/definitions.js +5 -4
  36. package/dist/src/mcp/catalog/definitions.js.map +1 -1
  37. package/dist/src/mcp/catalog/scopes.d.ts +3 -2
  38. package/dist/src/mcp/catalog/scopes.d.ts.map +1 -1
  39. package/dist/src/mcp/catalog/scopes.js +4 -2
  40. package/dist/src/mcp/catalog/scopes.js.map +1 -1
  41. package/dist/src/mcp/workspaces.d.ts +12 -0
  42. package/dist/src/mcp/workspaces.d.ts.map +1 -1
  43. package/dist/src/mcp/workspaces.js +107 -49
  44. package/dist/src/mcp/workspaces.js.map +1 -1
  45. package/dist/src/middleware/workspace-access.d.ts +3 -0
  46. package/dist/src/middleware/workspace-access.d.ts.map +1 -1
  47. package/dist/src/middleware/workspace-access.js +31 -20
  48. package/dist/src/middleware/workspace-access.js.map +1 -1
  49. package/dist/src/models/agent-onboarding-schemas.d.ts +8 -1
  50. package/dist/src/models/agent-onboarding-schemas.d.ts.map +1 -1
  51. package/dist/src/models/agent-onboarding-schemas.js +30 -1
  52. package/dist/src/models/agent-onboarding-schemas.js.map +1 -1
  53. package/dist/src/models/schemas.d.ts +1 -0
  54. package/dist/src/models/schemas.d.ts.map +1 -1
  55. package/dist/src/models/schemas.js +1 -1
  56. package/dist/src/models/schemas.js.map +1 -1
  57. package/dist/src/routes/agents.d.ts.map +1 -1
  58. package/dist/src/routes/agents.js +4 -3
  59. package/dist/src/routes/agents.js.map +1 -1
  60. package/dist/src/routes/organisms.d.ts +14 -0
  61. package/dist/src/routes/organisms.d.ts.map +1 -1
  62. package/dist/src/routes/organisms.js +430 -34
  63. package/dist/src/routes/organisms.js.map +1 -1
  64. package/dist/src/routes/portal.d.ts.map +1 -1
  65. package/dist/src/routes/portal.js +1 -0
  66. package/dist/src/routes/portal.js.map +1 -1
  67. package/dist/src/services/handbooks/admin.d.ts +1 -1
  68. package/dist/src/services/handbooks/admin.d.ts.map +1 -1
  69. package/dist/src/services/handbooks/admin.js +1 -1
  70. package/dist/src/services/handbooks/agent.d.ts +3 -1
  71. package/dist/src/services/handbooks/agent.d.ts.map +1 -1
  72. package/dist/src/services/handbooks/agent.js +3 -1
  73. package/dist/src/services/handbooks/agent.js.map +1 -1
  74. package/dist/src/services/handbooks/appdev.d.ts +3 -1
  75. package/dist/src/services/handbooks/appdev.d.ts.map +1 -1
  76. package/dist/src/services/handbooks/appdev.js +19 -0
  77. package/dist/src/services/handbooks/appdev.js.map +1 -1
  78. package/dist/src/services/workspace-meta.d.ts +10 -0
  79. package/dist/src/services/workspace-meta.d.ts.map +1 -1
  80. package/dist/src/services/workspace-meta.js +50 -3
  81. package/dist/src/services/workspace-meta.js.map +1 -1
  82. package/dist/src/storage/interface.d.ts +6 -3
  83. package/dist/src/storage/interface.d.ts.map +1 -1
  84. package/dist/src/storage/interface.js.map +1 -1
  85. package/dist/src/storage/providers/sqlite/index.js.map +1 -1
  86. package/dist/src/storage/providers/sqlite/schema.js +1 -1
  87. package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
  88. package/package.json +1 -1
package/README.md CHANGED
@@ -164,7 +164,7 @@ For MCP-capable runtimes (Claude Desktop, MCP-aware IDEs), run `aimeat connect s
164
164
 
165
165
  **Multi-agent connector.** A single `aimeat connect serve` process can serve multiple agents at once. Add more agents with `aimeat connect add --agent <name> --url ... --owner ...`; list them with `aimeat connect list`; remove with `aimeat connect remove <name>`. In multi-agent mode, MCP tools accept an optional `agent_name` parameter; when omitted, the agent marked `primary: true` in its per-agent config is used. This is the path for connecting one interactive agent (Claude Code) plus several **task-runner** agents (e.g. CrewAI crews) from one connector process -- see [docs/integrations/crewai.md](docs/integrations/crewai.md) for the task-runner pattern.
166
166
 
167
- **Agent modes.** Every agent declares a mode at registration: `autonomous` (continuous), `interactive` (chat/IDE, default), `task-runner` (triggered, runs one task, exits), or `coordinator` (orchestrates others). Mode picks the Hello Integration flow -- `task-runner` agents get a reduced 5-step onboarding instead of the full 13 because they have no interactive command surface. Combine modes with owner-managed **tags** (`crew:*`, `source:*`, `role:*`, `project:*`) for filtering and grouping in the profile UI. Details: [docs/coding-guidelines/agent-tags.md](docs/coding-guidelines/agent-tags.md).
167
+ **Agent modes.** Every agent declares a mode at registration: `autonomous` (continuous), `interactive` (chat/IDE, default), `task-runner` (triggered, runs one task, exits), `coordinator` (orchestrates others), or `workstation` (a node-visiting agent that lives in the user's own environment -- VSCode, Claude Desktop -- and uses MCP directly). Mode picks the Hello Integration flow: `task-runner` agents get a reduced 7-step onboarding (no command surface, but the test-task pair is kept as a smoke test), and `workstation` agents get the narrowest 4-step flow (auth + platform + capabilities + directives) because they are not node-resident -- no runtime config, slash commands, telemetry, or task queue. The others run the full 13 steps. Combine modes with owner-managed **tags** (`crew:*`, `source:*`, `role:*`, `project:*`) for filtering and grouping in the profile UI. Details: [docs/coding-guidelines/agent-tags.md](docs/coding-guidelines/agent-tags.md).
168
168
 
169
169
  **2. Copy the prompt from your profile.** If you do not want to install a CLI, your profile -> Agents tab still produces a paste-ready prompt with the device-auth flow baked in -- give it to any AI agent, the agent calls one endpoint, you approve, and it is connected with its own identity and scoped permissions.
170
170
 
@@ -483,6 +483,7 @@
483
483
  "interactive": "Interactive",
484
484
  "task-runner": "Task runner",
485
485
  "coordinator": "Coordinator",
486
+ "workstation": "Workstation",
486
487
  "tooltip": "Operational mode — affects how the agent is onboarded and how it consumes work."
487
488
  },
488
489
  "taskRunner": {
@@ -5503,6 +5504,16 @@
5503
5504
  "deny": "Deny",
5504
5505
  "approved": "approved",
5505
5506
  "revoke": "Revoke",
5507
+ "manageMembers": "Manage members",
5508
+ "manageMembersDesc": "Approve join requests and revoke member access.",
5509
+ "pendingRequests": "Pending join requests",
5510
+ "noPendingRequests": "No pending requests.",
5511
+ "confirmRemoveMember": "Revoke {member}’s access to this organism?",
5512
+ "memberRemoved": "Member removed",
5513
+ "removeFailed": "Could not remove member",
5514
+ "reviewFailed": "Could not update request",
5515
+ "joinApproved": "Request approved",
5516
+ "joinRejected": "Request declined",
5506
5517
  "editFlow": "How editing works here",
5507
5518
  "activity": "Activity",
5508
5519
  "draftEdit": "Draft edit",
@@ -5523,6 +5534,21 @@
5523
5534
  "hiddenAgent": "An agent whose details you cannot see",
5524
5535
  "otherAgentHint": "Another owner’s agent — you see what it has done here, not its live status",
5525
5536
  "viaAgent": "done via this agent",
5537
+ "manageAccess": "Manage who can work here",
5538
+ "requestedAccess": "requested access",
5539
+ "addAsContributor": "Add as contributor",
5540
+ "addAsViewer": "as viewer",
5541
+ "deny": "Deny",
5542
+ "roleContributorShort": "contributor",
5543
+ "roleViewerShort": "viewer",
5544
+ "makeContributor": "→ can write",
5545
+ "makeViewer": "→ read only",
5546
+ "remove": "Remove",
5547
+ "addMemberPlaceholder": "owner name (or owner@node / agent#owner@node)",
5548
+ "roleContributor": "contributor (read + write)",
5549
+ "roleViewer": "viewer (read only)",
5550
+ "addMember": "Add",
5551
+ "accessHint": "Members can be a different account; their agents inherit the role. Viewers read; contributors read + write.",
5526
5552
  "contributions": "contributions",
5527
5553
  "events": "events",
5528
5554
  "less": "Less",
@@ -5540,8 +5566,12 @@
5540
5566
  "aiPrompt": "AI access prompt:",
5541
5567
  "aiPromptHuman": "For chat",
5542
5568
  "aiPromptAgent": "For coding agent",
5569
+ "contractPrompt": "Create contract agent",
5570
+ "contractPromptHint": "Copy a prompt to build an agent that processes this workspace (reads requests → writes results)",
5571
+ "contractPromptCopied": "Contract-agent prompt copied — paste it to your AI / coding agent.",
5543
5572
  "promptCopied": "Access prompt copied — paste it to your AI.",
5544
- "addSpaceBtn": "Space",
5573
+ "addSpaceBtn": "Document space",
5574
+ "workspaceOrganism": "Organism",
5545
5575
  "addSpaceTitle": "Add a space",
5546
5576
  "addSpaceDesc": "A document space is a free-form wiki (sections + markdown pages). A record space is a schema-locked list (forms). You can remove spaces in Settings.",
5547
5577
  "modeDocument": "Document (wiki)",
@@ -5576,7 +5606,20 @@
5576
5606
  "sourcesSaveError": "Failed to save sources",
5577
5607
  "publishGated": "Sent for review (publish gate is on)",
5578
5608
  "publishGate": "Require review before publishing",
5609
+ "publishGateHint": "When on, an agent’s publish is held for your review instead of going live",
5579
5610
  "gateToggled": "Publish gate updated",
5611
+ "share": "Share",
5612
+ "shareHint": "Publish document pages to a public, no-login link",
5613
+ "sharePublicTitle": "Public sharing",
5614
+ "sharePublicDesc": "Make published document-space pages readable by anyone with the link — no login required. Drafts are never shared.",
5615
+ "noDocSpaces": "This workspace has no document spaces to share.",
5616
+ "noPublishedDocs": "No published documents yet — publish a page to share it.",
5617
+ "openLink": "open ↗",
5618
+ "openPublicViewer": "Open public viewer",
5619
+ "copyLink": "Copy link",
5620
+ "linkCopied": "Link copied",
5621
+ "copyFailed": "Copy failed",
5622
+ "shareFailed": "Failed to update sharing",
5580
5623
  "needsDecision": "Needs your decision",
5581
5624
  "approve": "Approve",
5582
5625
  "reject": "Reject",
@@ -6192,5 +6235,14 @@
6192
6235
  "exportJson": "Export JSON",
6193
6236
  "copyMarkdown": "Copy as Markdown",
6194
6237
  "copied": "Copied!"
6238
+ },
6239
+ "pwv": {
6240
+ "loading": "Loading…",
6241
+ "sharedDocuments": "Shared documents",
6242
+ "publicBadge": "Public document",
6243
+ "print": "Print / Save as PDF",
6244
+ "selectDocument": "Select a document.",
6245
+ "unavailableTitle": "Nothing to show here",
6246
+ "unavailableDesc": "This workspace has no publicly shared documents, or the link is incomplete."
6195
6247
  }
6196
6248
  }
@@ -483,6 +483,7 @@
483
483
  "interactive": "Interaktiivinen",
484
484
  "task-runner": "Tehtäväajuri",
485
485
  "coordinator": "Koordinaattori",
486
+ "workstation": "Työasema",
486
487
  "tooltip": "Toimintatila — vaikuttaa siihen, miten agentti läpäisee Hello Integrationin ja kuluttaa työtä."
487
488
  },
488
489
  "taskRunner": {
@@ -5503,6 +5504,16 @@
5503
5504
  "deny": "Hylkää",
5504
5505
  "approved": "hyväksytty",
5505
5506
  "revoke": "Peru",
5507
+ "manageMembers": "Hallitse jäseniä",
5508
+ "manageMembersDesc": "Hyväksy liittymispyynnöt ja peru jäsenten pääsy.",
5509
+ "pendingRequests": "Odottavat liittymispyynnöt",
5510
+ "noPendingRequests": "Ei odottavia pyyntöjä.",
5511
+ "confirmRemoveMember": "Peru käyttäjän {member} pääsy tähän organismiin?",
5512
+ "memberRemoved": "Jäsen poistettu",
5513
+ "removeFailed": "Jäsenen poisto epäonnistui",
5514
+ "reviewFailed": "Pyynnön päivitys epäonnistui",
5515
+ "joinApproved": "Pyyntö hyväksytty",
5516
+ "joinRejected": "Pyyntö hylätty",
5506
5517
  "editFlow": "Miten muokkaus toimii täällä",
5507
5518
  "activity": "Aktiivisuus",
5508
5519
  "draftEdit": "Luonnoksen muokkaus",
@@ -5523,6 +5534,21 @@
5523
5534
  "hiddenAgent": "Agentti jonka tietoja et näe",
5524
5535
  "otherAgentHint": "Toisen omistajan agentti — näet mitä se on tehnyt täällä, et sen nykytilaa",
5525
5536
  "viaAgent": "tehty tämän agentin kautta",
5537
+ "manageAccess": "Hallitse ketkä työskentelevät täällä",
5538
+ "requestedAccess": "pyysi pääsyä",
5539
+ "addAsContributor": "Lisää kirjoittajaksi",
5540
+ "addAsViewer": "lukijaksi",
5541
+ "deny": "Hylkää",
5542
+ "roleContributorShort": "kirjoittaja",
5543
+ "roleViewerShort": "lukija",
5544
+ "makeContributor": "→ saa kirjoittaa",
5545
+ "makeViewer": "→ vain luku",
5546
+ "remove": "Poista",
5547
+ "addMemberPlaceholder": "omistajan nimi (tai owner@node / agent#owner@node)",
5548
+ "roleContributor": "kirjoittaja (luku + kirjoitus)",
5549
+ "roleViewer": "lukija (vain luku)",
5550
+ "addMember": "Lisää",
5551
+ "accessHint": "Jäsen voi olla eri tili; sen agentit perivät roolin. Lukijat lukevat; kirjoittajat lukevat + kirjoittavat.",
5526
5552
  "contributions": "kontribuutiota",
5527
5553
  "events": "tapahtumaa",
5528
5554
  "less": "Vähemmän",
@@ -5540,8 +5566,12 @@
5540
5566
  "aiPrompt": "AI-käyttöohje:",
5541
5567
  "aiPromptHuman": "Chattiin",
5542
5568
  "aiPromptAgent": "Koodausagentille",
5569
+ "contractPrompt": "Luo contract-agentti",
5570
+ "contractPromptHint": "Kopioi kehote agentin rakentamiseksi joka prosessoi tätä workspacea (lukee pyynnöt → kirjoittaa tulokset)",
5571
+ "contractPromptCopied": "Contract-agentti-kehote kopioitu — liitä se tekoälyllesi / koodausagentille.",
5543
5572
  "promptCopied": "Käyttöohje kopioitu — liitä se tekoälyllesi.",
5544
- "addSpaceBtn": "Tila",
5573
+ "addSpaceBtn": "Dokumenttitila",
5574
+ "workspaceOrganism": "Organismi",
5545
5575
  "addSpaceTitle": "Lisää tila",
5546
5576
  "addSpaceDesc": "Dokumenttitila on vapaamuotoinen wiki (osiot + markdown-sivut). Tietuetila on skeemalukittu lista (lomakkeet). Voit poistaa tiloja asetuksissa.",
5547
5577
  "modeDocument": "Dokumentti (wiki)",
@@ -5578,7 +5608,20 @@
5578
5608
  "sourcesSaveError": "Lähteiden tallennus epäonnistui",
5579
5609
  "publishGated": "Lähetetty tarkistettavaksi (julkaisuportti päällä)",
5580
5610
  "publishGate": "Vaadi tarkistus ennen julkaisua",
5611
+ "publishGateHint": "Päällä ollessaan agentin julkaisu jää tarkistettavaksesi sen sijaan että menisi suoraan liveksi",
5581
5612
  "gateToggled": "Julkaisuportti päivitetty",
5613
+ "share": "Jaa",
5614
+ "shareHint": "Julkaise dokumenttisivuja julkiseen linkkiin ilman kirjautumista",
5615
+ "sharePublicTitle": "Julkinen jako",
5616
+ "sharePublicDesc": "Tee julkaistut dokumenttisivut luettaviksi kenelle tahansa linkin kautta — ilman kirjautumista. Luonnoksia ei koskaan jaeta.",
5617
+ "noDocSpaces": "Tässä työtilassa ei ole jaettavia dokumenttitiloja.",
5618
+ "noPublishedDocs": "Ei julkaistuja dokumentteja vielä — julkaise sivu jakaaksesi sen.",
5619
+ "openLink": "avaa ↗",
5620
+ "openPublicViewer": "Avaa julkinen näkymä",
5621
+ "copyLink": "Kopioi linkki",
5622
+ "linkCopied": "Linkki kopioitu",
5623
+ "copyFailed": "Kopiointi epäonnistui",
5624
+ "shareFailed": "Jaon päivitys epäonnistui",
5582
5625
  "needsDecision": "Vaatii päätöksesi",
5583
5626
  "approve": "Hyväksy",
5584
5627
  "reject": "Hylkää",
@@ -6194,5 +6237,14 @@
6194
6237
  "exportJson": "Vie JSON",
6195
6238
  "copyMarkdown": "Kopioi Markdownina",
6196
6239
  "copied": "Kopioitu!"
6240
+ },
6241
+ "pwv": {
6242
+ "loading": "Ladataan…",
6243
+ "sharedDocuments": "Jaetut dokumentit",
6244
+ "publicBadge": "Julkinen dokumentti",
6245
+ "print": "Tulosta / Tallenna PDF:nä",
6246
+ "selectDocument": "Valitse dokumentti.",
6247
+ "unavailableTitle": "Ei näytettävää",
6248
+ "unavailableDesc": "Tällä työtilalla ei ole julkisesti jaettuja dokumentteja, tai linkki on puutteellinen."
6197
6249
  }
6198
6250
  }
@@ -1551,6 +1551,10 @@
1551
1551
  background: var(--accent-subtle, rgba(16, 185, 129, 0.1));
1552
1552
  color: var(--success, #10b981);
1553
1553
  }
1554
+ .pf .pf-agd-badge--mode-workstation {
1555
+ background: var(--accent-subtle, rgba(20, 184, 166, 0.1));
1556
+ color: var(--teal, #14b8a6);
1557
+ }
1554
1558
 
1555
1559
  /* Tag chip strip on expanded card */
1556
1560
  .pf .pf-agd-tag-strip {
@@ -53,6 +53,17 @@
53
53
  * var(--success,#22c55e)/var(--danger,#ef4444). Appearance unchanged (values
54
54
  * resolve identically; swatches deliberately do not flip in dark). Shared shape
55
55
  * was already factored onto .badge-label — kept as-is.
56
+ * v1.12.0 — 2026-06-09 — Workspace header restyle (pj-): breadcrumb (.pj-ws-crumbs)
57
+ * keeps the parent organism visible; inline title+badge (.pj-ws-titlerow); the
58
+ * action row became a tinted .pj-toolbar with consistent buttons (card fill +
59
+ * shadow so they stop blending into the page), .pj-toolbar-sep separators, and the
60
+ * review gate pushed apart (margin-left:auto). .pj-section-head no longer
61
+ * space-betweens — add-actions cluster next to their title and lift off the panel;
62
+ * the .pj-doc-tag kind chip got an accent-tinted fill so it stops blending in.
63
+ * v1.13.0 — 2026-06-09 — Record-item readability: draft rows get a --warn rail +
64
+ * bordered/bolder DRAFT chip and the inline Edit button gets the card-fill
65
+ * treatment (both were nearly invisible). Expanded fields (.pj-rec-fields .kv-row)
66
+ * gain a dotted leader between label and value so each value maps to its key.
56
67
  */
57
68
  .pf-hero{background:var(--pf-hero-gradient);border-bottom:1px solid var(--border,#E5E7EB)}
58
69
  .pf-hero-inner{max-width:1000px;margin:0 auto;padding:2rem 1.5rem 0}
@@ -2018,24 +2029,62 @@
2018
2029
 
2019
2030
  /* ── Projects tab (pj-) ── */
2020
2031
  .pj-ws { display: flex; flex-direction: column; gap: 0.5rem; }
2021
- .pj-gate { margin: 0.25rem 0 0.5rem; }
2032
+
2033
+ /* Workspace breadcrumb — keeps the parent organism visible so you always know
2034
+ which organism this workspace belongs to. */
2035
+ .pj-ws-crumbs { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
2036
+ .pj-crumb-sep { color: var(--muted); font-size: 0.85rem; }
2037
+ .pj-crumb-org { font-size: 0.85rem; font-weight: 600; color: var(--text); }
2038
+
2039
+ /* Title row — workspace name + status badge sit on one line. */
2040
+ .pj-ws-titlerow { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
2041
+ .pj-ws-title { margin: 0; }
2042
+
2043
+ /* Workspace action toolbar — a tinted bar so the (otherwise transparent) buttons
2044
+ read as real buttons rather than blending into the page. Consistent gap +
2045
+ vertical separators group the Settings/Add, AI-prompt, and review-gate controls. */
2046
+ .pj-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; padding: 0.45rem 0.55rem; background: var(--bg-dim); border: 1px solid var(--border); border-radius: 10px; margin: 0.1rem 0 0.4rem; }
2047
+ .pj-toolbar .btn-ghost, .pj-toolbar .btn-outline { background: var(--card); box-shadow: var(--shadow-sm); }
2048
+ .pj-toolbar .btn-ghost:hover, .pj-toolbar .btn-outline:hover { background: var(--bg-surface); border-color: var(--text-muted); }
2049
+ .pj-toolbar-sep { width: 1px; align-self: stretch; min-height: 1.4rem; background: var(--border); margin: 0 0.15rem; }
2050
+ /* Publish-gate toggle: a chip grouped with the toolbar (after a separator) so it doesn't float alone */
2051
+ .pj-toolbar-gate { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 0.3rem 0.6rem; box-shadow: var(--shadow-sm); }
2052
+ .pj-toolbar-gate:hover { border-color: var(--text-muted); }
2022
2053
  .pj-gate-label { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
2023
2054
  .pj-inbox { border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem; background: var(--bg-dim); margin-bottom: 0.5rem; }
2024
2055
  .pj-approval { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 0; border-top: 1px solid var(--border); }
2025
2056
  .pj-approval:first-of-type { border-top: none; }
2026
2057
  .pj-approval-text { flex: 1; font-size: 0.88rem; }
2027
2058
  .pj-section { border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.75rem; background: var(--surface); }
2028
- .pj-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
2029
- .pj-section-title { font-weight: 600; text-transform: capitalize; }
2059
+ /* Action buttons sit right after the title (not pushed to the far edge) so they
2060
+ stay visually tied to the panel they act on. */
2061
+ .pj-section-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
2062
+ .pj-section-title { font-weight: 600; text-transform: capitalize; margin-right: 0.25rem; }
2063
+ /* Lift the add-actions off the panel background so they read as buttons. */
2064
+ .pj-section-head .btn-outline, .pj-section-head .btn-ghost { background: var(--card); box-shadow: var(--shadow-sm); }
2065
+ .pj-section-head .btn-outline:hover, .pj-section-head .btn-ghost:hover { background: var(--bg-surface); border-color: var(--text-muted); }
2030
2066
  .pj-draft-form { margin: 0.4rem 0; }
2031
2067
  .pj-drafts { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.3rem; }
2032
2068
  .pj-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; }
2033
- .pj-item-draft { border-left: 3px solid var(--border); padding-left: 0.5rem; }
2069
+ /* Draft rows get a warn-coloured rail + a bordered, bolder DRAFT chip so the
2070
+ draft state actually reads (the pale badge alone was nearly invisible). */
2071
+ .pj-item-draft { border-left: 3px solid var(--warn); padding-left: 0.5rem; }
2072
+ .pj-item-draft .badge-warn { border: 1px solid var(--warn-border); font-weight: 700; }
2073
+ /* Lift the inline Edit button off the panel so it stops blending in (same
2074
+ card-fill treatment as the section/toolbar actions). */
2075
+ .pj-item .btn-ghost { background: var(--card); box-shadow: var(--shadow-sm); }
2076
+ .pj-item .btn-ghost:hover { background: var(--bg-surface); border-color: var(--text-muted); }
2034
2077
  .pj-item-text { flex: 1; font-size: 0.9rem; }
2035
2078
  .pj-rec { border-radius: 6px; }
2036
2079
  .pj-rec-title { flex: 1; text-align: left; background: none; border: none; cursor: pointer; font-size: 0.9rem; color: var(--text); padding: 0; }
2037
2080
  .pj-rec-title:hover { color: var(--accent); }
2038
2081
  .pj-rec-fields { margin: 0.1rem 0 0.4rem 0.6rem; padding: 0.2rem 0.6rem; border-left: 2px solid var(--border); background: var(--bg-dim); border-radius: 0 6px 6px 0; }
2082
+ /* Dotted leader between each field label and its value — ties the two ends of a
2083
+ long row together so you can follow which value belongs to which key. */
2084
+ .pj-rec-fields .kv-row { align-items: baseline; gap: 0; }
2085
+ .pj-rec-fields .kv-label { flex: 1 1 auto; display: flex; align-items: baseline; min-width: 0; color: var(--muted); }
2086
+ .pj-rec-fields .kv-label::after { content: ""; flex: 1 1 auto; height: 0; margin: 0 0.45rem; border-bottom: 1px dotted var(--border); transform: translateY(-0.18em); }
2087
+ .pj-rec-fields .kv-value { flex: 0 1 auto; text-align: right; }
2039
2088
  .pj-rec-empty { font-size: 0.82rem; padding: 0.2rem 0; }
2040
2089
  .pj-empty { color: var(--muted); font-size: 0.85rem; padding: 0.2rem 0; }
2041
2090
  .pj-decision { font-size: 0.85rem; color: var(--muted); }
@@ -2045,10 +2094,26 @@
2045
2094
  .pj-errors { border: 1px solid var(--danger); border-radius: 10px; padding: 0.6rem 0.75rem; margin: 0.5rem 0; background: var(--bg-dim); }
2046
2095
  .pj-errors-title { font-weight: 600; margin-bottom: 0.3rem; color: var(--danger); }
2047
2096
  .pj-error-line { font-size: 0.82rem; color: var(--text); padding: 0.1rem 0; }
2048
- .pj-doc-tag { font-size: 0.68rem; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 0 0.3rem; margin-left: 0.4rem; vertical-align: middle; }
2097
+ .pj-doc-tag { font-size: 0.68rem; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg-dim)); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); border-radius: 6px; padding: 0.05rem 0.4rem; margin-left: 0.4rem; vertical-align: middle; }
2049
2098
  .pj-doc-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0; }
2050
2099
  .pj-doc-link { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.9rem; text-align: left; flex: 1; padding: 0; }
2051
2100
  .pj-doc-link:hover { text-decoration: underline; }
2101
+
2102
+ /* Public-sharing panel: per-space and per-doc public toggles + the viewer link. */
2103
+ .pj-share-space { padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
2104
+ .pj-share-space:last-of-type { border-bottom: none; }
2105
+ .pj-share-row { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-weight: 600; }
2106
+ .pj-share-row input, .pj-share-doc input { cursor: pointer; }
2107
+ .pj-share-docs { display: flex; flex-direction: column; gap: 0.2rem; margin: 0.3rem 0 0.4rem 1.6rem; }
2108
+ .pj-share-doc { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; color: var(--text); }
2109
+ .pj-share-doc-title { flex: 1; }
2110
+ .pj-share-link { color: var(--accent); font-size: 0.82rem; text-decoration: none; }
2111
+ .pj-share-link:hover { text-decoration: underline; }
2112
+ .pj-share-empty { margin: 0.2rem 0 0.4rem 1.6rem; }
2113
+ .pj-share-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
2114
+ /* Card fill + shadow so the action buttons stop blending into the tinted panel — matches .pj-toolbar. */
2115
+ .pj-share-actions .btn-outline, .pj-share-actions .btn-ghost { background: var(--card); box-shadow: var(--shadow-sm); }
2116
+ .pj-share-actions .btn-outline:hover, .pj-share-actions .btn-ghost:hover { background: var(--bg-surface); border-color: var(--text-muted); }
2052
2117
  /* The detail / reading pane — a white, slightly elevated card so it reads as the focused content,
2053
2118
  distinct from the flat tree panel beside it. */
2054
2119
  .pj-doc-view { border: 1px solid var(--border); border-radius: 10px; padding: 1.4rem 1.8rem; margin: 0.4rem 0; background: var(--card); box-shadow: var(--shadow-sm); }
@@ -2116,6 +2181,17 @@
2116
2181
  .pj-part-agent { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; border: 1px solid var(--border); border-radius: 6px; padding: 0.12rem 0.5rem; }
2117
2182
  .pj-part-agent.own { border-color: var(--success); }
2118
2183
  .pj-part-agent.ghost { color: var(--muted); border-style: dashed; opacity: 0.65; }
2184
+ /* Manage access — creator adds/roles/removes members in the participants panel */
2185
+ .pj-access { margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 0.45rem; }
2186
+ .pj-access-title { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
2187
+ .pj-access-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.6rem; background: var(--card); }
2188
+ .pj-access-who { display: flex; align-items: center; gap: 0.4rem; font-size: 0.86rem; }
2189
+ .pj-access-note { font-size: 0.78rem; color: var(--muted); }
2190
+ .pj-access-actions { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
2191
+ .pj-access-add { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.2rem; }
2192
+ .pj-access-input { flex: 1 1 14rem; min-width: 10rem; border: 1px solid var(--border); border-radius: 7px; padding: 0.4rem 0.6rem; background: var(--surface); color: var(--text); font-size: 0.86rem; }
2193
+ .pj-access-role { border: 1px solid var(--border); border-radius: 7px; padding: 0.4rem 0.5rem; background: var(--surface); color: var(--text); font-size: 0.84rem; }
2194
+ .pj-access-hint { font-size: 0.76rem; color: var(--muted); }
2119
2195
  /* Activity panel — GitHub-style contribution heatmap + audit-log feed */
2120
2196
  .pj-act { padding: 0.1rem; }
2121
2197
  .pj-act-count { font-size: 0.72rem; font-weight: 500; color: var(--muted); margin-left: 0.5rem; }
@@ -0,0 +1,206 @@
1
+ /**
2
+ * @file public-workspace-viewer.css
3
+ * @description Styles for the public (no-login) workspace document viewer. A two-column layout —
4
+ * table-of-contents sidebar + rendered markdown — that collapses to a single column on narrow
5
+ * screens, plus a print stylesheet so "Print / Save as PDF" produces a clean content-only page.
6
+ * All colors/spacing come from theme.css variables (no dark-only rgba, no hardcoded hex).
7
+ * @version-history
8
+ * v1.0.0 — 2026-06-09 — Initial: slice 2 of the workspace public-sharing plan.
9
+ */
10
+
11
+ .pwv-container {
12
+ max-width: 1100px;
13
+ margin: 0 auto;
14
+ padding: 1.5rem;
15
+ display: grid;
16
+ grid-template-columns: 240px 1fr;
17
+ gap: 1.5rem;
18
+ align-items: start;
19
+ min-height: 60vh;
20
+ }
21
+
22
+ /* ── Table of contents ── */
23
+ .pwv-toc {
24
+ position: sticky;
25
+ top: 1.5rem;
26
+ background: var(--card);
27
+ border: 1px solid var(--border);
28
+ border-radius: 10px;
29
+ padding: 0.75rem;
30
+ }
31
+
32
+ .pwv-toc-head {
33
+ font-size: 0.75rem;
34
+ font-weight: 700;
35
+ text-transform: uppercase;
36
+ letter-spacing: 0.05em;
37
+ color: var(--muted);
38
+ padding: 0.25rem 0.5rem 0.5rem;
39
+ }
40
+
41
+ .pwv-toc-list {
42
+ display: flex;
43
+ flex-direction: column;
44
+ gap: 0.15rem;
45
+ }
46
+
47
+ .pwv-toc-item {
48
+ text-align: left;
49
+ background: transparent;
50
+ border: none;
51
+ border-radius: 6px;
52
+ padding: 0.5rem 0.6rem;
53
+ font-size: 0.9rem;
54
+ color: var(--text);
55
+ cursor: pointer;
56
+ transition: background 0.12s ease;
57
+ }
58
+
59
+ .pwv-toc-item:hover {
60
+ background: var(--bg-dim);
61
+ }
62
+
63
+ .pwv-toc-item.pwv-active {
64
+ background: var(--bg-dim);
65
+ color: var(--accent);
66
+ font-weight: 600;
67
+ }
68
+
69
+ /* ── Main content ── */
70
+ .pwv-main {
71
+ min-width: 0;
72
+ }
73
+
74
+ .pwv-bar {
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: space-between;
78
+ gap: 0.75rem;
79
+ margin-bottom: 1rem;
80
+ }
81
+
82
+ .pwv-badge {
83
+ display: inline-block;
84
+ font-size: 0.72rem;
85
+ font-weight: 600;
86
+ text-transform: uppercase;
87
+ letter-spacing: 0.04em;
88
+ color: var(--accent);
89
+ background: var(--bg-dim);
90
+ border: 1px solid var(--border);
91
+ border-radius: 999px;
92
+ padding: 0.2rem 0.7rem;
93
+ }
94
+
95
+ /* Card fill + shadow so the print button stands out against the page (matches the in-app toolbar). */
96
+ .pwv-print { background: var(--card); box-shadow: var(--shadow-sm); }
97
+ .pwv-print:hover { background: var(--bg-surface); border-color: var(--text-muted); }
98
+
99
+ .pwv-doc {
100
+ background: var(--card);
101
+ border: 1px solid var(--border);
102
+ border-radius: 10px;
103
+ padding: 1.75rem 2rem;
104
+ }
105
+
106
+ /* ── Markdown typography (scoped to the viewer; mirrors the in-app document view) ── */
107
+ .pwv-doc .md-body { font-size: 0.95rem; line-height: 1.7; color: var(--text); max-width: 78ch; overflow-wrap: break-word; }
108
+ .pwv-doc .md-body > :first-child { margin-top: 0; }
109
+ .pwv-doc .md-body > :last-child { margin-bottom: 0; }
110
+ .pwv-doc .md-body h1,
111
+ .pwv-doc .md-body h2,
112
+ .pwv-doc .md-body h3,
113
+ .pwv-doc .md-body h4,
114
+ .pwv-doc .md-body h5,
115
+ .pwv-doc .md-body h6 { font-weight: 700; line-height: 1.3; color: var(--text); margin: 1.8em 0 0.6em; }
116
+ .pwv-doc .md-body h1 { font-size: 1.7rem; letter-spacing: -0.01em; padding-bottom: 0.3em; border-bottom: 2px solid var(--border); margin-top: 0.2em; }
117
+ .pwv-doc .md-body h2 { font-size: 1.32rem; padding-bottom: 0.25em; border-bottom: 1px solid var(--border); }
118
+ .pwv-doc .md-body h3 { font-size: 1.13rem; }
119
+ .pwv-doc .md-body h4 { font-size: 1rem; }
120
+ .pwv-doc .md-body h5 { font-size: 0.9rem; }
121
+ .pwv-doc .md-body h6 { font-size: 0.85rem; color: var(--muted); }
122
+ .pwv-doc .md-body p { margin: 0.85em 0; }
123
+ .pwv-doc .md-body ul,
124
+ .pwv-doc .md-body ol { margin: 0.7em 0; padding-left: 1.7em; }
125
+ .pwv-doc .md-body ul { list-style: disc; }
126
+ .pwv-doc .md-body ol { list-style: decimal; }
127
+ .pwv-doc .md-body li { margin: 0.32em 0; padding-left: 0.2em; }
128
+ .pwv-doc .md-body li > ul,
129
+ .pwv-doc .md-body li > ol { margin: 0.32em 0; }
130
+ .pwv-doc .md-body a { color: var(--accent); text-decoration: none; }
131
+ .pwv-doc .md-body a:hover { text-decoration: underline; }
132
+ .pwv-doc .md-body strong { font-weight: 700; color: var(--text); }
133
+ .pwv-doc .md-body em { font-style: italic; }
134
+ .pwv-doc .md-body .md-code { font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace); font-size: 0.85em; background: var(--bg-dim); padding: 0.12em 0.42em; border-radius: 4px; border: 1px solid var(--border); }
135
+ .pwv-doc .md-body .md-pre { background: var(--bg-dim); border: 1px solid var(--border); border-radius: 8px; padding: 0.9em 1.1em; overflow-x: auto; margin: 1em 0; line-height: 1.5; }
136
+ .pwv-doc .md-body .md-pre .md-code { background: none; border: none; padding: 0; font-size: 0.84rem; }
137
+ .pwv-doc .md-body blockquote { margin: 1em 0; padding: 0.3em 1.1em; border-left: 3px solid var(--accent); background: var(--bg-dim); border-radius: 0 6px 6px 0; color: var(--muted); }
138
+ .pwv-doc .md-body blockquote p { margin: 0.4em 0; }
139
+ .pwv-doc .md-body table { border-collapse: collapse; margin: 1em 0; width: 100%; font-size: 0.9rem; }
140
+ .pwv-doc .md-body th,
141
+ .pwv-doc .md-body td { border: 1px solid var(--border); padding: 0.45em 0.75em; text-align: left; vertical-align: top; }
142
+ .pwv-doc .md-body th { background: var(--bg-dim); font-weight: 600; }
143
+ .pwv-doc .md-body tbody tr:nth-child(even) { background: var(--bg-dim); }
144
+ .pwv-doc .md-body .md-img { max-width: 100%; height: auto; border-radius: 6px; margin: 0.6em 0; }
145
+ .pwv-doc .md-body hr { border: none; border-top: 1px solid var(--border); margin: 1.6em 0; }
146
+
147
+ /* ── States ── */
148
+ .pwv-state {
149
+ color: var(--muted);
150
+ padding: 2rem 0;
151
+ text-align: center;
152
+ }
153
+
154
+ .pwv-error {
155
+ color: var(--danger, #E8564A);
156
+ }
157
+
158
+ .pwv-empty {
159
+ grid-column: 1 / -1;
160
+ text-align: center;
161
+ padding: 4rem 1.5rem;
162
+ color: var(--muted);
163
+ }
164
+
165
+ .pwv-empty-icon {
166
+ font-size: 2.5rem;
167
+ margin-bottom: 0.5rem;
168
+ }
169
+
170
+ .pwv-empty h2 {
171
+ color: var(--text);
172
+ font-size: 1.25rem;
173
+ margin: 0 0 0.5rem;
174
+ }
175
+
176
+ /* ── Responsive: stack the TOC above the content on narrow screens ── */
177
+ @media (max-width: 720px) {
178
+ .pwv-container {
179
+ grid-template-columns: 1fr;
180
+ }
181
+ .pwv-toc {
182
+ position: static;
183
+ }
184
+ }
185
+
186
+ /* ── Print: content only — hide the global site nav, the TOC, the action bar, and the card chrome.
187
+ * `body.pwv-active` is added by the view while it is mounted (see public-workspace-viewer.js), so the
188
+ * nav-hiding rule applies only on this page and only the document content reaches paper. ── */
189
+ @media print {
190
+ /* Physical page margins so the text isn't flush against the paper edges. */
191
+ @page { margin: 1.8cm; }
192
+ body.pwv-active .topnav,
193
+ body.pwv-active .pwv-toc,
194
+ body.pwv-active .pwv-bar { display: none !important; }
195
+ body.pwv-active .pwv-container {
196
+ display: block !important;
197
+ max-width: none;
198
+ padding: 0;
199
+ }
200
+ body.pwv-active .pwv-doc {
201
+ border: none;
202
+ border-radius: 0;
203
+ padding: 0;
204
+ }
205
+ body.pwv-active .pwv-doc .md-body { max-width: none; }
206
+ }