@fargowealth/fargo-ai-cli 1.1.1 → 1.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.1
4
+
5
+ - Clarified in `fargo lego deploy --help` that deployment preparation creates a
6
+ ready, unpublished deployment and that production publication is a separate
7
+ explicitly approved Fargo Pass MCP action.
8
+ - Documented the 4,000-character release-note limit and replaced full-changelog
9
+ examples with a concise per-release notes file.
10
+ - Documented that publication normally inherits the security-checked access
11
+ policy stored on the prepared deployment.
12
+
13
+ ## 1.2.0
14
+
15
+ - Added `--login-required yes|no` to select the target company-account sign-in
16
+ policy while preparing a LEGO deployment.
17
+ - Public Apps that switch to `yes` default to Collaborators and Owner only;
18
+ `no` prepares a public deployment without an access scope.
19
+ - Included the target login policy in dry-run output and the immutable deployment
20
+ request so publication cannot drift from the security-checked bundle.
21
+
3
22
  ## 1.1.1
4
23
 
5
24
  - Fixed the runtime and OAuth `User-Agent` version so the published CLI reports
package/README.md CHANGED
@@ -78,7 +78,7 @@ fargo lego deploy \
78
78
  --entrypoint index.html \
79
79
  --version 1.4.0 \
80
80
  --name "Navigation refresh" \
81
- --notes-file CHANGELOG.md
81
+ --notes-file RELEASE_NOTES.md
82
82
  ```
83
83
 
84
84
  For Workers use `--target worker`; the default entrypoint becomes `index.js`.
@@ -101,11 +101,18 @@ fargo lego deploy \
101
101
  --assets-binding ASSETS \
102
102
  --assets-not-found-handling single-page-application \
103
103
  --assets-run-worker-first \
104
+ --login-required yes \
104
105
  --version 1.4.0 \
105
106
  --name "Full-stack release" \
106
- --notes-file CHANGELOG.md
107
+ --notes-file RELEASE_NOTES.md
107
108
  ```
108
109
 
110
+ Release notes are limited to 4,000 characters by both the CLI and hosted
111
+ deployment service. Pass concise notes for one version with `--notes`, or keep
112
+ them in a per-release file such as `RELEASE_NOTES.md`. Do not pass an entire
113
+ multi-version changelog unless it is within the limit and intentionally belongs
114
+ to the new release.
115
+
109
116
  Use repeated `--assets-run-worker-first-route <glob>` options instead of the
110
117
  boolean flag when only selected routes should invoke the Worker first. The
111
118
  hosted LEGO publisher uploads the assets and attaches the binding; Cloudflare
@@ -123,6 +130,12 @@ Run `fargo lego deploy --help` for the complete option list and a full-stack
123
130
  Worker example. A dry run reports the manifest schema version and separate
124
131
  Worker-module and Static Asset file counts.
125
132
 
133
+ Use `--login-required no` to prepare a public deployment with no access scope.
134
+ Use `--login-required yes` to require company-account sign-in; when the current
135
+ App is public, the hosted deployment defaults its scope to Collaborators and
136
+ Owner only. Company-wide and specific-member scopes remain available through
137
+ the hosted MCP deployment contract.
138
+
126
139
  Pass `--source-exclude <gitignore-pattern>` once or multiple times when a
127
140
  release command must make additional source exclusions explicit. Secure
128
141
  defaults already exclude `node_modules/`, build output, credentials, and common
@@ -139,6 +152,18 @@ MCP deployment contract. The result is `ready`, never automatically published.
139
152
  Use `--dry-run` to validate both local packages without authentication or
140
153
  network writes.
141
154
 
155
+ After reviewing the returned deployment and receiving explicit approval,
156
+ publish that exact deployment through Fargo Pass MCP:
157
+
158
+ ```sh
159
+ fargo mcp call lego_deployment_release --args \
160
+ '{"action":"publish","appId":"app_xxx","deploymentId":"dep_xxx"}'
161
+ ```
162
+
163
+ Publication is a separate production write. The prepared deployment already
164
+ contains its security-checked access policy, so callers normally do not need to
165
+ repeat `visibility`, `loginRequired`, or `accessTargets` at publish time.
166
+
142
167
  Deployment artifacts preserve binary bytes and include
143
168
  `.fargo-deploy/manifest.json`. Default limits are 1,000 files, 25 MB total,
144
169
  20 MB per file, and a 25 MB ZIP.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fargowealth/fargo-ai-cli",
3
- "version": "1.1.1",
3
+ "version": "1.2.1",
4
4
  "description": "Agent-neutral Fargo AI CLI, MCP client, and LEGO project tooling",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.mjs CHANGED
@@ -87,6 +87,7 @@ export async function runCli(args, options = {}) {
87
87
  deployDir,
88
88
  dryRun: args.includes("--dry-run"),
89
89
  entrypoint: optionValue(args, "--entrypoint"),
90
+ loginRequired: optionalYesNo(args, "--login-required"),
90
91
  releaseNotes,
91
92
  queueConsumer,
92
93
  skipSource: args.includes("--skip-source"),
@@ -156,7 +157,8 @@ Required:
156
157
  --target <pages|worker> Deployment target
157
158
  --version <version> Release version
158
159
  --name <name> Release name
159
- --notes <text> Release notes (or --notes-file <path>)
160
+ --notes <text> One release's notes, maximum 4000 characters
161
+ --notes-file <path> Read one release's notes from a file; same limit
160
162
 
161
163
  Source and execution:
162
164
  --source <directory> Source snapshot root (default: .)
@@ -164,6 +166,8 @@ Source and execution:
164
166
  --entrypoint <path> Default: index.html for Pages, index.js for Worker
165
167
  --skip-source Do not upload a source snapshot
166
168
  --dry-run Validate and summarize without network writes
169
+ --login-required <yes|no> Target company-account sign-in policy; yes defaults
170
+ the access scope to Collaborators and Owner only
167
171
 
168
172
  Worker Static Assets:
169
173
  --assets-dir <directory> Built browser assets; required for Worker frontends
@@ -185,13 +189,18 @@ Worker Runtime Topology:
185
189
  --queue-max-concurrency <n> Optional maximum concurrent consumers
186
190
  --queue-retry-delay <s> Optional retry delay in seconds
187
191
 
192
+ Result and publication:
193
+ This command creates a ready, unpublished deployment. Production traffic is
194
+ unchanged. After review and explicit approval, publish the returned deployment
195
+ with Fargo Pass MCP lego_deployment_release(action=publish).
196
+
188
197
  Example:
189
198
  fargo lego deploy --app app_xxx --source . \\
190
199
  --deploy-dir .build/worker --target worker --entrypoint index.js \\
191
200
  --assets-dir dist --assets-binding ASSETS \\
192
201
  --assets-not-found-handling single-page-application \\
193
202
  --assets-run-worker-first --version 1.4.0 --name "Full-stack release" \\
194
- --notes-file CHANGELOG.md
203
+ --notes-file RELEASE_NOTES.md
195
204
 
196
205
  .fargo-assets/ is an internal archive directory reserved for Fargo CLI.
197
206
  Do not create or copy it manually; always pass browser output with --assets-dir.
@@ -265,6 +274,14 @@ function integerOption(args, optionName, propertyName) {
265
274
  return { [propertyName]: parsed };
266
275
  }
267
276
 
277
+ function optionalYesNo(args, optionName) {
278
+ const value = optionValue(args, optionName)?.trim().toLowerCase();
279
+ if (value === undefined) return undefined;
280
+ if (value === "yes") return true;
281
+ if (value === "no") return false;
282
+ throw new Error(`${optionName} must be yes or no`);
283
+ }
284
+
268
285
  function hasOption(args, name) {
269
286
  return args.some((value) => value === name || value.startsWith(`${name}=`));
270
287
  }
package/src/constants.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export const CLI_VERSION = "1.1.1";
1
+ export const CLI_VERSION = "1.2.1";
2
2
  export const DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
3
3
  export const DEFAULT_AUTH_URL = "https://auth.fargowealth.app";
4
4
  export const DEFAULT_API_URL = "https://mcp.fargowealth.app";
@@ -34,6 +34,7 @@ export async function deployLocalLegoApp(store, input, options = {}) {
34
34
  return {
35
35
  dryRun: true,
36
36
  release: {
37
+ loginRequired: input.loginRequired,
37
38
  notes: input.releaseNotes,
38
39
  version: input.version,
39
40
  versionName: input.versionName
@@ -69,6 +70,7 @@ export async function deployLocalLegoApp(store, input, options = {}) {
69
70
  ...(input.cronSchedules?.length ? { cronSchedules: input.cronSchedules } : {}),
70
71
  deployArtifactId,
71
72
  entrypoint: artifact.entrypoint,
73
+ ...(input.loginRequired === undefined ? {} : { loginRequired: input.loginRequired }),
72
74
  releaseNotes: input.releaseNotes,
73
75
  ...(input.queueConsumer ? { queueConsumer: input.queueConsumer } : {}),
74
76
  version: input.version,