breakaway 1.4.0-main.56 → 1.4.0-main.58

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "breakaway",
3
- "version": "1.4.0-main.56",
3
+ "version": "1.4.0-main.58",
4
4
  "description": "The task board for you and your coding agents: a Cloudflare Worker, its web app, Taskwarrior sync, and the CLI (npx breakaway).",
5
5
  "license": "FSL-1.1-Apache-2.0",
6
6
  "type": "module",
@@ -0,0 +1,17 @@
1
+ /**
2
+ * What the owner keeps (DOC-22): the files on their machine that hold the only copy of a value the board needs again.
3
+ * The Secrets Store, Worker secrets, and the board never give a value back. init-secrets prints this list, and the
4
+ * operations docs give a recovery for each (docs/tasks.md#what-to-keep). Names files only, never a value.
5
+ *
6
+ * @param {{ envFile: string, routinesFile: string, githubFile: string }} paths as the owner should read them (~/…)
7
+ * @returns {string[]}
8
+ */
9
+ export function keepLines({ envFile, routinesFile, githubFile }) {
10
+ const width = Math.max(envFile.length, routinesFile.length, githubFile.length) + 2;
11
+ return [
12
+ "Keep these in your password manager: the board can't give their values back (docs/tasks.md#what-to-keep).",
13
+ ` ${envFile.padEnd(width)}the token, and the only copy of the sync secret`,
14
+ ` ${routinesFile.padEnd(width)}once agents-connect --repo writes it: the other repositories' routines`,
15
+ ` ${githubFile.padEnd(width)}only if github-connect writes it: the App's keys, until they're stored`,
16
+ ];
17
+ }
package/scripts/tasks.mjs CHANGED
@@ -80,6 +80,7 @@ import {
80
80
  removedRepoByHand,
81
81
  unknownSubcommand,
82
82
  } from './tasks/cli.js';
83
+ import { keepLines } from './tasks/keep.js';
83
84
  import { mergeViews, pelotonLines, pelotonPost, pickPeloton } from './tasks/peloton.js';
84
85
  import { CLI_VERSION } from '../src/cli-version.js';
85
86
  import { parseInstall, secretName } from '../src/install.js';
@@ -1821,13 +1822,26 @@ const commands = {
1821
1822
  ...newSyncCredentials(),
1822
1823
  }),
1823
1824
  );
1825
+ const keep = keepLines({
1826
+ envFile: tildePath(ENV_FILE, homedir()),
1827
+ routinesFile: tildePath(ROUTINES_FILE, homedir()),
1828
+ githubFile: tildePath(join(CONFIG_DIR, 'github-app.json'), homedir()),
1829
+ });
1824
1830
  if (install.secretsStore) {
1825
- console.log(`Wrote ${ENV_FILE} (0600). Next: put the values in the Secrets Store (docs/tasks.md#secrets).`);
1831
+ console.log(
1832
+ [
1833
+ `Wrote ${ENV_FILE} (0600). Next: put the values in the Secrets Store (docs/tasks.md#secrets).`,
1834
+ '',
1835
+ ...keep,
1836
+ ].join('\n'),
1837
+ );
1826
1838
  return;
1827
1839
  }
1828
1840
  console.log(
1829
1841
  [
1830
- `Wrote ${ENV_FILE} (0600). Keep it, and a copy in your password manager: it holds the sync secret.`,
1842
+ `Wrote ${ENV_FILE} (0600).`,
1843
+ '',
1844
+ ...keep,
1831
1845
  '',
1832
1846
  'Next, deploy the board (docs/tasks.md#deploy-to-cloudflare) with three of its values as secrets:',
1833
1847
  ` TASKS_API_TOKEN is ${envName('TOKEN')}`,