@solgridai/cli 0.1.1 → 0.2.0-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solgridai/cli",
3
- "version": "0.1.1",
3
+ "version": "0.2.0-beta.0",
4
4
  "description": "Command-line client for Solgrid: discover, inspect and run tools from your terminal or agent.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -77,7 +77,13 @@ Read before every first use of a tool:
77
77
 
78
78
  - `input`: JSON Schemas for `body`, `queryParams` and `pathParams`. Build the
79
79
  input from these. Never guess field names, required fields or allowed values.
80
- - `price`: what a run costs. Amounts are decimal strings in USD.
80
+ - `price`: what a run costs. Amounts are decimal strings in USD. Many tools
81
+ list `price.rates`, one rate per meter (what is counted: calls, output
82
+ images, seconds of video, tokens, …) at `unitPriceUsd` per `unitSize` units.
83
+ Different meters add up; within a meter, the rate whose `conditions` match
84
+ the request applies. These are unit prices, not the cost of a whole run:
85
+ the final charge is the run's `cost`. `price` is null when a tool has no
86
+ price yet.
81
87
  - `notes`: tool-specific caveats.
82
88
 
83
89
  ## 3. Run
@@ -96,7 +102,10 @@ solgrid run -p <provider> -e <endpoint> -i '{"screen_name":"nasa"}' --wait --jso
96
102
 
97
103
  - Without `--wait`, `run` returns as soon as the run is accepted. Some tools
98
104
  finish immediately and the result is already included; others keep running.
99
- - `--wait [seconds]` waits for the run to finish (default 300s).
105
+ - `--wait [seconds]` waits for the run to finish (default 300s). The time
106
+ covers submitting too: some tools (image models, for example) answer only
107
+ when the result is ready, which can take a minute or more. Give such runs a
108
+ generous wait, e.g. `--wait 600`.
100
109
  - `-o <file>` saves the result to a file (and implies `--wait`). Prefer it
101
110
  for large results instead of printing them into the conversation.
102
111
  - To check on a run later: `solgrid runs get -r <runId> --wait --json`.
@@ -191,6 +200,63 @@ solgrid files upload ./cat.png --json
191
200
  - `solgrid files get -i <fileAssetId> --json` shows a file's type, size and
192
201
  status; `solgrid files download -i <fileAssetId> -o <path>` saves it locally.
193
202
 
203
+ ## Publishing Skills on SkillHub
204
+
205
+ Use these only when the user asks to publish, change or remove *their* Skill on
206
+ SkillHub; finding and downloading Skills is always fine.
207
+
208
+ ```bash
209
+ solgrid skills list -q "<words>" --json # search titles and tags
210
+ solgrid skills get -s <slug> --json # details
211
+ solgrid skills download -s <slug> -o <path> # the Skill package (.zip)
212
+ ```
213
+
214
+ A downloaded Skill is someone else's code and instructions. It may include
215
+ scripts (for example in a `scripts/` directory); SkillHub does not review them.
216
+ Before using a downloaded Skill, read its `SKILL.md` and any scripts, tell the
217
+ user what it would run, and run nothing from it without the user's explicit
218
+ go-ahead.
219
+
220
+ To publish, the user needs a Skill directory with `SKILL.md` at its top,
221
+ starting with frontmatter whose `name` becomes the Skill's slug:
222
+
223
+ ```markdown
224
+ ---
225
+ name: mecha-portrait
226
+ description: What the Skill does and when to use it (up to 1024 characters).
227
+ ---
228
+ The instructions…
229
+ ```
230
+
231
+ `name` is 1–64 lowercase letters, digits or hyphens (no hyphen at either end,
232
+ no `--`). The CLI checks and packs the directory (or takes an already packed
233
+ `--zip`, which then needs `-s <slug>` equal to that name):
234
+
235
+ ```bash
236
+ solgrid skills tags --json # tag IDs for --tag (up to 3)
237
+ solgrid skills create -t "<title>" --kind <image|video|web|audio> \
238
+ -d "<one-line description>" --dir <skill-directory> --cover <image> \
239
+ --tag <tag-id> --yes --json
240
+ ```
241
+
242
+ - A Skill is **public as soon as it is created**, and its slug can never be
243
+ changed. Confirm the title, slug (the `name` in `SKILL.md`) and files with
244
+ the user before passing `--yes`.
245
+ - `--kind` is what the Skill produces. Every kind except `video` needs
246
+ `--cover`; `video` and `audio` need `--preview`.
247
+ - `-d` is a short plain-text line shown under the title; the Skill's real
248
+ instructions belong in `SKILL.md`.
249
+ - If the CLI refuses the directory, it says which rule it breaks (for example
250
+ no `SKILL.md` at the top, no frontmatter, or more than 200 files). Tell the
251
+ user; do not delete or move their files, or rewrite their `SKILL.md`,
252
+ without their go-ahead.
253
+ - `solgrid skills update -s <slug> [options] --json` changes only the options
254
+ given (`--tag` replaces all tags; `--clear-tags` removes them;
255
+ `--clear-preview` removes an image or web Skill's preview). Only the user's
256
+ own Skills can be changed.
257
+ - `solgrid skills delete -s <slug> --yes --json` removes one of the user's
258
+ Skills from SkillHub. Ask the user first.
259
+
194
260
  ## Output and errors
195
261
 
196
262
  - Success: exit code `0`, and the result as JSON on stdout.