@productbrain/cli 0.1.0-beta.71 → 0.1.0-beta.75
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/__tests__/audit.test.js +44 -44
- package/dist/__tests__/capture.test.js +37 -37
- package/dist/__tests__/constellation.test.js +14 -14
- package/dist/__tests__/context-strategy.test.js +8 -8
- package/dist/__tests__/fields.test.js +20 -20
- package/dist/__tests__/ingest.test.js +28 -28
- package/dist/__tests__/orient.test.js +8 -8
- package/dist/__tests__/promote.test.js +15 -15
- package/dist/__tests__/proposals.test.js +18 -18
- package/dist/__tests__/relate.test.js +14 -14
- package/dist/__tests__/session-touch.test.js +11 -11
- package/dist/__tests__/session.test.js +2 -2
- package/dist/__tests__/setup.test.js +16 -30
- package/dist/__tests__/setup.test.js.map +1 -1
- package/dist/__tests__/state.test.d.ts +6 -0
- package/dist/__tests__/state.test.d.ts.map +1 -0
- package/dist/__tests__/state.test.js +97 -0
- package/dist/__tests__/state.test.js.map +1 -0
- package/dist/__tests__/update.test.js +21 -21
- package/dist/__tests__/workspace.test.js +20 -20
- package/dist/commands/accept.js +4 -4
- package/dist/commands/admin/cockpit.d.ts +4 -2
- package/dist/commands/admin/cockpit.d.ts.map +1 -1
- package/dist/commands/admin/cockpit.js +219 -10
- package/dist/commands/admin/cockpit.js.map +1 -1
- package/dist/commands/admin/index.d.ts.map +1 -1
- package/dist/commands/admin/index.js +2 -0
- package/dist/commands/admin/index.js.map +1 -1
- package/dist/commands/admin/inspect.d.ts +9 -0
- package/dist/commands/admin/inspect.d.ts.map +1 -1
- package/dist/commands/admin/inspect.js +19 -0
- package/dist/commands/admin/inspect.js.map +1 -1
- package/dist/commands/admin/inspect.test.js +20 -1
- package/dist/commands/admin/inspect.test.js.map +1 -1
- package/dist/commands/admin/manage.d.ts +8 -0
- package/dist/commands/admin/manage.d.ts.map +1 -0
- package/dist/commands/admin/manage.js +76 -0
- package/dist/commands/admin/manage.js.map +1 -0
- package/dist/commands/audit.js +4 -4
- package/dist/commands/brief.js +4 -4
- package/dist/commands/capture.js +6 -6
- package/dist/commands/chain-walk.js +2 -2
- package/dist/commands/changes.js +2 -2
- package/dist/commands/codex-prep.js +2 -2
- package/dist/commands/collections.js +5 -5
- package/dist/commands/connect-screens.d.ts +21 -0
- package/dist/commands/connect-screens.d.ts.map +1 -0
- package/dist/commands/connect-screens.js +79 -0
- package/dist/commands/connect-screens.js.map +1 -0
- package/dist/commands/constellation.js +2 -2
- package/dist/commands/context.js +2 -2
- package/dist/commands/cross-cut.js +2 -2
- package/dist/commands/doctor.js +3 -3
- package/dist/commands/doctor.test.js +1 -1
- package/dist/commands/fields.js +2 -2
- package/dist/commands/get.js +3 -3
- package/dist/commands/handshake.js +5 -5
- package/dist/commands/ingest.js +6 -6
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -9
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/orient.js +2 -2
- package/dist/commands/promote.js +4 -4
- package/dist/commands/proposals.js +2 -2
- package/dist/commands/reject.js +2 -2
- package/dist/commands/relate.js +3 -3
- package/dist/commands/search.js +2 -2
- package/dist/commands/session.js +7 -7
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +10 -31
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/update.js +3 -3
- package/dist/commands/usage.d.ts +1 -1
- package/dist/commands/usage.js +4 -4
- package/dist/commands/verify.js +2 -2
- package/dist/commands/welcome.d.ts +21 -0
- package/dist/commands/welcome.d.ts.map +1 -0
- package/dist/commands/welcome.js +50 -0
- package/dist/commands/welcome.js.map +1 -0
- package/dist/commands/workspace.js +4 -4
- package/dist/generators/chain-rules.d.ts +3 -3
- package/dist/generators/chain-rules.js +3 -3
- package/dist/generators/chain-rules.test.js +2 -2
- package/dist/generators/portable-knowledge.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/activation.js +2 -2
- package/dist/lib/activation.test.js +3 -3
- package/dist/lib/client.d.ts +4 -4
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +8 -9
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/onboarding-path-b.js +8 -8
- package/dist/lib/onboarding-shared.js +2 -2
- package/dist/lib/onboarding.js +4 -4
- package/dist/lib/state.d.ts +51 -0
- package/dist/lib/state.d.ts.map +1 -0
- package/dist/lib/state.js +90 -0
- package/dist/lib/state.js.map +1 -0
- package/dist/lib/workspace-probe.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for resolveSetupState() and detectRenderTier().
|
|
3
|
+
* WP-325 S1 — foundation module, four stage paths + three render tier paths.
|
|
4
|
+
*/
|
|
5
|
+
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
6
|
+
import { resolveSetupState, detectRenderTier } from '../lib/state.js';
|
|
7
|
+
vi.mock('../lib/config.js', () => ({
|
|
8
|
+
getConfigSafe: vi.fn(),
|
|
9
|
+
}));
|
|
10
|
+
vi.mock('../lib/workspace-probe.js', () => ({
|
|
11
|
+
probeWorkspace: vi.fn(),
|
|
12
|
+
}));
|
|
13
|
+
vi.mock('../lib/session.js', () => ({
|
|
14
|
+
readSession: vi.fn(),
|
|
15
|
+
}));
|
|
16
|
+
vi.mock('../lib/runner.js', () => ({
|
|
17
|
+
isJsonMode: vi.fn(),
|
|
18
|
+
}));
|
|
19
|
+
import { getConfigSafe } from '../lib/config.js';
|
|
20
|
+
import { probeWorkspace } from '../lib/workspace-probe.js';
|
|
21
|
+
import { readSession } from '../lib/session.js';
|
|
22
|
+
import { isJsonMode } from '../lib/runner.js';
|
|
23
|
+
const mockGetConfigSafe = vi.mocked(getConfigSafe);
|
|
24
|
+
const mockProbeWorkspace = vi.mocked(probeWorkspace);
|
|
25
|
+
const mockReadSession = vi.mocked(readSession);
|
|
26
|
+
const mockIsJsonMode = vi.mocked(isJsonMode);
|
|
27
|
+
beforeEach(() => {
|
|
28
|
+
vi.resetAllMocks();
|
|
29
|
+
});
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
// resolveSetupState — four stage paths
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
describe('resolveSetupState', () => {
|
|
34
|
+
it('returns unconfigured when no API key is present', async () => {
|
|
35
|
+
mockGetConfigSafe.mockReturnValue({ ok: false, reason: 'no key' });
|
|
36
|
+
const state = await resolveSetupState();
|
|
37
|
+
expect(state.stage).toBe('unconfigured');
|
|
38
|
+
expect(state.nextAction).toBe('pb login');
|
|
39
|
+
expect(state.missingSteps.length).toBeGreaterThan(0);
|
|
40
|
+
expect(mockProbeWorkspace).not.toHaveBeenCalled();
|
|
41
|
+
});
|
|
42
|
+
it('returns authenticated when key is present but workspace is unreachable', async () => {
|
|
43
|
+
mockGetConfigSafe.mockReturnValue({ ok: true, apiKey: 'key', siteUrl: 'https://test.convex.site' });
|
|
44
|
+
mockProbeWorkspace.mockResolvedValue(null);
|
|
45
|
+
const state = await resolveSetupState();
|
|
46
|
+
expect(state.stage).toBe('authenticated');
|
|
47
|
+
expect(state.nextAction).toBe('pb connect');
|
|
48
|
+
expect(mockReadSession).not.toHaveBeenCalled();
|
|
49
|
+
});
|
|
50
|
+
it('returns workspace-bound when connected but no active session', async () => {
|
|
51
|
+
mockGetConfigSafe.mockReturnValue({ ok: true, apiKey: 'key', siteUrl: 'https://test.convex.site' });
|
|
52
|
+
mockProbeWorkspace.mockResolvedValue({ name: 'Test WS', entryCount: 42 });
|
|
53
|
+
mockReadSession.mockReturnValue(null);
|
|
54
|
+
const state = await resolveSetupState();
|
|
55
|
+
expect(state.stage).toBe('workspace-bound');
|
|
56
|
+
expect(state.workspaceName).toBe('Test WS');
|
|
57
|
+
expect(state.entryCount).toBe(42);
|
|
58
|
+
expect(state.sessionActive).toBe(false);
|
|
59
|
+
expect(state.nextAction).toBe('pb session start');
|
|
60
|
+
});
|
|
61
|
+
it('returns active when key + workspace + session are all present', async () => {
|
|
62
|
+
mockGetConfigSafe.mockReturnValue({ ok: true, apiKey: 'key', siteUrl: 'https://test.convex.site' });
|
|
63
|
+
mockProbeWorkspace.mockResolvedValue({ name: 'Test WS', entryCount: 99 });
|
|
64
|
+
mockReadSession.mockReturnValue({ sessionId: 'sess-1', workspaceId: 'ws-1', workspaceName: 'Test WS', startedAt: '2026-01-01T00:00:00Z', entriesCaptured: [] });
|
|
65
|
+
const state = await resolveSetupState();
|
|
66
|
+
expect(state.stage).toBe('active');
|
|
67
|
+
expect(state.sessionActive).toBe(true);
|
|
68
|
+
expect(state.workspaceName).toBe('Test WS');
|
|
69
|
+
expect(state.entryCount).toBe(99);
|
|
70
|
+
expect(state.missingSteps).toHaveLength(0);
|
|
71
|
+
expect(state.nextAction).toBe('pb orient -b');
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
// detectRenderTier — three render paths
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
describe('detectRenderTier', () => {
|
|
78
|
+
const originalIsTTY = process.stdout.isTTY;
|
|
79
|
+
afterEach(() => {
|
|
80
|
+
Object.defineProperty(process.stdout, 'isTTY', { value: originalIsTTY, writable: true });
|
|
81
|
+
});
|
|
82
|
+
it('returns json when isJsonMode() is true', () => {
|
|
83
|
+
mockIsJsonMode.mockReturnValue(true);
|
|
84
|
+
expect(detectRenderTier()).toBe('json');
|
|
85
|
+
});
|
|
86
|
+
it('returns plain when not a TTY and not json mode', () => {
|
|
87
|
+
mockIsJsonMode.mockReturnValue(false);
|
|
88
|
+
Object.defineProperty(process.stdout, 'isTTY', { value: false, writable: true });
|
|
89
|
+
expect(detectRenderTier()).toBe('plain');
|
|
90
|
+
});
|
|
91
|
+
it('returns ink when TTY and not json mode', () => {
|
|
92
|
+
mockIsJsonMode.mockReturnValue(false);
|
|
93
|
+
Object.defineProperty(process.stdout, 'isTTY', { value: true, writable: true });
|
|
94
|
+
expect(detectRenderTier()).toBe('ink');
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=state.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.test.js","sourceRoot":"","sources":["../../src/__tests__/state.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEtE,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,CAAC;IACjC,aAAa,EAAE,EAAE,CAAC,EAAE,EAAE;CACvB,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,2BAA2B,EAAE,GAAG,EAAE,CAAC,CAAC;IAC1C,cAAc,EAAE,EAAE,CAAC,EAAE,EAAE;CACxB,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,CAAC;IAClC,WAAW,EAAE,EAAE,CAAC,EAAE,EAAE;CACrB,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,CAAC;IACjC,UAAU,EAAE,EAAE,CAAC,EAAE,EAAE;CACpB,CAAC,CAAC,CAAC;AAEJ,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,iBAAiB,GAAG,EAAE,CAAC,MAAM,CAAC,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ChD,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACrC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACxD,cAAc,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QACjF,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QAChD,cAAc,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QAChF,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* pb update — verify
|
|
2
|
+
* pb update — verify kernelCallWithSession sequence and args.
|
|
3
3
|
* TEN-341 test contract: happy path, no session, empty entryId.
|
|
4
4
|
*/
|
|
5
5
|
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
6
6
|
import { runUpdate } from '../commands/update.js';
|
|
7
7
|
import { CLIError } from '../lib/errors.js';
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const kernelCallWithSessionMock = vi.fn();
|
|
9
|
+
const kernelCallMock = vi.fn();
|
|
10
10
|
vi.mock('../lib/client.js', () => ({
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
kernelCallWithSession: (...args) => kernelCallWithSessionMock(...args),
|
|
12
|
+
kernelCall: (...args) => kernelCallMock(...args),
|
|
13
13
|
// McpError exported so update.ts can import the type (not used at runtime in tests).
|
|
14
14
|
McpError: class McpError extends Error {
|
|
15
15
|
details;
|
|
@@ -50,7 +50,7 @@ describe('runUpdate', () => {
|
|
|
50
50
|
vi.clearAllMocks();
|
|
51
51
|
mockSession = { sessionId: 'sess-test' };
|
|
52
52
|
// BET-192: updateEntry returns warnings + normalization breakdown (symmetric with createEntry)
|
|
53
|
-
|
|
53
|
+
kernelCallWithSessionMock.mockResolvedValue({
|
|
54
54
|
id: 'j571abc123def456',
|
|
55
55
|
warnings: [],
|
|
56
56
|
normalization: { remapped: {}, rejected: [], accepted: [] },
|
|
@@ -58,7 +58,7 @@ describe('runUpdate', () => {
|
|
|
58
58
|
validationWarnings: [],
|
|
59
59
|
});
|
|
60
60
|
// Post-update refresh: default to returning a minimal entry.
|
|
61
|
-
|
|
61
|
+
kernelCallMock.mockResolvedValue({
|
|
62
62
|
entryId: 'BET-151',
|
|
63
63
|
name: 'Test Entry',
|
|
64
64
|
status: 'active',
|
|
@@ -72,7 +72,7 @@ describe('runUpdate', () => {
|
|
|
72
72
|
note: 'Updated description',
|
|
73
73
|
});
|
|
74
74
|
writeSpy.mockRestore();
|
|
75
|
-
expect(
|
|
75
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.updateEntry', {
|
|
76
76
|
entryId: 'BET-151',
|
|
77
77
|
changedBy: 'agent:sess-test',
|
|
78
78
|
data: { description: 'new description' },
|
|
@@ -88,7 +88,7 @@ describe('runUpdate', () => {
|
|
|
88
88
|
note: 'Resolved',
|
|
89
89
|
});
|
|
90
90
|
writeSpy.mockRestore();
|
|
91
|
-
expect(
|
|
91
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.updateEntry', {
|
|
92
92
|
entryId: 'TEN-703',
|
|
93
93
|
changedBy: 'agent:sess-test',
|
|
94
94
|
name: 'New name',
|
|
@@ -103,7 +103,7 @@ describe('runUpdate', () => {
|
|
|
103
103
|
workflowStatus: 'shipped',
|
|
104
104
|
});
|
|
105
105
|
writeSpy.mockRestore();
|
|
106
|
-
expect(
|
|
106
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.updateEntry', {
|
|
107
107
|
entryId: 'BET-271',
|
|
108
108
|
changedBy: 'agent:sess-test',
|
|
109
109
|
workflowStatus: 'shipped',
|
|
@@ -116,7 +116,7 @@ describe('runUpdate', () => {
|
|
|
116
116
|
field: ['rationale=a=b=c'],
|
|
117
117
|
});
|
|
118
118
|
writeSpy.mockRestore();
|
|
119
|
-
expect(
|
|
119
|
+
expect(kernelCallWithSessionMock).toHaveBeenCalledWith('chain.updateEntry', {
|
|
120
120
|
entryId: 'DEC-264',
|
|
121
121
|
changedBy: 'agent:sess-test',
|
|
122
122
|
data: { rationale: 'a=b=c' },
|
|
@@ -126,21 +126,21 @@ describe('runUpdate', () => {
|
|
|
126
126
|
mockSession = null;
|
|
127
127
|
await expect(runUpdate({ entryId: 'BET-151', field: ['x=1'] })).rejects.toThrow(CLIError);
|
|
128
128
|
await expect(runUpdate({ entryId: 'BET-151', field: ['x=1'] })).rejects.toThrow('No active session');
|
|
129
|
-
expect(
|
|
129
|
+
expect(kernelCallWithSessionMock).not.toHaveBeenCalled();
|
|
130
130
|
});
|
|
131
131
|
it('throws CLIError with empty entryId', async () => {
|
|
132
132
|
await expect(runUpdate({ entryId: ' ', field: ['x=1'] })).rejects.toThrow(CLIError);
|
|
133
133
|
await expect(runUpdate({ entryId: ' ', field: ['x=1'] })).rejects.toThrow('Entry ID is required');
|
|
134
|
-
expect(
|
|
134
|
+
expect(kernelCallWithSessionMock).not.toHaveBeenCalled();
|
|
135
135
|
});
|
|
136
136
|
it('throws CLIError when nothing to update', async () => {
|
|
137
137
|
await expect(runUpdate({ entryId: 'BET-151' })).rejects.toThrow(CLIError);
|
|
138
138
|
await expect(runUpdate({ entryId: 'BET-151' })).rejects.toThrow('Nothing to update');
|
|
139
|
-
expect(
|
|
139
|
+
expect(kernelCallWithSessionMock).not.toHaveBeenCalled();
|
|
140
140
|
});
|
|
141
141
|
// ── Structured validation error tests ────────────────────────────────────
|
|
142
142
|
it('throws CLIError with structured select field error message', async () => {
|
|
143
|
-
|
|
143
|
+
kernelCallWithSessionMock.mockRejectedValue(makeMcpError("Entry data validation failed: Field \"appetite\" must be one of: small, medium, large. Got: 'Small Batch'. Fix the values and try again.", 'VALIDATION_FAILED', [{
|
|
144
144
|
fieldKey: 'appetite',
|
|
145
145
|
fieldLabel: 'appetite',
|
|
146
146
|
invalidValue: 'Small Batch',
|
|
@@ -154,14 +154,14 @@ describe('runUpdate', () => {
|
|
|
154
154
|
expect(err.message).toContain("Got: 'Small Batch'");
|
|
155
155
|
});
|
|
156
156
|
it('throws CLIError with plain error message when no structured details', async () => {
|
|
157
|
-
|
|
157
|
+
kernelCallWithSessionMock.mockRejectedValue(makeMcpError('Entry not found.', 'NOT_FOUND'));
|
|
158
158
|
const err = await runUpdate({ entryId: 'BET-999', field: ['x=1'] }).catch((e) => e);
|
|
159
159
|
expect(err).toBeInstanceOf(CLIError);
|
|
160
160
|
expect(err.message).toContain('Entry not found.');
|
|
161
161
|
});
|
|
162
162
|
// ── Slice 3: post-update refresh ─────────────────────────────────────────
|
|
163
163
|
it('calls chain.getEntry after successful update and includes entry in output', async () => {
|
|
164
|
-
|
|
164
|
+
kernelCallMock.mockResolvedValue({
|
|
165
165
|
entryId: 'BET-151',
|
|
166
166
|
name: 'My Bet',
|
|
167
167
|
status: 'active',
|
|
@@ -170,13 +170,13 @@ describe('runUpdate', () => {
|
|
|
170
170
|
await runUpdate({ entryId: 'BET-151', field: ['description=new'] });
|
|
171
171
|
const output = writeSpy.mock.calls.map(c => String(c[0])).join('');
|
|
172
172
|
writeSpy.mockRestore();
|
|
173
|
-
expect(
|
|
173
|
+
expect(kernelCallMock).toHaveBeenCalledWith('chain.getEntry', { entryId: 'BET-151' });
|
|
174
174
|
// Pretty output: receipt then entry block
|
|
175
175
|
expect(output).toContain('Updated BET-151');
|
|
176
176
|
expect(output).toContain('My Bet');
|
|
177
177
|
});
|
|
178
178
|
it('still shows update receipt when post-update getEntry fails (graceful degradation)', async () => {
|
|
179
|
-
|
|
179
|
+
kernelCallMock.mockRejectedValue(new Error('network error'));
|
|
180
180
|
const writeSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
181
181
|
await runUpdate({ entryId: 'BET-151', field: ['description=new'] });
|
|
182
182
|
const output = writeSpy.mock.calls.map(c => String(c[0])).join('');
|
|
@@ -187,7 +187,7 @@ describe('runUpdate', () => {
|
|
|
187
187
|
});
|
|
188
188
|
// ── BET-192 / FEAT-575: Normalization warning tests ──────────────────────
|
|
189
189
|
it('throws CLIError when fields are rejected (BET-192, BET-271)', async () => {
|
|
190
|
-
|
|
190
|
+
kernelCallWithSessionMock.mockResolvedValue({
|
|
191
191
|
id: 'j571abc123def456',
|
|
192
192
|
warnings: ['Unknown field "foo" dropped. Available fields: description, doneWhen'],
|
|
193
193
|
normalization: { remapped: {}, rejected: ['foo'], accepted: ['description'] },
|
|
@@ -207,7 +207,7 @@ describe('runUpdate', () => {
|
|
|
207
207
|
writeSpy.mockRestore();
|
|
208
208
|
});
|
|
209
209
|
it('displays no warnings when all fields are valid (BET-192)', async () => {
|
|
210
|
-
|
|
210
|
+
kernelCallWithSessionMock.mockResolvedValue({
|
|
211
211
|
id: 'j571abc123def456',
|
|
212
212
|
warnings: [],
|
|
213
213
|
normalization: { remapped: {}, rejected: [], accepted: ['description'] },
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
14
14
|
import { runWorkspaceVerify, runWorkspaceRepair, runDefinitionsDiff } from '../commands/workspace.js';
|
|
15
15
|
// ── Mocks ──────────────────────────────────────────────────────────────────
|
|
16
|
-
const
|
|
16
|
+
const kernelCallMock = vi.fn();
|
|
17
17
|
vi.mock('../lib/client.js', () => ({
|
|
18
|
-
|
|
18
|
+
kernelCall: (...args) => kernelCallMock(...args),
|
|
19
19
|
}));
|
|
20
20
|
vi.mock('../lib/config.js', () => ({
|
|
21
21
|
getConfigOrGuide: vi.fn(() => Promise.resolve({ apiKey: 'pb_sk_test', siteUrl: 'https://test.convex.site' })),
|
|
@@ -84,12 +84,12 @@ const missingSeedsResult = {
|
|
|
84
84
|
describe('formatWorkspaceVerify', () => {
|
|
85
85
|
beforeEach(() => vi.clearAllMocks());
|
|
86
86
|
it('renders workspace name in the heading', async () => {
|
|
87
|
-
|
|
87
|
+
kernelCallMock.mockResolvedValue(healthyResult);
|
|
88
88
|
const output = await captureStdout(() => runWorkspaceVerify());
|
|
89
89
|
expect(output).toContain('Acme Workspace');
|
|
90
90
|
});
|
|
91
91
|
it('shows healthy status when all checks pass', async () => {
|
|
92
|
-
|
|
92
|
+
kernelCallMock.mockResolvedValue(healthyResult);
|
|
93
93
|
const output = await captureStdout(() => runWorkspaceVerify());
|
|
94
94
|
expect(output).toContain('healthy');
|
|
95
95
|
// No gaps section
|
|
@@ -97,7 +97,7 @@ describe('formatWorkspaceVerify', () => {
|
|
|
97
97
|
expect(output).not.toContain('pb workspace repair');
|
|
98
98
|
});
|
|
99
99
|
it('shows all four check labels', async () => {
|
|
100
|
-
|
|
100
|
+
kernelCallMock.mockResolvedValue(healthyResult);
|
|
101
101
|
const output = await captureStdout(() => runWorkspaceVerify());
|
|
102
102
|
expect(output).toContain('Collections aligned');
|
|
103
103
|
expect(output).toContain('Glossary seeded');
|
|
@@ -105,7 +105,7 @@ describe('formatWorkspaceVerify', () => {
|
|
|
105
105
|
expect(output).toContain('Default circle');
|
|
106
106
|
});
|
|
107
107
|
it('shows incomplete status with gaps section', async () => {
|
|
108
|
-
|
|
108
|
+
kernelCallMock.mockResolvedValue(incompletResult);
|
|
109
109
|
const output = await captureStdout(() => runWorkspaceVerify());
|
|
110
110
|
expect(output).toContain('incomplete');
|
|
111
111
|
expect(output).toContain('Gaps');
|
|
@@ -113,13 +113,13 @@ describe('formatWorkspaceVerify', () => {
|
|
|
113
113
|
expect(output).toContain('pb workspace repair');
|
|
114
114
|
});
|
|
115
115
|
it('shows missing-seeds status', async () => {
|
|
116
|
-
|
|
116
|
+
kernelCallMock.mockResolvedValue(missingSeedsResult);
|
|
117
117
|
const output = await captureStdout(() => runWorkspaceVerify());
|
|
118
118
|
expect(output).toContain('missing-seeds');
|
|
119
119
|
expect(output).toContain('collections missing');
|
|
120
120
|
});
|
|
121
121
|
it('lists all gaps individually', async () => {
|
|
122
|
-
|
|
122
|
+
kernelCallMock.mockResolvedValue(incompletResult);
|
|
123
123
|
const output = await captureStdout(() => runWorkspaceVerify());
|
|
124
124
|
for (const gap of incompletResult.gaps) {
|
|
125
125
|
expect(output).toContain(gap);
|
|
@@ -144,31 +144,31 @@ describe('formatWorkspaceRepair', () => {
|
|
|
144
144
|
alreadyHealthy: false,
|
|
145
145
|
};
|
|
146
146
|
it('renders already-healthy message when alreadyHealthy is true', async () => {
|
|
147
|
-
|
|
147
|
+
kernelCallMock.mockResolvedValue(alreadyHealthyResult);
|
|
148
148
|
const output = await captureStdout(() => runWorkspaceRepair());
|
|
149
149
|
expect(output).toContain('already healthy');
|
|
150
150
|
expect(output).not.toContain('Scheduled');
|
|
151
151
|
});
|
|
152
152
|
it('lists scheduled jobs when seeds were missing', async () => {
|
|
153
|
-
|
|
153
|
+
kernelCallMock.mockResolvedValue(repairedResult);
|
|
154
154
|
const output = await captureStdout(() => runWorkspaceRepair());
|
|
155
155
|
expect(output).toContain('Scheduled');
|
|
156
156
|
expect(output).toContain('seedSystemEntries');
|
|
157
157
|
expect(output).toContain('seedSemanticTypes');
|
|
158
158
|
});
|
|
159
159
|
it('lists skipped jobs when already present', async () => {
|
|
160
|
-
|
|
160
|
+
kernelCallMock.mockResolvedValue(repairedResult);
|
|
161
161
|
const output = await captureStdout(() => runWorkspaceRepair());
|
|
162
162
|
expect(output).toContain('Skipped');
|
|
163
163
|
expect(output).toContain('seedDefaultCircle');
|
|
164
164
|
});
|
|
165
165
|
it('shows async-confirmation hint when seeds were scheduled', async () => {
|
|
166
|
-
|
|
166
|
+
kernelCallMock.mockResolvedValue(repairedResult);
|
|
167
167
|
const output = await captureStdout(() => runWorkspaceRepair());
|
|
168
168
|
expect(output).toContain('pb workspace verify');
|
|
169
169
|
});
|
|
170
170
|
it('renders workspace name', async () => {
|
|
171
|
-
|
|
171
|
+
kernelCallMock.mockResolvedValue(repairedResult);
|
|
172
172
|
const output = await captureStdout(() => runWorkspaceRepair());
|
|
173
173
|
expect(output).toContain('Fixed Workspace');
|
|
174
174
|
});
|
|
@@ -215,7 +215,7 @@ describe('formatDefinitionsDiff — via runDefinitionsDiff mock', () => {
|
|
|
215
215
|
const dir = mkdtempSync(join(tmpdir(), 'pb-test-'));
|
|
216
216
|
const file = join(dir, 'defs.json');
|
|
217
217
|
writeFileSync(file, JSON.stringify([]));
|
|
218
|
-
|
|
218
|
+
kernelCallMock.mockResolvedValue([]);
|
|
219
219
|
const output = await captureStdout(() => runDefinitionsDiff({ file }));
|
|
220
220
|
expect(output).toContain('No definitions found');
|
|
221
221
|
rmSync(dir, { recursive: true, force: true });
|
|
@@ -228,7 +228,7 @@ describe('formatDefinitionsDiff — via runDefinitionsDiff mock', () => {
|
|
|
228
228
|
const file = join(dir, 'defs.json');
|
|
229
229
|
const def = { slug: 'bets', name: 'Bets', description: 'Work packages' };
|
|
230
230
|
writeFileSync(file, JSON.stringify([def]));
|
|
231
|
-
|
|
231
|
+
kernelCallMock.mockResolvedValue([def]);
|
|
232
232
|
const output = await captureStdout(() => runDefinitionsDiff({ file }));
|
|
233
233
|
expect(output).toContain('Identical');
|
|
234
234
|
expect(output).toContain('1');
|
|
@@ -242,7 +242,7 @@ describe('formatDefinitionsDiff — via runDefinitionsDiff mock', () => {
|
|
|
242
242
|
const dir = mkdtempSync(join(tmpdir(), 'pb-test-'));
|
|
243
243
|
const file = join(dir, 'defs.json');
|
|
244
244
|
writeFileSync(file, JSON.stringify([{ slug: 'experiments', name: 'Experiments' }]));
|
|
245
|
-
|
|
245
|
+
kernelCallMock.mockResolvedValue([]);
|
|
246
246
|
const output = await captureStdout(() => runDefinitionsDiff({ file }));
|
|
247
247
|
expect(output).toContain('Only local');
|
|
248
248
|
expect(output).toContain('experiments');
|
|
@@ -255,7 +255,7 @@ describe('formatDefinitionsDiff — via runDefinitionsDiff mock', () => {
|
|
|
255
255
|
const dir = mkdtempSync(join(tmpdir(), 'pb-test-'));
|
|
256
256
|
const file = join(dir, 'defs.json');
|
|
257
257
|
writeFileSync(file, JSON.stringify([]));
|
|
258
|
-
|
|
258
|
+
kernelCallMock.mockResolvedValue([{ slug: 'tensions', name: 'Tensions' }]);
|
|
259
259
|
const output = await captureStdout(() => runDefinitionsDiff({ file }));
|
|
260
260
|
expect(output).toContain('Only server');
|
|
261
261
|
expect(output).toContain('tensions');
|
|
@@ -268,7 +268,7 @@ describe('formatDefinitionsDiff — via runDefinitionsDiff mock', () => {
|
|
|
268
268
|
const dir = mkdtempSync(join(tmpdir(), 'pb-test-'));
|
|
269
269
|
const file = join(dir, 'defs.json');
|
|
270
270
|
writeFileSync(file, JSON.stringify([{ slug: 'bets', name: 'Old name' }]));
|
|
271
|
-
|
|
271
|
+
kernelCallMock.mockResolvedValue([{ slug: 'bets', name: 'New name' }]);
|
|
272
272
|
const output = await captureStdout(() => runDefinitionsDiff({ file }));
|
|
273
273
|
expect(output).toContain('Different');
|
|
274
274
|
expect(output).toContain('bets');
|
|
@@ -283,7 +283,7 @@ describe('formatDefinitionsDiff — via runDefinitionsDiff mock', () => {
|
|
|
283
283
|
const localDef = { slug: 'bets', name: 'Bets' };
|
|
284
284
|
writeFileSync(file, JSON.stringify([localDef]));
|
|
285
285
|
// Server returns same data but with Convex metadata — should still be identical
|
|
286
|
-
|
|
286
|
+
kernelCallMock.mockResolvedValue([{ ...localDef, _id: 'abc123', _creationTime: 1234567890 }]);
|
|
287
287
|
const output = await captureStdout(() => runDefinitionsDiff({ file }));
|
|
288
288
|
expect(output).toContain('Identical');
|
|
289
289
|
expect(output).toContain('All definitions match');
|
|
@@ -298,7 +298,7 @@ describe('formatDefinitionsDiff — via runDefinitionsDiff mock', () => {
|
|
|
298
298
|
const identical = { slug: 'bets', name: 'Bets' };
|
|
299
299
|
const changed = { slug: 'tensions', name: 'Old tensions' };
|
|
300
300
|
writeFileSync(file, JSON.stringify([identical, changed]));
|
|
301
|
-
|
|
301
|
+
kernelCallMock.mockResolvedValue([identical, { slug: 'tensions', name: 'New tensions' }]);
|
|
302
302
|
const output = await captureStdout(() => runDefinitionsDiff({ file }));
|
|
303
303
|
// 1 identical / 2 total
|
|
304
304
|
expect(output).toContain('1/2');
|
package/dist/commands/accept.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* skipped for manual review. Reports what was approved and what was skipped.
|
|
11
11
|
*/
|
|
12
12
|
import { getConfigOrGuide } from '../lib/config.js';
|
|
13
|
-
import {
|
|
13
|
+
import { kernelCall } from '../lib/client.js';
|
|
14
14
|
import { runCliCommand } from '../lib/runner.js';
|
|
15
15
|
import { CLIError, ErrorCode } from '../lib/errors.js';
|
|
16
16
|
import { formatAcceptReceipt, formatAutoAcceptReport, } from '../formatters/proposals.js';
|
|
@@ -22,7 +22,7 @@ export async function runAccept(options) {
|
|
|
22
22
|
if (options.auto) {
|
|
23
23
|
await runCliCommand({
|
|
24
24
|
fn: async () => {
|
|
25
|
-
const proposals = await
|
|
25
|
+
const proposals = await kernelCall('governance.listProposals', {});
|
|
26
26
|
const approved = [];
|
|
27
27
|
const skipped = [];
|
|
28
28
|
for (const p of proposals) {
|
|
@@ -38,7 +38,7 @@ export async function runAccept(options) {
|
|
|
38
38
|
continue;
|
|
39
39
|
}
|
|
40
40
|
try {
|
|
41
|
-
await
|
|
41
|
+
await kernelCall('governance.respondToProposal', {
|
|
42
42
|
proposalId: p._id,
|
|
43
43
|
verdict: 'approve',
|
|
44
44
|
});
|
|
@@ -65,7 +65,7 @@ export async function runAccept(options) {
|
|
|
65
65
|
}
|
|
66
66
|
await runCliCommand({
|
|
67
67
|
fn: async () => {
|
|
68
|
-
return await
|
|
68
|
+
return await kernelCall('governance.respondToProposal', {
|
|
69
69
|
proposalId: options.proposalId,
|
|
70
70
|
verdict: 'approve',
|
|
71
71
|
});
|
|
@@ -56,7 +56,7 @@ export type ChangelogRow = {
|
|
|
56
56
|
timestamp: number;
|
|
57
57
|
definitionSlug: string;
|
|
58
58
|
};
|
|
59
|
-
export type CockpitTab = 'workspaces' | 'seeds' | 'changelog';
|
|
59
|
+
export type CockpitTab = 'workspaces' | 'seeds' | 'changelog' | 'manage';
|
|
60
60
|
export type CockpitProps = {
|
|
61
61
|
workspaces: WorkspaceRow[];
|
|
62
62
|
currentKeyWorkspaceId: string | null;
|
|
@@ -70,8 +70,10 @@ export type CockpitProps = {
|
|
|
70
70
|
seedRows: SeedRow[];
|
|
71
71
|
/** Changelog rows for heatmap. WP-317 E8 / S4. */
|
|
72
72
|
changelogRows: ChangelogRow[];
|
|
73
|
+
/** Called when ManageTab destructive flow becomes active/inactive. WP-324 S2. */
|
|
74
|
+
onFlowActive?: (active: boolean) => void;
|
|
73
75
|
};
|
|
74
|
-
export declare function Cockpit({ workspaces, currentKeyWorkspaceId, onExit, onDrillIn, onRunFix, siteUrl, seedRows, changelogRows }: CockpitProps): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export declare function Cockpit({ workspaces, currentKeyWorkspaceId, onExit, onDrillIn, onRunFix, siteUrl, seedRows, changelogRows, onFlowActive }: CockpitProps): import("react/jsx-runtime").JSX.Element;
|
|
75
77
|
export type WorkspaceHealthData = {
|
|
76
78
|
readiness: unknown;
|
|
77
79
|
collections: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cockpit.d.ts","sourceRoot":"","sources":["../../../src/commands/admin/cockpit.tsx"],"names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