hngr 0.8.0 → 0.10.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.
package/README.md CHANGED
@@ -13,13 +13,13 @@ hngr --version
13
13
  ## Authenticate
14
14
 
15
15
  ```sh
16
- # Interactive: username and password against http://10.199.100.24:26434 (the
16
+ # Interactive: username and password against https://hangar.paykka.com (the
17
17
  # built-in default), then an access token is written to
18
18
  # ~/.config/hngr/config.json (0600).
19
19
  hngr auth login
20
20
 
21
- # A different deployment. The built-in default is plain http on a private
22
- # network; any other host needs https:// (or an explicit --insecure).
21
+ # A different deployment. Any non-local host needs https:// (or an explicit
22
+ # --insecure).
23
23
  hngr auth login --server https://hangar.example.com
24
24
 
25
25
  # CI or containers: read an existing access token from stdin.
@@ -79,6 +79,26 @@ also install `system/find-capabilities` (the catalog's discovery skill, which fi
79
79
  Skills and MCP servers) for the same scope and agents; it is skipped silently when a copy
80
80
  already exists in either scope, and a failed follow-up install only prints a warning.
81
81
 
82
+ ### Lock files
83
+
84
+ `hngr skills add` also updates the lock file `npx skills` reads: `skills-lock.json` (v2)
85
+ for a project install, and `$XDG_STATE_HOME/skills/.skill-lock.json` or
86
+ `~/.agents/.skill-lock.json` (v3) for a global one. An entry records the downloaded
87
+ Content URL, `SKILL.md`'s path in the archive and the portable content hash, so either
88
+ CLI can list, remove or update the install. Other entries and unknown top-level fields
89
+ are preserved; a lock file another schema version owns is left alone with a warning.
90
+ `--dir` installs are not tracked.
91
+
92
+ Reinstall what a lock records on a fresh checkout:
93
+
94
+ ```sh
95
+ hngr skills restore --agent claude-code
96
+ hngr skills restore --global --all
97
+ ```
98
+
99
+ Only entries whose source is the configured server are restored; entries another tool
100
+ installed are reported and skipped.
101
+
82
102
  MCP installs ask for the same scope and then for the MCP targets to write, with an
83
103
  `All targets` entry; targets whose config already exists are preselected, and Claude
84
104
  Code's `.mcp.json` is preselected for project installs. Without a terminal, pass
@@ -110,6 +130,22 @@ hngr schema capabilities list
110
130
  hngr completion bash # or zsh / fish
111
131
  ```
112
132
 
133
+ ## Manage sync tasks
134
+
135
+ Platform Admins can mirror the `seek` Skill source into a Namespace. Tasks are
136
+ created disabled; run a dry-run first, then enable. The target Namespace is
137
+ immutable after creation, and deleting a task never deletes its Capabilities.
138
+
139
+ ```sh
140
+ hngr sync list
141
+ hngr sync create --namespace team-a --interval 1h
142
+ hngr sync run <task-id> --dry-run --wait
143
+ hngr sync update <task-id> --enable
144
+ hngr sync runs list <task-id>
145
+ hngr sync runs show <task-id> <run-id>
146
+ hngr sync items <task-id> --state conflict
147
+ ```
148
+
113
149
  ## Output contract
114
150
 
115
151
  stdout carries the payload only (JSON, 2-space indent). Progress, summaries, warnings and
@@ -1,4 +1,4 @@
1
- import { C as HngrError, d as configFilePath, f as deleteStoredConfig, g as resolveConnection, h as redactUrl, m as readStoredConfig, n as apiGet, p as normalizeServerUrl, t as apiFetch, v as storedAudience, y as writeStoredConfig } from "./http-DgHX7Fux.mjs";
1
+ import { C as HngrError, d as configFilePath, f as deleteStoredConfig, g as resolveConnection, h as redactUrl, m as readStoredConfig, n as apiGet, p as normalizeServerUrl, t as apiFetch, v as storedAudience, y as writeStoredConfig } from "./http-CLG2jrIE.mjs";
2
2
  import { hostname } from "node:os";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { spawn } from "node:child_process";
@@ -60,8 +60,8 @@ function canPrompt(ctx) {
60
60
  return ctx.io.stdin.isTTY && ctx.io.stdout.isTTY && ctx.io.prompts !== void 0;
61
61
  }
62
62
  /**
63
- * Enforces https everywhere; http only for localhost, 127.0.0.1, [::1], the
64
- * built-in default, or with an explicit --insecure.
63
+ * Enforces https everywhere; http only for localhost, 127.0.0.1, [::1], or
64
+ * with an explicit --insecure.
65
65
  */
66
66
  function assertServerUrlAllowed(raw, insecure) {
67
67
  const server = normalizeServerUrl(raw);
@@ -72,7 +72,7 @@ function assertServerUrlAllowed(raw, insecure) {
72
72
  "localhost",
73
73
  "127.0.0.1",
74
74
  "[::1]"
75
- ].includes(url.hostname) || insecure || server === "http://10.199.100.24:26434") return server;
75
+ ].includes(url.hostname) || insecure) return server;
76
76
  throw new HngrError({
77
77
  type: "config",
78
78
  title: `Refusing insecure server URL ${redactUrl(server)}`,
@@ -114,7 +114,7 @@ async function revokePreviousToken(ctx, stored) {
114
114
  async function login(ctx, argv) {
115
115
  if (ctx.env.HANGAR_TOKEN) throw envTokenRefusal();
116
116
  const stored = await readStoredConfig(ctx.env);
117
- const server = assertServerUrlAllowed(ctx.flags.server ?? ctx.env.HANGAR_URL ?? stored?.server ?? "http://10.199.100.24:26434", ctx.flags.insecure);
117
+ const server = assertServerUrlAllowed(ctx.flags.server ?? ctx.env.HANGAR_URL ?? stored?.server ?? "https://hangar.paykka.com", ctx.flags.insecure);
118
118
  if (stored?.token && !ctx.flags.force) try {
119
119
  const me = asStoredPrincipal(await apiGet({
120
120
  server,