priiisk 0.1.9 → 0.1.11

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.
@@ -366,7 +366,7 @@ import {
366
366
  write,
367
367
  zipRight,
368
368
  zipRight2
369
- } from "./chunk-F7LGUL2J.js";
369
+ } from "./chunk-M5QCPHTJ.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({
@@ -10317,9 +10317,6 @@ var DEFAULT_GIT_DENIED_FLAGS = [
10317
10317
  "-c",
10318
10318
  "--config",
10319
10319
  "--exec-path",
10320
- "--paginate",
10321
- "-p",
10322
- "--no-pager",
10323
10320
  "--output",
10324
10321
  "-o",
10325
10322
  "--ext-diff",
@@ -10673,7 +10670,7 @@ var describeDirectToolSandbox = (sandbox2) => sandbox2.kind === DirectToolSandbo
10673
10670
 
10674
10671
  // packages/protocol/src/domain/protocolVersion.ts
10675
10672
  var PRIIISK_PROTOCOL_VERSION = "12";
10676
- var PRIIISK_PROTOCOL_PACKAGE_VERSION = "0.1.9";
10673
+ var PRIIISK_PROTOCOL_PACKAGE_VERSION = "0.1.11";
10677
10674
  var ProtocolVersionSchema = Schema_exports.String.pipe(Schema_exports.minLength(1));
10678
10675
 
10679
10676
  // packages/protocol/src/domain/protocolIdentifiers.ts
@@ -13567,7 +13564,7 @@ var CampProtocol = class extends RpcGroup_exports.make(
13567
13564
  };
13568
13565
 
13569
13566
  // packages/camp-state/src/bootstrap/campHostVersion.ts
13570
- var PRIIISK_HOST_VERSION = "0.1.9";
13567
+ var PRIIISK_HOST_VERSION = "0.1.11";
13571
13568
 
13572
13569
  // packages/surface/src/domain/surfaceModel.ts
13573
13570
  var NonEmptyString7 = Schema_exports.String.pipe(Schema_exports.minLength(1));
@@ -20,7 +20,7 @@ import {
20
20
  layerNet,
21
21
  makeCampSurfaceName,
22
22
  resolveProjectScopeSync
23
- } from "./chunk-LH753BUY.js";
23
+ } from "./chunk-2GZC6FBU.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-F7LGUL2J.js";
41
+ } from "./chunk-M5QCPHTJ.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.9";
115
+ var PRIIISK_CLI_VERSION = "0.1.11";
116
116
 
117
117
  // packages/cli/src/client/campRpcConnection.ts
118
118
  var reportRetry = (options, diagnostic) => options.onRetry === void 0 ? Console_exports.error(
@@ -12,7 +12,7 @@ import {
12
12
  Match_exports,
13
13
  Stream_exports,
14
14
  SubscriptionRef_exports
15
- } from "./chunk-F7LGUL2J.js";
15
+ } from "./chunk-M5QCPHTJ.js";
16
16
 
17
17
  // packages/host-ui/src/backend/campUiBackend.ts
18
18
  var CampUiBackendError = class extends Data_exports.TaggedError("CampUiBackendError") {
@@ -8,13 +8,13 @@ import {
8
8
  makeDoctorReport,
9
9
  resolveCampSurface,
10
10
  withCampRpc
11
- } from "./chunk-GEBZQLE7.js";
11
+ } from "./chunk-B22VNB72.js";
12
12
  import {
13
13
  PI_RUNTIME_VERSION,
14
14
  PiModelCatalogIssueCode,
15
15
  inspectPiModelCatalog,
16
16
  makePiOperatorResources
17
- } from "./chunk-QEUSNJ3D.js";
17
+ } from "./chunk-TX5A2GZX.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-LH753BUY.js";
51
+ } from "./chunk-2GZC6FBU.js";
52
52
  import {
53
53
  Clock_exports,
54
54
  Effect_exports,
55
55
  Option_exports,
56
56
  Ref_exports
57
- } from "./chunk-F7LGUL2J.js";
57
+ } from "./chunk-M5QCPHTJ.js";
58
58
 
59
59
  // packages/cli/src/doctor/environmentDoctor.ts
60
60
  import { dirname } from "node:path";
@@ -43151,21 +43151,32 @@ var snapshotWorker = (runtime6, identity6) => Effect_exports.gen(function* () {
43151
43151
  });
43152
43152
 
43153
43153
  // packages/kernel/src/runtime/kernel/campKernelEquipment.ts
43154
- var rollbackOrFail = (rollback, workerId) => Effect_exports.exit(rollback).pipe(
43154
+ var describeRefusal = (refusal) => {
43155
+ const failure = Cause_exports.failureOption(refusal);
43156
+ if (Option_exports.isNone(failure)) return Cause_exports.pretty(refusal);
43157
+ const value6 = failure.value;
43158
+ if (typeof value6 !== "object" || value6 === null) return String(value6);
43159
+ const record4 = value6;
43160
+ const described = [
43161
+ typeof record4.code === "string" ? record4.code : void 0,
43162
+ record4.details === void 0 ? void 0 : JSON.stringify(record4.details)
43163
+ ].filter((part) => part !== void 0);
43164
+ return described.length === 0 ? Cause_exports.pretty(refusal) : described.join(" ");
43165
+ };
43166
+ var rollbackOrFail = (rollback, workerId, refusal) => Effect_exports.exit(rollback).pipe(
43155
43167
  Effect_exports.flatMap(
43156
43168
  (exit4) => Exit_exports.isSuccess(exit4) ? Effect_exports.void : Effect_exports.fail(
43157
43169
  new CampOrchestrationError({
43158
43170
  operation: "kernel.updateEquipment",
43159
43171
  code: "equipment_rollback_failed",
43160
- details: { workerId },
43161
- cause: Cause_exports.pretty(exit4.cause)
43172
+ details: { workerId, refusal: describeRefusal(refusal) },
43173
+ cause: describeRefusal(exit4.cause)
43162
43174
  })
43163
43175
  )
43164
43176
  )
43165
43177
  );
43166
43178
  var updateWorkerEquipment = (runtime6, command, identity6, change) => Effect_exports.gen(function* () {
43167
43179
  const [initial, sessionRef] = yield* requireKernelSession(runtime6, identity6);
43168
- const equipment = yield* runtime6.equipmentResolver.reresolve(initial.equipment, change);
43169
43180
  const resource = yield* getWorkerResource(runtime6, initial.id);
43170
43181
  if (resource === void 0) {
43171
43182
  return yield* Effect_exports.fail(
@@ -43181,6 +43192,7 @@ var updateWorkerEquipment = (runtime6, command, identity6, change) => Effect_exp
43181
43192
  Effect_exports.flatMap(
43182
43193
  () => Effect_exports.gen(function* () {
43183
43194
  const worker = yield* runtime6.registry.require(workerIdIdentity(initial.id));
43195
+ const equipment = yield* runtime6.equipmentResolver.reresolve(worker.equipment, change);
43184
43196
  const currentState = yield* Ref_exports.get(resource.state);
43185
43197
  const currentMcpScope = currentState.mcpScope;
43186
43198
  const currentMcpView = currentState.mcpView;
@@ -43212,7 +43224,7 @@ var updateWorkerEquipment = (runtime6, command, identity6, change) => Effect_exp
43212
43224
  );
43213
43225
  const commitExit = yield* Effect_exports.exit(nextMcpView.prepared.commit);
43214
43226
  if (Exit_exports.isFailure(commitExit)) {
43215
- yield* rollbackOrFail(nextMcpView.prepared.rollback, worker.id);
43227
+ yield* rollbackOrFail(nextMcpView.prepared.rollback, worker.id, commitExit.cause);
43216
43228
  return yield* Effect_exports.failCause(commitExit.cause);
43217
43229
  }
43218
43230
  const updatedAt = yield* Clock_exports.currentTimeMillis;
@@ -43225,7 +43237,7 @@ var updateWorkerEquipment = (runtime6, command, identity6, change) => Effect_exp
43225
43237
  )
43226
43238
  );
43227
43239
  if (Exit_exports.isFailure(registryExit)) {
43228
- yield* rollbackOrFail(nextMcpView.prepared.rollback, worker.id);
43240
+ yield* rollbackOrFail(nextMcpView.prepared.rollback, worker.id, registryExit.cause);
43229
43241
  return yield* Effect_exports.failCause(registryExit.cause);
43230
43242
  }
43231
43243
  yield* Ref_exports.set(resource.state, {
@@ -28,7 +28,7 @@ import {
28
28
  makePlatform,
29
29
  makeRunMain,
30
30
  stdin
31
- } from "./chunk-LH753BUY.js";
31
+ } from "./chunk-2GZC6FBU.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-F7LGUL2J.js";
115
+ } from "./chunk-M5QCPHTJ.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 = {};
@@ -86,8 +86,8 @@ import {
86
86
  selectCampRun,
87
87
  styleCampUiTone,
88
88
  uniqueCampUiNames
89
- } from "./chunk-NIJ2J45R.js";
90
- import "./chunk-F7LGUL2J.js";
89
+ } from "./chunk-IV6ZFRKR.js";
90
+ import "./chunk-M5QCPHTJ.js";
91
91
  export {
92
92
  CAMP_UI_BASH_PREVIEW_LINES,
93
93
  CAMP_UI_DEFAULT_TOOL_PREVIEW_LINES,
@@ -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-LH753BUY.js";
6
+ } from "./chunk-2GZC6FBU.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-F7LGUL2J.js";
33
+ } from "./chunk-M5QCPHTJ.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({
@@ -26017,9 +26017,12 @@ var equipmentError = (details, cause) => new CampSessionError({
26017
26017
  ...cause === void 0 ? {} : { cause }
26018
26018
  });
26019
26019
  var sameLimits = (left, right) => left === right || left !== void 0 && right !== void 0 && left.maxTurns === right.maxTurns && left.maxWallClockMs === right.maxWallClockMs && left.maxTokens === right.maxTokens && left.maxTreeDepth === right.maxTreeDepth;
26020
+ var IDENTITY_FIELDS = ["role", "preset", "model", "thinkingLevel", "readOnly"];
26020
26021
  var rebuildOnlyChanges = (current, next) => {
26021
- const changed = [];
26022
- if (!sameLimits(current.executionLimits, next.executionLimits)) changed.push("executionLimits");
26022
+ const changed = IDENTITY_FIELDS.filter((field) => current[field] !== next[field]);
26023
+ if (!sameLimits(current.executionLimits, next.executionLimits)) {
26024
+ return [...changed, "executionLimits"];
26025
+ }
26023
26026
  return changed;
26024
26027
  };
26025
26028
  var readState = (live) => Effect_exports.all([
@@ -4,14 +4,14 @@ const require = __priiiskCreateRequire(import.meta.url);
4
4
  import {
5
5
  NodeContext_exports,
6
6
  NodeRuntime_exports
7
- } from "./chunk-IORSBZKU.js";
7
+ } from "./chunk-MLUY445T.js";
8
8
  import {
9
9
  CampUiBackendError,
10
10
  CampUiHealthStatus,
11
11
  CampUiPlacement,
12
12
  CampUiRuntimeStatus,
13
13
  mountPiCampUi
14
- } from "./chunk-NIJ2J45R.js";
14
+ } from "./chunk-IV6ZFRKR.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-QEUSNJ3D.js";
22
+ } from "./chunk-TX5A2GZX.js";
23
23
  import {
24
24
  AgentRole,
25
25
  AgentRoleSchema,
@@ -101,7 +101,7 @@ import {
101
101
  runningCampManifest,
102
102
  saveCampHealth,
103
103
  saveCampManifest
104
- } from "./chunk-LH753BUY.js";
104
+ } from "./chunk-2GZC6FBU.js";
105
105
  import {
106
106
  CampAskRouter,
107
107
  CampCancellationCode,
@@ -194,7 +194,7 @@ import {
194
194
  withFiberRuntime,
195
195
  workerAliasIdentity,
196
196
  workerIdIdentity
197
- } from "./chunk-F7LGUL2J.js";
197
+ } from "./chunk-M5QCPHTJ.js";
198
198
 
199
199
  // node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js
200
200
  var require_constants = __commonJS({
@@ -22451,7 +22451,7 @@ var Client = class extends Protocol {
22451
22451
  };
22452
22452
 
22453
22453
  // packages/mcp-backend/src/connections/clientIdentity.ts
22454
- var backendVersion = "0.1.9";
22454
+ var backendVersion = "0.1.11";
22455
22455
 
22456
22456
  // packages/mcp-backend/src/connections/mcpFailure.ts
22457
22457
  var McpFailure = class extends Data_exports.TaggedError("McpFailure") {
@@ -25191,19 +25191,23 @@ var resolveCustomTools = (registry2, requested) => {
25191
25191
  ...requested.filter((name) => name !== CampControlToolName.ask)
25192
25192
  ]) : Effect_exports.fail(equipmentError("unknown_custom_tools", { tools: unknown2 }));
25193
25193
  };
25194
- var requirePaths = (fs, paths) => Effect_exports.forEach(
25195
- paths,
25196
- (candidate) => fs.exists(candidate).pipe(
25197
- Effect_exports.mapError(
25198
- (cause) => equipmentError("skill_path_check_failed", { path: candidate }, cause)
25199
- ),
25200
- Effect_exports.filterOrFail(
25201
- (exists) => exists,
25202
- () => equipmentError("skill_path_not_found", { path: candidate })
25194
+ var SKILL_FILE = "SKILL.md";
25195
+ var requireSkill = (fs, candidate) => fs.stat(candidate).pipe(
25196
+ Effect_exports.mapError((cause) => equipmentError("skill_path_not_found", { path: candidate }, cause)),
25197
+ Effect_exports.flatMap(
25198
+ (info) => info.type !== "Directory" ? Effect_exports.void : fs.exists(`${candidate}/${SKILL_FILE}`).pipe(
25199
+ Effect_exports.mapError(
25200
+ (cause) => equipmentError("skill_path_check_failed", { path: candidate }, cause)
25201
+ ),
25202
+ Effect_exports.filterOrFail(
25203
+ (carries) => carries,
25204
+ () => equipmentError("skill_file_missing", { path: candidate, file: SKILL_FILE })
25205
+ ),
25206
+ Effect_exports.asVoid
25203
25207
  )
25204
- ),
25205
- { discard: true }
25208
+ )
25206
25209
  );
25210
+ var requirePaths = (fs, paths) => Effect_exports.forEach(paths, (candidate) => requireSkill(fs, candidate), { discard: true });
25207
25211
  var loadProfile = (fs, path, role) => resolveRoleProfilePath(fs, path, role).pipe(
25208
25212
  Effect_exports.mapError((cause) => equipmentError("profile_not_found", { role }, cause)),
25209
25213
  Effect_exports.flatMap(
package/dist/priiisk.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  fromReadable,
6
6
  layer,
7
7
  runMain
8
- } from "./chunk-IORSBZKU.js";
8
+ } from "./chunk-MLUY445T.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-GEBZQLE7.js";
26
+ } from "./chunk-B22VNB72.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-LH753BUY.js";
61
+ } from "./chunk-2GZC6FBU.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-F7LGUL2J.js";
242
+ } from "./chunk-M5QCPHTJ.js";
243
243
 
244
244
  // node_modules/.pnpm/ini@4.1.3/node_modules/ini/lib/ini.js
245
245
  var require_ini = __commonJS({
@@ -17516,6 +17516,7 @@ var builtInOptions = (command2, usage, helpDoc) => map11(builtIns, (builtIn2) =>
17516
17516
 
17517
17517
  // node_modules/.pnpm/@effect+cli@0.75.0_@effect+platform@0.96.2_effect@3.21.4__@effect+printer-ansi@0.49.0_@_8f580de80b520fae3d38260cd856832c/node_modules/@effect/cli/dist/esm/HelpDoc.js
17518
17518
  var p2 = p;
17519
+ var toAnsiText2 = toAnsiText;
17519
17520
 
17520
17521
  // node_modules/.pnpm/@effect+cli@0.75.0_@effect+platform@0.96.2_effect@3.21.4__@effect+printer-ansi@0.49.0_@_8f580de80b520fae3d38260cd856832c/node_modules/@effect/cli/dist/esm/Options.js
17521
17522
  var Options_exports = {};
@@ -18691,17 +18692,30 @@ var describeCause = (cause) => {
18691
18692
  if (described === void 0 || described === "" || described === "{}") return void 0;
18692
18693
  return described.length > CAUSE_LIMIT ? `${described.slice(0, CAUSE_LIMIT)}\u2026` : described;
18693
18694
  };
18695
+ var helpDocText = (value2) => {
18696
+ if (typeof value2 !== "object" || value2 === null) return void 0;
18697
+ if (typeof value2._tag !== "string") return void 0;
18698
+ try {
18699
+ const rendered = toAnsiText2(value2).trim();
18700
+ return rendered === "" ? void 0 : rendered;
18701
+ } catch {
18702
+ return void 0;
18703
+ }
18704
+ };
18705
+ var parserReported = (error3) => typeof error3 === "object" && error3 !== null && helpDocText(error3.error) !== void 0;
18694
18706
  var errorPayload = (error3) => {
18695
18707
  if (typeof error3 !== "object" || error3 === null) {
18696
18708
  return { error: "UnknownError", message: String(error3) };
18697
18709
  }
18698
18710
  const record = error3;
18699
18711
  const cause = describeCause(record.cause ?? (error3 instanceof Error ? error3.cause : void 0));
18700
- const message = error3 instanceof Error ? error3.message : String(error3);
18712
+ const documented = helpDocText(record.error);
18713
+ const thrown = error3 instanceof Error && error3.message !== "" ? error3.message : void 0;
18714
+ const carried = typeof record.message === "string" ? record.message : void 0;
18701
18715
  return {
18702
- error: typeof record._tag === "string" ? record._tag : "CommandError",
18703
- message: message === "" ? cause ?? "failed without a reported reason" : message,
18704
18716
  ...record,
18717
+ error: typeof record._tag === "string" ? record._tag : "CommandError",
18718
+ message: documented ?? thrown ?? carried ?? cause ?? "failed without a reported reason",
18705
18719
  ...cause === void 0 ? {} : { cause }
18706
18720
  };
18707
18721
  };
@@ -18711,6 +18725,7 @@ var failureLine = (payload) => {
18711
18725
  return `priiisk:${code2} ${String(payload.message)}${action}`;
18712
18726
  };
18713
18727
  var reportCliFailure = (json, error3) => {
18728
+ if (!json && parserReported(error3)) return Effect_exports.void;
18714
18729
  const payload = errorPayload(error3);
18715
18730
  return Console_exports.error(json ? JSON.stringify(payload) : failureLine(payload));
18716
18731
  };
@@ -18875,19 +18890,23 @@ var resultFrame = (id, exitCode, stdout, stderr) => ({
18875
18890
  stdout,
18876
18891
  stderr
18877
18892
  });
18893
+ var outputFrame = (id, channel, text11) => ({
18894
+ kind: "output",
18895
+ id: id ?? null,
18896
+ channel,
18897
+ line: text11
18898
+ });
18878
18899
  var failureFrame = (id, error3) => resultFrame(id, 1, [], [JSON.stringify(errorPayload(error3))]);
18879
- var executeCommand = (runner, id, argv) => Effect_exports.suspend(() => {
18880
- const stdout = [];
18881
- const stderr = [];
18900
+ var executeCommand = (runner, write, id, argv) => Effect_exports.suspend(() => {
18882
18901
  const captured = makeCapturedConsole((channel, text11) => {
18883
- (channel === "stdout" ? stdout : stderr).push(text11);
18902
+ write(outputFrame(id, channel, text11));
18884
18903
  });
18885
18904
  return runner(argv).pipe(
18886
18905
  Console_exports.withConsole(captured),
18887
- Effect_exports.map((exitCode) => resultFrame(id, exitCode, stdout, stderr))
18906
+ Effect_exports.map((exitCode) => resultFrame(id, exitCode, [], []))
18888
18907
  );
18889
18908
  });
18890
- var startCommand = (runner, registry, emit, closing, request) => Effect_exports.gen(function* () {
18909
+ var startCommand = (runner, registry, emit, write, closing, request) => Effect_exports.gen(function* () {
18891
18910
  const key = request.id === void 0 ? void 0 : String(request.id);
18892
18911
  const token = key === void 0 ? void 0 : yield* registry.claim(key);
18893
18912
  if (key !== void 0 && token === void 0) {
@@ -18913,7 +18932,7 @@ var startCommand = (runner, registry, emit, closing, request) => Effect_exports.
18913
18932
  )
18914
18933
  );
18915
18934
  const gate = yield* Deferred_exports.make();
18916
- const body = executeCommand(runner, request.id, request.argv).pipe(
18935
+ const body = executeCommand(runner, write, request.id, request.argv).pipe(
18917
18936
  Effect_exports.flatMap(emit),
18918
18937
  Effect_exports.onInterrupt(() => cancelled)
18919
18938
  );
@@ -18926,7 +18945,7 @@ var startCommand = (runner, registry, emit, closing, request) => Effect_exports.
18926
18945
  if (key !== void 0 && token !== void 0) yield* registry.attach(key, token, fiber);
18927
18946
  yield* Deferred_exports.succeed(gate, void 0);
18928
18947
  });
18929
- var handleLine = (runner, registry, emit, closing, line5) => line5.trim() === "" ? Effect_exports.void : parseRequest(line5).pipe(
18948
+ var handleLine = (runner, registry, emit, write, closing, line5) => line5.trim() === "" ? Effect_exports.void : parseRequest(line5).pipe(
18930
18949
  Effect_exports.flatMap(
18931
18950
  (request) => request.kind === "cancel" ? registry.cancel(request.target).pipe(
18932
18951
  Effect_exports.flatMap(
@@ -18940,7 +18959,7 @@ var handleLine = (runner, registry, emit, closing, line5) => line5.trim() === ""
18940
18959
  )
18941
18960
  )
18942
18961
  )
18943
- ) : startCommand(runner, registry, emit, closing, request)
18962
+ ) : startCommand(runner, registry, emit, write, closing, request)
18944
18963
  ),
18945
18964
  Effect_exports.catchAll((error3) => emit(failureFrame(requestIdOf(line5), error3)))
18946
18965
  );
@@ -18969,13 +18988,11 @@ var connectedFrame = (handshake) => ({
18969
18988
  readiness: handshake.readiness
18970
18989
  });
18971
18990
  var runCampStdioSession = (runner, options3 = {}) => Effect_exports.gen(function* () {
18972
- const writeLock = yield* Effect_exports.makeSemaphore(1);
18973
- const emit = (frame) => writeLock.withPermits(1)(
18974
- Effect_exports.sync(() => {
18975
- process.stdout.write(`${JSON.stringify(frame)}
18991
+ const write = (frame) => {
18992
+ process.stdout.write(`${JSON.stringify(frame)}
18976
18993
  `);
18977
- })
18978
- );
18994
+ };
18995
+ const emit = (frame) => Effect_exports.sync(() => write(frame));
18979
18996
  return yield* withCampRpcSession(
18980
18997
  (session) => Effect_exports.scoped(
18981
18998
  Effect_exports.gen(function* () {
@@ -18983,7 +19000,7 @@ var runCampStdioSession = (runner, options3 = {}) => Effect_exports.gen(function
18983
19000
  const closing = yield* Ref_exports.make(false);
18984
19001
  yield* emit(readyFrame(session));
18985
19002
  yield* stdinLines.pipe(
18986
- Stream_exports.runForEach((line5) => handleLine(runner, registry, emit, closing, line5))
19003
+ Stream_exports.runForEach((line5) => handleLine(runner, registry, emit, write, closing, line5))
18987
19004
  );
18988
19005
  yield* Ref_exports.set(closing, true);
18989
19006
  })
@@ -19952,7 +19969,7 @@ var campResumeListCommand = Command_exports.make(
19952
19969
  )
19953
19970
  ).pipe(Command_exports.withDescription("Lists saved runs of this project that resume can restore."));
19954
19971
  var runIdArgument = Args_exports.text({ name: "runId" }).pipe(Args_exports.optional);
19955
- var selectCampRunOnDemand = (items) => Effect_exports.promise(() => import("./chunk-EHPEGFN2.js")).pipe(
19972
+ var selectCampRunOnDemand = (items) => Effect_exports.promise(() => import("./chunk-QSUEFL4Z.js")).pipe(
19956
19973
  Effect_exports.flatMap((ui) => ui.selectCampRun({ items }))
19957
19974
  );
19958
19975
  var selectAndResume = (json) => {
@@ -20025,7 +20042,7 @@ var rootCommand = Command_exports.make(
20025
20042
  ).pipe(Command_exports.withDescription("Runs and observes a camp of collaborating workers."));
20026
20043
 
20027
20044
  // packages/cli/src/commands/doctorCommand.ts
20028
- var runDoctorOnDemand = Effect_exports.promise(() => import("./chunk-QQBVNDLC.js")).pipe(
20045
+ var runDoctorOnDemand = Effect_exports.promise(() => import("./chunk-JDQWRSCJ.js")).pipe(
20029
20046
  Effect_exports.flatMap((doctor) => doctor.runDoctor)
20030
20047
  );
20031
20048
  var statusLabel = {
@@ -20777,14 +20794,20 @@ var command = rootCommand.pipe(
20777
20794
  );
20778
20795
  var cli = Command_exports.run(command, {
20779
20796
  name: "priiisk camp control",
20780
- version: "0.1.9"
20797
+ version: "0.1.11"
20798
+ });
20799
+ var quietDiagnostics = (json, effect) => json ? Console_exports.consoleWith(
20800
+ (console2) => Console_exports.withConsole({ ...console2, error: () => Effect_exports.void })(effect)
20801
+ ) : effect;
20802
+ var runCliCommand = (argumentsList) => Effect_exports.suspend(() => {
20803
+ const json = argumentsList.includes("--json");
20804
+ return quietDiagnostics(json, cli(argumentsList)).pipe(
20805
+ Effect_exports.matchEffect({
20806
+ onFailure: (error3) => reportCliFailure(json, error3).pipe(Effect_exports.as(1)),
20807
+ onSuccess: () => Effect_exports.succeed(0)
20808
+ })
20809
+ );
20781
20810
  });
20782
- var runCliCommand = (argumentsList) => cli(argumentsList).pipe(
20783
- Effect_exports.matchEffect({
20784
- onFailure: (error3) => reportCliFailure(argumentsList.includes("--json"), error3).pipe(Effect_exports.as(1)),
20785
- onSuccess: () => Effect_exports.succeed(0)
20786
- })
20787
- );
20788
20811
  var runCli = (argumentsList) => runCliCommand(argumentsList).pipe(
20789
20812
  Effect_exports.flatMap(
20790
20813
  (exitCode) => exitCode === 0 ? Effect_exports.void : Effect_exports.sync(() => {
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "priiisk",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
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-EHPEGFN2.js",
11
- "dist/chunk-F7LGUL2J.js",
12
- "dist/chunk-GEBZQLE7.js",
13
- "dist/chunk-IORSBZKU.js",
14
- "dist/chunk-LH753BUY.js",
15
- "dist/chunk-LH753BUY.js.LEGAL.txt",
16
- "dist/chunk-NIJ2J45R.js",
17
- "dist/chunk-QEUSNJ3D.js",
18
- "dist/chunk-QEUSNJ3D.js.LEGAL.txt",
19
- "dist/chunk-QQBVNDLC.js",
10
+ "dist/chunk-2GZC6FBU.js",
11
+ "dist/chunk-2GZC6FBU.js.LEGAL.txt",
12
+ "dist/chunk-B22VNB72.js",
13
+ "dist/chunk-IV6ZFRKR.js",
14
+ "dist/chunk-JDQWRSCJ.js",
15
+ "dist/chunk-M5QCPHTJ.js",
16
+ "dist/chunk-MLUY445T.js",
17
+ "dist/chunk-QSUEFL4Z.js",
18
+ "dist/chunk-TX5A2GZX.js",
19
+ "dist/chunk-TX5A2GZX.js.LEGAL.txt",
20
20
  "dist/priiisk-host.js",
21
21
  "dist/priiisk.js",
22
22
  "profiles",