@cspeach/cli 1.1.53 → 1.1.54

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 (50) hide show
  1. package/dist/agent/loop.js +50 -5
  2. package/dist/agent/tool-dispatch.js +11 -0
  3. package/dist/auth/auth-file.js +3 -0
  4. package/dist/auth/key-resolver.js +8 -3
  5. package/dist/auth/me.js +6 -2
  6. package/dist/cli.js +22 -0
  7. package/dist/commands/login.js +22 -4
  8. package/dist/commands/plan-reground.js +5 -0
  9. package/dist/commands/sap-link.js +14 -1
  10. package/dist/commands/team-build-help.js +19 -0
  11. package/dist/commands/team-build.js +97 -0
  12. package/dist/commands/team-plan.js +2 -2
  13. package/dist/commands/team-spec.js +107 -0
  14. package/dist/commands/team.js +74 -4
  15. package/dist/journey/chain.js +8 -0
  16. package/dist/journey/clean-core.js +2 -2
  17. package/dist/journey/rebuild.js +8 -0
  18. package/dist/journey/run.js +9 -0
  19. package/dist/licence/paths.js +5 -0
  20. package/dist/licence/seat-kind.js +110 -0
  21. package/dist/licence/seat-state.js +4 -0
  22. package/dist/licence/terminal-seat.js +43 -0
  23. package/dist/licence/turn-gate.js +4 -0
  24. package/dist/one-shot.js +32 -0
  25. package/dist/projects/answer-blockers.js +31 -7
  26. package/dist/projects/blocker-answers-note.js +1 -1
  27. package/dist/projects/save-command.js +37 -2
  28. package/dist/projects/saved-lines.js +19 -17
  29. package/dist/projects/spec-share.js +239 -0
  30. package/dist/register/picture.js +2 -2
  31. package/dist/register/store.js +19 -0
  32. package/dist/repl/builtin-commands.js +4 -3
  33. package/dist/repl/file-picker.js +52 -5
  34. package/dist/repl/mode-cycle.js +12 -0
  35. package/dist/repl/open-questions-gate.js +159 -0
  36. package/dist/repl/ready-phrase.js +108 -0
  37. package/dist/repl/startup-account.js +64 -1
  38. package/dist/repl/team-build-screen.js +116 -0
  39. package/dist/repl/team-build-start.js +178 -0
  40. package/dist/repl.js +205 -9
  41. package/dist/sap-link/policy.js +4 -0
  42. package/dist/sap-link/registry.js +9 -3
  43. package/dist/sap-link/server.js +4 -1
  44. package/dist/tools/_team-work-path.js +1 -1
  45. package/dist/tools/cap/sap-link-tool.js +2 -0
  46. package/dist/tools/project/spec_answers_record.js +62 -9
  47. package/dist/tools/project/team_findings.js +2 -2
  48. package/dist/tools/seat-gate.js +41 -0
  49. package/dist/ui/widgets/files-card.js +19 -1
  50. package/package.json +1 -1
@@ -24,6 +24,21 @@ export function filterFileItems(items, query) {
24
24
  function fit(text, cells) {
25
25
  return truncateToWidth(sanitizeControlChars(text), Math.max(1, cells));
26
26
  }
27
+ /** A folder path keeps its END when cut (the project and .cspeach part): `…` + tail. */
28
+ function fitTail(text, cells) {
29
+ const clean = sanitizeControlChars(text);
30
+ const room = Math.max(1, cells);
31
+ if (stringWidth(clean) <= room)
32
+ return clean;
33
+ const chars = [...clean];
34
+ let tail = '';
35
+ for (let i = chars.length - 1; i >= 0; i--) {
36
+ if (stringWidth(chars[i] + tail) > room - 1)
37
+ break;
38
+ tail = chars[i] + tail;
39
+ }
40
+ return `…${tail}`;
41
+ }
27
42
  export function FilesCard({ request, width, onResolve }) {
28
43
  // Same raw-stdin reclaim as every card (an earlier inquirer prompt can leave
29
44
  // Ink's raw-mode bookkeeping stale).
@@ -83,9 +98,12 @@ export function FilesCard({ request, width, onResolve }) {
83
98
  const inner = Math.max(1, width - 4);
84
99
  const dim = roleProps('dim');
85
100
  const searchLabel = 'Search ';
101
+ const folderLabel = 'Folder ';
86
102
  // A long query is cut by cells (with …) so the row never wraps.
87
103
  const queryShown = fit(query, inner - stringWidth(searchLabel) - 1);
88
- return (_jsxs(CardFrame, { tag: "QUESTION", footnote: "/files", width: width, children: [_jsx(Text, { bold: true, wrap: "truncate-end", children: fit(request.title, inner) }), _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { ...dim, children: searchLabel }), _jsx(Text, { children: queryShown }), _jsx(Text, { ...roleProps('sap'), children: "_" })] }), visible.length === 0
104
+ return (_jsxs(CardFrame, { tag: "QUESTION", footnote: "/files", width: width, children: [_jsx(Text, { bold: true, wrap: "truncate-end", children: fit(request.title, inner) }), request.folder
105
+ ? _jsx(Text, { wrap: "truncate-end", ...dim, children: folderLabel + fitTail(request.folder, inner - stringWidth(folderLabel)) })
106
+ : null, _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { ...dim, children: searchLabel }), _jsx(Text, { children: queryShown }), _jsx(Text, { ...roleProps('sap'), children: "_" })] }), visible.length === 0
89
107
  ? _jsx(Text, { ...dim, children: "No file matches" })
90
108
  : visible.map((it, i) => {
91
109
  const on = start + i === cursor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cspeach/cli",
3
- "version": "1.1.53",
3
+ "version": "1.1.54",
4
4
  "description": "CSPeach — AI-assisted ABAP development CLI. Direct SAP access, signed skills, safety gates.",
5
5
  "keywords": [
6
6
  "abap",