priiisk 0.1.8 → 0.1.10

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.
@@ -43151,37 +43151,33 @@ 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
- var requestOnCurrentBase = (request2, current2) => {
43167
- if (request2.role !== void 0 || request2.preset !== void 0) return request2;
43168
- const overrides = {
43169
- ...request2.overrides,
43170
- ...request2.overrides?.model === void 0 && current2.model !== void 0 ? { model: current2.model } : {},
43171
- ...request2.overrides?.thinkingLevel === void 0 && current2.thinkingLevel !== void 0 ? { thinkingLevel: current2.thinkingLevel } : {}
43172
- };
43173
- return {
43174
- ...request2,
43175
- ...current2.role === void 0 ? {} : { role: current2.role },
43176
- ...current2.preset === void 0 ? {} : { preset: current2.preset },
43177
- overrides
43178
- };
43179
- };
43180
- var updateWorkerEquipment = (runtime6, command, identity6, request2) => Effect_exports.gen(function* () {
43178
+ var updateWorkerEquipment = (runtime6, command, identity6, change) => Effect_exports.gen(function* () {
43181
43179
  const [initial, sessionRef] = yield* requireKernelSession(runtime6, identity6);
43182
- const equipment = yield* runtime6.equipmentResolver.resolve(
43183
- requestOnCurrentBase(request2, initial.equipment)
43184
- );
43180
+ const equipment = yield* runtime6.equipmentResolver.reresolve(initial.equipment, change);
43185
43181
  const resource = yield* getWorkerResource(runtime6, initial.id);
43186
43182
  if (resource === void 0) {
43187
43183
  return yield* Effect_exports.fail(
@@ -43228,7 +43224,7 @@ var updateWorkerEquipment = (runtime6, command, identity6, request2) => Effect_e
43228
43224
  );
43229
43225
  const commitExit = yield* Effect_exports.exit(nextMcpView.prepared.commit);
43230
43226
  if (Exit_exports.isFailure(commitExit)) {
43231
- yield* rollbackOrFail(nextMcpView.prepared.rollback, worker.id);
43227
+ yield* rollbackOrFail(nextMcpView.prepared.rollback, worker.id, commitExit.cause);
43232
43228
  return yield* Effect_exports.failCause(commitExit.cause);
43233
43229
  }
43234
43230
  const updatedAt = yield* Clock_exports.currentTimeMillis;
@@ -43241,7 +43237,7 @@ var updateWorkerEquipment = (runtime6, command, identity6, request2) => Effect_e
43241
43237
  )
43242
43238
  );
43243
43239
  if (Exit_exports.isFailure(registryExit)) {
43244
- yield* rollbackOrFail(nextMcpView.prepared.rollback, worker.id);
43240
+ yield* rollbackOrFail(nextMcpView.prepared.rollback, worker.id, registryExit.cause);
43245
43241
  return yield* Effect_exports.failCause(registryExit.cause);
43246
43242
  }
43247
43243
  yield* Ref_exports.set(resource.state, {
@@ -86,8 +86,8 @@ import {
86
86
  selectCampRun,
87
87
  styleCampUiTone,
88
88
  uniqueCampUiNames
89
- } from "./chunk-S7LCWMQY.js";
90
- import "./chunk-TZBPOE6G.js";
89
+ } from "./chunk-O35MCKHY.js";
90
+ import "./chunk-BXNKAII7.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-W2ZL6LWM.js";
6
+ } from "./chunk-TG56CUWG.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-TZBPOE6G.js";
33
+ } from "./chunk-BXNKAII7.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({
@@ -28,7 +28,7 @@ import {
28
28
  makePlatform,
29
29
  makeRunMain,
30
30
  stdin
31
- } from "./chunk-W2ZL6LWM.js";
31
+ } from "./chunk-TG56CUWG.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-TZBPOE6G.js";
115
+ } from "./chunk-BXNKAII7.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 = {};
@@ -12,7 +12,7 @@ import {
12
12
  Match_exports,
13
13
  Stream_exports,
14
14
  SubscriptionRef_exports
15
- } from "./chunk-TZBPOE6G.js";
15
+ } from "./chunk-BXNKAII7.js";
16
16
 
17
17
  // packages/host-ui/src/backend/campUiBackend.ts
18
18
  var CampUiBackendError = class extends Data_exports.TaggedError("CampUiBackendError") {
@@ -20,7 +20,7 @@ import {
20
20
  layerNet,
21
21
  makeCampSurfaceName,
22
22
  resolveProjectScopeSync
23
- } from "./chunk-W2ZL6LWM.js";
23
+ } from "./chunk-TG56CUWG.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-TZBPOE6G.js";
41
+ } from "./chunk-BXNKAII7.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.8";
115
+ var PRIIISK_CLI_VERSION = "0.1.10";
116
116
 
117
117
  // packages/cli/src/client/campRpcConnection.ts
118
118
  var reportRetry = (options, diagnostic) => options.onRetry === void 0 ? Console_exports.error(
@@ -366,7 +366,7 @@ import {
366
366
  write,
367
367
  zipRight,
368
368
  zipRight2
369
- } from "./chunk-TZBPOE6G.js";
369
+ } from "./chunk-BXNKAII7.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({
@@ -10447,15 +10447,7 @@ var resolveNamedServers = (config, names) => {
10447
10447
  };
10448
10448
  };
10449
10449
  var resolveMcpServers = (config, role, mcpOverride) => resolveNamedServers(config, resolveServerNames(config, role, mcpOverride));
10450
- var resolveCampMcpUnion = (config) => resolveNamedServers(
10451
- config,
10452
- Object.values(AgentRole).flatMap((role) => resolveServerNames(config, role, void 0))
10453
- );
10454
- var resolveCampMcpOutsideUnion = (config, mcpOverride) => {
10455
- if (mcpOverride === void 0) return [];
10456
- const allowed = new Set(Object.keys(resolveCampMcpUnion(config).servers));
10457
- return dedupe3(mcpOverride).filter((name) => !allowed.has(name));
10458
- };
10450
+ var resolveCampMcpCatalog = (config) => resolveNamedServers(config, Object.keys(config?.mcpServers ?? {}));
10459
10451
  var applyCampMcpRuntimeDefaults = (servers) => {
10460
10452
  const codegraph = servers.codegraph;
10461
10453
  if (codegraph === void 0 || codegraph.lifecycle !== void 0) return servers;
@@ -10487,6 +10479,7 @@ var resolveNamedThinkingForAlias = (config, alias, namedLevel) => {
10487
10479
  var resolveDefaultPreset = (config) => ({
10488
10480
  modelAlias: config.defaults.model,
10489
10481
  modelId: resolveModelAlias(config, config.defaults.model),
10482
+ abstractThinking: config.defaults.thinking,
10490
10483
  thinking: resolveThinkingForAlias(config, config.defaults.model, config.defaults.thinking)
10491
10484
  });
10492
10485
  var resolveModelAliasForRole = (config, role) => config.roles?.[role]?.model ?? config.defaults.model;
@@ -10499,6 +10492,7 @@ var resolveRolePreset = (config, role) => {
10499
10492
  description: config.roles?.[role]?.description,
10500
10493
  modelAlias,
10501
10494
  modelId: resolveModelAlias(config, modelAlias),
10495
+ abstractThinking,
10502
10496
  thinking: resolveThinkingForAlias(config, modelAlias, abstractThinking),
10503
10497
  readOnly: config.roles?.[role]?.readOnly,
10504
10498
  directTools: config.roles?.[role]?.directTools
@@ -10523,6 +10517,7 @@ var resolveHirePreset = (config, presetName) => {
10523
10517
  role: entry.role,
10524
10518
  modelAlias,
10525
10519
  modelId,
10520
+ abstractThinking,
10526
10521
  thinking,
10527
10522
  readOnly: entry.readOnly ?? (entry.role !== void 0 ? config.roles?.[entry.role]?.readOnly : void 0),
10528
10523
  directTools: entry.directTools ?? (entry.role !== void 0 ? config.roles?.[entry.role]?.directTools : void 0)
@@ -10677,8 +10672,8 @@ var parseDirectToolSandboxStatus = (status) => {
10677
10672
  var describeDirectToolSandbox = (sandbox2) => sandbox2.kind === DirectToolSandboxKind.bubblewrap ? "External binaries run in a bubblewrap sandbox: read-only filesystem, writable worker directory, no network" : sandbox2.absence === DirectToolSandboxAbsence.disabled ? `External binaries run without an OS sandbox: disabled by ${DIRECT_TOOL_SANDBOX_ENV}` : sandbox2.absence === DirectToolSandboxAbsence.unsupportedPlatform ? `External binaries run without an OS sandbox: no supported mechanism on ${sandbox2.detail ?? "this platform"}` : sandbox2.absence === DirectToolSandboxAbsence.binaryMissing ? "External binaries run without an OS sandbox: bubblewrap (bwrap) is not installed" : "External binaries run without an OS sandbox: bubblewrap is present but cannot start";
10678
10673
 
10679
10674
  // packages/protocol/src/domain/protocolVersion.ts
10680
- var PRIIISK_PROTOCOL_VERSION = "11";
10681
- var PRIIISK_PROTOCOL_PACKAGE_VERSION = "0.1.8";
10675
+ var PRIIISK_PROTOCOL_VERSION = "12";
10676
+ var PRIIISK_PROTOCOL_PACKAGE_VERSION = "0.1.10";
10682
10677
  var ProtocolVersionSchema = Schema_exports.String.pipe(Schema_exports.minLength(1));
10683
10678
 
10684
10679
  // packages/protocol/src/domain/protocolIdentifiers.ts
@@ -10939,6 +10934,21 @@ var EquipmentRequestSchema = Schema_exports.Struct({
10939
10934
  })
10940
10935
  )
10941
10936
  });
10937
+ var EquipmentChangeSchema = Schema_exports.Struct({
10938
+ builtinTools: Schema_exports.optional(StringList),
10939
+ customToolNames: Schema_exports.optional(StringList),
10940
+ directTools: Schema_exports.optional(Schema_exports.Union(Schema_exports.Boolean, StringList)),
10941
+ skillNames: Schema_exports.optional(StringList),
10942
+ skillPaths: Schema_exports.optional(StringList),
10943
+ mcp: Schema_exports.optional(
10944
+ Schema_exports.Struct({
10945
+ serverNames: StringList,
10946
+ toolNamesByServer: Schema_exports.optional(
10947
+ Schema_exports.Record({ key: NonEmptyString5, value: Schema_exports.Array(NonEmptyString5) })
10948
+ )
10949
+ })
10950
+ )
10951
+ });
10942
10952
 
10943
10953
  // packages/protocol/src/domain/eventDtos.ts
10944
10954
  var CampEventKindSchema = Schema_exports.Literal(
@@ -13418,12 +13428,16 @@ var CampProtocol = class extends RpcGroup_exports.make(
13418
13428
  success: WorkerSummarySchema,
13419
13429
  error: CampOperationErrorSchema
13420
13430
  }),
13421
- /** Re-equips a live worker; the answer carries the committed equipment revision. */
13431
+ /**
13432
+ * Changes the grant of a live worker; the answer carries the committed
13433
+ * equipment revision. The identity it was hired with is not part of the
13434
+ * payload: changing that means hiring another worker.
13435
+ */
13422
13436
  Rpc_exports.make("Equip", {
13423
13437
  payload: {
13424
13438
  ...CommandContextSchema.fields,
13425
13439
  worker: WorkerSelectorSchema,
13426
- equipment: EquipmentRequestSchema
13440
+ equipment: EquipmentChangeSchema
13427
13441
  },
13428
13442
  success: WorkerSummarySchema,
13429
13443
  error: CampOperationErrorSchema
@@ -13553,7 +13567,7 @@ var CampProtocol = class extends RpcGroup_exports.make(
13553
13567
  };
13554
13568
 
13555
13569
  // packages/camp-state/src/bootstrap/campHostVersion.ts
13556
- var PRIIISK_HOST_VERSION = "0.1.8";
13570
+ var PRIIISK_HOST_VERSION = "0.1.10";
13557
13571
 
13558
13572
  // packages/surface/src/domain/surfaceModel.ts
13559
13573
  var NonEmptyString7 = Schema_exports.String.pipe(Schema_exports.minLength(1));
@@ -14926,11 +14940,11 @@ export {
14926
14940
  directToolBin,
14927
14941
  resolveDirectTools,
14928
14942
  resolveMcpServers,
14929
- resolveCampMcpUnion,
14930
- resolveCampMcpOutsideUnion,
14943
+ resolveCampMcpCatalog,
14931
14944
  applyCampMcpRuntimeDefaults,
14932
14945
  resolveMcpSecretEnv,
14933
14946
  resolveModelAlias,
14947
+ resolveThinkingForAlias,
14934
14948
  resolveNamedThinkingForAlias,
14935
14949
  resolveDefaultPreset,
14936
14950
  resolveRolePreset,
@@ -8,13 +8,13 @@ import {
8
8
  makeDoctorReport,
9
9
  resolveCampSurface,
10
10
  withCampRpc
11
- } from "./chunk-FZQM7AKO.js";
11
+ } from "./chunk-RFMZNOZK.js";
12
12
  import {
13
13
  PI_RUNTIME_VERSION,
14
14
  PiModelCatalogIssueCode,
15
15
  inspectPiModelCatalog,
16
16
  makePiOperatorResources
17
- } from "./chunk-OWFOOE7W.js";
17
+ } from "./chunk-KG3GMS7Z.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-W2ZL6LWM.js";
51
+ } from "./chunk-TG56CUWG.js";
52
52
  import {
53
53
  Clock_exports,
54
54
  Effect_exports,
55
55
  Option_exports,
56
56
  Ref_exports
57
- } from "./chunk-TZBPOE6G.js";
57
+ } from "./chunk-BXNKAII7.js";
58
58
 
59
59
  // packages/cli/src/doctor/environmentDoctor.ts
60
60
  import { dirname } from "node:path";
@@ -4,14 +4,14 @@ const require = __priiiskCreateRequire(import.meta.url);
4
4
  import {
5
5
  NodeContext_exports,
6
6
  NodeRuntime_exports
7
- } from "./chunk-4V3HXXQ6.js";
7
+ } from "./chunk-NU3ROW7C.js";
8
8
  import {
9
9
  CampUiBackendError,
10
10
  CampUiHealthStatus,
11
11
  CampUiPlacement,
12
12
  CampUiRuntimeStatus,
13
13
  mountPiCampUi
14
- } from "./chunk-S7LCWMQY.js";
14
+ } from "./chunk-O35MCKHY.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-OWFOOE7W.js";
22
+ } from "./chunk-KG3GMS7Z.js";
23
23
  import {
24
24
  AgentRole,
25
25
  AgentRoleSchema,
@@ -67,6 +67,7 @@ import {
67
67
  campRecoveryDiagnosticFromCause,
68
68
  campRunPaths,
69
69
  currentDirectToolSandbox,
70
+ directToolBin,
70
71
  directToolName,
71
72
  directToolSandboxCommand,
72
73
  findCampRecoveryHealthComponent,
@@ -81,8 +82,7 @@ import {
81
82
  prepareCampRunStorage,
82
83
  prepareCampStorage,
83
84
  projectScopeFromCwd,
84
- resolveCampMcpOutsideUnion,
85
- resolveCampMcpUnion,
85
+ resolveCampMcpCatalog,
86
86
  resolveDefaultPreset,
87
87
  resolveDirectTools,
88
88
  resolveExecutablePath,
@@ -96,11 +96,12 @@ import {
96
96
  resolveRolePreset,
97
97
  resolveRoleProfilePath,
98
98
  resolveSkillGroups,
99
+ resolveThinkingForAlias,
99
100
  resolveWorkerSkillsRoot,
100
101
  runningCampManifest,
101
102
  saveCampHealth,
102
103
  saveCampManifest
103
- } from "./chunk-W2ZL6LWM.js";
104
+ } from "./chunk-TG56CUWG.js";
104
105
  import {
105
106
  CampAskRouter,
106
107
  CampCancellationCode,
@@ -193,7 +194,7 @@ import {
193
194
  withFiberRuntime,
194
195
  workerAliasIdentity,
195
196
  workerIdIdentity
196
- } from "./chunk-TZBPOE6G.js";
197
+ } from "./chunk-BXNKAII7.js";
197
198
 
198
199
  // node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js
199
200
  var require_constants = __commonJS({
@@ -11463,6 +11464,19 @@ var equipmentRequestFromDto = (request) => ({
11463
11464
  }
11464
11465
  }
11465
11466
  });
11467
+ var equipmentChangeFromDto = (change) => ({
11468
+ ...change.builtinTools === void 0 ? {} : { builtinTools: change.builtinTools },
11469
+ ...change.customToolNames === void 0 ? {} : { customToolNames: change.customToolNames },
11470
+ ...change.directTools === void 0 ? {} : { directTools: change.directTools },
11471
+ ...change.skillNames === void 0 ? {} : { skillNames: change.skillNames },
11472
+ ...change.skillPaths === void 0 ? {} : { skillPaths: change.skillPaths },
11473
+ ...change.mcp === void 0 ? {} : {
11474
+ mcp: {
11475
+ serverNames: change.mcp.serverNames,
11476
+ ...change.mcp.toolNamesByServer === void 0 ? {} : { toolNamesByServer: change.mcp.toolNamesByServer }
11477
+ }
11478
+ }
11479
+ });
11466
11480
  var transcriptContentDto = (content) => {
11467
11481
  if (content.kind === "text") return { kind: "text", text: content.text };
11468
11482
  if (content.kind === "thinking") {
@@ -22437,7 +22451,7 @@ var Client = class extends Protocol {
22437
22451
  };
22438
22452
 
22439
22453
  // packages/mcp-backend/src/connections/clientIdentity.ts
22440
- var backendVersion = "0.1.8";
22454
+ var backendVersion = "0.1.10";
22441
22455
 
22442
22456
  // packages/mcp-backend/src/connections/mcpFailure.ts
22443
22457
  var McpFailure = class extends Data_exports.TaggedError("McpFailure") {
@@ -25117,7 +25131,7 @@ var configLoadError = (path) => new CampMcpError({
25117
25131
  });
25118
25132
  var acquireMcpHubBackendForConfig = (config2) => Effect_exports.gen(function* () {
25119
25133
  const fs = yield* FileSystem_exports.FileSystem;
25120
- const resolution = resolveCampMcpUnion(config2);
25134
+ const resolution = resolveCampMcpCatalog(config2);
25121
25135
  const servers = applyCampMcpRuntimeDefaults(resolution.servers);
25122
25136
  const credentials = yield* loadReferencedMcpCredentials(fs, resolution.referencedEnvNames).pipe(
25123
25137
  Effect_exports.mapError((cause) => configLoadError(cause.path))
@@ -25177,19 +25191,23 @@ var resolveCustomTools = (registry2, requested) => {
25177
25191
  ...requested.filter((name) => name !== CampControlToolName.ask)
25178
25192
  ]) : Effect_exports.fail(equipmentError("unknown_custom_tools", { tools: unknown2 }));
25179
25193
  };
25180
- var requirePaths = (fs, paths) => Effect_exports.forEach(
25181
- paths,
25182
- (candidate) => fs.exists(candidate).pipe(
25183
- Effect_exports.mapError(
25184
- (cause) => equipmentError("skill_path_check_failed", { path: candidate }, cause)
25185
- ),
25186
- Effect_exports.filterOrFail(
25187
- (exists) => exists,
25188
- () => 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
25189
25207
  )
25190
- ),
25191
- { discard: true }
25208
+ )
25192
25209
  );
25210
+ var requirePaths = (fs, paths) => Effect_exports.forEach(paths, (candidate) => requireSkill(fs, candidate), { discard: true });
25193
25211
  var loadProfile = (fs, path, role) => resolveRoleProfilePath(fs, path, role).pipe(
25194
25212
  Effect_exports.mapError((cause) => equipmentError("profile_not_found", { role }, cause)),
25195
25213
  Effect_exports.flatMap(
@@ -25218,7 +25236,12 @@ var selectModel = (config2, requested, sources) => {
25218
25236
  };
25219
25237
  var selectThinking = (config2, requested, alias, sources) => {
25220
25238
  if (requested === void 0) {
25221
- return Effect_exports.succeed(sources.find((source) => source?.thinking !== void 0)?.thinking);
25239
+ const abstract = sources.find(
25240
+ (source) => source?.abstractThinking !== void 0
25241
+ )?.abstractThinking;
25242
+ return Effect_exports.succeed(
25243
+ abstract === void 0 || config2 === void 0 || alias === void 0 ? abstract : resolveThinkingForAlias(config2, alias, abstract) ?? abstract
25244
+ );
25222
25245
  }
25223
25246
  if (!Schema_exports.is(PiThinkingLevelSchema)(requested)) {
25224
25247
  return Effect_exports.fail(equipmentError("unknown_thinking_level", { thinkingLevel: requested }));
@@ -25254,8 +25277,18 @@ var makeHostToolRegistry = (options) => ({
25254
25277
  });
25255
25278
 
25256
25279
  // packages/host/src/equipment/configEquipmentResolver.ts
25257
- var makeConfigEquipmentResolver = (fs, path, config2, registry2 = makeHostToolRegistry()) => ({
25258
- resolve: (request) => Effect_exports.gen(function* () {
25280
+ var carriedTools = (current) => {
25281
+ const bins = [];
25282
+ const customToolNames = [];
25283
+ for (const name of current.customToolNames) {
25284
+ const bin = directToolBin(name);
25285
+ if (bin === void 0) customToolNames.push(name);
25286
+ else bins.push(bin);
25287
+ }
25288
+ return { bins, customToolNames };
25289
+ };
25290
+ var makeConfigEquipmentResolver = (fs, path, config2, registry2 = makeHostToolRegistry()) => {
25291
+ const resolve = (request) => Effect_exports.gen(function* () {
25259
25292
  const presetResolution = request.preset === void 0 ? void 0 : config2 === void 0 ? { found: false, reason: "not-found" } : resolveHirePreset(config2, request.preset);
25260
25293
  if (presetResolution !== void 0 && !presetResolution.found) {
25261
25294
  return yield* Effect_exports.fail(
@@ -25304,19 +25337,18 @@ var makeConfigEquipmentResolver = (fs, path, config2, registry2 = makeHostToolRe
25304
25337
  equipmentError("unknown_skill_groups", { groups: skillResolution.unknownGroups })
25305
25338
  );
25306
25339
  }
25307
- const namedSkills = [...request.overrides?.skillNames ?? skillResolution.skillNames];
25340
+ const requestedSkillNames = request.overrides?.skillNames;
25341
+ const requestedSkillPaths = request.overrides?.skillPaths;
25342
+ const namedSkills = requestedSkillNames ?? (requestedSkillPaths === void 0 ? skillResolution.skillNames : []);
25308
25343
  const skillPaths = [
25309
- ...request.overrides?.skillPaths ?? namedSkills.map((name) => path.join(resolveWorkerSkillsRoot(), name))
25344
+ .../* @__PURE__ */ new Set([
25345
+ ...namedSkills.map((name) => path.join(resolveWorkerSkillsRoot(), name)),
25346
+ ...requestedSkillPaths ?? []
25347
+ ])
25310
25348
  ];
25311
25349
  const skillNames = skillPaths.map((skillPath) => path.basename(skillPath, ".md"));
25312
25350
  yield* requirePaths(fs, skillPaths);
25313
25351
  const requestedMcp = request.overrides?.mcp;
25314
- const outsideUnion = resolveCampMcpOutsideUnion(config2, requestedMcp?.serverNames);
25315
- if (outsideUnion.length > 0) {
25316
- return yield* Effect_exports.fail(
25317
- equipmentError("mcp_outside_camp_catalog", { servers: outsideUnion })
25318
- );
25319
- }
25320
25352
  const mcpResolution = resolveMcpServers(config2, role, requestedMcp?.serverNames);
25321
25353
  if (mcpResolution.unknownServers.length > 0) {
25322
25354
  return yield* Effect_exports.fail(
@@ -25355,8 +25387,40 @@ var makeConfigEquipmentResolver = (fs, path, config2, registry2 = makeHostToolRe
25355
25387
  },
25356
25388
  ...request.overrides?.executionLimits === void 0 ? {} : { executionLimits: request.overrides.executionLimits }
25357
25389
  };
25358
- })
25359
- });
25390
+ });
25391
+ return {
25392
+ resolve,
25393
+ /*
25394
+ * The identity of a live worker travels unchanged, and every category the
25395
+ * change stays silent about keeps what the worker already carries. Rebuilding
25396
+ * the untouched ones from the role turned a single `--skill` into a silent
25397
+ * revoke of the servers and binaries the worker had been given at hire.
25398
+ */
25399
+ reresolve: (current, change) => {
25400
+ const carried = carriedTools(current);
25401
+ return resolve({
25402
+ ...current.role === void 0 ? {} : { role: current.role },
25403
+ ...current.preset === void 0 ? {} : { preset: current.preset },
25404
+ overrides: {
25405
+ ...current.model === void 0 ? {} : { model: current.model },
25406
+ ...current.thinkingLevel === void 0 ? {} : { thinkingLevel: current.thinkingLevel },
25407
+ readOnly: current.readOnly,
25408
+ builtinTools: change.builtinTools ?? current.builtinTools,
25409
+ customToolNames: change.customToolNames ?? carried.customToolNames,
25410
+ directTools: change.directTools ?? carried.bins,
25411
+ /*
25412
+ * Paths decide the set, so an unchanged worker keeps its exact paths
25413
+ * rather than names that would be re-resolved under the camp root.
25414
+ */
25415
+ ...change.skillNames === void 0 ? {} : { skillNames: change.skillNames },
25416
+ ...change.skillNames === void 0 && change.skillPaths === void 0 ? { skillPaths: current.skillPaths } : change.skillPaths === void 0 ? {} : { skillPaths: change.skillPaths },
25417
+ mcp: change.mcp ?? current.mcp,
25418
+ ...current.executionLimits === void 0 ? {} : { executionLimits: current.executionLimits }
25419
+ }
25420
+ });
25421
+ }
25422
+ };
25423
+ };
25360
25424
  var ConfigEquipmentResolverLive = Layer_exports.effect(
25361
25425
  EquipmentResolver,
25362
25426
  Effect_exports.gen(function* () {
@@ -26151,7 +26215,7 @@ var makeWorkerEquipmentRpcHandlers = ({
26151
26215
  },
26152
26216
  operations.equip(commandContext(request), {
26153
26217
  worker: workerIdentityFromDto(request.worker),
26154
- equipment: equipmentRequestFromDto(request.equipment)
26218
+ equipment: equipmentChangeFromDto(request.equipment)
26155
26219
  }).pipe(
26156
26220
  Effect_exports.map(workerDetailFromRecord),
26157
26221
  Effect_exports.mapError((error2) => failureFromHostOperation("equip", error2))
@@ -26489,6 +26553,8 @@ var directToolEnvironment = (source) => {
26489
26553
 
26490
26554
  // packages/host/src/tools/directTools.ts
26491
26555
  var DEFAULT_TIMEOUT_MS = 3e4;
26556
+ var TERMINATION_GRACE_MS = 2e3;
26557
+ var ABANDON_GRACE_MS = 2e3;
26492
26558
  var DEFAULT_MAX_OUTPUT_BYTES = 64 * 1024;
26493
26559
  var MAX_BUFFER_BYTES = 8 * 1024 * 1024;
26494
26560
  var truncate = (value, limit) => {
@@ -26525,8 +26591,15 @@ var runBinary = (executablePath, args, options, environment, signal) => {
26525
26591
  });
26526
26592
  let timedOut = false;
26527
26593
  let launchError;
26594
+ let settled = false;
26595
+ let killTimer;
26596
+ let abandonTimer;
26528
26597
  const stop = () => {
26529
26598
  child.kill("SIGTERM");
26599
+ killTimer ??= setTimeout(() => {
26600
+ child.kill("SIGKILL");
26601
+ abandonTimer = setTimeout(() => finish(void 0, "SIGKILL"), ABANDON_GRACE_MS);
26602
+ }, TERMINATION_GRACE_MS);
26530
26603
  };
26531
26604
  const stdout = collect(child.stdout, stop);
26532
26605
  const stderr = collect(child.stderr, stop);
@@ -26538,18 +26611,18 @@ var runBinary = (executablePath, args, options, environment, signal) => {
26538
26611
  timedOut = true;
26539
26612
  stop();
26540
26613
  }, options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
26541
- child.on("error", (cause) => {
26542
- if (signal?.aborted === true || cause.name === "AbortError") return;
26543
- launchError = `${cause.code ?? cause.name}: ${cause.message}`;
26544
- });
26545
- child.on("close", (code, terminatedBy) => {
26614
+ const finish = (code, terminatedBy) => {
26615
+ if (settled) return;
26616
+ settled = true;
26546
26617
  clearTimeout(timer);
26618
+ if (killTimer !== void 0) clearTimeout(killTimer);
26619
+ if (abandonTimer !== void 0) clearTimeout(abandonTimer);
26547
26620
  const sandboxStatus = sandboxed ? parseDirectToolSandboxStatus(status.text()) : void 0;
26548
26621
  resolve({
26549
26622
  stdout: stdout.text(),
26550
26623
  stderr: stderr.text(),
26551
26624
  exitCode: sandboxStatus?.exitCode ?? code ?? void 0,
26552
- signal: terminatedBy ?? void 0,
26625
+ signal: terminatedBy,
26553
26626
  timedOut,
26554
26627
  /*
26555
26628
  * A sandbox that never reached the command is only a refusal when the
@@ -26559,6 +26632,13 @@ var runBinary = (executablePath, args, options, environment, signal) => {
26559
26632
  ...sandboxStatus !== void 0 && !sandboxStatus.started && !timedOut && launchError === void 0 ? { sandboxFailed: true } : {},
26560
26633
  ...launchError === void 0 ? {} : { launchError }
26561
26634
  });
26635
+ };
26636
+ child.on("error", (cause) => {
26637
+ if (signal?.aborted === true || cause.name === "AbortError") return;
26638
+ launchError = `${cause.code ?? cause.name}: ${cause.message}`;
26639
+ });
26640
+ child.on("close", (code, terminatedBy) => {
26641
+ finish(code, terminatedBy ?? void 0);
26562
26642
  });
26563
26643
  });
26564
26644
  };
package/dist/priiisk.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  fromReadable,
6
6
  layer,
7
7
  runMain
8
- } from "./chunk-4V3HXXQ6.js";
8
+ } from "./chunk-NU3ROW7C.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-FZQM7AKO.js";
26
+ } from "./chunk-RFMZNOZK.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-W2ZL6LWM.js";
61
+ } from "./chunk-TG56CUWG.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-TZBPOE6G.js";
242
+ } from "./chunk-BXNKAII7.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-BXVX5A4M.js")).pipe(
19972
+ var selectCampRunOnDemand = (items) => Effect_exports.promise(() => import("./chunk-CJXDEUNX.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-TGTG65RZ.js")).pipe(
20045
+ var runDoctorOnDemand = Effect_exports.promise(() => import("./chunk-XYHO6PMA.js")).pipe(
20029
20046
  Effect_exports.flatMap((doctor) => doctor.runDoctor)
20030
20047
  );
20031
20048
  var statusLabel = {
@@ -20209,6 +20226,48 @@ var equipmentRequest = (role, preset, overrides) => ({
20209
20226
  ...Option_exports.isSome(preset) ? { preset: preset.value } : {},
20210
20227
  ...overrides === void 0 ? {} : { overrides }
20211
20228
  });
20229
+ var equipmentChangeOptions = {
20230
+ tools: toolOption,
20231
+ customTools: customToolOption,
20232
+ skills: skillOption,
20233
+ skillPaths: skillPathOption,
20234
+ directTools: directToolOption,
20235
+ mcp: mcpOption,
20236
+ mcpTools: mcpToolOption,
20237
+ noTools: noToolsOption,
20238
+ noCustomTools: noCustomToolsOption,
20239
+ noSkills: noSkillsOption,
20240
+ noDirectTools: noDirectToolsOption,
20241
+ noMcp: noMcpOption
20242
+ };
20243
+ var resolveEquipmentChange = (operation, input) => {
20244
+ const full = {
20245
+ ...input,
20246
+ model: Option_exports.none(),
20247
+ thinking: Option_exports.none(),
20248
+ access: Option_exports.none()
20249
+ };
20250
+ const categories = conflictingEquipmentCategories(full);
20251
+ if (categories.length > 0) {
20252
+ return Effect_exports.fail(
20253
+ new CliEquipmentConflict({
20254
+ operation,
20255
+ code: "equipment_flag_conflict",
20256
+ message: `granting and clearing the same equipment: ${categories.join(", ")}`,
20257
+ categories
20258
+ })
20259
+ );
20260
+ }
20261
+ const overrides = equipmentOverrides(full) ?? {};
20262
+ return Effect_exports.succeed({
20263
+ ...overrides.builtinTools === void 0 ? {} : { builtinTools: overrides.builtinTools },
20264
+ ...overrides.customToolNames === void 0 ? {} : { customToolNames: overrides.customToolNames },
20265
+ ...overrides.directTools === void 0 ? {} : { directTools: overrides.directTools },
20266
+ ...overrides.skillNames === void 0 ? {} : { skillNames: overrides.skillNames },
20267
+ ...overrides.skillPaths === void 0 ? {} : { skillPaths: overrides.skillPaths },
20268
+ ...overrides.mcp === void 0 ? {} : { mcp: overrides.mcp }
20269
+ });
20270
+ };
20212
20271
 
20213
20272
  // packages/cli/src/commands/equipCommand.ts
20214
20273
  var equipCommand = Command_exports.make(
@@ -20216,20 +20275,18 @@ var equipCommand = Command_exports.make(
20216
20275
  {
20217
20276
  worker: workerArgument,
20218
20277
  byId: byIdOption,
20219
- role: roleOption,
20220
- preset: presetOption,
20221
- ...equipmentOptions,
20278
+ ...equipmentChangeOptions,
20222
20279
  json: jsonOption
20223
20280
  },
20224
- ({ worker, byId, role, preset, json, ...equipment }) => resolveEquipmentOverrides("equip", equipment).pipe(
20281
+ ({ worker, byId, json, ...equipment }) => resolveEquipmentChange("equip", equipment).pipe(
20225
20282
  Effect_exports.flatMap(
20226
- (overrides) => withCampRpc(
20283
+ (change) => withCampRpc(
20227
20284
  ({ client, command: command2 }) => command2().pipe(
20228
20285
  Effect_exports.flatMap(
20229
20286
  (context) => client.Equip({
20230
20287
  ...context,
20231
20288
  worker: workerSelector(worker, byId),
20232
- equipment: equipmentRequest(role, preset, overrides)
20289
+ equipment: change
20233
20290
  })
20234
20291
  )
20235
20292
  ),
@@ -20239,7 +20296,9 @@ var equipCommand = Command_exports.make(
20239
20296
  printValue(json, formatWorker)
20240
20297
  )
20241
20298
  ).pipe(
20242
- Command_exports.withDescription("Changes the equipment of a live worker without recreating its session.")
20299
+ Command_exports.withDescription(
20300
+ "Hands a live worker skills, MCP servers, binaries and tools, or takes them back."
20301
+ )
20243
20302
  );
20244
20303
 
20245
20304
  // packages/cli/src/client/campStartupFlow.ts
@@ -20735,14 +20794,20 @@ var command = rootCommand.pipe(
20735
20794
  );
20736
20795
  var cli = Command_exports.run(command, {
20737
20796
  name: "priiisk camp control",
20738
- version: "0.1.8"
20797
+ version: "0.1.10"
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
+ );
20739
20810
  });
20740
- var runCliCommand = (argumentsList) => cli(argumentsList).pipe(
20741
- Effect_exports.matchEffect({
20742
- onFailure: (error3) => reportCliFailure(argumentsList.includes("--json"), error3).pipe(Effect_exports.as(1)),
20743
- onSuccess: () => Effect_exports.succeed(0)
20744
- })
20745
- );
20746
20811
  var runCli = (argumentsList) => runCliCommand(argumentsList).pipe(
20747
20812
  Effect_exports.flatMap(
20748
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.8",
3
+ "version": "0.1.10",
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-4V3HXXQ6.js",
11
- "dist/chunk-BXVX5A4M.js",
12
- "dist/chunk-FZQM7AKO.js",
13
- "dist/chunk-OWFOOE7W.js",
14
- "dist/chunk-OWFOOE7W.js.LEGAL.txt",
15
- "dist/chunk-S7LCWMQY.js",
16
- "dist/chunk-TGTG65RZ.js",
17
- "dist/chunk-TZBPOE6G.js",
18
- "dist/chunk-W2ZL6LWM.js",
19
- "dist/chunk-W2ZL6LWM.js.LEGAL.txt",
10
+ "dist/chunk-BXNKAII7.js",
11
+ "dist/chunk-CJXDEUNX.js",
12
+ "dist/chunk-KG3GMS7Z.js",
13
+ "dist/chunk-KG3GMS7Z.js.LEGAL.txt",
14
+ "dist/chunk-NU3ROW7C.js",
15
+ "dist/chunk-O35MCKHY.js",
16
+ "dist/chunk-RFMZNOZK.js",
17
+ "dist/chunk-TG56CUWG.js",
18
+ "dist/chunk-TG56CUWG.js.LEGAL.txt",
19
+ "dist/chunk-XYHO6PMA.js",
20
20
  "dist/priiisk-host.js",
21
21
  "dist/priiisk.js",
22
22
  "profiles",