@awebai/oats 0.69.1 → 0.69.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.
- package/bin/oats.mjs +79 -15
- package/docs/capabilities.md +24 -5
- package/docs/capability-manifest.schema.json +1 -1
- package/docs/design/2026-09-23-workspace-module-contracts.md +6 -4
- package/docs/design/2026-10-22-module-upgrade.md +1 -1
- package/docs/desktop-cli-api.md +273 -66
- package/docs/desktop-instance-start.md +8 -37
- package/docs/desktop.md +76 -9
- package/docs/execution-targets.md +27 -5
- package/docs/implementation.md +6 -5
- package/docs/integrations.md +1 -1
- package/docs/knowledge.md +25 -16
- package/docs/official-catalog.md +4 -4
- package/docs/packages.md +12 -12
- package/docs/release-notes/v0.69.2.md +259 -0
- package/docs/release-notes/v0.69.3.md +43 -0
- package/docs/servers.md +7 -2
- package/docs/soul.schema.json +1 -0
- package/docs/souls-and-instances.md +35 -2
- package/docs/tui.md +112 -15
- package/docs/upgrading.md +9 -5
- package/docs/workspaces.md +2 -2
- package/injects/instance-boundary.md +19 -33
- package/injects/work-attached.md +8 -13
- package/injects/work-checkout.md +16 -30
- package/injects/work-directory.md +9 -15
- package/injects/work-workspace.md +8 -19
- package/injects/work-worktree.md +18 -33
- package/lib/capability-contract.mjs +2 -2
- package/lib/core.mjs +162 -49
- package/lib/instance-background.mjs +54 -0
- package/lib/instance-inspect.mjs +3 -0
- package/lib/instance-lifecycle.mjs +35 -0
- package/lib/instance-resolution.mjs +3 -2
- package/lib/instance-same-work.mjs +67 -0
- package/lib/instance-upgrade.mjs +18 -0
- package/lib/materialize.mjs +23 -2
- package/lib/resolve.mjs +32 -5
- package/lib/servers.mjs +19 -4
- package/lib/session-resume-contract.mjs +1 -0
- package/lib/session-resume.mjs +36 -9
- package/lib/soul-composition.mjs +13 -10
- package/lib/workspace.mjs +3 -2
- package/package-catalog.json +3 -3
- package/package.json +1 -1
- package/packages/client/cli-adapter.mjs +30 -8
- package/packages/client/deployment-data.mjs +9 -0
- package/packages/client/deployment-panel.mjs +4 -0
- package/packages/client/instance-tree.mjs +64 -14
- package/packages/client/launch-prompt-outcome.mjs +1 -1
- package/packages/client/panel-views.mjs +11 -3
- package/packages/client/remote-roster.mjs +5 -1
- package/packages/client/roster-sections.mjs +50 -6
- package/packages/client/same-work.mjs +49 -0
- package/packages/client/session-resume-trigger.mjs +15 -37
- package/packages/client/session-resume.mjs +22 -259
- package/packages/client/soul-rows.mjs +2 -0
- package/packages/client/spawn-apply-contract.mjs +2 -1
- package/packages/client/spawn-decision.mjs +4 -1
- package/packages/client/spawn-preview-contract.mjs +12 -1
- package/packages/client/spawn-preview.mjs +2 -0
- package/packages/tui/README.md +2 -2
- package/packages/tui/lib/client.mjs +6 -2
- package/packages/tui/lib/main.mjs +44 -11
- package/packages/tui/lib/model.mjs +101 -43
- package/packages/tui/lib/panel.mjs +23 -13
- package/packages/tui/lib/store.mjs +76 -20
- package/packages/tui/lib/views/frame.mjs +2 -0
- package/packages/tui/lib/views/help.mjs +2 -0
- package/packages/tui/lib/views/instances.mjs +38 -1
- package/skills/oats-getting-started/SKILL.md +2 -2
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
// and its name, and a word only where the mark can't say it. Children stand under their parent by
|
|
8
8
|
// indentation alone; a folded row says how many it folds away, `+n`, and how many of those wait,
|
|
9
9
|
// `N below`. In a view of two or more deployments the list also holds a heading per deployment
|
|
10
|
-
// and the sentences the model sets under one: a heading says in words what it is of.
|
|
10
|
+
// and the sentences the model sets under one: a heading says in words what it is of. Last stands
|
|
11
|
+
// the Background section's heading (#1579), which can be selected: its chevron says whether the
|
|
12
|
+
// section is open, and the needs-input tag whether a row in it waits.
|
|
11
13
|
import { keyLabel } from "../actions.mjs";
|
|
12
14
|
import { lit, shown, shownEnd, textOf } from "../term/text.mjs";
|
|
13
15
|
import { COLORS, style } from "../term/style.mjs";
|
|
@@ -21,6 +23,11 @@ export const MARKS = Object.freeze({
|
|
|
21
23
|
utf8: Object.freeze({ running: "●", stopped: "○", shell: "◌", unknown: "?", held: "◆", selected: ">", waiting: "!" }),
|
|
22
24
|
ascii: Object.freeze({ running: "*", stopped: "-", shell: "~", unknown: "?", held: "#", selected: ">", waiting: "!" }),
|
|
23
25
|
});
|
|
26
|
+
/** The Background heading's chevron (#1579), open and closed, in UTF-8 and in ASCII: no state's mark. */
|
|
27
|
+
export const CHEVRONS = Object.freeze({
|
|
28
|
+
utf8: Object.freeze({ open: "▾", closed: "▸" }),
|
|
29
|
+
ascii: Object.freeze({ open: "v", closed: ">" }),
|
|
30
|
+
});
|
|
24
31
|
export const marksOf = (ascii) => (ascii ? MARKS.ascii : MARKS.utf8);
|
|
25
32
|
|
|
26
33
|
/** Two cells of indent per level, and no deeper than this many levels: a deeper row sits at the last. */
|
|
@@ -53,6 +60,7 @@ const PLAIN = style();
|
|
|
53
60
|
const BOLD = style({ bold: true });
|
|
54
61
|
const DIM = style({ dim: true });
|
|
55
62
|
const SELECTED = style({ reverse: true });
|
|
63
|
+
const SELECTED_BOLD = style({ reverse: true, bold: true });
|
|
56
64
|
/** The look of each state mark: the Souls view draws an instance's mark in its detail as the list does.
|
|
57
65
|
* No state is yellow: yellow says needs input, and only that. */
|
|
58
66
|
export const LOOK = Object.freeze({ running: style({ fg: "green" }), stopped: DIM, shell: DIM, unknown: DIM, held: style({ fg: "magenta" }) });
|
|
@@ -165,6 +173,34 @@ function instanceRow(row, cols, wordWidth, marks) {
|
|
|
165
173
|
return spans;
|
|
166
174
|
}
|
|
167
175
|
|
|
176
|
+
/** The Background section's heading (#1579). */
|
|
177
|
+
export const BACKGROUND = "Background";
|
|
178
|
+
/** The Background section's heading in a pane `cols` wide (lib/model.mjs backgroundRow): its chevron in
|
|
179
|
+
* the mark's column, open or closed, the word in bold where a row's name stands, as a machine's heading
|
|
180
|
+
* is bold, and how many rows the section holds, dim. While a row in it waits, open or closed, the
|
|
181
|
+
* needs-input tag stands at the edge in the roll-up's look, `Needs input` and no time, where the word
|
|
182
|
+
* and the count fit beside it, else the needs-input mark alone in the cells every row keeps. Selected,
|
|
183
|
+
* it is in reverse video with `>`, as a row is. */
|
|
184
|
+
function backgroundRow(item, cols, marks, chevrons) {
|
|
185
|
+
const spans = [], count = String(item.count);
|
|
186
|
+
const whole = BACKGROUND.length + GAP + count.length;
|
|
187
|
+
const tag = item.waiting ? (cols - NEEDS_INPUT.length - 3 - LEAD >= whole ? NEEDS_INPUT : marks.waiting) : null;
|
|
188
|
+
const end = tag === NEEDS_INPUT ? cols - NEEDS_INPUT.length - 3 : cols - EDGE;
|
|
189
|
+
if (item.selected) spans.push({ col: 0, width: cols, style: SELECTED });
|
|
190
|
+
if (item.selected && item.cursor !== false) spans.push({ col: 0, text: lit(marks.selected), style: SELECTED, width: 1 });
|
|
191
|
+
spans.push({ col: MARK, text: lit(item.open ? chevrons.open : chevrons.closed), style: item.selected ? SELECTED_BOLD : BOLD, width: 1 });
|
|
192
|
+
const word = Math.max(0, Math.min(BACKGROUND.length, end - LEAD));
|
|
193
|
+
if (word) spans.push({ col: LEAD, text: lit(BACKGROUND), style: item.selected ? SELECTED_BOLD : BOLD, width: word });
|
|
194
|
+
// The count whole or not at all: a cut number says another.
|
|
195
|
+
const at = LEAD + BACKGROUND.length + GAP;
|
|
196
|
+
if (at + count.length <= end) spans.push({ col: at, text: lit(count), style: item.selected ? SELECTED : DIM, width: count.length });
|
|
197
|
+
if (tag !== null) {
|
|
198
|
+
const look = item.selected ? WAITS_SELECTED : WAITS, col = cols - tag.length - 2;
|
|
199
|
+
if (col > MARK) spans.push({ col, width: tag.length + 2, style: look }, { col: col + 1, text: lit(tag), style: look, width: tag.length });
|
|
200
|
+
}
|
|
201
|
+
return spans;
|
|
202
|
+
}
|
|
203
|
+
|
|
168
204
|
/** A deployment's heading in a pane `cols` wide: its label in bold, its path, and, when it is not
|
|
169
205
|
* live, the shared word for its state and the short reason; at the right edge the time a machine
|
|
170
206
|
* reported its rows at. The state and the time always stand. When the row is too narrow for the
|
|
@@ -234,6 +270,7 @@ export function instances(m, size) {
|
|
|
234
270
|
else if (item.own) rows[i] = [{ col: SENTENCE_INDENT, text: lit(item.own), style: DIM, width: sentence }];
|
|
235
271
|
else if (item.empty === "none") rows[i] = noneRow(m, aside);
|
|
236
272
|
else if (item.empty) rows[i] = [{ col: SENTENCE_INDENT, text: lit(EMPTY_TEXT[item.empty]), style: DIM, width: aside }];
|
|
273
|
+
else if (item.kind === "background") rows[i] = backgroundRow(item, size.cols, marks, m.ascii ? CHEVRONS.ascii : CHEVRONS.utf8);
|
|
237
274
|
else rows[i] = instanceRow(item, size.cols, m.wordWidth, marks);
|
|
238
275
|
});
|
|
239
276
|
const note = cutNote(m.above, m.below);
|
|
@@ -350,7 +350,7 @@ name: acme
|
|
|
350
350
|
members:
|
|
351
351
|
- git:github.com/acme/acme-oats # the host is a member too
|
|
352
352
|
packages:
|
|
353
|
-
oats.framework: v1.
|
|
353
|
+
oats.framework: v1.16.1 # the installed CLI's catalog versions (below)
|
|
354
354
|
oats.aweb: v1.32.0 # messaging, and tasks: agent identities, mail, chat and tasks
|
|
355
355
|
oats.machine: v0.1.1 # on a machine found-list only: the machine's steward
|
|
356
356
|
defaults:
|
|
@@ -365,7 +365,7 @@ defaultTeam: acme # every soul starts in this team
|
|
|
365
365
|
|
|
366
366
|
- **The versions** are the installed CLI's catalog's:
|
|
367
367
|
`"$(oats root)/package-catalog.json"`, `packages."oats.framework".ref`
|
|
368
|
-
(for example `oats-framework/v1.
|
|
368
|
+
(for example `oats-framework/v1.16.1`: write the part after the `/`) and
|
|
369
369
|
`packages."oats.aweb".ref`, but never below `v1.31.0`: that release
|
|
370
370
|
carries `oats.aweb-tasks`, and a bare version resolves through the
|
|
371
371
|
catalog's tag convention even when the installed catalog names an older
|