priiisk 0.1.21 → 0.1.22
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/dist/{chunk-6KCQ6O4T.js → chunk-2YPHJHIX.js} +1 -1
- package/dist/{chunk-PCOWK5BR.js → chunk-5W5JRU33.js} +3 -3
- package/dist/{chunk-GYYNOMA5.js → chunk-7HDRDMQU.js} +2 -2
- package/dist/{chunk-IPF3C3B2.js → chunk-C7QHKE3K.js} +3 -3
- package/dist/{chunk-QY7U7U2K.js → chunk-GBEORC3T.js} +2 -2
- package/dist/{chunk-PIHJTCPQ.js → chunk-Y2F6VW5R.js} +8 -8
- package/dist/{chunk-K7LA4DNU.js → chunk-YCWIUVAI.js} +55 -243
- package/dist/{chunk-TUCFONJW.js → chunk-YNTHXLFG.js} +1 -1
- package/dist/priiisk-host.js +56 -239
- package/dist/priiisk.js +2 -2
- package/package.json +10 -10
- /package/dist/{chunk-IPF3C3B2.js.LEGAL.txt → chunk-C7QHKE3K.js.LEGAL.txt} +0 -0
|
@@ -3,14 +3,14 @@ const require = __priiiskCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
errorPayload,
|
|
5
5
|
makeCapturedConsole
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2YPHJHIX.js";
|
|
7
7
|
import {
|
|
8
8
|
withCampRpcSession,
|
|
9
9
|
withConsole
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GBEORC3T.js";
|
|
11
11
|
import {
|
|
12
12
|
PRIIISK_CLI_VERSION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YNTHXLFG.js";
|
|
14
14
|
import {
|
|
15
15
|
_await2 as _await,
|
|
16
16
|
addFinalizer2 as addFinalizer,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
CampHealthComponentStatus,
|
|
11
11
|
CampHealthSnapshotSchema,
|
|
12
12
|
CliSurfaceSelectionError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GBEORC3T.js";
|
|
14
14
|
import {
|
|
15
15
|
Array$,
|
|
16
16
|
Boolean$,
|
|
@@ -135,7 +135,7 @@ var makeDoctorReport = (checks, checkedAt, projectHash) => ({
|
|
|
135
135
|
var doctorErrorMessage = (cause) => (cause instanceof Error ? cause.message : String(cause)).slice(-2048);
|
|
136
136
|
|
|
137
137
|
// packages/camp-state/src/bootstrap/campHostVersion.ts
|
|
138
|
-
var PRIIISK_HOST_VERSION = "0.1.
|
|
138
|
+
var PRIIISK_HOST_VERSION = "0.1.22";
|
|
139
139
|
|
|
140
140
|
// packages/surface/src/domain/surfaceModel.ts
|
|
141
141
|
var NonEmptyString = String$.pipe(minLength(1));
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
loadCampManifest,
|
|
22
22
|
makeDoctorReport,
|
|
23
23
|
resolveCampSurface
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7HDRDMQU.js";
|
|
25
25
|
import {
|
|
26
26
|
CampSessionError,
|
|
27
27
|
CampTurnStopReason
|
|
@@ -33,8 +33,8 @@ import {
|
|
|
33
33
|
PRIIISK_PROTOCOL_PACKAGE_VERSION,
|
|
34
34
|
PRIIISK_PROTOCOL_VERSION,
|
|
35
35
|
withCampRpc
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-GBEORC3T.js";
|
|
37
|
+
import "./chunk-YNTHXLFG.js";
|
|
38
38
|
import {
|
|
39
39
|
DirectToolSandboxKind,
|
|
40
40
|
FileSystem_exports,
|
|
@@ -2,7 +2,7 @@ import { createRequire as __priiiskCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __priiiskCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
PRIIISK_CLI_VERSION
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YNTHXLFG.js";
|
|
6
6
|
import {
|
|
7
7
|
Array$,
|
|
8
8
|
Boolean$,
|
|
@@ -5138,7 +5138,7 @@ var make11 = (...rpcs) => makeProto2({
|
|
|
5138
5138
|
|
|
5139
5139
|
// packages/protocol/src/domain/protocolVersion.ts
|
|
5140
5140
|
var PRIIISK_PROTOCOL_VERSION = "12";
|
|
5141
|
-
var PRIIISK_PROTOCOL_PACKAGE_VERSION = "0.1.
|
|
5141
|
+
var PRIIISK_PROTOCOL_PACKAGE_VERSION = "0.1.22";
|
|
5142
5142
|
var ProtocolVersionSchema = String$.pipe(minLength(1));
|
|
5143
5143
|
|
|
5144
5144
|
// packages/protocol/src/domain/protocolIdentifiers.ts
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
resolveCampSurface,
|
|
24
24
|
saveCampManifest,
|
|
25
25
|
startingCampManifest
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7HDRDMQU.js";
|
|
27
27
|
import {
|
|
28
28
|
get as get4,
|
|
29
29
|
make as make10,
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
vsep,
|
|
107
107
|
weak,
|
|
108
108
|
white
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-2YPHJHIX.js";
|
|
110
110
|
import {
|
|
111
111
|
CampCommandFailure,
|
|
112
112
|
CampHostReadiness,
|
|
@@ -127,10 +127,10 @@ import {
|
|
|
127
127
|
withCampRpc,
|
|
128
128
|
withCampRpcSession,
|
|
129
129
|
withConsole
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-GBEORC3T.js";
|
|
131
131
|
import {
|
|
132
132
|
PRIIISK_CLI_VERSION
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-YNTHXLFG.js";
|
|
134
134
|
import {
|
|
135
135
|
BadArgument,
|
|
136
136
|
BaseProto,
|
|
@@ -19260,7 +19260,7 @@ var campResumeListCommand = Command_exports2.make(
|
|
|
19260
19260
|
)
|
|
19261
19261
|
).pipe(Command_exports2.withDescription("Lists saved runs of this project that resume can restore."));
|
|
19262
19262
|
var runIdArgument = Args_exports.text({ name: "runId" }).pipe(Args_exports.optional);
|
|
19263
|
-
var selectCampRunOnDemand = (items) => promise(() => import("./chunk-
|
|
19263
|
+
var selectCampRunOnDemand = (items) => promise(() => import("./chunk-YCWIUVAI.js")).pipe(
|
|
19264
19264
|
flatMap3((ui) => ui.selectCampRun({ items }))
|
|
19265
19265
|
);
|
|
19266
19266
|
var selectAndResume = (json) => {
|
|
@@ -19333,7 +19333,7 @@ var rootCommand = Command_exports2.make(
|
|
|
19333
19333
|
).pipe(Command_exports2.withDescription("Runs and observes a camp of collaborating workers."));
|
|
19334
19334
|
|
|
19335
19335
|
// packages/cli/src/commands/doctorCommand.ts
|
|
19336
|
-
var runDoctorOnDemand = promise(() => import("./chunk-
|
|
19336
|
+
var runDoctorOnDemand = promise(() => import("./chunk-C7QHKE3K.js")).pipe(
|
|
19337
19337
|
flatMap3((doctor) => doctor.runDoctor)
|
|
19338
19338
|
);
|
|
19339
19339
|
var statusLabel = {
|
|
@@ -20062,7 +20062,7 @@ var stdioCommand = Command_exports2.make("stdio", { consumer: consumerOption3 },
|
|
|
20062
20062
|
);
|
|
20063
20063
|
var mcpCommand = Command_exports2.make("mcp", { consumer: consumerOption3 }, ({ consumer }) => {
|
|
20064
20064
|
const consumerId = getOrUndefined(consumer);
|
|
20065
|
-
return promise(() => import("./chunk-
|
|
20065
|
+
return promise(() => import("./chunk-5W5JRU33.js")).pipe(
|
|
20066
20066
|
flatMap3(
|
|
20067
20067
|
(adapter) => adapter.runCampMcpSession(
|
|
20068
20068
|
(argumentsList) => runCliCommand([process.execPath, "priiisk", ...argumentsList]),
|
|
@@ -20102,7 +20102,7 @@ var command = rootCommand.pipe(
|
|
|
20102
20102
|
);
|
|
20103
20103
|
var cli = Command_exports2.run(command, {
|
|
20104
20104
|
name: "priiisk camp control",
|
|
20105
|
-
version: "0.1.
|
|
20105
|
+
version: "0.1.22"
|
|
20106
20106
|
});
|
|
20107
20107
|
var quietDiagnostics = (json, effect2) => json ? consoleWith(
|
|
20108
20108
|
(console2) => withConsole({ ...console2, error: () => _void })(effect2)
|
|
@@ -289,7 +289,6 @@ var emptyCampUiComponent = {
|
|
|
289
289
|
// packages/host-ui/src/composition/campUiSlots.ts
|
|
290
290
|
var CampUiSlot = {
|
|
291
291
|
campHeader: "camp-header",
|
|
292
|
-
activity: "activity",
|
|
293
292
|
equipment: "equipment",
|
|
294
293
|
resources: "resources",
|
|
295
294
|
roster: "roster",
|
|
@@ -523,10 +522,10 @@ var findCampUiSpatialFocusTarget = (frame, currentSlotId, focusableSlotIds, dire
|
|
|
523
522
|
|
|
524
523
|
// packages/host-ui/src/layout/campUiLayoutPolicy.ts
|
|
525
524
|
var defaultCampUiLayoutPolicy = {
|
|
526
|
-
leftMinimumWidth:
|
|
527
|
-
rightMinimumWidth:
|
|
528
|
-
leftTrackWidthThreshold:
|
|
529
|
-
rightTrackWidthThreshold:
|
|
525
|
+
leftMinimumWidth: 34,
|
|
526
|
+
rightMinimumWidth: 34,
|
|
527
|
+
leftTrackWidthThreshold: 94,
|
|
528
|
+
rightTrackWidthThreshold: 130,
|
|
530
529
|
trackGapWidth: 1,
|
|
531
530
|
wideMinimumHeight: 18,
|
|
532
531
|
campHeaderHeight: 1,
|
|
@@ -665,7 +664,6 @@ var defaultCampUiLeftSectionSizes = {
|
|
|
665
664
|
workers: { kind: CampUiSectionSizeKind.grow, weight: 1, minimumRows: 1 }
|
|
666
665
|
};
|
|
667
666
|
var defaultCampUiRightSectionSizes = {
|
|
668
|
-
activity: { kind: CampUiSectionSizeKind.grow, weight: 1, minimumRows: 2 },
|
|
669
667
|
equipment: { kind: CampUiSectionSizeKind.fixed, rows: 7 }
|
|
670
668
|
};
|
|
671
669
|
|
|
@@ -685,15 +683,6 @@ var leftSectionHeights = (bodyHeight, slots) => {
|
|
|
685
683
|
size(CampUiSlot.roster, defaultCampUiLeftSectionSizes.workers)
|
|
686
684
|
]);
|
|
687
685
|
};
|
|
688
|
-
var rightSectionHeights = (bodyHeight, width, slots) => {
|
|
689
|
-
const minimumActivityRows = Math.min(units2(bodyHeight), 2);
|
|
690
|
-
const fallback = defaultCampUiRightSectionSizes.equipment.rows;
|
|
691
|
-
const preferred = units2(
|
|
692
|
-
slots?.get(CampUiSlot.equipment)?.preferredRows?.(units2(width)) ?? fallback
|
|
693
|
-
);
|
|
694
|
-
const equipmentHeight = fixedRows(Math.max(0, bodyHeight - minimumActivityRows), preferred);
|
|
695
|
-
return [Math.max(0, bodyHeight - equipmentHeight), equipmentHeight];
|
|
696
|
-
};
|
|
697
686
|
var composerHeight = (availableHeight, width, policy, slots) => {
|
|
698
687
|
const maximum = units2(policy.composerMaximumHeight);
|
|
699
688
|
const minimum = Math.min(maximum, units2(policy.composerMinimumHeight));
|
|
@@ -760,11 +749,6 @@ var makeWideFrame = (viewport, policy, slots) => {
|
|
|
760
749
|
]);
|
|
761
750
|
const centerX2 = leftWidth + leftGap;
|
|
762
751
|
const rightX = centerX2 + centerWidth + rightGap;
|
|
763
|
-
const [activityHeight = 0, equipmentHeight = 0] = rightSectionHeights(
|
|
764
|
-
bodyHeight,
|
|
765
|
-
rightWidth,
|
|
766
|
-
slots
|
|
767
|
-
);
|
|
768
752
|
const sessionHeaderHeight = fixedRows(bodyHeight, policy.sessionHeaderHeight);
|
|
769
753
|
const inputHeight = composerHeight(bodyHeight - sessionHeaderHeight, centerWidth, policy, slots);
|
|
770
754
|
const transcriptHeight = bodyHeight - sessionHeaderHeight - inputHeight;
|
|
@@ -790,13 +774,14 @@ var makeWideFrame = (viewport, policy, slots) => {
|
|
|
790
774
|
centerWidth,
|
|
791
775
|
inputHeight
|
|
792
776
|
),
|
|
793
|
-
region(CampUiSlot.
|
|
794
|
-
region(CampUiSlot.equipment, rightX, bodyY + activityHeight, rightWidth, equipmentHeight),
|
|
777
|
+
region(CampUiSlot.equipment, rightX, bodyY, rightWidth, bodyHeight),
|
|
795
778
|
/*
|
|
796
|
-
*
|
|
797
|
-
*
|
|
779
|
+
* The bottom line belongs to the conversation, not to the whole width: it
|
|
780
|
+
* sits under the input and answers about the work happening there. Under
|
|
781
|
+
* the side tracks there is nothing, so the eye is not dragged across the
|
|
782
|
+
* screen by a rule that spans everything.
|
|
798
783
|
*/
|
|
799
|
-
region(CampUiSlot.footer,
|
|
784
|
+
region(CampUiSlot.footer, centerX2, footerY, centerWidth, footerHeight)
|
|
800
785
|
])
|
|
801
786
|
};
|
|
802
787
|
};
|
|
@@ -1897,169 +1882,9 @@ var makeCampUiDetailComponent = (context, registry = defaultCampUiDetailBlockRen
|
|
|
1897
1882
|
};
|
|
1898
1883
|
};
|
|
1899
1884
|
|
|
1900
|
-
// packages/host-ui/src/pi/layout/campUiActivity.ts
|
|
1901
|
-
import { getSelectListTheme as getSelectListTheme9 } from "@earendil-works/pi-coding-agent";
|
|
1902
|
-
import { sliceByColumn, visibleWidth as visibleWidth3 } from "@earendil-works/pi-tui";
|
|
1903
|
-
var CampUiActivityAccess = {
|
|
1904
|
-
read: "read",
|
|
1905
|
-
edit: "edit",
|
|
1906
|
-
write: "write"
|
|
1907
|
-
};
|
|
1908
|
-
var accessByTool = /* @__PURE__ */ new Map([
|
|
1909
|
-
["read", CampUiActivityAccess.read],
|
|
1910
|
-
["edit", CampUiActivityAccess.edit],
|
|
1911
|
-
["write", CampUiActivityAccess.write]
|
|
1912
|
-
]);
|
|
1913
|
-
var accessRank = {
|
|
1914
|
-
read: 0,
|
|
1915
|
-
edit: 1,
|
|
1916
|
-
write: 2
|
|
1917
|
-
};
|
|
1918
|
-
var filePathArgument = (parameters) => {
|
|
1919
|
-
for (const name of ["path", "file_path"]) {
|
|
1920
|
-
const value = parameters[name];
|
|
1921
|
-
if (typeof value === "string" && value.trim() !== "") return value.trim();
|
|
1922
|
-
}
|
|
1923
|
-
return void 0;
|
|
1924
|
-
};
|
|
1925
|
-
var splitPath2 = (path) => {
|
|
1926
|
-
const separator = path.lastIndexOf("/");
|
|
1927
|
-
if (separator < 0) return { directory: ".", name: path };
|
|
1928
|
-
if (separator === 0) return { directory: "/", name: path.slice(1) || path };
|
|
1929
|
-
return { directory: path.slice(0, separator), name: path.slice(separator + 1) || path };
|
|
1930
|
-
};
|
|
1931
|
-
var collectCampUiActivityTree = (transcript) => {
|
|
1932
|
-
const directories = /* @__PURE__ */ new Map();
|
|
1933
|
-
const nodes = /* @__PURE__ */ new Map();
|
|
1934
|
-
for (const message of transcript) {
|
|
1935
|
-
for (const content of message.content) {
|
|
1936
|
-
if (content.kind !== "tool-call") continue;
|
|
1937
|
-
const access = accessByTool.get(content.toolName);
|
|
1938
|
-
if (access === void 0) continue;
|
|
1939
|
-
const path = filePathArgument(content.arguments);
|
|
1940
|
-
if (path === void 0) continue;
|
|
1941
|
-
const existing = nodes.get(path);
|
|
1942
|
-
if (existing !== void 0) {
|
|
1943
|
-
existing.count += 1;
|
|
1944
|
-
if (accessRank[access] > accessRank[existing.access]) existing.access = access;
|
|
1945
|
-
continue;
|
|
1946
|
-
}
|
|
1947
|
-
const { directory, name } = splitPath2(path);
|
|
1948
|
-
const node = { path, directory, name, access, count: 1 };
|
|
1949
|
-
nodes.set(path, node);
|
|
1950
|
-
const group = directories.get(directory) ?? { path: directory, nodes: [] };
|
|
1951
|
-
if (!directories.has(directory)) directories.set(directory, group);
|
|
1952
|
-
group.nodes.push(node);
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
return [...directories.values()].map((directory) => ({
|
|
1956
|
-
path: directory.path,
|
|
1957
|
-
nodes: directory.nodes.map((node) => ({ ...node }))
|
|
1958
|
-
}));
|
|
1959
|
-
};
|
|
1960
|
-
var CAMP_UI_ACTIVITY_MAX_VISIBLE_PATHS = 12;
|
|
1961
|
-
var ACTIVITY_COLUMNS_PER_VISIBLE_PATH = 4;
|
|
1962
|
-
var flattenedNodes = (tree) => tree.flatMap((directory) => directory.nodes);
|
|
1963
|
-
var renderedRowCount = (tree, selected, hidden) => {
|
|
1964
|
-
const directories = tree.filter(
|
|
1965
|
-
(directory) => directory.nodes.some((node) => selected.has(node))
|
|
1966
|
-
).length;
|
|
1967
|
-
return selected.size + directories + (hidden > 0 ? 1 : 0);
|
|
1968
|
-
};
|
|
1969
|
-
var selectVisibleNodes2 = (tree, width, height) => {
|
|
1970
|
-
const nodes = flattenedNodes(tree);
|
|
1971
|
-
const selected = /* @__PURE__ */ new Set();
|
|
1972
|
-
const widthBudget = Math.max(
|
|
1973
|
-
1,
|
|
1974
|
-
Math.floor(Math.max(0, width) / ACTIVITY_COLUMNS_PER_VISIBLE_PATH)
|
|
1975
|
-
);
|
|
1976
|
-
const nodeBudget = Math.min(CAMP_UI_ACTIVITY_MAX_VISIBLE_PATHS, widthBudget);
|
|
1977
|
-
const mutations = nodes.filter((node) => node.access !== CampUiActivityAccess.read);
|
|
1978
|
-
const reads = nodes.filter((node) => node.access === CampUiActivityAccess.read);
|
|
1979
|
-
const addVisible = (node) => {
|
|
1980
|
-
if (selected.size >= nodeBudget) return;
|
|
1981
|
-
const candidate = new Set(selected).add(node);
|
|
1982
|
-
const hidden = nodes.length - candidate.size;
|
|
1983
|
-
if (renderedRowCount(tree, candidate, hidden) <= Math.max(0, height)) selected.add(node);
|
|
1984
|
-
};
|
|
1985
|
-
for (const node of mutations) addVisible(node);
|
|
1986
|
-
if (mutations.some((node) => !selected.has(node))) return selected;
|
|
1987
|
-
for (const node of reads) addVisible(node);
|
|
1988
|
-
return selected;
|
|
1989
|
-
};
|
|
1990
|
-
var shortenTail = (value, width) => {
|
|
1991
|
-
const available = Math.max(0, Math.floor(width));
|
|
1992
|
-
const valueWidth = visibleWidth3(value);
|
|
1993
|
-
if (valueWidth <= available) return value;
|
|
1994
|
-
if (available <= 0) return "";
|
|
1995
|
-
if (available === 1) return "\u2026";
|
|
1996
|
-
return `\u2026${sliceByColumn(value, valueWidth - available + 1, available - 1, true)}`;
|
|
1997
|
-
};
|
|
1998
|
-
var accessPresentation = {
|
|
1999
|
-
read: { label: "read", glyph: "r", tone: CampUiTone.neutral },
|
|
2000
|
-
edit: { label: "edited", glyph: "~", tone: CampUiTone.attention },
|
|
2001
|
-
write: { label: "created", glyph: "+", tone: CampUiTone.success }
|
|
2002
|
-
};
|
|
2003
|
-
var nodeLine2 = (node, last, width) => {
|
|
2004
|
-
const theme = getSelectListTheme9();
|
|
2005
|
-
const presentation = accessPresentation[node.access];
|
|
2006
|
-
const count = node.count > 1 ? ` \xD7${String(node.count)}` : "";
|
|
2007
|
-
const suffix = ` \xB7 ${presentation.label}${count}`;
|
|
2008
|
-
const branch = last ? "\u2514\u2500" : "\u251C\u2500";
|
|
2009
|
-
const nameWidth = Math.max(1, width - visibleWidth3(`${branch} ${presentation.glyph} ${suffix}`));
|
|
2010
|
-
const name = shortenTail(node.name, nameWidth);
|
|
2011
|
-
return fitCampUiLine(
|
|
2012
|
-
`${theme.description(branch)} ${renderCampUiStatus(name, presentation.tone, presentation.glyph)}${theme.description(suffix)}`,
|
|
2013
|
-
width
|
|
2014
|
-
);
|
|
2015
|
-
};
|
|
2016
|
-
var hiddenSummary = (nodes) => {
|
|
2017
|
-
const parts = Object.values(CampUiActivityAccess).flatMap((access) => {
|
|
2018
|
-
const count = nodes.filter((node) => node.access === access).length;
|
|
2019
|
-
if (count === 0) return [];
|
|
2020
|
-
const label = accessPresentation[access].label;
|
|
2021
|
-
return [`${String(count)} ${label} ${count === 1 ? "path" : "paths"}`];
|
|
2022
|
-
});
|
|
2023
|
-
return `... ${parts.join(" \xB7 ")} hidden`;
|
|
2024
|
-
};
|
|
2025
|
-
var renderCampUiActivityTree = (transcript, width, height) => {
|
|
2026
|
-
const theme = getSelectListTheme9();
|
|
2027
|
-
const tree = collectCampUiActivityTree(transcript);
|
|
2028
|
-
const nodes = flattenedNodes(tree);
|
|
2029
|
-
if (height <= 0) return [];
|
|
2030
|
-
if (nodes.length === 0) return [fitCampUiLine(theme.description("no file activity"), width)];
|
|
2031
|
-
const selected = selectVisibleNodes2(tree, width, height);
|
|
2032
|
-
const lines = [];
|
|
2033
|
-
for (const directory of tree) {
|
|
2034
|
-
const visible = directory.nodes.filter((node) => selected.has(node));
|
|
2035
|
-
if (visible.length === 0) continue;
|
|
2036
|
-
lines.push(fitCampUiLine(theme.description(shortenTail(directory.path, width)), width));
|
|
2037
|
-
visible.forEach((node, index) => {
|
|
2038
|
-
lines.push(nodeLine2(node, index === visible.length - 1, width));
|
|
2039
|
-
});
|
|
2040
|
-
}
|
|
2041
|
-
const hidden = nodes.filter((node) => !selected.has(node));
|
|
2042
|
-
if (hidden.length > 0) {
|
|
2043
|
-
lines.push(fitCampUiLine(theme.description(hiddenSummary(hidden)), width));
|
|
2044
|
-
}
|
|
2045
|
-
return lines;
|
|
2046
|
-
};
|
|
2047
|
-
var makeCampUiActivity = (context) => ({
|
|
2048
|
-
render: (viewport) => {
|
|
2049
|
-
const model = context.readModel();
|
|
2050
|
-
const workerId = model.state.selectedWorkerId;
|
|
2051
|
-
const worker = workerId === void 0 ? void 0 : findCampUiWorker(model.snapshot, workerId);
|
|
2052
|
-
return renderCampUiActivityTree(
|
|
2053
|
-
worker?.snapshot.session?.transcript ?? [],
|
|
2054
|
-
viewport.width,
|
|
2055
|
-
viewport.height
|
|
2056
|
-
);
|
|
2057
|
-
}
|
|
2058
|
-
});
|
|
2059
|
-
|
|
2060
1885
|
// packages/host-ui/src/pi/layout/campUiChrome.ts
|
|
2061
|
-
import { getSelectListTheme as
|
|
2062
|
-
import { truncateToWidth as truncateToWidth4, visibleWidth as
|
|
1886
|
+
import { getSelectListTheme as getSelectListTheme9 } from "@earendil-works/pi-coding-agent";
|
|
1887
|
+
import { truncateToWidth as truncateToWidth4, visibleWidth as visibleWidth3 } from "@earendil-works/pi-tui";
|
|
2063
1888
|
|
|
2064
1889
|
// packages/host-ui/src/pi/shared/campUiPulse.ts
|
|
2065
1890
|
var BRAILLE_BASE = 10240;
|
|
@@ -2151,7 +1976,7 @@ var campUiLevelMarkerText = (level, color) => level === CampUiLevel.resting ? le
|
|
|
2151
1976
|
var makeCampUiCampHeader = (context) => ({
|
|
2152
1977
|
render: (viewport) => {
|
|
2153
1978
|
const snapshot = context.readModel().snapshot;
|
|
2154
|
-
const theme =
|
|
1979
|
+
const theme = getSelectListTheme9();
|
|
2155
1980
|
const mode = snapshot.placement === "external" ? "agentless" : "foreman";
|
|
2156
1981
|
return [
|
|
2157
1982
|
fitCampUiLine(theme.description(snapshot.displayName), viewport.width),
|
|
@@ -2172,7 +1997,7 @@ var rosterWidths = (width) => {
|
|
|
2172
1997
|
};
|
|
2173
1998
|
var rightColumn = (text, width) => {
|
|
2174
1999
|
const fitted = truncateToWidth4(text, width);
|
|
2175
|
-
return `${" ".repeat(Math.max(0, width -
|
|
2000
|
+
return `${" ".repeat(Math.max(0, width - visibleWidth3(fitted)))}${fitted}`;
|
|
2176
2001
|
};
|
|
2177
2002
|
var pulseSamples = (timestamps, sampleCount, now) => {
|
|
2178
2003
|
if (sampleCount <= 0) return [];
|
|
@@ -2202,13 +2027,13 @@ var usageText = (entry, width) => {
|
|
|
2202
2027
|
const cache = usage?.latestCacheHitRate === void 0 ? usage === void 0 || usage.tokens.total === 0 ? "n/a" : "n/r" : percentText(usage.latestCacheHitRate);
|
|
2203
2028
|
const cost = usage === void 0 ? "\u2014" : `$${usage.cost.toFixed(3)}`;
|
|
2204
2029
|
const full = `${context} ${cache} ${cost}`;
|
|
2205
|
-
if (
|
|
2030
|
+
if (visibleWidth3(full) <= width || usage === void 0) return full;
|
|
2206
2031
|
const compactCost = `$${usage.cost.toFixed(2).replace(/^0/u, "")}`;
|
|
2207
2032
|
return `${context}${cache}${compactCost}`;
|
|
2208
2033
|
};
|
|
2209
2034
|
var stateText = (state, duration, width) => {
|
|
2210
2035
|
const full = `${state} ${duration}`;
|
|
2211
|
-
return
|
|
2036
|
+
return visibleWidth3(full) <= width ? full : state;
|
|
2212
2037
|
};
|
|
2213
2038
|
var modelText = (entry) => {
|
|
2214
2039
|
const model = entry.snapshot.session?.usage?.model ?? entry.snapshot.worker.equipment.model;
|
|
@@ -2289,7 +2114,7 @@ var makeCampUiRoster = (context) => ({
|
|
|
2289
2114
|
const model = context.readModel();
|
|
2290
2115
|
const external = model.snapshot.placement === CampUiPlacement.external;
|
|
2291
2116
|
if (model.snapshot.workers.length === 0 && !external) {
|
|
2292
|
-
return [
|
|
2117
|
+
return [getSelectListTheme9().description("No workers")];
|
|
2293
2118
|
}
|
|
2294
2119
|
const controller = external ? renderExternalControllerCard(model.snapshot.controllerConnected, viewport.width) : [];
|
|
2295
2120
|
const workers = model.snapshot.workers.flatMap((entry) => {
|
|
@@ -2324,7 +2149,7 @@ var makeCampUiRoster = (context) => ({
|
|
|
2324
2149
|
var makeCampUiSessionHeader = (context) => ({
|
|
2325
2150
|
render: (viewport) => {
|
|
2326
2151
|
const model = context.readModel();
|
|
2327
|
-
const theme =
|
|
2152
|
+
const theme = getSelectListTheme9();
|
|
2328
2153
|
const workerId = model.state.selectedWorkerId;
|
|
2329
2154
|
if (workerId === void 0) {
|
|
2330
2155
|
return [fitCampUiLine(theme.description("Select a worker"), viewport.width)];
|
|
@@ -2346,11 +2171,11 @@ var makeCampUiSessionHeader = (context) => ({
|
|
|
2346
2171
|
});
|
|
2347
2172
|
|
|
2348
2173
|
// packages/host-ui/src/pi/layout/campUiEquipment.ts
|
|
2349
|
-
import { getSelectListTheme as
|
|
2174
|
+
import { getSelectListTheme as getSelectListTheme10 } from "@earendil-works/pi-coding-agent";
|
|
2350
2175
|
import { wrapTextWithAnsi } from "@earendil-works/pi-tui";
|
|
2351
2176
|
var fullEquipmentLines = (equipment, revision, width) => {
|
|
2352
2177
|
if (width <= 0) return [];
|
|
2353
|
-
const theme =
|
|
2178
|
+
const theme = getSelectListTheme10();
|
|
2354
2179
|
return equipmentDescriptionLines(equipment, revision).flatMap(
|
|
2355
2180
|
(line) => wrapTextWithAnsi(theme.description(line), width).map(
|
|
2356
2181
|
(wrapped) => fitCampUiLine(wrapped, width)
|
|
@@ -2364,7 +2189,7 @@ var renderCampUiEquipment = (equipment, revision, width, height) => {
|
|
|
2364
2189
|
if (lines.length <= available) return lines;
|
|
2365
2190
|
const shown = lines.slice(0, Math.max(0, available - 1));
|
|
2366
2191
|
const hidden = lines.length - shown.length;
|
|
2367
|
-
const summary =
|
|
2192
|
+
const summary = getSelectListTheme10().description(
|
|
2368
2193
|
`... ${String(hidden)} equipment ${hidden === 1 ? "line" : "lines"} hidden`
|
|
2369
2194
|
);
|
|
2370
2195
|
return [...shown, fitCampUiLine(summary, width)];
|
|
@@ -2377,7 +2202,7 @@ var makeCampUiEquipment = (context) => {
|
|
|
2377
2202
|
};
|
|
2378
2203
|
const fullLines = (width) => {
|
|
2379
2204
|
const worker = selectedWorker();
|
|
2380
|
-
return worker === void 0 ? [fitCampUiLine(
|
|
2205
|
+
return worker === void 0 ? [fitCampUiLine(getSelectListTheme10().description("no worker selected"), width)] : fullEquipmentLines(
|
|
2381
2206
|
worker.snapshot.worker.equipment,
|
|
2382
2207
|
worker.snapshot.worker.equipmentVersion,
|
|
2383
2208
|
width
|
|
@@ -2399,8 +2224,8 @@ var makeCampUiEquipment = (context) => {
|
|
|
2399
2224
|
};
|
|
2400
2225
|
|
|
2401
2226
|
// packages/host-ui/src/pi/layout/campUiFooter.ts
|
|
2402
|
-
import { getMarkdownTheme as getMarkdownTheme7, getSelectListTheme as
|
|
2403
|
-
import { sliceByColumn
|
|
2227
|
+
import { getMarkdownTheme as getMarkdownTheme7, getSelectListTheme as getSelectListTheme11 } from "@earendil-works/pi-coding-agent";
|
|
2228
|
+
import { sliceByColumn, visibleWidth as visibleWidth4 } from "@earendil-works/pi-tui";
|
|
2404
2229
|
var footerDivider = (width) => fitCampUiLine(getMarkdownTheme7().codeBlockBorder("\u2500".repeat(width)), width);
|
|
2405
2230
|
var retryText = (retryAt, attempt, now) => {
|
|
2406
2231
|
if (retryAt === void 0) return attempt === void 0 ? "" : `attempt ${String(attempt)}`;
|
|
@@ -2429,15 +2254,15 @@ var isPendingAsk = (ask) => ask.state === "pending";
|
|
|
2429
2254
|
var shortenPath = (value, width) => {
|
|
2430
2255
|
const available = Math.max(0, Math.floor(width));
|
|
2431
2256
|
if (available <= 0) return "";
|
|
2432
|
-
if (
|
|
2257
|
+
if (visibleWidth4(value) <= available) return value;
|
|
2433
2258
|
if (available === 1) return "\u2026";
|
|
2434
2259
|
const kept = available - 1;
|
|
2435
|
-
return `\u2026${
|
|
2260
|
+
return `\u2026${sliceByColumn(value, visibleWidth4(value) - kept, kept, true)}`;
|
|
2436
2261
|
};
|
|
2437
2262
|
var makeCampUiFooter = (context) => ({
|
|
2438
2263
|
render: (viewport) => {
|
|
2439
2264
|
const model = context.readModel();
|
|
2440
|
-
const theme =
|
|
2265
|
+
const theme = getSelectListTheme11();
|
|
2441
2266
|
const snapshot = model.snapshot;
|
|
2442
2267
|
const health = snapshot.health;
|
|
2443
2268
|
const actionError = diagnosticText(model.state.lastActionError);
|
|
@@ -2456,16 +2281,16 @@ var makeCampUiFooter = (context) => ({
|
|
|
2456
2281
|
];
|
|
2457
2282
|
const MINIMUM_PATH_COLUMNS = 8;
|
|
2458
2283
|
const chosen = candidates.find((candidate) => {
|
|
2459
|
-
const rightWidth =
|
|
2460
|
-
const room = viewport.width - rightWidth - 3 -
|
|
2284
|
+
const rightWidth = visibleWidth4(candidate.right.filter((part) => part !== "").join(" \xB7 "));
|
|
2285
|
+
const room = viewport.width - rightWidth - 3 - visibleWidth4(candidate.branch);
|
|
2461
2286
|
return room >= MINIMUM_PATH_COLUMNS;
|
|
2462
2287
|
}) ?? candidates[candidates.length - 1];
|
|
2463
2288
|
const right = (chosen ?? candidates[0])?.right.filter((part) => part !== "").join(" \xB7 ") ?? "";
|
|
2464
2289
|
const chosenBranch = chosen?.branch ?? "";
|
|
2465
|
-
const leftBudget = Math.max(0, viewport.width -
|
|
2290
|
+
const leftBudget = Math.max(0, viewport.width - visibleWidth4(right) - 3);
|
|
2466
2291
|
const path = shortenPath(
|
|
2467
2292
|
snapshot.projectScope,
|
|
2468
|
-
Math.max(0, leftBudget -
|
|
2293
|
+
Math.max(0, leftBudget - visibleWidth4(chosenBranch))
|
|
2469
2294
|
);
|
|
2470
2295
|
const left = diagnostic === "" ? theme.description(`${path}${chosenBranch}`) : `${diagnostic} ${theme.description(`\xB7 ${path}${chosenBranch}`)}`;
|
|
2471
2296
|
return [
|
|
@@ -2476,9 +2301,9 @@ var makeCampUiFooter = (context) => ({
|
|
|
2476
2301
|
});
|
|
2477
2302
|
|
|
2478
2303
|
// packages/host-ui/src/pi/layout/campUiResources.ts
|
|
2479
|
-
import { getSelectListTheme as
|
|
2304
|
+
import { getSelectListTheme as getSelectListTheme12 } from "@earendil-works/pi-coding-agent";
|
|
2480
2305
|
var renderResourceTree = (label, value, tone, width) => {
|
|
2481
|
-
const theme =
|
|
2306
|
+
const theme = getSelectListTheme12();
|
|
2482
2307
|
const lines = [
|
|
2483
2308
|
theme.description(label),
|
|
2484
2309
|
`${theme.description("\u2514\u2500")} ${renderCampUiStatus(value, tone)}`
|
|
@@ -2553,11 +2378,6 @@ var makeDefaultCampUiContributions = (tui, detailBlocks) => [
|
|
|
2553
2378
|
slotId: CampUiSlot.campHeader,
|
|
2554
2379
|
mount: (context) => succeed2(makeCampUiCampHeader(context))
|
|
2555
2380
|
},
|
|
2556
|
-
{
|
|
2557
|
-
id: "default-activity",
|
|
2558
|
-
slotId: CampUiSlot.activity,
|
|
2559
|
-
mount: (context) => succeed2(makeCampUiActivity(context))
|
|
2560
|
-
},
|
|
2561
2381
|
{
|
|
2562
2382
|
id: "default-equipment",
|
|
2563
2383
|
slotId: CampUiSlot.equipment,
|
|
@@ -2596,17 +2416,17 @@ var makeDefaultCampUiContributions = (tui, detailBlocks) => [
|
|
|
2596
2416
|
];
|
|
2597
2417
|
|
|
2598
2418
|
// packages/host-ui/src/pi/layout/campUiSection.ts
|
|
2599
|
-
import { getMarkdownTheme as getMarkdownTheme8, getSelectListTheme as
|
|
2600
|
-
import { visibleWidth as
|
|
2419
|
+
import { getMarkdownTheme as getMarkdownTheme8, getSelectListTheme as getSelectListTheme13 } from "@earendil-works/pi-coding-agent";
|
|
2420
|
+
import { visibleWidth as visibleWidth5 } from "@earendil-works/pi-tui";
|
|
2601
2421
|
var renderHeader = (header, width) => {
|
|
2602
2422
|
const theme = getMarkdownTheme8();
|
|
2603
|
-
const selectTheme =
|
|
2423
|
+
const selectTheme = getSelectListTheme13();
|
|
2604
2424
|
const rule2 = header.focused === true ? selectTheme.selectedPrefix : theme.codeBlockBorder;
|
|
2605
2425
|
const title = header.focused === true ? selectTheme.selectedText : theme.heading;
|
|
2606
2426
|
const ruleCharacter = header.focused === true ? "\u2501" : "\u2500";
|
|
2607
2427
|
const detail = header.detail === void 0 ? "" : ` ${selectTheme.description(header.detail)}`;
|
|
2608
2428
|
const label = `${rule2(ruleCharacter.repeat(2))} ${title(header.title)}${detail} `;
|
|
2609
|
-
const ruleWidth = Math.max(0, width -
|
|
2429
|
+
const ruleWidth = Math.max(0, width - visibleWidth5(label));
|
|
2610
2430
|
return fitCampUiLine(`${label}${rule2(ruleCharacter.repeat(ruleWidth))}`, width);
|
|
2611
2431
|
};
|
|
2612
2432
|
var makeCampUiSection = (options) => {
|
|
@@ -2631,14 +2451,22 @@ var makeCampUiSection = (options) => {
|
|
|
2631
2451
|
options.children.map((child) => child.size)
|
|
2632
2452
|
)
|
|
2633
2453
|
];
|
|
2454
|
+
const body = options.children.flatMap((child, index) => {
|
|
2455
|
+
const height = childHeights[index] ?? 0;
|
|
2456
|
+
const lines = child.component.render({ width: viewport.width, height }).slice(0, height);
|
|
2457
|
+
return options.centerContent === true ? lines : [...lines, ...Array.from({ length: height - lines.length }, () => "")];
|
|
2458
|
+
});
|
|
2459
|
+
if (options.centerContent !== true) {
|
|
2460
|
+
return [renderHeader(options.header(), viewport.width), ...body];
|
|
2461
|
+
}
|
|
2462
|
+
const available = Math.max(0, viewport.height - 1);
|
|
2463
|
+
const padding = Math.max(0, Math.floor((available - body.length) / 2));
|
|
2634
2464
|
return [
|
|
2635
2465
|
renderHeader(options.header(), viewport.width),
|
|
2636
|
-
...
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
})
|
|
2641
|
-
];
|
|
2466
|
+
...Array.from({ length: padding }, () => ""),
|
|
2467
|
+
...body,
|
|
2468
|
+
...Array.from({ length: Math.max(0, available - padding - body.length) }, () => "")
|
|
2469
|
+
].slice(0, viewport.height);
|
|
2642
2470
|
},
|
|
2643
2471
|
...inputComponents ? {
|
|
2644
2472
|
handleInput: (input) => [...components].reverse().some((component) => component.handleInput?.(input) === true)
|
|
@@ -2688,24 +2516,12 @@ var decorateDefaultCampUiSections = (context, slots) => {
|
|
|
2688
2516
|
]
|
|
2689
2517
|
})
|
|
2690
2518
|
);
|
|
2691
|
-
decorated.set(
|
|
2692
|
-
CampUiSlot.activity,
|
|
2693
|
-
makeCampUiSection({
|
|
2694
|
-
header: () => ({ title: "Activity" }),
|
|
2695
|
-
size: defaultCampUiRightSectionSizes.activity,
|
|
2696
|
-
children: [
|
|
2697
|
-
{
|
|
2698
|
-
component: component(CampUiSlot.activity),
|
|
2699
|
-
size: { kind: CampUiSectionSizeKind.grow, weight: 1 }
|
|
2700
|
-
}
|
|
2701
|
-
]
|
|
2702
|
-
})
|
|
2703
|
-
);
|
|
2704
2519
|
const equipment = component(CampUiSlot.equipment);
|
|
2705
2520
|
decorated.set(
|
|
2706
2521
|
CampUiSlot.equipment,
|
|
2707
2522
|
makeCampUiSection({
|
|
2708
2523
|
header: () => ({ title: "Equipment" }),
|
|
2524
|
+
centerContent: true,
|
|
2709
2525
|
size: defaultCampUiRightSectionSizes.equipment,
|
|
2710
2526
|
children: [
|
|
2711
2527
|
{
|
|
@@ -2724,6 +2540,7 @@ var decorateDefaultCampUiSections = (context, slots) => {
|
|
|
2724
2540
|
detail: String(context.readModel().snapshot.workers.length),
|
|
2725
2541
|
focused: context.readModel().state.focusedSlotId === CampUiSlot.roster
|
|
2726
2542
|
}),
|
|
2543
|
+
centerContent: true,
|
|
2727
2544
|
size: defaultCampUiLeftSectionSizes.workers,
|
|
2728
2545
|
children: [
|
|
2729
2546
|
{
|
|
@@ -3300,7 +3117,7 @@ var mountPiCampUi = (options) => gen(function* () {
|
|
|
3300
3117
|
});
|
|
3301
3118
|
|
|
3302
3119
|
// packages/host-ui/src/pi/run-selector/campRunSelector.ts
|
|
3303
|
-
import { getMarkdownTheme as getMarkdownTheme10, getSelectListTheme as
|
|
3120
|
+
import { getMarkdownTheme as getMarkdownTheme10, getSelectListTheme as getSelectListTheme14, initTheme as initTheme2 } from "@earendil-works/pi-coding-agent";
|
|
3304
3121
|
import {
|
|
3305
3122
|
Key as Key4,
|
|
3306
3123
|
matchesKey as matchesKey4,
|
|
@@ -3323,7 +3140,7 @@ var PiCampRunSelectorRoot = class {
|
|
|
3323
3140
|
const height = Math.max(0, this.getHeight());
|
|
3324
3141
|
const viewportWidth = Math.max(0, width - 1);
|
|
3325
3142
|
const markdown = getMarkdownTheme10();
|
|
3326
|
-
const selection =
|
|
3143
|
+
const selection = getSelectListTheme14();
|
|
3327
3144
|
const header = `${markdown.codeBlockBorder("\u2500\u2500")} ${markdown.heading("Resume camp")} ${markdown.codeBlockBorder("\u2500".repeat(Math.max(0, viewportWidth - 16)))}`;
|
|
3328
3145
|
const available = Math.max(0, height - 2);
|
|
3329
3146
|
const capacity = Math.max(1, Math.floor(available / 2));
|
|
@@ -3401,7 +3218,6 @@ var selectCampRun = (options) => scoped(
|
|
|
3401
3218
|
// packages/host-ui/src/index.ts
|
|
3402
3219
|
var PACKAGE = "@priiisk/host-ui";
|
|
3403
3220
|
export {
|
|
3404
|
-
CAMP_UI_ACTIVITY_MAX_VISIBLE_PATHS,
|
|
3405
3221
|
CAMP_UI_BASH_PREVIEW_LINES,
|
|
3406
3222
|
CAMP_UI_DEFAULT_TOOL_PREVIEW_LINES,
|
|
3407
3223
|
CAMP_UI_EXPLORED_COLLAPSED_PATHS,
|
|
@@ -3409,7 +3225,6 @@ export {
|
|
|
3409
3225
|
CAMP_UI_REDUCED_MOTION_ENV,
|
|
3410
3226
|
CAMP_UI_SUBSCRIPTION_BASE_DELAY_MS,
|
|
3411
3227
|
CAMP_UI_SUBSCRIPTION_MAX_RETRIES,
|
|
3412
|
-
CampUiActivityAccess,
|
|
3413
3228
|
CampUiAssistantMessage,
|
|
3414
3229
|
CampUiBackend,
|
|
3415
3230
|
CampUiBackendError,
|
|
@@ -3450,7 +3265,6 @@ export {
|
|
|
3450
3265
|
campUiToolResultCacheSize,
|
|
3451
3266
|
campUiTranscriptBlockRenderer,
|
|
3452
3267
|
campUiWorkerStateLabel,
|
|
3453
|
-
collectCampUiActivityTree,
|
|
3454
3268
|
compactNumber,
|
|
3455
3269
|
composeCampUiDetailBlocks,
|
|
3456
3270
|
composeCampUiSlots,
|
|
@@ -3471,7 +3285,6 @@ export {
|
|
|
3471
3285
|
isCampUiPendingAsk,
|
|
3472
3286
|
joinCampUiColumns,
|
|
3473
3287
|
jsonText,
|
|
3474
|
-
makeCampUiActivity,
|
|
3475
3288
|
makeCampUiComponentGroup,
|
|
3476
3289
|
makeCampUiComposerComponent,
|
|
3477
3290
|
makeCampUiDetailComponent,
|
|
@@ -3488,7 +3301,6 @@ export {
|
|
|
3488
3301
|
makeInitialCampUiState,
|
|
3489
3302
|
mountPiCampUi,
|
|
3490
3303
|
nextCampUiPendingAskTarget,
|
|
3491
|
-
renderCampUiActivityTree,
|
|
3492
3304
|
renderCampUiDetailBlockLayout,
|
|
3493
3305
|
renderCampUiDetailBlocks,
|
|
3494
3306
|
renderCampUiDirectedBlock,
|
|
@@ -2,7 +2,7 @@ import { createRequire as __priiiskCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __priiiskCreateRequire(import.meta.url);
|
|
3
3
|
|
|
4
4
|
// packages/cli/src/domain/cliVersion.ts
|
|
5
|
-
var PRIIISK_CLI_VERSION = "0.1.
|
|
5
|
+
var PRIIISK_CLI_VERSION = "0.1.22";
|
|
6
6
|
|
|
7
7
|
export {
|
|
8
8
|
PRIIISK_CLI_VERSION
|
package/dist/priiisk-host.js
CHANGED
|
@@ -82153,7 +82153,7 @@ var HOST_BOOTSTRAP_ENVIRONMENT_NAMES = [
|
|
|
82153
82153
|
];
|
|
82154
82154
|
|
|
82155
82155
|
// packages/camp-state/src/bootstrap/campHostVersion.ts
|
|
82156
|
-
var PRIIISK_HOST_VERSION = "0.1.
|
|
82156
|
+
var PRIIISK_HOST_VERSION = "0.1.22";
|
|
82157
82157
|
|
|
82158
82158
|
// packages/camp-state/src/bootstrap/campLaunch.ts
|
|
82159
82159
|
var CampBootstrapError = class extends TaggedError("CampBootstrapError") {
|
|
@@ -98092,7 +98092,7 @@ var Client = class extends Protocol2 {
|
|
|
98092
98092
|
};
|
|
98093
98093
|
|
|
98094
98094
|
// packages/mcp-backend/src/connections/clientIdentity.ts
|
|
98095
|
-
var backendVersion = "0.1.
|
|
98095
|
+
var backendVersion = "0.1.22";
|
|
98096
98096
|
|
|
98097
98097
|
// packages/mcp-backend/src/connections/mcpFailure.ts
|
|
98098
98098
|
var McpFailure = class extends TaggedError("McpFailure") {
|
|
@@ -102840,7 +102840,6 @@ var emptyCampUiComponent = {
|
|
|
102840
102840
|
// packages/host-ui/src/composition/campUiSlots.ts
|
|
102841
102841
|
var CampUiSlot = {
|
|
102842
102842
|
campHeader: "camp-header",
|
|
102843
|
-
activity: "activity",
|
|
102844
102843
|
equipment: "equipment",
|
|
102845
102844
|
resources: "resources",
|
|
102846
102845
|
roster: "roster",
|
|
@@ -103073,10 +103072,10 @@ var findCampUiSpatialFocusTarget = (frame, currentSlotId, focusableSlotIds, dire
|
|
|
103073
103072
|
|
|
103074
103073
|
// packages/host-ui/src/layout/campUiLayoutPolicy.ts
|
|
103075
103074
|
var defaultCampUiLayoutPolicy = {
|
|
103076
|
-
leftMinimumWidth:
|
|
103077
|
-
rightMinimumWidth:
|
|
103078
|
-
leftTrackWidthThreshold:
|
|
103079
|
-
rightTrackWidthThreshold:
|
|
103075
|
+
leftMinimumWidth: 34,
|
|
103076
|
+
rightMinimumWidth: 34,
|
|
103077
|
+
leftTrackWidthThreshold: 94,
|
|
103078
|
+
rightTrackWidthThreshold: 130,
|
|
103080
103079
|
trackGapWidth: 1,
|
|
103081
103080
|
wideMinimumHeight: 18,
|
|
103082
103081
|
campHeaderHeight: 1,
|
|
@@ -103215,7 +103214,6 @@ var defaultCampUiLeftSectionSizes = {
|
|
|
103215
103214
|
workers: { kind: CampUiSectionSizeKind.grow, weight: 1, minimumRows: 1 }
|
|
103216
103215
|
};
|
|
103217
103216
|
var defaultCampUiRightSectionSizes = {
|
|
103218
|
-
activity: { kind: CampUiSectionSizeKind.grow, weight: 1, minimumRows: 2 },
|
|
103219
103217
|
equipment: { kind: CampUiSectionSizeKind.fixed, rows: 7 }
|
|
103220
103218
|
};
|
|
103221
103219
|
|
|
@@ -103235,15 +103233,6 @@ var leftSectionHeights = (bodyHeight, slots) => {
|
|
|
103235
103233
|
size14(CampUiSlot.roster, defaultCampUiLeftSectionSizes.workers)
|
|
103236
103234
|
]);
|
|
103237
103235
|
};
|
|
103238
|
-
var rightSectionHeights = (bodyHeight, width, slots) => {
|
|
103239
|
-
const minimumActivityRows = Math.min(units2(bodyHeight), 2);
|
|
103240
|
-
const fallback = defaultCampUiRightSectionSizes.equipment.rows;
|
|
103241
|
-
const preferred = units2(
|
|
103242
|
-
slots?.get(CampUiSlot.equipment)?.preferredRows?.(units2(width)) ?? fallback
|
|
103243
|
-
);
|
|
103244
|
-
const equipmentHeight = fixedRows(Math.max(0, bodyHeight - minimumActivityRows), preferred);
|
|
103245
|
-
return [Math.max(0, bodyHeight - equipmentHeight), equipmentHeight];
|
|
103246
|
-
};
|
|
103247
103236
|
var composerHeight = (availableHeight, width, policy, slots) => {
|
|
103248
103237
|
const maximum = units2(policy.composerMaximumHeight);
|
|
103249
103238
|
const minimum = Math.min(maximum, units2(policy.composerMinimumHeight));
|
|
@@ -103310,11 +103299,6 @@ var makeWideFrame = (viewport, policy, slots) => {
|
|
|
103310
103299
|
]);
|
|
103311
103300
|
const centerX2 = leftWidth + leftGap;
|
|
103312
103301
|
const rightX = centerX2 + centerWidth + rightGap;
|
|
103313
|
-
const [activityHeight = 0, equipmentHeight = 0] = rightSectionHeights(
|
|
103314
|
-
bodyHeight,
|
|
103315
|
-
rightWidth,
|
|
103316
|
-
slots
|
|
103317
|
-
);
|
|
103318
103302
|
const sessionHeaderHeight = fixedRows(bodyHeight, policy.sessionHeaderHeight);
|
|
103319
103303
|
const inputHeight = composerHeight(bodyHeight - sessionHeaderHeight, centerWidth, policy, slots);
|
|
103320
103304
|
const transcriptHeight = bodyHeight - sessionHeaderHeight - inputHeight;
|
|
@@ -103340,13 +103324,14 @@ var makeWideFrame = (viewport, policy, slots) => {
|
|
|
103340
103324
|
centerWidth,
|
|
103341
103325
|
inputHeight
|
|
103342
103326
|
),
|
|
103343
|
-
region(CampUiSlot.
|
|
103344
|
-
region(CampUiSlot.equipment, rightX, bodyY + activityHeight, rightWidth, equipmentHeight),
|
|
103327
|
+
region(CampUiSlot.equipment, rightX, bodyY, rightWidth, bodyHeight),
|
|
103345
103328
|
/*
|
|
103346
|
-
*
|
|
103347
|
-
*
|
|
103329
|
+
* The bottom line belongs to the conversation, not to the whole width: it
|
|
103330
|
+
* sits under the input and answers about the work happening there. Under
|
|
103331
|
+
* the side tracks there is nothing, so the eye is not dragged across the
|
|
103332
|
+
* screen by a rule that spans everything.
|
|
103348
103333
|
*/
|
|
103349
|
-
region(CampUiSlot.footer,
|
|
103334
|
+
region(CampUiSlot.footer, centerX2, footerY, centerWidth, footerHeight)
|
|
103350
103335
|
])
|
|
103351
103336
|
};
|
|
103352
103337
|
};
|
|
@@ -104426,169 +104411,9 @@ var makeCampUiDetailComponent = (context8, registry2 = defaultCampUiDetailBlockR
|
|
|
104426
104411
|
};
|
|
104427
104412
|
};
|
|
104428
104413
|
|
|
104429
|
-
// packages/host-ui/src/pi/layout/campUiActivity.ts
|
|
104430
|
-
import { getSelectListTheme as getSelectListTheme9 } from "@earendil-works/pi-coding-agent";
|
|
104431
|
-
import { sliceByColumn, visibleWidth as visibleWidth3 } from "@earendil-works/pi-tui";
|
|
104432
|
-
var CampUiActivityAccess = {
|
|
104433
|
-
read: "read",
|
|
104434
|
-
edit: "edit",
|
|
104435
|
-
write: "write"
|
|
104436
|
-
};
|
|
104437
|
-
var accessByTool = /* @__PURE__ */ new Map([
|
|
104438
|
-
["read", CampUiActivityAccess.read],
|
|
104439
|
-
["edit", CampUiActivityAccess.edit],
|
|
104440
|
-
["write", CampUiActivityAccess.write]
|
|
104441
|
-
]);
|
|
104442
|
-
var accessRank = {
|
|
104443
|
-
read: 0,
|
|
104444
|
-
edit: 1,
|
|
104445
|
-
write: 2
|
|
104446
|
-
};
|
|
104447
|
-
var filePathArgument = (parameters3) => {
|
|
104448
|
-
for (const name of ["path", "file_path"]) {
|
|
104449
|
-
const value5 = parameters3[name];
|
|
104450
|
-
if (typeof value5 === "string" && value5.trim() !== "") return value5.trim();
|
|
104451
|
-
}
|
|
104452
|
-
return void 0;
|
|
104453
|
-
};
|
|
104454
|
-
var splitPath2 = (path) => {
|
|
104455
|
-
const separator = path.lastIndexOf("/");
|
|
104456
|
-
if (separator < 0) return { directory: ".", name: path };
|
|
104457
|
-
if (separator === 0) return { directory: "/", name: path.slice(1) || path };
|
|
104458
|
-
return { directory: path.slice(0, separator), name: path.slice(separator + 1) || path };
|
|
104459
|
-
};
|
|
104460
|
-
var collectCampUiActivityTree = (transcript) => {
|
|
104461
|
-
const directories = /* @__PURE__ */ new Map();
|
|
104462
|
-
const nodes = /* @__PURE__ */ new Map();
|
|
104463
|
-
for (const message of transcript) {
|
|
104464
|
-
for (const content of message.content) {
|
|
104465
|
-
if (content.kind !== "tool-call") continue;
|
|
104466
|
-
const access3 = accessByTool.get(content.toolName);
|
|
104467
|
-
if (access3 === void 0) continue;
|
|
104468
|
-
const path = filePathArgument(content.arguments);
|
|
104469
|
-
if (path === void 0) continue;
|
|
104470
|
-
const existing = nodes.get(path);
|
|
104471
|
-
if (existing !== void 0) {
|
|
104472
|
-
existing.count += 1;
|
|
104473
|
-
if (accessRank[access3] > accessRank[existing.access]) existing.access = access3;
|
|
104474
|
-
continue;
|
|
104475
|
-
}
|
|
104476
|
-
const { directory, name } = splitPath2(path);
|
|
104477
|
-
const node = { path, directory, name, access: access3, count: 1 };
|
|
104478
|
-
nodes.set(path, node);
|
|
104479
|
-
const group2 = directories.get(directory) ?? { path: directory, nodes: [] };
|
|
104480
|
-
if (!directories.has(directory)) directories.set(directory, group2);
|
|
104481
|
-
group2.nodes.push(node);
|
|
104482
|
-
}
|
|
104483
|
-
}
|
|
104484
|
-
return [...directories.values()].map((directory) => ({
|
|
104485
|
-
path: directory.path,
|
|
104486
|
-
nodes: directory.nodes.map((node) => ({ ...node }))
|
|
104487
|
-
}));
|
|
104488
|
-
};
|
|
104489
|
-
var CAMP_UI_ACTIVITY_MAX_VISIBLE_PATHS = 12;
|
|
104490
|
-
var ACTIVITY_COLUMNS_PER_VISIBLE_PATH = 4;
|
|
104491
|
-
var flattenedNodes = (tree) => tree.flatMap((directory) => directory.nodes);
|
|
104492
|
-
var renderedRowCount = (tree, selected, hidden) => {
|
|
104493
|
-
const directories = tree.filter(
|
|
104494
|
-
(directory) => directory.nodes.some((node) => selected.has(node))
|
|
104495
|
-
).length;
|
|
104496
|
-
return selected.size + directories + (hidden > 0 ? 1 : 0);
|
|
104497
|
-
};
|
|
104498
|
-
var selectVisibleNodes2 = (tree, width, height) => {
|
|
104499
|
-
const nodes = flattenedNodes(tree);
|
|
104500
|
-
const selected = /* @__PURE__ */ new Set();
|
|
104501
|
-
const widthBudget = Math.max(
|
|
104502
|
-
1,
|
|
104503
|
-
Math.floor(Math.max(0, width) / ACTIVITY_COLUMNS_PER_VISIBLE_PATH)
|
|
104504
|
-
);
|
|
104505
|
-
const nodeBudget = Math.min(CAMP_UI_ACTIVITY_MAX_VISIBLE_PATHS, widthBudget);
|
|
104506
|
-
const mutations = nodes.filter((node) => node.access !== CampUiActivityAccess.read);
|
|
104507
|
-
const reads = nodes.filter((node) => node.access === CampUiActivityAccess.read);
|
|
104508
|
-
const addVisible = (node) => {
|
|
104509
|
-
if (selected.size >= nodeBudget) return;
|
|
104510
|
-
const candidate = new Set(selected).add(node);
|
|
104511
|
-
const hidden = nodes.length - candidate.size;
|
|
104512
|
-
if (renderedRowCount(tree, candidate, hidden) <= Math.max(0, height)) selected.add(node);
|
|
104513
|
-
};
|
|
104514
|
-
for (const node of mutations) addVisible(node);
|
|
104515
|
-
if (mutations.some((node) => !selected.has(node))) return selected;
|
|
104516
|
-
for (const node of reads) addVisible(node);
|
|
104517
|
-
return selected;
|
|
104518
|
-
};
|
|
104519
|
-
var shortenTail = (value5, width) => {
|
|
104520
|
-
const available = Math.max(0, Math.floor(width));
|
|
104521
|
-
const valueWidth = visibleWidth3(value5);
|
|
104522
|
-
if (valueWidth <= available) return value5;
|
|
104523
|
-
if (available <= 0) return "";
|
|
104524
|
-
if (available === 1) return "\u2026";
|
|
104525
|
-
return `\u2026${sliceByColumn(value5, valueWidth - available + 1, available - 1, true)}`;
|
|
104526
|
-
};
|
|
104527
|
-
var accessPresentation = {
|
|
104528
|
-
read: { label: "read", glyph: "r", tone: CampUiTone.neutral },
|
|
104529
|
-
edit: { label: "edited", glyph: "~", tone: CampUiTone.attention },
|
|
104530
|
-
write: { label: "created", glyph: "+", tone: CampUiTone.success }
|
|
104531
|
-
};
|
|
104532
|
-
var nodeLine2 = (node, last5, width) => {
|
|
104533
|
-
const theme = getSelectListTheme9();
|
|
104534
|
-
const presentation = accessPresentation[node.access];
|
|
104535
|
-
const count4 = node.count > 1 ? ` \xD7${String(node.count)}` : "";
|
|
104536
|
-
const suffix = ` \xB7 ${presentation.label}${count4}`;
|
|
104537
|
-
const branch = last5 ? "\u2514\u2500" : "\u251C\u2500";
|
|
104538
|
-
const nameWidth = Math.max(1, width - visibleWidth3(`${branch} ${presentation.glyph} ${suffix}`));
|
|
104539
|
-
const name = shortenTail(node.name, nameWidth);
|
|
104540
|
-
return fitCampUiLine(
|
|
104541
|
-
`${theme.description(branch)} ${renderCampUiStatus(name, presentation.tone, presentation.glyph)}${theme.description(suffix)}`,
|
|
104542
|
-
width
|
|
104543
|
-
);
|
|
104544
|
-
};
|
|
104545
|
-
var hiddenSummary = (nodes) => {
|
|
104546
|
-
const parts2 = Object.values(CampUiActivityAccess).flatMap((access3) => {
|
|
104547
|
-
const count4 = nodes.filter((node) => node.access === access3).length;
|
|
104548
|
-
if (count4 === 0) return [];
|
|
104549
|
-
const label = accessPresentation[access3].label;
|
|
104550
|
-
return [`${String(count4)} ${label} ${count4 === 1 ? "path" : "paths"}`];
|
|
104551
|
-
});
|
|
104552
|
-
return `... ${parts2.join(" \xB7 ")} hidden`;
|
|
104553
|
-
};
|
|
104554
|
-
var renderCampUiActivityTree = (transcript, width, height) => {
|
|
104555
|
-
const theme = getSelectListTheme9();
|
|
104556
|
-
const tree = collectCampUiActivityTree(transcript);
|
|
104557
|
-
const nodes = flattenedNodes(tree);
|
|
104558
|
-
if (height <= 0) return [];
|
|
104559
|
-
if (nodes.length === 0) return [fitCampUiLine(theme.description("no file activity"), width)];
|
|
104560
|
-
const selected = selectVisibleNodes2(tree, width, height);
|
|
104561
|
-
const lines3 = [];
|
|
104562
|
-
for (const directory of tree) {
|
|
104563
|
-
const visible = directory.nodes.filter((node) => selected.has(node));
|
|
104564
|
-
if (visible.length === 0) continue;
|
|
104565
|
-
lines3.push(fitCampUiLine(theme.description(shortenTail(directory.path, width)), width));
|
|
104566
|
-
visible.forEach((node, index) => {
|
|
104567
|
-
lines3.push(nodeLine2(node, index === visible.length - 1, width));
|
|
104568
|
-
});
|
|
104569
|
-
}
|
|
104570
|
-
const hidden = nodes.filter((node) => !selected.has(node));
|
|
104571
|
-
if (hidden.length > 0) {
|
|
104572
|
-
lines3.push(fitCampUiLine(theme.description(hiddenSummary(hidden)), width));
|
|
104573
|
-
}
|
|
104574
|
-
return lines3;
|
|
104575
|
-
};
|
|
104576
|
-
var makeCampUiActivity = (context8) => ({
|
|
104577
|
-
render: (viewport) => {
|
|
104578
|
-
const model = context8.readModel();
|
|
104579
|
-
const workerId = model.state.selectedWorkerId;
|
|
104580
|
-
const worker = workerId === void 0 ? void 0 : findCampUiWorker(model.snapshot, workerId);
|
|
104581
|
-
return renderCampUiActivityTree(
|
|
104582
|
-
worker?.snapshot.session?.transcript ?? [],
|
|
104583
|
-
viewport.width,
|
|
104584
|
-
viewport.height
|
|
104585
|
-
);
|
|
104586
|
-
}
|
|
104587
|
-
});
|
|
104588
|
-
|
|
104589
104414
|
// packages/host-ui/src/pi/layout/campUiChrome.ts
|
|
104590
|
-
import { getSelectListTheme as
|
|
104591
|
-
import { truncateToWidth as truncateToWidth4, visibleWidth as
|
|
104415
|
+
import { getSelectListTheme as getSelectListTheme9 } from "@earendil-works/pi-coding-agent";
|
|
104416
|
+
import { truncateToWidth as truncateToWidth4, visibleWidth as visibleWidth3 } from "@earendil-works/pi-tui";
|
|
104592
104417
|
|
|
104593
104418
|
// packages/host-ui/src/pi/shared/campUiPulse.ts
|
|
104594
104419
|
var BRAILLE_BASE = 10240;
|
|
@@ -104680,7 +104505,7 @@ var campUiLevelMarkerText = (level, color) => level === CampUiLevel.resting ? le
|
|
|
104680
104505
|
var makeCampUiCampHeader = (context8) => ({
|
|
104681
104506
|
render: (viewport) => {
|
|
104682
104507
|
const snapshot = context8.readModel().snapshot;
|
|
104683
|
-
const theme =
|
|
104508
|
+
const theme = getSelectListTheme9();
|
|
104684
104509
|
const mode = snapshot.placement === "external" ? "agentless" : "foreman";
|
|
104685
104510
|
return [
|
|
104686
104511
|
fitCampUiLine(theme.description(snapshot.displayName), viewport.width),
|
|
@@ -104701,7 +104526,7 @@ var rosterWidths = (width) => {
|
|
|
104701
104526
|
};
|
|
104702
104527
|
var rightColumn = (text4, width) => {
|
|
104703
104528
|
const fitted = truncateToWidth4(text4, width);
|
|
104704
|
-
return `${" ".repeat(Math.max(0, width -
|
|
104529
|
+
return `${" ".repeat(Math.max(0, width - visibleWidth3(fitted)))}${fitted}`;
|
|
104705
104530
|
};
|
|
104706
104531
|
var pulseSamples = (timestamps, sampleCount, now2) => {
|
|
104707
104532
|
if (sampleCount <= 0) return [];
|
|
@@ -104731,13 +104556,13 @@ var usageText = (entry, width) => {
|
|
|
104731
104556
|
const cache = usage?.latestCacheHitRate === void 0 ? usage === void 0 || usage.tokens.total === 0 ? "n/a" : "n/r" : percentText(usage.latestCacheHitRate);
|
|
104732
104557
|
const cost = usage === void 0 ? "\u2014" : `$${usage.cost.toFixed(3)}`;
|
|
104733
104558
|
const full = `${context8} ${cache} ${cost}`;
|
|
104734
|
-
if (
|
|
104559
|
+
if (visibleWidth3(full) <= width || usage === void 0) return full;
|
|
104735
104560
|
const compactCost = `$${usage.cost.toFixed(2).replace(/^0/u, "")}`;
|
|
104736
104561
|
return `${context8}${cache}${compactCost}`;
|
|
104737
104562
|
};
|
|
104738
104563
|
var stateText = (state, duration5, width) => {
|
|
104739
104564
|
const full = `${state} ${duration5}`;
|
|
104740
|
-
return
|
|
104565
|
+
return visibleWidth3(full) <= width ? full : state;
|
|
104741
104566
|
};
|
|
104742
104567
|
var modelText = (entry) => {
|
|
104743
104568
|
const model = entry.snapshot.session?.usage?.model ?? entry.snapshot.worker.equipment.model;
|
|
@@ -104818,7 +104643,7 @@ var makeCampUiRoster = (context8) => ({
|
|
|
104818
104643
|
const model = context8.readModel();
|
|
104819
104644
|
const external = model.snapshot.placement === CampUiPlacement.external;
|
|
104820
104645
|
if (model.snapshot.workers.length === 0 && !external) {
|
|
104821
|
-
return [
|
|
104646
|
+
return [getSelectListTheme9().description("No workers")];
|
|
104822
104647
|
}
|
|
104823
104648
|
const controller = external ? renderExternalControllerCard(model.snapshot.controllerConnected, viewport.width) : [];
|
|
104824
104649
|
const workers = model.snapshot.workers.flatMap((entry) => {
|
|
@@ -104853,7 +104678,7 @@ var makeCampUiRoster = (context8) => ({
|
|
|
104853
104678
|
var makeCampUiSessionHeader = (context8) => ({
|
|
104854
104679
|
render: (viewport) => {
|
|
104855
104680
|
const model = context8.readModel();
|
|
104856
|
-
const theme =
|
|
104681
|
+
const theme = getSelectListTheme9();
|
|
104857
104682
|
const workerId = model.state.selectedWorkerId;
|
|
104858
104683
|
if (workerId === void 0) {
|
|
104859
104684
|
return [fitCampUiLine(theme.description("Select a worker"), viewport.width)];
|
|
@@ -104875,11 +104700,11 @@ var makeCampUiSessionHeader = (context8) => ({
|
|
|
104875
104700
|
});
|
|
104876
104701
|
|
|
104877
104702
|
// packages/host-ui/src/pi/layout/campUiEquipment.ts
|
|
104878
|
-
import { getSelectListTheme as
|
|
104703
|
+
import { getSelectListTheme as getSelectListTheme10 } from "@earendil-works/pi-coding-agent";
|
|
104879
104704
|
import { wrapTextWithAnsi } from "@earendil-works/pi-tui";
|
|
104880
104705
|
var fullEquipmentLines = (equipment, revision, width) => {
|
|
104881
104706
|
if (width <= 0) return [];
|
|
104882
|
-
const theme =
|
|
104707
|
+
const theme = getSelectListTheme10();
|
|
104883
104708
|
return equipmentDescriptionLines(equipment, revision).flatMap(
|
|
104884
104709
|
(line) => wrapTextWithAnsi(theme.description(line), width).map(
|
|
104885
104710
|
(wrapped) => fitCampUiLine(wrapped, width)
|
|
@@ -104893,7 +104718,7 @@ var renderCampUiEquipment = (equipment, revision, width, height) => {
|
|
|
104893
104718
|
if (lines3.length <= available) return lines3;
|
|
104894
104719
|
const shown = lines3.slice(0, Math.max(0, available - 1));
|
|
104895
104720
|
const hidden = lines3.length - shown.length;
|
|
104896
|
-
const summary5 =
|
|
104721
|
+
const summary5 = getSelectListTheme10().description(
|
|
104897
104722
|
`... ${String(hidden)} equipment ${hidden === 1 ? "line" : "lines"} hidden`
|
|
104898
104723
|
);
|
|
104899
104724
|
return [...shown, fitCampUiLine(summary5, width)];
|
|
@@ -104906,7 +104731,7 @@ var makeCampUiEquipment = (context8) => {
|
|
|
104906
104731
|
};
|
|
104907
104732
|
const fullLines = (width) => {
|
|
104908
104733
|
const worker = selectedWorker();
|
|
104909
|
-
return worker === void 0 ? [fitCampUiLine(
|
|
104734
|
+
return worker === void 0 ? [fitCampUiLine(getSelectListTheme10().description("no worker selected"), width)] : fullEquipmentLines(
|
|
104910
104735
|
worker.snapshot.worker.equipment,
|
|
104911
104736
|
worker.snapshot.worker.equipmentVersion,
|
|
104912
104737
|
width
|
|
@@ -104928,8 +104753,8 @@ var makeCampUiEquipment = (context8) => {
|
|
|
104928
104753
|
};
|
|
104929
104754
|
|
|
104930
104755
|
// packages/host-ui/src/pi/layout/campUiFooter.ts
|
|
104931
|
-
import { getMarkdownTheme as getMarkdownTheme7, getSelectListTheme as
|
|
104932
|
-
import { sliceByColumn
|
|
104756
|
+
import { getMarkdownTheme as getMarkdownTheme7, getSelectListTheme as getSelectListTheme11 } from "@earendil-works/pi-coding-agent";
|
|
104757
|
+
import { sliceByColumn, visibleWidth as visibleWidth4 } from "@earendil-works/pi-tui";
|
|
104933
104758
|
var footerDivider = (width) => fitCampUiLine(getMarkdownTheme7().codeBlockBorder("\u2500".repeat(width)), width);
|
|
104934
104759
|
var retryText = (retryAt, attempt, now2) => {
|
|
104935
104760
|
if (retryAt === void 0) return attempt === void 0 ? "" : `attempt ${String(attempt)}`;
|
|
@@ -104958,15 +104783,15 @@ var isPendingAsk = (ask) => ask.state === "pending";
|
|
|
104958
104783
|
var shortenPath = (value5, width) => {
|
|
104959
104784
|
const available = Math.max(0, Math.floor(width));
|
|
104960
104785
|
if (available <= 0) return "";
|
|
104961
|
-
if (
|
|
104786
|
+
if (visibleWidth4(value5) <= available) return value5;
|
|
104962
104787
|
if (available === 1) return "\u2026";
|
|
104963
104788
|
const kept = available - 1;
|
|
104964
|
-
return `\u2026${
|
|
104789
|
+
return `\u2026${sliceByColumn(value5, visibleWidth4(value5) - kept, kept, true)}`;
|
|
104965
104790
|
};
|
|
104966
104791
|
var makeCampUiFooter = (context8) => ({
|
|
104967
104792
|
render: (viewport) => {
|
|
104968
104793
|
const model = context8.readModel();
|
|
104969
|
-
const theme =
|
|
104794
|
+
const theme = getSelectListTheme11();
|
|
104970
104795
|
const snapshot = model.snapshot;
|
|
104971
104796
|
const health = snapshot.health;
|
|
104972
104797
|
const actionError = diagnosticText(model.state.lastActionError);
|
|
@@ -104985,16 +104810,16 @@ var makeCampUiFooter = (context8) => ({
|
|
|
104985
104810
|
];
|
|
104986
104811
|
const MINIMUM_PATH_COLUMNS = 8;
|
|
104987
104812
|
const chosen = candidates.find((candidate) => {
|
|
104988
|
-
const rightWidth =
|
|
104989
|
-
const room = viewport.width - rightWidth - 3 -
|
|
104813
|
+
const rightWidth = visibleWidth4(candidate.right.filter((part) => part !== "").join(" \xB7 "));
|
|
104814
|
+
const room = viewport.width - rightWidth - 3 - visibleWidth4(candidate.branch);
|
|
104990
104815
|
return room >= MINIMUM_PATH_COLUMNS;
|
|
104991
104816
|
}) ?? candidates[candidates.length - 1];
|
|
104992
104817
|
const right3 = (chosen ?? candidates[0])?.right.filter((part) => part !== "").join(" \xB7 ") ?? "";
|
|
104993
104818
|
const chosenBranch = chosen?.branch ?? "";
|
|
104994
|
-
const leftBudget = Math.max(0, viewport.width -
|
|
104819
|
+
const leftBudget = Math.max(0, viewport.width - visibleWidth4(right3) - 3);
|
|
104995
104820
|
const path = shortenPath(
|
|
104996
104821
|
snapshot.projectScope,
|
|
104997
|
-
Math.max(0, leftBudget -
|
|
104822
|
+
Math.max(0, leftBudget - visibleWidth4(chosenBranch))
|
|
104998
104823
|
);
|
|
104999
104824
|
const left3 = diagnostic === "" ? theme.description(`${path}${chosenBranch}`) : `${diagnostic} ${theme.description(`\xB7 ${path}${chosenBranch}`)}`;
|
|
105000
104825
|
return [
|
|
@@ -105005,9 +104830,9 @@ var makeCampUiFooter = (context8) => ({
|
|
|
105005
104830
|
});
|
|
105006
104831
|
|
|
105007
104832
|
// packages/host-ui/src/pi/layout/campUiResources.ts
|
|
105008
|
-
import { getSelectListTheme as
|
|
104833
|
+
import { getSelectListTheme as getSelectListTheme12 } from "@earendil-works/pi-coding-agent";
|
|
105009
104834
|
var renderResourceTree = (label, value5, tone, width) => {
|
|
105010
|
-
const theme =
|
|
104835
|
+
const theme = getSelectListTheme12();
|
|
105011
104836
|
const lines3 = [
|
|
105012
104837
|
theme.description(label),
|
|
105013
104838
|
`${theme.description("\u2514\u2500")} ${renderCampUiStatus(value5, tone)}`
|
|
@@ -105082,11 +104907,6 @@ var makeDefaultCampUiContributions = (tui, detailBlocks) => [
|
|
|
105082
104907
|
slotId: CampUiSlot.campHeader,
|
|
105083
104908
|
mount: (context8) => succeed8(makeCampUiCampHeader(context8))
|
|
105084
104909
|
},
|
|
105085
|
-
{
|
|
105086
|
-
id: "default-activity",
|
|
105087
|
-
slotId: CampUiSlot.activity,
|
|
105088
|
-
mount: (context8) => succeed8(makeCampUiActivity(context8))
|
|
105089
|
-
},
|
|
105090
104910
|
{
|
|
105091
104911
|
id: "default-equipment",
|
|
105092
104912
|
slotId: CampUiSlot.equipment,
|
|
@@ -105125,17 +104945,17 @@ var makeDefaultCampUiContributions = (tui, detailBlocks) => [
|
|
|
105125
104945
|
];
|
|
105126
104946
|
|
|
105127
104947
|
// packages/host-ui/src/pi/layout/campUiSection.ts
|
|
105128
|
-
import { getMarkdownTheme as getMarkdownTheme8, getSelectListTheme as
|
|
105129
|
-
import { visibleWidth as
|
|
104948
|
+
import { getMarkdownTheme as getMarkdownTheme8, getSelectListTheme as getSelectListTheme13 } from "@earendil-works/pi-coding-agent";
|
|
104949
|
+
import { visibleWidth as visibleWidth5 } from "@earendil-works/pi-tui";
|
|
105130
104950
|
var renderHeader = (header, width) => {
|
|
105131
104951
|
const theme = getMarkdownTheme8();
|
|
105132
|
-
const selectTheme =
|
|
104952
|
+
const selectTheme = getSelectListTheme13();
|
|
105133
104953
|
const rule2 = header.focused === true ? selectTheme.selectedPrefix : theme.codeBlockBorder;
|
|
105134
104954
|
const title = header.focused === true ? selectTheme.selectedText : theme.heading;
|
|
105135
104955
|
const ruleCharacter = header.focused === true ? "\u2501" : "\u2500";
|
|
105136
104956
|
const detail = header.detail === void 0 ? "" : ` ${selectTheme.description(header.detail)}`;
|
|
105137
104957
|
const label = `${rule2(ruleCharacter.repeat(2))} ${title(header.title)}${detail} `;
|
|
105138
|
-
const ruleWidth = Math.max(0, width -
|
|
104958
|
+
const ruleWidth = Math.max(0, width - visibleWidth5(label));
|
|
105139
104959
|
return fitCampUiLine(`${label}${rule2(ruleCharacter.repeat(ruleWidth))}`, width);
|
|
105140
104960
|
};
|
|
105141
104961
|
var makeCampUiSection = (options2) => {
|
|
@@ -105160,14 +104980,22 @@ var makeCampUiSection = (options2) => {
|
|
|
105160
104980
|
options2.children.map((child) => child.size)
|
|
105161
104981
|
)
|
|
105162
104982
|
];
|
|
104983
|
+
const body = options2.children.flatMap((child, index) => {
|
|
104984
|
+
const height = childHeights[index] ?? 0;
|
|
104985
|
+
const lines3 = child.component.render({ width: viewport.width, height }).slice(0, height);
|
|
104986
|
+
return options2.centerContent === true ? lines3 : [...lines3, ...Array.from({ length: height - lines3.length }, () => "")];
|
|
104987
|
+
});
|
|
104988
|
+
if (options2.centerContent !== true) {
|
|
104989
|
+
return [renderHeader(options2.header(), viewport.width), ...body];
|
|
104990
|
+
}
|
|
104991
|
+
const available = Math.max(0, viewport.height - 1);
|
|
104992
|
+
const padding = Math.max(0, Math.floor((available - body.length) / 2));
|
|
105163
104993
|
return [
|
|
105164
104994
|
renderHeader(options2.header(), viewport.width),
|
|
105165
|
-
...
|
|
105166
|
-
|
|
105167
|
-
|
|
105168
|
-
|
|
105169
|
-
})
|
|
105170
|
-
];
|
|
104995
|
+
...Array.from({ length: padding }, () => ""),
|
|
104996
|
+
...body,
|
|
104997
|
+
...Array.from({ length: Math.max(0, available - padding - body.length) }, () => "")
|
|
104998
|
+
].slice(0, viewport.height);
|
|
105171
104999
|
},
|
|
105172
105000
|
...inputComponents ? {
|
|
105173
105001
|
handleInput: (input) => [...components].reverse().some((component) => component.handleInput?.(input) === true)
|
|
@@ -105217,24 +105045,12 @@ var decorateDefaultCampUiSections = (context8, slots) => {
|
|
|
105217
105045
|
]
|
|
105218
105046
|
})
|
|
105219
105047
|
);
|
|
105220
|
-
decorated.set(
|
|
105221
|
-
CampUiSlot.activity,
|
|
105222
|
-
makeCampUiSection({
|
|
105223
|
-
header: () => ({ title: "Activity" }),
|
|
105224
|
-
size: defaultCampUiRightSectionSizes.activity,
|
|
105225
|
-
children: [
|
|
105226
|
-
{
|
|
105227
|
-
component: component(CampUiSlot.activity),
|
|
105228
|
-
size: { kind: CampUiSectionSizeKind.grow, weight: 1 }
|
|
105229
|
-
}
|
|
105230
|
-
]
|
|
105231
|
-
})
|
|
105232
|
-
);
|
|
105233
105048
|
const equipment = component(CampUiSlot.equipment);
|
|
105234
105049
|
decorated.set(
|
|
105235
105050
|
CampUiSlot.equipment,
|
|
105236
105051
|
makeCampUiSection({
|
|
105237
105052
|
header: () => ({ title: "Equipment" }),
|
|
105053
|
+
centerContent: true,
|
|
105238
105054
|
size: defaultCampUiRightSectionSizes.equipment,
|
|
105239
105055
|
children: [
|
|
105240
105056
|
{
|
|
@@ -105253,6 +105069,7 @@ var decorateDefaultCampUiSections = (context8, slots) => {
|
|
|
105253
105069
|
detail: String(context8.readModel().snapshot.workers.length),
|
|
105254
105070
|
focused: context8.readModel().state.focusedSlotId === CampUiSlot.roster
|
|
105255
105071
|
}),
|
|
105072
|
+
centerContent: true,
|
|
105256
105073
|
size: defaultCampUiLeftSectionSizes.workers,
|
|
105257
105074
|
children: [
|
|
105258
105075
|
{
|
|
@@ -105829,7 +105646,7 @@ var mountPiCampUi = (options2) => gen2(function* () {
|
|
|
105829
105646
|
});
|
|
105830
105647
|
|
|
105831
105648
|
// packages/host-ui/src/pi/run-selector/campRunSelector.ts
|
|
105832
|
-
import { getMarkdownTheme as getMarkdownTheme10, getSelectListTheme as
|
|
105649
|
+
import { getMarkdownTheme as getMarkdownTheme10, getSelectListTheme as getSelectListTheme14, initTheme as initTheme2 } from "@earendil-works/pi-coding-agent";
|
|
105833
105650
|
import {
|
|
105834
105651
|
Key as Key5,
|
|
105835
105652
|
matchesKey as matchesKey4,
|
package/dist/priiisk.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire as __priiiskCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __priiiskCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
PRIIISK_CLI_VERSION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YNTHXLFG.js";
|
|
7
7
|
import "./chunk-7UPFIIZD.js";
|
|
8
8
|
|
|
9
9
|
// packages/cli/src/bin/priiisk.ts
|
|
@@ -42,4 +42,4 @@ var prepareCompileCacheDirectory = () => {
|
|
|
42
42
|
// packages/cli/src/bin/priiisk.ts
|
|
43
43
|
var directory = prepareCompileCacheDirectory();
|
|
44
44
|
if (directory !== void 0) enableCompileCache(directory);
|
|
45
|
-
await import("./chunk-
|
|
45
|
+
await import("./chunk-Y2F6VW5R.js");
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "priiisk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "CLI for running and observing a camp of collaborating agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"priiisk": "./dist/priiisk.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"dist/chunk-
|
|
10
|
+
"dist/chunk-2YPHJHIX.js",
|
|
11
|
+
"dist/chunk-5W5JRU33.js",
|
|
12
|
+
"dist/chunk-7HDRDMQU.js",
|
|
11
13
|
"dist/chunk-7UPFIIZD.js",
|
|
14
|
+
"dist/chunk-C7QHKE3K.js",
|
|
15
|
+
"dist/chunk-C7QHKE3K.js.LEGAL.txt",
|
|
12
16
|
"dist/chunk-DPNPQG2D.js",
|
|
13
17
|
"dist/chunk-DPNPQG2D.js.LEGAL.txt",
|
|
14
|
-
"dist/chunk-
|
|
15
|
-
"dist/chunk-IPF3C3B2.js",
|
|
16
|
-
"dist/chunk-IPF3C3B2.js.LEGAL.txt",
|
|
17
|
-
"dist/chunk-K7LA4DNU.js",
|
|
18
|
-
"dist/chunk-PCOWK5BR.js",
|
|
19
|
-
"dist/chunk-PIHJTCPQ.js",
|
|
20
|
-
"dist/chunk-QY7U7U2K.js",
|
|
21
|
-
"dist/chunk-TUCFONJW.js",
|
|
18
|
+
"dist/chunk-GBEORC3T.js",
|
|
22
19
|
"dist/chunk-U2FODXMR.js",
|
|
20
|
+
"dist/chunk-Y2F6VW5R.js",
|
|
21
|
+
"dist/chunk-YCWIUVAI.js",
|
|
22
|
+
"dist/chunk-YNTHXLFG.js",
|
|
23
23
|
"dist/priiisk-host.js",
|
|
24
24
|
"dist/priiisk-host.js.LEGAL.txt",
|
|
25
25
|
"dist/priiisk.js",
|
|
File without changes
|