@sous-io/sous 1.1.13 → 1.2.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 +181 -164
- package/docs/markdown/_sidebar.md +1 -0
- package/docs/markdown/commands.md +20 -8
- package/docs/markdown/configuration.md +17 -0
- package/docs/markdown/repositories-authoring.md +30 -0
- package/docs/markdown/repositories-consuming.md +59 -4
- package/docs/markdown/repositories-file-formats.md +106 -8
- package/docs/markdown/repositories-providers.md +35 -13
- package/docs/markdown/repositories-quickstart.md +1 -1
- package/docs/markdown/repositories-troubleshooting.md +22 -2
- package/docs/markdown/repositories.md +16 -1
- package/package.json +38 -38
- package/recipes/core/sous-skills/skills/about-sous/SKILL.tpl.md +7 -1
- package/recipes/core/sous-skills/skills/about-sous-recipes/SKILL.tpl.md +28 -6
- package/recipes/core/sous-skills/skills/about-sous-repos/SKILL.tpl.md +15 -4
- package/recipes/core/sous-skills/sous.recipe.yaml +1 -1
- package/sous.config.schema.json +9 -0
|
@@ -111,6 +111,21 @@ a recipe made mostly of `subscribes` entries. Because both lists are
|
|
|
111
111
|
declarative YAML rather than code, sous can read the whole dependency closure before fetching any
|
|
112
112
|
of it, which is what makes the trust decision answerable up front.
|
|
113
113
|
|
|
114
|
+
A third list, `recommends`, names recipes that work well beside this one but that it does not need. A
|
|
115
|
+
recommendation lands nothing by itself: sous asks the subscriber about each one, showing the author's
|
|
116
|
+
reason, and a yes makes it one of the project's own subscriptions. A no is remembered in the project's
|
|
117
|
+
config, so sous does not ask again. See [Recommended recipes](repositories-consuming.md#recommended-recipes).
|
|
118
|
+
|
|
119
|
+
```yaml
|
|
120
|
+
recommends:
|
|
121
|
+
- quality/lint-rules
|
|
122
|
+
- ref: quality/test-coverage
|
|
123
|
+
reason: >-
|
|
124
|
+
/review flags untested changes much more precisely when the coverage skill is present.
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
A recipe that uses `recommends` needs sous 1.2.0 or later.
|
|
128
|
+
|
|
114
129
|
### The lockfile
|
|
115
130
|
|
|
116
131
|
`.sous/sous.lock.json` records the exact version, content hash and holder of everything the
|
|
@@ -172,7 +187,7 @@ Trusting a repository trusts every namespace and recipe in it, including recipes
|
|
|
172
187
|
and it is the only security boundary sous draws. Trust authorizes those recipes to run code on your
|
|
173
188
|
machine with your own permissions, whether sous runs it during a build or your agent runs it (a
|
|
174
189
|
skill's scripts, a hook), and sous sandboxes neither. Before a repository is trusted nothing from it
|
|
175
|
-
runs, and the question itself reads only its index. Sous cannot tell you whether a repository
|
|
190
|
+
runs, and the question itself reads only its manifest and its index. Sous cannot tell you whether a repository
|
|
176
191
|
deserves that, and says so rather than implying otherwise. Where there is no terminal to ask on, the
|
|
177
192
|
run fails and names the repositories and the exact command that grants the trust:
|
|
178
193
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sous-io/sous",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.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.2.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-
|
|
50
|
-
"@sous-io/sous-lib-
|
|
51
|
-
"@sous-io/sous-plugin-
|
|
52
|
-
"@sous-io/sous-plugin-
|
|
53
|
-
"@sous-io/sous-plugin-
|
|
54
|
-
"@sous-io/sous-plugin-
|
|
55
|
-
"@sous-io/sous-plugin-cli": "1.1
|
|
56
|
-
"@sous-io/sous-plugin-
|
|
57
|
-
"@sous-io/sous-plugin-
|
|
58
|
-
"@sous-io/sous-plugin-formats": "1.1
|
|
59
|
-
"@sous-io/sous-plugin-
|
|
60
|
-
"@sous-io/sous-plugin-
|
|
61
|
-
"@sous-io/sous-plugin-gitlab": "1.1
|
|
62
|
-
"@sous-io/sous-plugin-harnesses": "1.1
|
|
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-mcp": "1.1
|
|
71
|
-
"@sous-io/sous-plugin-
|
|
72
|
-
"@sous-io/sous-plugin-
|
|
73
|
-
"@sous-io/sous-plugin-recipes": "1.1
|
|
74
|
-
"@sous-io/sous-plugin-
|
|
75
|
-
"@sous-io/sous-plugin-refs": "1.1
|
|
76
|
-
"@sous-io/sous-plugin-
|
|
77
|
-
"@sous-io/sous-plugin-
|
|
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-
|
|
49
|
+
"@sous-io/sous-lib-core": "1.2.1",
|
|
50
|
+
"@sous-io/sous-lib-documents": "1.2.1",
|
|
51
|
+
"@sous-io/sous-plugin-authoring": "1.2.1",
|
|
52
|
+
"@sous-io/sous-plugin-build": "1.2.1",
|
|
53
|
+
"@sous-io/sous-plugin-claude-code": "1.2.1",
|
|
54
|
+
"@sous-io/sous-plugin-compiler": "1.2.1",
|
|
55
|
+
"@sous-io/sous-plugin-cli": "1.2.1",
|
|
56
|
+
"@sous-io/sous-plugin-confd": "1.2.1",
|
|
57
|
+
"@sous-io/sous-plugin-config-files": "1.2.1",
|
|
58
|
+
"@sous-io/sous-plugin-formats": "1.2.1",
|
|
59
|
+
"@sous-io/sous-plugin-git": "1.2.1",
|
|
60
|
+
"@sous-io/sous-plugin-github": "1.2.1",
|
|
61
|
+
"@sous-io/sous-plugin-gitlab": "1.2.1",
|
|
62
|
+
"@sous-io/sous-plugin-harnesses": "1.2.1",
|
|
63
|
+
"@sous-io/sous-plugin-host": "1.2.1",
|
|
64
|
+
"@sous-io/sous-plugin-expressions": "1.2.1",
|
|
65
|
+
"@sous-io/sous-plugin-inspect": "1.2.1",
|
|
66
|
+
"@sous-io/sous-plugin-liquid": "1.2.1",
|
|
67
|
+
"@sous-io/sous-plugin-init": "1.2.1",
|
|
68
|
+
"@sous-io/sous-plugin-local": "1.2.1",
|
|
69
|
+
"@sous-io/sous-plugin-memories": "1.2.1",
|
|
70
|
+
"@sous-io/sous-plugin-mcp": "1.2.1",
|
|
71
|
+
"@sous-io/sous-plugin-pnpm": "1.2.1",
|
|
72
|
+
"@sous-io/sous-plugin-recipe-answers": "1.2.1",
|
|
73
|
+
"@sous-io/sous-plugin-recipes": "1.2.1",
|
|
74
|
+
"@sous-io/sous-plugin-npm": "1.2.1",
|
|
75
|
+
"@sous-io/sous-plugin-refs": "1.2.1",
|
|
76
|
+
"@sous-io/sous-plugin-update": "1.2.1",
|
|
77
|
+
"@sous-io/sous-plugin-variables": "1.2.1",
|
|
78
|
+
"@sous-io/sous-plugin-yarn": "1.2.1",
|
|
79
|
+
"@sous-io/sous-plugin-handlers": "1.2.1",
|
|
80
|
+
"@sous-io/sous-plugin-skills": "1.2.1",
|
|
81
|
+
"@sous-io/sous-plugin-editor": "1.2.1",
|
|
82
|
+
"@sous-io/sous-plugin-doctor": "1.2.1",
|
|
83
|
+
"@sous-io/sous-plugin-codex": "1.2.1",
|
|
84
|
+
"@sous-io/sous-plugin-migrations": "1.2.1"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=22"
|
|
@@ -118,7 +118,13 @@ project subscribes to it, directly or through its namespace, or when an active r
|
|
|
118
118
|
lists it under `subscribes`. Only an active recipe adds anything to the project: output files,
|
|
119
119
|
skills, tool hooks, tool plugins (such as a Claude Code plugin) and Sous plugins (code that
|
|
120
120
|
extends sous itself). A recipe held only through `depends` is a library: an active recipe may
|
|
121
|
-
include, call or import its files, but it adds nothing to the project itself.
|
|
121
|
+
include, call or import its files, but it adds nothing to the project itself. A recipe an active
|
|
122
|
+
recipe lists under `recommends` is only offered: `sous subscription add` and `sous update` ask about
|
|
123
|
+
it, and a yes makes it one of the project's own subscriptions. A no is recorded under
|
|
124
|
+
`declinedRecommendations` in `.sous/conf.d/510-subscriptions.jsonc`; `sous subscription add` with
|
|
125
|
+
that ref, or deleting the entry, undoes it. `--yes` never accepts a recommendation;
|
|
126
|
+
`--accept-recommendations` and `--decline-recommendations` answer every one, and without a
|
|
127
|
+
terminal and without either, each stays pending and is listed in the output.
|
|
122
128
|
|
|
123
129
|
The project's own recipes (under `.sous/recipes/` by default; `projectRecipes.paths` in the config
|
|
124
130
|
sets where) are active with no subscription and no trust question, since they are files in the
|
|
@@ -3,7 +3,7 @@ name: about-sous-recipes
|
|
|
3
3
|
description: >
|
|
4
4
|
YOU MUST load this skill when creating or changing a sous recipe: its sous.recipe.yaml, its
|
|
5
5
|
version, the variables it asks for, the files it publishes, a Sous plugin it ships or requires,
|
|
6
|
-
its depends or
|
|
6
|
+
its depends, subscribes or recommends lists, or a partial or @~ include inside it.
|
|
7
7
|
user-invocable: false
|
|
8
8
|
license: Apache-2.0
|
|
9
9
|
compatibility:
|
|
@@ -21,8 +21,9 @@ load `about-agent-skills`.
|
|
|
21
21
|
|
|
22
22
|
## The Manifest
|
|
23
23
|
|
|
24
|
-
The manifest is YAML or JSON, never JavaScript
|
|
25
|
-
starting with `x
|
|
24
|
+
The manifest is YAML or JSON, never JavaScript. A key sous does not know is skipped with a warning (a
|
|
25
|
+
sous older than 1.2.0 refuses it instead); extension keys starting with `x-` are carried through
|
|
26
|
+
with no warning. A typical one:
|
|
26
27
|
|
|
27
28
|
```yaml
|
|
28
29
|
formatVersion: 1
|
|
@@ -59,7 +60,7 @@ The fields in that example:
|
|
|
59
60
|
`projectRoot`, which sous sets itself (to the directory holding `.sous/`); setting it is an error. A recipe that only bundles others
|
|
60
61
|
may leave `contents` out.
|
|
61
62
|
- `plugin` and `requires` are described in "Shipping Sous Plugins" below.
|
|
62
|
-
- `depends`, `subscribes` and `variables` are described below; `submissions` is in
|
|
63
|
+
- `depends`, `subscribes`, `recommends` and `variables` are described below; `submissions` is in
|
|
63
64
|
`about-sous-repos`.
|
|
64
65
|
|
|
65
66
|
A file whose name contains `.tpl.` is rendered through LiquidJS and loses the `.tpl.`; every other
|
|
@@ -170,15 +171,17 @@ combination: secret, `local` or required if any definition is, and only the valu
|
|
|
170
171
|
accepts. When no value can satisfy both (different types, no shared `enum` option), each recipe is
|
|
171
172
|
asked separately under its recipe-scoped name.
|
|
172
173
|
|
|
173
|
-
## Depends and
|
|
174
|
+
## Depends, Subscribes and Recommends
|
|
174
175
|
|
|
175
|
-
|
|
176
|
+
The three lists name other recipes, and they do different things:
|
|
176
177
|
|
|
177
178
|
- `depends` makes the other recipe a **library** for this one. It is fetched and pinned, and its
|
|
178
179
|
files can be included from this recipe's templates, but its files never reach the subscriber's
|
|
179
180
|
output.
|
|
180
181
|
- `subscribes` is a **co-subscription**. The other recipe's files land, as if the project had
|
|
181
182
|
subscribed to it too.
|
|
183
|
+
- `recommends` is an **offer**. Sous asks the subscriber about each recommended recipe, showing its
|
|
184
|
+
`reason`, and subscribes to it only on a yes; a no is remembered, and never asked again.
|
|
182
185
|
|
|
183
186
|
Under either list, the other recipe's questions are asked, and its answers are in this recipe's
|
|
184
187
|
templates.
|
|
@@ -199,6 +202,25 @@ Each entry names its target by where it lives:
|
|
|
199
202
|
`local://` locators and `repo:` short names are refused: both are one project's private view of a
|
|
200
203
|
repository, and a published manifest is read everywhere.
|
|
201
204
|
|
|
205
|
+
A `recommends` entry is a ref, written as above, or `{ ref, reason }`. Use it for a recipe that makes
|
|
206
|
+
this one work better but that a subscriber could do without, and keep `subscribes` for what this
|
|
207
|
+
recipe needs. The `reason` tells the subscriber what the other recipe adds and when to skip it; put
|
|
208
|
+
the point in its first sentence, because a long one is shortened when shown.
|
|
209
|
+
|
|
210
|
+
```yaml
|
|
211
|
+
recommends:
|
|
212
|
+
- quality/lint-rules
|
|
213
|
+
- ref: quality/test-coverage
|
|
214
|
+
reason: >-
|
|
215
|
+
/review flags untested changes much more precisely when the coverage skill is present. Skip
|
|
216
|
+
it if your project has no test suite.
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
A recommended recipe may be missing, because the subscriber declined it: this recipe MUST NOT
|
|
220
|
+
include its files or read its variables, and its instructions MUST read correctly without it. A
|
|
221
|
+
sous older than 1.2.0 refuses a manifest holding `recommends`, and `sous repo release` warns about
|
|
222
|
+
every recipe that uses it.
|
|
223
|
+
|
|
202
224
|
## Shipping Sous Plugins
|
|
203
225
|
|
|
204
226
|
A recipe MAY ship a Sous plugin (code that extends sous itself, for example to add a Liquid
|
|
@@ -45,9 +45,19 @@ A recipe repository holds three kinds of file that sous reads:
|
|
|
45
45
|
- `sous.index.json`, the **index**: the catalog projects read, written only by `sous repo release`.
|
|
46
46
|
NEVER edit it by hand.
|
|
47
47
|
|
|
48
|
+
A project reads `sous.repo.yaml` first (the root's, then `.sous/`'s) and follows its `index` setting:
|
|
49
|
+
a `published` block or `index: embedded` holds the index in the manifest; `index: <path>.json` names
|
|
50
|
+
an index file; `index: tags` has projects build the index from the release tags; with none of these,
|
|
51
|
+
the index is the `sous.index.json` beside the manifest, and without one nothing is published yet. A
|
|
52
|
+
root `sous.index.json` is read only when there is no manifest. `sous repo release` writes the
|
|
53
|
+
root `sous.index.json`. The full rules, and what a tags-only repository costs to read:
|
|
54
|
+
https://sous.io/markdown/#/repositories-file-formats?id=how-a-project-reads-a-repository
|
|
55
|
+
|
|
48
56
|
Manifests are YAML (`.yaml`, `.yml`) or JSON (`.json`, `.jsonc`, both allowing comments and
|
|
49
57
|
trailing commas), never JavaScript: sous reads them before anyone has trusted the repository, so
|
|
50
|
-
nothing in them may run.
|
|
58
|
+
nothing in them may run. A key sous does not know is refused in the repo manifest and skipped with
|
|
59
|
+
a warning in a recipe manifest (a sous older than 1.2.0 refuses it there too); extension keys
|
|
60
|
+
starting with `x-` are carried through with no warning. A
|
|
51
61
|
recipe folder MUST NOT contain a symbolic link; the release refuses one.
|
|
52
62
|
|
|
53
63
|
```yaml
|
|
@@ -73,8 +83,8 @@ once a git tag shaped `namespace/recipe@version` exists for it (for example
|
|
|
73
83
|
`review/checklist@1.2.0`). The index records each published version with its content hash, its
|
|
74
84
|
tag, the range each of its dependencies may take (the declared range, or `^<version at release>`
|
|
75
85
|
for a sibling named with no range; each with the manifest entry that brought it in and whether it
|
|
76
|
-
is a co-subscription or a build dependency)
|
|
77
|
-
definitions it publishes, which is how a project lists what a recipe installs and asks before
|
|
86
|
+
is a co-subscription or a build dependency), its `recommends` list (settled the same way, each
|
|
87
|
+
`reason` included) and the variable definitions it publishes, which is how a project lists what a recipe installs and asks before
|
|
78
88
|
fetching it; for the length of one release commit it also records the version each manifest
|
|
79
89
|
declares, whose tag that release cuts next. A published version never changes: new files need a
|
|
80
90
|
new version, and a release refuses to publish different content under a version already tagged. A
|
|
@@ -108,7 +118,8 @@ the index has uncommitted changes, or while git cannot say who is committing. Un
|
|
|
108
118
|
to other files (a project file a sous migration rewrote, for example) do not stop it, and its
|
|
109
119
|
commit leaves them out. In one run it:
|
|
110
120
|
|
|
111
|
-
1. validates every manifest
|
|
121
|
+
1. validates every manifest, warning about each recipe that uses `recommends` (subscribers need
|
|
122
|
+
sous 1.2.0 or later to read it);
|
|
112
123
|
2. finds the recipes whose files changed since the tag that last published them (a recipe never
|
|
113
124
|
tagged is released at the version its manifest declares);
|
|
114
125
|
3. raises the version of each changed recipe whose version still equals that tag (a patch step by
|
package/sous.config.schema.json
CHANGED
|
@@ -359,6 +359,15 @@
|
|
|
359
359
|
},
|
|
360
360
|
"additionalProperties": false
|
|
361
361
|
},
|
|
362
|
+
"declinedRecommendations": {
|
|
363
|
+
"description": "The recommended recipes and namespaces this project declined, so sous does not offer them again. Sous adds one when you decline a recommendation, and removes one when you subscribe to it.",
|
|
364
|
+
"type": "array",
|
|
365
|
+
"default": [],
|
|
366
|
+
"items": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"description": "A recipe ('namespace/recipe') or a namespace ('namespace')."
|
|
369
|
+
}
|
|
370
|
+
},
|
|
362
371
|
"editor": {
|
|
363
372
|
"description": "Edits to files Sous does not own (editor.edits), applied, recorded and undone by the editor.",
|
|
364
373
|
"type": "object",
|