@cratis/pi 7.131.2 → 7.131.4

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.
@@ -42,23 +42,28 @@ parser_failed() {
42
42
 
43
43
  # One jq call reads every field the guard uses. Fields are NUL-terminated (embedded NULs are dropped,
44
44
  # as a command substitution would drop them); a missing, null or false path is empty.
45
- cwd="" file="" notebook="" new_content="" new_string=""
45
+ # The process substitution's exit status does not reach the reading group, and Bash 3.2 (macOS /bin/bash)
46
+ # cannot wait on its PID, so a sentinel field is written only after jq succeeds.
47
+ cwd="" file="" notebook="" new_content="" new_string="" parser_status=""
46
48
  {
47
49
  IFS= read -r -d '' cwd
48
50
  IFS= read -r -d '' file
49
51
  IFS= read -r -d '' notebook
50
52
  IFS= read -r -d '' new_content
51
53
  IFS= read -r -d '' new_string
52
- } < <(jq -j '
54
+ IFS= read -r -d '' parser_status
55
+ } < <(jq -j -s '
53
56
  def field(path): ([try (path // empty) catch empty] | first // "")
54
57
  | if type == "string" then . else tojson end
55
58
  | gsub("\u0000"; "");
56
- [field(.cwd), field(.tool_input.file_path), field(.tool_input.notebook_path),
59
+ # Slurping parses the whole input before any output, and exactly one document is accepted,
60
+ # so no field from a later document can stand in for the sentinel.
61
+ if length == 1 then .[0] else error("expected one JSON document") end
62
+ | [field(.cwd), field(.tool_input.file_path), field(.tool_input.notebook_path),
57
63
  field(.tool_input.content), field(.tool_input.new_string)]
58
64
  | .[] | ., "\u0000"
59
- ' <<<"$input" 2>/dev/null) || parser_failed
60
- # Process substitutions do not propagate their exit status to the reading group.
61
- wait "$!" || parser_failed
65
+ ' <<<"$input" 2>/dev/null && printf 'ok\0') || parser_failed
66
+ [ "$parser_status" = "ok" ] || parser_failed
62
67
  # Command substitution stripped trailing newlines from each field; keep that behaviour.
63
68
  for field_name in cwd file notebook new_content new_string; do
64
69
  while [[ "${!field_name}" == *$'\n' ]]; do printf -v "$field_name" '%s' "${!field_name%$'\n'}"; done
@@ -29,7 +29,7 @@ existing applications; it does not float dependencies in an already rendered app
29
29
  | Chronicle image | The compose file runs the `cratis/chronicle` development image matching the pinned client |
30
30
  | Embedded reverse extraction | `CratisEmbeddedScreenplayEnabled=false`: the source `.play` is authoritative |
31
31
  | Test packages | Cratis specifications, xunit and test SDK; **Debug configuration only** (`IsTestProject` when Debug) |
32
- | Package management | central package management **off**; `Directory.Packages.props` is managed, do not edit it |
32
+ | Package management | central package management and transitive pinning **on** in `Directory.Packages.props` (Stage 4.197.0 and later scaffolds); older inline-spec scaffolds turn it off |
33
33
 
34
34
  The Scene family in the frontend is six packages: `@cratis/scene.blueprint.default`,
35
35
  `@cratis/scene.components`, `@cratis/scene.engine`, `@cratis/scene.model`,
@@ -47,9 +47,19 @@ active unit of work. Requires Stage 4.138.0 for Cratis C# rendering of admitted
47
47
  `.play` protected reads as Arc read protection; older renderers refuse them with
48
48
  `STAGE-ESM-044`, as do shapes the renderer cannot preserve. Semantic Host/executor
49
49
  support is separate from generated-application protection.
50
- Hand-written scope that needs a newer dependency can raise its version through
51
- `Customizations/Dependencies.props` (explicit `Version`, imported last; central management
52
- is off), but any override must be proven with a restore and build. The compose file binds local ports `27017` and
50
+ Hand-written scope that needs another or newer backend package adds it through
51
+ `Customizations/Dependencies.props`, which is imported last. Read the existing
52
+ `Directory.Packages.props` first:
53
+
54
+ - With central package management on (`ManagePackageVersionsCentrally` is `true`), use an
55
+ unversioned `PackageReference` with a matching central `PackageVersion`, or keep the pin
56
+ inside the import with `VersionOverride`. `Version` on a `PackageReference` fails restore.
57
+ Add or change a `PackageVersion` only when the manifest does not record
58
+ `Directory.Packages.props` as Stage-managed; otherwise use `VersionOverride`.
59
+ - With central package management off (older inline-spec scaffolds), the reference needs an
60
+ explicit `Version`.
61
+
62
+ Either way, prove the change with a restore and build. The compose file binds local ports `27017` and
53
63
  `35000`, keeps data in the named volumes `chronicle-data` and `chronicle-config`, and
54
64
  `docker compose down --volumes` is the only thing that deletes them.
55
65
 
@@ -191,7 +201,9 @@ Every file is optional. Rules that bite:
191
201
  service wins, so do not re-register Cratis types unless you mean to replace them.
192
202
  - Configuration comes from environment variables or other sources, not from
193
203
  `appsettings.json` (managed). Keep secrets out of files under `Customizations/`.
194
- - A `PackageReference` in `Dependencies.props` needs an explicit `Version`.
204
+ - A `PackageReference` in `Dependencies.props` follows `Directory.Packages.props`: under
205
+ central package management, no `Version` (a matching central `PackageVersion`, or
206
+ `VersionOverride`); only scaffolds that turn central management off take `Version`.
195
207
  - Endpoints sit under `/api` (the Vite dev server proxies it) on a path that cannot collide
196
208
  with a route Arc generates.
197
209
  - `package.json` is managed, so `styles.css` cannot add npm dependencies. Restart the dev
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.131.2",
3
+ "version": "7.131.4",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [