@rbbtsn0w/adg 0.8.0-beta.3 → 0.8.0-beta.5
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/dist/src/commands/multiselect-skills.js +3 -2
- package/dist/vendor/skills/src/add.js +92 -15
- package/dist/vendor/skills/src/agents.js +60 -0
- package/dist/vendor/skills/src/archive.js +311 -0
- package/dist/vendor/skills/src/blob.js +58 -22
- package/dist/vendor/skills/src/cli.js +21 -1
- package/dist/vendor/skills/src/constants.js +2 -0
- package/dist/vendor/skills/src/detect-agent.js +24 -1
- package/dist/vendor/skills/src/download-source.js +221 -0
- package/dist/vendor/skills/src/find.js +6 -5
- package/dist/vendor/skills/src/git.js +39 -13
- package/dist/vendor/skills/src/github-host.js +34 -0
- package/dist/vendor/skills/src/install.js +6 -1
- package/dist/vendor/skills/src/installer.js +8 -4
- package/dist/vendor/skills/src/list.js +28 -12
- package/dist/vendor/skills/src/local-lock.js +29 -4
- package/dist/vendor/skills/src/prompts/search-multiselect.js +274 -62
- package/dist/vendor/skills/src/providers/index.js +1 -1
- package/dist/vendor/skills/src/providers/wellknown.js +88 -90
- package/dist/vendor/skills/src/remove.js +98 -11
- package/dist/vendor/skills/src/skills.js +23 -19
- package/dist/vendor/skills/src/source-parser.js +73 -10
- package/dist/vendor/skills/src/sync.js +3 -3
- package/dist/vendor/skills/src/test-utils.js +74 -5
- package/dist/vendor/skills/src/update-source.js +56 -8
- package/dist/vendor/skills/src/update.js +355 -155
- package/dist/vendor/skills/src/use.js +41 -4
- package/package.json +14 -4
- package/vendor/skills/PROVENANCE.md +18 -4
|
@@ -13,7 +13,8 @@ import { sanitizeName } from "./installer.js";
|
|
|
13
13
|
import { getGitHubToken } from "./skill-lock.js";
|
|
14
14
|
import { discoverSkills, filterSkills, getSkillDisplayName } from "./skills.js";
|
|
15
15
|
import { getOwnerRepo, parseSource } from "./source-parser.js";
|
|
16
|
-
import {
|
|
16
|
+
import { downloadSource } from "./download-source.js";
|
|
17
|
+
import { wellKnownProvider, WellKnownScopeNotFoundError, } from "./providers/wellknown.js";
|
|
17
18
|
export function agentCloseResult(code, signal) {
|
|
18
19
|
return {
|
|
19
20
|
status: code ?? (signal ? null : 1),
|
|
@@ -147,6 +148,8 @@ export async function runUse(sourceArgs, options = {}, parseErrors = []) {
|
|
|
147
148
|
const parsed = parseSource(source);
|
|
148
149
|
const ownerRepoRaw = getOwnerRepo(parsed);
|
|
149
150
|
const sourceOwner = ownerRepoRaw?.split('/')[0]?.toLowerCase();
|
|
151
|
+
// ADG safety gate: `use` executes unverified instructions through an agent
|
|
152
|
+
// with full permissions, so OpenClaw sources require explicit opt-in.
|
|
150
153
|
if (sourceOwner === 'openclaw' && !options.dangerouslyAcceptOpenclawRisks) {
|
|
151
154
|
fail([
|
|
152
155
|
'OpenClaw skills are unverified community submissions.',
|
|
@@ -158,13 +161,47 @@ export async function runUse(sourceArgs, options = {}, parseErrors = []) {
|
|
|
158
161
|
const includeInternal = selector !== undefined;
|
|
159
162
|
let selectedSkill;
|
|
160
163
|
if (parsed.type === 'well-known') {
|
|
161
|
-
const skills = await wellKnownProvider
|
|
162
|
-
|
|
164
|
+
const skills = await wellKnownProvider
|
|
165
|
+
.fetchAllSkills(parsed.url, {
|
|
166
|
+
includeInternal,
|
|
167
|
+
})
|
|
168
|
+
.catch((error) => {
|
|
169
|
+
if (error instanceof WellKnownScopeNotFoundError)
|
|
170
|
+
fail(error.message);
|
|
171
|
+
return [];
|
|
172
|
+
});
|
|
173
|
+
if (skills.length > 0) {
|
|
174
|
+
selectedSkill = selectWellKnownSkill(skills, selector, source);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
const downloaded = await downloadSource(parsed.url);
|
|
178
|
+
cloneTempDir = downloaded.tempDir;
|
|
179
|
+
const downloadedSkills = await discoverSkills(downloaded.rootDir, undefined, {
|
|
180
|
+
includeInternal,
|
|
181
|
+
fullDepth: options.fullDepth,
|
|
182
|
+
});
|
|
183
|
+
const selected = selectSkill(downloadedSkills, selector, source);
|
|
184
|
+
selectedSkill = {
|
|
185
|
+
kind: 'disk',
|
|
186
|
+
name: selected.name,
|
|
187
|
+
directoryName: selected.name,
|
|
188
|
+
rawContent: selected.rawContent,
|
|
189
|
+
path: selected.path,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
163
192
|
}
|
|
164
193
|
else {
|
|
165
194
|
let skills;
|
|
166
195
|
let blobResult = null;
|
|
167
|
-
if (parsed.type === '
|
|
196
|
+
if (parsed.type === 'download') {
|
|
197
|
+
const downloaded = await downloadSource(parsed.url);
|
|
198
|
+
cloneTempDir = downloaded.tempDir;
|
|
199
|
+
skills = await discoverSkills(downloaded.rootDir, undefined, {
|
|
200
|
+
includeInternal,
|
|
201
|
+
fullDepth: options.fullDepth,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
else if (parsed.type === 'local') {
|
|
168
205
|
if (!existsSync(parsed.localPath)) {
|
|
169
206
|
fail(`Local path does not exist: ${parsed.localPath}`);
|
|
170
207
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbbtsn0w/adg",
|
|
3
|
-
"version": "0.8.0-beta.
|
|
3
|
+
"version": "0.8.0-beta.5",
|
|
4
4
|
"description": "Agent Directory Group (ADG) toolkit — two domains: plugins and skills.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
],
|
|
47
47
|
"comment:dependencies": "Runtime deps below are required only by the vendored skills CLI (vendor/skills); ADG's own plugins code has zero runtime deps. Root is the single source of truth: each range MUST be >= the floor declared in vendor/skills/package.json, since that is the version the vendored source was authored against. `npm run check:vendor-deps` enforces this and fails on drift.",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@clack/prompts": "^
|
|
49
|
+
"@clack/prompts": "^1.2.0",
|
|
50
50
|
"@opentelemetry/api": "^1.9.0",
|
|
51
51
|
"@opentelemetry/exporter-trace-otlp-http": "^0.219.0",
|
|
52
52
|
"@opentelemetry/resources": "^2.8.0",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"@vercel/detect-agent": "^1.2.3",
|
|
57
57
|
"picocolors": "^1.1.1",
|
|
58
58
|
"simple-git": "^3.36.0",
|
|
59
|
+
"tar": "^7.5.20",
|
|
59
60
|
"xdg-basedir": "^5.1.0",
|
|
60
61
|
"yaml": "^2.8.3"
|
|
61
62
|
},
|
|
@@ -71,8 +72,17 @@
|
|
|
71
72
|
"semantic-release": "^25.0.5",
|
|
72
73
|
"typescript": "^5.6.0"
|
|
73
74
|
},
|
|
74
|
-
"comment:overrides": "Security
|
|
75
|
+
"comment:overrides": "Security floors for transitive development tooling: keep npm on a patched 11.x release, and pin vulnerable transitive undici/js-yaml branches to their patched versions.",
|
|
75
76
|
"overrides": {
|
|
76
|
-
"npm": "^11.
|
|
77
|
+
"npm": "^11.19.1",
|
|
78
|
+
"@actions/http-client": {
|
|
79
|
+
"undici": "^6.28.0"
|
|
80
|
+
},
|
|
81
|
+
"@semantic-release/github": {
|
|
82
|
+
"undici": "^7.29.0"
|
|
83
|
+
},
|
|
84
|
+
"cosmiconfig": {
|
|
85
|
+
"js-yaml": "^4.3.1"
|
|
86
|
+
}
|
|
77
87
|
}
|
|
78
88
|
}
|
|
@@ -6,13 +6,23 @@ wrapped by `adg skills`.
|
|
|
6
6
|
| Field | Value |
|
|
7
7
|
|-------|-------|
|
|
8
8
|
| Upstream repo | https://github.com/vercel-labs/skills |
|
|
9
|
-
| npm package | `skills` (v1.5.
|
|
10
|
-
| Vendored commit | `
|
|
11
|
-
| Vendored on | 2026-
|
|
9
|
+
| npm package | `skills` (v1.5.23) |
|
|
10
|
+
| Vendored commit | `c1755dd49618b02a4181495ee7404eec3d744c81` (tag `v1.5.23`) |
|
|
11
|
+
| Vendored on | 2026-09-03 |
|
|
12
12
|
| Previous vendoring | `be0dd25` (v1.5.11), 2026-06-11 |
|
|
13
13
|
| What was copied | `src/` (excluding `*.test.ts`) and `ThirdPartyNoticeText.txt` |
|
|
14
14
|
|
|
15
|
-
## Re-sync notes (v1.5.
|
|
15
|
+
## Re-sync notes (v1.5.14 → v1.5.23, 2026-09-03)
|
|
16
|
+
|
|
17
|
+
3-way merge (base `2adcfe5`, ours = prior vendoring + ADG patches, theirs `c1755dd`).
|
|
18
|
+
The first pass accidentally retained old implementations in several overlapping
|
|
19
|
+
files. This re-sync restores the upstream archive/direct-download flow, well-known
|
|
20
|
+
digest/update flow, expanded discovery depth and agents, GitHub Enterprise auth
|
|
21
|
+
paths, Git transport hardening, and lock/update metadata. ADG-owned security and
|
|
22
|
+
runtime patches were then re-applied manually. The upstream package floors now
|
|
23
|
+
require `@clack/prompts` 1.2.0, `simple-git` 3.36.0, and `tar` 7.5.20.
|
|
24
|
+
|
|
25
|
+
The previous merge notes are retained below as the patch history.
|
|
16
26
|
|
|
17
27
|
3-way merge (base `be0dd25`, ours = prior vendoring + ADG patches, theirs `2adcfe5`).
|
|
18
28
|
Upstream dependencies were unchanged. Resolution map:
|
|
@@ -82,6 +92,10 @@ re-vendoring. Each is marked inline with an `ADG patch:` comment.
|
|
|
82
92
|
| `src/update.ts` → both `spawnSync` self-CLI re-invokes (+ new `src/self-cli.ts`) | Forward `process.execArgv`, call `skills add` instead of `add`, and wrap in OpenTelemetry CLIENT spans | The child process runs `adg skills add` inside the spawned Node context, ensuring type-stripping flags inherit properly, and OTel spans capture subprocess execution metadata. |
|
|
83
93
|
| `package.json` → `@vercel/detect-agent` dependency (not a vendored-source change) | `^0.1.0` → `^1.2.3` | `src/detect-agent.ts` (upstream, unpatched) imports `AgentResult` and expects `determineAgent(): Promise<AgentResult>` (object API). The stale `0.1.0` pin only exported `determineAgent(): Promise<string \| false>` and no `AgentResult`, which broke typecheck and left `cachedResult.isAgent` always `undefined` at runtime — agent auto-detection (non-interactive mode in `add`/`sync`/`remove`/`find`/`cli`) silently never fired. The `1.x` line restores the API the fork targets, so `detect-agent.ts` needs **no** local patch. Keep this dependency on `1.x` across re-vendoring. |
|
|
84
94
|
| `src/git-tree.ts` (**new ADG file**) + `src/add.ts` clone-fallback branch | github source that falls back to a `git clone` now records the git **tree SHA** (`git rev-parse HEAD:<folder>`), not a sha256 content hash | Install and update must use ONE hash scheme per source. Update-check always uses the git tree SHA; the old clone fallback stored a sha256 content hash, so those skills were re-flagged on **every** update (a collection repo appeared to "fully update" each run). `git-tree.ts` is standalone (uses `child_process`, no simple-git) so it typechecks under ADG's strict tsconfig when a test imports it. |
|
|
95
|
+
| `src/add.ts` → direct-download and well-known fallback | Route `download` sources through `downloadSource()` and fall back from empty well-known discovery to raw `SKILL.md`/archive download | `source-parser.ts` already classified these URLs, but the installer previously fell through to `cloneRepo()`, making the new source type unusable. |
|
|
96
|
+
| `src/add.ts`, `src/skill-lock.ts`, `src/local-lock.ts`, `src/update.ts` → well-known metadata | Persist the canonical base URL and content digest, then use them for global/project update checks | Without the digest metadata, well-known skills could install but could not participate in the upstream update lifecycle. |
|
|
97
|
+
| `src/skills.ts` → discovery depth and agent containers | Restore upstream three-level known-container discovery and current agent directories while retaining ADG path/lock filtering | Prevents nested catalog skills and newly supported agent locations from disappearing during synchronization. |
|
|
98
|
+
| `src/cli.ts`, `src/add.ts` → help and argument errors | Restore side-effect-free subcommand help and explicit option parse errors; retain ADG-specific OpenClaw help/security behavior | Keeps CLI behavior predictable without reintroducing upstream's removed OpenClaw execution warning policy. |
|
|
85
99
|
| `src/git-tree.ts` → `gitTreeShaForFolder` | Route the ADG-added `git rev-parse` subprocess through the root OTel CLIENT-span runner | Keeps the local fallback compliant with ADG's CLI semantic-convention policy without duplicating instrumentation inside the vendored fork. |
|
|
86
100
|
| `src/skill-lock.ts`, `src/update.ts`, `src/use.ts` | Route GitHub auth, self-update, and interactive agent subprocesses through the root OTel CLIENT-span runner | Enforces required exit/error attributes and privacy-safe command arguments consistently across the vendored CLI. |
|
|
87
101
|
| `src/skill-lock.ts` → `getGitHubToken` auth warning | Prefix the one-shot stderr warning with `\r\x1b[K` on a TTY | The warning lands on the same physical terminal line as `update.ts`'s transient stdout status line, which carries no trailing newline — without rewinding, the two are rendered concatenated. |
|