@arcadia-eternity/content-sdk 4.4.0 → 4.4.1

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.
@@ -1,39 +1,6 @@
1
- export interface EnvironmentRules {
2
- schemaVersion: 1;
3
- tier?: string;
4
- allow?: {
5
- species?: string[];
6
- skills?: string[];
7
- marks?: string[];
8
- };
9
- deny?: {
10
- species?: string[];
11
- skills?: string[];
12
- marks?: string[];
13
- };
14
- team?: {
15
- minSize?: number;
16
- maxSize?: number;
17
- uniqueSpecies?: boolean;
18
- };
19
- }
20
- export interface EnvironmentDocument {
21
- schemaVersion: 2;
22
- id: string;
23
- name: string;
24
- packages: Record<string, string>;
25
- sources: string[];
26
- disabled?: {
27
- packages: Record<string, string>;
28
- sources: string[];
29
- };
30
- rules: EnvironmentRules;
31
- requires: {
32
- engine?: string;
33
- sdk?: string;
34
- capabilities?: string[];
35
- };
36
- }
1
+ import { type EnvironmentDocumentV2 } from './debug-environments.js';
2
+ export type { EnvironmentRules } from './debug-environments.js';
3
+ export type EnvironmentDocument = EnvironmentDocumentV2;
37
4
  export interface EnvironmentDraft {
38
5
  document: EnvironmentDocument;
39
6
  revision: string;
@@ -1,5 +1,26 @@
1
1
  import { type AuthorWorkspace } from './workspace.js';
2
2
  import { z } from 'zod';
3
+ /** Portable rule data. Runtime consumers must explicitly support every declared capability. */
4
+ export declare const EnvironmentRulesSchema: z.ZodObject<{
5
+ schemaVersion: z.ZodLiteral<1>;
6
+ tier: z.ZodOptional<z.ZodString>;
7
+ allow: z.ZodOptional<z.ZodObject<{
8
+ species: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
+ marks: z.ZodOptional<z.ZodArray<z.ZodString>>;
11
+ }, z.core.$strict>>;
12
+ deny: z.ZodOptional<z.ZodObject<{
13
+ species: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
15
+ marks: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
+ }, z.core.$strict>>;
17
+ team: z.ZodOptional<z.ZodObject<{
18
+ minSize: z.ZodOptional<z.ZodNumber>;
19
+ maxSize: z.ZodOptional<z.ZodNumber>;
20
+ uniqueSpecies: z.ZodOptional<z.ZodBoolean>;
21
+ }, z.core.$strict>>;
22
+ }, z.core.$strict>;
23
+ export type EnvironmentRules = z.infer<typeof EnvironmentRulesSchema>;
3
24
  export declare const EnvironmentDocumentV2Schema: z.ZodObject<{
4
25
  id: z.ZodString;
5
26
  name: z.ZodString;
@@ -42,7 +42,7 @@ const contentSelection = z
42
42
  })
43
43
  .strict();
44
44
  /** Portable rule data. Runtime consumers must explicitly support every declared capability. */
45
- const EnvironmentRulesSchema = z
45
+ export const EnvironmentRulesSchema = z
46
46
  .object({
47
47
  schemaVersion: z.literal(1),
48
48
  tier: z.string().regex(idPattern).optional(),
@@ -1,3 +1,6 @@
1
+ /** Trusted author packaging: close the effect dependency graph without evaluating it.
2
+ * Only the staged package gains artifact metadata; the source manifest is never rewritten.
3
+ */
1
4
  export declare function packBuiltProject(directory?: string, { cache }?: {
2
5
  cache?: string;
3
6
  }): Promise<{
@@ -59,6 +59,9 @@ async function stagingRoot(root) {
59
59
  }
60
60
  return directory;
61
61
  }
62
+ /** Trusted author packaging: close the effect dependency graph without evaluating it.
63
+ * Only the staged package gains artifact metadata; the source manifest is never rewritten.
64
+ */
62
65
  export async function packBuiltProject(directory = process.cwd(), { cache } = {}) {
63
66
  const root = await realpath(resolve(directory));
64
67
  const manifestText = await readFile(join(root, 'package.json'), 'utf8');
@@ -95,9 +98,7 @@ export async function packBuiltProject(directory = process.cwd(), { cache } = {}
95
98
  (presentation.bindings?.length || presentation.resources?.length || Object.keys(presentation.locales ?? {}).length)) {
96
99
  if (manifest.arcadia?.presentation !== 'dist/presentation.json')
97
100
  fail('Set arcadia.presentation to dist/presentation.json before packing media/locales');
98
- required.push('dist/content.json', 'dist/presentation.json', ...(presentation.resources ?? [])
99
- .filter((resource) => resource.kind === 'file' && typeof resource.source === 'string')
100
- .map(resource => resource.source));
101
+ required.push('dist/content.json', 'dist/presentation.json', ...(presentation.resources ?? []).filter(resource => resource.kind === 'file').map(resource => resource.source));
101
102
  }
102
103
  for (const file of required)
103
104
  if (!included.has(file))
@@ -21,7 +21,7 @@
21
21
  "devDependencies": {
22
22
  "@types/node": "26.6.6",
23
23
  "typescript": "6.0.3",
24
- "@arcadia-eternity/content-sdk": "4.4.0"
24
+ "@arcadia-eternity/content-sdk": "4.4.1"
25
25
  },
26
26
  "arcadia": {
27
27
  "formatVersion": 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcadia-eternity/content-sdk",
3
- "version": "4.4.0",
3
+ "version": "4.4.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -53,9 +53,9 @@
53
53
  "yaml": "2.9.1",
54
54
  "yauzl": "3.4.0",
55
55
  "zod": "4.6.7",
56
- "@arcadia-eternity/battle": "4.4.0",
57
- "@arcadia-eternity/schema": "4.4.0",
58
- "@arcadia-eternity/pack-loader": "4.4.0"
56
+ "@arcadia-eternity/pack-loader": "4.4.1",
57
+ "@arcadia-eternity/battle": "4.4.1",
58
+ "@arcadia-eternity/schema": "4.4.1"
59
59
  },
60
60
  "repository": {
61
61
  "type": "git",