@amalgm/apps 0.1.3-preview.34319254403 → 0.1.3-preview.34545378804

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/dist/types.d.ts CHANGED
@@ -203,6 +203,39 @@ export interface RollbackInput {
203
203
  releaseId?: string;
204
204
  versionId?: string;
205
205
  }
206
+ export interface AppSettingsPatch {
207
+ name?: string;
208
+ description?: string;
209
+ autostart?: boolean;
210
+ keepAlive?: boolean;
211
+ dnsConnected?: boolean;
212
+ }
213
+ export interface AppLogs {
214
+ appId: string;
215
+ path: string;
216
+ lines: string[];
217
+ }
218
+ /** The export/install port shape. `sourceAppId` is lineage a sharing layer may strip. */
219
+ export interface PortableApp {
220
+ sourceAppId?: string;
221
+ manifest: AppManifest;
222
+ app: {
223
+ name: string;
224
+ description: string;
225
+ buildCommand: string | null;
226
+ startCommand: string;
227
+ autostart: boolean;
228
+ keepAlive: boolean;
229
+ };
230
+ toolIds: string[];
231
+ files: PackedPackage['files'];
232
+ totalBytes: number;
233
+ skipped: ExcludedPackageFile[];
234
+ }
235
+ export interface InstallAppOptions {
236
+ autostart?: boolean;
237
+ keepAlive?: boolean;
238
+ }
206
239
  export interface ReadyOptions {
207
240
  heartbeatIntervalMs?: number;
208
241
  }
@@ -244,8 +277,15 @@ export interface McpResult {
244
277
  }
245
278
  export interface McpTool {
246
279
  name: string;
280
+ title: string;
247
281
  description: string;
248
282
  inputSchema: Record<string, unknown>;
283
+ annotations: {
284
+ readOnlyHint: boolean;
285
+ destructiveHint: boolean;
286
+ idempotentHint: boolean;
287
+ openWorldHint: boolean;
288
+ };
249
289
  handler(args?: Record<string, unknown>): Promise<McpResult>;
250
290
  }
251
291
  export interface JsonRpcRequest {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amalgm/apps",
3
- "version": "0.1.3-preview.34319254403",
3
+ "version": "0.1.3-preview.34545378804",
4
4
  "description": "Local-first, versioned application deployment for Amalgm.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -89,11 +89,11 @@
89
89
  "package.json"
90
90
  ]
91
91
  },
92
- "gitHead": "04d8dffbe3465be4c8d7810dbe311799baaeb526",
92
+ "gitHead": "4cacd05a52114be92df76e204fb80a5b0d06406b",
93
93
  "amalgmSource": {
94
94
  "repository": "amalgm-inc/amalgm-apps",
95
95
  "branch": "preview",
96
- "commit": "04d8dffbe3465be4c8d7810dbe311799baaeb526",
97
- "occurrence": "34319254403"
96
+ "commit": "4cacd05a52114be92df76e204fb80a5b0d06406b",
97
+ "occurrence": "34545378804"
98
98
  }
99
99
  }
@@ -54,7 +54,7 @@ Add an `amalgm.app.json` next to it:
54
54
  Register it:
55
55
 
56
56
  ```bash
57
- npx --yes --package @amalgm/apps amalgm-apps register ./hello
57
+ npx --yes --package @amalgm/apps amalgm-apps create ./hello
58
58
  ```
59
59
 
60
60
  That single command validates the manifest, packages the included files into a release, deploys it, starts the process on an assigned port, and prints the app as JSON — including its `id`, `appRef`, `port`, and `publicUrl`. Ship a new version any time with `npx --yes --package @amalgm/apps amalgm-apps deploy <app-id>`, and step back with `npx --yes --package @amalgm/apps amalgm-apps rollback <app-id>`.
@@ -110,7 +110,7 @@ This prints the parsed manifest, the release digest, the exact files that would
110
110
 
111
111
  Three nouns cover everything you will observe:
112
112
 
113
- - An **app** is a stable identity. Its `id`, `appRef`, `port`, and `publicUrl` are assigned at registration and never change; the manifest seeds the display name, and only `rename` changes it afterward.
113
+ - An **app** is a stable identity. Its `id`, `appRef`, `port`, and `publicUrl` are assigned at registration and never change; the manifest seeds the display name, and only `update` changes it afterward.
114
114
  - A **release** is an immutable, content-addressed snapshot of your manifest plus packaged files. Deploying the same bytes twice yields the same release id — an existing release is never rebuilt.
115
115
  - A **deployment** activates exactly one release. Deployment history is append-only, and a rollback appends a new deployment of an *existing* release — old bytes, never a rebuild.
116
116
 
@@ -118,7 +118,7 @@ Three nouns cover everything you will observe:
118
118
  const app = await apps.register({ cwd: './hello' }); // returns an AppView
119
119
  await apps.deploy(app.id); // package sourceDir again -> new release if bytes changed
120
120
  await apps.rollback(app.id); // previous release; or apps.rollback(id, { releaseId })
121
- await apps.rename(app.id, 'Hello v2');
121
+ await apps.update(app.id, { name: 'Hello v2' });
122
122
  apps.versions(app.id); // Release[]
123
123
  apps.deployments(app.id); // Deployment[]
124
124
  await apps.start(app.id); // start the current deployment, no rebuild
@@ -199,23 +199,28 @@ if (isManaged()) {
199
199
 
200
200
  ## CLI
201
201
 
202
- `amalgm-apps` takes a command plus arguments, prints results as JSON, and exits non-zero on failure. The commands you will actually use day to day:
202
+ `amalgm-apps` takes a command plus arguments, prints the result as JSON, and exits non-zero on failure. The CLI, the MCP tools, and the SDK expose one command surface, so every verb below is also an MCP tool with the same input fields:
203
203
 
204
204
  ```bash
205
- amalgm-apps register <dir> # validate, release, deploy, and start in one step
205
+ amalgm-apps create <dir> # validate, release, deploy, and start in one step
206
206
  amalgm-apps validate <dir> # dry-run: manifest, digest, packaged files
207
207
  amalgm-apps list # all apps with status and health
208
- amalgm-apps show <app-id> # one app in full detail
208
+ amalgm-apps get <app-id> # one app in full detail
209
+ amalgm-apps update <app-id> --name "New name" [--[no-]autostart] [--[no-]keep-alive] [--[no-]dns-connected]
209
210
  amalgm-apps deploy <app-id> [dir] # new release from the source dir (or a new dir)
210
211
  amalgm-apps rollback <app-id> [release-id]
211
212
  amalgm-apps versions <app-id> # release history
212
213
  amalgm-apps deployments <app-id> # deployment history with statuses
214
+ amalgm-apps logs <app-id> [lines] # trailing process log lines
213
215
  amalgm-apps start <app-id>
214
216
  amalgm-apps stop <app-id>
217
+ amalgm-apps export <app-id> # portable package: manifest, packed files, tool ids
218
+ amalgm-apps install --file portable.json # {"app": <export result>, "autostart"?: bool}
219
+ amalgm-apps routes # published routes of running healthy apps
215
220
  amalgm-apps delete <app-id> # stop and remove everything
216
221
  ```
217
222
 
218
- `register` accepts a few flags: `--port <n>` to pin a specific port, `--no-autostart` to register without launching, `--no-keep-alive` to disable crash restarts, and `--no-dns` to keep the app off the public route table. Every command also accepts a global `--state-dir <dir>` to operate on a non-default state directory.
223
+ Bare arguments fill each command's positional fields in order; every field can also be passed as `--field value` (or `--field` / `--no-field` for booleans), and `--input '<json>'` or `--file <path>` supplies the whole input as one object, exactly as an MCP call would. `create` accepts `--port <n>` to pin a specific port, `--no-autostart` to register without launching on boot, `--no-keep-alive` to disable crash restarts, and `--no-connect-dns` to keep the app off the public route table. Every command also accepts a global `--state-dir <dir>` to operate on a non-default state directory. Run `amalgm-apps help` for the generated reference.
219
224
 
220
225
  ## MCP tools
221
226
 
@@ -228,7 +233,7 @@ const tools = createMcpTools(new Apps()); // name, description, inputSchema, han
228
233
  const server = createMcpServer(); // or a full JSON-RPC server: server.start()
229
234
  ```
230
235
 
231
- The tools mirror the CLI one-for-one: `apps_register`, `apps_validate`, `apps_list`, `apps_show`, `apps_deploy`, `apps_versions`, `apps_deployments`, `apps_rollback`, `apps_rename`, `apps_start`, `apps_stop`, `apps_connect_dns`, `apps_disconnect_dns`, and `apps_delete`. This is how an agent connected to Amalgm ships and operates apps on your behalf.
236
+ The tools are the CLI commands one-for-one, named `amalgm_apps_<command>`: `amalgm_apps_create`, `amalgm_apps_list`, `amalgm_apps_get`, `amalgm_apps_update`, `amalgm_apps_delete`, `amalgm_apps_start`, `amalgm_apps_stop`, `amalgm_apps_deploy`, `amalgm_apps_rollback`, `amalgm_apps_versions`, `amalgm_apps_deployments`, `amalgm_apps_logs`, `amalgm_apps_validate`, `amalgm_apps_routes`, `amalgm_apps_export`, and `amalgm_apps_install`. Each carries the command's input schema and MCP annotations (read-only, destructive, idempotent). `appCommandDefinitions` from `@amalgm/apps` is that list, for hosts that build their own adapter. This is how an agent connected to Amalgm ships and operates apps on your behalf.
232
237
 
233
238
  For read-only visibility — a dashboard, a status page — mount the HTTP catalog:
234
239