priiisk 0.1.6 → 0.1.7
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-KFSFN6L5.js → chunk-3V5SHVCX.js} +20 -1
- package/dist/{chunk-X4GVQOCR.js → chunk-4VQ2KUN7.js} +4 -4
- package/dist/{chunk-JWVO4S72.js → chunk-7U7PROSV.js} +2 -2
- package/dist/{chunk-3NSS6BZD.js → chunk-JND6HOSJ.js} +3 -3
- package/dist/{chunk-TOVFB7H6.js → chunk-VLP2ZKVV.js} +6 -2
- package/dist/{chunk-ZNRMKVX3.js → chunk-WEYE43UO.js} +2 -2
- package/dist/{chunk-32R4IEGS.js → chunk-YOW4MMBD.js} +33 -7
- package/dist/{chunk-UDDSOI3H.js → chunk-ZUREJQA6.js} +3 -3
- package/dist/priiisk-host.js +6 -6
- package/dist/priiisk.js +66 -19
- package/package.json +11 -11
- /package/dist/{chunk-3NSS6BZD.js.LEGAL.txt → chunk-JND6HOSJ.js.LEGAL.txt} +0 -0
- /package/dist/{chunk-ZNRMKVX3.js.LEGAL.txt → chunk-WEYE43UO.js.LEGAL.txt} +0 -0
|
@@ -41918,11 +41918,30 @@ var lastTurnStart = (messages) => {
|
|
|
41918
41918
|
}
|
|
41919
41919
|
return 0;
|
|
41920
41920
|
};
|
|
41921
|
+
var lastTurnWindowStart = (messages, limit, maxBytes) => {
|
|
41922
|
+
const turnStart = lastTurnStart(messages);
|
|
41923
|
+
let start3 = messages.length;
|
|
41924
|
+
let bytes = 0;
|
|
41925
|
+
let taken = 0;
|
|
41926
|
+
for (let index = messages.length - 1; index >= turnStart; index -= 1) {
|
|
41927
|
+
const message = messages[index];
|
|
41928
|
+
if (message === void 0) continue;
|
|
41929
|
+
const size19 = messageBytes(message);
|
|
41930
|
+
if (taken > 0 && (taken >= limit || bytes + size19 > maxBytes)) break;
|
|
41931
|
+
start3 = index;
|
|
41932
|
+
bytes += size19;
|
|
41933
|
+
taken += 1;
|
|
41934
|
+
}
|
|
41935
|
+
return Math.min(start3, messages.length);
|
|
41936
|
+
};
|
|
41921
41937
|
var campTranscriptPage = (messages, origin, request2 = {}) => {
|
|
41922
41938
|
const limit = Math.max(1, request2.limit ?? CAMP_TRANSCRIPT_DEFAULT_LIMIT);
|
|
41923
41939
|
const maxBytes = Math.max(1, request2.maxBytes ?? CAMP_TRANSCRIPT_DEFAULT_MAX_BYTES);
|
|
41924
41940
|
const start3 = Math.min(
|
|
41925
|
-
Math.max(
|
|
41941
|
+
Math.max(
|
|
41942
|
+
0,
|
|
41943
|
+
request2.cursor ?? (request2.lastTurn === true ? lastTurnWindowStart(messages, limit, maxBytes) : 0)
|
|
41944
|
+
),
|
|
41926
41945
|
messages.length
|
|
41927
41946
|
);
|
|
41928
41947
|
const page = [];
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
makeDoctorReport,
|
|
9
9
|
resolveCampSurface,
|
|
10
10
|
withCampRpc
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZUREJQA6.js";
|
|
12
12
|
import {
|
|
13
13
|
PI_RUNTIME_VERSION,
|
|
14
14
|
PiModelCatalogIssueCode,
|
|
15
15
|
inspectPiModelCatalog,
|
|
16
16
|
makePiOperatorResources
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WEYE43UO.js";
|
|
18
18
|
import {
|
|
19
19
|
CampHealthComponentStatus,
|
|
20
20
|
CampHealthOverallStatus,
|
|
@@ -48,13 +48,13 @@ import {
|
|
|
48
48
|
resolveCredentialsPath,
|
|
49
49
|
resolveProjectScope,
|
|
50
50
|
resolveWorkerConfigPath
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-JND6HOSJ.js";
|
|
52
52
|
import {
|
|
53
53
|
Clock_exports,
|
|
54
54
|
Effect_exports,
|
|
55
55
|
Option_exports,
|
|
56
56
|
Ref_exports
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-3V5SHVCX.js";
|
|
58
58
|
|
|
59
59
|
// packages/cli/src/doctor/environmentDoctor.ts
|
|
60
60
|
import { dirname } from "node:path";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
makePlatform,
|
|
29
29
|
makeRunMain,
|
|
30
30
|
stdin
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-JND6HOSJ.js";
|
|
32
32
|
import {
|
|
33
33
|
BaseProto,
|
|
34
34
|
__export,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
write,
|
|
113
113
|
zip,
|
|
114
114
|
zipRight
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-3V5SHVCX.js";
|
|
116
116
|
|
|
117
117
|
// node_modules/.pnpm/@effect+platform-node@0.107.0_@effect+cluster@0.59.0_@effect+platform@0.96.2_effect@3.2_9535e05eb804fa0fb275ce283b448483/node_modules/@effect/platform-node/dist/esm/NodeContext.js
|
|
118
118
|
var NodeContext_exports = {};
|
|
@@ -366,7 +366,7 @@ import {
|
|
|
366
366
|
write,
|
|
367
367
|
zipRight,
|
|
368
368
|
zipRight2
|
|
369
|
-
} from "./chunk-
|
|
369
|
+
} from "./chunk-3V5SHVCX.js";
|
|
370
370
|
|
|
371
371
|
// node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js
|
|
372
372
|
var require_process = __commonJS({
|
|
@@ -10678,7 +10678,7 @@ var describeDirectToolSandbox = (sandbox2) => sandbox2.kind === DirectToolSandbo
|
|
|
10678
10678
|
|
|
10679
10679
|
// packages/protocol/src/domain/protocolVersion.ts
|
|
10680
10680
|
var PRIIISK_PROTOCOL_VERSION = "11";
|
|
10681
|
-
var PRIIISK_PROTOCOL_PACKAGE_VERSION = "0.1.
|
|
10681
|
+
var PRIIISK_PROTOCOL_PACKAGE_VERSION = "0.1.7";
|
|
10682
10682
|
var ProtocolVersionSchema = Schema_exports.String.pipe(Schema_exports.minLength(1));
|
|
10683
10683
|
|
|
10684
10684
|
// packages/protocol/src/domain/protocolIdentifiers.ts
|
|
@@ -13553,7 +13553,7 @@ var CampProtocol = class extends RpcGroup_exports.make(
|
|
|
13553
13553
|
};
|
|
13554
13554
|
|
|
13555
13555
|
// packages/camp-state/src/bootstrap/campHostVersion.ts
|
|
13556
|
-
var PRIIISK_HOST_VERSION = "0.1.
|
|
13556
|
+
var PRIIISK_HOST_VERSION = "0.1.7";
|
|
13557
13557
|
|
|
13558
13558
|
// packages/surface/src/domain/surfaceModel.ts
|
|
13559
13559
|
var NonEmptyString7 = Schema_exports.String.pipe(Schema_exports.minLength(1));
|
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
campUiPendingAskBlockRenderer,
|
|
38
38
|
campUiPendingAskTargets,
|
|
39
39
|
campUiSubscriptionRetryDelay,
|
|
40
|
+
campUiToolResultCacheSize,
|
|
40
41
|
campUiTranscriptBlockRenderer,
|
|
41
42
|
compactNumber,
|
|
42
43
|
composeCampUiDetailBlocks,
|
|
@@ -79,13 +80,14 @@ import {
|
|
|
79
80
|
renderCampUiToolResult,
|
|
80
81
|
renderCampUiWorkerState,
|
|
81
82
|
renderSelectedCampUiRow,
|
|
83
|
+
resetCampUiToolResultCache,
|
|
82
84
|
runCampUiPresentationClock,
|
|
83
85
|
sameCampUiRuntimeHealth,
|
|
84
86
|
selectCampRun,
|
|
85
87
|
styleCampUiTone,
|
|
86
88
|
uniqueCampUiNames
|
|
87
|
-
} from "./chunk-
|
|
88
|
-
import "./chunk-
|
|
89
|
+
} from "./chunk-YOW4MMBD.js";
|
|
90
|
+
import "./chunk-3V5SHVCX.js";
|
|
89
91
|
export {
|
|
90
92
|
CAMP_UI_BASH_PREVIEW_LINES,
|
|
91
93
|
CAMP_UI_DEFAULT_TOOL_PREVIEW_LINES,
|
|
@@ -123,6 +125,7 @@ export {
|
|
|
123
125
|
campUiPendingAskBlockRenderer,
|
|
124
126
|
campUiPendingAskTargets,
|
|
125
127
|
campUiSubscriptionRetryDelay,
|
|
128
|
+
campUiToolResultCacheSize,
|
|
126
129
|
campUiTranscriptBlockRenderer,
|
|
127
130
|
compactNumber,
|
|
128
131
|
composeCampUiDetailBlocks,
|
|
@@ -165,6 +168,7 @@ export {
|
|
|
165
168
|
renderCampUiToolResult,
|
|
166
169
|
renderCampUiWorkerState,
|
|
167
170
|
renderSelectedCampUiRow,
|
|
171
|
+
resetCampUiToolResultCache,
|
|
168
172
|
runCampUiPresentationClock,
|
|
169
173
|
sameCampUiRuntimeHealth,
|
|
170
174
|
selectCampRun,
|
|
@@ -3,7 +3,7 @@ const require = __priiiskCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
FileSystem_exports,
|
|
5
5
|
PRIIISK_PI_AGENT_DIR_ENV
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JND6HOSJ.js";
|
|
7
7
|
import {
|
|
8
8
|
CampDeliveryPort,
|
|
9
9
|
CampFailureCode,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
__require,
|
|
31
31
|
__toESM,
|
|
32
32
|
campScopeClosedReason
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-3V5SHVCX.js";
|
|
34
34
|
|
|
35
35
|
// node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/symbols.js
|
|
36
36
|
var require_symbols = __commonJS({
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
Match_exports,
|
|
13
13
|
Stream_exports,
|
|
14
14
|
SubscriptionRef_exports
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3V5SHVCX.js";
|
|
16
16
|
|
|
17
17
|
// packages/host-ui/src/backend/campUiBackend.ts
|
|
18
18
|
var CampUiBackendError = class extends Data_exports.TaggedError("CampUiBackendError") {
|
|
@@ -1296,27 +1296,49 @@ var toolResultPlainText = (result) => [
|
|
|
1296
1296
|
...result.toolResultDetails === void 0 ? [] : [`Details
|
|
1297
1297
|
${jsonText(result.toolResultDetails)}`]
|
|
1298
1298
|
].filter((part) => part !== "").join("\n");
|
|
1299
|
+
var CAMP_UI_TOOL_RESULT_CACHE_LIMIT = 256;
|
|
1300
|
+
var renderedResults = /* @__PURE__ */ new Map();
|
|
1301
|
+
var cacheKey = (result, width, expanded, plainText) => result.toolCallId === void 0 ? void 0 : (
|
|
1302
|
+
// The tool name is part of the key because it chooses the preview budget.
|
|
1303
|
+
`${result.toolCallId}:${result.toolName ?? ""}:${String(width)}:${expanded ? "1" : "0"}:${String(plainText.length)}`
|
|
1304
|
+
);
|
|
1305
|
+
var remember = (key, lines) => {
|
|
1306
|
+
if (renderedResults.size >= CAMP_UI_TOOL_RESULT_CACHE_LIMIT) {
|
|
1307
|
+
const oldest = renderedResults.keys().next();
|
|
1308
|
+
if (!oldest.done) renderedResults.delete(oldest.value);
|
|
1309
|
+
}
|
|
1310
|
+
renderedResults.set(key, lines);
|
|
1311
|
+
return lines;
|
|
1312
|
+
};
|
|
1313
|
+
var resetCampUiToolResultCache = () => {
|
|
1314
|
+
renderedResults.clear();
|
|
1315
|
+
};
|
|
1316
|
+
var campUiToolResultCacheSize = () => renderedResults.size;
|
|
1299
1317
|
var renderCampUiToolResult = (result, width, expanded) => {
|
|
1300
1318
|
const boundedWidth = Math.max(1, width);
|
|
1301
1319
|
const plainText = toolResultPlainText(result);
|
|
1320
|
+
const key = cacheKey(result, boundedWidth, expanded, plainText);
|
|
1321
|
+
const cached = key === void 0 ? void 0 : renderedResults.get(key);
|
|
1322
|
+
if (cached !== void 0) return cached;
|
|
1302
1323
|
const preview = truncateToVisualLines(
|
|
1303
1324
|
getSelectListTheme7().description(plainText),
|
|
1304
1325
|
previewLinesByTool.get(result.toolName ?? "") ?? CAMP_UI_DEFAULT_TOOL_PREVIEW_LINES,
|
|
1305
1326
|
boundedWidth
|
|
1306
1327
|
);
|
|
1328
|
+
const keep = (lines2) => key === void 0 ? lines2 : remember(key, lines2);
|
|
1307
1329
|
if (!expanded) {
|
|
1308
|
-
return [
|
|
1330
|
+
return keep([
|
|
1309
1331
|
...preview.visualLines,
|
|
1310
1332
|
...preview.skippedCount === 0 ? [] : [
|
|
1311
1333
|
getSelectListTheme7().description(
|
|
1312
1334
|
`... ${preview.skippedCount} more lines \xB7 enter expand`
|
|
1313
1335
|
)
|
|
1314
1336
|
]
|
|
1315
|
-
];
|
|
1337
|
+
]);
|
|
1316
1338
|
}
|
|
1317
1339
|
const content = toolResultContent(result, true);
|
|
1318
1340
|
const lines = content === "" ? [] : new Markdown3(content, 0, 0, getMarkdownTheme6()).render(boundedWidth);
|
|
1319
|
-
return [
|
|
1341
|
+
return keep([
|
|
1320
1342
|
...lines,
|
|
1321
1343
|
...result.errorMessage === void 0 ? [] : [getSelectListTheme7().noMatch(`Error: ${result.errorMessage}`)],
|
|
1322
1344
|
...result.toolResultDetails === void 0 ? [] : [
|
|
@@ -1326,7 +1348,7 @@ var renderCampUiToolResult = (result, width, expanded) => {
|
|
|
1326
1348
|
)
|
|
1327
1349
|
],
|
|
1328
1350
|
...preview.skippedCount === 0 ? [] : [getSelectListTheme7().description("enter collapse")]
|
|
1329
|
-
];
|
|
1351
|
+
]);
|
|
1330
1352
|
};
|
|
1331
1353
|
|
|
1332
1354
|
// packages/host-ui/src/pi/blocks/campUiTranscriptBlocks.ts
|
|
@@ -1535,8 +1557,10 @@ var makeCampUiDetailComponent = (context, registry = defaultCampUiDetailBlockRen
|
|
|
1535
1557
|
if (worker.error !== void 0) {
|
|
1536
1558
|
return [selectTheme.noMatch(`Snapshot error: ${worker.error}`)];
|
|
1537
1559
|
}
|
|
1560
|
+
const clockShown = worker.asks.some((ask) => ask.state === "pending");
|
|
1561
|
+
const presentationNow = clockShown ? model.state.presentationNow : void 0;
|
|
1538
1562
|
const cached = detailCache.get(workerId);
|
|
1539
|
-
const detail = cached !== void 0 && cached.worker === worker && cached.width === viewport.width && cached.expandedDetailBlockIds === model.state.expandedDetailBlockIds && cached.presentationNow ===
|
|
1563
|
+
const detail = cached !== void 0 && cached.worker === worker && cached.width === viewport.width && cached.expandedDetailBlockIds === model.state.expandedDetailBlockIds && cached.presentationNow === presentationNow ? cached.detail : renderCampUiDetailBlockLayout(registry, {
|
|
1540
1564
|
model,
|
|
1541
1565
|
worker,
|
|
1542
1566
|
width: viewport.width
|
|
@@ -1546,7 +1570,7 @@ var makeCampUiDetailComponent = (context, registry = defaultCampUiDetailBlockRen
|
|
|
1546
1570
|
worker,
|
|
1547
1571
|
width: viewport.width,
|
|
1548
1572
|
expandedDetailBlockIds: model.state.expandedDetailBlockIds,
|
|
1549
|
-
presentationNow:
|
|
1573
|
+
...presentationNow === void 0 ? {} : { presentationNow },
|
|
1550
1574
|
detail
|
|
1551
1575
|
});
|
|
1552
1576
|
}
|
|
@@ -2699,6 +2723,8 @@ export {
|
|
|
2699
2723
|
renderCampUiExploredGroup,
|
|
2700
2724
|
CAMP_UI_DEFAULT_TOOL_PREVIEW_LINES,
|
|
2701
2725
|
CAMP_UI_BASH_PREVIEW_LINES,
|
|
2726
|
+
resetCampUiToolResultCache,
|
|
2727
|
+
campUiToolResultCacheSize,
|
|
2702
2728
|
renderCampUiToolResult,
|
|
2703
2729
|
campUiTranscriptBlockRenderer,
|
|
2704
2730
|
defaultCampUiDetailBlockRenderers,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
layerNet,
|
|
21
21
|
makeCampSurfaceName,
|
|
22
22
|
resolveProjectScopeSync
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JND6HOSJ.js";
|
|
24
24
|
import {
|
|
25
25
|
Clock_exports,
|
|
26
26
|
Config_exports,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
Schedule_exports,
|
|
38
38
|
Schema_exports,
|
|
39
39
|
Stream_exports
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-3V5SHVCX.js";
|
|
41
41
|
|
|
42
42
|
// packages/cli/src/doctor/doctorModel.ts
|
|
43
43
|
var DOCTOR_REPORT_SCHEMA_VERSION = 1;
|
|
@@ -111,7 +111,7 @@ var CliSurfaceSelectionError = class extends Data_exports.TaggedError("CliSurfac
|
|
|
111
111
|
import { randomUUID } from "node:crypto";
|
|
112
112
|
|
|
113
113
|
// packages/cli/src/domain/cliVersion.ts
|
|
114
|
-
var PRIIISK_CLI_VERSION = "0.1.
|
|
114
|
+
var PRIIISK_CLI_VERSION = "0.1.7";
|
|
115
115
|
|
|
116
116
|
// packages/cli/src/client/campRpcConnection.ts
|
|
117
117
|
var PRIIISK_CONTROLLER_ID_ENV = "PRIIISK_CONTROLLER_ID";
|
package/dist/priiisk-host.js
CHANGED
|
@@ -4,14 +4,14 @@ const require = __priiiskCreateRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
NodeContext_exports,
|
|
6
6
|
NodeRuntime_exports
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7U7PROSV.js";
|
|
8
8
|
import {
|
|
9
9
|
CampUiBackendError,
|
|
10
10
|
CampUiHealthStatus,
|
|
11
11
|
CampUiPlacement,
|
|
12
12
|
CampUiRuntimeStatus,
|
|
13
13
|
mountPiCampUi
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YOW4MMBD.js";
|
|
15
15
|
import {
|
|
16
16
|
PiTransport,
|
|
17
17
|
makePiOperatorResources,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
makePiTransportLayer,
|
|
20
20
|
requirePiModelCatalog,
|
|
21
21
|
require_undici
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WEYE43UO.js";
|
|
23
23
|
import {
|
|
24
24
|
AgentRole,
|
|
25
25
|
AgentRoleSchema,
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
runningCampManifest,
|
|
101
101
|
saveCampHealth,
|
|
102
102
|
saveCampManifest
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-JND6HOSJ.js";
|
|
104
104
|
import {
|
|
105
105
|
CampAskRouter,
|
|
106
106
|
CampCancellationCode,
|
|
@@ -193,7 +193,7 @@ import {
|
|
|
193
193
|
withFiberRuntime,
|
|
194
194
|
workerAliasIdentity,
|
|
195
195
|
workerIdIdentity
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-3V5SHVCX.js";
|
|
197
197
|
|
|
198
198
|
// node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js
|
|
199
199
|
var require_constants = __commonJS({
|
|
@@ -22416,7 +22416,7 @@ var Client = class extends Protocol {
|
|
|
22416
22416
|
};
|
|
22417
22417
|
|
|
22418
22418
|
// packages/mcp-backend/src/connections/clientIdentity.ts
|
|
22419
|
-
var backendVersion = "0.1.
|
|
22419
|
+
var backendVersion = "0.1.7";
|
|
22420
22420
|
|
|
22421
22421
|
// packages/mcp-backend/src/connections/mcpFailure.ts
|
|
22422
22422
|
var McpFailure = class extends Data_exports.TaggedError("McpFailure") {
|
package/dist/priiisk.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
fromReadable,
|
|
6
6
|
layer,
|
|
7
7
|
runMain
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7U7PROSV.js";
|
|
9
9
|
import {
|
|
10
10
|
CliCampLifecycleError,
|
|
11
11
|
CliEquipmentConflict,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
resolveCampSurface,
|
|
24
24
|
withCampRpc,
|
|
25
25
|
withCampRpcSession
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZUREJQA6.js";
|
|
27
27
|
import {
|
|
28
28
|
CampCommandFailure,
|
|
29
29
|
CampHostReadiness,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
resolveProjectScopeSync,
|
|
59
59
|
saveCampManifest,
|
|
60
60
|
startingCampManifest
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-JND6HOSJ.js";
|
|
62
62
|
import {
|
|
63
63
|
Cause_exports,
|
|
64
64
|
CommitPrototype,
|
|
@@ -239,7 +239,7 @@ import {
|
|
|
239
239
|
zipLeft,
|
|
240
240
|
zipRight,
|
|
241
241
|
zipWith
|
|
242
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-3V5SHVCX.js";
|
|
243
243
|
|
|
244
244
|
// node_modules/.pnpm/ini@4.1.3/node_modules/ini/lib/ini.js
|
|
245
245
|
var require_ini = __commonJS({
|
|
@@ -18680,10 +18680,7 @@ var formatTranscriptPage = (page) => {
|
|
|
18680
18680
|
var formatCampEvent = (event) => `${String(event.cursor)} ${event.kind} ${event.worker.alias ?? event.worker.workerId}`;
|
|
18681
18681
|
var formatDeliveryOutcome = (outcome) => {
|
|
18682
18682
|
if (outcome.settled === void 0) return "Message accepted";
|
|
18683
|
-
return
|
|
18684
|
-
`Turn settled: ${outcome.settled.kind} at cursor ${String(outcome.settled.cursor)}`,
|
|
18685
|
-
...outcome.transcript === void 0 ? [] : [formatTranscriptPage(outcome.transcript)]
|
|
18686
|
-
].join("\n");
|
|
18683
|
+
return outcome.answer ?? `Turn settled: ${outcome.settled.kind}`;
|
|
18687
18684
|
};
|
|
18688
18685
|
var CAUSE_LIMIT = 400;
|
|
18689
18686
|
var describeCause = (cause) => {
|
|
@@ -18997,6 +18994,60 @@ var runCampStdioSession = (runner, options3 = {}) => Effect_exports.gen(function
|
|
|
18997
18994
|
);
|
|
18998
18995
|
});
|
|
18999
18996
|
|
|
18997
|
+
// packages/cli/src/commands/commandOptions.ts
|
|
18998
|
+
var jsonOption = Options_exports.boolean("json");
|
|
18999
|
+
var workerArgument = Args_exports.text({ name: "worker" });
|
|
19000
|
+
var byIdOption = Options_exports.boolean("by-id");
|
|
19001
|
+
var workerSelector = (worker, byId) => byId ? { kind: "id", workerId: worker } : { kind: "alias", alias: worker };
|
|
19002
|
+
|
|
19003
|
+
// packages/cli/src/commands/answerCommand.ts
|
|
19004
|
+
var finalAnswerText = (page) => {
|
|
19005
|
+
for (let index = page.messages.length - 1; index >= 0; index -= 1) {
|
|
19006
|
+
const message = page.messages[index];
|
|
19007
|
+
if (message === void 0 || message.role !== "assistant") continue;
|
|
19008
|
+
for (let part = message.content.length - 1; part >= 0; part -= 1) {
|
|
19009
|
+
const content = message.content[part];
|
|
19010
|
+
if (content?.kind === "text" && content.text !== void 0 && content.text.trim() !== "") {
|
|
19011
|
+
return content.text;
|
|
19012
|
+
}
|
|
19013
|
+
}
|
|
19014
|
+
}
|
|
19015
|
+
return void 0;
|
|
19016
|
+
};
|
|
19017
|
+
var workingStates = /* @__PURE__ */ new Set(["running", "starting"]);
|
|
19018
|
+
var answerCommand = Command_exports.make(
|
|
19019
|
+
"answer",
|
|
19020
|
+
{ worker: workerArgument, byId: byIdOption, json: jsonOption },
|
|
19021
|
+
({ worker, byId, json }) => {
|
|
19022
|
+
const selector = workerSelector(worker, byId);
|
|
19023
|
+
return withCampRpc(
|
|
19024
|
+
({ client, context }) => Effect_exports.all({
|
|
19025
|
+
status: client.WorkerStatus({ ...context, worker: selector }),
|
|
19026
|
+
page: client.WorkerTranscript({ ...context, worker: selector, lastTurn: true })
|
|
19027
|
+
}).pipe(
|
|
19028
|
+
Effect_exports.map(({ status, page }) => {
|
|
19029
|
+
const text11 = finalAnswerText(page);
|
|
19030
|
+
const working = workingStates.has(status.state);
|
|
19031
|
+
return text11 === void 0 || working ? {
|
|
19032
|
+
worker,
|
|
19033
|
+
answered: false,
|
|
19034
|
+
reason: working ? "turn_in_progress" : "no_answer_yet",
|
|
19035
|
+
state: status.state
|
|
19036
|
+
} : { worker, answered: true, text: text11, state: status.state };
|
|
19037
|
+
})
|
|
19038
|
+
),
|
|
19039
|
+
{ operation: "answer", timeoutMs: 3e4 }
|
|
19040
|
+
).pipe(
|
|
19041
|
+
printValue(
|
|
19042
|
+
json,
|
|
19043
|
+
(answer) => answer.answered ? answer.text ?? "" : answer.reason === "turn_in_progress" ? `\u0412\u043E\u0440\u043A\u0435\u0440 ${answer.worker} \u0435\u0449\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u043D\u0430\u0434 \u0445\u043E\u0434\u043E\u043C` : `\u0423 \u0432\u043E\u0440\u043A\u0435\u0440\u0430 ${answer.worker} \u043F\u043E\u043A\u0430 \u043D\u0435\u0442 \u043E\u0442\u0432\u0435\u0442\u0430`
|
|
19044
|
+
)
|
|
19045
|
+
);
|
|
19046
|
+
}
|
|
19047
|
+
).pipe(
|
|
19048
|
+
Command_exports.withDescription("Prints the final answer of a worker, without the rest of the turn.")
|
|
19049
|
+
);
|
|
19050
|
+
|
|
19000
19051
|
// packages/cli/src/input/messageSource.ts
|
|
19001
19052
|
var fileOption = Options_exports.file("file", { exists: "either" }).pipe(
|
|
19002
19053
|
Options_exports.withDescription("Reads the text from this file instead of the positional argument."),
|
|
@@ -19049,12 +19100,6 @@ var resolveMessageText = (operation, text11, file6) => {
|
|
|
19049
19100
|
);
|
|
19050
19101
|
};
|
|
19051
19102
|
|
|
19052
|
-
// packages/cli/src/commands/commandOptions.ts
|
|
19053
|
-
var jsonOption = Options_exports.boolean("json");
|
|
19054
|
-
var workerArgument = Args_exports.text({ name: "worker" });
|
|
19055
|
-
var byIdOption = Options_exports.boolean("by-id");
|
|
19056
|
-
var workerSelector = (worker, byId) => byId ? { kind: "id", workerId: worker } : { kind: "alias", alias: worker };
|
|
19057
|
-
|
|
19058
19103
|
// packages/cli/src/commands/askCommands.ts
|
|
19059
19104
|
var askIdArgument = Args_exports.text({ name: "ask-id" });
|
|
19060
19105
|
var answerArgument = Args_exports.text({ name: "answer" }).pipe(Args_exports.optional);
|
|
@@ -19903,7 +19948,7 @@ var campResumeListCommand = Command_exports.make(
|
|
|
19903
19948
|
)
|
|
19904
19949
|
).pipe(Command_exports.withDescription("Lists saved runs of this project that resume can restore."));
|
|
19905
19950
|
var runIdArgument = Args_exports.text({ name: "runId" }).pipe(Args_exports.optional);
|
|
19906
|
-
var selectCampRunOnDemand = (items) => Effect_exports.promise(() => import("./chunk-
|
|
19951
|
+
var selectCampRunOnDemand = (items) => Effect_exports.promise(() => import("./chunk-VLP2ZKVV.js")).pipe(
|
|
19907
19952
|
Effect_exports.flatMap((ui) => ui.selectCampRun({ items }))
|
|
19908
19953
|
);
|
|
19909
19954
|
var selectAndResume = (json) => {
|
|
@@ -19976,7 +20021,7 @@ var rootCommand = Command_exports.make(
|
|
|
19976
20021
|
).pipe(Command_exports.withDescription("Runs and observes a camp of collaborating workers."));
|
|
19977
20022
|
|
|
19978
20023
|
// packages/cli/src/commands/doctorCommand.ts
|
|
19979
|
-
var runDoctorOnDemand = Effect_exports.promise(() => import("./chunk-
|
|
20024
|
+
var runDoctorOnDemand = Effect_exports.promise(() => import("./chunk-4VQ2KUN7.js")).pipe(
|
|
19980
20025
|
Effect_exports.flatMap((doctor) => doctor.runDoctor)
|
|
19981
20026
|
);
|
|
19982
20027
|
var statusLabel = {
|
|
@@ -20515,12 +20560,13 @@ var sendWaitCommand = Command_exports.make(
|
|
|
20515
20560
|
cursor: before.latestCursor,
|
|
20516
20561
|
timeoutMs
|
|
20517
20562
|
});
|
|
20518
|
-
const
|
|
20563
|
+
const page = yield* session.client.WorkerTranscript({
|
|
20519
20564
|
...session.context,
|
|
20520
20565
|
worker: selector,
|
|
20521
20566
|
lastTurn: true
|
|
20522
20567
|
});
|
|
20523
|
-
|
|
20568
|
+
const answer = finalAnswerText(page);
|
|
20569
|
+
return { accepted: true, settled, ...answer === void 0 ? {} : { answer } };
|
|
20524
20570
|
}),
|
|
20525
20571
|
{
|
|
20526
20572
|
operation: "send",
|
|
@@ -20656,6 +20702,7 @@ var command = rootCommand.pipe(
|
|
|
20656
20702
|
listCommand,
|
|
20657
20703
|
statusCommand,
|
|
20658
20704
|
transcriptCommand,
|
|
20705
|
+
answerCommand,
|
|
20659
20706
|
hireCommand,
|
|
20660
20707
|
equipCommand,
|
|
20661
20708
|
interruptCommand,
|
|
@@ -20672,7 +20719,7 @@ var command = rootCommand.pipe(
|
|
|
20672
20719
|
);
|
|
20673
20720
|
var cli = Command_exports.run(command, {
|
|
20674
20721
|
name: "priiisk camp control",
|
|
20675
|
-
version: "0.1.
|
|
20722
|
+
version: "0.1.7"
|
|
20676
20723
|
});
|
|
20677
20724
|
var runCliCommand = (argumentsList) => cli(argumentsList).pipe(
|
|
20678
20725
|
Effect_exports.matchEffect({
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "priiisk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
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-
|
|
11
|
-
"dist/chunk-
|
|
12
|
-
"dist/chunk-
|
|
13
|
-
"dist/chunk-
|
|
14
|
-
"dist/chunk-
|
|
15
|
-
"dist/chunk-
|
|
16
|
-
"dist/chunk-
|
|
17
|
-
"dist/chunk-
|
|
18
|
-
"dist/chunk-
|
|
19
|
-
"dist/chunk-
|
|
10
|
+
"dist/chunk-3V5SHVCX.js",
|
|
11
|
+
"dist/chunk-4VQ2KUN7.js",
|
|
12
|
+
"dist/chunk-7U7PROSV.js",
|
|
13
|
+
"dist/chunk-JND6HOSJ.js",
|
|
14
|
+
"dist/chunk-JND6HOSJ.js.LEGAL.txt",
|
|
15
|
+
"dist/chunk-VLP2ZKVV.js",
|
|
16
|
+
"dist/chunk-WEYE43UO.js",
|
|
17
|
+
"dist/chunk-WEYE43UO.js.LEGAL.txt",
|
|
18
|
+
"dist/chunk-YOW4MMBD.js",
|
|
19
|
+
"dist/chunk-ZUREJQA6.js",
|
|
20
20
|
"dist/priiisk-host.js",
|
|
21
21
|
"dist/priiisk.js",
|
|
22
22
|
"profiles",
|
|
File without changes
|
|
File without changes
|