bkper 5.3.2 → 5.3.3

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.
@@ -2,6 +2,7 @@ import { InteractiveMode } from '@earendil-works/pi-coding-agent';
2
2
  export type InteractiveRuntimeHost = ConstructorParameters<typeof InteractiveMode>[0];
3
3
  export declare function suppressPiResumeHintOutput(): () => void;
4
4
  export declare class BkperInteractiveMode extends InteractiveMode {
5
+ private restorePendingUserMessage?;
5
6
  init(): Promise<void>;
6
7
  run(): Promise<void>;
7
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interactive-mode.d.ts","sourceRoot":"","sources":["../../../src/agent/interactive/interactive-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAqBzC,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAStF,wBAAgB,0BAA0B,IAAI,MAAM,IAAI,CAmBvD;AAED,qBAAa,oBAAqB,SAAQ,eAAe;IAC/C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAoErB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAS7B"}
1
+ {"version":3,"file":"interactive-mode.d.ts","sourceRoot":"","sources":["../../../src/agent/interactive/interactive-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAyBzC,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAStF,wBAAgB,0BAA0B,IAAI,MAAM,IAAI,CAmBvD;AAED,qBAAa,oBAAqB,SAAQ,eAAe;IACrD,OAAO,CAAC,yBAAyB,CAAC,CAAa;IAEzC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAkFrB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAW7B"}
@@ -12,6 +12,7 @@ import { installBkperAuthCommandRouting } from '../extensions/auth-commands.js';
12
12
  import { installHandoffGoalEditorAutocomplete, installHandoffGoalEditorPromptHistory, } from '../extensions/handoff-goal-editor.js';
13
13
  import { installPromptHistoryEditor, } from './prompt-history-search.js';
14
14
  import { installPromptHistoryShortcut } from './prompt-history-shortcut.js';
15
+ import { installPendingUserMessage, } from './pending-user-message.js';
15
16
  import { FilePromptHistory, getPromptHistoryPath, } from './prompt-history-store.js';
16
17
  import { installBkperSessionKeybindings, } from './session-keybindings.js';
17
18
  const PI_RESUME_HINT_TEXT = 'To resume this session:';
@@ -37,13 +38,22 @@ export class BkperInteractiveMode extends InteractiveMode {
37
38
  init: { get: () => super.init }
38
39
  });
39
40
  return __awaiter(this, void 0, void 0, function* () {
40
- var _a;
41
+ var _a, _b;
41
42
  const interactiveMode = this;
42
43
  interactiveMode.getChangelogForDisplay = () => undefined;
43
44
  if (interactiveMode.keybindings) {
44
45
  installBkperSessionKeybindings(interactiveMode.keybindings);
45
46
  }
46
47
  yield _super.init.call(this);
48
+ (_a = this.restorePendingUserMessage) === null || _a === void 0 ? void 0 : _a.call(this);
49
+ const pendingMessageHost = this;
50
+ if (pendingMessageHost.session &&
51
+ pendingMessageHost.chatContainer &&
52
+ pendingMessageHost.ui &&
53
+ pendingMessageHost.addMessageToChat &&
54
+ pendingMessageHost.handleEvent) {
55
+ this.restorePendingUserMessage = installPendingUserMessage(pendingMessageHost);
56
+ }
47
57
  const authRoutingMode = this;
48
58
  const promptHistory = new FilePromptHistory(getPromptHistoryPath(getAgentDir()));
49
59
  const handoffGoalMode = this;
@@ -52,7 +62,7 @@ export class BkperInteractiveMode extends InteractiveMode {
52
62
  installHandoffGoalEditorPromptHistory(handoffGoalHost, promptHistory);
53
63
  installHandoffGoalEditorAutocomplete(handoffGoalHost);
54
64
  }
55
- const providerRegistry = (_a = authRoutingMode.session) === null || _a === void 0 ? void 0 : _a.modelRuntime;
65
+ const providerRegistry = (_b = authRoutingMode.session) === null || _b === void 0 ? void 0 : _b.modelRuntime;
56
66
  if (providerRegistry) {
57
67
  const editors = new Set([authRoutingMode.defaultEditor, authRoutingMode.editor].filter(editor => editor !== undefined));
58
68
  for (const editor of editors) {
@@ -73,11 +83,14 @@ export class BkperInteractiveMode extends InteractiveMode {
73
83
  run: { get: () => super.run }
74
84
  });
75
85
  return __awaiter(this, void 0, void 0, function* () {
86
+ var _a;
76
87
  const restoreResumeHintOutput = suppressPiResumeHintOutput();
77
88
  try {
78
89
  yield _super.run.call(this);
79
90
  }
80
91
  finally {
92
+ (_a = this.restorePendingUserMessage) === null || _a === void 0 ? void 0 : _a.call(this);
93
+ this.restorePendingUserMessage = undefined;
81
94
  restoreResumeHintOutput();
82
95
  }
83
96
  });
@@ -1 +1 @@
1
- {"version":3,"file":"interactive-mode.js","sourceRoot":"","sources":["../../../src/agent/interactive/interactive-mode.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACH,WAAW,EACX,eAAe,GAElB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAC,8BAA8B,EAAC,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EACH,oCAAoC,EACpC,qCAAqC,GAExC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACH,0BAA0B,GAE7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAC,4BAA4B,EAAC,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EACH,iBAAiB,EACjB,oBAAoB,GACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,8BAA8B,GAEjC,MAAM,0BAA0B,CAAC;AAIlC,MAAM,mBAAmB,GAAG,yBAAyB,CAAC;AACtD,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAEhD,SAAS,oBAAoB,CAAC,KAAa;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACvF,CAAC;AAED,MAAM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I,gBAAgB,EAAE,CAAC;gBACnB,MAAM,OAAO,GAAG,IAAI,GAAG,CACnB,CAAC,eAAe,CAAC,aAAa,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,CAC1D,MAAM,CAAC,EAAE,CAAC,MAAM,KAAK,SAAS,CACjC,CACJ,CAAC;gBACF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;oBAC3B,8BAA8B,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;gBAC7D,CAAC;YACL,CAAC;YAED,MAAM,OAAO,GAAG,IAAI,GAAG,CACnB,CAAC,eAAe,CAAC,aAAa,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,CAC1D,MAAM,CAAC,EAAE,CAAC,MAAM,KAAK,SAAS,CACjC,CACJ,CAAC;YACF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC3B,0BAA0B,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;YAC7D,CAAC;YAED,IAAI,eAAe,CAAC,WAAW,EAAE,CAAC;gBAC9B,4BAA4B,CACxB,eAAe,EACf,aAAa,EACb,eAAe,CAAC,WAAW,CAC9B,CAAC;YACN,CAAC;QACL,CAAC;KAAA;IAEK,GAAG;;;;;YACL,MAAM,uBAAuB,GAAG,0BAA0B,EAAE,CAAC;YAE7D,IAAI,CAAC;gBACD,MAAM,OAAM,GAAG,WAAE,CAAC;YACtB,CAAC;oBAAS,CAAC;gBACP,uBAAuB,EAAE,CAAC;YAC9B,CAAC;QACL,CAAC;KAAA;CACJ"}
1
+ {"version":3,"file":"interactive-mode.js","sourceRoot":"","sources":["../../../src/agent/interactive/interactive-mode.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACH,WAAW,EACX,eAAe,GAElB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAC,8BAA8B,EAAC,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EACH,oCAAoC,EACpC,qCAAqC,GAEx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AI,GAAG,CACnB,CAAC,eAAe,CAAC,aAAa,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,CAC1D,MAAM,CAAC,EAAE,CAAC,MAAM,KAAK,SAAS,CACjC,CACJ,CAAC;YACF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC3B,0BAA0B,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;YAC7D,CAAC;YAED,IAAI,eAAe,CAAC,WAAW,EAAE,CAAC;gBAC9B,4BAA4B,CACxB,eAAe,EACf,aAAa,EACb,eAAe,CAAC,WAAW,CAC9B,CAAC;YACN,CAAC;QACL,CAAC;KAAA;IAEK,GAAG;;;;;;YACL,MAAM,uBAAuB,GAAG,0BAA0B,EAAE,CAAC;YAE7D,IAAI,CAAC;gBACD,MAAM,OAAM,GAAG,WAAE,CAAC;YACtB,CAAC;oBAAS,CAAC;gBACP,MAAA,IAAI,CAAC,yBAAyB,oDAAI,CAAC;gBACnC,IAAI,CAAC,yBAAyB,GAAG,SAAS,CAAC;gBAC3C,uBAAuB,EAAE,CAAC;YAC9B,CAAC;QACL,CAAC;KAAA;CACJ"}
@@ -0,0 +1,24 @@
1
+ import type { AgentSession, AgentSessionEvent, MessageStartEvent } from '@earendil-works/pi-coding-agent';
2
+ import type { Container, TUI } from '@earendil-works/pi-tui';
3
+ type UserMessage = Extract<MessageStartEvent['message'], {
4
+ role: 'user';
5
+ }>;
6
+ /** Private Pi UI surface, isolated here until Pi supports preflight previews. */
7
+ export interface PendingUserMessageHost {
8
+ session: {
9
+ prompt: AgentSession['prompt'];
10
+ isStreaming: boolean;
11
+ isCompacting: boolean;
12
+ };
13
+ chatContainer: Pick<Container, 'children' | 'removeChild'>;
14
+ ui: Pick<TUI, 'requestRender'>;
15
+ addMessageToChat(message: UserMessage): void;
16
+ handleEvent(event: AgentSessionEvent): Promise<void>;
17
+ rebindCurrentSession?(options?: {
18
+ renderBeforeBind?: boolean;
19
+ }): Promise<void>;
20
+ }
21
+ /** Preview only in the UI: Pi remains responsible for canonical messages and history. */
22
+ export declare function installPendingUserMessage(host: PendingUserMessageHost): () => void;
23
+ export {};
24
+ //# sourceMappingURL=pending-user-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pending-user-message.d.ts","sourceRoot":"","sources":["../../../src/agent/interactive/pending-user-message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAY,SAAS,EAAE,GAAG,EAAC,MAAM,wBAAwB,CAAC;AAEtE,KAAK,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC;AAEzE,iFAAiF;AACjF,MAAM,WAAW,sBAAsB;IACnC,OAAO,EAAE;QACL,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC/B,WAAW,EAAE,OAAO,CAAC;QACrB,YAAY,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,aAAa,CAAC,CAAC;IAC3D,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;IAC/B,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7C,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,oBAAoB,CAAC,CAAC,OAAO,CAAC,EAAE;QAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChF;AAED,yFAAyF;AACzF,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,sBAAsB,GAAG,MAAM,IAAI,CAiElF"}
@@ -0,0 +1,82 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ /** Preview only in the UI: Pi remains responsible for canonical messages and history. */
11
+ export function installPendingUserMessage(host) {
12
+ let session = host.session;
13
+ let prompt = session.prompt;
14
+ const handleEvent = host.handleEvent;
15
+ const rebindCurrentSession = host.rebindCurrentSession;
16
+ let pending;
17
+ const clear = () => {
18
+ if (!pending)
19
+ return;
20
+ for (const component of pending)
21
+ host.chatContainer.removeChild(component);
22
+ pending = undefined;
23
+ host.ui.requestRender();
24
+ };
25
+ const promptWithPreview = (text, options) => __awaiter(this, void 0, void 0, function* () {
26
+ const trimmed = text.trim();
27
+ const preview = !pending &&
28
+ !session.isStreaming &&
29
+ !session.isCompacting &&
30
+ (!(options === null || options === void 0 ? void 0 : options.source) || options.source === 'interactive') &&
31
+ trimmed.length > 0 &&
32
+ !trimmed.startsWith('/') &&
33
+ !trimmed.startsWith('!');
34
+ let components;
35
+ if (preview) {
36
+ const start = host.chatContainer.children.length;
37
+ host.addMessageToChat({ role: 'user', content: trimmed, timestamp: Date.now() });
38
+ components = host.chatContainer.children.slice(start);
39
+ pending = components;
40
+ host.ui.requestRender();
41
+ }
42
+ try {
43
+ yield prompt.call(session, text, options);
44
+ }
45
+ finally {
46
+ // Handled/rejected input has no user message event. Do not leave a ghost row.
47
+ if (components && pending === components)
48
+ clear();
49
+ }
50
+ });
51
+ const handleEventWithPreview = (event) => __awaiter(this, void 0, void 0, function* () {
52
+ if (event.type === 'message_start' && event.message.role === 'user')
53
+ clear();
54
+ yield handleEvent.call(host, event);
55
+ });
56
+ const rebindWithPreview = (options) => __awaiter(this, void 0, void 0, function* () {
57
+ if (host.session !== session) {
58
+ clear();
59
+ if (session.prompt === promptWithPreview)
60
+ session.prompt = prompt;
61
+ session = host.session;
62
+ prompt = session.prompt;
63
+ session.prompt = promptWithPreview;
64
+ }
65
+ yield (rebindCurrentSession === null || rebindCurrentSession === void 0 ? void 0 : rebindCurrentSession.call(host, options));
66
+ });
67
+ session.prompt = promptWithPreview;
68
+ host.handleEvent = handleEventWithPreview;
69
+ if (rebindCurrentSession)
70
+ host.rebindCurrentSession = rebindWithPreview;
71
+ return () => {
72
+ clear();
73
+ if (session.prompt === promptWithPreview)
74
+ session.prompt = prompt;
75
+ if (host.handleEvent === handleEventWithPreview)
76
+ host.handleEvent = handleEvent;
77
+ if (host.rebindCurrentSession === rebindWithPreview) {
78
+ host.rebindCurrentSession = rebindCurrentSession;
79
+ }
80
+ };
81
+ }
82
+ //# sourceMappingURL=pending-user-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pending-user-message.js","sourceRoot":"","sources":["../../../src/agent/interactive/pending-user-message.ts"],"names":[],"mappings":";;;;;;;;;AAuBA,yFAAyF;AACzF,MAAM,UAAU,yBAAyB,CAAC,IAA4B;IAClE,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC3B,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC5B,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IACrC,MAAM,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC;IACvD,IAAI,OAAgC,CAAC;IAErC,MAAM,KAAK,GAAG,GAAG,EAAE;QACf,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,KAAK,MAAM,SAAS,IAAI,OAAO;YAAE,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAC3E,OAAO,GAAG,SAAS,CAAC;QACpB,IAAI,CAAC,EAAE,CAAC,aAAa,EAAE,C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-1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper",
3
- "version": "5.3.2",
3
+ "version": "5.3.3",
4
4
  "description": "Official Bkper CLI for accounting data, automation, apps, and AI agents",
5
5
  "bin": {
6
6
  "bkper": "lib/cli.js"