@amodalai/amodal 0.1.19 → 0.1.21

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amodalai/amodal",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "description": "Amodal CLI",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -30,9 +30,9 @@
30
30
  "semver": "^7.6.0",
31
31
  "yargs": "^17.7.2",
32
32
  "zod": "^4.3.6",
33
- "@amodalai/core": "0.1.19",
34
- "@amodalai/runtime": "0.1.19",
35
- "@amodalai/runtime-app": "0.1.19"
33
+ "@amodalai/core": "0.1.21",
34
+ "@amodalai/runtime": "0.1.21",
35
+ "@amodalai/runtime-app": "0.1.21"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^20.11.24",
@@ -5,8 +5,8 @@
5
5
  */
6
6
 
7
7
  import type {CommandModule} from 'yargs';
8
- import {loadSnapshotFromFile, snapshotToRepo} from '@amodalai/core';
9
- import type {AmodalRepo} from '@amodalai/core';
8
+ import {loadSnapshotFromFile, snapshotToBundle} from '@amodalai/core';
9
+ import type {AgentBundle} from '@amodalai/core';
10
10
  import {createLocalServer} from '@amodalai/runtime';
11
11
  import {PlatformClient} from '../shared/platform-client.js';
12
12
 
@@ -24,12 +24,12 @@ const DEFAULT_PORT = 3847;
24
24
  /**
25
25
  * Load a repo from a snapshot file or from the platform.
26
26
  */
27
- async function loadFromSource(options: ServeOptions): Promise<AmodalRepo | null> {
27
+ async function loadFromSource(options: ServeOptions): Promise<AgentBundle | null> {
28
28
  if (options.config) {
29
29
  process.stderr.write(`[serve] Loading snapshot from ${options.config}...\n`);
30
30
  try {
31
31
  const snapshot = await loadSnapshotFromFile(options.config);
32
- const repo = snapshotToRepo(snapshot, options.config);
32
+ const repo = snapshotToBundle(snapshot, options.config);
33
33
  process.stderr.write(`[serve] Loaded ${snapshot.deployId} (${snapshot.skills.length} skills, ${Object.keys(snapshot.connections).length} connections)\n`);
34
34
  return repo;
35
35
  } catch (err) {
@@ -53,7 +53,7 @@ async function loadFromSource(options: ServeOptions): Promise<AmodalRepo | null>
53
53
  const environment = options.env ?? 'production';
54
54
  try {
55
55
  const snapshot = await client.getActiveSnapshot(environment);
56
- const repo = snapshotToRepo(snapshot, `platform:${environment}`);
56
+ const repo = snapshotToBundle(snapshot, `platform:${environment}`);
57
57
  process.stderr.write(`[serve] Loaded ${snapshot.deployId} from ${environment}\n`);
58
58
  return repo;
59
59
  } catch (err) {
@@ -72,7 +72,7 @@ async function loadFromSource(options: ServeOptions): Promise<AmodalRepo | null>
72
72
  *
73
73
  * Returns the loaded repo, or exits with error.
74
74
  */
75
- export async function runServe(options: ServeOptions): Promise<AmodalRepo | null> {
75
+ export async function runServe(options: ServeOptions): Promise<AgentBundle | null> {
76
76
  const repo = await loadFromSource(options);
77
77
  if (!repo) return null;
78
78
 
@@ -39,7 +39,7 @@ import {
39
39
  } from './fixtures/incident-response.js';
40
40
  import {runBuild} from './commands/build.js';
41
41
  import type {DeploySnapshot} from '@amodalai/core';
42
- import {loadRepo, loadSnapshotFromFile, snapshotToRepo} from '@amodalai/core';
42
+ import {loadRepo, loadSnapshotFromFile, snapshotToBundle} from '@amodalai/core';
43
43
 
44
44
  // ---------------------------------------------------------------------------
45
45
  // Helper: send chat and parse SSE events
@@ -248,7 +248,7 @@ describe('E2E: Incident Response Agent', () => {
248
248
  });
249
249
 
250
250
  it('should round-trip all content through snapshot', () => {
251
- const restored = snapshotToRepo(builtSnapshot, 'test');
251
+ const restored = snapshotToBundle(builtSnapshot, 'test');
252
252
 
253
253
  // Connection
254
254
  expect(restored.connections.size).toBe(1);