@pairz/team 0.0.1 → 1.0.0-rc.82

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 (96) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +51 -1
  3. package/WORDS.md +370 -0
  4. package/contract.d.ts +8 -0
  5. package/contract.js +8 -0
  6. package/mod.d.ts +25 -0
  7. package/mod.js +25 -0
  8. package/package.json +61 -3
  9. package/team/actions/agent.d.ts +14 -0
  10. package/team/actions/agent.js +401 -0
  11. package/team/actions/define.d.ts +1 -0
  12. package/team/actions/define.js +45 -0
  13. package/team/collections/agent.d.ts +170 -0
  14. package/team/collections/agent.js +126 -0
  15. package/team/contract.d.ts +11 -0
  16. package/team/contract.js +1 -0
  17. package/team/mod.d.ts +28 -0
  18. package/team/mod.js +64 -0
  19. package/team/resources/propose.d.ts +1 -0
  20. package/team/resources/propose.js +102 -0
  21. package/team/shared/definition.d.ts +3 -0
  22. package/team/shared/definition.js +11 -0
  23. package/team/shared/everywhere.d.ts +11 -0
  24. package/team/shared/everywhere.js +29 -0
  25. package/team/shared/limits.d.ts +17 -0
  26. package/team/shared/limits.js +17 -0
  27. package/team/views/web/agent-add.d.ts +14 -0
  28. package/team/views/web/agent-add.js +58 -0
  29. package/team/views/web/agent-describe.d.ts +38 -0
  30. package/team/views/web/agent-describe.js +44 -0
  31. package/team/views/web/agent-fields.d.ts +35 -0
  32. package/team/views/web/agent-fields.js +88 -0
  33. package/team/views/web/agent-known.d.ts +22 -0
  34. package/team/views/web/agent-known.js +62 -0
  35. package/team/views/web/agent-new.d.ts +27 -0
  36. package/team/views/web/agent-new.js +150 -0
  37. package/team/views/web/agent-org.d.ts +12 -0
  38. package/team/views/web/agent-org.js +89 -0
  39. package/team/views/web/agent-palette.d.ts +19 -0
  40. package/team/views/web/agent-palette.js +203 -0
  41. package/team/views/web/agent-steps.d.ts +23 -0
  42. package/team/views/web/agent-steps.js +56 -0
  43. package/team/views/web/agent.d.ts +20 -0
  44. package/team/views/web/agent.js +310 -0
  45. package/team/views/web/agents.d.ts +48 -0
  46. package/team/views/web/agents.js +59 -0
  47. package/team/views/web/model-pick.d.ts +36 -0
  48. package/team/views/web/model-pick.js +44 -0
  49. package/team/views/web/model-picker.d.ts +83 -0
  50. package/team/views/web/model-picker.js +262 -0
  51. package/team/views/web/places.d.ts +24 -0
  52. package/team/views/web/places.js +10 -0
  53. package/team/views/web/style.d.ts +9 -0
  54. package/team/views/web/style.js +251 -0
  55. package/team/views/web/words.d.ts +5 -0
  56. package/team/views/web/words.js +246 -0
  57. package/team/web.d.ts +22 -0
  58. package/team/web.js +43 -0
  59. package/tiers/actions/choose.d.ts +7 -0
  60. package/tiers/actions/choose.js +336 -0
  61. package/tiers/actions/model.d.ts +1 -0
  62. package/tiers/actions/model.js +61 -0
  63. package/tiers/collections/choice.d.ts +54 -0
  64. package/tiers/collections/choice.js +81 -0
  65. package/tiers/collections/template.d.ts +76 -0
  66. package/tiers/collections/template.js +42 -0
  67. package/tiers/contract.d.ts +23 -0
  68. package/tiers/contract.js +1 -0
  69. package/tiers/mod.d.ts +75 -0
  70. package/tiers/mod.js +114 -0
  71. package/tiers/shared/plans.d.ts +61 -0
  72. package/tiers/shared/plans.js +74 -0
  73. package/tiers/shared/shown.d.ts +189 -0
  74. package/tiers/shared/shown.js +284 -0
  75. package/tiers/shared/tiers.d.ts +157 -0
  76. package/tiers/shared/tiers.js +179 -0
  77. package/tiers/views/web/composer.d.ts +15 -0
  78. package/tiers/views/web/composer.js +87 -0
  79. package/tiers/views/web/org.d.ts +69 -0
  80. package/tiers/views/web/org.js +334 -0
  81. package/tiers/views/web/say.d.ts +146 -0
  82. package/tiers/views/web/say.js +150 -0
  83. package/tiers/views/web/setup.d.ts +23 -0
  84. package/tiers/views/web/setup.js +80 -0
  85. package/tiers/views/web/space.d.ts +32 -0
  86. package/tiers/views/web/space.js +78 -0
  87. package/tiers/views/web/style.d.ts +7 -0
  88. package/tiers/views/web/style.js +193 -0
  89. package/tiers/views/web/team.d.ts +38 -0
  90. package/tiers/views/web/team.js +118 -0
  91. package/tiers/views/web/words.d.ts +48 -0
  92. package/tiers/views/web/words.js +122 -0
  93. package/tiers/web.d.ts +31 -0
  94. package/tiers/web.js +72 -0
  95. package/web.d.ts +14 -0
  96. package/web.js +14 -0
@@ -0,0 +1,251 @@
1
+ /**
2
+ * Agents' layout on the web, on the theme's variables: adding one to a
3
+ * space (those someone knows, and making one), the form an agent is made
4
+ * and changed with (its emoji, its instructions being written, its model, its tools),
5
+ * what making one says after, and an agent's page (where it works, what
6
+ * it's told, what it uses, changing and deleting it). Only layout: the
7
+ * pieces are the toolkit's.
8
+ */
9
+ export const STYLE = `
10
+ /* Choosing a model */
11
+ .model-chosen { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px;
12
+ padding: 8px 12px; border: 1px solid var(--input); border-radius: var(--radius-md);
13
+ background: var(--background); color: inherit; font: inherit; text-align: left; cursor: pointer;
14
+ transition: border-color .15s, background-color .15s; }
15
+ .model-chosen:hover:not(:disabled) { background: var(--accent); }
16
+ .model-chosen:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
17
+ .model-chosen:disabled { opacity: .6; cursor: default; }
18
+ .model-chosen > .pairz-icon { flex: none; color: var(--muted-foreground); }
19
+ .model-chosen-text, .model-row-text { display: grid; flex: 1; min-width: 0; gap: 1px; }
20
+ .model-chosen-text b, .model-row-text b { overflow: hidden; font-size: 14px; font-weight: 580;
21
+ text-overflow: ellipsis; white-space: nowrap; }
22
+ .model-chosen-text span, .model-row-text span { overflow: hidden; color: var(--muted-foreground);
23
+ font-size: 12.5px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
24
+ .model-dialog .pairz-dialog-body { display: flex; min-height: min(560px, calc(100dvh - 130px)); }
25
+ .model-choose { display: flex; flex: 1; flex-direction: column; gap: 12px; min-width: 0; }
26
+ .model-groups { display: grid; gap: 16px; }
27
+ .model-group { margin: 0 0 6px; color: var(--muted-foreground); font-size: 12px; font-weight: 600; }
28
+ .model-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
29
+ .model-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px;
30
+ padding: 7px 10px; border: 0; border-radius: var(--radius-md); background: transparent;
31
+ color: inherit; font: inherit; text-align: left; cursor: pointer; }
32
+ .model-row:hover:not(:disabled) { background: var(--accent); }
33
+ .model-row:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
34
+ .model-row:disabled { opacity: .55; cursor: not-allowed; }
35
+ .model-row[aria-current] { background: var(--primary-soft); }
36
+ .model-row > .pairz-icon { flex: none; color: var(--muted-foreground); }
37
+ .model-row[aria-current] > .pairz-icon { color: var(--primary); }
38
+ .model-row .model-row-text span { white-space: normal; }
39
+ .model-none { margin: 24px 0; color: var(--muted-foreground); font-size: 14px; text-align: center; }
40
+ .model-provider-head { display: flex; align-items: center; gap: 8px; margin-left: -6px; }
41
+ .model-provider-head h3 { margin: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 600; }
42
+ .model-provider-note { margin: -6px 0 0; color: var(--muted-foreground); font-size: 13px; }
43
+ .model-key { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border);
44
+ border-radius: var(--radius-lg); background: var(--card); }
45
+ .model-key label { font-size: 13.5px; font-weight: 600; }
46
+ .model-key p { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }
47
+ .model-key-entry { display: flex; flex-wrap: wrap; gap: 8px; }
48
+ .model-key-entry > .pairz-input { flex: 1 1 180px; min-width: 0; }
49
+ .model-key p.model-key-error, .model-key-error { margin: 0; color: var(--destructive-text, var(--destructive));
50
+ font-size: 13px; }
51
+ .model-key-kept { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
52
+ gap: 4px 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--border);
53
+ border-radius: var(--radius-lg); background: var(--card); font-size: 13px; }
54
+ .model-key-actions { display: flex; }
55
+ .model-key-kept .model-key-error { flex-basis: 100%; }
56
+ .model-pick { display: grid; gap: 4px; min-width: 0; }
57
+ .model-pick[data-look=link] { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
58
+ .model-pick-error { color: var(--destructive-text, var(--destructive)); font-size: 12.5px; line-height: 1.4; }
59
+ .model-change { height: auto; padding: 0; font-size: 13px; }
60
+
61
+ /* Adding an agent to a space */
62
+ .agent-add { container: agent-add / inline-size; display: grid; gap: 14px; }
63
+ .agent-known { display: grid; gap: 12px; }
64
+ .agent-known-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
65
+ .agent-known-find { flex: 1; min-width: 0; }
66
+ .agent-known-intro { margin: 0; color: var(--muted-foreground); font-size: 13px; }
67
+ .agent-known-role { flex: none; display: inline-flex; align-items: center; gap: 8px; color: var(--muted-foreground);
68
+ font-size: 13px; }
69
+ .agent-known-role .pairz-select { min-width: 112px; }
70
+ .agent-known-list { list-style: none; display: grid; margin: 0; padding: 4px; border: 1px solid var(--border);
71
+ border-radius: var(--radius-xl); background: var(--card); max-height: min(420px, 52vh); overflow-y: auto;
72
+ scrollbar-width: thin; }
73
+ .agent-known-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px;
74
+ width: 100%; min-height: 56px; padding: 8px 8px 8px 10px; border: 0; border-radius: var(--radius-lg);
75
+ background: transparent; color: inherit; font: inherit; text-align: left; }
76
+ .agent-known-row + .agent-known-row, li + .agent-known-row { border-top: 1px solid var(--border); border-radius: 0; }
77
+ .agent-known-new { cursor: pointer; transition: background-color .12s; }
78
+ .agent-known-new:hover { background: var(--accent); }
79
+ .agent-known-new > .pairz-icon { color: var(--muted-foreground); margin-right: 6px; }
80
+ .agent-known-plus { display: grid; place-items: center; width: 34px; height: 34px; border: 1px dashed var(--primary-border);
81
+ border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-text); }
82
+ .agent-known-text { display: grid; gap: 1px; min-width: 0; line-height: 1.35; }
83
+ .agent-known-name { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
84
+ .agent-known-what { overflow: hidden; color: var(--muted-foreground); font-size: 12.5px; text-overflow: ellipsis;
85
+ white-space: nowrap; }
86
+ .agent-known-from { margin-left: 8px; color: var(--muted-foreground); font-size: 12px; font-weight: 450; }
87
+ .agent-known-from::before { content: "·"; margin-right: 8px; }
88
+ .agent-known-none { margin: 0 2px; color: var(--muted-foreground); font-size: 13px; text-align: center; }
89
+ .agent-handle { color: var(--muted-foreground); font: 500 12px var(--font-mono); }
90
+ .agent-form-note b.agent-handle, .pairz-field-note b.agent-handle { color: var(--secondary-foreground); }
91
+ .agent-done { display: inline-flex; align-items: center; gap: 6px; color: var(--success-text); }
92
+ .agent-error { color: var(--destructive-text); }
93
+ @container agent-add (max-width: 420px) {
94
+ .agent-known-tools { flex-wrap: wrap; }
95
+ .agent-known-find { flex-basis: 100%; }
96
+ .agent-known-from { display: block; margin-left: 0; }
97
+ .agent-known-from::before { content: none; }
98
+ }
99
+
100
+ /* Making one */
101
+ .agent-new { display: grid; gap: 20px; }
102
+ .agent-new :is(input, textarea, select, button) { scroll-margin-bottom: 84px; }
103
+ .agent-new-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: -4px; }
104
+ .agent-new-top > .pairz-button { margin-left: -8px; }
105
+ .agent-new-from { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-foreground); font-size: 13px; }
106
+ .agent-new-from .pairz-select { min-width: 170px; }
107
+ .agent-new-end { position: sticky; bottom: -22px; z-index: 1; display: flex; align-items: center; justify-content: flex-end;
108
+ gap: 14px; margin: 0 -22px -22px; padding: 12px 22px 16px; border-top: 1px solid var(--border);
109
+ background: var(--popover); }
110
+ .agent-new-end .agent-form-note { flex: 1; min-width: 0; }
111
+ .agent-new-end .agent-form-note:empty { visibility: hidden; }
112
+
113
+ /* The form: who it is, what it does, what it's told, what it uses */
114
+ .agent-form { display: grid; gap: 20px; }
115
+ .agent-form-who { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; }
116
+ .agent-form-who > .pairz-avatar { margin-top: 22px; box-shadow: var(--shadow-sm); }
117
+ .agent-face-empty { display: grid; place-items: center; width: 56px; height: 56px; margin-top: 22px;
118
+ border: 1.5px dashed var(--input); border-radius: var(--radius-xl); background: var(--muted);
119
+ color: var(--muted-foreground); }
120
+ .agent-form-field { display: grid; gap: 7px; min-width: 0; }
121
+ .agent-form-label { font-size: 13.5px; font-weight: 600; color: var(--foreground); }
122
+ .agent-form-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px;
123
+ margin: -4px 0 -3px; }
124
+ .agent-form-label-row > .pairz-button { margin-right: -6px; }
125
+ .agent-form-count { margin-left: 6px; color: var(--muted-foreground); font-weight: 500; font-variant-numeric: tabular-nums; }
126
+ .agent-form-note { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }
127
+ .agent-undo { min-height: 0; padding: 0; vertical-align: baseline; }
128
+ .agent-icons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
129
+ .agent-icon { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border);
130
+ border-radius: var(--radius-md); background: var(--card); color: var(--secondary-foreground); font-size: 18px;
131
+ line-height: 1; cursor: pointer; transition: background-color .12s, border-color .12s, transform .12s; }
132
+ .agent-icon:hover:not(:disabled) { background: var(--accent); transform: translateY(-1px); }
133
+ .agent-icon[aria-checked=true] { border-color: var(--ring); background: var(--primary-soft);
134
+ outline: 2px solid color-mix(in oklab, var(--ring) 22%, transparent); }
135
+ .agent-icon:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
136
+ .agent-icon-none { font-size: 13px; font-weight: 650; }
137
+ .agent-icon-own { width: 84px; height: 36px; }
138
+ .agent-icon-own:has(input[data-chosen]) { border-color: var(--ring); background: var(--primary-soft); }
139
+ .agent-instructions { position: relative; }
140
+ .agent-instructions .pairz-textarea { font-size: 14px; line-height: 1.55; }
141
+ .agent-instructions[data-busy] .pairz-textarea { color: transparent; }
142
+ .agent-drafting { position: absolute; inset: 1px; display: grid; align-content: start; gap: 10px; overflow: hidden;
143
+ padding: 12px 14px; border-radius: var(--radius-lg); background: color-mix(in oklab, var(--card) 94%, transparent);
144
+ animation: agent-fade .2s ease-out; }
145
+ .agent-drafting-say { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 2px; color: var(--primary-text);
146
+ font-size: 13px; font-weight: 560; }
147
+ @keyframes agent-fade { from { opacity: 0; } }
148
+ .agent-tools { display: grid; gap: 6px; padding: 6px 6px 8px 12px; border: 1px solid var(--border);
149
+ border-radius: var(--radius-lg); background: color-mix(in oklab, var(--muted) 35%, var(--card)); }
150
+ .agent-tools ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
151
+ gap: 8px 16px; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
152
+ .agent-tools-all { display: flex; gap: 12px; }
153
+ .agent-tools-all .pairz-button { min-height: 26px; padding: 0; }
154
+ .agent-tool { display: grid; gap: 1px; }
155
+ .agent-tool code { font: 600 12.5px var(--font-mono); }
156
+ .agent-tool span { color: var(--muted-foreground); font-size: 12.5px; line-height: 1.4; }
157
+ .agent-tools-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--muted-foreground);
158
+ font-size: 12.5px; }
159
+ .agent-tools-line code { padding: 2px 7px; border-radius: var(--radius-full); background: var(--muted);
160
+ color: var(--secondary-foreground); font: 500 12px var(--font-mono); }
161
+
162
+ /* Made: what's next */
163
+ .agent-made { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; padding: 18px;
164
+ border: 1px solid var(--success-border); border-radius: var(--radius-xl);
165
+ background: color-mix(in oklab, var(--success-soft) 55%, var(--card)); animation: agent-rise .25s ease-out; }
166
+ @keyframes agent-rise { from { opacity: 0; transform: translateY(4px); } }
167
+ .agent-made-face { position: relative; }
168
+ .agent-made-check { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 20px;
169
+ height: 20px; border: 2px solid var(--card); border-radius: var(--radius-full); background: var(--success);
170
+ color: var(--success-foreground); }
171
+ .agent-made-text { display: grid; gap: 4px; min-width: 0; }
172
+ .agent-made-text h3 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 650; }
173
+ .agent-made-text p { margin: 0; color: var(--secondary-foreground); font-size: 13.5px; }
174
+ .agent-made-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
175
+
176
+ /* An agent's page */
177
+ .agent-mark { box-shadow: var(--shadow-sm); }
178
+ .agent-narrow { display: none; }
179
+ @container pairz-page (max-width: 640px) {
180
+ .agent-wide { display: none; }
181
+ .agent-narrow { display: inline-grid; }
182
+ .agent-mark { --size: 40px !important; }
183
+ }
184
+ .agent-page-handle { font: 500 12px var(--font-mono); }
185
+ .agent-page { display: grid; gap: 26px; }
186
+ .agent-page-error { margin-bottom: 16px; }
187
+ .agent-page-note { display: flex; align-items: center; gap: 7px; margin: -6px 0 -8px; color: var(--muted-foreground);
188
+ font-size: 13px; }
189
+ .agent-section { display: grid; gap: 10px; }
190
+ .agent-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px;
191
+ margin-bottom: -4px; }
192
+ .agent-section-head .pairz-button { margin-right: -6px; }
193
+ .agent-section-title { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted-foreground);
194
+ font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
195
+ .agent-count { font-variant-numeric: tabular-nums; letter-spacing: 0; }
196
+ .agent-seats { list-style: none; display: grid; margin: 0; padding: 4px; border: 1px solid var(--border);
197
+ border-radius: var(--radius-xl); background: var(--card); box-shadow: var(--shadow-sm); }
198
+ .agent-seat { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px 8px 10px;
199
+ border-radius: var(--radius-lg); color: inherit; text-decoration: none; transition: background-color .12s; }
200
+ .agent-seat:hover { background: var(--accent); }
201
+ .agent-seat > .pairz-icon { color: var(--muted-foreground); }
202
+ .agent-seat-personal { display: grid; place-items: center; flex: none; width: 28px; height: 28px;
203
+ border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-text); }
204
+ .agent-seat-name { flex: 1; min-width: 0; overflow: hidden; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
205
+ .agent-none { margin: 0; color: var(--muted-foreground); font-size: 13.5px; }
206
+ .agent-instructions-read { font-size: 14.5px; line-height: 1.6; }
207
+ .agent-tool-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
208
+ gap: 10px 22px; margin: 0; padding: 0; }
209
+ .agent-tool-list li { display: grid; gap: 1px; min-width: 0; }
210
+ .agent-tool-list code { font: 600 12.5px var(--font-mono); }
211
+ .agent-tool-list span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
212
+ color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }
213
+ .agent-tool-list span:empty { display: none; }
214
+ .agent-tools-read { display: grid; justify-items: start; gap: 8px; }
215
+ .agent-tools-read > .pairz-button { min-height: 0; padding: 0; }
216
+ .agent-edit { display: grid; gap: 14px; }
217
+ .agent-edit-card { padding: 20px; }
218
+ .agent-edit-end { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
219
+ margin: 0 -24px -64px; padding: 14px 24px 18px; border-top: 1px solid var(--border);
220
+ background: color-mix(in oklab, var(--background) 92%, transparent); backdrop-filter: blur(8px); }
221
+ .agent-edit-end .agent-form-note { flex: 1; min-width: 0; }
222
+ .agent-delete-means { display: grid; gap: 10px; margin: 0 0 4px; padding: 0 0 0 18px; color: var(--secondary-foreground);
223
+ font-size: 14px; line-height: 1.5; }
224
+ .agent-delete-means b { color: var(--foreground); font-weight: 620; }
225
+ .agent-delete-means + .pairz-notice { margin-top: 14px; }
226
+ .agent-missing { display: grid; place-items: center; height: 100%; padding: 32px; }
227
+ @container pairz-page (max-width: 560px) {
228
+ .agent-edit-card { padding: 16px; }
229
+ .agent-edit-end { flex-wrap: wrap; margin: 0 -16px -48px; padding: 12px 16px 14px; }
230
+ .agent-edit-end .agent-form-note { flex-basis: 100%; }
231
+ .agent-edit-end .pairz-button { flex: 1; }
232
+ .agent-form-who { gap: 12px; }
233
+ .agent-form-who > .pairz-avatar { --size: 44px !important; margin-top: 24px; }
234
+ .agent-face-empty { width: 44px; height: 44px; margin-top: 24px; }
235
+ }
236
+ @container agent-add (max-width: 420px) {
237
+ .agent-form-who { gap: 12px; }
238
+ .agent-form-who > .pairz-avatar { --size: 44px !important; margin-top: 24px; }
239
+ .agent-face-empty { width: 44px; height: 44px; margin-top: 24px; }
240
+ .agent-new-top { flex-wrap: wrap; }
241
+ .agent-new-end { flex-wrap: wrap; }
242
+ .agent-new-end .agent-form-note { flex-basis: 100%; }
243
+ .agent-new-end .agent-form-note:empty { display: none; }
244
+ .agent-new-end .pairz-button { flex: 1; }
245
+ }
246
+
247
+ /* Making an agent: what it should do, first */
248
+ .agent-describe { display: grid; gap: 12px; }
249
+ .agent-describe-end { display: flex; justify-content: flex-end; gap: 8px; }
250
+ .agent-describe-wait { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted-foreground); font-size: 13px; }
251
+ `;
@@ -0,0 +1,5 @@
1
+ /** Every word Team's web front end shows, to be changed by the app (`team.<key>`). */
2
+ import { type Phrase } from "pairz/web/words";
3
+ export declare const say: import("pairz/web/words").Say<"instructions" | "model" | "effort" | "tools" | "replace" | "cancel" | "change" | "listJoin" | "listEnd" | "personalSpace" | "noSuchAgentTitle" | "noSuchAgent" | "noSuchAgentBody" | "goHome" | "partOfApp" | "madeIn" | "madeElsewhere" | "answersNewChatsHere" | "askAgent" | "edit" | "editAgent" | "moreMenu" | "makeAnswerIn" | "addToSpaceMenu" | "startFromIt" | "deleteMenu" | "addToTitle" | "addToNote" | "newLikeTitle" | "newLikeNote" | "newAgentIn" | "startingFrom" | "appAgentNotice" | "startFromShort" | "managersChangeIt" | "managersChangeItElsewhere" | "worksIn" | "addToSpace" | "answersNewChats" | "roleViewer" | "roleEditor" | "worksNowhere" | "modelAndTools" | "thinks" | "toolsLabel" | "noTools" | "showFewer" | "showAll" | "modelsThenJoin" | "changeAgent" | "keepsHandle" | "saveChanges" | "deleteTitle" | "deleteButton" | "deleteLeavesBold" | "deleteLeavesNamed" | "deleteLeaves" | "deleteGoneBold" | "deleteGone" | "deleteChatsBold" | "deleteChats" | "findSpace" | "spacesYouManage" | "justYou" | "keywordPersonal" | "deleteStepNote" | "deleteStepKeep" | "fieldName" | "calledIn" | "nameHint" | "namePlaceholder" | "emoji" | "noEmoji" | "anotherEmoji" | "otherEmoji" | "fieldDoes" | "doesHint" | "doesPlaceholder" | "modelHint" | "rewriteForMe" | "writeForMe" | "sayNameFirst" | "youArePlaceholder" | "youAreDefaultName" | "writingFor" | "draftNote" | "undo" | "instructionsHint" | "instructionsEmptyHint" | "toolsOf" | "toolsChooseDone" | "toolsChoose" | "toolsAll" | "toolsNone" | "toolsMore" | "newAgentForm" | "agentsYouKnow" | "startFrom" | "startBlank" | "worksInAs" | "belongsHint" | "createNamed" | "createAgent" | "worksNow" | "askHandle" | "readsOnly" | "makeAnswer" | "openPage" | "makeAnother" | "notYourSpace" | "archivedSpace" | "managersAdd" | "addAnAgentTitle" | "addAnAgentNote" | "oneOfApps" | "madeInOther" | "findAgent" | "findAgentKnown" | "knownIntro" | "addsAs" | "createNewAgent" | "createNewAgentBody" | "addAgentTo" | "add" | "noneCalled" | "allWorkHere" | "worksNowNames" | "paletteThisAgent" | "paletteThisSpace" | "paletteAgents" | "paletteCreate" | "makeNamedAnswerIn" | "makeNamedAnswer" | "keywordDefault" | "keywordAnswer" | "keywordNewChats" | "addNamedTo" | "addNamedNote" | "keywordMember" | "keywordJoin" | "keywordWork" | "editNamed" | "keywordChange" | "keywordInstructions" | "keywordRename" | "startNewFrom" | "keywordCopy" | "keywordLike" | "keywordCreate" | "addAnAgentTo" | "keywordInvite" | "keywordAgent" | "worksHere" | "newAgent" | "newAgentInHere" | "keywordMake" | "newAgentInStep" | "newAgentInNote" | "chooseModel" | "needsKey" | "yourKey" | "providerModels" | "searchModels" | "readyToUse" | "withOwnKey" | "providers" | "models" | "nothingMatches" | "allProviders" | "noKeyForProvider" | "apiKeyLabel" | "pasteIt" | "save" | "keyNote" | "orgKey" | "usesAppKey" | "useOwnKey" | "remove" | "noCreditsUsed" | "priceLine" | "priceOwnKey" | "paidYours" | "paidCredits" | "credits" | "paidFallBack" | "paidConnect" | "yourPlan" | "contextSize" | "mediaImage" | "mediaPdf" | "mediaAudio" | "mediaVideo" | "reasoning" | "describeHint" | "describePlaceholder" | "fillMyself" | "draftIt" | "drafting" | "draftingWait" | "kindLabel" | "kindHint" | "kindLike" | "orgForm" | "orgJoins" | "back" | "addToTeamNamed" | "addToTeam" | "removeFromTeamMenu" | "changedForOrg" | "orgsTeam" | "tierModel" | "tierModelPlace" | "removeTeamTitle" | "removeButton" | "teamLeaves" | "teamLeavesBold" | "teamSaidStays" | "teamAddBack" | "teamDeleted">;
4
+ /** Every word of team's front end, by area (WORDS.md lists them). */
5
+ export declare const PHRASES: Record<string, Record<string, Phrase>>;
@@ -0,0 +1,246 @@
1
+ /** Every word Team's web front end shows, to be changed by the app (`team.<key>`). */
2
+ import { defineWords } from "pairz/web/words";
3
+ const team = {
4
+ // Names in a sentence
5
+ listJoin: ", ",
6
+ listEnd: "{rest} and {last}",
7
+ // Spaces, as they're named
8
+ personalSpace: "Personal",
9
+ // An agent's page
10
+ noSuchAgentTitle: "No such agent",
11
+ noSuchAgent: "No agent here by that name",
12
+ noSuchAgentBody: "It may have been deleted, or it works only in spaces you're not in.",
13
+ goHome: "Go home",
14
+ partOfApp: "Part of the app",
15
+ madeIn: "Made in {place}",
16
+ madeElsewhere: "Made elsewhere",
17
+ answersNewChatsHere: "Answers new chats here",
18
+ askAgent: "Ask {name}",
19
+ edit: "Edit",
20
+ editAgent: "Edit {name}",
21
+ moreMenu: "{name}: more",
22
+ makeAnswerIn: "Make it answer new chats in {place}",
23
+ addToSpaceMenu: "Add to a space…",
24
+ startFromIt: "Start a new agent from it…",
25
+ deleteMenu: "Delete {name}…",
26
+ addToTitle: "Add {name} to…",
27
+ addToNote: "It works there at once, as an editor: it answers chats there and adds to them.",
28
+ newLikeTitle: "New agent like {name}, in…",
29
+ newLikeNote: "It starts with its words, model and tools; it belongs to the space you pick.",
30
+ newAgentIn: "New agent in {place}",
31
+ startingFrom: "Starting from {name}.",
32
+ appAgentNotice: "Part of the app: it's set up in code, so it isn't changed here. To have one of your own like it, start a new agent from it.",
33
+ startFromShort: "Start from it",
34
+ managersChangeIt: "Those who manage {place} change it.",
35
+ managersChangeItElsewhere: "Those who manage the space it belongs to change it.",
36
+ worksIn: "Works in {count}",
37
+ addToSpace: "Add to a space",
38
+ answersNewChats: "Answers new chats",
39
+ roleViewer: "Viewer",
40
+ roleEditor: "Editor",
41
+ worksNowhere: "It doesn't work in any of your spaces.",
42
+ instructions: "Instructions",
43
+ modelAndTools: "Model and tools",
44
+ model: "Model",
45
+ thinks: "Thinks",
46
+ effort: "{effort} effort",
47
+ tools: "Tools",
48
+ toolsLabel: "Tools {count}",
49
+ noTools: "None: it only talks.",
50
+ showFewer: "Show fewer",
51
+ showAll: "Show all {count}",
52
+ modelsThenJoin: ", then ",
53
+ // Changing an agent
54
+ changeAgent: "Change {name}",
55
+ keepsHandle: "It keeps its name in chats, @{handle}, whatever it's shown as.",
56
+ cancel: "Cancel",
57
+ saveChanges: "Save changes",
58
+ // Deleting an agent
59
+ deleteTitle: "Delete {name}?",
60
+ deleteButton: "Delete {name}",
61
+ deleteLeavesBold: "It leaves every space it works in",
62
+ deleteLeavesNamed: "{bold}, {spaces} among them. Where it answered new chats, another agent there does.",
63
+ deleteLeaves: "{bold}. Where it answered new chats, another agent there does.",
64
+ deleteGoneBold: "Nobody can ask it anything again,",
65
+ deleteGone: "{bold} and it can't be brought back.",
66
+ deleteChatsBold: "Chats it was in stay as they are,",
67
+ deleteChats: "{bold} with what it said.",
68
+ // Spaces and deleting, in the command palette
69
+ findSpace: "Find a space",
70
+ spacesYouManage: "Spaces you manage",
71
+ justYou: "Just you",
72
+ keywordPersonal: "personal",
73
+ deleteStepNote: "It leaves every space it works in, and nobody can ask it anything again. Chats it was in stay as they are.",
74
+ deleteStepKeep: "Keep it",
75
+ // The agent fields
76
+ fieldName: "Name",
77
+ calledIn: "Called {handle} in chats",
78
+ nameHint: "What people call it: Maya is @maya in chats.",
79
+ namePlaceholder: "Maya",
80
+ emoji: "Emoji",
81
+ noEmoji: "None: its initial",
82
+ anotherEmoji: "Another emoji",
83
+ otherEmoji: "Other",
84
+ fieldDoes: "What should it do?",
85
+ doesHint: "A line or two, for people, and for other agents deciding whom to ask.",
86
+ doesPlaceholder: "Writes launch copy in our voice, and checks facts with the researcher.",
87
+ modelHint: "What it thinks with.",
88
+ rewriteForMe: "Rewrite them for me",
89
+ writeForMe: "Write them for me",
90
+ sayNameFirst: "Say its name and what it should do first",
91
+ youArePlaceholder: "You are {name}. You…",
92
+ youAreDefaultName: "Maya",
93
+ writingFor: "Writing {name}'s instructions…",
94
+ draftNote: "Written for you from what it should do: read them through, and change what you like.",
95
+ undo: "Undo",
96
+ instructionsHint: "What it's told every time it works: who it is, what it does, and how it answers.",
97
+ instructionsEmptyHint: "Say its name and what it should do, and it can write them for you.",
98
+ toolsOf: "{chosen} of {offered}",
99
+ toolsChooseDone: "Done",
100
+ toolsChoose: "Choose",
101
+ toolsAll: "All",
102
+ toolsNone: "None",
103
+ toolsMore: "+{count} more",
104
+ // Making an agent
105
+ newAgentForm: "A new agent",
106
+ agentsYouKnow: "Agents you know",
107
+ startFrom: "Start from",
108
+ startBlank: "Nothing: a blank agent",
109
+ worksInAs: "Works in {place} as",
110
+ belongsHint: "{lets}. It belongs to {place}: those who manage it change it.",
111
+ createNamed: "Create {name}",
112
+ createAgent: "Create agent",
113
+ // Made
114
+ worksNow: "{name} works in {place} now",
115
+ askHandle: "Ask {handle} in any chat here.",
116
+ readsOnly: "It reads what's here for chats where it's an editor; it doesn't answer here.",
117
+ makeAnswer: "Make it answer new chats",
118
+ openPage: "Open its page",
119
+ makeAnother: "Make another",
120
+ // Adding an agent to a space
121
+ notYourSpace: "This space isn't one of yours.",
122
+ archivedSpace: "{place} is archived: restore it to add agents.",
123
+ managersAdd: "Those who manage {place} add agents to it.",
124
+ addAnAgentTitle: "Add an agent to {place}",
125
+ addAnAgentNote: "Agents work for whoever asks them, and reach only what that person can.",
126
+ // Agents you know
127
+ oneOfApps: "One of the app's agents",
128
+ madeInOther: "Made in another space",
129
+ findAgent: "Find an agent",
130
+ findAgentKnown: "Find an agent you know",
131
+ knownIntro: "Agents you know, from the app and your spaces",
132
+ addsAs: "Adds as",
133
+ createNewAgent: "Create a new agent",
134
+ createNewAgentBody: "Say what it should do; it can write its own instructions.",
135
+ addAgentTo: "Add {name} to {place}",
136
+ add: "Add",
137
+ noneCalled: "No agent you know is called “{search}”.",
138
+ allWorkHere: "Every agent you know works in {place} already.",
139
+ worksNowNames: {
140
+ one: "{names} works in {place} now.",
141
+ other: "{names} work in {place} now.",
142
+ },
143
+ // The palette
144
+ paletteThisAgent: "This agent",
145
+ paletteThisSpace: "This space",
146
+ paletteAgents: "Agents",
147
+ paletteCreate: "Create",
148
+ makeNamedAnswerIn: "Make {name} answer new chats in {place}",
149
+ makeNamedAnswer: "Make {name} answer new chats",
150
+ keywordDefault: "default",
151
+ keywordAnswer: "answer",
152
+ keywordNewChats: "new chats",
153
+ addNamedTo: "Add {name} to a space…",
154
+ addNamedNote: "It works there at once, as an editor.",
155
+ keywordMember: "member",
156
+ keywordJoin: "join",
157
+ keywordWork: "work",
158
+ editNamed: "Edit {name}",
159
+ keywordChange: "change",
160
+ keywordInstructions: "instructions",
161
+ keywordRename: "rename",
162
+ startNewFrom: "Start a new agent from {name}…",
163
+ keywordCopy: "copy",
164
+ keywordLike: "like",
165
+ keywordCreate: "create",
166
+ addAnAgentTo: "Add an agent to {place}…",
167
+ keywordInvite: "invite",
168
+ keywordAgent: "agent",
169
+ worksHere: "@{id} · works here",
170
+ newAgent: "New agent…",
171
+ newAgentInHere: "In {place}",
172
+ keywordMake: "make",
173
+ newAgentInStep: "New agent in…",
174
+ newAgentInNote: "It belongs to the space you pick: those who manage it change it.",
175
+ // The model picker
176
+ chooseModel: "Choose a model",
177
+ needsKey: "Needs a key",
178
+ yourKey: "Your key",
179
+ providerModels: { one: "{count} model", other: "{count} models" },
180
+ searchModels: "Search providers and models",
181
+ readyToUse: "Ready to use",
182
+ withOwnKey: "With your own key",
183
+ providers: "Providers",
184
+ models: "Models",
185
+ nothingMatches: "Nothing matches that.",
186
+ allProviders: "All providers",
187
+ noKeyForProvider: "This org has no key for {provider}. Its owners and admins can add one.",
188
+ apiKeyLabel: "Your {provider} API key",
189
+ pasteIt: "Paste it here",
190
+ save: "Save",
191
+ keyNote: "Encrypted, and never shown again. All of this org's agents use it for {provider}, and {provider} charges your account.",
192
+ orgKey: "This org's key {hint}",
193
+ usesAppKey: "Uses the app's key",
194
+ replace: "Replace",
195
+ useOwnKey: "Use your own key",
196
+ remove: "Remove",
197
+ change: "Change",
198
+ // What a model costs and can do
199
+ noCreditsUsed: "No credits used",
200
+ priceLine: "{input} in · {output} out per 1M tokens",
201
+ priceOwnKey: "No credits used: your key, at {price}",
202
+ // How a model is paid for, where turns run on people's plans first
203
+ paidYours: "Your {plan} · $0",
204
+ paidCredits: "Credits · {price}",
205
+ credits: "Credits",
206
+ paidFallBack: "Members without {plans} fall back to the next model",
207
+ paidConnect: "Connect {plans} to use",
208
+ yourPlan: "Your {plan}",
209
+ contextSize: "{size} context",
210
+ mediaImage: "Images",
211
+ mediaPdf: "PDFs",
212
+ mediaAudio: "Audio",
213
+ mediaVideo: "Video",
214
+ reasoning: "Reasoning",
215
+ // Making an agent: what it should do first, then drafted
216
+ describeHint: "A sentence or two is enough: its name, instructions and the rest are drafted for you to check.",
217
+ describePlaceholder: "Keeps the numbers straight for our clients: prices, costs and margins, with sources.",
218
+ fillMyself: "Fill it in myself",
219
+ draftIt: "Draft it",
220
+ drafting: "Drafting…",
221
+ draftingWait: "Writing its instructions, a few seconds…",
222
+ kindLabel: "Kind of work",
223
+ kindHint: "Its model comes from the tier each chat runs on, for this kind of work.",
224
+ kindLike: "{kind} · like {agents}",
225
+ // The org's team
226
+ orgForm: "A new agent for the org",
227
+ orgJoins: "It joins every space in the org, and every new one.",
228
+ back: "Back",
229
+ addToTeamNamed: "Add {name} to the team",
230
+ addToTeam: "Add to the team",
231
+ removeFromTeamMenu: "Remove from the team…",
232
+ changedForOrg: "Changed for your org",
233
+ orgsTeam: "Your org's team",
234
+ tierModel: "Its model comes from the tier each chat runs on. Change the tiers' models under {place}.",
235
+ tierModelPlace: "Organization settings › Agents",
236
+ removeTeamTitle: "Remove {name} from the team?",
237
+ removeButton: "Remove",
238
+ teamLeaves: "{bold}, and won't join new ones.",
239
+ teamLeavesBold: "It leaves every space in the org",
240
+ teamSaidStays: "What it already said stays in its chats.",
241
+ teamAddBack: "You can add it back under Organization settings › Agents.",
242
+ teamDeleted: "It's deleted: its instructions are gone.",
243
+ };
244
+ export const say = defineWords("team", team);
245
+ /** Every word of team's front end, by area (WORDS.md lists them). */
246
+ export const PHRASES = { team };
package/team/web.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Team's web front end, for the browser: making and changing agents. Each
3
+ * agent has a page (`/agent/<id>`, kind `agent`): who it is, where it works
4
+ * among the person's spaces, what it's told; changed in place and deleted
5
+ * by those who manage where it belongs, the app's own read only (a manager
6
+ * starts a new one from it). Adding an agent to a space (`agent.add`: one
7
+ * the person has met, or a new one made there, its instructions written
8
+ * for them if they like) is the Agents tab of spaces' invite surface
9
+ * (spaces' `spaceInvite` resource, named here; Personal spaces too). In
10
+ * the command palette (`agent.palette`): agents to go to, adding one,
11
+ * making one, having one answer new chats, and what to do with the one
12
+ * open. Chat's front end shows agents in chats; spaces' adds them. Other
13
+ * front ends choose a model with the same picker (`model.pick`: item
14
+ * `{ value }`, hints `{ action, input, look? }`, calling `action` with what's
15
+ * chosen). Add it beside them:
16
+ *
17
+ * ```ts
18
+ * await web({ plugins: [webShell, chatWeb, spacesWeb, teamWeb], root });
19
+ * ```
20
+ */
21
+ import { type Plugin } from "pairz";
22
+ export declare const teamWeb: Plugin;
package/team/web.js ADDED
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Team's web front end, for the browser: making and changing agents. Each
3
+ * agent has a page (`/agent/<id>`, kind `agent`): who it is, where it works
4
+ * among the person's spaces, what it's told; changed in place and deleted
5
+ * by those who manage where it belongs, the app's own read only (a manager
6
+ * starts a new one from it). Adding an agent to a space (`agent.add`: one
7
+ * the person has met, or a new one made there, its instructions written
8
+ * for them if they like) is the Agents tab of spaces' invite surface
9
+ * (spaces' `spaceInvite` resource, named here; Personal spaces too). In
10
+ * the command palette (`agent.palette`): agents to go to, adding one,
11
+ * making one, having one answer new chats, and what to do with the one
12
+ * open. Chat's front end shows agents in chats; spaces' adds them. Other
13
+ * front ends choose a model with the same picker (`model.pick`: item
14
+ * `{ value }`, hints `{ action, input, look? }`, calling `action` with what's
15
+ * chosen). Add it beside them:
16
+ *
17
+ * ```ts
18
+ * await web({ plugins: [webShell, chatWeb, spacesWeb, teamWeb], root });
19
+ * ```
20
+ */
21
+ import { definePlugin } from "pairz";
22
+ import { agentView } from "./views/web/agent.js";
23
+ import { agentAddView } from "./views/web/agent-add.js";
24
+ import { agentOrgView } from "./views/web/agent-org.js";
25
+ import { agentPaletteView } from "./views/web/agent-palette.js";
26
+ import { modelPickView } from "./views/web/model-pick.js";
27
+ export const teamWeb = definePlugin({
28
+ name: "team-web",
29
+ requires: ["team", "web-shell"],
30
+ views: {
31
+ agent: agentView,
32
+ "agent.add": agentAddView,
33
+ "agent.org": agentOrgView,
34
+ "agent.palette": agentPaletteView,
35
+ "model.pick": modelPickView,
36
+ },
37
+ resources: {
38
+ spaceInvite: {
39
+ agents: { title: "Agents", view: "agent.add", order: 20, personal: true },
40
+ },
41
+ palette: { agents: { view: "agent.palette", order: 25 } },
42
+ },
43
+ });
@@ -0,0 +1,7 @@
1
+ export declare const chooseAction: import("pairz").ActionDef;
2
+ export declare const capAction: import("pairz").ActionDef;
3
+ export declare const orderAction: import("pairz").ActionDef;
4
+ export declare const saveAction: import("pairz").ActionDef;
5
+ export declare const removeAction: import("pairz").ActionDef;
6
+ export declare const restoreAction: import("pairz").ActionDef;
7
+ export declare const kindAction: import("pairz").ActionDef;