@protolabsai/proto 0.17.0 → 0.18.1

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.
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  commands: 'Commands',
3
+ export: 'Session Export',
3
4
  'followup-suggestions': 'Followup Suggestions',
4
5
  'sub-agents': 'SubAgents',
5
6
  arena: 'Agent Arena',
@@ -25,6 +25,7 @@ These commands help you save, restore, and summarize work progress.
25
25
  | `/compress` | Replace chat history with summary to save Tokens | `/compress` |
26
26
  | `/resume` | Resume a previous conversation session | `/resume` |
27
27
  | `/restore` | Restore files to state before tool execution | `/restore` (list) or `/restore <ID>` |
28
+ | `/export` | Export current session to a file (html, md, json, jsonl) | `/export html`, `/export md` |
28
29
 
29
30
  ### 1.2 Interface and Workspace Control
30
31
 
@@ -0,0 +1,51 @@
1
+ # Session Export
2
+
3
+ The `/export` command saves your current session to a file in your working directory. Four formats are supported.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /export <format>
9
+ ```
10
+
11
+ | Command | Output |
12
+ | --------------- | -------------------------------------------------- |
13
+ | `/export html` | Self-contained HTML file with a rendered viewer |
14
+ | `/export md` | Markdown — plain text, readable anywhere |
15
+ | `/export json` | Structured JSON — one object per message |
16
+ | `/export jsonl` | JSONL — one JSON object per line (stream-friendly) |
17
+
18
+ Files are written to the current working directory with a timestamped name, e.g. `export-2025-04-05T16-30-00-000Z.html`.
19
+
20
+ ## HTML Format
21
+
22
+ The HTML export produces a **self-contained file** — no server, no internet connection required to view it. Open it directly in any browser.
23
+
24
+ It includes:
25
+
26
+ - Full conversation history with role labels (user / assistant / tool)
27
+ - Rendered markdown (code blocks, lists, headings)
28
+ - Tool call inputs and outputs collapsed by default
29
+ - A minimal, readable stylesheet baked in
30
+
31
+ This is useful for sharing a session with teammates, archiving a debugging session, or reviewing a long conversation outside the terminal.
32
+
33
+ ## JSON / JSONL Formats
34
+
35
+ These formats expose the raw message structure, useful for:
36
+
37
+ - Piping into other tools (`jq`, scripts, LLM pipelines)
38
+ - Programmatic analysis of session content
39
+ - Building integrations on top of proto session data
40
+
41
+ `json` outputs a single array. `jsonl` outputs one JSON object per line, which is better for streaming and large files.
42
+
43
+ ## Markdown Format
44
+
45
+ Exports the conversation as a readable `.md` file. Good for pasting into notes, wikis, or GitHub issues.
46
+
47
+ ## Notes
48
+
49
+ - Export captures the session state at the moment the command runs — messages added after export are not included.
50
+ - The file is written to `config.workingDir` (the directory proto was started in).
51
+ - No session data is sent anywhere — the file is written locally only.
package/cli.js CHANGED
@@ -170762,7 +170762,7 @@ __export(geminiContentGenerator_exports, {
170762
170762
  createGeminiContentGenerator: () => createGeminiContentGenerator
170763
170763
  });
170764
170764
  function createGeminiContentGenerator(config2, gcConfig) {
170765
- const version2 = "0.17.0";
170765
+ const version2 = "0.18.1";
170766
170766
  const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
170767
170767
  const baseHeaders = {
170768
170768
  "User-Agent": userAgent2
@@ -172612,19 +172612,7 @@ Produce a condensed summary of the entire conversation for seamless continuation
172612
172612
 
172613
172613
  ESSENTIAL: Reply with PLAIN TEXT ONLY. Do NOT invoke any tools. Tool invocations will be BLOCKED.
172614
172614
  Everything you need is already present in the conversation above.
172615
- Output must be: one <analysis> block followed by one <summary> block.
172616
-
172617
- ## Analysis Phase
172618
-
172619
- Before writing the summary, wrap your reasoning inside <analysis> tags:
172620
- - Walk through each message chronologically
172621
- - Identify what the user asked for and their underlying intent
172622
- - Note the strategy or approach adopted
172623
- - Record pivotal decisions and trade-offs
172624
- - Capture technical concepts and patterns discussed
172625
- - Extract concrete details: file paths, complete code fragments, function signatures, file modifications
172626
- - Document errors encountered and how they were resolved
172627
- - Note any user feedback or corrections
172615
+ Output must be a single <summary> block. Be maximally concise \u2014 every token counts.
172628
172616
 
172629
172617
  ## Summary Sections
172630
172618
 
@@ -172634,21 +172622,21 @@ The <summary> block must contain exactly these ten sections:
172634
172622
 
172635
172623
  2. **Key Technical Concepts** \u2014 Frameworks, patterns, algorithms, architectures, or domain knowledge involved. Include build commands, test commands, and environment details.
172636
172624
 
172637
- 3. **Files and Code Sections** \u2014 Enumerate every relevant file by absolute path. Include complete code snippets for anything non-trivial. Note status: CREATED, MODIFIED, READ, DELETED. Explain why each matters. For files that were read multiple times, keep only the most recent read \u2014 deduplicate by path.
172625
+ 3. **Files and Code Sections** \u2014 Enumerate every relevant file by absolute path. Note status: CREATED, MODIFIED, READ, DELETED. For non-trivial changes, describe what changed and why \u2014 do NOT reproduce full file contents or long code listings. Only include short, critical snippets (< 20 lines) where the exact code is essential for resumption.
172638
172626
 
172639
172627
  4. **Errors and Fixes** \u2014 Every error that surfaced, the exact error message, how it was resolved, and any user reactions or corrections. This section prevents the agent from retrying failed approaches.
172640
172628
 
172641
172629
  5. **Problem Solving** \u2014 Reasoning chains, alternative approaches considered and why they were rejected, debugging strategies applied. This section preserves eliminated dead ends.
172642
172630
 
172643
- 6. **All User Messages** \u2014 List ALL non-tool-result messages from the user, preserving their substance verbatim. Do not paraphrase \u2014 the user's exact words carry intent that summaries lose.
172631
+ 6. **All User Messages** \u2014 Summarize the intent and substance of each user message concisely. Preserve exact wording only for short, critical instructions \u2014 do not reproduce long messages verbatim.
172644
172632
 
172645
172633
  7. **Current Todo List** \u2014 List EVERY todo item with its exact current status: added | in_progress | completed | cancelled. Do not omit any item. This is critical for resuming work without re-planning completed tasks.
172646
172634
 
172647
172635
  8. **Pending Tasks** \u2014 Work that remains unfinished or was explicitly deferred. Include any promises made to the user.
172648
172636
 
172649
- 9. **Current Work** \u2014 Precise description of what was actively being worked on at conversation end, with file names, line numbers, and code fragments. This is the most critical section for seamless resumption.
172637
+ 9. **Current Work** \u2014 Precise description of what was actively being worked on at conversation end, with file names and line numbers. This is the most critical section for seamless resumption.
172650
172638
 
172651
- 10. **Optional Next Step** \u2014 MUST align directly with the user's most recent explicit requests. Include direct quotes showing which task was underway. Do not invent next steps the user did not ask for.
172639
+ 10. **Optional Next Step** \u2014 MUST align directly with the user's most recent explicit requests. Do not invent next steps the user did not ask for.
172652
172640
 
172653
172641
  ## Continuation Behavior
172654
172642
 
@@ -174031,7 +174019,7 @@ ${summary}`;
174031
174019
  role: "user",
174032
174020
  parts: [
174033
174021
  {
174034
- text: "First, reason in your scratchpad. Then, generate the <state_snapshot>."
174022
+ text: "Generate the <summary> now. Be maximally concise \u2014 every token counts."
174035
174023
  }
174036
174024
  ]
174037
174025
  }
@@ -411779,7 +411767,7 @@ __name(getPackageJson, "getPackageJson");
411779
411767
  // packages/cli/src/utils/version.ts
411780
411768
  async function getCliVersion() {
411781
411769
  const pkgJson = await getPackageJson();
411782
- return "0.17.0";
411770
+ return "0.18.1";
411783
411771
  }
411784
411772
  __name(getCliVersion, "getCliVersion");
411785
411773
 
@@ -419551,7 +419539,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
419551
419539
 
419552
419540
  // packages/cli/src/generated/git-commit.ts
419553
419541
  init_esbuild_shims();
419554
- var GIT_COMMIT_INFO = "74cc47e9b";
419542
+ var GIT_COMMIT_INFO = "ea801e2ee";
419555
419543
 
419556
419544
  // packages/cli/src/utils/systemInfo.ts
419557
419545
  async function getNpmVersion() {
@@ -466774,13 +466762,23 @@ init_esbuild_shims();
466774
466762
  var import_react106 = __toESM(require_react(), 1);
466775
466763
  init_dist4();
466776
466764
  var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
466777
- var ACTION_ITEMS = [
466778
- { label: "Restore files + conversation", key: "files_and_conversation" },
466779
- { label: "Restore conversation only", key: "conversation_only" },
466780
- { label: "Restore files only", key: "files_only" },
466781
- { label: "Summarize from here", key: "summarize_from_here" },
466782
- { label: "Cancel", key: "cancel" }
466783
- ];
466765
+ function buildActionItems(hasFileSnapshots) {
466766
+ const items = [];
466767
+ if (hasFileSnapshots) {
466768
+ items.push({
466769
+ label: "Restore files + conversation",
466770
+ key: "files_and_conversation"
466771
+ });
466772
+ }
466773
+ items.push({ label: "Restore conversation only", key: "conversation_only" });
466774
+ if (hasFileSnapshots) {
466775
+ items.push({ label: "Restore files only", key: "files_only" });
466776
+ }
466777
+ items.push({ label: "Summarize from here", key: "summarize_from_here" });
466778
+ items.push({ label: "Cancel", key: "cancel" });
466779
+ return items;
466780
+ }
466781
+ __name(buildActionItems, "buildActionItems");
466784
466782
  function truncate5(text, maxLen) {
466785
466783
  if (text.length <= maxLen) return text;
466786
466784
  return text.slice(0, maxLen - 1) + "\u2026";
@@ -466801,6 +466799,11 @@ function RewindPicker({
466801
466799
  const [phase, setPhase] = (0, import_react106.useState)("pick");
466802
466800
  const [selectedCheckpointIdx, setSelectedCheckpointIdx] = (0, import_react106.useState)(0);
466803
466801
  const [selectedActionIdx, setSelectedActionIdx] = (0, import_react106.useState)(0);
466802
+ const actionItems = (0, import_react106.useMemo)(() => {
466803
+ const cp3 = checkpoints[selectedCheckpointIdx];
466804
+ const hasFileSnapshots = (cp3?.fileSnapshots.size ?? 0) > 0;
466805
+ return buildActionItems(hasFileSnapshots);
466806
+ }, [checkpoints, selectedCheckpointIdx]);
466804
466807
  const boxWidth = width - 4;
466805
466808
  const reservedLines = 8;
466806
466809
  const maxVisibleItems = Math.max(1, height - reservedLines);
@@ -466854,7 +466857,7 @@ function RewindPicker({
466854
466857
  onCancel();
466855
466858
  return;
466856
466859
  }
466857
- const action = ACTION_ITEMS[selectedActionIdx];
466860
+ const action = actionItems[selectedActionIdx];
466858
466861
  if (!action) {
466859
466862
  onCancel();
466860
466863
  return;
@@ -466887,7 +466890,7 @@ function RewindPicker({
466887
466890
  }
466888
466891
  if (key.name === "down") {
466889
466892
  setSelectedActionIdx(
466890
- (prev) => Math.min(ACTION_ITEMS.length - 1, prev + 1)
466893
+ (prev) => Math.min(actionItems.length - 1, prev + 1)
466891
466894
  );
466892
466895
  return;
466893
466896
  }
@@ -466900,7 +466903,8 @@ function RewindPicker({
466900
466903
  onSummarizeFromHere,
466901
466904
  checkpoints,
466902
466905
  selectedCheckpointIdx,
466903
- selectedActionIdx
466906
+ selectedActionIdx,
466907
+ actionItems
466904
466908
  ]
466905
466909
  );
466906
466910
  useKeypress(
@@ -466981,7 +466985,7 @@ function RewindPicker({
466981
466985
  ] })
466982
466986
  ] }),
466983
466987
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text3, { color: theme.border.default, children: "\u2500".repeat(boxWidth - 2) }) }),
466984
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { flexDirection: "column", paddingX: 1, overflow: "hidden", children: ACTION_ITEMS.map((item, idx) => {
466988
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { flexDirection: "column", paddingX: 1, overflow: "hidden", children: actionItems.map((item, idx) => {
466985
466989
  const isSelected = idx === selectedActionIdx;
466986
466990
  const prefix = isSelected ? "\u203A " : " ";
466987
466991
  return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Box_default, { flexDirection: "row", children: [
@@ -486304,7 +486308,7 @@ var QwenAgent = class {
486304
486308
  async initialize(args2) {
486305
486309
  this.clientCapabilities = args2.clientCapabilities;
486306
486310
  const authMethods = buildAuthMethods();
486307
- const version2 = "0.17.0";
486311
+ const version2 = "0.18.1";
486308
486312
  return {
486309
486313
  protocolVersion: PROTOCOL_VERSION,
486310
486314
  agentInfo: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protolabsai/proto",
3
- "version": "0.17.0",
3
+ "version": "0.18.1",
4
4
  "description": "proto - AI-powered coding agent",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,7 +21,7 @@
21
21
  "bundled"
22
22
  ],
23
23
  "config": {
24
- "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.17.0"
24
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.18.1"
25
25
  },
26
26
  "dependencies": {},
27
27
  "optionalDependencies": {