@backifydev/cli 0.3.11 → 0.3.12

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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/dist/index.js +48 -20
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -272,11 +272,11 @@ See the [agent setup guide](https://agent.backify.dev/).
272
272
 
273
273
  Copy the application AI prompt in Backify to receive the application ID, organization ID, and an application-scoped, single-use pairing code; the agent guide supplies the connection and initialization commands. Codes expire after 15 minutes; redeemed sessions expire after seven days. Add `--clone` even when the current folder contains AI coding-tool scaffolding. Empty directories of any name are allowed. Hidden tool-metadata directories and files, Markdown instruction files, and default `work/` and `outputs/` directories may contain tool settings or artifacts. The CLI clones into a temporary directory, validates collisions, then merges without deleting or overwriting existing tool files. Existing Git metadata, root application source, and symlinked tool directories are rejected; file conflicts stop before repository files are installed. Credentials are stored in the user's home configuration, not the project. The default API is `https://api.backify.dev/api`; local development can override it with `BACKIFY_API_URL` or the connection command's `--api` option. HTTPS is required outside loopback.
274
274
 
275
- `init` adds a persistent delivery guide linked from the existing agent instructions. Before each application-building request, the agent sends only the user's own text through stdin to `backify prompt record --stdin --id <UUID>`, optionally adding repeated `--filename <basename>` arguments. Reuse the UUID on retries. The command never reads attachments; their bodies, extracted text, full paths, setup/pairing prompts, and credentials must not be submitted. 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; access descriptions to 500. Never include secrets, tokens, full paths, or configuration file contents.
275
+ `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; 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.
276
276
 
277
277
  `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.
278
278
 
279
- `ship` runs configured checks, verifies the repository/branch, and pushes already-committed source using a short-lived repository-scoped GitHub App credential. It never stages, commits, force-pushes, or fabricates preview testing. By default it waits for the exact healthy preview and returns its URL without requesting production publication. Promote the preview in the portal, or explicitly run `ship --production-deploy` to request publication through existing policy and permissions. Required testing/approval returns a pending state and preview URL, not a false successful production deployment. The legacy `--preview-only` flag remains supported but cannot be combined with `--production-deploy`. Use `--timeout <seconds>` to change the default 1200-second wait. Applications must currently be at the repository root; Backify Cloud needs static index.html output, and customer Azure needs a Dockerfile serving port 8080.
279
+ `ship` runs configured checks, verifies the repository/branch, and pushes already-committed source using a short-lived repository-scoped GitHub App credential. It never stages, commits, force-pushes, or fabricates preview testing. By default it waits for the exact healthy preview and returns its URL without requesting production publication. Plain requests such as “Now deploy” and approval to merge and retry remain preview-only; production requires an explicit user request to deploy to production. Instruction version 10 (CLI 0.3.12) makes this distinction explicit in installed guidance. Promote the preview in the portal, or explicitly run `ship --production-deploy` to request publication through existing policy and permissions. Required testing/approval returns a pending state and preview URL, not a false successful production deployment. The legacy `--preview-only` flag remains supported but cannot be combined with `--production-deploy`. Use `--timeout <seconds>` to change the default 1200-second wait. Applications must currently be at the repository root; Backify Cloud needs static index.html output, and customer Azure needs a Dockerfile serving port 8080.
280
280
 
281
281
  `disconnect` revokes that user's application CLI sessions. `logout` removes local credentials only. Prompt histories and local reports remain subject to application permissions. Deploy the matching API and publish CLI 0.3.0 before enabling this flow in production.
282
282
 
package/dist/index.js CHANGED
@@ -17766,12 +17766,12 @@ function manifestDiagnostics(manifest, used, authentication) {
17766
17766
  // ../platform/dist/delivery.js
17767
17767
  var deliveryInstructions = `# Backify application delivery and prompt history
17768
17768
 
17769
- Instruction version: 9
17770
- Versioned guide: https://agent.backify.dev/v9/delivery.md
17769
+ Instruction version: 10
17770
+ Versioned guide: https://agent.backify.dev/v10/delivery.md
17771
17771
 
17772
17772
  ## Environment and documentation prerequisites
17773
17773
 
17774
- Before installation or connection, read https://agent.backify.dev/v9 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.
17774
+ Before installation or connection, read https://agent.backify.dev/v10 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.
17775
17775
 
17776
17776
  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.
17777
17777
 
@@ -17783,7 +17783,7 @@ The copied Backify prompt supplies App Id, Organization, and, when available, Pa
17783
17783
 
17784
17784
  npx @backifydev/cli@latest connect --app <app-id> --organization <organization-id> --api https://api.backify.dev/api --pair <pairing-code>
17785
17785
 
17786
- If Pair is absent, omit --pair and use CLI browser login. Pairing expires after 15 minutes. Never record the code or setup prompt in project files, Git, prompt history, or logs. The CLI stores an application-scoped session outside the repository. If CLI access expires, use the browser reauthentication workflow below, never another setup prompt. A fresh pairing code is needed only if initial pairing expired or was consumed.
17786
+ If Pair is absent, omit --pair and use CLI browser login. Pairing expires after 15 minutes. Never record the code in project files, Git, prompt history, or logs. Record the user-supplied setup request in prompt history only after redacting credentials; do not drop the request. The CLI stores an application-scoped session outside the repository. If CLI access expires, use the browser reauthentication workflow below, never another setup prompt. A fresh pairing code is needed only if initial pairing expired or was consumed.
17787
17787
 
17788
17788
  Before connecting, inspect the current folder. If it is not a Git repository, is missing its .git directory or file, or has no Git remote, add --clone to the connect command. Default AI coding-tool directories and instruction files do not make a workspace an existing application. Run connect --clone in the current folder even when tool scaffolding exists, including configuration, rules, agents, skills, commands, prompts, and work/output directories. This is tool-independent: preserve the current tool's metadata and instructions regardless of its name; never delete or overwrite them to make the folder empty. The CLI recognizes empty directories of any name, hidden tool-metadata directories and files, Markdown instruction files, and default work/outputs directories, including their contents. It clones into a temporary folder, checks for file conflicts, and safely merges the repository into the current workspace. If actual application source or an existing .git is present, or repository files conflict with existing entries, stop and reconcile the workspace or use a new folder; never overwrite user work. In an existing repository with a remote, verify it matches the connected repository and branch; never overwrite unrelated files or force-push.
17789
17789
 
@@ -17791,13 +17791,13 @@ Initialize using App Id from the copied prompt and the current tool selection:
17791
17791
 
17792
17792
  npx @backifydev/cli@latest init --app <app-id> --agent <current-tool>
17793
17793
 
17794
- 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/v9 for instruction version 9; use the guide matching backify.json in an existing application. Do not silently upgrade its managed instruction version or overwrite instructions outside the managed block.
17794
+ 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/v10 for instruction version 10; use the guide matching backify.json in an existing application. Do not silently upgrade its managed instruction version or overwrite instructions outside the managed block.
17795
17795
 
17796
17796
  Run the following to discover the connected hosting target, repository, branch, reports, releases, and deployment failures:
17797
17797
 
17798
17798
  npx @backifydev/cli@latest status
17799
17799
 
17800
- Connection and initialization may proceed without application requirements. Then ask what to build if none were supplied; never invent requirements or record this setup text as a user requirement.
17800
+ Connection and initialization may proceed without application requirements. Then ask what to build if none were supplied; never invent requirements or treat setup text as an application requirement. Record user-supplied setup requests in prompt history as other after redacting credentials.
17801
17801
 
17802
17802
  ## Reauthenticate CLI access
17803
17803
 
@@ -17805,11 +17805,13 @@ If CLI authentication expires or is rejected, ask the user to reauthenticate. Ru
17805
17805
 
17806
17806
  ## Record each user request
17807
17807
 
17808
- For EVERY user request to build or modify this application, including the initial requirements supplied alongside or after setup, record only the user's own requirement text before changing application code. Submit the text through standard input to:
17808
+ 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:
17809
17809
 
17810
- npx @backifydev/cli@latest prompt record --stdin --id <new-UUID> [--filename <basename> ...] [--model <model>] [--ai-tool <tool>] [--access-level <access>]
17810
+ 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>]
17811
17811
 
17812
- 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, secrets, connection commands, or this setup/pairing block. 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.
17812
+ 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.
17813
+
17814
+ 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.
17813
17815
 
17814
17816
  ## Keep local source current
17815
17817
 
@@ -17835,7 +17837,9 @@ After the required setup gate passes and application requirements are supplied,
17835
17837
 
17836
17838
  Start the application, wait for readiness, request the actual local application URL, and verify a representative user flow before shipping. Document safe seed data and local test identities where needed. A failed connection or required setup check must stop implementation, including local fallback. After setup passes, later preview approval or deployment failure must not prevent safe local testing; report those blockers separately without bypassing authorization. If requirements are missing after successful setup, ask the required final question without creating a minimal runnable shell. Never claim local readiness from a build or management-dashboard response alone.
17837
17839
 
17838
- ## Verify, push, and publish
17840
+ ## Verify, push, and deploy to preview
17841
+
17842
+ Plain deployment requests are preview-only. Requests such as "Now deploy", "deploy", "ship", "launch", or "merge and retry" do not authorize production. Approval to merge a remote commit, push source, retry deployment, or run checks applies only to that action and preserves the preview target. Never infer production intent from permissive policy, a healthy preview, or an existing production URL.
17839
17843
 
17840
17844
  Run:
17841
17845
 
@@ -17845,9 +17849,13 @@ Fix relevant failures, then commit only application changes for this request usi
17845
17849
 
17846
17850
  npx @backifydev/cli@latest ship
17847
17851
 
17848
- The CLI verifies the repository and branch, runs checks, pushes committed source using a short-lived repository-scoped credential, waits for the exact source's healthy preview, and publishes through existing Backify permissions and policy. It never stages or commits files, force-pushes, changes hosting, fabricates preview testing, or bypasses approval. Use --preview-only only when the user requests a preview.
17852
+ The CLI verifies the repository and branch, runs checks, pushes committed source using a short-lived repository-scoped credential, waits for the exact source's healthy preview, and returns the preview URL without requesting production publication. It never stages or commits files, force-pushes, changes hosting, fabricates preview testing, or bypasses approval. The legacy --preview-only flag is optional; preview is already the default.
17853
+
17854
+ Production requires an explicit user request to deploy to production, such as "deploy to production", "publish to production", or "promote this preview to production". Only for that request run:
17855
+
17856
+ npx @backifydev/cli@latest ship --production-deploy
17849
17857
 
17850
- If testing or approval is required, return the preview URL and explain the remaining action. Otherwise return the verified production URL and actual check results only after healthy activation. Inspect failures with the status command, fix them, and retry without asking the user to perform routine deployment steps. Never invent a successful check or deployment.
17858
+ Production publication still follows existing Backify permissions, testing, and approval policy. If testing or approval is required, return the preview URL and explain the remaining action; never fabricate testing or bypass approval. Otherwise return the verified production URL and actual check results only after healthy activation. For a plain deployment request, stop at the verified healthy preview even when production testing and approval are not required. Inspect failures with the status command, fix them, and retry the same target without asking the user to perform routine deployment steps. Never invent a successful check or deployment.
17851
17859
 
17852
17860
  ## User-facing handoff
17853
17861
 
@@ -17865,7 +17873,7 @@ These instructions are an explicit agent workflow, not a universal chat intercep
17865
17873
  `;
17866
17874
 
17867
17875
  // ../platform/dist/index.js
17868
- var INSTRUCTION_VERSION = 9;
17876
+ var INSTRUCTION_VERSION = 10;
17869
17877
  var SDK_PACKAGE = "@backifydev/sdk";
17870
17878
  var DOCS_URL = "https://docs.backify.dev";
17871
17879
  var MAIL_LIMITS = Object.freeze({
@@ -17943,7 +17951,7 @@ Run relevant tests, typechecking, lint, and builds using the repository's script
17943
17951
 
17944
17952
  ## Connected application delivery
17945
17953
 
17946
- For connected applications, follow \`BACKIFY.md\` and https://agent.backify.dev/v${INSTRUCTION_VERSION}/delivery.md before changing application code. Record every user build or modification request, including initial requirements, with attachment filenames only; never submit attachment contents or setup credentials. Verify checks and publish through the connected CLI workflow without bypassing testing, approval, or coding-tool permissions. Report only verified deployment URLs.
17954
+ For connected applications, follow \`BACKIFY.md\` and https://agent.backify.dev/v${INSTRUCTION_VERSION}/delivery.md before changing application code. Record every user build or modification request, including initial requirements, with attachment filenames only; never submit attachment contents or setup credentials. Verify checks and deploy to preview through the connected CLI workflow without bypassing testing, approval, or coding-tool permissions. Plain deployment requests are preview-only. Production requires an explicit user request to deploy to production; approval to merge, push, or retry does not authorize production. Use \`ship\` for preview and \`ship --production-deploy\` only for that explicit production request. Report only verified deployment URLs.
17947
17955
 
17948
17956
  ## Instruction maintenance
17949
17957
 
@@ -18165,7 +18173,7 @@ import { hostname, platform, release, arch } from "node:os";
18165
18173
  // package.json
18166
18174
  var package_default = {
18167
18175
  name: "@backifydev/cli",
18168
- version: "0.3.11",
18176
+ version: "0.3.12",
18169
18177
  description: "Command-line setup and diagnostics for Backify applications",
18170
18178
  type: "module",
18171
18179
  bin: {
@@ -18400,10 +18408,27 @@ function promptContext(root = process.cwd()) {
18400
18408
  commitSha = git(["rev-parse", "HEAD"], root);
18401
18409
  } catch {
18402
18410
  }
18403
- return { device: cliDevice(), commitSha };
18411
+ return { device: cliDevice(), commitSha, sdkVersion: installedSdkVersion(root) };
18412
+ }
18413
+ function installedSdkVersion(root) {
18414
+ let directory2 = resolve4(root);
18415
+ while (true) {
18416
+ const manifest = join4(directory2, "node_modules", "@backifydev", "sdk", "package.json");
18417
+ if (existsSync4(manifest)) {
18418
+ try {
18419
+ const sdk = JSON.parse(readFileSync4(manifest, "utf8"));
18420
+ return sdk.name === "@backifydev/sdk" && typeof sdk.version === "string" && /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(sdk.version) ? sdk.version : null;
18421
+ } catch {
18422
+ return null;
18423
+ }
18424
+ }
18425
+ const parent = dirname4(directory2);
18426
+ if (parent === directory2) return null;
18427
+ directory2 = parent;
18428
+ }
18404
18429
  }
18405
18430
  function promptMetadata(args2) {
18406
- const fields5 = [["--model", "model", 200], ["--ai-tool", "aiTool", 200], ["--access-level", "accessLevel", 500]];
18431
+ const fields5 = [["--model", "model", 200], ["--ai-tool", "aiTool", 200], ["--access-level", "accessLevel", 500], ["--sdk-version", "sdkVersion", 100], ["--type", "promptType", 20]];
18407
18432
  const metadata = {};
18408
18433
  for (const [flag, field, maxLength] of fields5) {
18409
18434
  const index = args2.indexOf(flag);
@@ -18413,6 +18438,10 @@ function promptMetadata(args2) {
18413
18438
  throw new Error(`Provide ${flag} with a nonempty value of at most ${maxLength} characters without control characters or credentials.`);
18414
18439
  metadata[field] = value;
18415
18440
  }
18441
+ if (metadata.promptType !== void 0) {
18442
+ metadata.promptType = metadata.promptType.toLowerCase();
18443
+ if (!["build", "deploy", "fixing", "other"].includes(metadata.promptType)) throw new Error("Use --type build, deploy, fixing, or other.");
18444
+ }
18416
18445
  const commitIndex = args2.indexOf("--commit-sha");
18417
18446
  if (commitIndex >= 0) {
18418
18447
  const value = args2[commitIndex + 1];
@@ -18554,8 +18583,7 @@ async function readPrompt(input) {
18554
18583
  }
18555
18584
  const text3 = Buffer.concat(chunks).toString("utf8");
18556
18585
  if (!text3.trim() || text3.length > 32e3) throw new Error("Provide between 1 and 32000 characters of user prompt text.");
18557
- if (/\bbfcli_[0-9a-f]{64}\b|--pair\s+[0-9a-f]{64}/i.test(text3)) throw new Error("Do not record setup prompts or Backify credentials.");
18558
- return text3;
18586
+ return text3.replace(/bfcli_[0-9a-f]{64}/gi, "[REDACTED]").replace(/(--pair(?:\s+|=)["']?|\bPair:\s*)[0-9a-f]{64}/gi, "$1[REDACTED]");
18559
18587
  }
18560
18588
  function attachmentNames(values) {
18561
18589
  if (values.length > 50) throw new Error("At most 50 attachment filenames are allowed.");
@@ -23871,7 +23899,7 @@ async function main() {
23871
23899
  break;
23872
23900
  }
23873
23901
  case "prompt": {
23874
- if (args[0] !== "record" || !args.includes("--stdin")) throw new Error("Use backify prompt record --stdin --id <UUID> [--filename <name> ...] [--model <model>] [--ai-tool <tool>] [--access-level <access>] [--commit-sha <full-SHA>]. Only user text, filenames, device, commit, and AI context metadata are sent.");
23902
+ 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.");
23875
23903
  const id = option("--id");
23876
23904
  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.");
23877
23905
  const filenames = attachmentNames(args.flatMap((value, index) => value === "--filename" ? [args[index + 1] ?? ""] : []));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backifydev/cli",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "Command-line setup and diagnostics for Backify applications",
5
5
  "type": "module",
6
6
  "bin": {