priiisk 0.1.11 → 0.1.13
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-B22VNB72.js → chunk-7AGSTD6B.js} +3 -3
- package/dist/{chunk-MLUY445T.js → chunk-A4K4VHXE.js} +2 -2
- package/dist/{chunk-2GZC6FBU.js → chunk-GPJJE2V7.js} +9 -4
- package/dist/{chunk-QSUEFL4Z.js → chunk-HK2LW6VV.js} +12 -2
- package/dist/{chunk-JDQWRSCJ.js → chunk-M2NR2CXX.js} +4 -4
- package/dist/{chunk-M5QCPHTJ.js → chunk-RIYKIIGA.js} +13 -68
- package/dist/{chunk-TX5A2GZX.js → chunk-TI75FDW3.js} +2 -2
- package/dist/{chunk-IV6ZFRKR.js → chunk-XVKL4E3L.js} +92 -27
- package/dist/priiisk-host.js +12 -15
- package/dist/priiisk.js +7 -7
- package/package.json +11 -11
- /package/dist/{chunk-2GZC6FBU.js.LEGAL.txt → chunk-GPJJE2V7.js.LEGAL.txt} +0 -0
- /package/dist/{chunk-TX5A2GZX.js.LEGAL.txt → chunk-TI75FDW3.js.LEGAL.txt} +0 -0
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
layerNet,
|
|
21
21
|
makeCampSurfaceName,
|
|
22
22
|
resolveProjectScopeSync
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-GPJJE2V7.js";
|
|
24
24
|
import {
|
|
25
25
|
Clock_exports,
|
|
26
26
|
Config_exports,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
Schedule_exports,
|
|
39
39
|
Schema_exports,
|
|
40
40
|
Stream_exports
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-RIYKIIGA.js";
|
|
42
42
|
|
|
43
43
|
// packages/cli/src/doctor/doctorModel.ts
|
|
44
44
|
var DOCTOR_REPORT_SCHEMA_VERSION = 1;
|
|
@@ -112,7 +112,7 @@ var CliSurfaceSelectionError = class extends Data_exports.TaggedError("CliSurfac
|
|
|
112
112
|
import { randomUUID } from "node:crypto";
|
|
113
113
|
|
|
114
114
|
// packages/cli/src/domain/cliVersion.ts
|
|
115
|
-
var PRIIISK_CLI_VERSION = "0.1.
|
|
115
|
+
var PRIIISK_CLI_VERSION = "0.1.13";
|
|
116
116
|
|
|
117
117
|
// packages/cli/src/client/campRpcConnection.ts
|
|
118
118
|
var reportRetry = (options, diagnostic) => options.onRetry === void 0 ? Console_exports.error(
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
makePlatform,
|
|
29
29
|
makeRunMain,
|
|
30
30
|
stdin
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-GPJJE2V7.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-RIYKIIGA.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-RIYKIIGA.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({
|
|
@@ -10670,7 +10670,7 @@ var describeDirectToolSandbox = (sandbox2) => sandbox2.kind === DirectToolSandbo
|
|
|
10670
10670
|
|
|
10671
10671
|
// packages/protocol/src/domain/protocolVersion.ts
|
|
10672
10672
|
var PRIIISK_PROTOCOL_VERSION = "12";
|
|
10673
|
-
var PRIIISK_PROTOCOL_PACKAGE_VERSION = "0.1.
|
|
10673
|
+
var PRIIISK_PROTOCOL_PACKAGE_VERSION = "0.1.13";
|
|
10674
10674
|
var ProtocolVersionSchema = Schema_exports.String.pipe(Schema_exports.minLength(1));
|
|
10675
10675
|
|
|
10676
10676
|
// packages/protocol/src/domain/protocolIdentifiers.ts
|
|
@@ -13564,7 +13564,7 @@ var CampProtocol = class extends RpcGroup_exports.make(
|
|
|
13564
13564
|
};
|
|
13565
13565
|
|
|
13566
13566
|
// packages/camp-state/src/bootstrap/campHostVersion.ts
|
|
13567
|
-
var PRIIISK_HOST_VERSION = "0.1.
|
|
13567
|
+
var PRIIISK_HOST_VERSION = "0.1.13";
|
|
13568
13568
|
|
|
13569
13569
|
// packages/surface/src/domain/surfaceModel.ts
|
|
13570
13570
|
var NonEmptyString7 = Schema_exports.String.pipe(Schema_exports.minLength(1));
|
|
@@ -13753,7 +13753,12 @@ var CampManifestWorkerSchema = Schema_exports.Struct({
|
|
|
13753
13753
|
lifecycle: Schema_exports.Literal(...Object.values(CampManifestWorkerLifecycle)),
|
|
13754
13754
|
session: CampManifestSessionSchema,
|
|
13755
13755
|
equipment: CampManifestEquipmentSchema,
|
|
13756
|
-
|
|
13756
|
+
/*
|
|
13757
|
+
* Legacy: a worker used to carry a completion policy, and `immediate` ended it
|
|
13758
|
+
* on its first turn — which a long-lived session is not. Records written by an
|
|
13759
|
+
* older runtime keep the field so they still load (priiisk-nss.6.38).
|
|
13760
|
+
*/
|
|
13761
|
+
completionPolicy: Schema_exports.optional(Schema_exports.Literal("immediate", "finalizer")),
|
|
13757
13762
|
topology: CampManifestTopologySchema,
|
|
13758
13763
|
lineage: Schema_exports.optional(
|
|
13759
13764
|
Schema_exports.Struct({
|
|
@@ -30,12 +30,16 @@ import {
|
|
|
30
30
|
PiCampRunSelectorRoot,
|
|
31
31
|
PiCampUiRoot,
|
|
32
32
|
allocateCampUiSectionRows,
|
|
33
|
+
cachedCampUiBlock,
|
|
33
34
|
campUiAskBlockId,
|
|
35
|
+
campUiBlockCacheSize,
|
|
34
36
|
campUiEquipmentBlockRenderer,
|
|
35
37
|
campUiExploredReadPath,
|
|
36
38
|
campUiExploredReadRange,
|
|
39
|
+
campUiMessageSignature,
|
|
37
40
|
campUiPendingAskBlockRenderer,
|
|
38
41
|
campUiPendingAskTargets,
|
|
42
|
+
campUiResultSignature,
|
|
39
43
|
campUiSubscriptionRetryDelay,
|
|
40
44
|
campUiToolResultCacheSize,
|
|
41
45
|
campUiTranscriptBlockRenderer,
|
|
@@ -80,14 +84,15 @@ import {
|
|
|
80
84
|
renderCampUiToolResult,
|
|
81
85
|
renderCampUiWorkerState,
|
|
82
86
|
renderSelectedCampUiRow,
|
|
87
|
+
resetCampUiBlockCache,
|
|
83
88
|
resetCampUiToolResultCache,
|
|
84
89
|
runCampUiPresentationClock,
|
|
85
90
|
sameCampUiRuntimeHealth,
|
|
86
91
|
selectCampRun,
|
|
87
92
|
styleCampUiTone,
|
|
88
93
|
uniqueCampUiNames
|
|
89
|
-
} from "./chunk-
|
|
90
|
-
import "./chunk-
|
|
94
|
+
} from "./chunk-XVKL4E3L.js";
|
|
95
|
+
import "./chunk-RIYKIIGA.js";
|
|
91
96
|
export {
|
|
92
97
|
CAMP_UI_BASH_PREVIEW_LINES,
|
|
93
98
|
CAMP_UI_DEFAULT_TOOL_PREVIEW_LINES,
|
|
@@ -118,12 +123,16 @@ export {
|
|
|
118
123
|
PiCampRunSelectorRoot,
|
|
119
124
|
PiCampUiRoot,
|
|
120
125
|
allocateCampUiSectionRows,
|
|
126
|
+
cachedCampUiBlock,
|
|
121
127
|
campUiAskBlockId,
|
|
128
|
+
campUiBlockCacheSize,
|
|
122
129
|
campUiEquipmentBlockRenderer,
|
|
123
130
|
campUiExploredReadPath,
|
|
124
131
|
campUiExploredReadRange,
|
|
132
|
+
campUiMessageSignature,
|
|
125
133
|
campUiPendingAskBlockRenderer,
|
|
126
134
|
campUiPendingAskTargets,
|
|
135
|
+
campUiResultSignature,
|
|
127
136
|
campUiSubscriptionRetryDelay,
|
|
128
137
|
campUiToolResultCacheSize,
|
|
129
138
|
campUiTranscriptBlockRenderer,
|
|
@@ -168,6 +177,7 @@ export {
|
|
|
168
177
|
renderCampUiToolResult,
|
|
169
178
|
renderCampUiWorkerState,
|
|
170
179
|
renderSelectedCampUiRow,
|
|
180
|
+
resetCampUiBlockCache,
|
|
171
181
|
resetCampUiToolResultCache,
|
|
172
182
|
runCampUiPresentationClock,
|
|
173
183
|
sameCampUiRuntimeHealth,
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
makeDoctorReport,
|
|
9
9
|
resolveCampSurface,
|
|
10
10
|
withCampRpc
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7AGSTD6B.js";
|
|
12
12
|
import {
|
|
13
13
|
PI_RUNTIME_VERSION,
|
|
14
14
|
PiModelCatalogIssueCode,
|
|
15
15
|
inspectPiModelCatalog,
|
|
16
16
|
makePiOperatorResources
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TI75FDW3.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-GPJJE2V7.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-RIYKIIGA.js";
|
|
58
58
|
|
|
59
59
|
// packages/cli/src/doctor/environmentDoctor.ts
|
|
60
60
|
import { dirname } from "node:path";
|
|
@@ -42018,16 +42018,6 @@ var CampCommandSource = {
|
|
|
42018
42018
|
host: "host"
|
|
42019
42019
|
};
|
|
42020
42020
|
var campCompletionEpochEquals = (left3, right3) => left3.generation === right3.generation && left3.counter === right3.counter;
|
|
42021
|
-
var CampCompletionPolicyKind = {
|
|
42022
|
-
immediate: "immediate",
|
|
42023
|
-
finalizer: "finalizer"
|
|
42024
|
-
};
|
|
42025
|
-
var campImmediateCompletionPolicy = {
|
|
42026
|
-
kind: CampCompletionPolicyKind.immediate
|
|
42027
|
-
};
|
|
42028
|
-
var campFinalizerCompletionPolicy = {
|
|
42029
|
-
kind: CampCompletionPolicyKind.finalizer
|
|
42030
|
-
};
|
|
42031
42021
|
var isTerminalCampState = (state) => state === CampWorkerState.completed || state === CampWorkerState.failed || state === CampWorkerState.closed;
|
|
42032
42022
|
|
|
42033
42023
|
// packages/kernel/src/ports/campDelivery.ts
|
|
@@ -43088,12 +43078,11 @@ var commitWorkerCompletion = (runtime6, command, identity6, epoch, result) => Ef
|
|
|
43088
43078
|
if (isTerminalCampState(current2.state)) return;
|
|
43089
43079
|
const resourceState = yield* Ref_exports.get(resource.state);
|
|
43090
43080
|
const pending3 = resourceState.pendingCompletion;
|
|
43091
|
-
if (
|
|
43081
|
+
if (current2.state !== CampWorkerState.idle || current2.completionGeneration !== epoch.generation || pending3 === void 0 || !campCompletionEpochEquals(pending3.epoch, epoch)) {
|
|
43092
43082
|
return yield* Effect_exports.fail(
|
|
43093
43083
|
registryInvalid("kernel.commitCompletion", {
|
|
43094
43084
|
workerId: worker.id,
|
|
43095
43085
|
state: current2.state,
|
|
43096
|
-
policy: resource.completionPolicy.kind,
|
|
43097
43086
|
epoch,
|
|
43098
43087
|
pendingEpoch: pending3?.epoch
|
|
43099
43088
|
})
|
|
@@ -43280,15 +43269,14 @@ var removeWorkerResource = (runtime6, id3, resource) => Ref_exports.update(runti
|
|
|
43280
43269
|
next4.delete(id3);
|
|
43281
43270
|
return next4;
|
|
43282
43271
|
});
|
|
43283
|
-
var prepareWorkerResource = (runtime6, id3,
|
|
43272
|
+
var prepareWorkerResource = (runtime6, id3, completionGeneration) => Effect_exports.gen(function* () {
|
|
43284
43273
|
const scope5 = yield* Scope_exports.fork(runtime6.ownerScope, ExecutionStrategy_exports.sequential);
|
|
43285
43274
|
const resource = {
|
|
43286
43275
|
scope: scope5,
|
|
43287
43276
|
lock: yield* Effect_exports.makeSemaphore(1),
|
|
43288
43277
|
state: yield* Ref_exports.make({
|
|
43289
43278
|
completionEpoch: { generation: completionGeneration, counter: 0 }
|
|
43290
|
-
})
|
|
43291
|
-
completionPolicy
|
|
43279
|
+
})
|
|
43292
43280
|
};
|
|
43293
43281
|
const inserted = yield* Ref_exports.modify(
|
|
43294
43282
|
runtime6.resources,
|
|
@@ -43311,26 +43299,6 @@ var releaseWorkerResource = (runtime6, id3, resource) => Scope_exports.close(res
|
|
|
43311
43299
|
Effect_exports.uninterruptible
|
|
43312
43300
|
);
|
|
43313
43301
|
|
|
43314
|
-
// packages/kernel/src/services/campTurnCompletion.ts
|
|
43315
|
-
var interruptedTurnFinalization = (worker, outcome, code) => ({
|
|
43316
|
-
kind: "interrupted",
|
|
43317
|
-
error: { code, message: outcome.errorMessage ?? outcome.stopReason },
|
|
43318
|
-
resumeSource: worker.resumeSource ?? { value: worker.id }
|
|
43319
|
-
});
|
|
43320
|
-
var turnFinalizationByStopReason = {
|
|
43321
|
-
[CampTurnStopReason.stop]: (_worker, outcome) => ({
|
|
43322
|
-
kind: "completed",
|
|
43323
|
-
result: { text: outcome.text, completedAt: outcome.timestamp }
|
|
43324
|
-
}),
|
|
43325
|
-
[CampTurnStopReason.aborted]: () => ({
|
|
43326
|
-
kind: "closed",
|
|
43327
|
-
reason: { code: CampCancellationCode.aborted }
|
|
43328
|
-
}),
|
|
43329
|
-
[CampTurnStopReason.error]: (worker, outcome) => interruptedTurnFinalization(worker, outcome, CampFailureCode.providerError),
|
|
43330
|
-
[CampTurnStopReason.unknown]: (worker, outcome) => interruptedTurnFinalization(worker, outcome, CampFailureCode.unknown)
|
|
43331
|
-
};
|
|
43332
|
-
var finalizationForTurnOutcome = (worker, outcome) => turnFinalizationByStopReason[outcome.stopReason](worker, outcome);
|
|
43333
|
-
|
|
43334
43302
|
// packages/kernel/src/runtime/kernel/campKernelSessionEvents.ts
|
|
43335
43303
|
var transitionSessionState = (runtime6, id3, state, updatedAt) => runtime6.registry.require(workerIdIdentity(id3)).pipe(
|
|
43336
43304
|
Effect_exports.flatMap(
|
|
@@ -43414,9 +43382,7 @@ var handleSessionEvent = (runtime6, id3, event) => Effect_exports.gen(function*
|
|
|
43414
43382
|
return { kind: "status_report", worker, payload: event.payload };
|
|
43415
43383
|
}
|
|
43416
43384
|
if (event.kind === CampSessionEventKind.turnCompleted) {
|
|
43417
|
-
const continues = resource.completionPolicy.kind === CampCompletionPolicyKind.finalizer;
|
|
43418
43385
|
const epoch = yield* Ref_exports.modify(resource.state, (state) => {
|
|
43419
|
-
if (!continues) return [state.completionEpoch, state];
|
|
43420
43386
|
const nextEpoch = {
|
|
43421
43387
|
generation: state.completionEpoch.generation,
|
|
43422
43388
|
counter: state.completionEpoch.counter + 1
|
|
@@ -43433,7 +43399,7 @@ var handleSessionEvent = (runtime6, id3, event) => Effect_exports.gen(function*
|
|
|
43433
43399
|
return {
|
|
43434
43400
|
kind: "turn_completed",
|
|
43435
43401
|
worker,
|
|
43436
|
-
payload: { outcome: event.payload.outcome, epoch
|
|
43402
|
+
payload: { outcome: event.payload.outcome, epoch }
|
|
43437
43403
|
};
|
|
43438
43404
|
}
|
|
43439
43405
|
return yield* Effect_exports.die("unreachable session event");
|
|
@@ -43531,18 +43497,13 @@ var activateWorker = (runtime6, worker, resource, command, activation) => Effect
|
|
|
43531
43497
|
boundAt
|
|
43532
43498
|
) : runtime6.registry.bindSession(worker.id, session.sessionRef, session.checkpoint, boundAt);
|
|
43533
43499
|
yield* Effect_exports.acquireRelease(
|
|
43534
|
-
|
|
43535
|
-
|
|
43536
|
-
|
|
43537
|
-
|
|
43538
|
-
|
|
43539
|
-
|
|
43540
|
-
|
|
43541
|
-
finalizationForTurnOutcome(worker, event.payload.outcome)
|
|
43542
|
-
).pipe(Effect_exports.asVoid) : Effect_exports.void
|
|
43543
|
-
)
|
|
43544
|
-
)
|
|
43545
|
-
),
|
|
43500
|
+
/*
|
|
43501
|
+
* A completed turn is a boundary of work, not the end of a worker: the
|
|
43502
|
+
* session stays open and takes the next assignment. Finalizing here
|
|
43503
|
+
* turned a turn that had exhausted its provider retries into a terminal
|
|
43504
|
+
* worker and closed the session under it (priiisk-nss.6.38).
|
|
43505
|
+
*/
|
|
43506
|
+
session.subscribe((event) => handleSessionEvent(runtime6, worker.id, event)),
|
|
43546
43507
|
(unsubscribe) => unsubscribe.pipe(Effect_exports.ignore)
|
|
43547
43508
|
).pipe(Scope_exports.extend(resource.scope));
|
|
43548
43509
|
yield* Ref_exports.update(resource.state, (state) => ({ ...state, mcpScope, mcpView }));
|
|
@@ -43599,12 +43560,7 @@ var makeKernelRecover = (runtime6) => (command, request2) => Effect_exports.gen(
|
|
|
43599
43560
|
}
|
|
43600
43561
|
return yield* Effect_exports.gen(function* () {
|
|
43601
43562
|
const completionGeneration = current2.completionGeneration + 1;
|
|
43602
|
-
const resource = yield* prepareWorkerResource(
|
|
43603
|
-
runtime6,
|
|
43604
|
-
current2.id,
|
|
43605
|
-
current2.completionPolicy ?? campImmediateCompletionPolicy,
|
|
43606
|
-
completionGeneration
|
|
43607
|
-
);
|
|
43563
|
+
const resource = yield* prepareWorkerResource(runtime6, current2.id, completionGeneration);
|
|
43608
43564
|
const updatedAt = yield* Clock_exports.currentTimeMillis;
|
|
43609
43565
|
const transition = yield* Effect_exports.exit(
|
|
43610
43566
|
runtime6.registry.transition(current2.id, {
|
|
@@ -43664,7 +43620,6 @@ var makeKernelRestore = (runtime6) => (command, request2) => Effect_exports.gen(
|
|
|
43664
43620
|
const resource = yield* prepareWorkerResource(
|
|
43665
43621
|
runtime6,
|
|
43666
43622
|
registered.id,
|
|
43667
|
-
registered.completionPolicy ?? campImmediateCompletionPolicy,
|
|
43668
43623
|
registered.completionGeneration
|
|
43669
43624
|
);
|
|
43670
43625
|
return yield* activateWorker(runtime6, registered, resource, command, {
|
|
@@ -43726,7 +43681,6 @@ var makeKernelSpawn = (runtime6) => (command, request2) => Effect_exports.gen(fu
|
|
|
43726
43681
|
const equipment = yield* runtime6.equipmentResolver.resolve(request2.equipment);
|
|
43727
43682
|
const id3 = yield* makeKernelWorkerId;
|
|
43728
43683
|
const createdAt = yield* Clock_exports.currentTimeMillis;
|
|
43729
|
-
const completionPolicy = request2.completionPolicy === void 0 ? campImmediateCompletionPolicy : { ...request2.completionPolicy };
|
|
43730
43684
|
const previous2 = request2.continuation === void 0 ? void 0 : yield* runtime6.registry.require(
|
|
43731
43685
|
workerIdIdentity(request2.continuation.resumedFromWorkerId)
|
|
43732
43686
|
);
|
|
@@ -43747,12 +43701,7 @@ var makeKernelSpawn = (runtime6) => (command, request2) => Effect_exports.gen(fu
|
|
|
43747
43701
|
const effectiveEquipment = executionLimits === void 0 ? equipment : { ...equipment, executionLimits };
|
|
43748
43702
|
return yield* Effect_exports.gen(function* () {
|
|
43749
43703
|
const completionGeneration = 0;
|
|
43750
|
-
const resource = yield* prepareWorkerResource(
|
|
43751
|
-
runtime6,
|
|
43752
|
-
id3,
|
|
43753
|
-
completionPolicy,
|
|
43754
|
-
completionGeneration
|
|
43755
|
-
);
|
|
43704
|
+
const resource = yield* prepareWorkerResource(runtime6, id3, completionGeneration);
|
|
43756
43705
|
const registration = yield* Effect_exports.exit(
|
|
43757
43706
|
runtime6.registry.register({
|
|
43758
43707
|
id: id3,
|
|
@@ -43761,7 +43710,6 @@ var makeKernelSpawn = (runtime6) => (command, request2) => Effect_exports.gen(fu
|
|
|
43761
43710
|
state: CampWorkerState.queued,
|
|
43762
43711
|
sessionState: CampSessionState.pending,
|
|
43763
43712
|
equipment: effectiveEquipment,
|
|
43764
|
-
...request2.completionPolicy === void 0 ? {} : { completionPolicy },
|
|
43765
43713
|
topology,
|
|
43766
43714
|
completionGeneration,
|
|
43767
43715
|
version: 0,
|
|
@@ -44748,9 +44696,6 @@ export {
|
|
|
44748
44696
|
CampSessionState,
|
|
44749
44697
|
CampDeliveryMode,
|
|
44750
44698
|
CampCommandSource,
|
|
44751
|
-
CampCompletionPolicyKind,
|
|
44752
|
-
campImmediateCompletionPolicy,
|
|
44753
|
-
campFinalizerCompletionPolicy,
|
|
44754
44699
|
CampAskState,
|
|
44755
44700
|
CampAskRouter,
|
|
44756
44701
|
CampDeliveryPort,
|
|
@@ -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-GPJJE2V7.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-RIYKIIGA.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({
|
|
@@ -8,11 +8,12 @@ import {
|
|
|
8
8
|
Data_exports,
|
|
9
9
|
Deferred_exports,
|
|
10
10
|
Effect_exports,
|
|
11
|
+
Exit_exports,
|
|
11
12
|
FiberSet_exports,
|
|
12
13
|
Match_exports,
|
|
13
14
|
Stream_exports,
|
|
14
15
|
SubscriptionRef_exports
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RIYKIIGA.js";
|
|
16
17
|
|
|
17
18
|
// packages/host-ui/src/backend/campUiBackend.ts
|
|
18
19
|
var CampUiBackendError = class extends Data_exports.TaggedError("CampUiBackendError") {
|
|
@@ -795,7 +796,14 @@ var workerStatePresentation = /* @__PURE__ */ new Map([
|
|
|
795
796
|
/* A bounded wait, not a failure: the session and the transcript are still there. */
|
|
796
797
|
["retrying", { label: "retrying", tone: CampUiTone.attention, glyph: CampUiGlyph.attention }],
|
|
797
798
|
["idle", { label: "idle", tone: CampUiTone.neutral, glyph: CampUiGlyph.neutral }],
|
|
798
|
-
|
|
799
|
+
/*
|
|
800
|
+
* Attention, not a failure: an interrupted turn leaves the session alive and
|
|
801
|
+
* the next message continues the work.
|
|
802
|
+
*/
|
|
803
|
+
[
|
|
804
|
+
"interrupted",
|
|
805
|
+
{ label: "interrupted", tone: CampUiTone.attention, glyph: CampUiGlyph.attention }
|
|
806
|
+
],
|
|
799
807
|
["recovering", { label: "recovering", tone: CampUiTone.attention, glyph: CampUiGlyph.attention }],
|
|
800
808
|
["completed", { label: "done", tone: CampUiTone.success, glyph: CampUiGlyph.success }],
|
|
801
809
|
["failed", { label: "error", tone: CampUiTone.error, glyph: CampUiGlyph.error }],
|
|
@@ -806,14 +814,16 @@ var fallbackWorkerPresentation = {
|
|
|
806
814
|
tone: CampUiTone.neutral,
|
|
807
815
|
glyph: CampUiGlyph.neutral
|
|
808
816
|
};
|
|
817
|
+
var attentionStates = /* @__PURE__ */ new Set(["waiting_for_orchestrator", "recovering", "retrying"]);
|
|
809
818
|
var renderCampUiWorkerState = (state, options) => {
|
|
810
819
|
const base = workerStatePresentation.get(state) ?? fallbackWorkerPresentation;
|
|
811
820
|
const terminal = state === "completed" || state === "closed";
|
|
821
|
+
const streamingLifts = !terminal && options.streaming && !attentionStates.has(state);
|
|
812
822
|
const presentation = options.failed || state === "failed" || state === "interrupted" ? workerStatePresentation.get(state === "interrupted" ? "interrupted" : "failed") : !terminal && options.pendingAsks > 0 ? {
|
|
813
823
|
label: options.pendingAsks === 1 ? "ask" : `ask ${options.pendingAsks}`,
|
|
814
824
|
tone: CampUiTone.attention,
|
|
815
825
|
glyph: CampUiGlyph.attention
|
|
816
|
-
} :
|
|
826
|
+
} : streamingLifts ? workerStatePresentation.get("running") : base;
|
|
817
827
|
const resolved = presentation ?? fallbackWorkerPresentation;
|
|
818
828
|
return renderCampUiStatus(resolved.label, resolved.tone, resolved.glyph);
|
|
819
829
|
};
|
|
@@ -974,6 +984,38 @@ ${jsonText(content.value)}
|
|
|
974
984
|
}
|
|
975
985
|
};
|
|
976
986
|
|
|
987
|
+
// packages/host-ui/src/pi/blocks/campUiBlockCache.ts
|
|
988
|
+
var CAMP_UI_BLOCK_CACHE_LIMIT = 512;
|
|
989
|
+
var renderedBlocks = /* @__PURE__ */ new Map();
|
|
990
|
+
var resetCampUiBlockCache = () => {
|
|
991
|
+
renderedBlocks.clear();
|
|
992
|
+
};
|
|
993
|
+
var campUiBlockCacheSize = () => renderedBlocks.size;
|
|
994
|
+
var remember = (key, lines) => {
|
|
995
|
+
if (renderedBlocks.size >= CAMP_UI_BLOCK_CACHE_LIMIT) {
|
|
996
|
+
const oldest = renderedBlocks.keys().next();
|
|
997
|
+
if (!oldest.done) renderedBlocks.delete(oldest.value);
|
|
998
|
+
}
|
|
999
|
+
renderedBlocks.set(key, lines);
|
|
1000
|
+
return lines;
|
|
1001
|
+
};
|
|
1002
|
+
var cachedCampUiBlock = (key, render) => {
|
|
1003
|
+
const cached = renderedBlocks.get(key);
|
|
1004
|
+
if (cached !== void 0) return cached;
|
|
1005
|
+
return remember(key, render());
|
|
1006
|
+
};
|
|
1007
|
+
var campUiMessageSignature = (message) => {
|
|
1008
|
+
let text = 0;
|
|
1009
|
+
for (const content of message.content) {
|
|
1010
|
+
if (content.kind === "text" || content.kind === "thinking") text += content.text.length;
|
|
1011
|
+
if (content.kind === "tool-call") text += content.toolCallId.length;
|
|
1012
|
+
}
|
|
1013
|
+
return `${message.role}:${message.toolName ?? ""}:${String(message.content.length)}:${String(
|
|
1014
|
+
text
|
|
1015
|
+
)}:${String(message.errorMessage?.length ?? 0)}:${message.isError === true ? "1" : "0"}`;
|
|
1016
|
+
};
|
|
1017
|
+
var campUiResultSignature = (result) => result === void 0 ? "pending" : campUiMessageSignature(result);
|
|
1018
|
+
|
|
977
1019
|
// packages/host-ui/src/pi/blocks/campUiComposer.ts
|
|
978
1020
|
import { getMarkdownTheme as getMarkdownTheme3, getSelectListTheme as getSelectListTheme4 } from "@earendil-works/pi-coding-agent";
|
|
979
1021
|
import { Editor, Key, matchesKey } from "@earendil-works/pi-tui";
|
|
@@ -1081,7 +1123,7 @@ var renderMcpServers = (equipment) => renderNames(
|
|
|
1081
1123
|
})
|
|
1082
1124
|
);
|
|
1083
1125
|
var equipmentMarkdown = (equipment) => {
|
|
1084
|
-
const role = equipment.role ?? equipment.preset ?? "
|
|
1126
|
+
const role = equipment.role ?? equipment.preset ?? "unknown";
|
|
1085
1127
|
const tools = [.../* @__PURE__ */ new Set([...equipment.builtinTools, ...equipment.customToolNames])].sort();
|
|
1086
1128
|
const lines = [
|
|
1087
1129
|
`**Equipment \xB7 ${escapeMarkdown(role)}**`,
|
|
@@ -1302,7 +1344,7 @@ var cacheKey = (result, width, expanded, plainText) => result.toolCallId === voi
|
|
|
1302
1344
|
// The tool name is part of the key because it chooses the preview budget.
|
|
1303
1345
|
`${result.toolCallId}:${result.toolName ?? ""}:${String(width)}:${expanded ? "1" : "0"}:${String(plainText.length)}`
|
|
1304
1346
|
);
|
|
1305
|
-
var
|
|
1347
|
+
var remember2 = (key, lines) => {
|
|
1306
1348
|
if (renderedResults.size >= CAMP_UI_TOOL_RESULT_CACHE_LIMIT) {
|
|
1307
1349
|
const oldest = renderedResults.keys().next();
|
|
1308
1350
|
if (!oldest.done) renderedResults.delete(oldest.value);
|
|
@@ -1325,7 +1367,7 @@ var renderCampUiToolResult = (result, width, expanded) => {
|
|
|
1325
1367
|
previewLinesByTool.get(result.toolName ?? "") ?? CAMP_UI_DEFAULT_TOOL_PREVIEW_LINES,
|
|
1326
1368
|
boundedWidth
|
|
1327
1369
|
);
|
|
1328
|
-
const keep = (lines2) => key === void 0 ? lines2 :
|
|
1370
|
+
const keep = (lines2) => key === void 0 ? lines2 : remember2(key, lines2);
|
|
1329
1371
|
if (!expanded) {
|
|
1330
1372
|
return keep([
|
|
1331
1373
|
...preview.visualLines,
|
|
@@ -1472,9 +1514,12 @@ var renderTranscript = (transcript, width, expandedDetailBlockIds) => {
|
|
|
1472
1514
|
const first = group[0];
|
|
1473
1515
|
if (first === void 0) return;
|
|
1474
1516
|
const blockId = `explored:${first.toolCallId}`;
|
|
1517
|
+
const expanded = expandedDetailBlockIds.has(blockId);
|
|
1518
|
+
const reads = group;
|
|
1519
|
+
const key = `${blockId}:${String(width)}:${expanded ? "1" : "0"}:${reads.map((read) => `${read.toolCallId}${read.status}`).join(",")}`;
|
|
1475
1520
|
blocks.push({
|
|
1476
1521
|
id: blockId,
|
|
1477
|
-
lines: renderCampUiExploredGroup(
|
|
1522
|
+
lines: cachedCampUiBlock(key, () => renderCampUiExploredGroup(reads, width, expanded)),
|
|
1478
1523
|
toggleable: true
|
|
1479
1524
|
});
|
|
1480
1525
|
group = [];
|
|
@@ -1485,14 +1530,21 @@ var renderTranscript = (transcript, width, expandedDetailBlockIds) => {
|
|
|
1485
1530
|
if (message.toolCallId !== void 0 && callIds.has(message.toolCallId)) return;
|
|
1486
1531
|
closeGroup();
|
|
1487
1532
|
const blockId = `tool-result:${messageId}`;
|
|
1533
|
+
const expanded = expandedDetailBlockIds.has(blockId);
|
|
1488
1534
|
blocks.push({
|
|
1489
1535
|
id: blockId,
|
|
1490
|
-
lines:
|
|
1536
|
+
lines: cachedCampUiBlock(
|
|
1537
|
+
`${blockId}:${String(width)}:${expanded ? "1" : "0"}:${campUiMessageSignature(message)}`,
|
|
1538
|
+
() => renderUnmatchedToolResult(message, width, expanded)
|
|
1539
|
+
),
|
|
1491
1540
|
toggleable: true
|
|
1492
1541
|
});
|
|
1493
1542
|
return;
|
|
1494
1543
|
}
|
|
1495
|
-
const messageLines =
|
|
1544
|
+
const messageLines = cachedCampUiBlock(
|
|
1545
|
+
`message:${messageId}:${String(width)}:${campUiMessageSignature(message)}`,
|
|
1546
|
+
() => renderMessage(message, width)
|
|
1547
|
+
);
|
|
1496
1548
|
if (messageLines.length > 0) {
|
|
1497
1549
|
closeGroup();
|
|
1498
1550
|
blocks.push({ id: `message:${messageId}`, lines: messageLines });
|
|
@@ -1506,13 +1558,13 @@ var renderTranscript = (transcript, width, expandedDetailBlockIds) => {
|
|
|
1506
1558
|
}
|
|
1507
1559
|
closeGroup();
|
|
1508
1560
|
const blockId = `tool-call:${content.toolCallId}`;
|
|
1561
|
+
const expanded = expandedDetailBlockIds.has(blockId);
|
|
1562
|
+
const result = results.get(content.toolCallId);
|
|
1509
1563
|
blocks.push({
|
|
1510
1564
|
id: blockId,
|
|
1511
|
-
lines:
|
|
1512
|
-
content
|
|
1513
|
-
|
|
1514
|
-
width,
|
|
1515
|
-
expandedDetailBlockIds.has(blockId)
|
|
1565
|
+
lines: cachedCampUiBlock(
|
|
1566
|
+
`${blockId}:${content.toolName}:${String(width)}:${expanded ? "1" : "0"}:${campUiResultSignature(result)}`,
|
|
1567
|
+
() => renderToolCall(content, result, width, expanded)
|
|
1516
1568
|
),
|
|
1517
1569
|
toggleable: results.has(content.toolCallId)
|
|
1518
1570
|
});
|
|
@@ -1704,7 +1756,7 @@ var makeCampUiRoster = (context) => ({
|
|
|
1704
1756
|
const pendingAsks = entry.asks.filter((ask) => ask.state === "pending").length;
|
|
1705
1757
|
const tool = active.length === 0 ? "" : styleCampUiTone(CampUiTone.active, ` ${active.slice(0, 2).join(", ")}`);
|
|
1706
1758
|
const label = selected ? theme.selectedText(name) : name;
|
|
1707
|
-
const role = theme.description(`(${worker.equipment.role ?? "
|
|
1759
|
+
const role = theme.description(`(${worker.equipment.role ?? "unknown"})`);
|
|
1708
1760
|
const status = renderCampUiWorkerState(worker.state, {
|
|
1709
1761
|
failed: entry.error !== void 0,
|
|
1710
1762
|
pendingAsks,
|
|
@@ -1736,8 +1788,10 @@ var makeCampUiSessionHeader = (context) => ({
|
|
|
1736
1788
|
const worker = findCampUiWorker(model.snapshot, workerId);
|
|
1737
1789
|
if (worker === void 0) return [theme.noMatch("Worker unavailable")];
|
|
1738
1790
|
const workerName = worker.snapshot.worker.alias ?? workerId.slice(0, 8);
|
|
1739
|
-
const role = worker.snapshot.worker.equipment.role ?? "
|
|
1740
|
-
const
|
|
1791
|
+
const role = worker.snapshot.worker.equipment.role ?? "unknown";
|
|
1792
|
+
const focused = model.state.focusedSlotId === CampUiSlot.transcript;
|
|
1793
|
+
const title = `camp / ${workerName}`;
|
|
1794
|
+
const line = `${focused ? theme.selectedText(title) : theme.description(title)} ${theme.description(`\xB7 ${role} \xB7 session ${worker.snapshot.worker.sessionState}`)}`;
|
|
1741
1795
|
return [fitCampUiLine(line, viewport.width)];
|
|
1742
1796
|
},
|
|
1743
1797
|
handlePointer: (pointer) => pointer.action === "press" && pointer.button === "left" && pointer.y === 0 ? [
|
|
@@ -1761,18 +1815,20 @@ var aggregateCampUsage = (workers) => {
|
|
|
1761
1815
|
};
|
|
1762
1816
|
};
|
|
1763
1817
|
var aggregateUsageText = (usage) => {
|
|
1818
|
+
const partial = usage.reportedWorkers < usage.totalWorkers;
|
|
1819
|
+
const coverage = partial ? ` \xB7 ${usage.reportedWorkers}/${usage.totalWorkers} reported` : "";
|
|
1764
1820
|
if (usage.totalWorkers > 0 && usage.reportedWorkers === 0) {
|
|
1765
|
-
return
|
|
1821
|
+
return `tokens unknown \xB7 cost unknown${coverage}`;
|
|
1766
1822
|
}
|
|
1767
|
-
const partial = usage.reportedWorkers < usage.totalWorkers;
|
|
1768
1823
|
const lowerBound = partial ? "\u2265" : "";
|
|
1769
|
-
const coverage = partial ? ` \xB7 ${usage.reportedWorkers}/${usage.totalWorkers} reported` : "";
|
|
1770
1824
|
return `\u2193 ${lowerBound}${compactNumber(usage.tokens)} tokens \xB7 ${lowerBound}$${usage.cost.toFixed(3)}${coverage}`;
|
|
1771
1825
|
};
|
|
1772
1826
|
var footerDivider = (width) => fitCampUiLine(getMarkdownTheme8().codeBlockBorder("\u2500".repeat(width)), width);
|
|
1773
|
-
var retryText = (retryAt, now) => {
|
|
1774
|
-
if (retryAt === void 0) return ""
|
|
1775
|
-
|
|
1827
|
+
var retryText = (retryAt, attempt, now) => {
|
|
1828
|
+
if (retryAt === void 0) return attempt === void 0 ? "" : `attempt ${String(attempt)}`;
|
|
1829
|
+
const seconds = Math.max(0, Math.ceil((retryAt - now) / 1e3));
|
|
1830
|
+
const numbered = attempt === void 0 ? "" : `attempt ${String(attempt)} \xB7 `;
|
|
1831
|
+
return `${numbered}retry in ${String(seconds)}s`;
|
|
1776
1832
|
};
|
|
1777
1833
|
var diagnosticText = (value) => {
|
|
1778
1834
|
const normalized = value?.replaceAll(/\s+/gu, " ").trim();
|
|
@@ -1789,7 +1845,7 @@ var makeCampUiCampFooter = (context) => ({
|
|
|
1789
1845
|
const healthMessage = health.code === void 0 ? healthSummary : healthSummary === void 0 ? health.code : `${health.code} \xB7 ${healthSummary}`;
|
|
1790
1846
|
const healthTone = health.status === CampUiHealthStatus.failed ? CampUiTone.error : CampUiTone.attention;
|
|
1791
1847
|
const diagnostic = actionError !== void 0 ? `${renderCampUiStatus("action error", CampUiTone.error)} ${theme.description(`\xB7 ${actionError}`)}` : healthMessage !== void 0 ? styleCampUiTone(healthTone, healthMessage) : health.status === CampUiHealthStatus.ready ? "" : renderCampUiStatus(health.status, healthTone);
|
|
1792
|
-
const retry = retryText(health.retryAt, model.state.presentationNow);
|
|
1848
|
+
const retry = retryText(health.retryAt, health.attempt, model.state.presentationNow);
|
|
1793
1849
|
return [
|
|
1794
1850
|
footerDivider(viewport.width),
|
|
1795
1851
|
joinCampUiColumns(diagnostic, theme.description(usage), viewport.width),
|
|
@@ -2402,6 +2458,7 @@ var makeCampUiTerminalModes = (terminal) => {
|
|
|
2402
2458
|
};
|
|
2403
2459
|
|
|
2404
2460
|
// packages/host-ui/src/pi/mountPiCampUi.ts
|
|
2461
|
+
var closedOnPurpose = (exit) => Exit_exports.isSuccess(exit) || Cause_exports.isInterruptedOnly(exit.cause);
|
|
2405
2462
|
var mountPiCampUi = (options) => Effect_exports.gen(function* () {
|
|
2406
2463
|
const startedAt = yield* Clock_exports.currentTimeMillis;
|
|
2407
2464
|
const healthRef = yield* SubscriptionRef_exports.make({
|
|
@@ -2472,11 +2529,14 @@ var mountPiCampUi = (options) => Effect_exports.gen(function* () {
|
|
|
2472
2529
|
tui.start();
|
|
2473
2530
|
});
|
|
2474
2531
|
yield* Effect_exports.addFinalizer(
|
|
2475
|
-
() => Effect_exports.sync(() => {
|
|
2532
|
+
(exit) => Effect_exports.sync(() => {
|
|
2476
2533
|
tui.stop();
|
|
2477
2534
|
terminal.setProgress(false);
|
|
2478
2535
|
}).pipe(
|
|
2479
|
-
Effect_exports.zipRight(setHealth({ status: CampUiRuntimeStatus.stopped, operation: "ui.stop" }))
|
|
2536
|
+
Effect_exports.zipRight(setHealth({ status: CampUiRuntimeStatus.stopped, operation: "ui.stop" })),
|
|
2537
|
+
Effect_exports.zipRight(
|
|
2538
|
+
closedOnPurpose(exit) ? options.backend.shutdown.pipe(Effect_exports.ignore) : Effect_exports.void
|
|
2539
|
+
)
|
|
2480
2540
|
)
|
|
2481
2541
|
);
|
|
2482
2542
|
yield* Effect_exports.forkScoped(
|
|
@@ -2555,7 +2615,7 @@ var mountPiCampUi = (options) => Effect_exports.gen(function* () {
|
|
|
2555
2615
|
};
|
|
2556
2616
|
});
|
|
2557
2617
|
|
|
2558
|
-
// packages/host-ui/src/run-selector/campRunSelector.ts
|
|
2618
|
+
// packages/host-ui/src/pi/run-selector/campRunSelector.ts
|
|
2559
2619
|
import { getMarkdownTheme as getMarkdownTheme11, getSelectListTheme as getSelectListTheme13, initTheme as initTheme2 } from "@earendil-works/pi-coding-agent";
|
|
2560
2620
|
import {
|
|
2561
2621
|
Key as Key4,
|
|
@@ -2711,6 +2771,11 @@ export {
|
|
|
2711
2771
|
renderCampUiDirectedBlock,
|
|
2712
2772
|
campUiPendingAskBlockRenderer,
|
|
2713
2773
|
CampUiAssistantMessage,
|
|
2774
|
+
resetCampUiBlockCache,
|
|
2775
|
+
campUiBlockCacheSize,
|
|
2776
|
+
cachedCampUiBlock,
|
|
2777
|
+
campUiMessageSignature,
|
|
2778
|
+
campUiResultSignature,
|
|
2714
2779
|
makeCampUiComposerComponent,
|
|
2715
2780
|
campUiEquipmentBlockRenderer,
|
|
2716
2781
|
renderCampUiPanel,
|
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-A4K4VHXE.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-XVKL4E3L.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-TI75FDW3.js";
|
|
23
23
|
import {
|
|
24
24
|
AgentRole,
|
|
25
25
|
AgentRoleSchema,
|
|
@@ -101,12 +101,11 @@ import {
|
|
|
101
101
|
runningCampManifest,
|
|
102
102
|
saveCampHealth,
|
|
103
103
|
saveCampManifest
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-GPJJE2V7.js";
|
|
105
105
|
import {
|
|
106
106
|
CampAskRouter,
|
|
107
107
|
CampCancellationCode,
|
|
108
108
|
CampCommandSource,
|
|
109
|
-
CampCompletionPolicyKind,
|
|
110
109
|
CampControlToolName,
|
|
111
110
|
CampDeliveryMode,
|
|
112
111
|
CampEquipmentError,
|
|
@@ -159,8 +158,6 @@ import {
|
|
|
159
158
|
addFinalizer2 as addFinalizer,
|
|
160
159
|
async,
|
|
161
160
|
campControlToolNames,
|
|
162
|
-
campFinalizerCompletionPolicy,
|
|
163
|
-
campImmediateCompletionPolicy,
|
|
164
161
|
campOrchestratorAbortReason,
|
|
165
162
|
catchAllCause,
|
|
166
163
|
close,
|
|
@@ -194,7 +191,7 @@ import {
|
|
|
194
191
|
withFiberRuntime,
|
|
195
192
|
workerAliasIdentity,
|
|
196
193
|
workerIdIdentity
|
|
197
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-RIYKIIGA.js";
|
|
198
195
|
|
|
199
196
|
// node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js
|
|
200
197
|
var require_constants = __commonJS({
|
|
@@ -11990,7 +11987,6 @@ var manifestWorkerFromRecord = (worker, completionEpoch) => ({
|
|
|
11990
11987
|
lifecycle: workerLifecycle(worker),
|
|
11991
11988
|
session: workerSession(worker),
|
|
11992
11989
|
equipment: worker.equipment,
|
|
11993
|
-
completionPolicy: worker.completionPolicy?.kind ?? CampCompletionPolicyKind.immediate,
|
|
11994
11990
|
topology: worker.topology,
|
|
11995
11991
|
...worker.lineage === void 0 ? {} : { lineage: worker.lineage },
|
|
11996
11992
|
completionEpoch,
|
|
@@ -12428,8 +12424,7 @@ var CampHostOperationsLive = Layer_exports.effect(
|
|
|
12428
12424
|
...input.alias === void 0 ? {} : { alias: input.alias },
|
|
12429
12425
|
prompt: input.prompt,
|
|
12430
12426
|
cwd: input.cwd ?? runtime2.project.cwd,
|
|
12431
|
-
equipment: input.equipment
|
|
12432
|
-
completionPolicy: campFinalizerCompletionPolicy
|
|
12427
|
+
equipment: input.equipment
|
|
12433
12428
|
})
|
|
12434
12429
|
)
|
|
12435
12430
|
),
|
|
@@ -12601,7 +12596,6 @@ var workerRecordFromManifest = (worker, resumeSource) => {
|
|
|
12601
12596
|
sessionState: checkpoint === void 0 ? CampSessionState.pending : CampSessionState.closed,
|
|
12602
12597
|
...checkpoint === void 0 ? {} : { sessionCheckpoint: checkpoint },
|
|
12603
12598
|
equipment: equipmentFromManifest(worker.equipment),
|
|
12604
|
-
completionPolicy: worker.completionPolicy === CampCompletionPolicyKind.finalizer ? campFinalizerCompletionPolicy : campImmediateCompletionPolicy,
|
|
12605
12599
|
topology: {
|
|
12606
12600
|
...worker.topology.parentWorkerId === void 0 ? {} : { parentWorkerId: makeCampWorkerId(worker.topology.parentWorkerId) },
|
|
12607
12601
|
treeRootWorkerId: makeCampWorkerId(worker.topology.treeRootWorkerId),
|
|
@@ -22451,7 +22445,7 @@ var Client = class extends Protocol {
|
|
|
22451
22445
|
};
|
|
22452
22446
|
|
|
22453
22447
|
// packages/mcp-backend/src/connections/clientIdentity.ts
|
|
22454
|
-
var backendVersion = "0.1.
|
|
22448
|
+
var backendVersion = "0.1.13";
|
|
22455
22449
|
|
|
22456
22450
|
// packages/mcp-backend/src/connections/mcpFailure.ts
|
|
22457
22451
|
var McpFailure = class extends Data_exports.TaggedError("McpFailure") {
|
|
@@ -27035,7 +27029,9 @@ var makeHostCampUiSnapshot = (options, revision, activityRevisions) => Effect_ex
|
|
|
27035
27029
|
(component) => component.message ?? `${component.id}: ${component.status}`
|
|
27036
27030
|
)
|
|
27037
27031
|
].join("; ");
|
|
27038
|
-
const
|
|
27032
|
+
const retrying = unhealthyComponents.filter((component) => component.nextRetryAt !== void 0).sort((left, right) => (left.nextRetryAt ?? 0) - (right.nextRetryAt ?? 0))[0];
|
|
27033
|
+
const retryAt = retrying?.nextRetryAt;
|
|
27034
|
+
const attempt = retrying?.attempt;
|
|
27039
27035
|
return {
|
|
27040
27036
|
displayName: `priiisk-camp-${options.project.name.replaceAll(/[^a-zA-Z0-9_-]+/gu, "-")}-${options.project.hash.slice(0, 5)}`,
|
|
27041
27037
|
projectScope: options.project.cwd,
|
|
@@ -27046,7 +27042,8 @@ var makeHostCampUiSnapshot = (options, revision, activityRevisions) => Effect_ex
|
|
|
27046
27042
|
status: failures.length > 0 && hostHealth.overallStatus === CampUiHealthStatus.ready ? CampUiHealthStatus.degraded : hostHealth.overallStatus,
|
|
27047
27043
|
...recoveryHealth?.code === void 0 ? {} : { code: recoveryHealth.code },
|
|
27048
27044
|
...recoveryHealth?.message === void 0 ? healthMessage === "" ? {} : { message: healthMessage } : { message: recoveryHealth.message },
|
|
27049
|
-
...retryAt === void 0 ? {} : { retryAt }
|
|
27045
|
+
...retryAt === void 0 ? {} : { retryAt },
|
|
27046
|
+
...attempt === void 0 ? {} : { attempt }
|
|
27050
27047
|
},
|
|
27051
27048
|
controllerConnected: [...liveControllers.values()].some(
|
|
27052
27049
|
(clientKind) => clientKind === "orchestrator"
|
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-A4K4VHXE.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-7AGSTD6B.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-GPJJE2V7.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-RIYKIIGA.js";
|
|
243
243
|
|
|
244
244
|
// node_modules/.pnpm/ini@4.1.3/node_modules/ini/lib/ini.js
|
|
245
245
|
var require_ini = __commonJS({
|
|
@@ -19969,7 +19969,7 @@ var campResumeListCommand = Command_exports.make(
|
|
|
19969
19969
|
)
|
|
19970
19970
|
).pipe(Command_exports.withDescription("Lists saved runs of this project that resume can restore."));
|
|
19971
19971
|
var runIdArgument = Args_exports.text({ name: "runId" }).pipe(Args_exports.optional);
|
|
19972
|
-
var selectCampRunOnDemand = (items) => Effect_exports.promise(() => import("./chunk-
|
|
19972
|
+
var selectCampRunOnDemand = (items) => Effect_exports.promise(() => import("./chunk-HK2LW6VV.js")).pipe(
|
|
19973
19973
|
Effect_exports.flatMap((ui) => ui.selectCampRun({ items }))
|
|
19974
19974
|
);
|
|
19975
19975
|
var selectAndResume = (json) => {
|
|
@@ -20042,7 +20042,7 @@ var rootCommand = Command_exports.make(
|
|
|
20042
20042
|
).pipe(Command_exports.withDescription("Runs and observes a camp of collaborating workers."));
|
|
20043
20043
|
|
|
20044
20044
|
// packages/cli/src/commands/doctorCommand.ts
|
|
20045
|
-
var runDoctorOnDemand = Effect_exports.promise(() => import("./chunk-
|
|
20045
|
+
var runDoctorOnDemand = Effect_exports.promise(() => import("./chunk-M2NR2CXX.js")).pipe(
|
|
20046
20046
|
Effect_exports.flatMap((doctor) => doctor.runDoctor)
|
|
20047
20047
|
);
|
|
20048
20048
|
var statusLabel = {
|
|
@@ -20794,7 +20794,7 @@ var command = rootCommand.pipe(
|
|
|
20794
20794
|
);
|
|
20795
20795
|
var cli = Command_exports.run(command, {
|
|
20796
20796
|
name: "priiisk camp control",
|
|
20797
|
-
version: "0.1.
|
|
20797
|
+
version: "0.1.13"
|
|
20798
20798
|
});
|
|
20799
20799
|
var quietDiagnostics = (json, effect) => json ? Console_exports.consoleWith(
|
|
20800
20800
|
(console2) => Console_exports.withConsole({ ...console2, error: () => Effect_exports.void })(effect)
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "priiisk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
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-7AGSTD6B.js",
|
|
11
|
+
"dist/chunk-A4K4VHXE.js",
|
|
12
|
+
"dist/chunk-GPJJE2V7.js",
|
|
13
|
+
"dist/chunk-GPJJE2V7.js.LEGAL.txt",
|
|
14
|
+
"dist/chunk-HK2LW6VV.js",
|
|
15
|
+
"dist/chunk-M2NR2CXX.js",
|
|
16
|
+
"dist/chunk-RIYKIIGA.js",
|
|
17
|
+
"dist/chunk-TI75FDW3.js",
|
|
18
|
+
"dist/chunk-TI75FDW3.js.LEGAL.txt",
|
|
19
|
+
"dist/chunk-XVKL4E3L.js",
|
|
20
20
|
"dist/priiisk-host.js",
|
|
21
21
|
"dist/priiisk.js",
|
|
22
22
|
"profiles",
|
|
File without changes
|
|
File without changes
|