@lovinka/vitrinka 1.5.0 → 1.6.0

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/dist/lib/token.js CHANGED
@@ -25,8 +25,8 @@ export function tokenSource() {
25
25
  }
26
26
  // tokenHelp is THE explanation of where a write token comes from. There is no
27
27
  // self-serve mint: the token is the server's VITRINKA_TOKEN — one shared secret
28
- // set by whoever deploys the server. Printed by `vitrinka doctor` and echoed
29
- // (in bash) by install.sh — keep the two in sync.
28
+ // set by whoever deploys the server. Printed by `vitrinka doctor` and
29
+ // the `vitrinka install` onboarding.
30
30
  export function tokenHelp() {
31
31
  return [
32
32
  'The write token is the SERVER\'s VITRINKA_TOKEN — one shared secret, set by',
@@ -1 +1 @@
1
- {"version":3,"file":"token.js","sourceRoot":"","sources":["../../src/lib/token.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,4EAA4E;AAC5E,4EAA4E;AAC5E,8EAA8E;AAC9E,0DAA0D;AAE1D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,UAAU,SAAS;IACvB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,UAAU,SAAS;IACvB,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;IACzE,MAAM,CAAC,GAAG,SAAS,EAAE,CAAC;IACtB,IAAI,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACzD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,4EAA4E;AAC5E,wDAAwD;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;IACzD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,4EAA4E;AAC5E,wDAAwD;AACxD,MAAM,UAAU,WAAW;IACzB,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc;QAAE,OAAO,KAAK,CAAC;IAC7C,OAAO,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC;AAED,8EAA8E;AAC9E,gFAAgF;AAChF,sEAAsE;AACtE,qCAAqC;AACrC,MAAM,UAAU,SAAS;IACvB,OAAO;QACL,6EAA6E;QAC7E,wDAAwD;QACxD,EAAE;QACF,+EAA+E;QAC/E,yEAAyE;QACzE,mEAAmE;QACnE,4EAA4E;QAC5E,2EAA2E;QAC3E,iCAAiC;QACjC,0CAA0C,SAAS,EAAE,iBAAiB,SAAS,EAAE,EAAE;QACnF,wCAAwC;KACzC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovinka/vitrinka",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "vitrinka CLI + MCP server \u2014 capture and publish artifact sets, drive the annotation-board work queue from any MCP-aware AI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,8 @@
10
10
  "files": [
11
11
  "dist",
12
12
  "skills",
13
- "README.md"
13
+ "README.md",
14
+ "CHANGELOG.md"
14
15
  ],
15
16
  "scripts": {
16
17
  "build": "npm run sync-skills && tsc -p tsconfig.json",
@@ -23,7 +23,7 @@ if (existsSync(sibling)) {
23
23
  } else if (process.env.VITRINKA_DELEGATED === '1') {
24
24
  // The `vitrinka` we spawned resolved back to THIS delegator (a stale shim
25
25
  // pointing here without the package alongside) — refuse to recurse.
26
- console.error('vitrinka: shim loop detected — repoint the shim (npm i -g @lovinka/vitrinka, or install.sh from a repo checkout)');
26
+ console.error('vitrinka: shim loop detected — repoint the shim (npm i -g @lovinka/vitrinka, or `vitrinka install` from a repo checkout)');
27
27
  process.exit(127);
28
28
  } else {
29
29
  const { spawnSync } = await import('node:child_process');
@@ -64,7 +64,7 @@ for a read-only overview session, never to work items another session owns).
64
64
 
65
65
  ## Arm the monitor, then END THE TURN
66
66
 
67
- Use the `vitrinka` binary on PATH (installed by `install.sh` / `npm i -g
67
+ Use the `vitrinka` binary on PATH (installed by `vitrinka install` / `npm i -g
68
68
  @lovinka/vitrinka`). If it is not on PATH (a repo-dev machine without the shim),
69
69
  fall back to `node <vitrinka-repo>/pkg/src/cli.ts watch`.
70
70
 
@@ -207,8 +207,8 @@ test('collectCommands: project + home palettes, ns from dirs, _internals skipped
207
207
  assert.deepEqual(cmds, [
208
208
  { c: '/db:reset' },
209
209
  { c: '/deploy', d: 'Deploy the app' },
210
- { c: '/git:merge', d: 'Merge the current PR' },
211
- { c: '/prc', d: 'Ensure an open PR exists' },
210
+ { c: '/git:merge', d: 'Merge the current PR', s: 'home' },
211
+ { c: '/prc', d: 'Ensure an open PR exists', s: 'home' },
212
212
  { c: '/review', d: 'Project review' },
213
213
  ]);
214
214
  // Absent roots are fine (no .claude anywhere).
@@ -7,12 +7,17 @@ import { join } from 'node:path';
7
7
  import { spawn } from 'node:child_process';
8
8
  import { makeTmp, runCli, CLI } from './_helpers.ts';
9
9
 
10
+ // VITRINKA_URL pins the onboarding's healthz probe to a closed loopback port —
11
+ // instant connection-refused instead of a real (or timing-out) network call.
12
+ const OFFLINE = 'http://127.0.0.1:9';
13
+
10
14
  test('install writes an executable shim + zshrc PATH block, idempotently', () => {
11
15
  const home = makeTmp();
12
- const env = { HOME: home, PATH: '/usr/bin:/bin' };
16
+ const env = { HOME: home, PATH: '/usr/bin:/bin', VITRINKA_URL: OFFLINE };
13
17
 
14
18
  const first = runCli(['install'], { env });
15
19
  assert.equal(first.status, 0, first.stderr);
20
+ assert.match(first.stdout, /vitrinka setup/); // the status-first table header
16
21
  const shimPath = join(home, '.local', 'bin', 'vitrinka');
17
22
  const shim = readFileSync(shimPath, 'utf8');
18
23
  assert.match(shim, /^#!\/bin\/sh\n/);
@@ -22,17 +27,18 @@ test('install writes an executable shim + zshrc PATH block, idempotently', () =>
22
27
  assert.ok(zshrc.includes('# vitrinka-cli'), zshrc);
23
28
  assert.ok(zshrc.includes('export PATH="$HOME/.local/bin:$PATH"'), zshrc);
24
29
 
25
- // Re-run: no duplicate PATH block, reports already-installed.
30
+ // Re-run: the table shows everything present, nothing is reinstalled.
26
31
  const second = runCli(['install'], { env });
27
32
  assert.equal(second.status, 0, second.stderr);
28
- assert.match(second.stdout, /already/);
33
+ assert.match(second.stdout, /✓ shim {2,}/);
34
+ assert.ok(!second.stdout.includes('will install'), second.stdout);
29
35
  const again = readFileSync(join(home, '.zshrc'), 'utf8');
30
36
  assert.equal(again, zshrc, 'zshrc must not grow on re-install');
31
37
  });
32
38
 
33
39
  test('install skips zshrc when bin dir is already on PATH', () => {
34
40
  const home = makeTmp();
35
- const env = { HOME: home, PATH: `/usr/bin:${join(home, '.local', 'bin')}` };
41
+ const env = { HOME: home, PATH: `/usr/bin:${join(home, '.local', 'bin')}`, VITRINKA_URL: OFFLINE };
36
42
  // --no-completion isolates the PATH-block behavior: with completion appended
37
43
  // by default (its own suite covers that), install would otherwise create
38
44
  // .zshrc for the completion line even when the PATH block is skipped.
@@ -61,7 +61,7 @@ test('snap web --file adopts the shot: sequence, kebab filename, manifest entry,
61
61
  assert.deepEqual(
62
62
  { ...m.shots[0], ts: 'TS' },
63
63
  { file: `${day}/01-web-login-error.png`, surface: 'web', route: '/login',
64
- note: 'error state after submit', label: 'VSTUP', title: 'Login Error', ts: 'TS' },
64
+ note: 'error state after submit', label: 'VSTUP', title: 'Login Error', ts: 'TS', tool: 'adopted' },
65
65
  );
66
66
  assert.equal(existsSync(join(proj, '.screenshots', 'index.html')), true);
67
67