@aidenhq/sdk 0.4.2 → 0.4.3

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,3 +1,10 @@
1
+ export declare const SETTINGS_PATHS: RegExp;
2
+ /**
3
+ * A local module's own file, `modules/<name>/<path>`: each segment starts with a letter, digit or _ (no hidden files but a
4
+ * last `.dockerignore`), and none is `node_modules` or `dist` (installed and built output is never landed).
5
+ */
6
+ export declare const MODULE_FILE: RegExp;
7
+ /** What an apply may land: the settings paths, and a local module's files. */
1
8
  export declare const APPLY_PATHS: RegExp;
2
9
  /** Files a change touches outside what apply may land. */
3
10
  export declare const strayFiles: (files: string[]) => string[];
@@ -1,9 +1,15 @@
1
- // The instance repo files an apply may land and a settings write may touch: instance.yaml, apps.yaml, the owner's profile,
2
- // a module agent's added rules (agents/<key>.md) and handbook fork (agents/<key>/AGENTS.md), and a local module's
3
- // module.yaml, agents' handbooks and skills (a skill's SKILL.md and the references/<name>.md files it splits detail into).
4
- // Pure: the kernel's apply and both code hosts (codehost-local imports it, codehost-github holds a copy,
5
- // scripts/sync-shared.ts) read this one list.
6
- // A reference file is one .md, one folder deep; the apply's DIFF_MAX (apply-tier.ts) already bounds what one can bring.
7
- export const APPLY_PATHS = /^(instance\.yaml|apps\.yaml|owner\/profile\.md|agents\/[\w.-]+\.md|agents\/[a-z0-9][a-z0-9-]*\/AGENTS\.md|modules\/[a-z0-9][a-z0-9-]*\/(module\.yaml|agents\/[a-z0-9][a-z0-9-]*\/AGENTS\.md|skills\/[a-z0-9][a-z0-9-]*\/(SKILL\.md|references\/[A-Za-z0-9][A-Za-z0-9._-]{0,63}\.md)))$/;
1
+ // The instance repo files a settings write may touch (SETTINGS_PATHS: instance.yaml, apps.yaml, the owner's profile, a module
2
+ // agent's added rules agents/<key>.md and handbook fork agents/<key>/AGENTS.md, and a local module's module.yaml, agents'
3
+ // handbooks and skills) and the files an apply may land (APPLY_PATHS: those, and every file of a local module under the file
4
+ // policy MODULE_FILE). Pure: the kernel's apply and both code hosts (codehost-local imports it, codehost-github holds a copy,
5
+ // scripts/sync-shared.ts) read these lists. A file's mode, size and text are the code hosts' to check (fileAt: 100644, text, 1 MB).
6
+ export const SETTINGS_PATHS = /^(instance\.yaml|apps\.yaml|owner\/profile\.md|agents\/[\w.-]+\.md|agents\/[a-z0-9][a-z0-9-]*\/AGENTS\.md|modules\/[a-z0-9][a-z0-9-]*\/(module\.yaml|agents\/[a-z0-9][a-z0-9-]*\/AGENTS\.md|skills\/[a-z0-9][a-z0-9-]*\/SKILL\.md))$/;
7
+ /**
8
+ * A local module's own file, `modules/<name>/<path>`: each segment starts with a letter, digit or _ (no hidden files but a
9
+ * last `.dockerignore`), and none is `node_modules` or `dist` (installed and built output is never landed).
10
+ */
11
+ export const MODULE_FILE = /^modules\/[a-z0-9][a-z0-9-]{0,62}\/(?:(?!(?:node_modules|dist)\/)[A-Za-z0-9_][A-Za-z0-9._@+-]*\/)*(?:(?!(?:node_modules|dist)$)[A-Za-z0-9_][A-Za-z0-9._@+-]*|\.dockerignore)$/;
12
+ /** What an apply may land: the settings paths, and a local module's files. */
13
+ export const APPLY_PATHS = new RegExp(`${SETTINGS_PATHS.source}|${MODULE_FILE.source}`);
8
14
  /** Files a change touches outside what apply may land. */
9
15
  export const strayFiles = (files) => files.filter((f) => !APPLY_PATHS.test(f));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aidenhq/sdk",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "The shared code of AidenHQ modules: contract types, engine IO, the caller check and fence, write executors, the reviewer side, the judges' models and call, the source writer and the vendor MCP pass-through.",
5
5
  "license": "MIT",
6
6
  "repository": {