pi-outpost 0.35.1 → 0.35.2

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.
@@ -82,7 +82,9 @@ and validates nothing — validation happens where the rendering decision is mad
82
82
  The agent can author these too, guided by [`skills/structured-exchange`](../skills/structured-exchange/SKILL.md).
83
83
  It presents one through the `present_structure` tool, which validates before showing
84
84
  anything and hands back the diagnostics when it refuses, so a document can be corrected
85
- without leaving the exchange.
85
+ without leaving the exchange. When `schema` or `kind` was written inside `data`, the first
86
+ diagnostic says so (`envelope-inside-data`), ahead of the schema's reasons about every form
87
+ `data` could have taken.
86
88
 
87
89
  Some models write the document straight into their reply instead, as a ```` ```json ````
88
90
  block. Such a block is drawn in place, provided it declares the contract's `schema` and
@@ -100,6 +100,14 @@ JSON Schema decides shape. These are the relational rules that follow it, and th
100
100
  Rules prefixed `schema/` come from the JSON Schema itself; the suffix is the keyword
101
101
  that refused it.
102
102
 
103
+ One diagnostic only ever accompanies those. `envelope-inside-data` names a `schema` or
104
+ `kind` written inside `data` instead of beside it, at its path there (`/data/kind`), and
105
+ comes first: without a top-level `schema` a document is judged as version 1, and without
106
+ a top-level `kind` every form `data` can take says why it is not that form, so the fix
107
+ would otherwise be buried under reasons about graphs, sequences and tables nobody sent.
108
+ It is added to a refusal the schema already makes, never decides one, and removes none
109
+ of the other diagnostics.
110
+
103
111
  ## Running it here
104
112
 
105
113
  ```
@@ -11342,6 +11342,17 @@ function declaredSchemaOf(document) {
11342
11342
  if (typeof schema2 !== "string" || !schema2.startsWith(STRUCTURED_EXCHANGE_SCHEMA_PREFIX)) return void 0;
11343
11343
  return schema2;
11344
11344
  }
11345
+ function misplacedEnvelopeIssues(document) {
11346
+ if (typeof document !== "object" || document === null || Array.isArray(document)) return [];
11347
+ const envelope = document;
11348
+ const data = envelope.data;
11349
+ if (typeof data !== "object" || data === null || Array.isArray(data)) return [];
11350
+ return ["schema", "kind"].filter((field) => envelope[field] === void 0 && data[field] !== void 0).map((field) => ({
11351
+ rule: "envelope-inside-data",
11352
+ path: `/data/${field}`,
11353
+ message: `"${field}" belongs beside "data", at the top of the document, not inside it`
11354
+ }));
11355
+ }
11345
11356
 
11346
11357
  // shared/src/structuredExchangeSchemaNode.ts
11347
11358
  function unwrapSchemaModule(module) {
@@ -11491,7 +11502,7 @@ var checkStructuredExchangeSchema = (document) => {
11491
11502
  })()
11492
11503
  });
11493
11504
  }
11494
- return issues.sort((left, right) => right.path.split("/").length - left.path.split("/").length);
11505
+ return [...misplacedEnvelopeIssues(document), ...issues.sort((left, right) => right.path.split("/").length - left.path.split("/").length)];
11495
11506
  };
11496
11507
 
11497
11508
  // shared/src/structuredExchangeProfile.ts
@@ -14177,7 +14188,7 @@ function rulePatterns(profile, rules, sources) {
14177
14188
  }
14178
14189
 
14179
14190
  // shared/bin/validate-structured-exchange.mjs
14180
- var VERSION = `validate-structured-exchange ${false ? "development" : "0.35.1"}`;
14191
+ var VERSION = `validate-structured-exchange ${false ? "development" : "0.35.2"}`;
14181
14192
  var USAGE = `validate-structured-exchange [file]
14182
14193
  validate-structured-exchange --profile <profile.json> [file]
14183
14194
  validate-structured-exchange --check-profile <profile.json>
@@ -161494,6 +161494,17 @@ function declaredSchemaOf(document4) {
161494
161494
  if (typeof schema2 !== "string" || !schema2.startsWith(STRUCTURED_EXCHANGE_SCHEMA_PREFIX)) return void 0;
161495
161495
  return schema2;
161496
161496
  }
161497
+ function misplacedEnvelopeIssues(document4) {
161498
+ if (typeof document4 !== "object" || document4 === null || Array.isArray(document4)) return [];
161499
+ const envelope = document4;
161500
+ const data = envelope.data;
161501
+ if (typeof data !== "object" || data === null || Array.isArray(data)) return [];
161502
+ return ["schema", "kind"].filter((field) => envelope[field] === void 0 && data[field] !== void 0).map((field) => ({
161503
+ rule: "envelope-inside-data",
161504
+ path: `/data/${field}`,
161505
+ message: `"${field}" belongs beside "data", at the top of the document, not inside it`
161506
+ }));
161507
+ }
161497
161508
  function readStructuredExchangeDocument(serialized, checkSchema, limits) {
161498
161509
  const tooLarge = checkDocumentBytes(serialized, limits);
161499
161510
  if (tooLarge !== void 0) return { status: "too-large", issue: tooLarge };
@@ -172468,7 +172479,7 @@ var checkStructuredExchangeSchema = (document4) => {
172468
172479
  })()
172469
172480
  });
172470
172481
  }
172471
- return issues.sort((left, right) => right.path.split("/").length - left.path.split("/").length);
172482
+ return [...misplacedEnvelopeIssues(document4), ...issues.sort((left, right) => right.path.split("/").length - left.path.split("/").length)];
172472
172483
  };
172473
172484
 
172474
172485
  // ../shared/src/structuredExchangeProfile.ts
@@ -112538,6 +112538,17 @@ function declaredSchemaOf(document4) {
112538
112538
  if (typeof schema2 !== "string" || !schema2.startsWith(STRUCTURED_EXCHANGE_SCHEMA_PREFIX)) return void 0;
112539
112539
  return schema2;
112540
112540
  }
112541
+ function misplacedEnvelopeIssues(document4) {
112542
+ if (typeof document4 !== "object" || document4 === null || Array.isArray(document4)) return [];
112543
+ const envelope = document4;
112544
+ const data = envelope.data;
112545
+ if (typeof data !== "object" || data === null || Array.isArray(data)) return [];
112546
+ return ["schema", "kind"].filter((field) => envelope[field] === void 0 && data[field] !== void 0).map((field) => ({
112547
+ rule: "envelope-inside-data",
112548
+ path: `/data/${field}`,
112549
+ message: `"${field}" belongs beside "data", at the top of the document, not inside it`
112550
+ }));
112551
+ }
112541
112552
  function readStructuredExchangeDocument(serialized, checkSchema, limits) {
112542
112553
  const tooLarge = checkDocumentBytes(serialized, limits);
112543
112554
  if (tooLarge !== void 0) return { status: "too-large", issue: tooLarge };
@@ -124020,7 +124031,7 @@ var checkStructuredExchangeSchema = (document4) => {
124020
124031
  })()
124021
124032
  });
124022
124033
  }
124023
- return issues.sort((left, right) => right.path.split("/").length - left.path.split("/").length);
124034
+ return [...misplacedEnvelopeIssues(document4), ...issues.sort((left, right) => right.path.split("/").length - left.path.split("/").length)];
124024
124035
  };
124025
124036
 
124026
124037
  // ../shared/src/workPlan.ts
@@ -205290,7 +205301,7 @@ function cacheControlFor(url) {
205290
205301
  }
205291
205302
 
205292
205303
  // ../server/src/index.ts
205293
- var VERSION2 = true ? "0.35.1" : "dev";
205304
+ var VERSION2 = true ? "0.35.2" : "dev";
205294
205305
  var PI_SDK_VERSION = true ? "1.0.4" : readInstalledPiSdkVersion();
205295
205306
  var LAUNCH_DIR = process.env.INIT_CWD ?? process.cwd();
205296
205307
  function complain(error) {
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/pi-outpost.sea.mjs
3
- size: 38404136 bytes
4
- sha256: 9ee41a937192d3cbbc43ee85135d397773f2272aef8619b774181398648f9cc7
3
+ size: 38404753 bytes
4
+ sha256: 2c2dfc30faf8092bf5453e65dc2bf4a769cf2275c9350dccb0004e4991fe6f13
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/sea-prep.blob
3
- size: 38403174 bytes
4
- sha256: 1fd9c5d922bce399234ab80e440bef7297ac69946b15f0affb3e586bef54a8c7
3
+ size: 38403791 bytes
4
+ sha256: 7cedacccf7d1df21f7087c5c6ce32f1d5ac0c77098b9a7d58ac1b91a70abbe1d
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-outpost",
3
- "version": "0.35.1",
3
+ "version": "0.35.2",
4
4
  "type": "module",
5
5
  "description": "A web interface for the pi coding agent: a browser chat UI you run with npx — no clone, no build.",
6
6
  "license": "MIT",