@arcadia-eternity/content-sdk 4.6.0 → 4.8.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 (72) hide show
  1. package/README.md +2 -2
  2. package/dist/author-api.d.ts +12 -2
  3. package/dist/author-api.js +11 -2
  4. package/dist/author-git.d.ts +63 -0
  5. package/dist/author-git.js +324 -0
  6. package/dist/author-reference.d.ts +15 -1
  7. package/dist/author-reference.js +20 -1
  8. package/dist/cli.js +5 -4
  9. package/dist/content-query.d.ts +15 -1
  10. package/dist/content-query.js +53 -11
  11. package/dist/content-workspace.d.ts +428 -3
  12. package/dist/content-workspace.js +249 -54
  13. package/dist/debug-environments.d.ts +393 -25
  14. package/dist/debug-environments.js +3 -42
  15. package/dist/demo.js +1 -1
  16. package/dist/effect-declarations.d.ts +14 -0
  17. package/dist/effect-declarations.js +103 -0
  18. package/dist/environment-host-base.d.ts +175 -0
  19. package/dist/environment-host-base.js +86 -0
  20. package/dist/environment-member-transfer.d.ts +5 -0
  21. package/dist/environment-member-transfer.js +95 -0
  22. package/dist/environment-rules.d.ts +728 -3
  23. package/dist/environment-rules.js +158 -74
  24. package/dist/environment-sharing.d.ts +51 -0
  25. package/dist/environment-sharing.js +321 -0
  26. package/dist/environment.d.ts +2 -0
  27. package/dist/environment.js +32 -9
  28. package/dist/jobs.d.ts +5 -0
  29. package/dist/jobs.js +59 -10
  30. package/dist/learnsets.d.ts +47 -0
  31. package/dist/learnsets.js +124 -0
  32. package/dist/lib/content.d.ts +1 -1
  33. package/dist/lib/content.js +26 -2
  34. package/dist/lib/presentation.js +5 -11
  35. package/dist/managed-projects.d.ts +6 -0
  36. package/dist/managed-projects.js +137 -45
  37. package/dist/managed-sources.d.ts +17 -0
  38. package/dist/managed-sources.js +28 -10
  39. package/dist/mcp-contracts.d.ts +405 -4
  40. package/dist/mcp-contracts.js +3 -1
  41. package/dist/mcp.js +23 -1
  42. package/dist/pack-project.d.ts +2 -1
  43. package/dist/pack-project.js +40 -5
  44. package/dist/prepared-document.d.ts +476 -0
  45. package/dist/prepared-document.js +47 -0
  46. package/dist/preview.js +5 -5
  47. package/dist/project.d.ts +3 -1
  48. package/dist/project.js +47 -4
  49. package/dist/rule-composition.d.ts +290 -0
  50. package/dist/rule-composition.js +267 -0
  51. package/dist/template/.github/scripts/release-payload.mjs +91 -0
  52. package/dist/template/.github/scripts/release-test-npm.mjs +27 -0
  53. package/dist/template/.github/scripts/verify-release.mjs +138 -0
  54. package/dist/template/.github/workflows/release-pack.yml +77 -0
  55. package/dist/template/README.md +15 -2
  56. package/dist/template/gitignore-template +7 -0
  57. package/dist/template/npm-lock-template.json +2319 -0
  58. package/dist/template/package.json +4 -2
  59. package/dist/template/skills/arcadia-content-authoring/references/tool-workflows.md +1 -1
  60. package/dist/template/skills/arcadia-content-git/SKILL.md +14 -0
  61. package/dist/template/skills/arcadia-content-release/SKILL.md +29 -0
  62. package/dist/template/test/pack.test.mjs +24 -5
  63. package/dist/testing.d.ts +1 -0
  64. package/dist/testing.js +26 -7
  65. package/dist/workspace-cli.js +2 -2
  66. package/dist/workspace-materials.d.ts +4 -1
  67. package/dist/workspace-materials.js +8 -2
  68. package/dist/workspace.d.ts +11 -0
  69. package/dist/workspace.js +191 -31
  70. package/package.json +16 -4
  71. package/release-payload.mjs +91 -0
  72. package/release-test-npm.mjs +27 -0
@@ -21,7 +21,8 @@
21
21
  "devDependencies": {
22
22
  "@types/node": "26.6.6",
23
23
  "typescript": "6.0.3",
24
- "@arcadia-eternity/content-sdk": "4.6.0"
24
+ "@arcadia-eternity/content-sdk": "4.8.0",
25
+ "fflate": "0.8.3"
25
26
  },
26
27
  "arcadia": {
27
28
  "formatVersion": 1,
@@ -36,6 +37,7 @@
36
37
  "description": "A runnable Arcadia Eternity user-defined content pack: species, skills, marks and TypeScript effects.",
37
38
  "license": "MIT",
38
39
  "engines": {
39
- "node": ">=24 <25"
40
+ "node": ">=24 <25",
41
+ "arcadia": "^4.8.0"
40
42
  }
41
43
  }
@@ -32,6 +32,6 @@ Build/check/test use the fixed author commands. A headless demo proves engine ex
32
32
 
33
33
  Use `team_list`/`team_save`/`team_remove` and `environment_list`/`environment_save` for saved project data. Saves require `expectedVersion`; null creates a file. These operations never select a team/environment, overwrite local drafts, or mutate a running match. Desktop file-change notifications refresh clean views promptly without focus changes; dirty drafts retain their base and show external-change conflicts. Users explicitly reload or resolve drafts. Environment changes require preparing a new candidate before a new battle.
34
34
 
35
- `author_reference` and `arcadia://authoring/<topic>` expose actual SDK schemas/examples. Topics are species, skills, marks, team, environment, descriptions and effects. Read schema stage notes: linked-runtime schema is not source syntax. `asset_inspect` takes a declared resource ID; `includeImage: true` returns local image bytes up to 2 MiB as standard MCP image content. Use an image filename extension: MIME types follow filenames, and unknown extensions remain metadata-only. The client handles decoding/display; this tool does not validate image integrity or report dimensions. Large images remain metadata-only; no automatic thumbnail is generated. HTTP assets are not downloaded; audio/SWF are metadata only.
35
+ `author_reference` and `arcadia://authoring/<topic>` expose actual SDK schemas/examples. Schema and content topics include species, skills, marks, team, environment, descriptions and effects. For repository tasks, read the `git` skill through the same tool. For release preparation or publication, read `release`. Read schema stage notes: linked-runtime schema is not source syntax. `asset_inspect` takes a declared resource ID; `includeImage: true` returns local image bytes up to 2 MiB as standard MCP image content. Use an image filename extension: MIME types follow filenames, and unknown extensions remain metadata-only. The client handles decoding/display; this tool does not validate image integrity or report dimensions. Large images remain metadata-only; no automatic thumbnail is generated. HTTP assets are not downloaded; audio/SWF are metadata only.
36
36
 
37
37
  For behavioral verification, `battle_create` takes a live preview `jobId`, two saved `teamIds`, and a fixed `seed`. It creates an independent automation battle; the user's manual match remains untouched. `battle_read` returns its `sessionId`, `revision`, state and legal `selections`. Submit a returned selection with `battle_action` and `expectedRevision`; never retry a timed-out action without re-reading. `battle_events` reads bounded event pages. `battle_reset` and `battle_close` also require the observed revision. At most four automation battles exist per preview. An engine failure returns `failure` and `stateCurrent: false` with a usable revision for reset/close; cached state is not current proof. Create/reset snapshots the latest saved team files and records their versions while retaining the captured candidate rules; team-only edits do not require rebuilding. Existing battles retain their own team snapshots. These tools never read unsaved UI values.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: arcadia-content-git
3
+ description: 在 Arcadia Eternity 内容包源项目提交或推送创作修改。适用于需要区分工作台草稿、已保存源码和本机配置的 Git 操作。
4
+ ---
5
+
6
+ # 提交与同步内容包
7
+
8
+ 先从 `workspace_describe` 或当前项目的 `package.json` 确认内容包目录。用 `git rev-parse --show-toplevel` 核对仓库。如果内容包位于更大的仓库中,将本次操作限定在用户指定的包和文件。已安装的只读包应回到对应源项目提交。
9
+
10
+ 工作台打开时,用 `workspace_context` 检查与本次提交有关的草稿和冲突。Git 读取磁盘上的文件。若用户要提交的修改仍在表单里,请先让用户在工作台保存,再重新查看差异。其他对象有草稿时,可以继续处理本次已保存的文件。
11
+
12
+ 检查工作区和已暂存的差异,保留用户已暂存的其他工作。模板中的 `data/`、`src/`、`locales/`、`assets/` 和测试都是源码。`dist/`、`.arcadia/`、`release-output/` 和生成的 `.tgz` 是本地产物。检查客户端配置里的项目绝对路径和本机启动参数,避免把仅供本机使用的连接配置一并提交。
13
+
14
+ 按用户要求用本机 Git 提交或推送。涉及 GitHub 时使用助手自己已授权的 `gh` 或 GitHub 连接,并核对目标仓库及分支。只要求提交时,给出本地提交号即可。要求推送时,再报告远端结果。用户要求分发内容包时,读取[发布内容包](../arcadia-content-release/SKILL.md),或通过 `author_reference` 读取 `release` 主题。
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: arcadia-content-release
3
+ description: 准备、检查或发布 Arcadia Eternity 内容包版本。适用于验证发行归档、用版本标签启动仓库的 GitHub Release 工作流,以及按需发布到 npm。
4
+ ---
5
+
6
+ # 发布内容包
7
+
8
+ 先看当前源项目的 `package.json` 和实际发行工作流。下文的文件名和输入对应 SDK 模板。仓库有自己的发行流程时,以该仓库为准。用户只要求准备或检查发行包时,完成本地检查后即可交付归档。
9
+
10
+ ## 验证要发行的版本
11
+
12
+ 1. 核对包名、版本、许可证和 `LICENSE` 文件。版本或依赖有改动时,同步 `package-lock.json`。保留源项目的 `private: true`,模板会生成用于分发的清单。有工作台草稿时,确认本次要发行的修改已经保存到磁盘。
13
+ 2. MCP 提供 `release_check` 时,启动任务并用 `job_get` 等到完成。已有检查可以从 `job_list` 查找。使用 `kind=release`、`state=succeeded` 且 `stale=false` 的结果,记录 `result.filename` 和 `result.integrity`。也可在工作台选择「检查并生成发行包」,或用项目已安装且支持此命令的 SDK 执行 `arcadia-content workspace . release --execute`。
14
+ 3. 检查失败时查看任务诊断或 `job_output`。发行候选包含预构建内容,场景测试使用该归档。源码改变后重新检查,再使用新的归档和 SHA-512 摘要。
15
+
16
+ ## 从已验证的提交发布
17
+
18
+ 使用本机 Git 和助手自己已授权的 `gh` 或 GitHub 连接操作目标仓库。核对版本、远端以及要发布的提交。模板要求标签为 `v<package.json 版本>`。将已验证的源码提交推送到目标仓库,并推送指向该提交的版本标签。若已有同名标签,先核对它指向的提交。指向其他提交时,向用户说明版本冲突。
19
+
20
+ 模板工作流为 `.github/workflows/release-pack.yml`,需已存在于默认分支。选择远端版本标签为运行目标,将本地检查得到的完整 `sha512-…` 值传给 `expected_integrity`。例如,已从当前项目确认仓库、标签和摘要并填入以下变量后,可用这条命令启动工作流。
21
+
22
+ ```sh
23
+ gh workflow run release-pack.yml --repo "$repo" --ref "$tag" \
24
+ -f expected_integrity="$integrity" -f publish_npm=false
25
+ ```
26
+
27
+ 使用助手的 GitHub 连接时,向同一工作流传入相同的标签和输入。默认发布到 GitHub Release。用户明确要求同时发布 npm 时,再启用 `publish_npm`,并核对包名、`repository.url` 与目标仓库,以及该包的 npm Trusted Publishing 配置。
28
+
29
+ 跟踪本次运行。GitHub 发布成功后,返回对应版本的 Release 链接并核对 `.tgz` 附件。若同时选择了 npm,分别检查 GitHub 和 npm 两个任务的结果。遇到中断或部分成功时,先查询已有运行、Release 和已发布版本,再决定是否重试。
@@ -56,18 +56,37 @@ test('the installed package includes compiled content, local artwork, remote dec
56
56
  item => item.namespace === example.manifest.arcadia.namespace,
57
57
  )
58
58
  assert.ok(presentation)
59
- assert.equal(presentation.resources.length, 4, 'only the four packaged images have local file paths')
59
+ const local = presentation.manifest.resources.filter(resource => resource.kind === 'file')
60
+ assert.deepEqual(
61
+ presentation.resources.map(resource => resource.id).sort(),
62
+ local.map(resource => resource.id).sort(),
63
+ 'every declared local resource has a prepared file path',
64
+ )
65
+ for (const resource of local)
66
+ assert.ok(example.files.includes(resource.source), `Missing packaged file: ${resource.source}`)
60
67
  const remote = presentation.manifest.resources.filter(resource => resource.kind === 'http')
61
- assert.equal(remote.length, 3)
62
- assert.ok(remote.some(resource => resource.mime === 'application/x-shockwave-flash'))
63
- assert.ok(remote.some(resource => resource.mime === 'audio/mpeg'))
68
+ for (const [id, mime] of [
69
+ ['dilan-portrait', 'image/png'],
70
+ ['dilan-animation', 'application/x-shockwave-flash'],
71
+ ['strike-sound', 'audio/mpeg'],
72
+ ])
73
+ assert.equal(remote.find(resource => resource.id === id)?.mime, mime)
64
74
  for (const resource of remote) {
65
75
  assert.notEqual(resource.id, resource.source)
66
76
  assert.equal('sha256' in resource, false)
67
77
  assert.equal('bytes' in resource, false)
68
78
  }
69
79
  assert.equal(presentation.manifest.version, 2)
70
- assert.equal(presentation.manifest.bindings.length, 5)
80
+ for (const [kind, id, field, resource] of [
81
+ ['skills', 'strike', 'sfx', 'strike-sound'],
82
+ ['skills', 'rest', 'sfx', 'strike-sound'],
83
+ ['species', 'pet', 'icon', 'frostling-icon'],
84
+ ['species', 'pet-swf', 'icon', 'dilan-portrait'],
85
+ ['marks', 'slow', 'icon', 'slow'],
86
+ ]) {
87
+ const binding = presentation.manifest.bindings.find(item => item.target.kind === kind && item.target.id === id)
88
+ assert.equal(binding?.[field], resource, `Missing sample binding: ${kind}.${id}.${field}`)
89
+ }
71
90
  for (const kind of ['species', 'skills', 'marks'])
72
91
  assert.ok(example.environment.data[kind].every(row => !('presentation' in row)))
73
92
  assert.equal(presentation.manifest.defaultLocale, 'zh-CN')
package/dist/testing.d.ts CHANGED
@@ -9,6 +9,7 @@ export { AttackTargetOpinion, EffectContext, EffectTrigger, RemoveMarkContext, p
9
9
  export declare function prepareContentPack(root?: string, options?: NonNullable<Parameters<typeof prepareBattleEnvironment>[1]>): Promise<{
10
10
  environment: Readonly<import("@arcadia-eternity/pack-loader/node").PreparedNpmEnvironment>;
11
11
  environmentDocument: import("./debug-environments.js").EnvironmentDocumentV2;
12
+ effectiveRules: ReturnType<typeof import("./environment-rules.js").prepareRulesForContent>['rules'];
12
13
  candidate: import("./environment.js").ContentCandidate;
13
14
  environmentLock: {
14
15
  file: string;
package/dist/testing.js CHANGED
@@ -11,7 +11,7 @@ import { randomBytes } from 'node:crypto';
11
11
  import { join, resolve } from 'node:path';
12
12
  import { pathToFileURL } from 'node:url';
13
13
  import { prepareBattleEnvironment } from './environment.js';
14
- import { assertEnvironmentTeam, validateEnvironmentRules } from './environment-rules.js';
14
+ import { assertPlayableTeam, resolveEnvironmentMechanics, validateEnvironmentRules } from './environment-rules.js';
15
15
  import { prepareSandboxContent } from '@arcadia-eternity/battle/sandbox/effects';
16
16
  import { createNodeBattleWorkerManager } from '@arcadia-eternity/battle/sandbox/node';
17
17
  import { isRecord } from './types.js';
@@ -31,7 +31,9 @@ export async function prepareContentPack(root = process.cwd(), options = {}) {
31
31
  const teams = config.teams;
32
32
  const prepared = await prepareBattleEnvironment(root, options);
33
33
  const { environment } = prepared;
34
- const environmentRules = validateEnvironmentRules(prepared.environmentDocument.rules);
34
+ const environmentRules = validateEnvironmentRules(prepared.effectiveRules);
35
+ const { allowFaintSwitch, enhancement } = resolveEnvironmentMechanics(environmentRules);
36
+ const enhancementActive = enhancement.mode === 'active';
35
37
  // Four automation sessions, one human preview, and room for their validated replacements.
36
38
  const workers = createNodeBattleWorkerManager({ maxBattles: 7 });
37
39
  function defaultPlayers() {
@@ -46,8 +48,9 @@ export async function prepareContentPack(root = process.cwd(), options = {}) {
46
48
  id: runtimeIds ? randomBytes(16).toString('base64url').slice(0, 21) : pet.id,
47
49
  })),
48
50
  }));
49
- for (const player of players)
50
- assertEnvironmentTeam(environmentRules, player.team);
51
+ for (const player of players) {
52
+ assertPlayableTeam(environmentRules, player.team, id => environment.content.getSpecies(id), environment.content.getNature, environment.content.getEnhancement, environment.content.getSkill, environment.content.getMark);
53
+ }
51
54
  return players;
52
55
  }
53
56
  const referenceContent = new WeakMap();
@@ -75,9 +78,12 @@ export async function prepareContentPack(root = process.cwd(), options = {}) {
75
78
  */
76
79
  async function createBattle(seed = 'content-pack-template', { ai = false, players: supplied, runtimeIds = false, battleOptions = {}, } = {}) {
77
80
  const input = runtimePlayers(supplied, runtimeIds);
78
- const effects = await prepareSandboxContent(environment.sandbox);
81
+ const effects = await prepareSandboxContent(environment.sandbox, {
82
+ skillParameters: environmentRules.skillParameters,
83
+ });
79
84
  try {
80
85
  const players = effects.content.parsePlayers(input, {
86
+ enhancementActive,
81
87
  aiPlayerIds: ai && input[1] ? [input[1].id] : [],
82
88
  });
83
89
  if (players.length !== 2)
@@ -87,6 +93,9 @@ export async function prepareContentPack(root = process.cwd(), options = {}) {
87
93
  throw new Error('玩家和精灵的编号不能重复');
88
94
  return ownBattle(effects.content.createBattle(players[0], players[1], {
89
95
  ...battleOptions,
96
+ allowFaintSwitch,
97
+ matchups: environmentRules.matchups,
98
+ enhancementActive,
90
99
  rngSeed: seed,
91
100
  timerConfig: battleOptions.timerConfig ?? { enabled: false },
92
101
  }), effects);
@@ -97,7 +106,9 @@ export async function prepareContentPack(root = process.cwd(), options = {}) {
97
106
  }
98
107
  }
99
108
  async function restoreBattle(snapshot) {
100
- const effects = await prepareSandboxContent(environment.sandbox);
109
+ const effects = await prepareSandboxContent(environment.sandbox, {
110
+ skillParameters: environmentRules.skillParameters,
111
+ });
101
112
  try {
102
113
  return ownBattle(effects.content.restore(snapshot), effects);
103
114
  }
@@ -118,7 +129,15 @@ export async function prepareContentPack(root = process.cwd(), options = {}) {
118
129
  environment: environment.sandbox,
119
130
  players,
120
131
  aiPlayerIds: ai ? [players[1]?.id] : [],
121
- options: { ...battleOptions, rngSeed: seed, timerConfig: battleOptions.timerConfig ?? { enabled: false } },
132
+ options: {
133
+ ...battleOptions,
134
+ allowFaintSwitch,
135
+ enhancementActive,
136
+ skillParameters: environmentRules.skillParameters,
137
+ matchups: environmentRules.matchups,
138
+ rngSeed: seed,
139
+ timerConfig: battleOptions.timerConfig ?? { enabled: false },
140
+ },
122
141
  hostOptions: { teamSelection: battleOptions.teamSelection },
123
142
  });
124
143
  return system;
@@ -20,7 +20,7 @@ export async function workspaceCli(args) {
20
20
  process.once('SIGINT', cancel);
21
21
  try {
22
22
  let result;
23
- if (['check', 'test', 'demo', 'preview', 'pack'].includes(operation)) {
23
+ if (['check', 'test', 'demo', 'preview', 'pack', 'release'].includes(operation)) {
24
24
  let job = await session.jobs.start({ kind: operation, ...(environmentId ? { environmentId } : {}) });
25
25
  while (['queued', 'running'].includes(job.state)) {
26
26
  await new Promise(resolve => setTimeout(resolve, 100));
@@ -42,7 +42,7 @@ export async function workspaceCli(args) {
42
42
  }
43
43
  else {
44
44
  let input = '';
45
- if (operation !== 'describe')
45
+ if (operation !== 'describe' && operation !== 'git-status')
46
46
  for await (const chunk of process.stdin) {
47
47
  input += chunk;
48
48
  if (Buffer.byteLength(input) > 3 * 1024 * 1024)
@@ -1,13 +1,16 @@
1
1
  import type { Stats } from 'node:fs';
2
+ import { type UnknownRecord } from './types.js';
2
3
  export declare function contentError(code: string, message?: string): Error & {
3
4
  code: string;
4
5
  };
6
+ export declare function readJson<T = UnknownRecord>(file: string, limit?: number): Promise<T>;
5
7
  /** Capture data bytes only. Symlink targets must remain inside the installed project. */
6
- export declare function materialFiles(root: string, { signal, maxBytes, maxFiles, onRead, allowMissingLock, }?: {
8
+ export declare function materialFiles(root: string, { signal, maxBytes, maxFiles, onRead, subtree, allowMissingLock, }?: {
7
9
  allowMissingLock?: boolean;
8
10
  signal?: AbortSignal;
9
11
  maxBytes?: number;
10
12
  maxFiles?: number;
13
+ subtree?: string;
11
14
  onRead?: (path: string, stats: Stats) => void;
12
15
  }): Promise<Array<{
13
16
  path: string;
@@ -4,6 +4,12 @@ import { errorCode, isRecord } from './types.js';
4
4
  export function contentError(code, message = code) {
5
5
  return Object.assign(new Error(message), { code });
6
6
  }
7
+ export async function readJson(file, limit = 4 * 1024 * 1024) {
8
+ const info = await lstat(file);
9
+ if (!info.isFile() || info.isSymbolicLink() || info.size > limit)
10
+ throw contentError('WORKSPACE_FILE_INVALID');
11
+ return JSON.parse(await readFile(file, 'utf8'));
12
+ }
7
13
  const materialRoots = new Set(['package.json', 'package-lock.json', 'node_modules', 'candidates']);
8
14
  const forbidden = new Set(['.git', '.env', '.npmrc', '.arcadia', '.bin']);
9
15
  function checkedMaterialPath(value) {
@@ -23,7 +29,7 @@ function checkedMaterialPath(value) {
23
29
  return value;
24
30
  }
25
31
  /** Capture data bytes only. Symlink targets must remain inside the installed project. */
26
- export async function materialFiles(root, { signal, maxBytes = 256 * 1024 * 1024, maxFiles = 50000, onRead, allowMissingLock = false, } = {}) {
32
+ export async function materialFiles(root, { signal, maxBytes = 256 * 1024 * 1024, maxFiles = 50000, onRead, subtree, allowMissingLock = false, } = {}) {
27
33
  root = await realpath(root);
28
34
  const result = [];
29
35
  const captured = [];
@@ -68,7 +74,7 @@ export async function materialFiles(root, { signal, maxBytes = 256 * 1024 * 1024
68
74
  onRead?.(actual, after);
69
75
  result.push({ path: name, bytes });
70
76
  }
71
- for (const name of materialRoots) {
77
+ for (const name of subtree ? [checkedMaterialPath(subtree)] : materialRoots) {
72
78
  try {
73
79
  await lstat(join(root, name));
74
80
  }
@@ -1,5 +1,8 @@
1
1
  import { EventEmitter } from 'node:events';
2
2
  import type { SharedField } from './lib/yaml-sharing.js';
3
+ import { type UnknownRecord } from './types.js';
4
+ import type { AuthorEffectCatalog } from './effect-declarations.js';
5
+ export declare const desktopMetadataNames: ReadonlySet<string>;
3
6
  export interface ManifestArcadia {
4
7
  projectId?: string;
5
8
  namespace?: string;
@@ -82,9 +85,13 @@ export interface WorkspaceSnapshot {
82
85
  root: string;
83
86
  project: ManifestArcadia;
84
87
  name: string | undefined;
88
+ manifestVersion: string;
89
+ dependencies: Record<string, string>;
90
+ arcadiaRange: string;
85
91
  version: string | undefined;
86
92
  records: WorkspaceRecord[];
87
93
  files: WorkspaceFile[];
94
+ effectCatalog?: AuthorEffectCatalog;
88
95
  assets: WorkspaceAsset[];
89
96
  locales: Record<string, unknown>;
90
97
  localeSources: WorkspaceLocaleSource[];
@@ -133,6 +140,7 @@ export declare class WorkspaceError extends Error {
133
140
  file?: string;
134
141
  constructor(code: string, message: string, file?: string);
135
142
  }
143
+ export declare function normalizeArcadiaRange(value: unknown): string;
136
144
  export declare function diagnostic(error: unknown): Diagnostic;
137
145
  /** Ordinary source files are authoritative. No project database or generated-output writes. */
138
146
  export declare class AuthorWorkspace extends EventEmitter {
@@ -162,6 +170,7 @@ export declare class AuthorWorkspace extends EventEmitter {
162
170
  }): Promise<string>;
163
171
  snapshot(): Promise<WorkspaceSnapshot>;
164
172
  setDirty(file: string, dirty: boolean): void;
173
+ get hasDirtyFiles(): boolean;
165
174
  clearDirty(): void;
166
175
  asset(file: string): Promise<{
167
176
  file: string;
@@ -174,6 +183,8 @@ export declare class AuthorWorkspace extends EventEmitter {
174
183
  file: string;
175
184
  version: string;
176
185
  }>;
186
+ editPackage(input: UnknownRecord): Promise<void>;
187
+ saveArcadiaRange(value: string, expectedRange: string): Promise<void>;
177
188
  remove({ file, expectedVersion }: RemoveInput): Promise<void>;
178
189
  saveRecord({ file, expectedVersion, index, record, }: SaveRecordInput): Promise<{
179
190
  file: string;