@naturali/cli 0.131.0 → 0.133.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.
Files changed (3) hide show
  1. package/README.md +33 -0
  2. package/dist/index.mjs +839 -11
  3. package/package.json +5 -4
package/README.md CHANGED
@@ -54,9 +54,42 @@ the spec, so you never have to know.
54
54
  | Number / boolean | `--temperature 0.7`, `--force` (a bare flag is `true`) |
55
55
  | Object | `--tool-choice '{"type":"tool","name":"get_weather"}'` |
56
56
  | Array | repeat the flag (`--capabilities a --capabilities b`) or pass a JSON array (`--tool-bindings '[{"tool_id":"tool_a"}]'`) |
57
+ | From a file | `--content @playbook.md` (`@@` sends a literal leading `@`) |
57
58
 
58
59
  An array-typed field is always sent as a list, even with one value.
59
60
 
61
+ ### File values
62
+
63
+ `@path` reads the value from disk. A `.yaml`, `.yml` or `.json` file is parsed,
64
+ and a `{ "file": "..." }` inside it is replaced by that file's contents,
65
+ resolved relative to the document holding the reference:
66
+
67
+ ```yaml
68
+ # naturali/squad.formation.yaml
69
+ resources:
70
+ Playbook:
71
+ type: document
72
+ properties:
73
+ path: /squad/playbook.md
74
+ content:
75
+ file: ../intelligence/playbook.md
76
+ ```
77
+
78
+ ```bash
79
+ naturali validate-formation --project-id proj_V1StGXR8Z5jdHi6B \
80
+ --template @naturali/squad.formation.yaml
81
+ ```
82
+
83
+ That is what lets a formation template declare documents whose text is versioned
84
+ beside it, instead of carrying a pasted copy of each. Any other extension is read
85
+ as text and never parsed, so a markdown file opening with `{` stays a string.
86
+
87
+ Only a lone `{ "file": ... }` is a reference — an object with other keys beside
88
+ it is left alone, so a property genuinely named `file` is not hijacked.
89
+
90
+ A template can read any file you can. Read one you did not write before
91
+ deploying it.
92
+
60
93
  Every path parameter a command needs must be passed explicitly; a command that
61
94
  leaves one out fails and names it rather than guessing.
62
95