lua-cli 3.15.1 → 3.15.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.
Files changed (68) hide show
  1. package/dist/api/skills.api.service.d.ts +8 -0
  2. package/dist/api/skills.api.service.d.ts.map +1 -1
  3. package/dist/api/skills.api.service.js +8 -0
  4. package/dist/api/skills.api.service.js.map +1 -1
  5. package/dist/cli/command-definitions.d.ts.map +1 -1
  6. package/dist/cli/command-definitions.js +8 -0
  7. package/dist/cli/command-definitions.js.map +1 -1
  8. package/dist/commands/logs.d.ts.map +1 -1
  9. package/dist/commands/logs.js +13 -6
  10. package/dist/commands/logs.js.map +1 -1
  11. package/dist/commands/push.d.ts +12 -0
  12. package/dist/commands/push.d.ts.map +1 -1
  13. package/dist/commands/push.js +125 -8
  14. package/dist/commands/push.js.map +1 -1
  15. package/dist/commands/source.d.ts.map +1 -1
  16. package/dist/commands/source.js +17 -7
  17. package/dist/commands/source.js.map +1 -1
  18. package/dist/compiler/plugins/agent.plugin.d.ts.map +1 -1
  19. package/dist/compiler/plugins/agent.plugin.js +2 -0
  20. package/dist/compiler/plugins/agent.plugin.js.map +1 -1
  21. package/dist/compiler/utils/common.d.ts +3 -19
  22. package/dist/compiler/utils/common.d.ts.map +1 -1
  23. package/dist/compiler/utils/common.js +8 -47
  24. package/dist/compiler/utils/common.js.map +1 -1
  25. package/dist/interfaces/backup.d.ts +6 -132
  26. package/dist/interfaces/backup.d.ts.map +1 -1
  27. package/dist/interfaces/backup.js +3 -4
  28. package/dist/interfaces/backup.js.map +1 -1
  29. package/dist/utils/backup-helpers.d.ts +6 -58
  30. package/dist/utils/backup-helpers.d.ts.map +1 -1
  31. package/dist/utils/backup-helpers.js +35 -158
  32. package/dist/utils/backup-helpers.js.map +1 -1
  33. package/dist/utils/build-manifest-from-disk.d.ts +3 -12
  34. package/dist/utils/build-manifest-from-disk.d.ts.map +1 -1
  35. package/dist/utils/build-manifest-from-disk.js +10 -100
  36. package/dist/utils/build-manifest-from-disk.js.map +1 -1
  37. package/node_modules/@lua/shared-source-sync/dist/index.d.mts +424 -0
  38. package/node_modules/@lua/shared-source-sync/dist/index.d.ts +424 -0
  39. package/node_modules/@lua/shared-source-sync/dist/index.js +536 -0
  40. package/node_modules/@lua/shared-source-sync/dist/index.mjs +491 -0
  41. package/node_modules/@lua/shared-source-sync/package.json +26 -0
  42. package/node_modules/@lua/shared-source-sync/src/archive.ts +98 -0
  43. package/node_modules/@lua/shared-source-sync/src/filter.ts +72 -0
  44. package/node_modules/@lua/shared-source-sync/src/hash.ts +40 -0
  45. package/node_modules/@lua/shared-source-sync/src/http.ts +132 -0
  46. package/node_modules/@lua/shared-source-sync/src/index.ts +56 -0
  47. package/node_modules/@lua/shared-source-sync/src/pull.ts +50 -0
  48. package/node_modules/@lua/shared-source-sync/src/push.ts +94 -0
  49. package/node_modules/@lua/shared-source-sync/src/restore.ts +83 -0
  50. package/node_modules/@lua/shared-source-sync/src/skill-source.ts +55 -0
  51. package/node_modules/@lua/shared-source-sync/src/transfer.ts +92 -0
  52. package/node_modules/@lua/shared-source-sync/src/types.ts +88 -0
  53. package/node_modules/@lua/shared-source-sync/src/walk.ts +91 -0
  54. package/node_modules/@lua/shared-source-sync/tests/archive.test.ts +108 -0
  55. package/node_modules/@lua/shared-source-sync/tests/hash.test.ts +40 -0
  56. package/node_modules/@lua/shared-source-sync/tests/http.test.ts +77 -0
  57. package/node_modules/@lua/shared-source-sync/tests/push.test.ts +162 -0
  58. package/node_modules/@lua/shared-source-sync/tests/walk.test.ts +84 -0
  59. package/node_modules/@lua/shared-source-sync/tsconfig.json +12 -0
  60. package/node_modules/@lua/shared-source-sync/tsup.config.ts +9 -0
  61. package/node_modules/@lua/shared-source-sync/vitest.config.ts +8 -0
  62. package/node_modules/@lua/shared-types/dist/index.d.mts +27 -0
  63. package/node_modules/@lua/shared-types/dist/index.d.ts +27 -0
  64. package/node_modules/@lua/shared-types/src/agent-config.types.ts +14 -0
  65. package/node_modules/@lua/shared-types/src/chat-stream.types.ts +7 -0
  66. package/node_modules/@lua/shared-types/src/model-registry.ts +6 -0
  67. package/package.json +3 -1
  68. package/template/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: true,
6
+ root: '.',
7
+ },
8
+ });
@@ -521,6 +521,12 @@ interface ApprovedModelDef {
521
521
  via: string;
522
522
  modelPrefix: string;
523
523
  };
524
+ /**
525
+ * For Vertex models, pins this model to a specific region instead of the
526
+ * round-robin pool from GOOGLE_VERTEX_LOCATION. Use `"global"` for Gemini 3.x
527
+ * (global-only). Falls back to round-robin when unset.
528
+ */
529
+ vertexLocation?: string;
524
530
  }
525
531
 
526
532
  /**
@@ -534,6 +540,20 @@ interface BatchingConfig {
534
540
  debounceWindowMs?: number;
535
541
  /** Maximum messages collected in a single batch. */
536
542
  maxBatchMessages?: number;
543
+ /**
544
+ * Strict sequential turn execution. When `true`, a new message arriving while a turn is
545
+ * in-flight does NOT abort the running turn — it waits in a batch until the current turn
546
+ * completes, then runs against the post-reply state. Trades latency for correctness:
547
+ * eliminates duplicate/contradictory replies and side-effect-then-no-reply failures from
548
+ * mid-tool aborts. No effect when `debounceWindowMs` is 0 (batching disabled).
549
+ *
550
+ * Most useful with the stream endpoint. Generate callers (e.g. lua-whatsapp, sync HTTP)
551
+ * may hit ingress / client timeouts on long waits regardless of backend serialization.
552
+ *
553
+ * Per-agent only — there is no platform-wide env var override (deliberate: a global
554
+ * switch would silently flip every batching-enabled agent at once). Default: `false`.
555
+ */
556
+ serializeProcessing?: boolean;
537
557
  }
538
558
  /**
539
559
  * Governance SDK configuration persisted on the SubAgent document.
@@ -581,11 +601,18 @@ interface AgentLogMetadata {
581
601
  * Wire-format contract for `type: 'error'` chunks emitted by lua-core's chat
582
602
  * stream. Single source of truth — consumed by lua-whatsapp and any other
583
603
  * service that reads the NDJSON chat stream.
604
+ *
605
+ * `code` carries the structural classification across the wire so the
606
+ * consumer (lua-whatsapp et al.) can replicate the same WARN-vs-ERROR
607
+ * policy lua-core applies at its emit site. Currently only set when the
608
+ * underlying error originated from customer-supplied VM-sandbox code
609
+ * (`USER_CODE_ERROR`). Optional — chunks predating LUA-340 omit it.
584
610
  */
585
611
  interface ChatErrorChunk {
586
612
  type: 'error';
587
613
  textDelta: string;
588
614
  error: string;
615
+ code?: 'USER_CODE_ERROR';
589
616
  timestamp: number;
590
617
  }
591
618
 
@@ -521,6 +521,12 @@ interface ApprovedModelDef {
521
521
  via: string;
522
522
  modelPrefix: string;
523
523
  };
524
+ /**
525
+ * For Vertex models, pins this model to a specific region instead of the
526
+ * round-robin pool from GOOGLE_VERTEX_LOCATION. Use `"global"` for Gemini 3.x
527
+ * (global-only). Falls back to round-robin when unset.
528
+ */
529
+ vertexLocation?: string;
524
530
  }
525
531
 
526
532
  /**
@@ -534,6 +540,20 @@ interface BatchingConfig {
534
540
  debounceWindowMs?: number;
535
541
  /** Maximum messages collected in a single batch. */
536
542
  maxBatchMessages?: number;
543
+ /**
544
+ * Strict sequential turn execution. When `true`, a new message arriving while a turn is
545
+ * in-flight does NOT abort the running turn — it waits in a batch until the current turn
546
+ * completes, then runs against the post-reply state. Trades latency for correctness:
547
+ * eliminates duplicate/contradictory replies and side-effect-then-no-reply failures from
548
+ * mid-tool aborts. No effect when `debounceWindowMs` is 0 (batching disabled).
549
+ *
550
+ * Most useful with the stream endpoint. Generate callers (e.g. lua-whatsapp, sync HTTP)
551
+ * may hit ingress / client timeouts on long waits regardless of backend serialization.
552
+ *
553
+ * Per-agent only — there is no platform-wide env var override (deliberate: a global
554
+ * switch would silently flip every batching-enabled agent at once). Default: `false`.
555
+ */
556
+ serializeProcessing?: boolean;
537
557
  }
538
558
  /**
539
559
  * Governance SDK configuration persisted on the SubAgent document.
@@ -581,11 +601,18 @@ interface AgentLogMetadata {
581
601
  * Wire-format contract for `type: 'error'` chunks emitted by lua-core's chat
582
602
  * stream. Single source of truth — consumed by lua-whatsapp and any other
583
603
  * service that reads the NDJSON chat stream.
604
+ *
605
+ * `code` carries the structural classification across the wire so the
606
+ * consumer (lua-whatsapp et al.) can replicate the same WARN-vs-ERROR
607
+ * policy lua-core applies at its emit site. Currently only set when the
608
+ * underlying error originated from customer-supplied VM-sandbox code
609
+ * (`USER_CODE_ERROR`). Optional — chunks predating LUA-340 omit it.
584
610
  */
585
611
  interface ChatErrorChunk {
586
612
  type: 'error';
587
613
  textDelta: string;
588
614
  error: string;
615
+ code?: 'USER_CODE_ERROR';
589
616
  timestamp: number;
590
617
  }
591
618
 
@@ -9,6 +9,20 @@ export interface BatchingConfig {
9
9
  debounceWindowMs?: number;
10
10
  /** Maximum messages collected in a single batch. */
11
11
  maxBatchMessages?: number;
12
+ /**
13
+ * Strict sequential turn execution. When `true`, a new message arriving while a turn is
14
+ * in-flight does NOT abort the running turn — it waits in a batch until the current turn
15
+ * completes, then runs against the post-reply state. Trades latency for correctness:
16
+ * eliminates duplicate/contradictory replies and side-effect-then-no-reply failures from
17
+ * mid-tool aborts. No effect when `debounceWindowMs` is 0 (batching disabled).
18
+ *
19
+ * Most useful with the stream endpoint. Generate callers (e.g. lua-whatsapp, sync HTTP)
20
+ * may hit ingress / client timeouts on long waits regardless of backend serialization.
21
+ *
22
+ * Per-agent only — there is no platform-wide env var override (deliberate: a global
23
+ * switch would silently flip every batching-enabled agent at once). Default: `false`.
24
+ */
25
+ serializeProcessing?: boolean;
12
26
  }
13
27
 
14
28
  /**
@@ -2,10 +2,17 @@
2
2
  * Wire-format contract for `type: 'error'` chunks emitted by lua-core's chat
3
3
  * stream. Single source of truth — consumed by lua-whatsapp and any other
4
4
  * service that reads the NDJSON chat stream.
5
+ *
6
+ * `code` carries the structural classification across the wire so the
7
+ * consumer (lua-whatsapp et al.) can replicate the same WARN-vs-ERROR
8
+ * policy lua-core applies at its emit site. Currently only set when the
9
+ * underlying error originated from customer-supplied VM-sandbox code
10
+ * (`USER_CODE_ERROR`). Optional — chunks predating LUA-340 omit it.
5
11
  */
6
12
  export interface ChatErrorChunk {
7
13
  type: 'error';
8
14
  textDelta: string;
9
15
  error: string;
16
+ code?: 'USER_CODE_ERROR';
10
17
  timestamp: number;
11
18
  }
@@ -17,4 +17,10 @@ export interface ApprovedModelDef {
17
17
  contextWindow?: number;
18
18
  /** If set, route requests through a gateway instead of calling the provider directly. */
19
19
  gateway?: { via: string; modelPrefix: string };
20
+ /**
21
+ * For Vertex models, pins this model to a specific region instead of the
22
+ * round-robin pool from GOOGLE_VERTEX_LOCATION. Use `"global"` for Gemini 3.x
23
+ * (global-only). Falls back to round-robin when unset.
24
+ */
25
+ vertexLocation?: string;
20
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lua-cli",
3
- "version": "3.15.1",
3
+ "version": "3.15.3",
4
4
  "description": "Build, test, and deploy AI agents with custom tools, webhooks, and scheduled jobs. Features LuaAgent unified configuration, streaming chat, and batch deployment.",
5
5
  "readmeFilename": "README.md",
6
6
  "main": "dist/api-exports.js",
@@ -64,6 +64,7 @@
64
64
  "LICENSE"
65
65
  ],
66
66
  "dependencies": {
67
+ "@lua/shared-source-sync": "0.0.1",
67
68
  "@lua/shared-types": "0.0.1",
68
69
  "@tailwindcss/postcss": "^4.1.14",
69
70
  "@tanstack/react-query": "^5.90.11",
@@ -85,6 +86,7 @@
85
86
  "zod-to-json-schema": "^3.24.6"
86
87
  },
87
88
  "bundledDependencies": [
89
+ "@lua/shared-source-sync",
88
90
  "@lua/shared-types"
89
91
  ],
90
92
  "devDependencies": {
@@ -20,7 +20,7 @@
20
20
  "inquirer": "^12.9.6",
21
21
  "stripe": "^17.5.0",
22
22
  "js-yaml": "^4.1.0",
23
- "lua-cli": "^3.15.0",
23
+ "lua-cli": "^3.15.2",
24
24
  "openai": "^5.23.0",
25
25
  "uuid": "^13.0.0",
26
26
  "zod": "^3.24.1"