@sous-io/sous 1.1.0 → 1.1.1
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/sous.js +174 -160
- package/docs/markdown/_sidebar.md +2 -0
- package/docs/markdown/commands.md +74 -18
- package/docs/markdown/config-inspection.md +9 -1
- package/docs/markdown/configuration.md +6 -0
- package/docs/markdown/editing-files.md +2 -1
- package/docs/markdown/handlers.md +30 -12
- package/docs/markdown/repositories-authoring.md +37 -3
- package/docs/markdown/repositories-consuming.md +51 -9
- package/docs/markdown/repositories-file-formats.md +42 -0
- package/docs/markdown/repositories-providers.md +92 -19
- package/docs/markdown/repositories-quickstart.md +10 -1
- package/docs/markdown/repositories-troubleshooting.md +12 -7
- package/docs/markdown/repositories-variables.md +2 -1
- package/docs/markdown/repositories.md +2 -0
- package/package.json +38 -38
- package/recipes/core/sous-skills/skills/about-sous-recipes/SKILL.tpl.md +4 -0
- package/recipes/core/sous-skills/skills/about-sous-repos/SKILL.tpl.md +27 -4
- package/recipes/core/sous-skills/sous.recipe.yaml +1 -1
- package/sous.config.schema.json +5 -0
|
@@ -125,8 +125,10 @@ for different repositories. Keying by identity is what lets them share one cache
|
|
|
125
125
|
colliding. See [The store on disk](repositories-file-formats.md#the-store-on-disk).
|
|
126
126
|
|
|
127
127
|
Canonicalizing also produces the two clone URLs sous hands to git, `https://<host>/<owner>/<name>.git`
|
|
128
|
-
and `git@<host>:<owner>/<name>.git`.
|
|
129
|
-
|
|
128
|
+
and `git@<host>:<owner>/<name>.git`. A port in an HTTPS URL stays in the HTTPS URL and never reaches
|
|
129
|
+
the SSH one; an SSH port comes only from an SSH URL that names one (`ssh://git@<host>:2222/...`). For
|
|
130
|
+
the `local` provider the HTTPS slot carries the absolute directory, because that is what git is given
|
|
131
|
+
when a recipe is fetched.
|
|
130
132
|
|
|
131
133
|
?> A published manifest names a dependency in another repository by location, such as a locator
|
|
132
134
|
whose scheme is the provider's identifier: `github://sous-io/sous-recipes/workflow/sat@^1.1`. A
|
|
@@ -178,9 +180,24 @@ A token is looked for in these places, in this order, and a missing one is skipp
|
|
|
178
180
|
A command's output counts as a token only when the command exits `0` and prints exactly one non-empty
|
|
179
181
|
line holding no whitespace.
|
|
180
182
|
|
|
183
|
+
When the host refuses a token (a `401` or `403`), sous sends the next place's token instead, and
|
|
184
|
+
passes over a token it was already refused (glab hands back `GITLAB_TOKEN` when that is set). When the
|
|
185
|
+
read then works some other way, sous warns once per command, naming where the refused token came from
|
|
186
|
+
and how to fix it:
|
|
187
|
+
|
|
188
|
+
```text
|
|
189
|
+
GITLAB_TOKEN holds a token gitlab.com refused (401: the token was refused), so sous read
|
|
190
|
+
gitlab.com/acme/private-recipes with HTTP with token, using the token from git credential fill.
|
|
191
|
+
Replace the token in GITLAB_TOKEN with one that can read the repository (export GITLAB_TOKEN=<a
|
|
192
|
+
token with read_repository>), or unset GITLAB_TOKEN.
|
|
193
|
+
```
|
|
194
|
+
|
|
181
195
|
Sous remembers, per repository, which way worked, in `$SOUS_HOME/cache/read-strategies.json`, and tries it
|
|
182
|
-
first next
|
|
183
|
-
|
|
196
|
+
first for the next seven days, counted from when it became first. After that, the better-ranked ways are
|
|
197
|
+
tried first again, so a repository read through git while its token was broken goes back to HTTP once the
|
|
198
|
+
token works. `store.strategyMemorySeconds` sets the time (`604800`, seven days, by default; `0` always
|
|
199
|
+
tries the usual order first). After a failure sous forgets the remembered way and walks the whole list
|
|
200
|
+
again. When every way fails, one error lists each attempt and why it failed, then names the fixes:
|
|
184
201
|
|
|
185
202
|
```text
|
|
186
203
|
Error: could not read gitlab.com/acme/private-recipes.
|
|
@@ -190,7 +207,6 @@ Error: could not read gitlab.com/acme/private-recipes.
|
|
|
190
207
|
Fix one of these:
|
|
191
208
|
export GITLAB_TOKEN=<a token with read_repository>
|
|
192
209
|
set up git access to gitlab.com (an SSH key, or a credential helper)
|
|
193
|
-
A token reads only the index. Recipe files are downloaded with git, so building also needs git access.
|
|
194
210
|
```
|
|
195
211
|
|
|
196
212
|
The fixes depend on what the attempts said:
|
|
@@ -199,8 +215,8 @@ The fixes depend on what the attempts said:
|
|
|
199
215
|
that the machine can reach the host, or to set `HTTPS_PROXY`. No token is offered.
|
|
200
216
|
- git reached the repository and said it has no `sous.index.json`: the fix is to check the URL. No
|
|
201
217
|
token is offered, since the repository is not private.
|
|
202
|
-
- A token was found and refused: the fix
|
|
203
|
-
fill`, `glab`) instead of asking you to set it.
|
|
218
|
+
- A token was found and refused: the attempt and the fix name where it came from (`GITLAB_TOKEN`,
|
|
219
|
+
`git credential fill`, `glab`) instead of asking you to set it.
|
|
204
220
|
- `gh` or `glab` is installed but printed no token: the fixes include `gh auth login` or
|
|
205
221
|
`glab auth login` for the host.
|
|
206
222
|
|
|
@@ -210,14 +226,32 @@ once, and the error is told once, naming every recipe it stopped.
|
|
|
210
226
|
The HTTP reads honor `HTTPS_PROXY`, `HTTP_PROXY` and `NO_PROXY` (or their lowercase spellings), as
|
|
211
227
|
git does.
|
|
212
228
|
|
|
229
|
+
A cached index is checked again once its freshness window lapses. GitHub answers that check with
|
|
230
|
+
"not modified" through the index's `ETag`. GitLab sends no `ETag` for a file, so sous keeps the
|
|
231
|
+
`X-Gitlab-Content-Sha256` header GitLab sends instead, asks for that header alone with one `HEAD`
|
|
232
|
+
request, and downloads the index again only when the hash changed.
|
|
233
|
+
|
|
213
234
|
**A recipe's files** come from git itself: a shallow, blobless, sparse clone at the version's
|
|
214
235
|
tag, fetching only the blobs inside that one recipe folder. That means git's own credentials
|
|
215
236
|
apply, exactly as they would for a manual clone: credential helpers, the SSH agent, proxies and
|
|
216
|
-
`insteadOf` rewrites are all inherited from your git configuration
|
|
217
|
-
|
|
237
|
+
`insteadOf` rewrites are all inherited from your git configuration. Cloning a working copy with
|
|
238
|
+
`sous repo link` works the same way.
|
|
239
|
+
|
|
240
|
+
Sous adds one thing: the token it found for the index (from the environment or the host's command
|
|
241
|
+
line tool) is handed to the HTTPS clone, so a machine with only a token can build. The token travels
|
|
242
|
+
as an `Authorization` header set through git's environment for that one clone
|
|
243
|
+
(`GIT_CONFIG_COUNT`, `GIT_CONFIG_KEY_<n>` and `GIT_CONFIG_VALUE_<n>`, for
|
|
244
|
+
`http.https://<host>/.extraHeader`); it is never put in a URL, so git never prints it and never writes
|
|
245
|
+
it into the clone's `.git/config`. A token from `git credential fill` is not handed over, because git
|
|
246
|
+
sends that one itself. When the clone with the token fails, the same URL is tried once more without
|
|
247
|
+
it, so a refused token never stops credentials git already had.
|
|
218
248
|
|
|
219
|
-
|
|
220
|
-
|
|
249
|
+
The clone tries the HTTPS URL, then the SSH URL. The one that worked is remembered beside the read
|
|
250
|
+
strategy in `read-strategies.json` and tried first for the same seven days (`store.strategyMemorySeconds`),
|
|
251
|
+
so a repository only SSH can reach stops trying HTTPS for every recipe.
|
|
252
|
+
|
|
253
|
+
?> For a private repository, either git access (a credential helper or an SSH key) or a token covers
|
|
254
|
+
both the index and the recipe files.
|
|
221
255
|
|
|
222
256
|
## Proposing a change
|
|
223
257
|
|
|
@@ -228,12 +262,12 @@ remote. Providers differ, and sous says so rather than pretending otherwise:
|
|
|
228
262
|
| Provider | Tool | Push permission | Forking | Proposal | Following it up |
|
|
229
263
|
|---|---|---|---|---|---|
|
|
230
264
|
| `github` | `gh` | read from GitHub, so a contributor without it is forked automatically | `gh repo fork`, with a `fork` remote added for you | pull request | `gh pr list`, `gh pr view` and `gh pr edit`, matching a fork's pull request by its owner |
|
|
231
|
-
| `gitlab` | `glab` | sous cannot tell, so it pushes to `origin` and says so | not done for you | merge request |
|
|
265
|
+
| `gitlab` | `glab` | sous cannot tell, so it pushes to `origin` and says so | not done for you | merge request | `glab mr list`, `glab mr view` and `glab mr update`, matching a fork's merge request by its author |
|
|
232
266
|
| `local` | none | not applicable | not applicable | not applicable | not applicable |
|
|
233
267
|
|
|
234
|
-
**GitLab
|
|
235
|
-
|
|
236
|
-
|
|
268
|
+
**GitLab follows a merge request up as GitHub does a pull request.** It declares `proposals`, so a
|
|
269
|
+
submission finds the merge request already open for the branch and updates it instead of opening a
|
|
270
|
+
second, and `sous repo submit --status` reports its state, its pipeline and whether it can be merged.
|
|
237
271
|
|
|
238
272
|
**GitLab reports "cannot tell" rather than guessing.** Sous has no cheap, reliable way to ask
|
|
239
273
|
whether you may push, and a wrong guess would send you down a fork path this provider cannot
|
|
@@ -277,10 +311,49 @@ That block goes at the top level of your primary config or of a `conf.d/` file o
|
|
|
277
311
|
writes its own entries to the `conf.d/500-repos.jsonc` file it manages. Every key is listed under
|
|
278
312
|
[configuration keys](repositories-file-formats.md#configuration-keys).
|
|
279
313
|
|
|
280
|
-
Everything downstream then works normally: the index is read from that host's
|
|
281
|
-
|
|
282
|
-
`
|
|
283
|
-
|
|
314
|
+
Everything downstream then works normally: the index is read from that host's API address, a token
|
|
315
|
+
comes from the sources above, and the identity is `git.example.com/platform/recipes`. Group paths of
|
|
316
|
+
any depth are preserved, so `group/subgroup/project` stays one repository rather than being mistaken
|
|
317
|
+
for a namespace.
|
|
318
|
+
|
|
319
|
+
The GitLab plugin's `hosts` option names more hosts that are GitLab, so their URLs are recognized
|
|
320
|
+
without a `provider` on each entry. An entry matches a URL with or without a port, and may name the
|
|
321
|
+
HTTPS port and the sub-path GitLab is installed under:
|
|
322
|
+
|
|
323
|
+
```jsonc
|
|
324
|
+
{
|
|
325
|
+
"plugins": {
|
|
326
|
+
"options": {
|
|
327
|
+
"@sous-io/sous-plugin-gitlab": { "hosts": ["git.example.com:8443/gitlab"] }
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
**A port.** For `https://git.example.com:8443/platform/recipes`, the port stays in the HTTPS clone
|
|
334
|
+
URL and the API address (`https://git.example.com:8443/api/v4/...`), and the SSH URL is
|
|
335
|
+
`git@git.example.com:platform/recipes.git`. An SSH URL with its own port,
|
|
336
|
+
`ssh://git@git.example.com:2222/platform/recipes`, keeps that port in the SSH URL alone; its HTTPS
|
|
337
|
+
address takes the port a `hosts` entry names, or none.
|
|
338
|
+
|
|
339
|
+
**A sub-path.** A URL alone cannot tell GitLab installed under `/gitlab` from a group named `gitlab`.
|
|
340
|
+
For a path with room for one, sous asks the server once where its API answers
|
|
341
|
+
(`https://<host>/api/v4/version`, then `https://<host>/gitlab/api/v4/version`, and so on), remembers
|
|
342
|
+
the answer for the host in `$SOUS_HOME/cache/gitlab-instances.json`, and says what it found:
|
|
343
|
+
|
|
344
|
+
```text
|
|
345
|
+
GitLab on git.example.com is installed under a sub-path
|
|
346
|
+
Host : git.example.com
|
|
347
|
+
Installed under: /gitlab
|
|
348
|
+
API address : https://git.example.com/gitlab/api/v4
|
|
349
|
+
SSH clone URL : git@git.example.com:platform/recipes.git
|
|
350
|
+
Remembered in : /home/me/.sous/cache/gitlab-instances.json
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
The API address and the SSH URL then leave `/gitlab` out of the project path, and the HTTPS clone URL
|
|
354
|
+
keeps it. A sub-path named in a `hosts` entry (`git.example.com/gitlab`) is used as given, and the
|
|
355
|
+
server is never asked. The identity keeps the whole path either way:
|
|
356
|
+
`git.example.com/gitlab/platform/recipes`.
|
|
284
357
|
|
|
285
358
|
`sous repo submit` is the exception: it runs inside the repository checkout and never reads a
|
|
286
359
|
project's config, so it picks the provider from the `origin` remote URL alone. A host that does not
|
|
@@ -50,6 +50,9 @@ $ sous build
|
|
|
50
50
|
✓ .claude/skills/about-sous-repos/SKILL.md (~1,579 tokens)
|
|
51
51
|
✓ .claude/skills/about-sous-recipes/SKILL.md (~1,639 tokens)
|
|
52
52
|
✓ .claude/skills/create-skill/SKILL.md (~655 tokens)
|
|
53
|
+
|
|
54
|
+
Files: 7 written (7 new), 0 unchanged.
|
|
55
|
+
|
|
53
56
|
✓ Done.
|
|
54
57
|
```
|
|
55
58
|
|
|
@@ -175,7 +178,10 @@ sous repo init ~/projects/my-recipes --name my-recipes --namespace workflow
|
|
|
175
178
|
wrote .gitignore
|
|
176
179
|
```
|
|
177
180
|
|
|
178
|
-
|
|
181
|
+
On GitLab (an `origin` remote on GitLab, or `--host gitlab`) the scaffold writes `.gitlab-ci.yml` instead of
|
|
182
|
+
`.github/workflows/sous-release.yml`, and warns that its release job needs a masked CI/CD variable named
|
|
183
|
+
`SOUS_RELEASE_TOKEN`; see [the scaffolded workflow](repositories-authoring.md#the-scaffolded-workflow). The
|
|
184
|
+
output goes on with what `sous init` writes and with its first build, which compiles the
|
|
179
185
|
memories file. The scaffold validates as written, and every file it leaves is heavily commented. `sous.repo.yaml`
|
|
180
186
|
declares the namespaces and lists every recipe folder; each folder's `sous.recipe.yaml` is one
|
|
181
187
|
recipe, with its own version.
|
|
@@ -332,6 +338,9 @@ $ sous build
|
|
|
332
338
|
restored: workflow/task-files
|
|
333
339
|
▶ Building:
|
|
334
340
|
✓ .claude/skills/about-task-files/SKILL.md (~942 tokens)
|
|
341
|
+
|
|
342
|
+
Files: 1 written (1 new), 7 unchanged.
|
|
343
|
+
|
|
335
344
|
✓ Done.
|
|
336
345
|
```
|
|
337
346
|
|
|
@@ -246,9 +246,12 @@ or remove the lockfile and subscribe again to have sous rebuild it.
|
|
|
246
246
|
|
|
247
247
|
The repair for a lockfile that has drifted from the config, whether from a hand edit, a bad merge or
|
|
248
248
|
a subscription removed by hand, is `sous lock rebuild`, with `--dry-run` first. It resolves every
|
|
249
|
-
subscription against the cached indexes and replaces the lockfile outright,
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
subscription against the cached indexes and replaces the lockfile outright, asking nothing and
|
|
250
|
+
granting no trust; a subscription whose repository is not added, or whose index is missing, is
|
|
251
|
+
reported by name. It downloads only a recipe whose index does not record what it depends on, to read
|
|
252
|
+
its manifest; when that download fails, nothing is written and the recipe is named, since a lockfile
|
|
253
|
+
written without it would drop the pins of its dependencies. `sous doctor` and `sous build` hold to the
|
|
254
|
+
same rule.
|
|
252
255
|
|
|
253
256
|
## Core skills missing after a sous upgrade
|
|
254
257
|
|
|
@@ -347,13 +350,15 @@ Error: could not read gitlab.com/acme/private-recipes.
|
|
|
347
350
|
Fix one of these:
|
|
348
351
|
export GITLAB_TOKEN=<a token with read_repository>
|
|
349
352
|
set up git access to gitlab.com (an SSH key, or a credential helper)
|
|
350
|
-
A token reads only the index. Recipe files are downloaded with git, so building also needs git access.
|
|
351
353
|
```
|
|
352
354
|
|
|
353
355
|
Sous tried every way it has to read the repository's index, and each line says why that one failed. Any
|
|
354
|
-
one fix lets sous read the index
|
|
355
|
-
so a
|
|
356
|
-
|
|
356
|
+
one fix lets sous read the index and download recipe files: sous hands the token it found to git for an
|
|
357
|
+
HTTPS download, so a token alone is enough to build. `gh` and `glab` are not needed to read.
|
|
358
|
+
|
|
359
|
+
A token the host refused is named by where it came from, on its attempt's line and in the fix. When
|
|
360
|
+
another way then works, the build goes on and warns once that the token was refused; replace the token
|
|
361
|
+
there, or unset the variable.
|
|
357
362
|
The order sous tries, and where it finds a token, are under
|
|
358
363
|
[Private repositories](repositories-providers.md#private-repositories).
|
|
359
364
|
|
|
@@ -273,7 +273,8 @@ lists them and asks which one, and `--accept-first` takes the first.
|
|
|
273
273
|
| `sous vars ask --all` | Asks every variable again, including the ones already answered |
|
|
274
274
|
| `sous vars ask --accept-first` | When the name matches several things, takes the first one listed |
|
|
275
275
|
| `sous vars ask --file <path>` | Reads definitions from a standalone definitions file |
|
|
276
|
-
| `sous vars ask --
|
|
276
|
+
| `sous vars ask --save-locally` | Stores every answer of the run in `.sous/.env.local` (gitignored, this machine only) |
|
|
277
|
+
| `sous vars ask --save-shared` | Stores every answer of the run in `.sous/.env` (committed); a secret or machine-specific variable sent there needs a yes (`--yes`). It cannot be used with `--save-locally` |
|
|
277
278
|
| `sous vars ask --answer <name>=<value>` | Answers one question ahead of time; repeat it for each answer |
|
|
278
279
|
| `sous vars ask --answers-file <path>` | Reads answers from a YAML or JSON file of `name: value` pairs |
|
|
279
280
|
| `sous vars ask --dry-run` | Reports what would be asked and written, without writing anything; with no terminal, it lists the questions it would ask instead of failing |
|
|
@@ -289,6 +289,8 @@ $ sous build
|
|
|
289
289
|
▷ SKILL.tpl.md:
|
|
290
290
|
Entry Point: ~/.sous/cache/github.com/my-team/agent-recipes/workflow/task-files/1.0.2/skills/start-task/SKILL.tpl.md
|
|
291
291
|
✓ /home/me/my-project/.claude/skills/start-task/SKILL.md (~1,996 tokens)
|
|
292
|
+
|
|
293
|
+
Files: 1 written (1 new), 7 unchanged.
|
|
292
294
|
```
|
|
293
295
|
|
|
294
296
|
Skills go to `<project root>/.claude/skills`, the skills directory the built-in Claude Code plugin names, and the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sous-io/sous",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Compiles AI coding agent configuration (CLAUDE.md, skills, memories) from LiquidJS templates",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,49 +39,49 @@
|
|
|
39
39
|
"sous.config.schema.json"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@sous-io/sous-plugin-api": "1.1.
|
|
42
|
+
"@sous-io/sous-plugin-api": "1.1.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"esbuild": "^0.27.4",
|
|
46
46
|
"jsonc-parser": "^3.3.1",
|
|
47
47
|
"yaml": "^2.9.0",
|
|
48
48
|
"zod": "^4.4.3",
|
|
49
|
-
"@sous-io/sous-lib-core": "1.1.
|
|
50
|
-
"@sous-io/sous-
|
|
51
|
-
"@sous-io/sous-plugin-
|
|
52
|
-
"@sous-io/sous-
|
|
53
|
-
"@sous-io/sous-plugin-
|
|
54
|
-
"@sous-io/sous-plugin-cli": "1.1.
|
|
55
|
-
"@sous-io/sous-plugin-confd": "1.1.
|
|
56
|
-
"@sous-io/sous-plugin-
|
|
57
|
-
"@sous-io/sous-plugin-
|
|
58
|
-
"@sous-io/sous-plugin-
|
|
59
|
-
"@sous-io/sous-plugin-
|
|
60
|
-
"@sous-io/sous-plugin-
|
|
61
|
-
"@sous-io/sous-plugin-gitlab": "1.1.
|
|
62
|
-
"@sous-io/sous-plugin-
|
|
63
|
-
"@sous-io/sous-plugin-
|
|
64
|
-
"@sous-io/sous-plugin-
|
|
65
|
-
"@sous-io/sous-plugin-
|
|
66
|
-
"@sous-io/sous-plugin-
|
|
67
|
-
"@sous-io/sous-plugin-
|
|
68
|
-
"@sous-io/sous-plugin-
|
|
69
|
-
"@sous-io/sous-plugin-
|
|
70
|
-
"@sous-io/sous-plugin-
|
|
71
|
-
"@sous-io/sous-plugin-
|
|
72
|
-
"@sous-io/sous-plugin-
|
|
73
|
-
"@sous-io/sous-plugin-
|
|
74
|
-
"@sous-io/sous-plugin-
|
|
75
|
-
"@sous-io/sous-plugin-
|
|
76
|
-
"@sous-io/sous-plugin-
|
|
77
|
-
"@sous-io/sous-plugin-variables": "1.1.
|
|
78
|
-
"@sous-io/sous-plugin-
|
|
79
|
-
"@sous-io/sous-plugin-
|
|
80
|
-
"@sous-io/sous-plugin-
|
|
81
|
-
"@sous-io/sous-plugin-
|
|
82
|
-
"@sous-io/sous-plugin-
|
|
83
|
-
"@sous-io/sous-plugin-
|
|
84
|
-
"@sous-io/sous-plugin-codex": "1.1.
|
|
49
|
+
"@sous-io/sous-lib-core": "1.1.1",
|
|
50
|
+
"@sous-io/sous-plugin-claude-code": "1.1.1",
|
|
51
|
+
"@sous-io/sous-plugin-build": "1.1.1",
|
|
52
|
+
"@sous-io/sous-lib-documents": "1.1.1",
|
|
53
|
+
"@sous-io/sous-plugin-authoring": "1.1.1",
|
|
54
|
+
"@sous-io/sous-plugin-cli": "1.1.1",
|
|
55
|
+
"@sous-io/sous-plugin-confd": "1.1.1",
|
|
56
|
+
"@sous-io/sous-plugin-config-files": "1.1.1",
|
|
57
|
+
"@sous-io/sous-plugin-compiler": "1.1.1",
|
|
58
|
+
"@sous-io/sous-plugin-formats": "1.1.1",
|
|
59
|
+
"@sous-io/sous-plugin-git": "1.1.1",
|
|
60
|
+
"@sous-io/sous-plugin-github": "1.1.1",
|
|
61
|
+
"@sous-io/sous-plugin-gitlab": "1.1.1",
|
|
62
|
+
"@sous-io/sous-plugin-harnesses": "1.1.1",
|
|
63
|
+
"@sous-io/sous-plugin-expressions": "1.1.1",
|
|
64
|
+
"@sous-io/sous-plugin-inspect": "1.1.1",
|
|
65
|
+
"@sous-io/sous-plugin-host": "1.1.1",
|
|
66
|
+
"@sous-io/sous-plugin-liquid": "1.1.1",
|
|
67
|
+
"@sous-io/sous-plugin-local": "1.1.1",
|
|
68
|
+
"@sous-io/sous-plugin-mcp": "1.1.1",
|
|
69
|
+
"@sous-io/sous-plugin-memories": "1.1.1",
|
|
70
|
+
"@sous-io/sous-plugin-npm": "1.1.1",
|
|
71
|
+
"@sous-io/sous-plugin-init": "1.1.1",
|
|
72
|
+
"@sous-io/sous-plugin-pnpm": "1.1.1",
|
|
73
|
+
"@sous-io/sous-plugin-recipe-answers": "1.1.1",
|
|
74
|
+
"@sous-io/sous-plugin-refs": "1.1.1",
|
|
75
|
+
"@sous-io/sous-plugin-update": "1.1.1",
|
|
76
|
+
"@sous-io/sous-plugin-skills": "1.1.1",
|
|
77
|
+
"@sous-io/sous-plugin-variables": "1.1.1",
|
|
78
|
+
"@sous-io/sous-plugin-handlers": "1.1.1",
|
|
79
|
+
"@sous-io/sous-plugin-editor": "1.1.1",
|
|
80
|
+
"@sous-io/sous-plugin-recipes": "1.1.1",
|
|
81
|
+
"@sous-io/sous-plugin-doctor": "1.1.1",
|
|
82
|
+
"@sous-io/sous-plugin-migrations": "1.1.1",
|
|
83
|
+
"@sous-io/sous-plugin-yarn": "1.1.1",
|
|
84
|
+
"@sous-io/sous-plugin-codex": "1.1.1"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=22"
|
|
@@ -89,6 +89,10 @@ index change, because `sous repo submit` refuses one that edits `sous.index.json
|
|
|
89
89
|
Example: `review/checklist` is at `1.2.0`, its last tag. One pull request fixes a typo (a patch) and
|
|
90
90
|
adds a command (a minor). The manifest goes to `1.3.0`, once.
|
|
91
91
|
|
|
92
|
+
Renaming, removing or moving a whole recipe is not a version raise: the old recipe is retired in
|
|
93
|
+
its repository's `sous.repo.yaml`, which may name its replacements (`about-sous-repos`, "Retiring
|
|
94
|
+
or Moving a Recipe").
|
|
95
|
+
|
|
92
96
|
## Variables
|
|
93
97
|
|
|
94
98
|
A recipe that needs a value from the project declares a **definition**; the project stores the
|
|
@@ -77,6 +77,27 @@ declares, whose tag that release cuts next. A published version never changes: n
|
|
|
77
77
|
new version, and a release refuses to publish different content under a version already tagged. A
|
|
78
78
|
lost index is rebuilt from the tags.
|
|
79
79
|
|
|
80
|
+
## Retiring or Moving a Recipe
|
|
81
|
+
|
|
82
|
+
A recipe is **retired** when its folder and its line under `recipes` are removed from
|
|
83
|
+
`sous.repo.yaml`. Its tags MUST stay: the next release keeps every version it published in the
|
|
84
|
+
index, under `retired`, so projects whose lockfile pins it keep building on a fresh clone. To offer
|
|
85
|
+
subscribers something else, name replacements in `sous.repo.yaml`:
|
|
86
|
+
|
|
87
|
+
```yaml
|
|
88
|
+
retired:
|
|
89
|
+
review/checklist:
|
|
90
|
+
replacements:
|
|
91
|
+
- review/checklist-v2 # a recipe this repository publishes
|
|
92
|
+
- github://harbor-labs/shared/review/lint # a recipe in another repository
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Zero or more replacements, each a recipe ref as `depends` takes one. A recipe that **moved** to another
|
|
96
|
+
repository is retired here, naming its new home as a replacement. A `retired` entry for a recipe still
|
|
97
|
+
listed under `recipes` is a release error. Subscribers' builds warn about the retired recipe, name the
|
|
98
|
+
replacements and, in a terminal, offer to swap the subscription. The retirement reaches the index with
|
|
99
|
+
the next release that publishes a version.
|
|
100
|
+
|
|
80
101
|
## Releasing
|
|
81
102
|
|
|
82
103
|
`sous repo release` publishes. It refuses to run while anything is uncommitted, or while git
|
|
@@ -106,11 +127,13 @@ Two presets matter most:
|
|
|
106
127
|
|
|
107
128
|
## What Happens to a Change
|
|
108
129
|
|
|
109
|
-
A repository made by `sous repo init` carries `.github/workflows/sous-release.yml
|
|
130
|
+
A repository made by `sous repo init` carries `.github/workflows/sous-release.yml` on GitHub, or
|
|
131
|
+
`.gitlab-ci.yml` on GitLab (whose release job pushes with a masked CI/CD variable named
|
|
132
|
+
`SOUS_RELEASE_TOKEN`, and fails naming it when it is not set). Either one runs:
|
|
110
133
|
|
|
111
|
-
- on every pull request, `sous repo release --check`;
|
|
112
|
-
- on every push to
|
|
113
|
-
no tag yet, commits the regenerated index when it changed, and pushes both.
|
|
134
|
+
- on every pull or merge request, `sous repo release --check`;
|
|
135
|
+
- on every push to the default branch, `sous repo release --ci --push --yes`, which tags every
|
|
136
|
+
version that has no tag yet, commits the regenerated index when it changed, and pushes both.
|
|
114
137
|
|
|
115
138
|
So a change to a recipe MUST raise that recipe's version in the pull request itself, by editing
|
|
116
139
|
`version` in its `sous.recipe.yaml`: after the merge, `--ci` refuses a recipe whose files changed
|
package/sous.config.schema.json
CHANGED
|
@@ -578,6 +578,11 @@
|
|
|
578
578
|
"type": "integer",
|
|
579
579
|
"default": 300,
|
|
580
580
|
"description": "How often watch mode checks upstream."
|
|
581
|
+
},
|
|
582
|
+
"strategyMemorySeconds": {
|
|
583
|
+
"type": "integer",
|
|
584
|
+
"default": 604800,
|
|
585
|
+
"description": "How long, in seconds, a way of reading a repository's index or downloading its recipes that worked stays the one tried first, counted from when it became first. The default, 604800 (seven days), means a repository read through git because its token failed goes back to trying the token first a week later. 0 always tries the host's usual order first; any whole number of seconds is accepted."
|
|
581
586
|
}
|
|
582
587
|
},
|
|
583
588
|
"additionalProperties": false
|