siteplane 0.1.54 → 0.1.56

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # siteplane
2
2
 
3
- **Unreleased image-policy preparation:** When the scan includes image fields, `withSiteplane` prepares
3
+ **Image-policy preparation:** When the scan includes image fields, `withSiteplane` prepares
4
4
  Next Image and existing Next-config CSP headers for Siteplane's image route and your website's
5
5
  `/siteplane-assets/` path. Existing image sources stay in place. Local builds require the same public HTTPS
6
6
  `SITEPLANE_SITE_ORIGIN` supplied by `setup deploy`. Custom loaders and explicit redirect settings need
@@ -19,7 +19,7 @@ they choose **Open review** in their own browser. Do not consume the link on the
19
19
  Issue a fresh link only when needed. The URL fragment is a short-lived credential, so do not
20
20
  write it to source, documentation, analytics or shared logs. Guest review can organize and finish
21
21
  the setup; activation and account ownership require the later claim step. This entry remains
22
- controlled while Batch 3 is being completed.
22
+ controlled by the existing beta and launch gates.
23
23
 
24
24
  ### Controlled claim confirmation
25
25
 
@@ -88,24 +88,27 @@ preserves the Site, Run, runtime key, revalidation generation, selected fields a
88
88
  Completed setup credentials remain closed. Known package/workspace/provider conflicts are diagnosed before
89
89
  writes; support ranges do not trigger automatic framework or package-manager upgrades.
90
90
 
91
- ## Controlled accountless start
91
+ ## Accountless start
92
92
 
93
- The T8 candidate includes `setup start`; the hosted endpoint is closed by default until Batch 3 acceptance.
94
- Use only the exact candidate version provided for an enabled environment and an explicit user request:
93
+ Use `setup start` for an explicit user request to integrate a website before creating an account.
94
+ Save the user's exact editing instructions in a text file and pass `--instructions-file`; inline
95
+ `--instructions` is not supported. Omit the file only when the user asks the agent to choose.
95
96
 
96
97
  Before starting, add `.siteplane/credentials.json` to the repository’s `.gitignore`. Start rejects tracked or
97
98
  unprotected credentials before any provisioning request.
98
99
 
99
100
  ```bash
100
- npx -y siteplane@0.1.51 setup start --modules editing --instructions-file instructions.txt
101
- npx -y siteplane@0.1.51 setup context
101
+ npx -y siteplane@0.1.55 setup start --modules editing --instructions-file instructions.txt
102
+ npx -y siteplane@0.1.55 setup context
102
103
  ```
103
104
 
104
105
  Start performs read-only preflight and saves the installation key and original request privately before the
105
106
  first provisioning call. Select `editing,analytics` only when explicitly requested. Retry in the same directory
106
107
  with the same request after interruption; configuration without credentials produces a diagnosis, never a silent
107
- replacement project. The returned task carries the provisional assignment and deadline. Guest review and claim
108
- remain later Batch 3 work; this entry grants no publication or measurement activation.
108
+ replacement project. The returned task carries the provisional assignment and deadline. After verification,
109
+ `setup review` opens the saved guest review. The user can create an account or sign in from that review;
110
+ inspect and confirm only their concrete claim request in this repository. Claim preserves the review and
111
+ returns it to the owner's account; it does not activate editing or analytics.
109
112
 
110
113
  ## Approved fields
111
114
 
@@ -1409,9 +1409,17 @@ var editorSectionSchema = z16.object({
1409
1409
  });
1410
1410
  var editorRouteSchema = z16.object({
1411
1411
  routeKey: siteFieldRouteKeySchema,
1412
+ previewPath: z16.string().trim().refine((path) => path.startsWith("/") && !path.startsWith("//") && !/[\\\[\]?#\s]/u.test(path) && (path === "/" || !path.endsWith("/")), "previewPath must be a concrete same-site path, for example /services/consultation.").optional(),
1412
1413
  label: z16.string().trim().min(1),
1413
1414
  sections: z16.array(editorSectionSchema).min(1)
1414
1415
  }).strict().superRefine((route, context) => {
1416
+ if (route.routeKey.includes("[") && !route.previewPath) {
1417
+ context.addIssue({
1418
+ code: "custom",
1419
+ path: ["previewPath"],
1420
+ message: "Dynamic editor routes need a previewPath for an existing page; keep the canonical routeKey unchanged."
1421
+ });
1422
+ }
1415
1423
  const sections = /* @__PURE__ */ new Set();
1416
1424
  for (const [index, section] of route.sections.entries()) {
1417
1425
  if (sections.has(section.label)) {
@@ -4352,6 +4360,14 @@ function scanNextSourceFilesToSiteFieldContract(files, options) {
4352
4360
  const fields = [];
4353
4361
  for (const field of uniqueFields(scan.fields)) {
4354
4362
  const routeKey = field.technicalRouteKey ?? field.routeHint;
4363
+ if (routeKey === "/*") {
4364
+ scan.warnings.push({
4365
+ code: "field_scan.global_route_key_invalid",
4366
+ message: `Field ${field.fieldId} uses /* as its routeKey. Use $global in both the value call and DOM attrs for content shared across routes; /* cannot produce matching editor evidence. This affects the editor integration, not the website build.`,
4367
+ fieldId: field.fieldId,
4368
+ filePath: field.sourceFilePath ?? "unknown"
4369
+ });
4370
+ }
4355
4371
  if (!routeKey) {
4356
4372
  scan.hardErrors.push({
4357
4373
  code: "field_scan.route_key_missing",
@@ -6592,6 +6608,17 @@ async function runSetupCommand(args, dependencies) {
6592
6608
  dependencies.env
6593
6609
  );
6594
6610
  if (area === "start") {
6611
+ const usage = "Usage: siteplane setup start [--modules editing,analytics] [--instructions-file <path>] [--api-base-url <url>]";
6612
+ if (areaArgs.includes("--help") || areaArgs.includes("-h")) {
6613
+ dependencies.stdout(usage);
6614
+ dependencies.stdout("Save the user's exact editing instructions in a text file and pass --instructions-file. Omit it only when the user asks the agent to choose.");
6615
+ return { exitCode: 0 };
6616
+ }
6617
+ const options = /* @__PURE__ */ new Set(["--modules", "--instructions-file", "--api-base-url"]);
6618
+ for (let index = 0; index < areaArgs.length; index += 2) {
6619
+ if (!options.has(areaArgs[index]) || !areaArgs[index + 1] || areaArgs[index + 1].startsWith("--"))
6620
+ throw new Error(`Invalid setup start option. ${usage}. User instructions require --instructions-file.`);
6621
+ }
6595
6622
  const instructionsFile = readOption(areaArgs, "--instructions-file");
6596
6623
  const modules = readOption(areaArgs, "--modules");
6597
6624
  const result2 = await dependencies.commands.setupStartCommand({
package/dist/index.js CHANGED
@@ -1137,9 +1137,17 @@ var editorSectionSchema = z16.object({
1137
1137
  });
1138
1138
  var editorRouteSchema = z16.object({
1139
1139
  routeKey: siteFieldRouteKeySchema,
1140
+ previewPath: z16.string().trim().refine((path) => path.startsWith("/") && !path.startsWith("//") && !/[\\\[\]?#\s]/u.test(path) && (path === "/" || !path.endsWith("/")), "previewPath must be a concrete same-site path, for example /services/consultation.").optional(),
1140
1141
  label: z16.string().trim().min(1),
1141
1142
  sections: z16.array(editorSectionSchema).min(1)
1142
1143
  }).strict().superRefine((route, context) => {
1144
+ if (route.routeKey.includes("[") && !route.previewPath) {
1145
+ context.addIssue({
1146
+ code: "custom",
1147
+ path: ["previewPath"],
1148
+ message: "Dynamic editor routes need a previewPath for an existing page; keep the canonical routeKey unchanged."
1149
+ });
1150
+ }
1143
1151
  const sections = /* @__PURE__ */ new Set();
1144
1152
  for (const [index, section] of route.sections.entries()) {
1145
1153
  if (sections.has(section.label)) {
package/dist/next.js CHANGED
@@ -1340,9 +1340,17 @@ var editorSectionSchema = z16.object({
1340
1340
  });
1341
1341
  var editorRouteSchema = z16.object({
1342
1342
  routeKey: siteFieldRouteKeySchema,
1343
+ previewPath: z16.string().trim().refine((path) => path.startsWith("/") && !path.startsWith("//") && !/[\\\[\]?#\s]/u.test(path) && (path === "/" || !path.endsWith("/")), "previewPath must be a concrete same-site path, for example /services/consultation.").optional(),
1343
1344
  label: z16.string().trim().min(1),
1344
1345
  sections: z16.array(editorSectionSchema).min(1)
1345
1346
  }).strict().superRefine((route, context) => {
1347
+ if (route.routeKey.includes("[") && !route.previewPath) {
1348
+ context.addIssue({
1349
+ code: "custom",
1350
+ path: ["previewPath"],
1351
+ message: "Dynamic editor routes need a previewPath for an existing page; keep the canonical routeKey unchanged."
1352
+ });
1353
+ }
1346
1354
  const sections = /* @__PURE__ */ new Set();
1347
1355
  for (const [index, section] of route.sections.entries()) {
1348
1356
  if (sections.has(section.label)) {
@@ -3086,6 +3094,14 @@ function scanNextSourceFilesToSiteFieldContract(files, options) {
3086
3094
  const fields = [];
3087
3095
  for (const field of uniqueFields(scan.fields)) {
3088
3096
  const routeKey = field.technicalRouteKey ?? field.routeHint;
3097
+ if (routeKey === "/*") {
3098
+ scan.warnings.push({
3099
+ code: "field_scan.global_route_key_invalid",
3100
+ message: `Field ${field.fieldId} uses /* as its routeKey. Use $global in both the value call and DOM attrs for content shared across routes; /* cannot produce matching editor evidence. This affects the editor integration, not the website build.`,
3101
+ fieldId: field.fieldId,
3102
+ filePath: field.sourceFilePath ?? "unknown"
3103
+ });
3104
+ }
3089
3105
  if (!routeKey) {
3090
3106
  scan.hardErrors.push({
3091
3107
  code: "field_scan.route_key_missing",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "siteplane",
3
3
  "private": false,
4
- "version": "0.1.54",
4
+ "version": "0.1.56",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "publishConfig": {