@theholocron/cli 2.1.0 → 2.1.1

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.
@@ -1,5 +1,4 @@
1
1
  import { ProviderApiError } from "@theholocron/http-client";
2
-
3
2
  //#region src/capabilities/index.d.ts
4
3
  /**
5
4
  * Capability interfaces — the contracts that providers implement.
@@ -276,7 +275,8 @@ interface Issues extends ProviderIdentity {
276
275
  create(input: {
277
276
  summary: string;
278
277
  body?: string;
279
- labels?: string[]; /** Numeric id or exact title (case-insensitive). */
278
+ labels?: string[];
279
+ /** Numeric id or exact title (case-insensitive). */
280
280
  milestone?: string;
281
281
  }): Promise<{
282
282
  key: string;
@@ -322,7 +322,8 @@ interface Deployment extends ProviderIdentity {
322
322
  /** Create if missing, otherwise return existing. Idempotent. */
323
323
  ensureProject(input: {
324
324
  name: string;
325
- framework?: string; /** "owner/repo" — passed when linking to a Git provider. */
325
+ framework?: string;
326
+ /** "owner/repo" — passed when linking to a Git provider. */
326
327
  repo?: string;
327
328
  rootDirectory?: string;
328
329
  }): Promise<DeploymentProject>;
package/dist/cli.mjs CHANGED
@@ -3590,7 +3590,8 @@ async function runSetup(input) {
3590
3590
  "prd"
3591
3591
  ]) {
3592
3592
  steps.push(await runStep("vault", `ensureEnvironment ${envName}`, dryRun, async () => {
3593
- return `${envName} ${(await vault.ensureEnvironment(config.name, envName)).alreadyExists ? "exists" : "created"}`;
3593
+ const result = await vault.ensureEnvironment(config.name, envName);
3594
+ return `${envName} ${result.alreadyExists ? "exists" : "created"}`;
3594
3595
  }));
3595
3596
  print(formatStep(steps[steps.length - 1]));
3596
3597
  }
@@ -3686,11 +3687,10 @@ async function fetchExternalSkill(entry) {
3686
3687
  const res = await fetch(url);
3687
3688
  if (!res.ok) throw new Error(`HTTP ${res.status} fetching ${url}`);
3688
3689
  const content = await res.text();
3689
- if (entry.computedHash) {
3690
- const actual = createHash("sha256").update(content).digest("hex");
3691
- if (actual !== entry.computedHash) throw new Error(`hash mismatch for ${entry.source}/${entry.skillPath}: expected ${entry.computedHash}, got ${actual}`);
3692
- }
3693
- return content;
3690
+ return {
3691
+ content,
3692
+ stale: !!entry.computedHash && createHash("sha256").update(content).digest("hex") !== entry.computedHash
3693
+ };
3694
3694
  }
3695
3695
  const AGENTS_SKILLS_ROOT = ".agents/skills";
3696
3696
  /** Relative path of the agent-specific symlink. undefined = unsupported agent. */
@@ -3740,6 +3740,7 @@ async function installSkills({ agent, skills, repoRoot }) {
3740
3740
  installed.push(name);
3741
3741
  }
3742
3742
  const externalFailed = [];
3743
+ const externalStale = [];
3743
3744
  if (missing.length > 0) {
3744
3745
  let lock = null;
3745
3746
  try {
@@ -3749,7 +3750,7 @@ async function installSkills({ agent, skills, repoRoot }) {
3749
3750
  const entry = lock.skills[name];
3750
3751
  if (!entry) continue;
3751
3752
  try {
3752
- const content = await fetchExternalSkill(entry);
3753
+ const { content, stale: isStale } = await fetchExternalSkill(entry);
3753
3754
  const agentsDir = join(repoRoot, AGENTS_SKILLS_ROOT, name);
3754
3755
  await mkdir(agentsDir, { recursive: true });
3755
3756
  await writeFile(join(agentsDir, "SKILL.md"), content);
@@ -3761,6 +3762,7 @@ async function installSkills({ agent, skills, repoRoot }) {
3761
3762
  await symlink(relative(dirname(symlinkPath), agentsDir).replace(/\\/g, "/"), symlinkPath);
3762
3763
  missing.splice(missing.indexOf(name), 1);
3763
3764
  installed.push(name);
3765
+ if (isStale) externalStale.push(name);
3764
3766
  } catch {
3765
3767
  missing.splice(missing.indexOf(name), 1);
3766
3768
  externalFailed.push(name);
@@ -3774,6 +3776,7 @@ async function installSkills({ agent, skills, repoRoot }) {
3774
3776
  ], symlinkFn);
3775
3777
  const parts = [`installed ${installed.length}`];
3776
3778
  if (stale.length > 0) parts.push(`pruned: ${stale.join(", ")}`);
3779
+ if (externalStale.length > 0) parts.push(`stale: ${externalStale.join(", ")} (run \`holocron skills update\` to refresh)`);
3777
3780
  if (externalFailed.length > 0) parts.push(`fetch failed: ${externalFailed.join(", ")}`);
3778
3781
  if (missing.length > 0) parts.push(`unknown: ${missing.join(", ")}`);
3779
3782
  return parts.join("; ");
@@ -3799,9 +3802,10 @@ async function copyDirRecursive(src, dest) {
3799
3802
  }
3800
3803
  }
3801
3804
  async function updateSkillsGitignore(gitignorePath, existingContent, skills, symlinkFn) {
3805
+ const entries = [`/${AGENTS_SKILLS_ROOT}/`, ...skills.map((n) => `/${symlinkFn(n)}`)];
3802
3806
  const block = [
3803
3807
  GITIGNORE_BLOCK_START,
3804
- ...[`/${AGENTS_SKILLS_ROOT}/`, ...skills.map((n) => `/${symlinkFn(n)}`)],
3808
+ ...entries,
3805
3809
  GITIGNORE_BLOCK_END
3806
3810
  ].join("\n");
3807
3811
  let content;
package/dist/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, EnsureResult, Environment, EnvironmentReviewer, Environments, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, NormalizedAuthUser, Notifications, Observability, ParseWebhookInput, ProviderApiError, ProviderIdentity, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, isMulti } from "./capabilities/index.mjs";
2
2
  import { AuthError, RequestOptions, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
3
-
4
3
  //#region src/auth-resolver.d.ts
5
4
  type ResolveTokenConfig = Omit<ResolveTokenConfig$1, "getKeyringToken">;
6
5
  /** Wraps `createResolveToken` from `@theholocron/http` and injects the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "The Holocron CLI — a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "homepage": "https://github.com/theholocron/holocron/tree/main/packages/cli#readme",
6
6
  "bugs": "https://github.com/theholocron/holocron/issues",