@runa-ai/runa-cli 0.10.0 → 0.10.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.
Files changed (37) hide show
  1. package/dist/{chunk-ZWDWFMOX.js → chunk-HWR5NUUZ.js} +24 -3
  2. package/dist/{chunk-JQXOVCOP.js → chunk-NIS77243.js} +8 -5
  3. package/dist/{chunk-URWDB7YL.js → chunk-O3M7A73M.js} +58 -2
  4. package/dist/{chunk-QDOR3GTD.js → chunk-XRLIZKB2.js} +80 -12
  5. package/dist/{chunk-IEKYTCYA.js → chunk-YTQS2O4H.js} +59 -0
  6. package/dist/{chunk-OXQISY3J.js → chunk-ZPE52NEK.js} +1 -1
  7. package/dist/{ci-FLTJ2UXB.js → ci-3HZWUQFN.js} +4 -4
  8. package/dist/{cli-THEA6T7N.js → cli-RES5QRC2.js} +12 -12
  9. package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts +6 -0
  10. package/dist/commands/db/commands/db-sync/production-precheck.d.ts +0 -8
  11. package/dist/commands/db/sync/schema-guardrail-graph-guidance.d.ts +18 -1
  12. package/dist/commands/db/sync/schema-guardrail-graph-nodes.d.ts +1 -1
  13. package/dist/commands/db/sync/schema-guardrail-graph-sql-helpers.d.ts +1 -1
  14. package/dist/commands/db/sync/schema-guardrail-types.d.ts +4 -2
  15. package/dist/commands/db/utils/changed-files-detector.d.ts +21 -0
  16. package/dist/commands/db/utils/schema-sync.d.ts +12 -0
  17. package/dist/commands/db/utils/sql-boundary-parser.d.ts +13 -0
  18. package/dist/commands/db/utils/sql-file-collector.d.ts +2 -0
  19. package/dist/constants/versions.d.ts +9 -0
  20. package/dist/{db-IDKQ44VX.js → db-PRGL7PBX.js} +587 -76
  21. package/dist/{dev-LGSMDFJN.js → dev-QR55VDNZ.js} +1 -1
  22. package/dist/{error-handler-YRQWRDEF.js → error-handler-XUQOP4TU.js} +1 -2
  23. package/dist/{hotfix-RJIAPLAM.js → hotfix-JYHDY2M6.js} +1 -2
  24. package/dist/index.js +4 -4
  25. package/dist/{init-2O6ODG5Z.js → init-4UAWYY75.js} +1 -1
  26. package/dist/{license-OB7GVJQ2.js → license-M6ODBV4X.js} +140 -154
  27. package/dist/pg-schema-diff-helpers-JZO4GAQG.js +7 -0
  28. package/dist/{upgrade-QZKEI3NJ.js → upgrade-LBO3Z3J7.js} +1 -1
  29. package/dist/utils/license/index.d.ts +15 -24
  30. package/dist/utils/license/types.d.ts +3 -4
  31. package/dist/utils/template-access.d.ts +20 -0
  32. package/dist/utils/template-fetcher.d.ts +10 -7
  33. package/dist/{vuln-check-JRPMUHLF.js → vuln-check-5JJ2YAJW.js} +1 -1
  34. package/dist/{vuln-checker-Q7LSHUHJ.js → vuln-checker-JF5234BL.js} +1 -1
  35. package/package.json +1 -1
  36. package/dist/chunk-ZZOXM6Q4.js +0 -8
  37. package/dist/pg-schema-diff-helpers-7377FS2D.js +0 -7
@@ -0,0 +1,21 @@
1
+ /**
2
+ * AI HINT: Changed Files Detector for Precheck Scope Separation
3
+ *
4
+ * Purpose: Detect which SQL files have been modified in the current branch
5
+ * to separate "current-change blockers" from "repo-wide baseline blockers".
6
+ *
7
+ * Uses git diff against the merge-base of the current branch and main.
8
+ */
9
+ /**
10
+ * Get list of SQL files changed in the current branch compared to the default branch.
11
+ * Falls back to staged + unstaged changes if merge-base detection fails.
12
+ *
13
+ * Returns relative paths from the repository root.
14
+ */
15
+ export declare function getChangedSqlFiles(): string[];
16
+ /**
17
+ * Classify a blocker message as "from changed files" or "baseline".
18
+ * Extracts file path from blocker message and checks against changed files set.
19
+ */
20
+ export declare function classifyBlockerScope(blockerMessage: string, changedFiles: Set<string>): 'current-change' | 'baseline';
21
+ //# sourceMappingURL=changed-files-detector.d.ts.map
@@ -99,4 +99,16 @@ export declare function diffSchema(params: {
99
99
  * // Returns: ['public.area_metrics', 'public.floor_metrics', ...]
100
100
  */
101
101
  export declare function extractTablesFromIdempotentSql(idempotentDir: string, projectRoot?: string): string[];
102
+ /**
103
+ * Extract glob patterns for dynamically-created tables from idempotent SQL.
104
+ *
105
+ * Detects patterns like:
106
+ * EXECUTE format('CREATE TABLE %I.%I', schema_var, prefix || suffix)
107
+ * EXECUTE format('CREATE TABLE IF NOT EXISTS %s.%s', ...)
108
+ * EXECUTE 'CREATE TABLE ' || schema || '.' || table_prefix || ...
109
+ *
110
+ * Returns glob patterns (e.g., "analytics._arc_*") suitable for
111
+ * buildTablePatternMatcher in table-source-classifier.
112
+ */
113
+ export declare function extractDynamicTablePatternsFromIdempotentSql(idempotentDir: string, projectRoot?: string): string[];
102
114
  //# sourceMappingURL=schema-sync.d.ts.map
@@ -2,6 +2,19 @@ export type ParsedSqlStatement = {
2
2
  statement: string;
3
3
  line: number;
4
4
  };
5
+ /**
6
+ * Detect `-- runa:allow-dynamic-sql` annotation in SQL file content.
7
+ * When present, dynamic SQL patterns (EXECUTE, FUNCTION DDL in idempotent)
8
+ * are treated as intentional rather than risky.
9
+ *
10
+ * Supports optional role: `-- runa:allow-dynamic-sql reason: partition-helper`
11
+ */
12
+ export declare const ALLOW_DYNAMIC_SQL_ANNOTATION: RegExp;
13
+ /**
14
+ * Extract the reason/role from a `-- runa:allow-dynamic-sql reason: ...` annotation.
15
+ * Returns the reason string if present, undefined otherwise.
16
+ */
17
+ export declare function extractDynamicSqlRole(content: string): string | undefined;
5
18
  export declare function splitSqlStatements(content: string): ParsedSqlStatement[];
6
19
  export declare function isNonDdlMaintenanceStatement(statement: string): boolean;
7
20
  export declare function isNonSchemaOperation(statement: string): boolean;
@@ -3,6 +3,8 @@
3
3
  *
4
4
  * Uses queue + index traversal to avoid O(n^2) behavior from shift().
5
5
  * Unreadable directories are ignored so callers can keep precheck resilient.
6
+ * Directories in IGNORED_DIRECTORY_NAMES are skipped to avoid false positives
7
+ * from legacy/archived SQL files.
6
8
  */
7
9
  export declare function collectSqlFilesRecursively(baseDir: string): Generator<string>;
8
10
  //# sourceMappingURL=sql-file-collector.d.ts.map
@@ -30,4 +30,13 @@ export declare const TEMPLATES_PACKAGE_NAME = "@r06-dev/runa-templates";
30
30
  * GitHub Packages registry URL.
31
31
  */
32
32
  export declare const GITHUB_PACKAGES_REGISTRY = "https://npm.pkg.github.com";
33
+ /**
34
+ * Source repository that controls template access.
35
+ * Users who can run template operations must be able to access this repository.
36
+ */
37
+ export declare const TEMPLATES_SOURCE_REPOSITORY = "r06-dev/runa";
38
+ /**
39
+ * GitHub API endpoint used to verify template source repository access.
40
+ */
41
+ export declare const TEMPLATES_SOURCE_REPOSITORY_API_URL = "https://api.github.com/repos/r06-dev/runa";
33
42
  //# sourceMappingURL=versions.d.ts.map