@dccxx/auggiegw 1.0.20 → 1.0.22

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 (3) hide show
  1. package/CLAUDE.md +8 -4
  2. package/dist/cli.js +13 -2
  3. package/package.json +1 -1
package/CLAUDE.md CHANGED
@@ -95,10 +95,13 @@ When `--refresh-commands` is provided:
95
95
  3. Saves the fetched prompts to `~/.augment/commands/`
96
96
 
97
97
  When `--refresh-commands` is NOT provided (default):
98
- - Skips prompt fetching entirely for faster operation
99
- - Only performs authentication
98
+ 1. Fetches all prompts from the API using `getAllPrompts()`
99
+ 2. Saves/overwrites prompts to `~/.augment/commands/` (existing files are overwritten)
100
+ 3. Does NOT delete local commands that aren't on the server
100
101
 
101
- The `--auth-only` flag takes precedence over `--refresh-commands` (if both are provided, prompts are skipped).
102
+ The key difference: `--refresh-commands` does a full clean sync (deletes all local first), while the default only syncs server prompts to local without removing extra local files.
103
+
104
+ The `--auth-only` flag takes precedence and skips all prompt operations.
102
105
 
103
106
  ### Account Switching Logic (lines 714-770)
104
107
 
@@ -108,13 +111,14 @@ The `switch-account` command:
108
111
  - Switches to the account at index `currentIndex - 1` (the newer one)
109
112
  - After switching, calls `handleFetch({ authOnly: true, deleteSession: true })`
110
113
 
111
- ### Prompt File Format (lines 305-319)
114
+ ### Prompt File Format (lines 310-320)
112
115
 
113
116
  Prompts are saved as markdown with YAML frontmatter:
114
117
 
115
118
  ```markdown
116
119
  ---
117
120
  description: {prompt.name}
121
+ type: "manual"
118
122
  ---
119
123
 
120
124
  {prompt.content}
package/dist/cli.js CHANGED
@@ -2325,6 +2325,7 @@ async function savePromptToFile(prompt) {
2325
2325
  await fs.mkdir(AUGMENT_COMMANDS_DIR, { recursive: true });
2326
2326
  const markdownContent = `---
2327
2327
  description: ${prompt.name}
2328
+ type: "manual"
2328
2329
  ---
2329
2330
 
2330
2331
  ${prompt.content}`;
@@ -2593,7 +2594,17 @@ async function handleFetch(options) {
2593
2594
  spinner.warn(`Deleted ${deletedCount} commands, no new prompts found`);
2594
2595
  }
2595
2596
  } else {
2596
- spinner.succeed("Authentication successful (use --refresh-commands to update prompts)");
2597
+ spinner.text = "Fetching prompts from server...";
2598
+ const allPrompts = await getAllPrompts(token, config.apiUrl, spinner);
2599
+ if (allPrompts.length > 0) {
2600
+ spinner.text = `Saving ${allPrompts.length} prompts...`;
2601
+ for (const prompt of allPrompts) {
2602
+ await savePromptToFile(prompt);
2603
+ }
2604
+ spinner.succeed(`Successfully synced ${allPrompts.length} prompts from server`);
2605
+ } else {
2606
+ spinner.succeed("Authentication successful (no prompts found on server)");
2607
+ }
2597
2608
  }
2598
2609
  }
2599
2610
  } catch (error) {
@@ -2693,4 +2704,4 @@ program2.command("exec <command> [args...]").description("Execute any custom com
2693
2704
  program2.command("switch-account").description("Switch to a newer account from the purchased account list").action(handleSwitchAccount);
2694
2705
  program2.parse();
2695
2706
 
2696
- //# debugId=B34B485639FF8F0864756E2164756E21
2707
+ //# debugId=31D9A45346BDA22864756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dccxx/auggiegw",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "A Node.js TypeScript package",
5
5
  "main": "./dist/cli.js",
6
6
  "types": "./dist/cli.d.ts",