spatialagents 0.1.0__py3-none-any.whl
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.
- spatialagents/__init__.py +66 -0
- spatialagents/approvals.py +137 -0
- spatialagents/backend.py +181 -0
- spatialagents/cache_plan.py +117 -0
- spatialagents/chat/__init__.py +11 -0
- spatialagents/chat/cli.py +84 -0
- spatialagents/chat/http.py +308 -0
- spatialagents/chat/server.py +269 -0
- spatialagents/chat/static/chat.css +219 -0
- spatialagents/chat/static/chat.js +933 -0
- spatialagents/chat/static/index.html +16 -0
- spatialagents/conversations.py +292 -0
- spatialagents/errors.py +73 -0
- spatialagents/gateway.py +192 -0
- spatialagents/offload.py +92 -0
- spatialagents/orchestrator.py +259 -0
- spatialagents/plans.py +800 -0
- spatialagents/policy.py +118 -0
- spatialagents/prefix.py +79 -0
- spatialagents/py.typed +0 -0
- spatialagents/runner.py +813 -0
- spatialagents/schema.py +167 -0
- spatialagents/serialize.py +88 -0
- spatialagents/sessions.py +276 -0
- spatialagents/testing.py +927 -0
- spatialagents/toolcache.py +144 -0
- spatialagents/tools.py +460 -0
- spatialagents/trace.py +237 -0
- spatialagents/wire.py +194 -0
- spatialagents-0.1.0.dist-info/METADATA +55 -0
- spatialagents-0.1.0.dist-info/RECORD +33 -0
- spatialagents-0.1.0.dist-info/WHEEL +4 -0
- spatialagents-0.1.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/* chat.css -- the shared chat page's neutral full-page layout (spatialagents.chat).
|
|
2
|
+
* A conversation column with its composer, and a plan panel beside it on a
|
|
3
|
+
* wide screen, below it on a narrow one. Light and dark follow the system. */
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--sa-bg: #f7f7f5;
|
|
7
|
+
--sa-panel: #ffffff;
|
|
8
|
+
--sa-text: #1d1d1b;
|
|
9
|
+
--sa-muted: #6b6b66;
|
|
10
|
+
--sa-line: #e2e1dc;
|
|
11
|
+
--sa-accent: #2f5d8a;
|
|
12
|
+
--sa-accent-text: #ffffff;
|
|
13
|
+
--sa-user: #eef3f8;
|
|
14
|
+
--sa-error: #a33a2a;
|
|
15
|
+
--sa-notice: #7a5a10;
|
|
16
|
+
--sa-ok: #2f6b3a;
|
|
17
|
+
--sa-code: #f1f0ec;
|
|
18
|
+
--sa-radius: 8px;
|
|
19
|
+
--sa-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
20
|
+
--sa-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@media (prefers-color-scheme: dark) {
|
|
24
|
+
:root {
|
|
25
|
+
--sa-bg: #161615;
|
|
26
|
+
--sa-panel: #1f1f1d;
|
|
27
|
+
--sa-text: #ecebe6;
|
|
28
|
+
--sa-muted: #a3a29b;
|
|
29
|
+
--sa-line: #34342f;
|
|
30
|
+
--sa-accent: #7fa8d1;
|
|
31
|
+
--sa-accent-text: #10161c;
|
|
32
|
+
--sa-user: #24303b;
|
|
33
|
+
--sa-error: #e08a7a;
|
|
34
|
+
--sa-notice: #d8b765;
|
|
35
|
+
--sa-ok: #8cc79a;
|
|
36
|
+
--sa-code: #2a2a27;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
* { box-sizing: border-box; }
|
|
41
|
+
|
|
42
|
+
html, body {
|
|
43
|
+
margin: 0;
|
|
44
|
+
height: 100%;
|
|
45
|
+
background: var(--sa-bg);
|
|
46
|
+
color: var(--sa-text);
|
|
47
|
+
font: 15px/1.5 var(--sa-font);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.sa-page, .sa-chat { height: 100%; }
|
|
51
|
+
|
|
52
|
+
.sa-chat {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
max-width: 1400px;
|
|
56
|
+
margin: 0 auto;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.sa-header {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: baseline;
|
|
62
|
+
justify-content: space-between;
|
|
63
|
+
gap: 16px;
|
|
64
|
+
padding: 12px 20px;
|
|
65
|
+
border-bottom: 1px solid var(--sa-line);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.sa-title { margin: 0; font-size: 17px; font-weight: 600; }
|
|
69
|
+
.sa-meter { color: var(--sa-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
|
|
70
|
+
|
|
71
|
+
.sa-body {
|
|
72
|
+
flex: 1;
|
|
73
|
+
min-height: 0;
|
|
74
|
+
display: grid;
|
|
75
|
+
grid-template-columns: minmax(0, 1fr);
|
|
76
|
+
gap: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@media (min-width: 960px) {
|
|
80
|
+
.sa-body:has(.sa-plan) { grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); }
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.sa-conversation {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
min-height: 0;
|
|
87
|
+
min-width: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.sa-log {
|
|
91
|
+
flex: 1;
|
|
92
|
+
overflow-y: auto;
|
|
93
|
+
padding: 16px 20px;
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
gap: 10px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.sa-line { max-width: 820px; white-space: pre-wrap; word-wrap: break-word; }
|
|
100
|
+
.sa-assistant { white-space: normal; }
|
|
101
|
+
.sa-user {
|
|
102
|
+
align-self: flex-end;
|
|
103
|
+
background: var(--sa-user);
|
|
104
|
+
padding: 8px 12px;
|
|
105
|
+
border-radius: var(--sa-radius);
|
|
106
|
+
}
|
|
107
|
+
.sa-sub, .sa-note { color: var(--sa-muted); font-size: 13px; }
|
|
108
|
+
.sa-notice { color: var(--sa-notice); }
|
|
109
|
+
.sa-error { color: var(--sa-error); }
|
|
110
|
+
|
|
111
|
+
.sa-assistant h3, .sa-assistant h4, .sa-assistant h5, .sa-assistant h6,
|
|
112
|
+
.sa-report-body h3, .sa-report-body h4, .sa-report-body h5 { margin: 12px 0 4px; font-size: 15px; }
|
|
113
|
+
.sa-md-p { margin: 0 0 8px; }
|
|
114
|
+
.sa-md-list { margin: 0 0 8px; padding-left: 22px; }
|
|
115
|
+
.sa-md-quote { margin: 0 0 8px; padding-left: 10px; border-left: 3px solid var(--sa-line); color: var(--sa-muted); }
|
|
116
|
+
.sa-md-table { border-collapse: collapse; margin: 4px 0 10px; font-size: 14px; }
|
|
117
|
+
.sa-md-table th, .sa-md-table td { border: 1px solid var(--sa-line); padding: 4px 8px; text-align: left; }
|
|
118
|
+
.sa-md-table th { background: var(--sa-code); }
|
|
119
|
+
.sa-code, code {
|
|
120
|
+
font-family: var(--sa-mono);
|
|
121
|
+
font-size: 13px;
|
|
122
|
+
background: var(--sa-code);
|
|
123
|
+
border-radius: 4px;
|
|
124
|
+
}
|
|
125
|
+
code { padding: 1px 4px; }
|
|
126
|
+
.sa-code { padding: 8px 10px; overflow-x: auto; white-space: pre; margin: 0 0 8px; }
|
|
127
|
+
.sa-code code { padding: 0; background: none; }
|
|
128
|
+
|
|
129
|
+
.sa-tool, .sa-approval, .sa-decision {
|
|
130
|
+
border: 1px solid var(--sa-line);
|
|
131
|
+
border-radius: var(--sa-radius);
|
|
132
|
+
background: var(--sa-panel);
|
|
133
|
+
padding: 8px 12px;
|
|
134
|
+
max-width: 820px;
|
|
135
|
+
}
|
|
136
|
+
.sa-tool.is-error { border-color: var(--sa-error); }
|
|
137
|
+
.sa-tool-head { display: flex; gap: 10px; align-items: center; font-size: 13px; }
|
|
138
|
+
.sa-tool-name { font-family: var(--sa-mono); }
|
|
139
|
+
.sa-tool-status { color: var(--sa-muted); }
|
|
140
|
+
.sa-figure { margin: 8px 0 0; }
|
|
141
|
+
.sa-figure-img { max-width: 100%; max-height: 480px; border-radius: 4px; border: 1px solid var(--sa-line); }
|
|
142
|
+
.sa-figure figcaption { color: var(--sa-muted); font-size: 12px; }
|
|
143
|
+
|
|
144
|
+
.sa-approval-title, .sa-decision-question { font-weight: 600; }
|
|
145
|
+
.sa-approval-purpose, .sa-decision-why { color: var(--sa-muted); font-size: 14px; margin: 2px 0 6px; }
|
|
146
|
+
|
|
147
|
+
.sa-actions, .sa-decision-answer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
|
|
148
|
+
|
|
149
|
+
button {
|
|
150
|
+
font: inherit;
|
|
151
|
+
font-size: 14px;
|
|
152
|
+
border-radius: 6px;
|
|
153
|
+
padding: 6px 12px;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
border: 1px solid var(--sa-line);
|
|
156
|
+
background: var(--sa-panel);
|
|
157
|
+
color: var(--sa-text);
|
|
158
|
+
}
|
|
159
|
+
button:disabled { opacity: 0.5; cursor: default; }
|
|
160
|
+
.sa-primary, .sa-send { background: var(--sa-accent); color: var(--sa-accent-text); border-color: var(--sa-accent); }
|
|
161
|
+
|
|
162
|
+
.sa-dock { border-top: 1px solid var(--sa-line); padding: 10px 20px 14px; }
|
|
163
|
+
.sa-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
|
|
164
|
+
.sa-thumb { height: 56px; border-radius: 4px; border: 1px solid var(--sa-line); margin: 2px; }
|
|
165
|
+
.sa-form { display: flex; gap: 8px; align-items: flex-end; }
|
|
166
|
+
.sa-input, .sa-text {
|
|
167
|
+
font: inherit;
|
|
168
|
+
color: var(--sa-text);
|
|
169
|
+
background: var(--sa-panel);
|
|
170
|
+
border: 1px solid var(--sa-line);
|
|
171
|
+
border-radius: 6px;
|
|
172
|
+
padding: 7px 10px;
|
|
173
|
+
}
|
|
174
|
+
.sa-input { flex: 1; resize: none; }
|
|
175
|
+
.sa-chat.is-busy .sa-send { opacity: 0.5; }
|
|
176
|
+
|
|
177
|
+
.sa-plan {
|
|
178
|
+
border-left: 1px solid var(--sa-line);
|
|
179
|
+
background: var(--sa-panel);
|
|
180
|
+
padding: 14px 18px;
|
|
181
|
+
overflow-y: auto;
|
|
182
|
+
min-width: 0;
|
|
183
|
+
}
|
|
184
|
+
@media (max-width: 959px) {
|
|
185
|
+
.sa-plan { border-left: none; border-top: 1px solid var(--sa-line); }
|
|
186
|
+
}
|
|
187
|
+
.sa-plan-title { margin: 0 0 8px; font-size: 15px; }
|
|
188
|
+
.sa-plan-form { display: flex; flex-direction: column; gap: 8px; }
|
|
189
|
+
.sa-plan-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
|
|
190
|
+
.sa-plan-goal { font-weight: 600; }
|
|
191
|
+
.sa-plan-summary { color: var(--sa-muted); margin: 4px 0 8px; }
|
|
192
|
+
.sa-phase { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--sa-code); white-space: nowrap; }
|
|
193
|
+
.sa-phase-failed { color: var(--sa-error); }
|
|
194
|
+
.sa-phase-reported, .sa-phase-finished { color: var(--sa-ok); }
|
|
195
|
+
.sa-facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; font-size: 13px; margin: 8px 0; }
|
|
196
|
+
.sa-facts dt { color: var(--sa-muted); }
|
|
197
|
+
.sa-facts dd { margin: 0; }
|
|
198
|
+
.sa-steps { padding-left: 22px; margin: 8px 0; }
|
|
199
|
+
.sa-step { margin: 0 0 8px; }
|
|
200
|
+
.sa-step-head { display: flex; gap: 8px; align-items: baseline; }
|
|
201
|
+
.sa-step-status { color: var(--sa-muted); font-size: 12px; }
|
|
202
|
+
.sa-step-done .sa-step-status { color: var(--sa-ok); }
|
|
203
|
+
.sa-step-failed .sa-step-status { color: var(--sa-error); }
|
|
204
|
+
.sa-step-why { font-size: 14px; }
|
|
205
|
+
.sa-badge {
|
|
206
|
+
font-size: 11px;
|
|
207
|
+
padding: 0 6px;
|
|
208
|
+
border-radius: 999px;
|
|
209
|
+
border: 1px solid var(--sa-line);
|
|
210
|
+
color: var(--sa-muted);
|
|
211
|
+
margin-left: 4px;
|
|
212
|
+
}
|
|
213
|
+
.sa-badge-model { border-color: var(--sa-accent); color: var(--sa-accent); }
|
|
214
|
+
.sa-decision { margin: 10px 0; border-color: var(--sa-accent); }
|
|
215
|
+
.sa-evidence { margin: 4px 0; padding-left: 18px; font-size: 13px; color: var(--sa-muted); }
|
|
216
|
+
.sa-free { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
|
|
217
|
+
.sa-rows input { width: 100%; }
|
|
218
|
+
.sa-report { margin-top: 14px; border-top: 1px solid var(--sa-line); padding-top: 8px; }
|
|
219
|
+
.sa-report h3 { margin: 0 0 6px; font-size: 15px; }
|