@aui.io/apollo 0.1.21 → 0.1.25
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/README.md +183 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.js +34 -9
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/curl.d.ts +10 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/curl.js +63 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/curl.js.map +1 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/doctor.d.ts +13 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/doctor.js +89 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/doctor.js.map +1 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/hierarchy.js +24 -7
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/hierarchy.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/runtime-version.d.ts +10 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/runtime-version.js +116 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/runtime-version.js.map +1 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/scenarios.js +3 -3
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/scenarios.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/status.js +1 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/status.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/index.d.ts +1 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/index.js +26 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/package.json +3 -3
- package/node_modules/@aui.io/apollo-core/dist/src/api/agent-settings.d.ts +166 -26
- package/node_modules/@aui.io/apollo-core/dist/src/api/agent-settings.js +106 -20
- package/node_modules/@aui.io/apollo-core/dist/src/api/agent-settings.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/api/capture.d.ts +22 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/capture.js +75 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/capture.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/management.d.ts +0 -1
- package/node_modules/@aui.io/apollo-core/dist/src/api/management.js +0 -6
- package/node_modules/@aui.io/apollo-core/dist/src/api/management.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/api/network.d.ts +19 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/network.js +53 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/network.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/transport.d.ts +14 -2
- package/node_modules/@aui.io/apollo-core/dist/src/api/transport.js +15 -28
- package/node_modules/@aui.io/apollo-core/dist/src/api/transport.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/config/index.d.ts +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/config/index.js +16 -1
- package/node_modules/@aui.io/apollo-core/dist/src/config/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/config/store.d.ts +10 -0
- package/node_modules/@aui.io/apollo-core/dist/src/config/store.js +24 -0
- package/node_modules/@aui.io/apollo-core/dist/src/config/store.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/config/types.d.ts +18 -1
- package/node_modules/@aui.io/apollo-core/dist/src/index.d.ts +10 -5
- package/node_modules/@aui.io/apollo-core/dist/src/index.js +9 -4
- package/node_modules/@aui.io/apollo-core/dist/src/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/index.d.ts +72 -0
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/index.js +114 -0
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/index.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.d.ts +47 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js +60 -6
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.d.ts +4 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.js +19 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/doctor.d.ts +39 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/doctor.js +586 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/doctor.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/hierarchy.d.ts +78 -2
- package/node_modules/@aui.io/apollo-core/dist/src/services/hierarchy.js +177 -17
- package/node_modules/@aui.io/apollo-core/dist/src/services/hierarchy.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/requests.d.ts +22 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/requests.js +73 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/requests.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/scenarios.d.ts +15 -8
- package/node_modules/@aui.io/apollo-core/dist/src/services/scenarios.js +80 -58
- package/node_modules/@aui.io/apollo-core/dist/src/services/scenarios.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/status.service.d.ts +2 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/status.service.js +10 -2
- package/node_modules/@aui.io/apollo-core/dist/src/services/status.service.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/package.json +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.js +16 -2
- package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivityDrawer.js +31 -16
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivityDrawer.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/requests.d.ts +19 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/requests.js +29 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/requests.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.d.ts +3 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.js +6 -18
- package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/author/ResourcesView.js +26 -4
- package/node_modules/@aui.io/apollo-tui/dist/src/author/ResourcesView.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/context/ContextSwitcher.js +6 -2
- package/node_modules/@aui.io/apollo-tui/dist/src/context/ContextSwitcher.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js +95 -16
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.d.ts +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js +20 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/diagnostics.d.ts +8 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/diagnostics.js +109 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/diagnostics.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.d.ts +2 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.js +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js +2 -2
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.d.ts +4 -2
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.js +5 -3
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/SplashCard.d.ts +5 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/SplashCard.js +56 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/SplashCard.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/wordmark.d.ts +73 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/wordmark.js +488 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/wordmark.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/package.json +2 -2
- package/package.json +4 -4
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const PATH_MAX = 44;
|
|
2
|
+
export function requestRows(entries, limit) {
|
|
3
|
+
return entries
|
|
4
|
+
.slice(-limit)
|
|
5
|
+
.reverse()
|
|
6
|
+
.map((entry, index) => {
|
|
7
|
+
let shown = entry.url;
|
|
8
|
+
try {
|
|
9
|
+
const url = new URL(entry.url);
|
|
10
|
+
shown = `${url.pathname}${url.search === "" ? "" : "?…"}`;
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
// Not a parseable URL — show it raw (still truncated below).
|
|
14
|
+
}
|
|
15
|
+
if (shown.length > PATH_MAX)
|
|
16
|
+
shown = `…${shown.slice(-(PATH_MAX - 1))}`;
|
|
17
|
+
const failed = entry.status === undefined || entry.status >= 400;
|
|
18
|
+
return {
|
|
19
|
+
id: `${entry.at ?? "capture"}-${index}`,
|
|
20
|
+
method: entry.method,
|
|
21
|
+
path: shown,
|
|
22
|
+
service: entry.service ?? "unknown",
|
|
23
|
+
status: entry.status === undefined ? "ERR" : String(entry.status),
|
|
24
|
+
failed,
|
|
25
|
+
ms: entry.durationMs,
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=requests.js.map
|
|
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AAK,CAAC,UAAU;SACrB,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -13,7 +13,7 @@ export type WelcomeStep = "login" | "project" | "agent";
|
|
|
13
13
|
* Without a login or an agent it renders the welcome page instead: a setup
|
|
14
14
|
* checklist (sign in → project → agent) whose steps are clickable.
|
|
15
15
|
*/
|
|
16
|
-
export declare function AuthorHome({ scope, snapshot, validation, version, paneTitle, paneLines, resources, scenarios, session, sessionRows, sessionCursor, sessionScrollRef, sessionUnitRefs, backendLabel, backendDetection, onSelectUnit, onWelcomeStep, }: {
|
|
16
|
+
export declare function AuthorHome({ scope, snapshot, validation, version, paneTitle, paneLines, resources, scenarios, session, sessionRows, sessionCursor, sessionScrollRef, sessionUnitRefs, backendLabel, backendDetection, onSelectUnit, onWelcomeStep, splashRoomy, }: {
|
|
17
17
|
scope: ScopeStrip;
|
|
18
18
|
snapshot?: AuthorSnapshot | undefined;
|
|
19
19
|
validation?: ValidationRecord | undefined;
|
|
@@ -35,4 +35,6 @@ export declare function AuthorHome({ scope, snapshot, validation, version, paneT
|
|
|
35
35
|
onSelectUnit?: ((unit: number) => void) | undefined;
|
|
36
36
|
/** Mouse: click a welcome checklist step to run it. */
|
|
37
37
|
onWelcomeStep?: ((step: WelcomeStep) => void) | undefined;
|
|
38
|
+
/** Terminal roomy enough for the splash's neural-field layout. */
|
|
39
|
+
splashRoomy?: boolean | undefined;
|
|
38
40
|
}): import("react").ReactNode;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
2
|
import { homeishPath } from "../lib/scope.js";
|
|
3
3
|
import { changeEntries, changesSummary, relativeTime } from "./data.js";
|
|
4
4
|
import { OutputPane } from "../ui/OutputPane.js";
|
|
5
|
+
import { SplashCard } from "../ui/SplashCard.js";
|
|
5
6
|
import { SessionPane } from "./SessionPane.js";
|
|
6
|
-
import { G
|
|
7
|
-
import { AMBER, DIM, FAINT, FG, RED,
|
|
7
|
+
import { G } from "../theme/glyphs.js";
|
|
8
|
+
import { AMBER, DIM, FAINT, FG, RED, TEAL, TEAL_DIM, } from "../theme/tokens.js";
|
|
8
9
|
const PREVIEW_LIMIT = 6;
|
|
9
|
-
/** The "tiny" figlet face draws with half-block glyphs and a color — only
|
|
10
|
-
* meaningful on unicode terminals with colors enabled. */
|
|
11
|
-
const WORDMARK = unicodeSupported() && RICH;
|
|
12
10
|
const STATUS_COLOR = {
|
|
13
11
|
A: TEAL,
|
|
14
12
|
M: AMBER,
|
|
@@ -21,7 +19,7 @@ const STATUS_COLOR = {
|
|
|
21
19
|
* Without a login or an agent it renders the welcome page instead: a setup
|
|
22
20
|
* checklist (sign in → project → agent) whose steps are clickable.
|
|
23
21
|
*/
|
|
24
|
-
export function AuthorHome({ scope, snapshot, validation, version, paneTitle, paneLines, resources, scenarios, session, sessionRows, sessionCursor, sessionScrollRef, sessionUnitRefs, backendLabel, backendDetection, onSelectUnit, onWelcomeStep, }) {
|
|
22
|
+
export function AuthorHome({ scope, snapshot, validation, version, paneTitle, paneLines, resources, scenarios, session, sessionRows, sessionCursor, sessionScrollRef, sessionUnitRefs, backendLabel, backendDetection, onSelectUnit, onWelcomeStep, splashRoomy, }) {
|
|
25
23
|
const hasAgent = scope.agent !== "—";
|
|
26
24
|
// Welcome page: the wordmark plus a setup checklist (setup screens are
|
|
27
25
|
// not day-to-day, so they can afford the room).
|
|
@@ -56,17 +54,7 @@ export function AuthorHome({ scope, snapshot, validation, version, paneTitle, pa
|
|
|
56
54
|
flexGrow: 1,
|
|
57
55
|
minHeight: 0,
|
|
58
56
|
width: "100%",
|
|
59
|
-
}, children: [_jsxs("box", { style: {
|
|
60
|
-
border: true,
|
|
61
|
-
borderStyle: "rounded",
|
|
62
|
-
borderColor: TEAL_DIM,
|
|
63
|
-
flexDirection: "column",
|
|
64
|
-
alignItems: "center",
|
|
65
|
-
flexShrink: 0,
|
|
66
|
-
width: 44,
|
|
67
|
-
paddingTop: 1,
|
|
68
|
-
paddingBottom: 1,
|
|
69
|
-
}, children: [WORDMARK ? (_jsxs(_Fragment, { children: [_jsx("ascii-font", { text: "apollo", font: "tiny", color: TEAL, style: { flexShrink: 0 } }), _jsxs("text", { fg: DIM, children: ["v", version] })] })) : (_jsxs("text", { fg: FG, children: [_jsx("b", { children: "apollo" }), " ", _jsxs("span", { fg: DIM, children: ["v", version] })] })), _jsx("text", { fg: DIM, children: "Author \u00B7 program workbench" })] }), _jsx("text", { children: " " }), _jsxs("box", { title: " get set up ", style: {
|
|
57
|
+
}, children: [_jsx(SplashCard, { version: version, roomy: splashRoomy === true }), _jsx("text", { children: " " }), _jsxs("box", { title: " get set up ", style: {
|
|
70
58
|
border: true,
|
|
71
59
|
borderStyle: "rounded",
|
|
72
60
|
borderColor: TEAL_DIM,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorHome.js","sourceRoot":"","sources":["../../../src/author/AuthorHome.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAmB,MAAM,iBAAiB,CAAC;AAI/D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"AuthorHome.js","sourceRoot":"","sources":["../../../src/author/AuthorHome.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAmB,MAAM,iBAAiB,CAAC;AAI/D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CA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AO,CAAC,CAAC,CAAC,CACrB,gBAAM,EAAE,EAAE,IAAI,uBAAS,CAAC,CAAC,EAAE,IAAQ,CACpC,CAAC,CAAC,CAAC,CACF,eAAM,EAAE,EAAE,KAAK,YAAG,OAAO,GAAQ,CAClC,IACI,CACR,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,UAAU,GAGX;IACC,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,eAAM,EAAE,EAAE,KAAK,qDAAwC,CAAC;IACjE,CAAC;IACD,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAC9C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,SAAS,CAC7B,CAAC,MAAM,CAAC;IACT,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,IAAI,MAAM,KAAK,CAAC,CAAC;IACnD,OAAO,CACL,gBAAM,EAAE,EAAE,GAAG,2BACA,GAAG,EACd,eAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,YAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,MAAM,WAAW,GAAQ,EAC9E,gBAAM,EAAE,EAAE,KAAK,yBAAM,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC,IAAQ,EACvD,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,eAAM,EAAE,EAAE,KAAK,8BAAiB,CAAC,CAAC,CAAC,IAAI,IACtD,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
2
|
import { memo, useEffect } from "react";
|
|
3
|
+
import { truncatePickerText } from "../lib/picker.js";
|
|
3
4
|
import { G } from "../theme/glyphs.js";
|
|
4
5
|
import { JsonRows } from "../ui/JsonPane.js";
|
|
5
6
|
import { AMBER, DIM, FAINT, FG, RED, TEAL, TEAL_DIM, } from "../theme/tokens.js";
|
|
@@ -18,7 +19,7 @@ export function ResourcesView({ rows, cursor, detail, detailTitle, expanded, sid
|
|
|
18
19
|
flexShrink: 0,
|
|
19
20
|
minHeight: 0,
|
|
20
21
|
flexDirection: "column",
|
|
21
|
-
}, children: _jsx(ListPane, { rows: rows, cursor: cursor, pageSize: pageSize, onRowClick: onRowClick }) }), _jsx(DetailPane, { detail: detail, title: detailTitle, loadedNote: loadedNote, scrollRef: scrollRef, onJsonToggle: onJsonToggle })] }));
|
|
22
|
+
}, children: _jsx(ListPane, { rows: rows, cursor: cursor, pageSize: pageSize, width: sidebarWidth, onRowClick: onRowClick }) }), _jsx(DetailPane, { detail: detail, title: detailTitle, loadedNote: loadedNote, scrollRef: scrollRef, onJsonToggle: onJsonToggle })] }));
|
|
22
23
|
}
|
|
23
24
|
function rowColor(row, active) {
|
|
24
25
|
if (row.danger)
|
|
@@ -31,7 +32,7 @@ function rowColor(row, active) {
|
|
|
31
32
|
return AMBER;
|
|
32
33
|
return active ? FG : DIM;
|
|
33
34
|
}
|
|
34
|
-
const ListPane = memo(function ListPane({ rows, cursor, pageSize, onRowClick, }) {
|
|
35
|
+
const ListPane = memo(function ListPane({ rows, cursor, pageSize, width, onRowClick, }) {
|
|
35
36
|
const start = rows.length <= pageSize
|
|
36
37
|
? 0
|
|
37
38
|
: Math.max(0, Math.min(cursor - Math.floor(pageSize / 3), rows.length - pageSize));
|
|
@@ -57,11 +58,32 @@ const ListPane = memo(function ListPane({ rows, cursor, pageSize, onRowClick, })
|
|
|
57
58
|
: row.kind === "note"
|
|
58
59
|
? `${G.warn} `
|
|
59
60
|
: "";
|
|
60
|
-
|
|
61
|
+
const pointer = active ? `${G.pointerBold} ` : " ";
|
|
62
|
+
// One line per row. The list lays rows out at fixed single-line
|
|
63
|
+
// slots, so anything that wraps paints over its neighbours (hub
|
|
64
|
+
// names and collection names are routinely longer than a narrow
|
|
65
|
+
// sidebar). Budget the line and truncate — same as ThreadsPane.
|
|
66
|
+
const room = Math.max(4, width - 4 - pointer.length - indent.length - marker.length);
|
|
67
|
+
// The label names the row, so it claims the line first and is never
|
|
68
|
+
// shortened to fit the note; the note is a filler for whatever space
|
|
69
|
+
// is left over.
|
|
70
|
+
const noteText = row.note === undefined ? "" : ` ${row.note}`;
|
|
71
|
+
const label = truncatePickerText(row.label, room);
|
|
72
|
+
const noteRoom = room - label.length;
|
|
73
|
+
// Under three columns left there is no room for the two-space
|
|
74
|
+
// separator plus a character of note — drop it rather than show "…".
|
|
75
|
+
const note = noteText !== "" && noteRoom > 2
|
|
76
|
+
? truncatePickerText(noteText, noteRoom)
|
|
77
|
+
: "";
|
|
78
|
+
return (_jsxs("text", { fg: rowColor(row, active),
|
|
79
|
+
// Never let flex squeeze a row: if the window is taller than the
|
|
80
|
+
// pane, rows must clip at the bottom (the box hides overflow),
|
|
81
|
+
// not compress into each other.
|
|
82
|
+
style: { flexShrink: 0 }, onMouseDown: onRowClick
|
|
61
83
|
? () => {
|
|
62
84
|
onRowClick(index);
|
|
63
85
|
}
|
|
64
|
-
: undefined, children: [
|
|
86
|
+
: undefined, children: [pointer, indent, marker, label, note === "" ? null : (_jsx("span", { fg: row.warn ? AMBER : FAINT, children: note }))] }, row.id));
|
|
65
87
|
}), start + window.length < rows.length ? (_jsxs("text", { fg: FAINT, children: ["\u2026 ", rows.length - start - window.length, " below"] })) : null] }));
|
|
66
88
|
});
|
|
67
89
|
const DetailPane = memo(function DetailPane({ detail, title, loadedNote, scrollRef, onJsonToggle, }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourcesView.js","sourceRoot":"","sources":["../../../src/author/ResourcesView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAC;AAKxD,OAAO,EAAE,CAAC,EAAE,MAAM,oBAA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AW,EAAE,QAAQ;YACrB,aAAa,EAAE,QAAQ;YACvB,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;SAChB,aAED,gBAAM,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,aACpC,UAAU,EACV,KAAK,EACN,gBAAM,EAAE,EAAE,KAAK,wDAAqC,CAAC,CAAC,SAAS,kBAAkB,IAC5E,EACN,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CACtB,eAAM,EAAE,EAAE,KAAK,iEAAoD,CACpE,CAAC,CAAC,CAAC,CACF,oBACE,GAAG,EAAE,SAAS,EACd,KAAK,EAAE;oBACL,QAAQ,EAAE,CAAC;oBACX,UAAU,EAAE,CAAC;oBACb,SAAS,EAAE,CAAC;oBACZ,aAAa,EAAE,QAAQ;iBACxB,YAED,KAAC,QAAQ,IAAC,IAAI,EAAE,MAAM,KAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAI,GACtE,CACb,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -15,15 +15,19 @@ export function contextRowValue(scope, id) {
|
|
|
15
15
|
return { value: scope.env };
|
|
16
16
|
case "profile":
|
|
17
17
|
return { value: scope.profile };
|
|
18
|
-
case "agent":
|
|
18
|
+
case "agent": {
|
|
19
|
+
// The runtime is the checkout's, like the bound version — shown here,
|
|
20
|
+
// changed with `/runtime-use` rather than by a row of its own.
|
|
21
|
+
const bound = scope.version !== "—" ? `${scope.agent} @ ${scope.version}` : scope.agent;
|
|
19
22
|
return {
|
|
20
|
-
value: scope.
|
|
23
|
+
value: scope.runtime !== "—" ? `${bound} · rt ${scope.runtime}` : bound,
|
|
21
24
|
...(scope.agentPath
|
|
22
25
|
? { detail: homeishPath(scope.agentPath) }
|
|
23
26
|
: scope.agentId
|
|
24
27
|
? { detail: scope.agentId }
|
|
25
28
|
: {}),
|
|
26
29
|
};
|
|
30
|
+
}
|
|
27
31
|
case "project":
|
|
28
32
|
return {
|
|
29
33
|
value: scope.project,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextSwitcher.js","sourceRoot":"","sources":["../../../src/context/ContextSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAepE,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE;IACnC,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACnC,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAC/B,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACnC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE;CACrD,CAAC;AAQF,MAAM,UAAU,eAAe,CAC7B,KAAiB,EACjB,EAAoB;IAEpB,QAAQ,EAAE,EAAE,CAAC;QACX,KAAK,KAAK;YACR,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC;QAC9B,KAAK,SAAS;YACZ,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;QAClC,KAAK,OAAO;
|
|
1
|
+
{"version":3,"file":"ContextSwitcher.js","sourceRoot":"","sources":["../../../src/context/ContextSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,E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ersion, } from "@aui.io/apollo-core/api/management.js";
|
|
8
8
|
import { defaultCheckoutDir, forgetCheckout, listCheckouts, registerCheckout, } from "@aui.io/apollo-core/checkouts/registry.js";
|
|
9
|
-
import { readBinding, readCredentials, resolveContext, setDefaultProject, writeCredentials, } from "@aui.io/apollo-core/config/index.js";
|
|
9
|
+
import { patchBinding, readBinding, readCredentials, resolveContext, setDefaultProject, writeCredentials, } from "@aui.io/apollo-core/config/index.js";
|
|
10
10
|
import { ConfigError } from "@aui.io/apollo-core/errors/index.js";
|
|
11
|
-
import {
|
|
11
|
+
import { matchRuntimeVersion, resolveRuntimeVersion, } from "@aui.io/apollo-core/runtime-version/index.js";
|
|
12
|
+
import { importBundle, listVersions, localDiff, pullCheckout, pushBundle, remoteDiff, validateLocalBundle, } from "@aui.io/apollo-core/services/bundles.js";
|
|
12
13
|
import { loginWithBrowser, loginWithOtp, loginWithToken, logout as logoutSession, requestOtp, } from "@aui.io/apollo-core/services/auth.js";
|
|
14
|
+
import { captureLog } from "@aui.io/apollo-core/api/capture.js";
|
|
13
15
|
import { createClients } from "@aui.io/apollo-core/services/clients.js";
|
|
16
|
+
import { runDoctor } from "@aui.io/apollo-core/services/doctor.js";
|
|
14
17
|
import { setEnvironment } from "@aui.io/apollo-core/services/env.service.js";
|
|
15
|
-
import { bindAgent, createAgent, createProject, initialVersionTag, listAgents, listOrganizations, listProjects, unlinkAgent, useOrganization, useProject, useVersion, } from "@aui.io/apollo-core/services/hierarchy.js";
|
|
18
|
+
import { agentRuntimeVersion, bindAgent, createAgent, createProject, initialVersionTag, latestPublishedRuntimeVersion, listAgents, listOrganizations, listProjects, TEMPLATE_AGENT_ID, unlinkAgent, useOrganization, useProject, useVersion, } from "@aui.io/apollo-core/services/hierarchy.js";
|
|
16
19
|
import { createThread, debugInteraction, listAgentThreads, listMessages, listThreads, resolveSendVersion, trace as fetchTrace, } from "@aui.io/apollo-core/services/messaging.js";
|
|
17
20
|
import { createCollection, createEndpoint, deleteEndpoint, deleteMockDb, describeMockDb, executeEndpoint, exportMockDb, getEndpoint, inspectSession, listCollections, listEndpoints, normalizeSchema, parseJsonFlag, provisionMockDb, resetSession, rotateMgmtKey, rotateRuntimeKey, seedRows, statusMockDb, storedKeys, updateCollection, updateEndpoint, wireMockDbConnection, } from "@aui.io/apollo-core/services/mockdb.js";
|
|
18
21
|
import { listSecrets, parseVaultScopeLevel, removeSecretByName, scopeLevelLabel, setSecret, } from "@aui.io/apollo-core/services/vault.js";
|
|
@@ -24,6 +27,7 @@ import { upgradeCli } from "@aui.io/apollo-core/services/upgrade.js";
|
|
|
24
27
|
import { checkoutSchemasDir, installSchemas, } from "@aui.io/apollo-core/schemas/install.js";
|
|
25
28
|
import { installSkills } from "@aui.io/apollo-core/skills/install.js";
|
|
26
29
|
import { messagesToTurns } from "../talk/data.js";
|
|
30
|
+
import { consoleVersion, doctorPaneLines, doctorSummary, requestPaneLines, } from "./diagnostics.js";
|
|
27
31
|
import { pickerDisplayName } from "./picker.js";
|
|
28
32
|
import { detectIdes, ideTargetDir, launchIde } from "./ide.js";
|
|
29
33
|
import { enterAgentCheckout, followAccountAgent, GATE_CREATE_ID, GATE_IMPORT_ID, GATE_SKIP_ID, } from "./checkout.js";
|
|
@@ -174,6 +178,14 @@ export async function loadPickerCatalog(kind, context) {
|
|
|
174
178
|
...page.results.map((v) => item(v.version_tag, v.version_tag, v.status)),
|
|
175
179
|
];
|
|
176
180
|
}
|
|
181
|
+
case "runtime": {
|
|
182
|
+
const resolved = await resolveRuntimeVersion(clients.agentSettings);
|
|
183
|
+
return resolved.options.map((option) => item(option.latest_version, `${option.display_name} · ${option.latest_version}`, option.latest_version === context.runtimeVersion
|
|
184
|
+
? "pinned here"
|
|
185
|
+
: option.type === "custom"
|
|
186
|
+
? "custom"
|
|
187
|
+
: option.runtime_version));
|
|
188
|
+
}
|
|
177
189
|
case "import-version": {
|
|
178
190
|
// Import flow: versions of the sheet's chosen agent — the TUI injects
|
|
179
191
|
// that id as context.agentId, since nothing is bound yet.
|
|
@@ -227,10 +239,36 @@ export async function runSimpleCommand(name, context, args) {
|
|
|
227
239
|
`project: ${status.projectId ?? "—"}`,
|
|
228
240
|
`agent: ${status.agentId ?? "—"}`,
|
|
229
241
|
`version: ${status.versionTag ?? "—"}`,
|
|
242
|
+
`runtime: ${status.runtimeVersion ?? "— (gateway default)"}`,
|
|
230
243
|
`auth: ${status.authenticated ? "yes" : "no"}`,
|
|
231
244
|
],
|
|
232
245
|
};
|
|
233
246
|
}
|
|
247
|
+
case "doctor": {
|
|
248
|
+
// Same engine as `apollo doctor` — read-only setup diagnosis. Probes
|
|
249
|
+
// run online here (a TUI session is interactive, latency is fine).
|
|
250
|
+
const report = await runDoctor(context, {
|
|
251
|
+
cliVersion: consoleVersion(),
|
|
252
|
+
packageName: "@aui.io/apollo",
|
|
253
|
+
});
|
|
254
|
+
return {
|
|
255
|
+
toast: doctorSummary(report),
|
|
256
|
+
jumpTab: "scope",
|
|
257
|
+
paneTitle: "doctor",
|
|
258
|
+
paneLines: doctorPaneLines(report),
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
case "requests": {
|
|
262
|
+
// This session's API calls from the shared in-process capture log —
|
|
263
|
+
// the live sibling of the activity drawer's tail, with curl replays.
|
|
264
|
+
const entries = captureLog.snapshot();
|
|
265
|
+
return {
|
|
266
|
+
toast: `${entries.length} API request(s) captured this session`,
|
|
267
|
+
jumpTab: "scope",
|
|
268
|
+
paneTitle: "api requests",
|
|
269
|
+
paneLines: requestPaneLines(entries),
|
|
270
|
+
};
|
|
271
|
+
}
|
|
234
272
|
case "validate": {
|
|
235
273
|
const result = await validateLocalBundle(context, clients.runtime);
|
|
236
274
|
if (result.valid) {
|
|
@@ -289,7 +327,7 @@ export async function runSimpleCommand(name, context, args) {
|
|
|
289
327
|
}
|
|
290
328
|
return {
|
|
291
329
|
jumpTab: "bundle",
|
|
292
|
-
toast: `Pulled scenarios bundle v${String(pulled.version)} — ${String(pulled.
|
|
330
|
+
toast: `Pulled scenarios bundle v${String(pulled.version)} — ${String(pulled.filesCount)} file(s) (${String(pulled.scenariosCount)} scenario(s))`,
|
|
293
331
|
};
|
|
294
332
|
}
|
|
295
333
|
case "scores-pull": {
|
|
@@ -707,6 +745,21 @@ export async function applyPick(commandName, selectedId, context) {
|
|
|
707
745
|
refreshScope: true,
|
|
708
746
|
};
|
|
709
747
|
}
|
|
748
|
+
case "runtime-use": {
|
|
749
|
+
if (!context.bindingPath)
|
|
750
|
+
return { error: "No .apollorc here" };
|
|
751
|
+
const resolved = await resolveRuntimeVersion(clients.agentSettings);
|
|
752
|
+
const match = matchRuntimeVersion(resolved.options, selectedId);
|
|
753
|
+
const version = match?.latest_version ?? selectedId;
|
|
754
|
+
if (!version)
|
|
755
|
+
return { error: "Pick a runtime version" };
|
|
756
|
+
await patchBinding(context.bindingPath, { runtime_version: version });
|
|
757
|
+
return {
|
|
758
|
+
jumpTab: "scope",
|
|
759
|
+
toast: `Runtime ${version}${match ? ` (${match.display_name})` : ""} — /pull to refresh schemas + skills`,
|
|
760
|
+
refreshScope: true,
|
|
761
|
+
};
|
|
762
|
+
}
|
|
710
763
|
case "version-publish": {
|
|
711
764
|
if (!context.agentId)
|
|
712
765
|
return { error: "Select an agent first" };
|
|
@@ -806,7 +859,7 @@ export async function runSheetAction(commandName, values, context) {
|
|
|
806
859
|
const bundle = await pushScenarioBundle(context, {
|
|
807
860
|
...(notes ? { notes } : {}),
|
|
808
861
|
});
|
|
809
|
-
const base = `Pushed scenarios bundle v${String(bundle.version)} — ${String(bundle.
|
|
862
|
+
const base = `Pushed scenarios bundle v${String(bundle.version)} — ${String(bundle.filesCount)} file(s) (${String(bundle.scenariosCount)} scenario(s))`;
|
|
810
863
|
const skipScores = values["skip-scores"] === true;
|
|
811
864
|
const hasScores = !skipScores &&
|
|
812
865
|
context.agentRoot !== undefined &&
|
|
@@ -838,7 +891,7 @@ export async function runSheetAction(commandName, values, context) {
|
|
|
838
891
|
const dir = text("dir");
|
|
839
892
|
const force = values.force === true;
|
|
840
893
|
try {
|
|
841
|
-
const result = await
|
|
894
|
+
const result = await pullCheckout(context, clients, {
|
|
842
895
|
...(tag && tag !== "latest" ? { tag } : {}),
|
|
843
896
|
...(dir ? { destination: dir } : {}),
|
|
844
897
|
force,
|
|
@@ -846,9 +899,10 @@ export async function runSheetAction(commandName, values, context) {
|
|
|
846
899
|
const removed = result.removed.length
|
|
847
900
|
? ` · removed ${result.removed.length}`
|
|
848
901
|
: "";
|
|
902
|
+
const on = result.runtimeVersion ? ` on ${result.runtimeVersion}` : "";
|
|
849
903
|
return {
|
|
850
904
|
jumpTab: "bundle",
|
|
851
|
-
toast: `Pulled ${Object.keys(result.files).length} file(s)${removed}`,
|
|
905
|
+
toast: `Pulled ${Object.keys(result.files).length} file(s)${on}${removed}`,
|
|
852
906
|
refreshScope: true,
|
|
853
907
|
};
|
|
854
908
|
}
|
|
@@ -1031,7 +1085,7 @@ export async function runSheetAction(commandName, values, context) {
|
|
|
1031
1085
|
};
|
|
1032
1086
|
}
|
|
1033
1087
|
case "agent-create": {
|
|
1034
|
-
const created = await createAgent(context, clients
|
|
1088
|
+
const created = await createAgent(context, clients, text("name"), text("template") || TEMPLATE_AGENT_ID);
|
|
1035
1089
|
const directory = text("dir")
|
|
1036
1090
|
? path.resolve(text("dir"))
|
|
1037
1091
|
: await defaultCheckoutDir(homedir(), context.profile, context.environment, created.name, created.id);
|
|
@@ -1041,7 +1095,16 @@ export async function runSheetAction(commandName, values, context) {
|
|
|
1041
1095
|
// (REPORTS-26); best-effort — unbound stays recoverable via
|
|
1042
1096
|
// /version-use.
|
|
1043
1097
|
const seededTag = await initialVersionTag(clients.management, created);
|
|
1044
|
-
|
|
1098
|
+
// A new agent starts on the current engine; skills/schemas below are
|
|
1099
|
+
// served from that same one.
|
|
1100
|
+
const runtimeVersion = await latestPublishedRuntimeVersion(clients);
|
|
1101
|
+
const pinnedClients = runtimeVersion
|
|
1102
|
+
? createClients({ ...context, runtimeVersion })
|
|
1103
|
+
: clients;
|
|
1104
|
+
await bindAgent(context, created, directory, {
|
|
1105
|
+
...(seededTag ? { versionTag: seededTag } : {}),
|
|
1106
|
+
...(runtimeVersion ? { runtimeVersion } : {}),
|
|
1107
|
+
});
|
|
1045
1108
|
const slug = text("name")
|
|
1046
1109
|
.toLowerCase()
|
|
1047
1110
|
.replace(/[^a-z0-9]+/g, "-")
|
|
@@ -1062,8 +1125,11 @@ export async function runSheetAction(commandName, values, context) {
|
|
|
1062
1125
|
// error — /schema-pull retries the schemas later.
|
|
1063
1126
|
let authoringNote = "";
|
|
1064
1127
|
try {
|
|
1065
|
-
await installSkills(
|
|
1066
|
-
|
|
1128
|
+
await installSkills(pinnedClients.runtime, directory, [
|
|
1129
|
+
"cursor",
|
|
1130
|
+
"claude",
|
|
1131
|
+
]);
|
|
1132
|
+
await installSchemas(pinnedClients.runtime, checkoutSchemasDir(directory));
|
|
1067
1133
|
}
|
|
1068
1134
|
catch {
|
|
1069
1135
|
authoringNote = " (skills/schemas not installed — /schema-pull to retry)";
|
|
@@ -1088,9 +1154,21 @@ export async function runSheetAction(commandName, values, context) {
|
|
|
1088
1154
|
? path.resolve(text("dir"))
|
|
1089
1155
|
: existing?.path ??
|
|
1090
1156
|
(await defaultCheckoutDir(homedir(), context.profile, context.environment, agent.name, agent.id));
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
await
|
|
1157
|
+
// Import reproduces the agent as it is: pin the runtime the agent
|
|
1158
|
+
// itself records, before anything runtime-served is fetched.
|
|
1159
|
+
const runtimeVersion = await agentRuntimeVersion(clients, agentId);
|
|
1160
|
+
const pinnedClients = runtimeVersion
|
|
1161
|
+
? createClients({ ...context, runtimeVersion })
|
|
1162
|
+
: clients;
|
|
1163
|
+
const imported = await importBundle(context, clients.management, agentId, destination, {
|
|
1164
|
+
...(text("tag") ? { tag: text("tag") } : {}),
|
|
1165
|
+
...(runtimeVersion ? { runtimeVersion } : {}),
|
|
1166
|
+
});
|
|
1167
|
+
await installSkills(pinnedClients.runtime, destination, [
|
|
1168
|
+
"cursor",
|
|
1169
|
+
"claude",
|
|
1170
|
+
]);
|
|
1171
|
+
await installSchemas(pinnedClients.runtime, checkoutSchemasDir(destination));
|
|
1094
1172
|
// Scenarios ride the import best-effort, like skills and schemas —
|
|
1095
1173
|
// the checkout context is explicit because nothing is bound yet.
|
|
1096
1174
|
const scenarios = await syncScenarios({
|
|
@@ -1168,7 +1246,7 @@ export async function runDestructive(action, context, args = {}) {
|
|
|
1168
1246
|
case "pull-force": {
|
|
1169
1247
|
const tag = args.tag ?? "";
|
|
1170
1248
|
const dir = args.dir ?? "";
|
|
1171
|
-
const result = await
|
|
1249
|
+
const result = await pullCheckout(context, clients, {
|
|
1172
1250
|
...(tag && tag !== "latest" ? { tag } : {}),
|
|
1173
1251
|
...(dir ? { destination: dir } : {}),
|
|
1174
1252
|
force: true,
|
|
@@ -1176,9 +1254,10 @@ export async function runDestructive(action, context, args = {}) {
|
|
|
1176
1254
|
const removed = result.removed.length
|
|
1177
1255
|
? ` · removed ${result.removed.length}`
|
|
1178
1256
|
: "";
|
|
1257
|
+
const on = result.runtimeVersion ? ` on ${result.runtimeVersion}` : "";
|
|
1179
1258
|
return {
|
|
1180
1259
|
jumpTab: "bundle",
|
|
1181
|
-
toast: `Force-pulled ${Object.keys(result.files).length} file(s)${removed}`,
|
|
1260
|
+
toast: `Force-pulled ${Object.keys(result.files).length} file(s)${on}${removed}`,
|
|
1182
1261
|
refreshScope: true,
|
|
1183
1262
|
};
|
|
1184
1263
|
}
|