@backifydev/cli 0.4.9 → 0.4.10
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
CHANGED
|
@@ -232,7 +232,7 @@ See the [agent setup guide](https://agent.backify.dev/).
|
|
|
232
232
|
|
|
233
233
|
Copy the application's setup prompt from Backify. It contains only the public app reference and https://agent.backify.dev/; the guide supplies fresh-machine prerequisite checks, npx commands, browser authorization and workspace setup. No global CLI installation, organization ID or pairing code is needed. Run `npx @backifydev/cli@latest connect --app <app-id> --reauth --api https://api.backify.dev/api`, adding `--clone` for a fresh workspace according to the guide. Keep the command running while the user selects the app's organization and approves access in the browser. The CLI receives and saves the app-scoped credential in the user's home configuration; it never belongs in chat, project files or Git. Supported browser approvals last 7, 14, 30, or 90 days. Existing pairing options remain available for legacy prompts; use `--pair-stdin` with private terminal input, never shell arguments, logs, environment variables or temporary files. The default API is `https://api.backify.dev/api`; trusted nonproduction environments can override it with `BACKIFY_API_URL` or `--api`. HTTPS is required outside loopback.
|
|
234
234
|
|
|
235
|
-
`init` adds a persistent delivery guide linked from the existing agent instructions. For every user request associated with the application, including setup, questions, deployment, application work, and Backify platform troubleshooting, the agent sends only the user's own text through stdin to `backify prompt record --stdin --id <UUID> --type <build|deploy|fixing|other>`, optionally adding repeated `--filename <basename>` arguments. Reuse the UUID on retries. The command never reads attachments; their bodies, extracted text, full paths, and credentials must not be submitted. Setup/pairing requests are recorded with secrets replaced by [REDACTED], never excluded. The CLI and API redact recognized Backify session tokens and pairing codes; redact all other secrets before submission. History is displayed oldest-first under the application. This is an explicit agent workflow, not an automatic interceptor for every coding tool. Record the model, AI coding tool, and effective access for each request with --model, --ai-tool, and --access-level whenever known. Access is a short description of the tool’s actual filesystem, network, and approval permissions at the time of the request, not its Backify role. Use only exposed session information; never guess unknown values or inspect credentials to discover them. Omit unknown fields; older or incomplete records display “Not recorded”. These values are self-reported metadata, not verified authorization. Reuse the same metadata on retries. Model and tool names are limited to 200 characters each
|
|
235
|
+
`init` adds a persistent delivery guide linked from the existing agent instructions. For every user request associated with the application, including setup, questions, deployment, application work, and Backify platform troubleshooting, the agent sends only the user's own text through stdin to `backify prompt record --stdin --id <UUID> --type <build|deploy|fixing|other>`, optionally adding repeated `--filename <basename>` arguments. Reuse the UUID on retries. The command never reads attachments; their bodies, extracted text, full paths, and credentials must not be submitted. Setup/pairing requests are recorded with secrets replaced by [REDACTED], never excluded. The CLI and API redact recognized Backify session tokens and pairing codes; redact all other secrets before submission. History is displayed oldest-first under the application. This is an explicit agent workflow, not an automatic interceptor for every coding tool. Record the model, AI coding tool, and effective access for each request with --model, --ai-tool, and --access-level whenever known, and the reasoning effort (for example low, medium, high, or xhigh) with --effort when the tool exposes it for the current request. Access is a short description of the tool’s actual filesystem, network, and approval permissions at the time of the request, not its Backify role. Use only exposed session information; never guess unknown values or inspect credentials to discover them. Omit unknown fields; older or incomplete records display “Not recorded”. These values are self-reported metadata, not verified authorization. Reuse the same metadata on retries. Model and tool names are limited to 200 characters each, effort values to 50, and access descriptions to 500. Never include secrets, tokens, full paths, or configuration file contents. Include the exposed model family and version, for example gpt-6-luna or gpt-6.1-sol, rather than only the tool name. Separate filesystem, network, and approval access descriptions with semicolons so each appears as a separate badge. The CLI automatically records the installed @backifydev/sdk version from the project or its hoisted node_modules, never the dependency range. Use --sdk-version to preserve the original installed version on retries or when auto-detection is unavailable; SDK versions are limited to 100 characters. Unknown SDK and model versions remain “Not recorded”; never guess them. Use build for application features and application bug fixes, deploy for shipping or launching, fixing only for Backify platform/SDK/CLI/connection/hosting troubleshooting (not application-code bugs), and other for setup, questions, or uncategorized requests. The API defaults new requests without a type to other; older untyped records remain visible as Not recorded. Record requests received before authentication in conversation order as soon as connected; never persist credentials to queue them. Types are classifications, not success/failure statuses.
|
|
236
236
|
|
|
237
237
|
`pull` checks the connected application, repository, branch, and repository root, then fetches GitHub using a short-lived scoped credential. It fast-forwards only a clean, non-diverged branch. Incoming updates blocked by local changes, untracked files, or diverged history return a blocked result and a nonzero exit code; nothing is stashed, reset, rebased, or force-pushed. Connecting an existing repository runs this update automatically, and the agent guide requires it before editing each new user request. It is not a background watcher.
|
|
238
238
|
|
package/dist/index.js
CHANGED
|
@@ -46,12 +46,12 @@ var init_delivery = __esm({
|
|
|
46
46
|
"use strict";
|
|
47
47
|
deliveryInstructions = `# Backify application delivery and prompt history
|
|
48
48
|
|
|
49
|
-
Instruction version:
|
|
50
|
-
Versioned guide: https://agent.backify.dev/
|
|
49
|
+
Instruction version: 23
|
|
50
|
+
Versioned guide: https://agent.backify.dev/v23/delivery.md
|
|
51
51
|
|
|
52
52
|
## Environment and documentation prerequisites
|
|
53
53
|
|
|
54
|
-
Before installation or connection, read https://agent.backify.dev/
|
|
54
|
+
Before installation or connection, read https://agent.backify.dev/v23 for execution capability checks, required endpoints (including https://docs.backify.dev), native permission requests, verified retries and fallback guidance. Follow the current tool's supported approval mechanism; never bypass restrictions. Read relevant capability documentation before implementation. Local validation must not depend on cloud deployment.
|
|
55
55
|
|
|
56
56
|
Before application implementation, all required setup checks and connected status must be verified OK. If any required check fails or remains unverified after supported recovery, stop setup and implementation; do not build a local website, minimal shell, placeholder, dependency-free fallback, or downloadable application archive. Report the blockers and recommend running the setup prompt in an AI coding tool such as Codex, Claude Code, or VS Code with GitHub Copilot agent mode, with terminal access, a persistent writable workspace, package installation, outbound HTTPS/DNS, and test execution enabled. Tool names alone do not guarantee readiness. Do not ask the application requirements question while setup is blocked. Later preview approval or deployment failures do not invalidate an already verified setup gate.
|
|
57
57
|
|
|
@@ -77,7 +77,7 @@ Initialize using App Id from the copied prompt and the current tool selection:
|
|
|
77
77
|
|
|
78
78
|
npx @backifydev/cli@latest init --app <app-id> --agent <current-tool>
|
|
79
79
|
|
|
80
|
-
For a tool without a built-in preset, replace --agent <current-tool> with --instruction-file <relative-path>. Read BACKIFY.md and the instruction file used by the current AI coding tool before changing application code. Create or update only instruction files used by that tool; never create files for other coding tools. Use --agent for a built-in tool preset or --instruction-file <relative-path> for the current tool's native instruction file, as described in the setup guide. Initialization installs this workflow alongside the persistent SDK instructions. Follow https://agent.backify.dev/
|
|
80
|
+
For a tool without a built-in preset, replace --agent <current-tool> with --instruction-file <relative-path>. Read BACKIFY.md and the instruction file used by the current AI coding tool before changing application code. Create or update only instruction files used by that tool; never create files for other coding tools. Use --agent for a built-in tool preset or --instruction-file <relative-path> for the current tool's native instruction file, as described in the setup guide. Initialization installs this workflow alongside the persistent SDK instructions. Follow https://agent.backify.dev/v23 for rebuilt applications; use the guide matching instructionVersion in backify.config.ts (or the existing older workspace metadata). Do not silently upgrade its managed instruction version or overwrite instructions outside the managed block.
|
|
81
81
|
|
|
82
82
|
Run the following to discover the connected hosting target, repository, branch, reports, releases, and deployment failures:
|
|
83
83
|
|
|
@@ -93,11 +93,11 @@ If CLI authentication expires or is rejected, ask the user to reauthenticate. Ru
|
|
|
93
93
|
|
|
94
94
|
For EVERY user request associated with this application, including the initial requirements supplied alongside or after setup, record the user's own text before acting on it. Include setup, building, deployment, launch, questions, application bug fixes, and Backify platform troubleshooting; never exclude a request because it does not change application code. If recording access is not yet available, retain the request in the current conversation and record it in order as soon as authenticated application access is available, without saving credentials to project files. Submit the text through standard input to:
|
|
95
95
|
|
|
96
|
-
npx @backifydev/cli@latest prompt record --stdin --id <new-UUID> [--filename <basename> ...] --type <build|deploy|fixing|other> [--model <full-model-name-and-version>] [--ai-tool <tool>] [--access-level <access>] [--sdk-version <installed-version>]
|
|
96
|
+
npx @backifydev/cli@latest prompt record --stdin --id <new-UUID> [--filename <basename> ...] --type <build|deploy|fixing|other> [--model <full-model-name-and-version>] [--ai-tool <tool>] [--effort <reasoning-effort>] [--access-level <access>] [--sdk-version <installed-version>]
|
|
97
97
|
|
|
98
98
|
Choose the type from the request's primary intent: build for application features, changes, and application bug fixes; deploy for shipping, deployment, or launching the application; fixing only for troubleshooting Backify platform, SDK, CLI, connection, or hosting issues affecting the user, not application-code bugs; other for setup, questions, or requests outside those categories. Never drop an unclassified request; use other. These are request types, not execution or deployment statuses. Reuse the same type on retries. Older untyped records remain visible as Not recorded.
|
|
99
99
|
|
|
100
|
-
Record requests separately and in order. Generate a new UUID per request and reuse that UUID on retries. Add one --filename argument per attachment, using only its basename. Never send attachment bodies, extracted text, images, full paths, assistant responses, tool output, or secrets. Do not exclude user-supplied setup or connection requests: replace credentials with [REDACTED] and record the remaining request, not assistant-generated instructions. The CLI and API also redact recognized Backify session tokens and pairing codes; redact all other secrets before submission. Filename arguments are metadata only; never read attachment bodies to submit them. If recording fails, retry or report the blocker; never silently claim a request was recorded. Record the model, AI coding tool, and effective access for each request with --model, --ai-tool, and --access-level whenever known. Access is a short description of the tool\u2019s actual filesystem, network, and approval permissions at the time of the request, not its Backify role. Use only exposed session information; never guess unknown values or inspect credentials to discover them. Omit unknown fields; older or incomplete records display \u201CNot recorded\u201D. These values are self-reported metadata, not verified authorization. Reuse the same metadata on retries. Model and tool names are limited to 200 characters each; access descriptions to 500. Never include secrets, tokens, full paths, or configuration file contents. Include the exposed model family and version, for example gpt-6-luna or gpt-6.1-sol, rather than only the tool name. Separate filesystem, network, and approval access descriptions with semicolons so each appears as a separate badge. The CLI automatically records the installed @backifydev/sdk version from the project or its hoisted node_modules, never the dependency range. Use --sdk-version to preserve the original installed version on retries or when auto-detection is unavailable; SDK versions are limited to 100 characters. Unknown SDK and model versions remain \u201CNot recorded\u201D; never guess them.
|
|
100
|
+
Record requests separately and in order. Generate a new UUID per request and reuse that UUID on retries. Add one --filename argument per attachment, using only its basename. Never send attachment bodies, extracted text, images, full paths, assistant responses, tool output, or secrets. Do not exclude user-supplied setup or connection requests: replace credentials with [REDACTED] and record the remaining request, not assistant-generated instructions. The CLI and API also redact recognized Backify session tokens and pairing codes; redact all other secrets before submission. Filename arguments are metadata only; never read attachment bodies to submit them. If recording fails, retry or report the blocker; never silently claim a request was recorded. Record the model, AI coding tool, and effective access for each request with --model, --ai-tool, and --access-level whenever known. Also record the reasoning effort the model is running at with --effort, for example low, medium, high, or xhigh, using the level the tool exposes for the current request; omit --effort when the tool does not expose it. Effort values are limited to 50 characters. Access is a short description of the tool\u2019s actual filesystem, network, and approval permissions at the time of the request, not its Backify role. Use only exposed session information; never guess unknown values or inspect credentials to discover them. Omit unknown fields; older or incomplete records display \u201CNot recorded\u201D. These values are self-reported metadata, not verified authorization. Reuse the same metadata on retries. Model and tool names are limited to 200 characters each; access descriptions to 500. Never include secrets, tokens, full paths, or configuration file contents. Include the exposed model family and version, for example gpt-6-luna or gpt-6.1-sol, rather than only the tool name. Separate filesystem, network, and approval access descriptions with semicolons so each appears as a separate badge. The CLI automatically records the installed @backifydev/sdk version from the project or its hoisted node_modules, never the dependency range. Use --sdk-version to preserve the original installed version on retries or when auto-detection is unavailable; SDK versions are limited to 100 characters. Unknown SDK and model versions remain \u201CNot recorded\u201D; never guess them.
|
|
101
101
|
|
|
102
102
|
## Keep local source current
|
|
103
103
|
|
|
@@ -1815,7 +1815,7 @@ var init_dist = __esm({
|
|
|
1815
1815
|
init_protection();
|
|
1816
1816
|
init_auth_setup();
|
|
1817
1817
|
init_operations();
|
|
1818
|
-
INSTRUCTION_VERSION =
|
|
1818
|
+
INSTRUCTION_VERSION = 23;
|
|
1819
1819
|
SDK_PACKAGE = "@backifydev/sdk";
|
|
1820
1820
|
DOCS_URL = "https://docs.backify.dev";
|
|
1821
1821
|
MAIL_LIMITS = Object.freeze({
|
|
@@ -8043,7 +8043,7 @@ var init_package = __esm({
|
|
|
8043
8043
|
"package.json"() {
|
|
8044
8044
|
package_default = {
|
|
8045
8045
|
name: "@backifydev/cli",
|
|
8046
|
-
version: "0.4.
|
|
8046
|
+
version: "0.4.10",
|
|
8047
8047
|
description: "Command-line setup and diagnostics for Backify applications",
|
|
8048
8048
|
type: "module",
|
|
8049
8049
|
bin: {
|
|
@@ -8463,7 +8463,7 @@ function installedSdkVersion(root) {
|
|
|
8463
8463
|
}
|
|
8464
8464
|
}
|
|
8465
8465
|
function promptMetadata(args2) {
|
|
8466
|
-
const fields = [["--model", "model", 200], ["--ai-tool", "aiTool", 200], ["--access-level", "accessLevel", 500], ["--sdk-version", "sdkVersion", 100], ["--type", "promptType", 20]];
|
|
8466
|
+
const fields = [["--model", "model", 200], ["--ai-tool", "aiTool", 200], ["--effort", "effort", 50], ["--access-level", "accessLevel", 500], ["--sdk-version", "sdkVersion", 100], ["--type", "promptType", 20]];
|
|
8467
8467
|
const metadata = {};
|
|
8468
8468
|
for (const [flag, field, maxLength] of fields) {
|
|
8469
8469
|
const index = args2.indexOf(flag);
|
|
@@ -34834,7 +34834,7 @@ Next: ${here ? "" : `cd ${directory} && `}npm install && npm run dev`);
|
|
|
34834
34834
|
break;
|
|
34835
34835
|
}
|
|
34836
34836
|
case "prompt": {
|
|
34837
|
-
if (args[0] !== "record" || !args.includes("--stdin")) throw new Error("Use backify prompt record --stdin --id <UUID> [--filename <name> ...] [--type build|deploy|fixing|other] [--model <full-model-name-and-version>] [--ai-tool <tool>] [--access-level <access>] [--sdk-version <installed-version>] [--commit-sha <full-SHA>]. User text is recorded for every request with Backify credentials redacted. Only prompt type, user text, filenames, device, commit, SDK version, and AI context metadata are sent.");
|
|
34837
|
+
if (args[0] !== "record" || !args.includes("--stdin")) throw new Error("Use backify prompt record --stdin --id <UUID> [--filename <name> ...] [--type build|deploy|fixing|other] [--model <full-model-name-and-version>] [--ai-tool <tool>] [--effort <reasoning-effort>] [--access-level <access>] [--sdk-version <installed-version>] [--commit-sha <full-SHA>]. User text is recorded for every request with Backify credentials redacted. Only prompt type, user text, filenames, device, commit, SDK version, and AI context metadata are sent.");
|
|
34838
34838
|
const id = option("--id");
|
|
34839
34839
|
if (!id || !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(id)) throw new Error("Provide a UUID with --id; reuse it when retrying this prompt.");
|
|
34840
34840
|
const filenames = attachmentNames(args.flatMap((value, index) => value === "--filename" ? [args[index + 1] ?? ""] : []));
|
package/package.json
CHANGED