happyskills 1.1.0 → 1.2.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/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/src/commands/access.js +41 -1
- package/src/commands/agents.js +30 -1
- package/src/commands/bump.js +33 -1
- package/src/commands/changelog.js +37 -1
- package/src/commands/check.js +30 -1
- package/src/commands/config.js +34 -1
- package/src/commands/convert.js +38 -1
- package/src/commands/delete.js +33 -1
- package/src/commands/diff.js +33 -1
- package/src/commands/disable.js +31 -1
- package/src/commands/enable.js +31 -1
- package/src/commands/feedback.js +41 -1
- package/src/commands/fork.js +35 -1
- package/src/commands/groups.js +40 -1
- package/src/commands/init.js +35 -1
- package/src/commands/install.js +35 -1
- package/src/commands/list.js +29 -1
- package/src/commands/login.js +34 -1
- package/src/commands/logout.js +20 -1
- package/src/commands/people.js +37 -1
- package/src/commands/postlex.js +38 -0
- package/src/commands/publish.js +40 -1
- package/src/commands/pull.js +47 -1
- package/src/commands/reconcile.js +36 -1
- package/src/commands/release.js +51 -1
- package/src/commands/schema.js +5 -0
- package/src/commands/search.js +46 -1
- package/src/commands/self-update.js +27 -1
- package/src/commands/setup.js +32 -1
- package/src/commands/snapshot.js +38 -1
- package/src/commands/status.js +26 -1
- package/src/commands/uninstall.js +30 -1
- package/src/commands/update.js +40 -1
- package/src/commands/validate.js +37 -1
- package/src/commands/versions.js +34 -1
- package/src/commands/visibility.js +33 -1
- package/src/commands/whoami.js +30 -1
- package/src/constants/error_codes.js +12 -1
- package/src/constants/next_step_actions.js +8 -0
- package/src/constants/next_step_by_error_code.js +5 -0
- package/src/integration/schema.test.js +31 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.0] - 2026-06-02
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Complete the per-command surface of `happyskills schema`** (spec 260602-01). All 36 commands that previously returned a stub now export a curated `schema` — real `purpose`, `input` contract (positionals + flags actually read by the command), `output.data_shape`, and `errors[]` paired with the `next_step` each code produces. `happyskills schema --json` is now a true machine-readable manual of every command, not just a name listing.
|
|
15
|
+
- **New `examples` field on the per-command schema shape** — 1–2 concrete, copy-pasteable invocation strings per command (the agent-native substitute for prose use-cases). Added to `default_schema` so any future command is valid by default.
|
|
16
|
+
- **Anti-stub guard test** in `cli/src/integration/schema.test.js` — fails the build if any command returns the stub purpose, ships an empty `examples` array, or drops the `input.positional` / `input.flags` arrays. Operationalizes the "a command is not done until it has a `happyskills schema` entry" rule.
|
|
17
|
+
- **Reconcile the closed envelope enums with what the CLI actually emits.** A full sweep of the CLI surfaced nine envelope labels that commands emit but were never added to the closed enums — so an agent hitting those failures received a label it could not look up. Added them to both the `cli/` and `api/` mirrors (additive, non-breaking): error codes `AUTH_FAILED` (login flow), and `COMPARE_FAILED` / `CLONE_BASE_FAILED` / `CLONE_REMOTE_FAILED` / `READ_LOCAL_FAILED` / `SWAP_FAILED` (the `pull --rebase` pipeline); next_step actions `retry_or_abandon` (recovery, `pull --rebase`), `resolve_unknown_drift` (decision, `reconcile`), and `review_publish_error` (recovery, `release`). Central default wired for `AUTH_FAILED` → `recovery/login`; `ACTION_KIND` mappings added for the new actions.
|
|
18
|
+
|
|
10
19
|
## [1.1.0] - 2026-06-02
|
|
11
20
|
|
|
12
21
|
### Added
|
package/package.json
CHANGED
package/src/commands/access.js
CHANGED
|
@@ -209,4 +209,44 @@ const run = (args) => catch_errors('Access command failed', async () => {
|
|
|
209
209
|
throw new UsageError(`Unknown subcommand: ${sub}. Run happyskills access --help`)
|
|
210
210
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
const schema = {
|
|
213
|
+
name: 'access',
|
|
214
|
+
audience: 'account',
|
|
215
|
+
purpose: 'Manage group-level skill access: list grants, grant, revoke, or change permission on a skill for a group.',
|
|
216
|
+
mutation: true,
|
|
217
|
+
interactive_in_text_mode: false,
|
|
218
|
+
input: {
|
|
219
|
+
positional: [
|
|
220
|
+
{ name: 'subcommand', required: true, type: 'string', enum: ['list', 'grant', 'revoke', 'set'] }
|
|
221
|
+
],
|
|
222
|
+
flags: [
|
|
223
|
+
{ name: 'workspace', alias: 'w', type: 'string' },
|
|
224
|
+
{ name: 'group', type: 'string' },
|
|
225
|
+
{ name: 'skill', type: 'string' },
|
|
226
|
+
{ name: 'permission', type: 'string' },
|
|
227
|
+
{ name: 'confirm', type: 'boolean' },
|
|
228
|
+
{ name: 'dep-permission', type: 'string' },
|
|
229
|
+
{ name: 'keep-deps', type: 'boolean' },
|
|
230
|
+
{ name: 'json', type: 'boolean' }
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
output: {
|
|
234
|
+
data_shape: {
|
|
235
|
+
results: 'array<{ skill: string, group_name: string, permission: string, is_direct: boolean }>'
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
errors: [
|
|
239
|
+
{ code: 'AUTH_REQUIRED', next_step: { kind: 'recovery', action: 'login' } },
|
|
240
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } },
|
|
241
|
+
{ code: 'NOT_FOUND' },
|
|
242
|
+
{ code: 'FORBIDDEN' },
|
|
243
|
+
{ code: 'DEPENDENCY_CASCADE_REQUIRED', next_step: { kind: 'confirmation', action: 'confirm_cascade' } },
|
|
244
|
+
{ code: 'NETWORK_ERROR', next_step: { kind: 'recovery', action: 'retry' } }
|
|
245
|
+
],
|
|
246
|
+
examples: [
|
|
247
|
+
'happyskills access list -w acme --group engineering',
|
|
248
|
+
'happyskills access grant --skill acme/deploy-aws --group engineering --permission read'
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
module.exports = { run, schema }
|
package/src/commands/agents.js
CHANGED
|
@@ -343,4 +343,33 @@ const run = (args) => catch_errors('Agents command failed', async () => {
|
|
|
343
343
|
throw new UsageError(`Unknown subcommand: '${sub}'. Use add, remove, or list.`)
|
|
344
344
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
345
345
|
|
|
346
|
-
|
|
346
|
+
const schema = {
|
|
347
|
+
name: 'agents',
|
|
348
|
+
audience: 'account',
|
|
349
|
+
purpose: 'Configure which agentic clients (Claude Code, Cursor, Codex, etc.) receive the skills installed in this project.',
|
|
350
|
+
mutation: true,
|
|
351
|
+
interactive_in_text_mode: false,
|
|
352
|
+
input: {
|
|
353
|
+
positional: [
|
|
354
|
+
{ name: 'subcommand', required: true, type: 'string', enum: ['list', 'add', 'remove'] }
|
|
355
|
+
],
|
|
356
|
+
flags: [
|
|
357
|
+
{ name: 'global', alias: 'g', type: 'boolean' },
|
|
358
|
+
{ name: 'json', type: 'boolean' }
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
output: {
|
|
362
|
+
data_shape: {
|
|
363
|
+
agents: 'array<{ id: string, display_name: string, skills_dir: string, configured: boolean, linked_skills: number }>'
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
errors: [
|
|
367
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } }
|
|
368
|
+
],
|
|
369
|
+
examples: [
|
|
370
|
+
'happyskills agents list',
|
|
371
|
+
'happyskills agents add codex'
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
module.exports = { run, schema }
|
package/src/commands/bump.js
CHANGED
|
@@ -108,4 +108,36 @@ const run = (args) => catch_errors('Bump failed', async () => {
|
|
|
108
108
|
print_success(`${skill_name}: ${old_version} → ${manifest.version}`)
|
|
109
109
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
const schema = {
|
|
112
|
+
name: 'bump',
|
|
113
|
+
audience: 'consumer',
|
|
114
|
+
purpose: 'Bump the version in a skill\'s skill.json (patch, minor, major, or explicit semver) without touching the lock file.',
|
|
115
|
+
mutation: true,
|
|
116
|
+
interactive_in_text_mode: false,
|
|
117
|
+
input: {
|
|
118
|
+
positional: [
|
|
119
|
+
{ name: 'type', required: true, type: 'string', pattern: 'patch|minor|major|<semver>' },
|
|
120
|
+
{ name: 'skill-name', required: true, type: 'string' }
|
|
121
|
+
],
|
|
122
|
+
flags: [
|
|
123
|
+
{ name: 'json', type: 'boolean', default: false }
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
output: {
|
|
127
|
+
data_shape: {
|
|
128
|
+
skill: 'string',
|
|
129
|
+
old_version: 'string',
|
|
130
|
+
new_version: 'string',
|
|
131
|
+
bump_type: 'string'
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
errors: [
|
|
135
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } }
|
|
136
|
+
],
|
|
137
|
+
examples: [
|
|
138
|
+
'happyskills bump patch my-skill',
|
|
139
|
+
'happyskills bump 2.0.0 my-skill'
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
module.exports = { run, schema }
|
|
@@ -122,4 +122,40 @@ const run = (args) => catch_errors('Changelog failed', async () => {
|
|
|
122
122
|
if (!content.endsWith('\n')) process.stdout.write('\n')
|
|
123
123
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
const schema = {
|
|
126
|
+
name: 'changelog',
|
|
127
|
+
audience: 'consumer',
|
|
128
|
+
purpose: 'Print a skill\'s CHANGELOG.md at the latest (or specified) version, or synthesize one from registry release messages if none exists.',
|
|
129
|
+
mutation: false,
|
|
130
|
+
interactive_in_text_mode: false,
|
|
131
|
+
input: {
|
|
132
|
+
positional: [
|
|
133
|
+
{ name: 'skill', required: true, type: 'string', pattern: '<owner>/<name>' },
|
|
134
|
+
],
|
|
135
|
+
flags: [
|
|
136
|
+
{ name: 'version', type: 'string', default: null },
|
|
137
|
+
{ name: 'json', type: 'boolean', default: false },
|
|
138
|
+
],
|
|
139
|
+
},
|
|
140
|
+
output: {
|
|
141
|
+
data_shape: {
|
|
142
|
+
skill: 'string',
|
|
143
|
+
version: 'string',
|
|
144
|
+
ref: 'string',
|
|
145
|
+
commit: 'string',
|
|
146
|
+
synthesized: 'boolean',
|
|
147
|
+
content: 'string',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
errors: [
|
|
151
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } },
|
|
152
|
+
{ code: 'NOT_FOUND' },
|
|
153
|
+
{ code: 'NETWORK_ERROR', next_step: { kind: 'recovery', action: 'retry' } },
|
|
154
|
+
],
|
|
155
|
+
examples: [
|
|
156
|
+
'happyskills changelog acme/deploy-aws',
|
|
157
|
+
'happyskills changelog acme/deploy-aws --version 1.2.0 --json',
|
|
158
|
+
],
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
module.exports = { run, find_changelog_entry, synthesize_from_refs, normalize_ref, schema }
|
package/src/commands/check.js
CHANGED
|
@@ -206,4 +206,33 @@ const run = (args) => catch_errors('Check failed', async () => {
|
|
|
206
206
|
}
|
|
207
207
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
const schema = {
|
|
210
|
+
name: 'check',
|
|
211
|
+
audience: 'consumer',
|
|
212
|
+
purpose: 'Check installed skills for available updates and report drift, ahead, and conflict states.',
|
|
213
|
+
mutation: false,
|
|
214
|
+
interactive_in_text_mode: false,
|
|
215
|
+
input: {
|
|
216
|
+
positional: [{ name: 'skill', required: false, type: 'string', pattern: '<owner>/<name>' }],
|
|
217
|
+
flags: [
|
|
218
|
+
{ name: 'json', type: 'boolean', default: false }
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
output: {
|
|
222
|
+
data_shape: {
|
|
223
|
+
results: 'array<{ skill: string, installed: string, latest: string, status: string, via: string|null, drift: object|null, ahead: object|null }>',
|
|
224
|
+
outdated_count: 'number',
|
|
225
|
+
up_to_date_count: 'number',
|
|
226
|
+
conflicts_count: 'number',
|
|
227
|
+
drift_count: 'number',
|
|
228
|
+
ahead_count: 'number'
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
errors: [],
|
|
232
|
+
examples: [
|
|
233
|
+
'happyskills check',
|
|
234
|
+
'happyskills check acme/deploy-aws'
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
module.exports = { run, schema }
|
package/src/commands/config.js
CHANGED
|
@@ -209,4 +209,37 @@ const run = (args) => catch_errors('Config failed', async () => {
|
|
|
209
209
|
}
|
|
210
210
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
const schema = {
|
|
213
|
+
name: 'config',
|
|
214
|
+
audience: 'account',
|
|
215
|
+
purpose: 'View or modify the global CLI configuration; the agents sub-key controls which AI agents receive installed skills.',
|
|
216
|
+
mutation: true,
|
|
217
|
+
interactive_in_text_mode: false,
|
|
218
|
+
input: {
|
|
219
|
+
positional: [
|
|
220
|
+
{ name: 'key', required: false, type: 'string', enum: ['agents'] },
|
|
221
|
+
{ name: 'value', required: false, type: 'string' }
|
|
222
|
+
],
|
|
223
|
+
flags: [
|
|
224
|
+
{ name: 'list', type: 'boolean', default: false },
|
|
225
|
+
{ name: 'reset', type: 'boolean', default: false },
|
|
226
|
+
{ name: 'json', type: 'boolean', default: false }
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
output: {
|
|
230
|
+
data_shape: {
|
|
231
|
+
key: 'string',
|
|
232
|
+
value: 'string | null',
|
|
233
|
+
status: 'string'
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
errors: [
|
|
237
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } }
|
|
238
|
+
],
|
|
239
|
+
examples: [
|
|
240
|
+
'happyskills config agents claude,cursor',
|
|
241
|
+
'happyskills config agents --list'
|
|
242
|
+
]
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
module.exports = { run, schema }
|
package/src/commands/convert.js
CHANGED
|
@@ -249,4 +249,41 @@ const run = (args) => catch_errors('Convert failed', async () => {
|
|
|
249
249
|
print_info(`Next step: enrich metadata, then run \`happyskills publish ${skill_name}\` to publish.`)
|
|
250
250
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
251
251
|
|
|
252
|
-
|
|
252
|
+
const schema = {
|
|
253
|
+
name: 'convert',
|
|
254
|
+
audience: 'author',
|
|
255
|
+
purpose: 'Convert an external Claude Code skill into a managed HappySkills package by writing skill.json and updating the lock file.',
|
|
256
|
+
mutation: true,
|
|
257
|
+
interactive_in_text_mode: true,
|
|
258
|
+
input: {
|
|
259
|
+
positional: [ { name: 'skill', required: true, type: 'string', description: 'Name of the skill in .claude/skills/' } ],
|
|
260
|
+
flags: [
|
|
261
|
+
{ name: 'global', alias: 'g', type: 'boolean', default: false, description: 'Look in global skills (~/.agents/skills/)' },
|
|
262
|
+
{ name: 'workspace', type: 'string', default: undefined, description: 'Target workspace slug' },
|
|
263
|
+
{ name: 'version', type: 'string', default: '1.0.0', description: 'Initial version' },
|
|
264
|
+
{ name: 'keywords', type: 'string', default: undefined, description: 'Comma-separated keywords' },
|
|
265
|
+
{ name: 'agents', type: 'string', default: undefined, description: 'Target specific agents (comma-separated); default: auto-detect' },
|
|
266
|
+
{ name: 'yes', alias: 'y', type: 'boolean', default: false, description: 'Skip confirmation prompt' },
|
|
267
|
+
{ name: 'json', type: 'boolean', default: false, description: 'Output as JSON' },
|
|
268
|
+
],
|
|
269
|
+
},
|
|
270
|
+
output: {
|
|
271
|
+
data_shape: {
|
|
272
|
+
skill: 'string',
|
|
273
|
+
version: 'string',
|
|
274
|
+
workspace: 'string',
|
|
275
|
+
description: 'string',
|
|
276
|
+
linked_agents: 'string[] | undefined',
|
|
277
|
+
warnings: 'string[] | undefined',
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
errors: [
|
|
281
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } },
|
|
282
|
+
],
|
|
283
|
+
examples: [
|
|
284
|
+
'happyskills convert pulumi-aws-docs --workspace happyskillsai',
|
|
285
|
+
'happyskills convert pulumi-aws-docs --version 2.0.0 -y',
|
|
286
|
+
],
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
module.exports = { run, schema }
|
package/src/commands/delete.js
CHANGED
|
@@ -89,4 +89,36 @@ const run = (args) => catch_errors('Delete failed', async () => {
|
|
|
89
89
|
print_success(`Deleted "${skill}" from the registry.`)
|
|
90
90
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
const schema = {
|
|
93
|
+
name: 'delete',
|
|
94
|
+
audience: 'author',
|
|
95
|
+
purpose: 'Permanently delete a skill from the registry (soft-delete on server; irreversible from CLI perspective).',
|
|
96
|
+
mutation: true,
|
|
97
|
+
interactive_in_text_mode: true,
|
|
98
|
+
input: {
|
|
99
|
+
positional: [
|
|
100
|
+
{ name: 'skill', required: true, type: 'string', pattern: '<owner>/<name>' },
|
|
101
|
+
],
|
|
102
|
+
flags: [
|
|
103
|
+
{ name: 'yes', short: 'y', type: 'boolean', default: false },
|
|
104
|
+
{ name: 'json', type: 'boolean', default: false },
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
output: {
|
|
108
|
+
data_shape: {
|
|
109
|
+
deleted: 'boolean',
|
|
110
|
+
skill: 'string',
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
errors: [
|
|
114
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } },
|
|
115
|
+
{ code: 'AUTH_REQUIRED', next_step: { kind: 'recovery', action: 'login' } },
|
|
116
|
+
{ code: 'CONFIRMATION_REQUIRED', next_step: { kind: 'confirmation', action: 'confirm_destructive' } },
|
|
117
|
+
],
|
|
118
|
+
examples: [
|
|
119
|
+
'happyskills delete acme/deploy-aws',
|
|
120
|
+
'happyskills delete acme/deploy-aws --json -y',
|
|
121
|
+
],
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
module.exports = { run, schema }
|
package/src/commands/diff.js
CHANGED
|
@@ -349,4 +349,36 @@ const run = (args) => catch_errors('Diff failed', async () => {
|
|
|
349
349
|
|
|
350
350
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
351
351
|
|
|
352
|
-
|
|
352
|
+
const schema = {
|
|
353
|
+
name: 'diff',
|
|
354
|
+
audience: 'consumer',
|
|
355
|
+
purpose: 'Show file-level differences for an installed skill with unified diffs (local vs base, base vs remote, or three-way).',
|
|
356
|
+
mutation: false,
|
|
357
|
+
interactive_in_text_mode: false,
|
|
358
|
+
input: {
|
|
359
|
+
positional: [{ name: 'skill', required: true, type: 'string', pattern: '<owner>/<name>' }],
|
|
360
|
+
flags: [
|
|
361
|
+
{ name: 'remote', type: 'boolean', default: false },
|
|
362
|
+
{ name: 'full', type: 'boolean', default: false },
|
|
363
|
+
{ name: 'no-content', type: 'boolean', default: false },
|
|
364
|
+
{ name: 'global', type: 'boolean', default: false },
|
|
365
|
+
{ name: 'json', type: 'boolean', default: false }
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
output: {
|
|
369
|
+
data_shape: {
|
|
370
|
+
mode: 'string',
|
|
371
|
+
report: 'object',
|
|
372
|
+
drift: 'object|null'
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
errors: [
|
|
376
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } }
|
|
377
|
+
],
|
|
378
|
+
examples: [
|
|
379
|
+
'happyskills diff acme/deploy-aws',
|
|
380
|
+
'happyskills diff acme/deploy-aws --full'
|
|
381
|
+
]
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
module.exports = { run, schema }
|
package/src/commands/disable.js
CHANGED
|
@@ -102,4 +102,34 @@ const run = (args) => catch_errors('Disable failed', async () => {
|
|
|
102
102
|
}
|
|
103
103
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
const schema = {
|
|
106
|
+
name: 'disable',
|
|
107
|
+
audience: 'consumer',
|
|
108
|
+
purpose: 'Remove agent symlinks for one or more skills without deleting skill files; skills can be re-enabled at any time.',
|
|
109
|
+
mutation: true,
|
|
110
|
+
interactive_in_text_mode: false,
|
|
111
|
+
input: {
|
|
112
|
+
positional: [
|
|
113
|
+
{ name: 'skill', required: true, type: 'string' }
|
|
114
|
+
],
|
|
115
|
+
flags: [
|
|
116
|
+
{ name: 'global', alias: 'g', type: 'boolean' },
|
|
117
|
+
{ name: 'agents', type: 'string' },
|
|
118
|
+
{ name: 'json', type: 'boolean' }
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
output: {
|
|
122
|
+
data_shape: {
|
|
123
|
+
results: 'array<{ skill: string, status: string }>'
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
errors: [
|
|
127
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } }
|
|
128
|
+
],
|
|
129
|
+
examples: [
|
|
130
|
+
'happyskills disable acme/deploy-aws',
|
|
131
|
+
'happyskills disable acme/deploy-aws acme/monitoring -g'
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
module.exports = { run, schema }
|
package/src/commands/enable.js
CHANGED
|
@@ -118,4 +118,34 @@ const run = (args) => catch_errors('Enable failed', async () => {
|
|
|
118
118
|
}
|
|
119
119
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
const schema = {
|
|
122
|
+
name: 'enable',
|
|
123
|
+
audience: 'consumer',
|
|
124
|
+
purpose: 'Restore agent symlinks for one or more previously disabled skills.',
|
|
125
|
+
mutation: true,
|
|
126
|
+
interactive_in_text_mode: false,
|
|
127
|
+
input: {
|
|
128
|
+
positional: [
|
|
129
|
+
{ name: 'skill', required: true, type: 'string' }
|
|
130
|
+
],
|
|
131
|
+
flags: [
|
|
132
|
+
{ name: 'global', alias: 'g', type: 'boolean' },
|
|
133
|
+
{ name: 'agents', type: 'string' },
|
|
134
|
+
{ name: 'json', type: 'boolean' }
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
output: {
|
|
138
|
+
data_shape: {
|
|
139
|
+
results: 'array<{ skill: string, status: string }>'
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
errors: [
|
|
143
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } }
|
|
144
|
+
],
|
|
145
|
+
examples: [
|
|
146
|
+
'happyskills enable acme/deploy-aws',
|
|
147
|
+
'happyskills enable acme/deploy-aws acme/monitoring -g'
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
module.exports = { run, schema }
|
package/src/commands/feedback.js
CHANGED
|
@@ -257,4 +257,44 @@ const run = (args) => catch_errors('Feedback command failed', async () => {
|
|
|
257
257
|
}
|
|
258
258
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
259
259
|
|
|
260
|
-
|
|
260
|
+
const schema = {
|
|
261
|
+
name: 'feedback',
|
|
262
|
+
audience: 'account',
|
|
263
|
+
purpose: 'Lodge feedback (bug, wish, compliment, question, or other) with HappySkills; opens $EDITOR when body is omitted.',
|
|
264
|
+
mutation: true,
|
|
265
|
+
interactive_in_text_mode: true,
|
|
266
|
+
input: {
|
|
267
|
+
positional: [
|
|
268
|
+
{ name: 'category', required: true, type: 'string', enum: ['bug', 'wish', 'compliment', 'question', 'other'] },
|
|
269
|
+
{ name: 'body', required: false, type: 'string' }
|
|
270
|
+
],
|
|
271
|
+
flags: [
|
|
272
|
+
{ name: 'subject', type: 'string', default: null },
|
|
273
|
+
{ name: 'attach', type: 'string', default: null },
|
|
274
|
+
{ name: 'json', type: 'boolean', default: false }
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
output: {
|
|
278
|
+
data_shape: {
|
|
279
|
+
feedback: 'object',
|
|
280
|
+
attachments: 'array'
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
errors: [
|
|
284
|
+
{ code: 'AUTH_REQUIRED', next_step: { kind: 'recovery', action: 'login' } },
|
|
285
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } },
|
|
286
|
+
{ code: 'NETWORK_ERROR', next_step: { kind: 'recovery', action: 'retry' } },
|
|
287
|
+
{ code: 'ATTACHMENT_TOO_LARGE' },
|
|
288
|
+
{ code: 'SUBJECT_TOO_LONG' },
|
|
289
|
+
{ code: 'BODY_TOO_LONG' },
|
|
290
|
+
{ code: 'BODY_REQUIRED' },
|
|
291
|
+
{ code: 'INVALID_CATEGORY' },
|
|
292
|
+
{ code: 'ATTACHMENT_LIMIT_REACHED' }
|
|
293
|
+
],
|
|
294
|
+
examples: [
|
|
295
|
+
'happyskills feedback bug "search returns nothing for partial slugs"',
|
|
296
|
+
'happyskills feedback wish "I wish I could export my catalog to JSON"'
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
module.exports = { run, schema }
|
package/src/commands/fork.js
CHANGED
|
@@ -117,4 +117,38 @@ const run = (args) => catch_errors('Fork failed', async () => {
|
|
|
117
117
|
print_hint(`Edit the skill, then run ${code(`happyskills publish --workspace ${workspace.slug}`)} when ready.`)
|
|
118
118
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
const schema = {
|
|
121
|
+
name: 'fork',
|
|
122
|
+
audience: 'author',
|
|
123
|
+
purpose: 'Fork a published skill to your own workspace: downloads the latest version and writes skill.json referencing the original.',
|
|
124
|
+
mutation: true,
|
|
125
|
+
interactive_in_text_mode: false,
|
|
126
|
+
input: {
|
|
127
|
+
positional: [ { name: 'skill', required: true, type: 'string', pattern: '<owner>/<name>' } ],
|
|
128
|
+
flags: [
|
|
129
|
+
{ name: 'workspace', type: 'string', default: undefined, description: 'Target workspace (if you have multiple)' },
|
|
130
|
+
{ name: 'json', type: 'boolean', default: false, description: 'Output as JSON' },
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
output: {
|
|
134
|
+
data_shape: {
|
|
135
|
+
skill: 'string',
|
|
136
|
+
forked_version: 'string',
|
|
137
|
+
new_version: 'string',
|
|
138
|
+
workspace: 'string',
|
|
139
|
+
directory: 'string',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
errors: [
|
|
143
|
+
{ code: 'AUTH_REQUIRED', next_step: { kind: 'recovery', action: 'login' } },
|
|
144
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } },
|
|
145
|
+
{ code: 'NETWORK_ERROR', next_step: { kind: 'recovery', action: 'retry' } },
|
|
146
|
+
{ code: 'NOT_FOUND' },
|
|
147
|
+
],
|
|
148
|
+
examples: [
|
|
149
|
+
'happyskills fork acme/deploy-aws',
|
|
150
|
+
'happyskills fork acme/deploy-aws --workspace myorg',
|
|
151
|
+
],
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
module.exports = { run, schema }
|
package/src/commands/groups.js
CHANGED
|
@@ -216,4 +216,43 @@ const run = (args) => catch_errors('Groups command failed', async () => {
|
|
|
216
216
|
throw new UsageError(`Unknown subcommand: ${sub}. Run happyskills groups --help`)
|
|
217
217
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
const schema = {
|
|
220
|
+
name: 'groups',
|
|
221
|
+
audience: 'account',
|
|
222
|
+
purpose: 'Manage workspace groups and group membership: list, create, delete, show, add/remove members, toggle default.',
|
|
223
|
+
mutation: true,
|
|
224
|
+
interactive_in_text_mode: true,
|
|
225
|
+
input: {
|
|
226
|
+
positional: [
|
|
227
|
+
{ name: 'subcommand', required: true, type: 'string', enum: ['list', 'create', 'delete', 'show', 'add', 'remove', 'default'] }
|
|
228
|
+
],
|
|
229
|
+
flags: [
|
|
230
|
+
{ name: 'workspace', alias: 'w', type: 'string' },
|
|
231
|
+
{ name: 'description', type: 'string' },
|
|
232
|
+
{ name: 'default', type: 'boolean' },
|
|
233
|
+
{ name: 'on', type: 'boolean' },
|
|
234
|
+
{ name: 'off', type: 'boolean' },
|
|
235
|
+
{ name: 'yes', alias: 'y', type: 'boolean' },
|
|
236
|
+
{ name: 'json', type: 'boolean' }
|
|
237
|
+
]
|
|
238
|
+
},
|
|
239
|
+
output: {
|
|
240
|
+
data_shape: {
|
|
241
|
+
results: 'array<{ name: string, description: string, member_count: number, is_default: boolean }>'
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
errors: [
|
|
245
|
+
{ code: 'AUTH_REQUIRED', next_step: { kind: 'recovery', action: 'login' } },
|
|
246
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } },
|
|
247
|
+
{ code: 'NOT_FOUND' },
|
|
248
|
+
{ code: 'ALREADY_EXISTS' },
|
|
249
|
+
{ code: 'FORBIDDEN' },
|
|
250
|
+
{ code: 'NETWORK_ERROR', next_step: { kind: 'recovery', action: 'retry' } }
|
|
251
|
+
],
|
|
252
|
+
examples: [
|
|
253
|
+
'happyskills groups list -w acme',
|
|
254
|
+
'happyskills groups create -w acme engineering --description "Core team"'
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
module.exports = { run, schema }
|
package/src/commands/init.js
CHANGED
|
@@ -147,4 +147,38 @@ const run = (args) => catch_errors('Init failed', async () => {
|
|
|
147
147
|
print_hint(`Edit these files, then run ${code(`happyskills release ${final_name} --workspace <slug>`)} to publish.`)
|
|
148
148
|
}).then(([errors]) => { if (errors) { exit_with_error(errors); return } })
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
const schema = {
|
|
151
|
+
name: 'init',
|
|
152
|
+
audience: 'consumer',
|
|
153
|
+
purpose: 'Scaffold a new skill (or kit) directory with skill.json and SKILL.md under .agents/skills/<name>/.',
|
|
154
|
+
mutation: true,
|
|
155
|
+
interactive_in_text_mode: false,
|
|
156
|
+
input: {
|
|
157
|
+
positional: [ { name: 'name', required: true, type: 'string', description: 'Skill name (e.g., my-deploy-skill)' } ],
|
|
158
|
+
flags: [
|
|
159
|
+
{ name: 'global', alias: 'g', type: 'boolean', default: false, description: 'Create in global skills (~/.agents/skills/)' },
|
|
160
|
+
{ name: 'kit', type: 'boolean', default: false, description: 'Initialize as a kit (collection of skills)' },
|
|
161
|
+
{ name: 'agents', type: 'string', default: undefined, description: 'Target specific agents (comma-separated)' },
|
|
162
|
+
{ name: 'json', type: 'boolean', default: false, description: 'Output as JSON' },
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
output: {
|
|
166
|
+
data_shape: {
|
|
167
|
+
name: 'string',
|
|
168
|
+
type: 'string',
|
|
169
|
+
files_created: 'string[]',
|
|
170
|
+
directory: 'string',
|
|
171
|
+
linked_agents: 'string[] (optional)',
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
errors: [
|
|
175
|
+
{ code: 'USAGE_ERROR', next_step: { kind: 'routing', action: 'discover_schema' } },
|
|
176
|
+
{ code: 'ALREADY_EXISTS' },
|
|
177
|
+
],
|
|
178
|
+
examples: [
|
|
179
|
+
'happyskills init my-deploy-skill',
|
|
180
|
+
'happyskills init my-kit --kit',
|
|
181
|
+
],
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
module.exports = { run, schema }
|