@miosa/cli 1.0.56 → 1.0.57
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/CHANGELOG.md +12 -0
- package/README.md +65 -42
- package/dist/app-advisor.d.ts +80 -0
- package/dist/app-advisor.d.ts.map +1 -0
- package/dist/app-advisor.js +486 -0
- package/dist/app-advisor.js.map +1 -0
- package/dist/bin/miosa.js +9 -0
- package/dist/bin/miosa.js.map +1 -1
- package/dist/commands/app.d.ts +3 -0
- package/dist/commands/app.d.ts.map +1 -0
- package/dist/commands/app.js +115 -0
- package/dist/commands/app.js.map +1 -0
- package/dist/commands/capabilities.d.ts.map +1 -1
- package/dist/commands/capabilities.js +232 -5
- package/dist/commands/capabilities.js.map +1 -1
- package/dist/commands/command-overview.d.ts +13 -0
- package/dist/commands/command-overview.d.ts.map +1 -0
- package/dist/commands/command-overview.js +50 -0
- package/dist/commands/command-overview.js.map +1 -0
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +248 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/databases.d.ts.map +1 -1
- package/dist/commands/databases.js +85 -0
- package/dist/commands/databases.js.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +109 -2
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/docker-deploy.d.ts.map +1 -1
- package/dist/commands/docker-deploy.js +197 -127
- package/dist/commands/docker-deploy.js.map +1 -1
- package/dist/commands/enterprise-util.d.ts +3 -1
- package/dist/commands/enterprise-util.d.ts.map +1 -1
- package/dist/commands/enterprise-util.js +25 -9
- package/dist/commands/enterprise-util.js.map +1 -1
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +171 -17
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/new.js +2 -2
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/sandbox.d.ts.map +1 -1
- package/dist/commands/sandbox.js +380 -40
- package/dist/commands/sandbox.js.map +1 -1
- package/dist/commands/util.d.ts.map +1 -1
- package/dist/commands/util.js +6 -1
- package/dist/commands/util.js.map +1 -1
- package/dist/config.d.ts +24 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +87 -0
- package/dist/config.js.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to @miosa/cli will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.0.54] - 2026-06-10
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Publish workflow now uses npm Trusted Publishing provenance instead of an empty `NPM_TOKEN` secret.
|
|
9
|
+
|
|
10
|
+
## [1.0.53] - 2026-06-10
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- `miosa docker-deploy ensure --wait` waits for the workspace appliance host to become active and healthy.
|
|
14
|
+
- `miosa docker-deploy doctor <deployment-id>` verifies Docker Deploy metadata, host readiness, appliance route, and public URL health.
|
|
15
|
+
- `miosa app plan --goal docker-deploy --json` now includes the doctor command as the post-publish proof step.
|
|
16
|
+
|
|
5
17
|
## [1.0.1] - 2026-05-22
|
|
6
18
|
|
|
7
19
|
### Added
|
package/README.md
CHANGED
|
@@ -13,14 +13,48 @@ miosa update
|
|
|
13
13
|
miosa update --check --json
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
## Contexts and command discovery
|
|
17
|
+
|
|
18
|
+
Save named contexts when you work across personal accounts, team accounts, or
|
|
19
|
+
customer workspaces:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
miosa login
|
|
23
|
+
miosa context save personal
|
|
24
|
+
miosa context set workspace workspace_123
|
|
25
|
+
|
|
26
|
+
miosa login --api-key msk_u_team...
|
|
27
|
+
miosa context save clinic-dev
|
|
28
|
+
|
|
29
|
+
miosa context ls
|
|
30
|
+
miosa context use clinic-dev
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Agents and scripts should use JSON:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
miosa context ls --json
|
|
37
|
+
miosa context use clinic-dev --json
|
|
38
|
+
miosa command-overview --json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`miosa command-overview` prints a tree of all command groups and nested
|
|
42
|
+
subcommands. Use `miosa capabilities --json` for the higher-level agent workflow
|
|
43
|
+
contract.
|
|
44
|
+
|
|
16
45
|
## Deploy — 60 seconds to first deploy
|
|
17
46
|
|
|
18
47
|
Point the CLI at any repo and it handles the rest: framework detection, build wiring, GitHub webhook setup, and live log streaming.
|
|
19
48
|
|
|
49
|
+
For production app hosting, MIOSA recommends Docker Deploy. It runs apps on the
|
|
50
|
+
workspace Docker Deploy runtime, which is the preferred path for teams deploying
|
|
51
|
+
many apps because it gives better runtime packing and lower resource overhead
|
|
52
|
+
than one-off app runtimes.
|
|
53
|
+
|
|
20
54
|
```
|
|
21
55
|
$ cd ~/my-project
|
|
22
56
|
$ miosa login
|
|
23
|
-
$ miosa deploy
|
|
57
|
+
$ miosa deploy --docker-deploy
|
|
24
58
|
|
|
25
59
|
Detected: Next.js 15 (confidence 95%)
|
|
26
60
|
Repo: https://github.com/me/my-project
|
|
@@ -56,7 +90,7 @@ $ miosa deploy
|
|
|
56
90
|
|
|
57
91
|
Deployed
|
|
58
92
|
|
|
59
|
-
URL: https://my-project-x7k2.
|
|
93
|
+
URL: https://my-project-x7k2.me.miosa.app
|
|
60
94
|
|
|
61
95
|
Next steps:
|
|
62
96
|
miosa deploy logs — tail logs
|
|
@@ -74,6 +108,21 @@ miosa deploy
|
|
|
74
108
|
miosa deploy redeploy
|
|
75
109
|
```
|
|
76
110
|
|
|
111
|
+
For apps built inside a sandbox, promote the sandbox workspace through Docker Deploy:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
miosa sandbox publish <sandbox-id> \
|
|
115
|
+
--path /workspace \
|
|
116
|
+
--slug my-app \
|
|
117
|
+
--build-command "npm run build" \
|
|
118
|
+
--run-command "npm run start" \
|
|
119
|
+
--port 3000 \
|
|
120
|
+
--docker-deploy \
|
|
121
|
+
--wait \
|
|
122
|
+
--timeout 900 \
|
|
123
|
+
--json
|
|
124
|
+
```
|
|
125
|
+
|
|
77
126
|
## Agentic sandbox app templates
|
|
78
127
|
|
|
79
128
|
Agents should start from app templates instead of empty sandboxes when building common web apps. For a working Next.js starter with a public preview:
|
|
@@ -118,51 +167,24 @@ Discover the full agent contract with:
|
|
|
118
167
|
miosa capabilities --json
|
|
119
168
|
```
|
|
120
169
|
|
|
121
|
-
###
|
|
122
|
-
|
|
123
|
-
Agents can commit `miosa.app.yml`, `miosa.app.yaml`, or `miosa.app.json` to make
|
|
124
|
-
publishing repeatable.
|
|
125
|
-
|
|
126
|
-
```yaml
|
|
127
|
-
name: clinic-intake
|
|
128
|
-
type: dynamic
|
|
129
|
-
build: npm run build
|
|
130
|
-
run: npm start
|
|
131
|
-
port: 3000
|
|
132
|
-
readiness:
|
|
133
|
-
path: /
|
|
134
|
-
resources:
|
|
135
|
-
database:
|
|
136
|
-
auto: true
|
|
137
|
-
engine: postgresql
|
|
138
|
-
size: xs
|
|
139
|
-
storage:
|
|
140
|
-
auto: true
|
|
141
|
-
domain: intake.apps.cliniciq.com
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
Resource values use the backend compose protocol:
|
|
145
|
-
|
|
146
|
-
```text
|
|
147
|
-
auto: true -> provision and wire a new resource
|
|
148
|
-
select: <id> -> attach an existing resource
|
|
149
|
-
false/omitted -> do not attach that resource
|
|
150
|
-
```
|
|
170
|
+
### Agent-safe exec and logs
|
|
151
171
|
|
|
152
|
-
|
|
153
|
-
|
|
172
|
+
Use explicit command flags when a command contains shell flags, pipes, redirects,
|
|
173
|
+
or `bash -c` style arguments:
|
|
154
174
|
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
175
|
+
```bash
|
|
176
|
+
miosa sandbox exec <sandbox-id> \
|
|
177
|
+
--cwd /workspace \
|
|
178
|
+
--cmd "npm install && npm run build" \
|
|
179
|
+
--shell-cmd "bash -lc" \
|
|
180
|
+
--json
|
|
159
181
|
```
|
|
160
182
|
|
|
161
|
-
|
|
183
|
+
Top-level logs can target a resource explicitly and filter recent output:
|
|
162
184
|
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
|
|
185
|
+
```bash
|
|
186
|
+
miosa logs --deployment <app-id> --lines 200 --contains error --json
|
|
187
|
+
miosa logs --sandbox <sandbox-id> --regex "500|panic|failed" --json
|
|
166
188
|
```
|
|
167
189
|
|
|
168
190
|
### Deploy sub-commands
|
|
@@ -247,6 +269,7 @@ Precedence: CLI flags > environment variables > config file > interactive prompt
|
|
|
247
269
|
Deploy a GitHub repo. See the [Deploy section](#deploy--60-seconds-to-first-deploy) above for the full flow.
|
|
248
270
|
|
|
249
271
|
```bash
|
|
272
|
+
miosa deploy --docker-deploy # Recommended production deploy
|
|
250
273
|
miosa deploy # First deploy or redeploy from .miosa.json
|
|
251
274
|
miosa deploy list [--json] # List all deployments
|
|
252
275
|
miosa deploy logs [id] # Tail live build logs
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type Framework } from "./framework-detector.js";
|
|
2
|
+
import { type LoadedAppManifest } from "./app-manifest.js";
|
|
3
|
+
export type AppGoal = "preview" | "deploy" | "docker-deploy";
|
|
4
|
+
export interface AppInspectResult {
|
|
5
|
+
path: string;
|
|
6
|
+
manifest: {
|
|
7
|
+
path: string;
|
|
8
|
+
data: LoadedAppManifest["manifest"];
|
|
9
|
+
} | null;
|
|
10
|
+
framework: {
|
|
11
|
+
id: Framework | "unknown";
|
|
12
|
+
label: string;
|
|
13
|
+
confidence: number;
|
|
14
|
+
alternatives: Array<{
|
|
15
|
+
id: Framework;
|
|
16
|
+
label: string;
|
|
17
|
+
confidence: number;
|
|
18
|
+
}>;
|
|
19
|
+
files_examined: string[];
|
|
20
|
+
};
|
|
21
|
+
package_manager: string | null;
|
|
22
|
+
dockerfile: string | null;
|
|
23
|
+
commands: {
|
|
24
|
+
install: string | false | null;
|
|
25
|
+
dev: string | null;
|
|
26
|
+
build: string | null;
|
|
27
|
+
start: string | null;
|
|
28
|
+
};
|
|
29
|
+
runtime: {
|
|
30
|
+
port: number | null;
|
|
31
|
+
probe_path: string;
|
|
32
|
+
output_path: string | null;
|
|
33
|
+
needs_database: boolean;
|
|
34
|
+
env_keys: string[];
|
|
35
|
+
};
|
|
36
|
+
recommendation: {
|
|
37
|
+
template: string;
|
|
38
|
+
deployment: "docker_deploy" | "standard_deploy" | "static_publish";
|
|
39
|
+
reason: string;
|
|
40
|
+
};
|
|
41
|
+
risks: string[];
|
|
42
|
+
next: string[];
|
|
43
|
+
}
|
|
44
|
+
export interface AppPlanStep {
|
|
45
|
+
id: string;
|
|
46
|
+
command: string;
|
|
47
|
+
purpose: string;
|
|
48
|
+
json: boolean;
|
|
49
|
+
wait?: boolean;
|
|
50
|
+
destructive?: boolean;
|
|
51
|
+
optional?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface AppPlanResult {
|
|
54
|
+
goal: AppGoal;
|
|
55
|
+
recommended_deploy: "docker_deploy" | "standard_deploy" | "static_publish";
|
|
56
|
+
template: string;
|
|
57
|
+
port: number | null;
|
|
58
|
+
probe_path: string;
|
|
59
|
+
build_command: string | null;
|
|
60
|
+
run_command: string | null;
|
|
61
|
+
output_path: string | null;
|
|
62
|
+
requires: {
|
|
63
|
+
database: boolean;
|
|
64
|
+
env_keys: string[];
|
|
65
|
+
};
|
|
66
|
+
steps: AppPlanStep[];
|
|
67
|
+
edge_cases: Array<{
|
|
68
|
+
code: string;
|
|
69
|
+
meaning: string;
|
|
70
|
+
recovery: string[];
|
|
71
|
+
}>;
|
|
72
|
+
}
|
|
73
|
+
export declare function inspectApp(inputDir: string): AppInspectResult;
|
|
74
|
+
export declare function planApp(inputDir: string, options?: {
|
|
75
|
+
goal?: AppGoal;
|
|
76
|
+
slug?: string;
|
|
77
|
+
workspace?: string;
|
|
78
|
+
preferDockerDeploy?: boolean;
|
|
79
|
+
}): AppPlanResult;
|
|
80
|
+
//# sourceMappingURL=app-advisor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-advisor.d.ts","sourceRoot":"","sources":["../src/app-advisor.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAQL,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,eAAe,CAAC;AAE7D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;KACrC,GAAG,IAAI,CAAC;IACT,SAAS,EAAE;QACT,EAAE,EAAE,SAAS,GAAG,SAAS,CAAC;QAC1B,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,KAAK,CAAC;YAClB,EAAE,EAAE,SAAS,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;YACd,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC,CAAC;QACH,cAAc,EAAE,MAAM,EAAE,CAAC;KAC1B,CAAC;IACF,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAAC;QAC/B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB,CAAC;IACF,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,GAAG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