@agency-tbd/cli 0.5.0 → 0.5.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/README.md +48 -3
- package/dist/agent.js +5 -0
- package/dist/catalog.js +2 -2
- package/dist/commands.js +3 -3
- package/dist/files.js +86 -57
- package/dist/help.js +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -127,7 +127,15 @@ Cursor pagination uses `--max-pages N`, optionally `--cursor-field nextCursor --
|
|
|
127
127
|
|
|
128
128
|
`batch --input @operations.json` takes an array of `{ "resource": "clients", "path": ["list"], "input": { "limit": 1 } }` entries. Execution is sequential and non-atomic, stops at the first failure, and reports completed/remaining entries. `--dry-run` validates entries without executing their business handlers. Never rerun an entire partially completed batch blindly.
|
|
129
129
|
|
|
130
|
-
Use `files routes` before `files upload <route> <file...> --type MIME
|
|
130
|
+
Use `files routes` before `files upload <route> <file...> --type MIME` to see each route's accepted types and size limits. File uploads are not API operations: `operations file-uploads` only lists and deletes existing files. Downloads use `files download <key> --output new-file`.
|
|
131
|
+
|
|
132
|
+
To attach a receipt, upload it to the `paymentDocument` route (images and PDF, 4 MB each), which needs permission to edit campaigns. Each result has a `key` and a `reference`. Save the `reference`, such as `/api/files/<key>`, as `receiptUrl` with `financial recordPayment`, or with `financial updatePaymentMetadata` when the payment is already recorded; a bare key is rejected. Uploading never records or settles a payment.
|
|
133
|
+
|
|
134
|
+
After an uncertain link, read the payment back before repeating anything. An uncertain upload changes no payment, and repeating it stores a new file. `file-uploads list` needs user-management permission and does not show which payment uses a file.
|
|
135
|
+
|
|
136
|
+
Upload failures name the server's reason, such as `FILE_TOO_LARGE`, and list any files already completed. `INCOMPATIBLE_SERVER` means the installed CLI and the server have diverged: update the CLI rather than guessing another endpoint. CLI 0.5.0 cannot upload files or list upload routes, because it calls a route the server no longer has; use 0.5.1 or later.
|
|
137
|
+
|
|
138
|
+
Provider OAuth and device approval require browser consent. Provider credentials and provider readiness remain separate constraints.
|
|
131
139
|
|
|
132
140
|
`http` is an advanced same-origin escape hatch. The route inventory contains internal-service routes, provider callbacks and webhooks as well as ordinary app endpoints. Listing does not imply bearer-token support or permission; follow the existing application flow and never invoke callbacks or webhooks as substitutes for it. Raw HTTP has no generic dry-run. See [HTTP transport](src/transport.ts) and [file transport](src/files.ts).
|
|
133
141
|
|
|
@@ -173,7 +181,24 @@ For repository development, install dependencies with `pnpm install --frozen-loc
|
|
|
173
181
|
|
|
174
182
|
Before publishing, run `pnpm --filter @agency-tbd/cli release:check` on a supported Node.js release. It runs type checks, CLI tests, catalog validation and an isolated npm installation of the actual packed archive. Package contents are limited to compiled JavaScript, the README and package metadata; repository source, tests, source maps and local configuration are excluded. `pnpm pack` replaces workspace catalog references with installable dependency versions.
|
|
175
183
|
|
|
176
|
-
|
|
184
|
+
[`published-http-routes.json`](published-http-routes.json) names the oldest supported CLI release and lists every route and named resource that supported releases need. Tests fail if the CLI calls something undeclared or the server removes something listed. Add new calls when you write them. Remove an entry only after a CLI without it is on npm, and only with the version raised to that release. Tests cannot see npm, so reviewers must check that step. Merging does not publish: until the release is on npm, `@latest` keeps the old behavior.
|
|
185
|
+
|
|
186
|
+
Hosted Actions cannot currently start jobs, so publish from this Mac with the [release script](../../scripts/cli-release.mjs). Log in with `npm login` as a package maintainer, check out the latest `main`, and first confirm that required backend migrations and deployment are done:
|
|
187
|
+
|
|
188
|
+
```sh
|
|
189
|
+
corepack pnpm cli:publish --sha <main-commit> --version <version> --dry-run
|
|
190
|
+
corepack pnpm cli:publish --sha <main-commit> --version <version> --backend-ready
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
The command requires that the commit is the latest `main`, is the merge of a pull request whose identical source passed `local-gate/ci:check` with the service suites, and has that unpublished version. It builds and qualifies a fresh copy of the commit with a frozen install, publishes once using npm's own authentication prompts, then checks the registry archive, the `latest` tag and an anonymous installation. `--dry-run` needs no login and writes nothing to the registry: it stops at `npm publish --dry-run`, then runs the anonymous-install check against the current `latest`. Unknown flags are refused.
|
|
194
|
+
|
|
195
|
+
If you interrupt a run, its temporary copy stays registered; `git worktree prune` clears it once the folder is gone.
|
|
196
|
+
|
|
197
|
+
`npm publish` is never retried. After an uncertain result the archive is kept, its path and integrity are printed, and `node scripts/cli-release.mjs verify-published <version> <integrity>` rechecks the registry.
|
|
198
|
+
|
|
199
|
+
Publishing this way gives up safeguards the workflow has: npm's short-lived trusted identity, the environment's `main`-only rule, separate jobs for publishing and verifying, and pinned Node.js and npm versions. The gate status is reported by a local machine, so it is only as strong as the accounts that can write commit statuses.
|
|
200
|
+
|
|
201
|
+
If Actions runs again, the manually dispatched [Publish CLI workflow](../../.github/workflows/publish-cli.yml) applies the same source check. Select `main` and supply the full reviewed commit SHA, the CLI version and confirmation that required backend migrations/deployment have been verified. The workflow repeats package qualification, and publishes the same archived bytes using npm's short-lived GitHub identity. A separate job with no publishing permission verifies registry integrity, the `latest` tag and an anonymous installation. Readback waits up to ten minutes for the version, latest tag and npm installation metadata to agree, then installs with a fresh anonymous cache. Only readback requests may be retried; the publish command is never retried automatically. It has no npm token and requires no per-release security-key challenge. A failed or timed-out publication must be reconciled against the registry before another dispatch; an existing version is rejected rather than republished.
|
|
177
202
|
|
|
178
203
|
One-time setup by a package maintainer:
|
|
179
204
|
|
|
@@ -182,7 +207,7 @@ One-time setup by a package maintainer:
|
|
|
182
207
|
3. In the [npm package settings](https://www.npmjs.com/package/@agency-tbd/cli/access), add a GitHub Actions trusted publisher for owner `eternalwaitt`, repository `agency-tbd`, workflow filename `publish-cli.yml`, environment `npm-publish`, and direct `npm publish` permission. This configuration requires npm's security-key authorization once. Equivalently, use `npm trust github @agency-tbd/cli --repo eternalwaitt/agency-tbd --file publish-cli.yml --environment npm-publish --allow-publish` with a supported npm CLI and complete that one setup authorization. Preserve any existing publisher configurations.
|
|
183
208
|
4. Run the workflow for the reviewed main SHA and inspect its registry/install verification. Trust setup alone does not prove a publication works. This repository is private, so npm provenance is disabled; the workflow still authenticates through OIDC and verifies the archive checksum.
|
|
184
209
|
|
|
185
|
-
|
|
210
|
+
npm may require a separate 2FA challenge for each publish even after login. Do not use repeated login/publish attempts as the normal release process. Direct-publish bypass tokens are being retired in January 2027; they are not the durable automation path. See [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) and [token policy](https://docs.npmjs.com/about-access-tokens/).
|
|
186
211
|
|
|
187
212
|
CLI-only releases need no application deployment. New server-backed features such as support require the matching backend migration, configuration and deployment before publishing the CLI that advertises them. For each subsequent release, increment `apps/cli/package.json`'s version before review and publication; the CLI version output and API compatibility header read that same version. Do not reuse a published version. Do not claim installation from the registry works until the release is visible and verified there.
|
|
188
213
|
|
|
@@ -289,3 +314,23 @@ then UUID descending. Activity remains the default order. Follow `nextCursor` wi
|
|
|
289
314
|
the same filters/order; restart when those change. Pagination is over a changing
|
|
290
315
|
list, so restart for a current inventory if reports change while paging. Deploy the
|
|
291
316
|
backend/migration before publishing the CLI; publishing is a separate action.
|
|
317
|
+
|
|
318
|
+
## Externally signed participant contracts
|
|
319
|
+
|
|
320
|
+
For a final PDF already signed outside Influmode and retained in Google Drive, discover
|
|
321
|
+
`help contracts registerExternalDocument`. Use a new, untouched influencer contract draft
|
|
322
|
+
(with no versions, signers or signature invitations), the exact Drive file-view HTTPS URL,
|
|
323
|
+
filename and SHA-256 supplied by the operator, and `signedExternally:true` only after the
|
|
324
|
+
operator has confirmed external signing. This registers a reference; it does not upload or
|
|
325
|
+
fetch the PDF, verify its bytes/signatures, change Drive sharing, or send an invitation.
|
|
326
|
+
The contract becomes active with `signingSource:external`; its hash is operator-attested.
|
|
327
|
+
No signer records or signing timestamps are invented. The reference is immutable through
|
|
328
|
+
this operation and `addVersion`; repeating the identical registration is a no-op, and a
|
|
329
|
+
changed payload is rejected.
|
|
330
|
+
|
|
331
|
+
Read the contract back, then use `campaigns linkInfluencerContract` with the exact participant
|
|
332
|
+
and matching influencer contract. Read that participant back before proceeding to another.
|
|
333
|
+
The existing participant-link checks prevent cross-influencer and cross-tenant association;
|
|
334
|
+
replacing an existing link requires its previously read contract ID. These commands remain
|
|
335
|
+
subject to normal business-write approval. `contracts addVersion` continues to accept only
|
|
336
|
+
tenant-owned uploaded files and must not be used for a Drive reference.
|
package/dist/agent.js
CHANGED
|
@@ -23,6 +23,11 @@ export const agentGuide = {
|
|
|
23
23
|
retry: "Never automatically retry a mutation after an ambiguous failure; inspect saved state first.",
|
|
24
24
|
coverage: "API access does not reproduce UI preparation or prove every workflow is executable.",
|
|
25
25
|
},
|
|
26
|
+
files: {
|
|
27
|
+
upload: "File uploads are not API operations: run influmode files routes, then influmode files upload <route> <file> --type MIME. operations file-uploads only lists and deletes existing files.",
|
|
28
|
+
receipts: "Upload to the paymentDocument route, which needs permission to edit campaigns. Save the returned reference (not the key) as receiptUrl with financial recordPayment, or with financial updatePaymentMetadata when the payment is already recorded. Uploading never records or settles a payment.",
|
|
29
|
+
recovery: "After an uncertain link, read the payment back before repeating anything. An uncertain upload changes no payment; a repeat stores a new file. file-uploads list needs user-management permission and does not show which payment uses a file.",
|
|
30
|
+
},
|
|
26
31
|
support: {
|
|
27
32
|
purpose: "Report bugs, compatibility problems, missing platform features or questions to the InfluMode team without GitHub access.",
|
|
28
33
|
help: "influmode support --help",
|
package/dist/catalog.js
CHANGED
|
@@ -83,8 +83,8 @@ export const httpRoutes = [
|
|
|
83
83
|
"/api/social-auth/instagram/deletion-status/[code]",
|
|
84
84
|
"/api/status",
|
|
85
85
|
"/api/status/source",
|
|
86
|
-
"/api/
|
|
87
|
-
"/api/
|
|
86
|
+
"/api/uploads",
|
|
87
|
+
"/api/uploads/[slug]",
|
|
88
88
|
"/api/v1/analytics/influencer-report/export",
|
|
89
89
|
"/api/v1/analytics/network-cash-lane-details/export",
|
|
90
90
|
"/api/v1/contract-generation/download",
|
package/dist/commands.js
CHANGED
|
@@ -3,7 +3,7 @@ import { positive } from "./args.js";
|
|
|
3
3
|
import { logout, status } from "./auth.js";
|
|
4
4
|
import { CliError } from "./errors.js";
|
|
5
5
|
import { batch, call } from "./execute.js";
|
|
6
|
-
import { download, upload } from "./files.js";
|
|
6
|
+
import { download, routes, upload } from "./files.js";
|
|
7
7
|
import { readJson } from "./input.js";
|
|
8
8
|
import { saveOutput } from "./output.js";
|
|
9
9
|
import { describe } from "./schema.js";
|
|
@@ -79,9 +79,9 @@ async function callOptions(values) {
|
|
|
79
79
|
async function fileCommand(connection, { values, positionals }) {
|
|
80
80
|
const [, subcommand, ...rest] = positionals;
|
|
81
81
|
if (subcommand === "routes")
|
|
82
|
-
return (
|
|
82
|
+
return routes(connection);
|
|
83
83
|
if (subcommand === "upload" && rest[0])
|
|
84
|
-
return upload(connection, rest[0], rest.slice(1), values.type ?? "application/octet-stream",
|
|
84
|
+
return upload(connection, rest[0], rest.slice(1), values.type ?? "application/octet-stream", values["dry-run"] ?? false);
|
|
85
85
|
if (subcommand === "download" && rest[0] && values.output)
|
|
86
86
|
return download(connection, rest[0], values.output);
|
|
87
87
|
throw new CliError("USAGE", "Use files routes, upload <route> <file...> --type MIME, or download <key> --output file", 2);
|
package/dist/files.js
CHANGED
|
@@ -1,82 +1,111 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
1
2
|
import { readFile } from "node:fs/promises";
|
|
2
3
|
import { basename } from "node:path";
|
|
3
4
|
import { CliError } from "./errors.js";
|
|
4
5
|
import { saveOutput } from "./output.js";
|
|
5
|
-
import { http } from "./transport.js";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { apiPath, http } from "./transport.js";
|
|
7
|
+
import { cliVersion } from "./version.js";
|
|
8
|
+
/** Failures whose own code tells the caller what to do next, unlike a generic upload failure. */
|
|
9
|
+
const SELF_EXPLAINING_CODES = new Set(["INCOMPATIBLE_SERVER", "UNKNOWN_UPLOAD_ROUTE"]);
|
|
10
|
+
function isRecord(value) {
|
|
11
|
+
return typeof value === "object" && value !== null;
|
|
12
|
+
}
|
|
13
|
+
/** A route that should exist returned 404: the installed CLI and this server have diverged. */
|
|
14
|
+
function incompatibleServer(pathname) {
|
|
15
|
+
return new CliError("INCOMPATIBLE_SERVER", `CLI ${cliVersion} and this server do not match: ${pathname} does not exist. Update with npm install --global @agency-tbd/cli@latest; if it is already the latest, report it with influmode support.`, 5, { cliVersion, path: pathname, status: 404 });
|
|
16
|
+
}
|
|
17
|
+
/** Lists the upload routes with their accepted types and size limits. */
|
|
18
|
+
export async function routes(connection) {
|
|
19
|
+
try {
|
|
20
|
+
return (await (await http(connection, "/api/uploads")).json());
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
if (error instanceof CliError &&
|
|
24
|
+
error.code === "HTTP_ERROR" &&
|
|
25
|
+
isRecord(error.details) &&
|
|
26
|
+
error.details["status"] === 404)
|
|
27
|
+
throw incompatibleServer("/api/uploads");
|
|
28
|
+
throw error;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** A system code or error type only: a transport message may repeat local or request details. */
|
|
32
|
+
function transportCause(error) {
|
|
33
|
+
const code = isRecord(error.cause) ? error.cause["code"] : undefined;
|
|
34
|
+
return typeof code === "string" ? code : error.name;
|
|
35
|
+
}
|
|
36
|
+
/** Keeps the reason a file failed alongside the files that were already stored. */
|
|
37
|
+
function batchFailure(error, completed, failedIndex) {
|
|
38
|
+
const failed = error instanceof CliError ? error : null;
|
|
39
|
+
return new CliError(failed && SELF_EXPLAINING_CODES.has(failed.code) ? failed.code : "UPLOAD_FAILED", `${failed?.message ?? "File upload failed"}; inspect completed files before retrying`, failed?.exitCode ?? 1, {
|
|
40
|
+
completed,
|
|
41
|
+
failedIndex,
|
|
42
|
+
...(failed?.details ? { failure: failed.details } : {}),
|
|
43
|
+
...(!failed && error instanceof Error ? { failure: { cause: transportCause(error) } } : {}),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/** Sends each file to the same tenant-authorized private upload route the UI uses. */
|
|
47
|
+
export async function upload(connection, slug, filenames, type, dryRun) {
|
|
8
48
|
if (!/^[a-zA-Z][a-zA-Z0-9]*$/.test(slug) || !filenames.length)
|
|
9
49
|
throw new CliError("USAGE", "Use files upload <route> <file...> --type <mime>", 2);
|
|
10
50
|
const files = await Promise.all(filenames.map(async (name) => new File([await readFile(name)], basename(name), { type })));
|
|
11
|
-
const
|
|
12
|
-
input: input ?? null,
|
|
13
|
-
files: files.map((file) => ({
|
|
14
|
-
name: file.name,
|
|
15
|
-
size: file.size,
|
|
16
|
-
type: file.type,
|
|
17
|
-
lastModified: file.lastModified,
|
|
18
|
-
})),
|
|
19
|
-
};
|
|
51
|
+
const described = files.map((file) => ({ name: file.name, size: file.size, type: file.type }));
|
|
20
52
|
if (dryRun)
|
|
21
|
-
return { executed: false, validated: false, route: slug, files:
|
|
22
|
-
const response = await http(connection, `/api/uploadthing?actionType=upload&slug=${encodeURIComponent(slug)}`, "POST", body, { "x-uploadthing-version": "7.7.4", "x-uploadthing-package": "influmode-cli" });
|
|
23
|
-
const data = await response.json();
|
|
24
|
-
if (!Array.isArray(data) || data.length !== files.length)
|
|
25
|
-
throw new CliError("UPLOAD_PROTOCOL_ERROR", "Invalid upload allocation", 1);
|
|
53
|
+
return { executed: false, validated: false, route: slug, files: described };
|
|
26
54
|
const results = [];
|
|
27
|
-
for (const [index,
|
|
28
|
-
const file = files[index];
|
|
29
|
-
if (!file)
|
|
30
|
-
throw new CliError("UPLOAD_PROTOCOL_ERROR", "Missing upload file", 1);
|
|
55
|
+
for (const [index, file] of files.entries()) {
|
|
31
56
|
try {
|
|
32
|
-
results.push(await
|
|
57
|
+
results.push(await uploadOne(connection, slug, file));
|
|
33
58
|
}
|
|
34
|
-
catch {
|
|
35
|
-
throw
|
|
59
|
+
catch (error) {
|
|
60
|
+
throw batchFailure(error, results, index);
|
|
36
61
|
}
|
|
37
62
|
}
|
|
38
63
|
return { files: results };
|
|
39
64
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
throw new CliError("UPLOAD_PROTOCOL_ERROR", "Untrusted upload target", 1);
|
|
54
|
-
return { url, key: raw.key };
|
|
55
|
-
}
|
|
56
|
-
async function uploadAllocated(connection, raw, file) {
|
|
57
|
-
const { url, key } = uploadTarget(raw);
|
|
58
|
-
const form = new FormData();
|
|
59
|
-
form.append("file", file);
|
|
60
|
-
// Bearer credentials are sent only to Influmode, never to storage.
|
|
61
|
-
const uploaded = await fetch(url, {
|
|
62
|
-
method: "PUT",
|
|
63
|
-
body: form,
|
|
64
|
-
headers: { Range: "bytes=0-", "x-uploadthing-version": "7.7.4" },
|
|
65
|
-
redirect: "error",
|
|
65
|
+
async function uploadOne(connection, slug, file) {
|
|
66
|
+
const response = await fetch(apiPath(connection.origin, `/api/uploads/${slug}`), {
|
|
67
|
+
method: "POST",
|
|
68
|
+
body: new Uint8Array(await file.arrayBuffer()),
|
|
69
|
+
headers: {
|
|
70
|
+
Authorization: `Bearer ${connection.token}`,
|
|
71
|
+
"content-type": file.type || "application/octet-stream",
|
|
72
|
+
// The upload route accepts only requests that name the app's own origin.
|
|
73
|
+
origin: connection.origin,
|
|
74
|
+
"x-correlation-id": connection.requestId ?? randomUUID(),
|
|
75
|
+
"x-upload-file-name": encodeURIComponent(file.name),
|
|
76
|
+
},
|
|
77
|
+
redirect: "manual",
|
|
66
78
|
signal: AbortSignal.timeout(connection.timeout),
|
|
67
79
|
});
|
|
68
|
-
if (!
|
|
69
|
-
throw
|
|
70
|
-
const result = await
|
|
71
|
-
if (!result || typeof result
|
|
72
|
-
throw new CliError("
|
|
80
|
+
if (!response.ok)
|
|
81
|
+
throw await uploadFailure(response, slug);
|
|
82
|
+
const result = await response.json();
|
|
83
|
+
if (!isRecord(result) || typeof result["key"] !== "string")
|
|
84
|
+
throw new CliError("UPLOAD_PROTOCOL_ERROR", "Invalid upload response", 1);
|
|
85
|
+
const reference = isRecord(result["serverData"]) ? result["serverData"]["fileUrl"] : undefined;
|
|
73
86
|
return {
|
|
74
|
-
key,
|
|
87
|
+
key: result["key"],
|
|
75
88
|
name: file.name,
|
|
76
89
|
size: file.size,
|
|
77
|
-
|
|
90
|
+
// The form receiptUrl and other file fields accept; a bare key is rejected there.
|
|
91
|
+
...(typeof reference === "string" ? { reference } : {}),
|
|
92
|
+
...("serverData" in result ? { serverData: result["serverData"] } : {}),
|
|
78
93
|
};
|
|
79
94
|
}
|
|
95
|
+
/** The server's stable failure code, when the response carries one. */
|
|
96
|
+
async function failureCode(response) {
|
|
97
|
+
const body = await response.json().catch(() => null);
|
|
98
|
+
const code = isRecord(body) ? body["code"] : null;
|
|
99
|
+
return typeof code === "string" && /^[A-Z_]{1,64}$/u.test(code) ? code : null;
|
|
100
|
+
}
|
|
101
|
+
async function uploadFailure(response, slug) {
|
|
102
|
+
const code = await failureCode(response);
|
|
103
|
+
if (code === "UNKNOWN_UPLOAD_ROUTE")
|
|
104
|
+
return new CliError(code, `Unknown upload route ${slug}; run influmode files routes`, 2);
|
|
105
|
+
if (response.status === 404)
|
|
106
|
+
return incompatibleServer(`/api/uploads/${slug}`);
|
|
107
|
+
return new CliError("UPLOAD_FAILED", `Upload failed with HTTP ${response.status}${code ? ` (${code})` : ""}`, response.status === 401 ? 3 : response.status === 403 ? 4 : 1, { status: response.status, ...(code ? { code } : {}) });
|
|
108
|
+
}
|
|
80
109
|
export async function download(connection, key, output) {
|
|
81
110
|
return saveOutput(output, () => http(connection, `/api/files/${encodeURIComponent(key)}`));
|
|
82
111
|
}
|
package/dist/help.js
CHANGED
|
@@ -34,7 +34,7 @@ Draft/preview are offline. Draft adds only CLI/Node/OS/architecture diagnostics
|
|
|
34
34
|
capabilities: "influmode capabilities [resource] [--search text]\nRead current account context and explicit execution limits. Optional resource adds live operation summaries. Effective operation permissions are not evaluated.",
|
|
35
35
|
schema: "influmode schema <resource> [operation.path]\nLive JSON input/output schemas. Requires login. Discovery does not evaluate permission or business state.",
|
|
36
36
|
batch: 'influmode batch --input @operations.json [--dry-run]\nInput: [{"resource":"clients","path":["list"],"input":{"limit":1}}]\nSequential, non-atomic; stops at the first failure. Inspect completed results before resuming. Dry-run validates inputs only.',
|
|
37
|
-
files: "influmode files routes\ninflumode files upload <route> <file...> --type MIME
|
|
37
|
+
files: "influmode files routes\ninflumode files upload <route> <file...> --type MIME\ninflumode files download <key> --output new-file\nInspect routes and their file limits first. Upload writes to Influmode private storage and returns a key and a reference. Use paymentDocument for receipts, then save that reference (not the key) in receiptUrl. Uploading never records or settles a payment. Downloads never overwrite files.",
|
|
38
38
|
http: "influmode http <GET|POST|PUT|PATCH|DELETE> /api/path [--input @input.json] [--output new-file]\nAdvanced escape hatch, restricted to the selected origin. Inspect the existing application flow first. No generic dry-run support. Do not use it to bypass permissions.",
|
|
39
39
|
call: "influmode call <resource> <operation.path> --input @input.json [--dry-run]\nEquivalent to influmode <resource> <operation.path>. Get the live schema first. Dry-run checks input only.",
|
|
40
40
|
guide: "influmode guide [--json]\nOffline agent workflow, execution limits, input conventions and recovery. skill is an alias.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agency-tbd/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Operate InfluMode from your terminal or AI assistant using your own account and permissions",
|
|
5
5
|
"homepage": "https://www.influmode.com",
|
|
6
6
|
"repository": {
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"check-types": "tsc --noEmit",
|
|
42
42
|
"dev": "tsx src/main.ts",
|
|
43
43
|
"release:check": "pnpm check-types && pnpm test && node scripts/check-package.mjs",
|
|
44
|
-
"release:publish": "pnpm release:check && pnpm publish --access public",
|
|
45
44
|
"test": "pnpm build && vitest run --config vitest.config.ts"
|
|
46
45
|
}
|
|
47
46
|
}
|