@sous-io/sous 0.2.20 → 0.2.21

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.
@@ -36,8 +36,10 @@ commands spell `--yes`, `-y`, `--force` or `--trust`.
36
36
  `sous.repo.yaml` says what the repository publishes, `sous.index.json` is the catalog that `sous repo release`
37
37
  writes, and each recipe folder carries one `sous.recipe.yaml` beside the files it contributes. Nothing else is
38
38
  fixed: recipe folders may live anywhere, and what makes a folder a recipe is that `sous.repo.yaml` lists its
39
- path under `recipes`. Both hand-written manifests are YAML or JSON and never JavaScript, because a repository's
40
- trust story rests on being readable without running any of its code.
39
+ path under `recipes`. Both hand-written manifests are YAML or JSON and never JavaScript, because manifests are
40
+ data: sous reads, validates and browses them without executing anything, before a repository is trusted, in a
41
+ dry run and in `sous repo release --check`. What trusting a repository authorizes is described under
42
+ [Trust](repositories.md#trust).
41
43
 
42
44
  ## Write a recipe
43
45
 
@@ -164,9 +164,12 @@ Do you trust this repository? (y/N)
164
164
  ```
165
165
 
166
166
  Trusting a repository trusts every namespace and recipe in it, including recipes published later,
167
- and it is the last gate before a recipe can run scripts on your machine; sous cannot tell you
168
- whether one deserves that, and says so rather than implying otherwise. Where there is no terminal
169
- to ask on, the run fails and names the repositories and the exact command that grants the trust:
167
+ and it is the only security boundary sous draws. Trust authorizes those recipes to run code on your
168
+ machine with your own permissions, whether sous runs it during a build or your agent runs it (a
169
+ skill's scripts, a hook), and sous sandboxes neither. Before a repository is trusted nothing from it
170
+ runs, and the question itself reads only its index. Sous cannot tell you whether a repository
171
+ deserves that, and says so rather than implying otherwise. Where there is no terminal to ask on, the
172
+ run fails and names the repositories and the exact command that grants the trust:
170
173
 
171
174
  ```text
172
175
  Error: One repository has to be trusted before this can continue, and sous is not
@@ -187,6 +190,14 @@ Error: One repository has to be trusted before this can continue, and sous is no
187
190
  through the `local` provider goes through the same ceremony, because its recipes still run on
188
191
  this machine.
189
192
 
193
+ Subscribing decides what is switched on, and it is not a second security gate. A recipe is
194
+ **active** when the project subscribes to it directly or through its namespace, or when an active
195
+ recipe lists it under `subscribes`; only an active recipe registers entry points of its own, such as
196
+ output files, skills and hooks. A recipe held only through `depends` is a library: an active recipe
197
+ may include, call or import its files, but it registers nothing itself. Activation keeps a project
198
+ from running what it has no use for and keeps unrelated recipes from colliding; everything in a
199
+ trusted repository is already trusted.
200
+
190
201
  ## The official repository, and the built-in core
191
202
 
192
203
  Sous publishes one official repository, [`sous-io/sous-recipes`](https://github.com/sous-io/sous-recipes).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sous-io/sous",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
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",
@@ -51,6 +51,20 @@ Edit them only in the recipe repository, where they are the sources. Never edit
51
51
  copy of them inside a consuming project; that copy is build output and is overwritten on
52
52
  the next sous run.
53
53
 
54
+ ## Trust and Activation
55
+
56
+ Trust is the only security boundary sous draws. Adding a repository is trusting it, and
57
+ that authorizes its recipes to run code on this machine: code sous runs itself and code an
58
+ agent runs, such as skill scripts and hooks. Sous sandboxes neither; trusted code runs
59
+ with the user's own permissions. Before a repository is trusted, nothing from it runs; the
60
+ trust question reads only its index.
61
+
62
+ Subscribing decides what is switched on, not what is safe. A recipe is active when the
63
+ project subscribes to it, directly or through its namespace, or when an active recipe
64
+ lists it under `subscribes`, and only an active recipe registers entry points of its own
65
+ (output files, skills, hooks). A recipe held only through `depends` is a library: an active
66
+ recipe may include, call or import its files, but it registers nothing itself.
67
+
54
68
  ## Sous's Own Documentation
55
69
 
56
70
  Sous's full documentation ships inside the installed package as plain markdown
@@ -11,7 +11,7 @@ formatVersion: 1
11
11
 
12
12
  namespace: core
13
13
  name: sous-skills
14
- version: 0.2.20
14
+ version: 0.2.21
15
15
 
16
16
  description: >-
17
17
  The skills that teach an agent what sous is and how it works: which files sous
@@ -4,9 +4,10 @@
4
4
  * point sous reads to learn what a repo publishes: its namespaces, and where
5
5
  * each recipe folder lives.
6
6
  *
7
- * The manifest is deliberately declarative and executable-free. Trust in the
8
- * Repositories system rests on being able to read a repo's whole surface
9
- * without running any of its code, so manifests are YAML or JSON only.
7
+ * The manifest is deliberately declarative and executable-free: it is data, so
8
+ * sous can read, validate and browse it before the repository is trusted, in a
9
+ * dry run and in `repo release --check` without executing anything. So
10
+ * manifests are YAML or JSON only.
10
11
  */
11
12
 
12
13
  import { z } from "zod";
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Reading Repositories files off disk.
3
3
  *
4
- * Manifests are HAND-WRITTEN, and deliberately never JavaScript: trust in the
5
- * Repositories system rests on being able to read a repo's whole surface
6
- * without executing any of its code. So a manifest is YAML (`.yaml`, `.yml`) or
4
+ * Manifests are HAND-WRITTEN, and deliberately never JavaScript: a manifest is
5
+ * data, so sous can read, validate and browse it without executing anything,
6
+ * including before the repository is trusted. So a manifest is YAML (`.yaml`, `.yml`) or
7
7
  * JSON (`.json`, `.jsonc`), and the JSON dialect is permissive, allowing line
8
8
  * comments, block comments and trailing commas, so a manifest can explain
9
9
  * itself.
@@ -112,7 +112,8 @@ export function loadManifestFile(filePath: string): unknown {
112
112
  throw new ConfigError(
113
113
  `Cannot read the manifest at ${filePath}: '${extension}' is not a manifest format.\n` +
114
114
  ` A manifest is written as ${MANIFEST_EXTENSIONS.join(", ")}. Manifests are never ` +
115
- `JavaScript, because sous must be able to read a repository without running its code.`
115
+ `JavaScript, because a manifest is data that sous reads, validates and browses ` +
116
+ `without executing anything, including before the repository is trusted.`
116
117
  );
117
118
  }
118
119
 
@@ -45,9 +45,9 @@ export function exampleRecipePath(context: ScaffoldContext): string {
45
45
  export function buildRepoManifest(context: ScaffoldContext): string {
46
46
  return `# The repo manifest: what this repository publishes.
47
47
  #
48
- # It is read before anything is downloaded, and it is never executable, so
49
- # anyone deciding whether to trust this repository can read its whole surface
50
- # without running any of its code.
48
+ # It is data, never code: sous reads it before anything is downloaded, so a
49
+ # project can browse and validate what this repository publishes, and decide
50
+ # whether to trust it, without executing anything.
51
51
 
52
52
  formatVersion: 1
53
53