@hasna/skills 0.2.0 → 0.3.0

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.
@@ -15,6 +15,20 @@ export declare const PACKAGE_VERSION: string;
15
15
  */
16
16
  export declare const SLOW_TEST_TIMEOUT = 30000;
17
17
  export declare const CLEAN_CLI_HOME: string;
18
+ /**
19
+ * The one line an unconfigured install is allowed to print on stderr.
20
+ *
21
+ * Local mode announces itself (owner ruling 2026-09-04, hasna/apps#1720): with no
22
+ * credential and no API URL, the CLI says once, per process, that it is running
23
+ * on this machine. That is not the deleted onboarding nudge — it demands no
24
+ * choice and asks no question — but it does mean "stderr is empty" is the wrong
25
+ * assertion for a local command. Use {@link stderrWithoutLocalNotice}, which
26
+ * strips exactly this line and nothing else, so an unexpected warning still
27
+ * fails the test it would have failed before.
28
+ */
29
+ export declare const LOCAL_MODE_NOTICE_MARKER = "skills: local mode";
30
+ /** `stderr` with the single local-mode notice line removed. */
31
+ export declare function stderrWithoutLocalNotice(stderr: string): string;
18
32
  export declare function runCli(args: string[], env?: Record<string, string>): Promise<{
19
33
  stdout: string;
20
34
  stderr: string;
@@ -29,6 +29,12 @@ export interface PushSkillResult {
29
29
  response?: unknown;
30
30
  /** The version the instance recorded (after any --force-new-version bump). */
31
31
  version?: string;
32
+ /**
33
+ * True when the publish was idempotent: the version this push ended on already
34
+ * existed on the instance with these exact bytes, so nothing new was recorded
35
+ * (hasna/apps#1671). Distinct from a fresh "published as X".
36
+ */
37
+ alreadyPublished?: boolean;
32
38
  /** Per-file digests and provenance sent alongside the bundle. */
33
39
  manifest?: SkillVersionManifest;
34
40
  }
@@ -64,4 +70,12 @@ export interface SkillVersionManifest {
64
70
  * paths beyond the machine name.
65
71
  */
66
72
  export declare function buildVersionManifest(skillDir: string, packed: PackedSkillBundle): SkillVersionManifest;
73
+ /**
74
+ * Strip userinfo (username/password) from a git remote URL before it is recorded in a
75
+ * version manifest. Only URL schemes where userinfo is HTTP-style credentials are
76
+ * stripped: an ssh login user (`ssh://git@host/...`, or scp-style `git@host:path`,
77
+ * which never parses as a URL) is the transport user, not an embedded credential, and
78
+ * passes through unchanged.
79
+ */
80
+ export declare function sanitizeGitRemote(url: string | null): string | null;
67
81
  export type { PackedSkillBundle };
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export { buildSkillsApiUrl, getConfiguredApiUrl, loadRemoteRegistry, loadRemoteS
17
17
  export { ARTICLE_GENERATION_SLUG, validateBlogArticleRunOptions, type BlogArticleRunOptions, type BlogArticleValidationResult, } from "./lib/blog-article.js";
18
18
  export { getCompactSkillDiscovery, getPublicSkillDiscovery, publicDiscoveryDependencies, publicDiscoveryDocumentation, publicDiscoveryEnvVars, sanitizePublicDiscoveryText, type CompactSkillDiscovery, type PublicSkillDiscovery, } from "./lib/discovery.js";
19
19
  export { TOOL_PRIMITIVE_SCHEMA_VERSION, TOOL_PRIMITIVES, createSkillToolDependencies, getSkillToolDependencies, getToolPrimitive, isGatewayBackedSkill, listToolPrimitives, validateToolPrimitiveCoverage, type SkillToolDependencies, type SkillToolDependency, type ToolPrimitive, type ToolPrimitiveCoverageIssue, type ToolPrimitiveCoverageResult, type ToolPrimitiveRuntime, type ToolPrimitiveSummary, } from "./lib/tool-primitives.js";
20
+ export { MissingSkillsFleetError, SkillsFleetCredentialError, SKILLS_API_KEY_ENV, SKILLS_API_KEY_ENV_KEYS, SKILLS_API_URL_ENV, SKILLS_API_URL_ENV_KEYS, SKILLS_APP, configuredSkillsApiUrl, noticeLocalSkillsMode, normalizeSkillsApiOrigin, requireSkillsApiKey, requireSkillsApiOrigin, requireSkillsFleet, resolveSkillsApiKey, resolveSkillsApiOrigin, resolveSkillsFleet, skillsCredentialFilePath, skillsCredentialFiles, skillsCredentialOrReason, type HostedSkillsFleet, type LocalSkillsFleet, type SkillsFleet, type SkillsFleetErrorCode, type SkillsFleetOptions, } from "./lib/fleet-credentials.js";
20
21
  export { RemoteSkillsClient, createRemoteSkillsClient, RemoteRouteUnsupportedError, RemoteRequestError, type RemotePin, type RemoteSkillSummary, type UpdatedSincePage, } from "./lib/remote-client.js";
21
22
  export { REMOTE_SKILL_RUN_CONTRACT_VERSION, normalizeRemoteSkillRunContract, type RemoteSkillRunContract, } from "./lib/remote-run-contract.js";
22
23
  export { addSchedule, listSchedules, removeSchedule, setScheduleEnabled, getDueSchedules, recordScheduleRun, validateCron, getNextRun, type SkillSchedule, } from "./lib/scheduler.js";