@oracle-agent/oracle 0.9.1 → 0.9.2
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/package.json +1 -1
- package/src/cli/oracle-harness.py +58 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oracle-agent/oracle",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "Oracle: prepare-only multichain agent control plane. Policy-bounded intents for a user-signed wallet. Self-custody by default — the public package never takes your key. Built for Hermes; no model key required.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -10,8 +10,6 @@ import sys
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
WORDMARK = (
|
|
13
|
-
" ████ ",
|
|
14
|
-
" ░░███ ",
|
|
15
13
|
" ██████ ████████ ██████ ██████ ░███ ██████ ",
|
|
16
14
|
" ███░░███░░███░░███ ░░░░░███ ███░░███ ░███ ███░░███",
|
|
17
15
|
"░███ ░███ ░███ ░░░ ███████ ░███ ░░░ ░███ ░███████ ",
|
|
@@ -124,8 +122,6 @@ def patch_cli(module):
|
|
|
124
122
|
"#ACDEEF",
|
|
125
123
|
"#A5D9EB",
|
|
126
124
|
"#9FCBDD",
|
|
127
|
-
"#9FCBDD",
|
|
128
|
-
"#ACDEEF",
|
|
129
125
|
"#B8F0FF",
|
|
130
126
|
)
|
|
131
127
|
for index, line in enumerate(WORDMARK):
|
|
@@ -148,7 +144,7 @@ def patch_cli(module):
|
|
|
148
144
|
border_style="#3B4A56",
|
|
149
145
|
box=box.ROUNDED,
|
|
150
146
|
subtitle="[dim #6F7F8D]/model /chain /setup[/]",
|
|
151
|
-
subtitle_align="
|
|
147
|
+
subtitle_align="center",
|
|
152
148
|
)
|
|
153
149
|
self.console.print(Align.center(panel))
|
|
154
150
|
self.console.print()
|
|
@@ -179,24 +175,69 @@ def patch_cli(module):
|
|
|
179
175
|
snapshot = self._get_status_bar_snapshot()
|
|
180
176
|
width = self._get_tui_terminal_width()
|
|
181
177
|
model = snapshot.get("model_short") or "model"
|
|
182
|
-
percent = snapshot.get("context_percent")
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
178
|
+
percent = snapshot.get("context_percent") or 0
|
|
179
|
+
context_tokens = snapshot.get("context_tokens") or 0
|
|
180
|
+
context_length = snapshot.get("context_length") or 0
|
|
181
|
+
context_bar = self._build_context_bar(percent, width=8)
|
|
182
|
+
|
|
183
|
+
def compact_tokens(value):
|
|
184
|
+
if value >= 1_000_000:
|
|
185
|
+
return f"{value / 1_000_000:.1f}M"
|
|
186
|
+
if value >= 1_000:
|
|
187
|
+
return f"{value / 1_000:.0f}K"
|
|
188
|
+
return str(value)
|
|
189
|
+
|
|
190
|
+
usage = f"{compact_tokens(context_tokens)}/{compact_tokens(context_length)} " if context_length else ""
|
|
191
|
+
reasoning_config = getattr(self, "reasoning_config", None) or {}
|
|
192
|
+
if reasoning_config.get("enabled") is False:
|
|
193
|
+
effort = "none"
|
|
194
|
+
else:
|
|
195
|
+
effort = reasoning_config.get("effort") or "default"
|
|
196
|
+
thinking = snapshot.get("prompt_elapsed") or "0s"
|
|
197
|
+
thinking = thinking.replace("⏱ ", "").replace("⏲ ", "")
|
|
198
|
+
|
|
199
|
+
if width < 48:
|
|
200
|
+
short_bar = self._build_context_bar(percent, width=4)
|
|
201
|
+
return [
|
|
202
|
+
("class:status-bar", " "),
|
|
203
|
+
("class:status-bar-context", f"ctx {short_bar} {percent}%"),
|
|
204
|
+
("class:status-bar-dim", " / "),
|
|
205
|
+
("class:status-bar-effort", effort),
|
|
206
|
+
("class:status-bar-dim", " / "),
|
|
207
|
+
("class:status-bar-time", f"{thinking} "),
|
|
208
|
+
]
|
|
209
|
+
if width < 70:
|
|
210
|
+
short_bar = self._build_context_bar(percent, width=4)
|
|
211
|
+
return [
|
|
212
|
+
("class:status-bar", " "),
|
|
213
|
+
("class:status-bar-context", f"ctx {short_bar} {percent}%"),
|
|
214
|
+
("class:status-bar-dim", " / "),
|
|
215
|
+
("class:status-bar-effort", f"effort {effort}"),
|
|
216
|
+
("class:status-bar-dim", " / "),
|
|
217
|
+
("class:status-bar-time", f"think {thinking} "),
|
|
218
|
+
]
|
|
219
|
+
if width < 92:
|
|
186
220
|
return [
|
|
187
221
|
("class:status-bar", " "),
|
|
188
222
|
("class:status-bar-strong", model),
|
|
189
|
-
("class:status-bar-dim",
|
|
223
|
+
("class:status-bar-dim", " / "),
|
|
224
|
+
("class:status-bar-context", f"ctx {context_bar} {usage}{percent}%"),
|
|
225
|
+
("class:status-bar-dim", " / "),
|
|
226
|
+
("class:status-bar-effort", f"effort {effort}"),
|
|
227
|
+
("class:status-bar-dim", " / "),
|
|
228
|
+
("class:status-bar-time", f"think {thinking} "),
|
|
190
229
|
]
|
|
191
230
|
return [
|
|
192
231
|
("class:status-bar", " "),
|
|
193
232
|
("class:status-bar-brand", "oracle"),
|
|
194
|
-
("class:status-bar-dim", "
|
|
233
|
+
("class:status-bar-dim", " / "),
|
|
195
234
|
("class:status-bar-strong", model),
|
|
196
|
-
("class:status-bar-dim", "
|
|
197
|
-
("class:status-bar-context",
|
|
198
|
-
("class:status-bar-dim", "
|
|
199
|
-
("class:status-bar-
|
|
235
|
+
("class:status-bar-dim", " / "),
|
|
236
|
+
("class:status-bar-context", f"ctx {context_bar} {usage}{percent}%"),
|
|
237
|
+
("class:status-bar-dim", " / "),
|
|
238
|
+
("class:status-bar-effort", f"effort {effort}"),
|
|
239
|
+
("class:status-bar-dim", " / "),
|
|
240
|
+
("class:status-bar-time", f"think {thinking} "),
|
|
200
241
|
]
|
|
201
242
|
except Exception:
|
|
202
243
|
return [("class:status-bar-brand", " oracle ")]
|
|
@@ -274,6 +315,8 @@ def patch_cli(module):
|
|
|
274
315
|
"status-bar-brand": "bg:#11161B bold #B8F0FF",
|
|
275
316
|
"status-bar-strong": "bg:#11161B #EAF2F8",
|
|
276
317
|
"status-bar-context": "bg:#11161B #A5D9EB",
|
|
318
|
+
"status-bar-effort": "bg:#11161B #C5B8FF",
|
|
319
|
+
"status-bar-time": "bg:#11161B #91A2B1",
|
|
277
320
|
"status-bar-dim": "bg:#11161B #60717F",
|
|
278
321
|
}
|
|
279
322
|
)
|