@kitman-sh/cli 0.7.2 → 0.7.3

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.
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed5,
5
5
  withFiber
6
- } from "./chunk-704ws2q7.js";
6
+ } from "./chunk-8g2twwm8.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.0.4/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;
@@ -41,14 +41,14 @@ import {
41
41
  KitAssignmentDeclaration,
42
42
  PackageDeclarations,
43
43
  RunnerRpcProtocolVersion
44
- } from "./chunk-704ws2q7.js";
45
- import"./chunk-dwgta18y.js";
46
- import"./chunk-ae7gx971.js";
47
- import"./chunk-ztmwmk8t.js";
44
+ } from "./chunk-8g2twwm8.js";
45
+ import"./chunk-84t0s0s2.js";
46
+ import"./chunk-c5nwtn11.js";
47
+ import"./chunk-0296rete.js";
48
48
  import {
49
49
  describeFlag,
50
50
  Described
51
- } from "./chunk-6kdj8psf.js";
51
+ } from "./chunk-1n61xbaq.js";
52
52
 
53
53
  // packages/sdk/src/build/index.ts
54
54
  class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {
@@ -3,9 +3,9 @@ import {
3
3
  runnerWebSocketProtocol2,
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2
6
- } from "./chunk-ae7gx971.js";
7
- import"./chunk-dwgta18y.js";
8
- import"./chunk-704ws2q7.js";
6
+ } from "./chunk-c5nwtn11.js";
7
+ import"./chunk-84t0s0s2.js";
8
+ import"./chunk-8g2twwm8.js";
9
9
  export {
10
10
  makeRunnerRpcClient2 as makeRunnerRpcClient,
11
11
  runnerRpcUrl2 as runnerRpcUrl,
package/dist/index.js CHANGED
@@ -227,7 +227,7 @@ import {
227
227
  runCommand2,
228
228
  detectHarnesses2,
229
229
  herdrRunnerCapabilities2
230
- } from "./chunk-704ws2q7.js";
230
+ } from "./chunk-8g2twwm8.js";
231
231
 
232
232
  // node_modules/.bun/effect@4.0.4/node_modules/effect/dist/internal/rcRef.js
233
233
  var TypeId = "~effect/RcRef";
@@ -1336,7 +1336,7 @@ function renderMaterializationPlan(plan) {
1336
1336
  kind: operation.kind,
1337
1337
  skillName: operation.skillName,
1338
1338
  skillIdentityHash: hashIdentity(auditOperationIdentity(operation)),
1339
- target: operation.kind === "write_skill" ? operation.path : operation.targetPath
1339
+ target: operation.kind === "symlink_skill" ? operation.targetPath : operation.path
1340
1340
  })),
1341
1341
  materializedSkills: plan.materializedSkills.map((skill) => ({
1342
1342
  name: skill.name,
@@ -1362,7 +1362,11 @@ function renderConfigPlan(plan) {
1362
1362
  };
1363
1363
  }
1364
1364
  function auditOperationIdentity(operation) {
1365
- return operation.kind === "write_skill" ? `write_skill:${operation.skillName}:content_sha256:${hashIdentity(operation.content)}:${operation.path}` : `symlink_skill:${operation.skillName}:symlink:${operation.sourcePath}:${operation.targetPath}`;
1365
+ if (operation.kind === "write_skill")
1366
+ return `write_skill:${operation.skillName}:content_sha256:${hashIdentity(operation.content)}:${operation.path}`;
1367
+ if (operation.kind === "fetch_git_skill")
1368
+ return `fetch_git_skill:${operation.skillName}:${operation.url}#${operation.ref}:${operation.repositoryPath ?? ""}:${operation.path}`;
1369
+ return `symlink_skill:${operation.skillName}:symlink:${operation.sourcePath}:${operation.targetPath}`;
1366
1370
  }
1367
1371
  function auditMaterializedSkillIdentity(skill) {
1368
1372
  return `${skill.harness}:${skill.name}:${skill.source.kind}:${skill.skillPath ?? ""}:${skill.managed}`;
@@ -1929,7 +1933,7 @@ var package_default = {
1929
1933
  };
1930
1934
 
1931
1935
  // apps/cli/src/scaffold.ts
1932
- var cliVersion = "0.7.2";
1936
+ var cliVersion = "0.7.3";
1933
1937
  var packageJson = (name, scaffold) => `${JSON.stringify({
1934
1938
  name,
1935
1939
  private: true,
@@ -2049,7 +2053,7 @@ var scaffoldPackage = (directory, scaffold = {}) => gen(function* () {
2049
2053
  const path = yield* Path;
2050
2054
  const root = path.resolve(directory);
2051
2055
  if (scaffold.fork !== undefined) {
2052
- const { shippedLoops } = yield* promise(() => import("./chunk-epdajq63.js"));
2056
+ const { shippedLoops } = yield* promise(() => import("./chunk-80g9af03.js"));
2053
2057
  if (!(scaffold.fork in shippedLoops))
2054
2058
  return yield* new CliError({
2055
2059
  message: `Kitman ships no Loop ${scaffold.fork}; fork one of ${Object.keys(shippedLoops).join(", ")}`
@@ -2143,7 +2147,7 @@ var Usage = [
2143
2147
  `);
2144
2148
  var KitCreateValidator = guard(KitCreate);
2145
2149
  var KitUpdateValidator = guard(KitUpdate);
2146
- var agentRuntime = promise(() => import("./chunk-vjnae06n.js"));
2150
+ var agentRuntime = promise(() => import("./chunk-kt08et8q.js"));
2147
2151
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2148
2152
  defaultValue: () => gen(function* () {
2149
2153
  const tui = yield* tryPromise({
@@ -2623,7 +2627,7 @@ function harnessSync(args) {
2623
2627
  };
2624
2628
  });
2625
2629
  const projectRoot = command.flags.projectScope ? yield* resolveProjectWriteRoot : undefined;
2626
- const targetPlans = yield* previewEnvironmentPlans(environments, command, projectRoot, config.mcpCredentialName, syncKits);
2630
+ const targetPlans = yield* previewEnvironmentPlans(environments, command, projectRoot, config.mcpCredentialName, syncKits, (yield* readUserConfig())?.approvedSkillSources);
2627
2631
  const environmentPlan = composeAgentEnvironmentSyncPlan(targetPlans);
2628
2632
  const materializationPlans = targetPlans.map((target) => target.skills);
2629
2633
  const userConfigPlans = command.flags.projectScope ? [] : targetPlans.map((target) => target.harnessConfig);
@@ -2795,7 +2799,7 @@ function isInstallDefaultKit(kit) {
2795
2799
  const rollout = isObject(marketplace) && marketplace !== null && "rollout" in marketplace ? marketplace.rollout : undefined;
2796
2800
  return isObject(rollout) && rollout !== null && "installDefault" in rollout && rollout.installDefault === true;
2797
2801
  }
2798
- function previewEnvironmentPlans(environments, command, projectRoot, mcpCredentialName, syncKits = []) {
2802
+ function previewEnvironmentPlans(environments, command, projectRoot, mcpCredentialName, syncKits = [], approvedSkillSources) {
2799
2803
  return forEach(environments, (environment, index) => gen(function* () {
2800
2804
  const rootDir = command.flags.projectScope ? projectRoot : getOrUndefined(yield* option2(String3("HOME")));
2801
2805
  const { previewAgentEnvironmentPlan } = yield* agentRuntime;
@@ -2805,6 +2809,7 @@ function previewEnvironmentPlans(environments, command, projectRoot, mcpCredenti
2805
2809
  scope: command.flags.projectScope ? "project" : "user",
2806
2810
  ...rootDir === undefined ? undefined : { rootDir },
2807
2811
  ...command.flags.noInstall === undefined ? undefined : { noInstall: command.flags.noInstall },
2812
+ ...approvedSkillSources === undefined ? undefined : { approvedSkillSources },
2808
2813
  ...mcpCredentialName === undefined ? undefined : { mcpCredentialName }
2809
2814
  });
2810
2815
  }));
@@ -3449,7 +3454,7 @@ function startCanonicalHerdrRunnerCommand(input) {
3449
3454
  superviseReplica,
3450
3455
  verificationExecutor
3451
3456
  } = yield* agentRuntime;
3452
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-gzhxsb25.js"));
3457
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-zc0ebz8f.js"));
3453
3458
  const settings = yield* runnerSettings;
3454
3459
  const { concurrency, fullAccess, sshAgentAvailable } = settings;
3455
3460
  const personal = input.runner.ownership.kind === "personal";
@@ -3667,7 +3672,7 @@ function mcpCommand(args) {
3667
3672
  if (command.action === "run") {
3668
3673
  if (command.args.length > 0)
3669
3674
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
3670
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-226sychh.js"));
3675
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-nvf0begz.js"));
3671
3676
  return yield* runMcpServerCommand({ flags: command.flags });
3672
3677
  }
3673
3678
  if (command.action !== "setup")
@@ -4687,7 +4692,7 @@ function secretCommand(args) {
4687
4692
  });
4688
4693
  }
4689
4694
  var PackageBuilder = Reference("kitman/cli/PackageBuilder", {
4690
- defaultValue: () => (directory) => flatMap(promise(() => import("./chunk-hrd7xmax.js")), (build) => build.buildPackage(directory))
4695
+ defaultValue: () => (directory) => flatMap(promise(() => import("./chunk-yysejjz0.js")), (build) => build.buildPackage(directory))
4691
4696
  });
4692
4697
  var optionalEnv = (name) => String3(name).pipe(option2, map3(getOrUndefined));
4693
4698
  var ciIdToken = (apiUrl) => gen(function* () {
@@ -5192,9 +5197,7 @@ function runnerOwnershipFromCommand(command, required) {
5192
5197
  const ownerUserId = command.flags.scopeId;
5193
5198
  if (!ownerUserId)
5194
5199
  throw new Error("personal runner scope requires --scope-id <owner-user-id>");
5195
- if (command.flags.projectAccess !== undefined)
5196
- throw new Error("personal runner scope does not accept --project-access");
5197
- return { kind: "personal", ownerUserId };
5200
+ return { kind: "personal", ownerUserId, projectAccess: command.flags.projectAccess ?? "all" };
5198
5201
  }
5199
5202
  throw new Error("--scope-type must be workspace, project, or personal");
5200
5203
  }
@@ -5450,12 +5453,12 @@ function repoBindingCredentialRefLabel(ref) {
5450
5453
  function runnerRow(runner) {
5451
5454
  const ownership = runner.ownership;
5452
5455
  let effectiveProjectAccess;
5453
- if (ownership.kind === "workspace")
5454
- effectiveProjectAccess = ownership.projectAccess === "all" ? "workspace_all" : runner.projectGrantIds.join(",") || "selected_none";
5455
- else if (ownership.kind === "project")
5456
+ if (ownership.kind === "project")
5456
5457
  effectiveProjectAccess = `project:${ownership.projectId}`;
5458
+ else if (ownership.projectAccess === "selected")
5459
+ effectiveProjectAccess = runner.projectGrantIds.join(",") || "selected_none";
5457
5460
  else
5458
- effectiveProjectAccess = `personal:${ownership.ownerUserId}`;
5461
+ effectiveProjectAccess = ownership.kind === "workspace" ? "workspace_all" : `personal:${ownership.ownerUserId}`;
5459
5462
  return {
5460
5463
  id: runner.id,
5461
5464
  name: runner.name,
@@ -5469,7 +5472,7 @@ function runnerRow(runner) {
5469
5472
  sandboxes: runner.capabilities.sandboxBackends.join(","),
5470
5473
  labels: runner.labels.join(","),
5471
5474
  ownership: ownership.kind,
5472
- projectAccess: ownership.kind === "workspace" ? ownership.projectAccess : undefined,
5475
+ projectAccess: ownership.kind === "project" ? undefined : ownership.projectAccess,
5473
5476
  ownerUserId: ownership.kind === "personal" ? ownership.ownerUserId : undefined,
5474
5477
  scopedProjectId: ownership.kind === "project" ? ownership.projectId : undefined,
5475
5478
  effectiveProjectAccess,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitman-sh/cli",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {