@protolabsai/proto 0.18.0 → 0.18.2

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.18.0";
170765
+ const version2 = "0.18.2";
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.18.0";
411770
+ return "0.18.2";
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 = "9828e8f69";
419542
+ var GIT_COMMIT_INFO = "df5bba11d";
419555
419543
 
419556
419544
  // packages/cli/src/utils/systemInfo.ts
419557
419545
  async function getNpmVersion() {
@@ -474762,20 +474750,23 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
474762
474750
  }
474763
474751
  return new GitService(config2.getProjectRoot(), storage);
474764
474752
  }, [config2, storage]);
474765
- const [toolCalls, scheduleToolCalls, markToolsAsSubmitted] = useReactToolScheduler(
474753
+ const addItemRef = (0, import_react143.useRef)(addItem);
474754
+ addItemRef.current = addItem;
474755
+ const onCompleteFnRef = (0, import_react143.useRef)(void 0);
474756
+ const stableOnComplete = (0, import_react143.useCallback)(
474766
474757
  async (completedToolCallsFromScheduler) => {
474767
474758
  if (completedToolCallsFromScheduler.length > 0) {
474768
- addItem(
474769
- mapToDisplay(
474770
- completedToolCallsFromScheduler
474771
- ),
474759
+ addItemRef.current(
474760
+ mapToDisplay(completedToolCallsFromScheduler),
474772
474761
  Date.now()
474773
474762
  );
474774
- await handleCompletedTools(
474775
- completedToolCallsFromScheduler
474776
- );
474763
+ await onCompleteFnRef.current?.(completedToolCallsFromScheduler);
474777
474764
  }
474778
474765
  },
474766
+ []
474767
+ );
474768
+ const [toolCalls, scheduleToolCalls, markToolsAsSubmitted] = useReactToolScheduler(
474769
+ stableOnComplete,
474779
474770
  config2,
474780
474771
  getPreferredEditor,
474781
474772
  onEditorClose
@@ -475772,6 +475763,7 @@ ${verifyResult}` });
475772
475763
  settings?.merged?.tools?.verifyCommand
475773
475764
  ]
475774
475765
  );
475766
+ onCompleteFnRef.current = handleCompletedTools;
475775
475767
  (0, import_react143.useEffect)(() => {
475776
475768
  if (!isResponding && pendingCompletedToolsRef.current.length > 0) {
475777
475769
  const queued = pendingCompletedToolsRef.current.splice(0);
@@ -486320,7 +486312,7 @@ var QwenAgent = class {
486320
486312
  async initialize(args2) {
486321
486313
  this.clientCapabilities = args2.clientCapabilities;
486322
486314
  const authMethods = buildAuthMethods();
486323
- const version2 = "0.18.0";
486315
+ const version2 = "0.18.2";
486324
486316
  return {
486325
486317
  protocolVersion: PROTOCOL_VERSION,
486326
486318
  agentInfo: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protolabsai/proto",
3
- "version": "0.18.0",
3
+ "version": "0.18.2",
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.18.0"
24
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.18.2"
25
25
  },
26
26
  "dependencies": {},
27
27
  "optionalDependencies": {