@dreamboard-games/cli 0.1.30-alpha.17 → 0.1.30-alpha.18

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 (80) hide show
  1. package/README.md +3 -1
  2. package/dist/agent-verifier/agent-workspace-verifier.mjs +12 -12
  3. package/dist/agent-verifier/{chunk-LKQ557TJ.mjs → chunk-334H4LE4.mjs} +3 -3
  4. package/dist/agent-verifier/{chunk-H3XNWKJU.mjs → chunk-7LFDFXLS.mjs} +2 -2
  5. package/dist/agent-verifier/{chunk-DWLTCUUX.mjs → chunk-7MAOGFFP.mjs} +6 -6
  6. package/dist/agent-verifier/{chunk-CO3BRUD6.mjs → chunk-AG5J3SMN.mjs} +11 -3
  7. package/dist/agent-verifier/chunk-AG5J3SMN.mjs.map +1 -0
  8. package/dist/agent-verifier/{chunk-AXXUGU7Q.mjs → chunk-AQ6UQHPT.mjs} +4 -30
  9. package/dist/agent-verifier/chunk-AQ6UQHPT.mjs.map +1 -0
  10. package/dist/agent-verifier/{chunk-A67WUYN2.mjs → chunk-B42OHJNY.mjs} +3 -3
  11. package/dist/agent-verifier/{chunk-V6AQDR7W.mjs → chunk-HUBV22JQ.mjs} +3 -3
  12. package/dist/agent-verifier/chunk-HUBV22JQ.mjs.map +1 -0
  13. package/dist/agent-verifier/{chunk-5GCZZ6NW.mjs → chunk-JB7VXCMB.mjs} +2 -2
  14. package/dist/agent-verifier/{chunk-WAFBU5U7.mjs → chunk-OJFZVGEL.mjs} +38 -13
  15. package/dist/agent-verifier/chunk-OJFZVGEL.mjs.map +1 -0
  16. package/dist/agent-verifier/{chunk-G2ECODRB.mjs → chunk-PLXXH5LY.mjs} +2 -2
  17. package/dist/agent-verifier/{chunk-S4ZQSUPB.mjs → chunk-PWPOLHTW.mjs} +8 -11
  18. package/dist/agent-verifier/chunk-PWPOLHTW.mjs.map +1 -0
  19. package/dist/agent-verifier/{chunk-DPYC2NDB.mjs → chunk-RCYO6HWW.mjs} +2 -2
  20. package/dist/agent-verifier/{chunk-NFL3Z4Z7.mjs → chunk-RP7ZWFVH.mjs} +12 -8
  21. package/dist/agent-verifier/{chunk-NFL3Z4Z7.mjs.map → chunk-RP7ZWFVH.mjs.map} +1 -1
  22. package/dist/agent-verifier/{compile-SDQ25N7K.mjs → compile-VOBO2I6D.mjs} +12 -12
  23. package/dist/agent-verifier/{global-config-6UGFPLDA.mjs → global-config-L7PLLUK5.mjs} +3 -3
  24. package/dist/agent-verifier/{keychain-backend-BQLW5VEC.mjs → keychain-backend-UF3Z26JM.mjs} +1 -1
  25. package/dist/agent-verifier/keychain-backend-UF3Z26JM.mjs.map +1 -0
  26. package/dist/agent-verifier/{local-files-WPHUV6GU.mjs → local-files-DAFIR7SN.mjs} +4 -4
  27. package/dist/agent-verifier/{materialize-workspace-ENPMB66P.mjs → materialize-workspace-PAC75NSP.mjs} +6 -6
  28. package/dist/agent-verifier/{reducer-native-test-harness-GY2CCQWN.mjs → reducer-native-test-harness-HSXRUGOR.mjs} +8 -8
  29. package/dist/agent-verifier/{static-scaffold-K52P52SV.mjs → static-scaffold-KSOTKJNQ.mjs} +4 -4
  30. package/dist/agent-verifier/{sync-JSATJXVJ.mjs → sync-MQJJEZAA.mjs} +13 -13
  31. package/dist/agent-verifier/{test-LQAGEQLY.mjs → test-R6HC6CYZ.mjs} +11 -11
  32. package/dist/agent-verifier/{workspace-codegen-4IWICKLB.mjs → workspace-codegen-SPPVHURX.mjs} +3 -3
  33. package/dist/authoring-compatibility-internal.js +1 -1
  34. package/dist/{chunk-ITT6Y7MM.js → chunk-2WB3DYW4.js} +17 -8
  35. package/dist/chunk-2WB3DYW4.js.map +1 -0
  36. package/dist/{chunk-LWJUF42S.js → chunk-2XMBZPL5.js} +44 -22
  37. package/dist/{chunk-LWJUF42S.js.map → chunk-2XMBZPL5.js.map} +1 -1
  38. package/dist/{chunk-AVOAT522.js → chunk-J3CWZHY7.js} +4 -30
  39. package/dist/chunk-J3CWZHY7.js.map +1 -0
  40. package/dist/{global-config-NLGAFSRU.js → global-config-VQWFTIAV.js} +2 -2
  41. package/dist/index.js +5 -5
  42. package/dist/internal.js +3 -3
  43. package/dist/{keychain-backend-47LZ5IX5.js → keychain-backend-GO34KGTG.js} +1 -1
  44. package/dist/keychain-backend-GO34KGTG.js.map +1 -0
  45. package/package.json +1 -1
  46. package/release/authoring-release-set.json +3 -3
  47. package/skills/dreamboard/SKILL.md +8 -0
  48. package/skills/dreamboard/references/building-your-first-game.md +37 -15
  49. package/skills/dreamboard/references/canonical-concepts.md +74 -0
  50. package/skills/dreamboard/references/game-interface.md +15 -2
  51. package/skills/dreamboard/references/manifest-authoring.md +8 -0
  52. package/skills/dreamboard/references/reducer.md +47 -2
  53. package/skills/dreamboard/references/rule-authoring.md +10 -0
  54. package/skills/dreamboard/references/testing.md +7 -3
  55. package/dist/agent-verifier/chunk-AXXUGU7Q.mjs.map +0 -1
  56. package/dist/agent-verifier/chunk-CO3BRUD6.mjs.map +0 -1
  57. package/dist/agent-verifier/chunk-S4ZQSUPB.mjs.map +0 -1
  58. package/dist/agent-verifier/chunk-V6AQDR7W.mjs.map +0 -1
  59. package/dist/agent-verifier/chunk-WAFBU5U7.mjs.map +0 -1
  60. package/dist/agent-verifier/keychain-backend-BQLW5VEC.mjs.map +0 -1
  61. package/dist/chunk-AVOAT522.js.map +0 -1
  62. package/dist/chunk-ITT6Y7MM.js.map +0 -1
  63. package/dist/keychain-backend-47LZ5IX5.js.map +0 -1
  64. /package/dist/agent-verifier/{chunk-LKQ557TJ.mjs.map → chunk-334H4LE4.mjs.map} +0 -0
  65. /package/dist/agent-verifier/{chunk-H3XNWKJU.mjs.map → chunk-7LFDFXLS.mjs.map} +0 -0
  66. /package/dist/agent-verifier/{chunk-DWLTCUUX.mjs.map → chunk-7MAOGFFP.mjs.map} +0 -0
  67. /package/dist/agent-verifier/{chunk-A67WUYN2.mjs.map → chunk-B42OHJNY.mjs.map} +0 -0
  68. /package/dist/agent-verifier/{chunk-5GCZZ6NW.mjs.map → chunk-JB7VXCMB.mjs.map} +0 -0
  69. /package/dist/agent-verifier/{chunk-G2ECODRB.mjs.map → chunk-PLXXH5LY.mjs.map} +0 -0
  70. /package/dist/agent-verifier/{chunk-DPYC2NDB.mjs.map → chunk-RCYO6HWW.mjs.map} +0 -0
  71. /package/dist/agent-verifier/{compile-SDQ25N7K.mjs.map → compile-VOBO2I6D.mjs.map} +0 -0
  72. /package/dist/agent-verifier/{global-config-6UGFPLDA.mjs.map → global-config-L7PLLUK5.mjs.map} +0 -0
  73. /package/dist/agent-verifier/{local-files-WPHUV6GU.mjs.map → local-files-DAFIR7SN.mjs.map} +0 -0
  74. /package/dist/agent-verifier/{materialize-workspace-ENPMB66P.mjs.map → materialize-workspace-PAC75NSP.mjs.map} +0 -0
  75. /package/dist/agent-verifier/{reducer-native-test-harness-GY2CCQWN.mjs.map → reducer-native-test-harness-HSXRUGOR.mjs.map} +0 -0
  76. /package/dist/agent-verifier/{static-scaffold-K52P52SV.mjs.map → static-scaffold-KSOTKJNQ.mjs.map} +0 -0
  77. /package/dist/agent-verifier/{sync-JSATJXVJ.mjs.map → sync-MQJJEZAA.mjs.map} +0 -0
  78. /package/dist/agent-verifier/{test-LQAGEQLY.mjs.map → test-R6HC6CYZ.mjs.map} +0 -0
  79. /package/dist/agent-verifier/{workspace-codegen-4IWICKLB.mjs.map → workspace-codegen-SPPVHURX.mjs.map} +0 -0
  80. /package/dist/{global-config-NLGAFSRU.js.map → global-config-VQWFTIAV.js.map} +0 -0
@@ -17897,8 +17897,19 @@ function isValidGeneratedPath(relativePath) {
17897
17897
  }
17898
17898
  return !relativePath.split("/").some((segment) => segment.length === 0 || segment === "." || segment === "..");
17899
17899
  }
17900
+ var ALLOWED_GENERATED_PREFIXES = [
17901
+ "app/",
17902
+ "shared/",
17903
+ "test/generated/",
17904
+ "ui/"
17905
+ ];
17906
+ function isAllowedGeneratedPath(relativePath) {
17907
+ return ALLOWED_GENERATED_PREFIXES.some(
17908
+ (prefix) => relativePath.startsWith(prefix)
17909
+ );
17910
+ }
17900
17911
  function assertGeneratedPath(pathValue, label) {
17901
- if (typeof pathValue !== "string" || !isValidGeneratedPath(pathValue)) {
17912
+ if (typeof pathValue !== "string" || !isValidGeneratedPath(pathValue) || !isAllowedGeneratedPath(pathValue)) {
17902
17913
  throw new ProjectAuthoringError(
17903
17914
  "GENERATED_PATH_CONTRACT_INVALID",
17904
17915
  `${label} must be a normalized relative workspace path.`
@@ -18000,9 +18011,23 @@ function validateProjectAuthoringAdapter(adapter) {
18000
18011
  }
18001
18012
  seen.add(normalized);
18002
18013
  }
18014
+ if (adapter.generatedPathPatterns !== void 0 && !Array.isArray(adapter.generatedPathPatterns)) {
18015
+ throw new ProjectAuthoringError(
18016
+ "GENERATED_PATH_CONTRACT_INVALID",
18017
+ "SDK authoring adapter generatedPathPatterns must be an array."
18018
+ );
18019
+ }
18020
+ for (const [index, pattern] of (adapter.generatedPathPatterns ?? []).entries()) {
18021
+ if (!isRecord(pattern) || typeof pattern.prefix !== "string" || typeof pattern.suffix !== "string" || !isValidGeneratedPath(`${pattern.prefix}placeholder${pattern.suffix}`) || !isAllowedGeneratedPath(`${pattern.prefix}placeholder${pattern.suffix}`)) {
18022
+ throw new ProjectAuthoringError(
18023
+ "GENERATED_PATH_CONTRACT_INVALID",
18024
+ `generatedPathPatterns[${index}] must describe a normalized allowlisted workspace path.`
18025
+ );
18026
+ }
18027
+ }
18003
18028
  return adapter;
18004
18029
  }
18005
- function validateGeneratedArtifacts(artifacts) {
18030
+ function validateGeneratedArtifacts(adapter, artifacts) {
18006
18031
  const seen = /* @__PURE__ */ new Set();
18007
18032
  const validated = artifacts.map(assertGeneratedArtifact);
18008
18033
  for (const artifact of validated) {
@@ -18012,6 +18037,15 @@ function validateGeneratedArtifacts(artifacts) {
18012
18037
  `Generated artifact path '${artifact.path}' was emitted more than once.`
18013
18038
  );
18014
18039
  }
18040
+ const declared = adapter.generatedPaths.includes(artifact.path) || (adapter.generatedPathPatterns ?? []).some(
18041
+ (pattern) => artifact.path.startsWith(pattern.prefix) && artifact.path.endsWith(pattern.suffix) && artifact.path.length > pattern.prefix.length + pattern.suffix.length
18042
+ );
18043
+ if (!declared) {
18044
+ throw new ProjectAuthoringError(
18045
+ "GENERATED_PATH_CONTRACT_INVALID",
18046
+ `Generated artifact path '${artifact.path}' is not declared by the SDK authoring adapter.`
18047
+ );
18048
+ }
18015
18049
  seen.add(artifact.path);
18016
18050
  }
18017
18051
  return validated;
@@ -18040,12 +18074,6 @@ function assertResolvedInsidePackage(options) {
18040
18074
  );
18041
18075
  }
18042
18076
  }
18043
- function isAuthoringMetadataVersionCompatible(options) {
18044
- if (options.metadataVersion === options.packageVersion) {
18045
- return true;
18046
- }
18047
- return options.packageVersion.startsWith(`${options.metadataVersion}-local.`);
18048
- }
18049
18077
  function isRecord2(value) {
18050
18078
  return typeof value === "object" && value !== null && !Array.isArray(value);
18051
18079
  }
@@ -18150,10 +18178,7 @@ async function loadProjectAuthoringAdapter(projectRoot) {
18150
18178
  const adapter = validateProjectAuthoringAdapter(
18151
18179
  moduleRecord.projectAuthoringAdapter ?? moduleRecord.default
18152
18180
  );
18153
- if (!isAuthoringMetadataVersionCompatible({
18154
- metadataVersion: adapter.metadata.sdkVersion,
18155
- packageVersion: packageJson.version
18156
- })) {
18181
+ if (adapter.metadata.sdkVersion !== packageJson.version) {
18157
18182
  throw new ProjectAuthoringError(
18158
18183
  "SDK_METADATA_MISMATCH",
18159
18184
  `SDK authoring adapter reports version ${adapter.metadata.sdkVersion}, but package metadata is ${packageJson.version}.`
@@ -18678,7 +18703,7 @@ function isFrameworkOwnedSetupProfilesSeed(content) {
18678
18703
  async function applyWorkspaceCodegen(options) {
18679
18704
  const { projectRoot, manifest } = options;
18680
18705
  const { adapter } = await loadProjectAuthoringAdapter(projectRoot);
18681
- const artifacts = validateGeneratedArtifacts([
18706
+ const artifacts = validateGeneratedArtifacts(adapter, [
18682
18707
  ...adapter.generateWorkspaceArtifacts(manifest),
18683
18708
  ...adapter.generateTestArtifacts({ manifest })
18684
18709
  ]);
@@ -18970,7 +18995,7 @@ var AUTHORING_RELEASE_SET = {
18970
18995
  "packages": {
18971
18996
  "cli": {
18972
18997
  "name": "@dreamboard-games/cli",
18973
- "version": "0.1.30-alpha.17"
18998
+ "version": "0.1.30-alpha.18"
18974
18999
  },
18975
19000
  "sdk": {
18976
19001
  "name": "@dreamboard-games/sdk",
@@ -18982,7 +19007,7 @@ var AUTHORING_RELEASE_SET = {
18982
19007
  },
18983
19008
  "devHost": {
18984
19009
  "name": "@dreamboard-games/dev-host",
18985
- "version": "0.1.30-alpha.17"
19010
+ "version": "0.1.30-alpha.18"
18986
19011
  }
18987
19012
  },
18988
19013
  "protocols": {
@@ -19000,7 +19025,7 @@ var AUTHORING_RELEASE_SET = {
19000
19025
  "portable": true
19001
19026
  },
19002
19027
  "packageManager": "pnpm@10.4.1",
19003
- "releaseSetId": "sha256:379c5fbf570f4d63e100777b13f90707adfcd900276434bb6b863240dc43f1b6"
19028
+ "releaseSetId": "sha256:ef52cd34cbdc789fc58354981361c0ef516e4be7fef48c45a1e7534fd0b32c2e"
19004
19029
  };
19005
19030
 
19006
19031
  // src/templates/testing-types-content.ts
@@ -19356,14 +19381,11 @@ export default defineScenario({
19356
19381
  "Sanity check that the scaffolded workspace boots into its initial phase.",
19357
19382
  from: "initial-turn",
19358
19383
  when: async () => undefined,
19359
- then: ({ expect, interactions, players, state }) => {
19384
+ then: ({ expect, players, state }) => {
19360
19385
  const playerIds = players();
19361
19386
  expect(playerIds).toHaveLength(playerIds.length);
19362
19387
  expect(playerIds.length).toBeGreaterThanOrEqual(1);
19363
19388
  expect(state()).toBe("setup");
19364
- for (const playerId of playerIds) {
19365
- expect(interactions(playerId)).toEqual([]);
19366
- }
19367
19389
  },
19368
19390
  });
19369
19391
  `;
@@ -19570,7 +19592,7 @@ async function writeInitialScenario(projectRoot, mode) {
19570
19592
  projectRoot,
19571
19593
  "test/scenarios/smoke-initial-turn.scenario.ts"
19572
19594
  );
19573
- if (existing === null || existing.trim().length === 0 || existing === INITIAL_SCENARIO_CONTENT) {
19595
+ if (existing === null || existing.trim().length === 0 || existing.startsWith(GENERATED_SCENARIO_PREFIX)) {
19574
19596
  await writeWorkspaceTextFile(
19575
19597
  projectRoot,
19576
19598
  "test/scenarios/smoke-initial-turn.scenario.ts",
@@ -20422,4 +20444,4 @@ export {
20422
20444
  findProjectRoot,
20423
20445
  materializeWorkspaceProject
20424
20446
  };
20425
- //# sourceMappingURL=chunk-LWJUF42S.js.map
20447
+ //# sourceMappingURL=chunk-2XMBZPL5.js.map