thepopebot 1.2.76-beta.13 → 1.2.76-beta.14

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.
package/bin/cli.js CHANGED
@@ -651,6 +651,7 @@ const PROTECTED_PATHS = [
651
651
  '.kimi/',
652
652
  '.pi/',
653
653
  'skills/',
654
+ 'agents/',
654
655
  'node_modules/',
655
656
  ];
656
657
 
package/lib/ai/index.js CHANGED
@@ -136,6 +136,9 @@ async function* chatStream(threadId, message, attachments = [], options = {}) {
136
136
  const branch = options.branch;
137
137
  const codeModeType = options.codeModeType || 'plan';
138
138
 
139
+ // Resolve workspace — for existing chats, read scope from DB (client may not resend it after refresh)
140
+ let resolvedScope = options.scope || null;
141
+
139
142
  if (!existingChat) {
140
143
  // Create workspace if not already provided
141
144
  if (!workspaceId) {
@@ -143,7 +146,7 @@ async function* chatStream(threadId, message, attachments = [], options = {}) {
143
146
  const workspace = createCodeWorkspace(options.userId || 'unknown', {
144
147
  repo: repo,
145
148
  branch: branch,
146
- scope: options.scope || null,
149
+ scope: resolvedScope,
147
150
  });
148
151
  workspaceId = workspace.id;
149
152
  const { generateRandomName } = await import('../utils/random-name.js');
@@ -155,6 +158,12 @@ async function* chatStream(threadId, message, attachments = [], options = {}) {
155
158
  linkChatToWorkspace(threadId, workspaceId);
156
159
  } else {
157
160
  workspaceId = workspaceId || existingChat.codeWorkspaceId;
161
+ // Read scope from workspace record — client may not resend after page refresh
162
+ if (!resolvedScope && workspaceId) {
163
+ const { getCodeWorkspaceById } = await import('../db/code-workspaces.js');
164
+ const ws = getCodeWorkspaceById(workspaceId);
165
+ if (ws?.scope) resolvedScope = ws.scope;
166
+ }
158
167
  }
159
168
 
160
169
  // ── SDK path: direct in-process SDK call (no LangGraph, no Docker) ──
@@ -205,7 +214,7 @@ async function* chatStream(threadId, message, attachments = [], options = {}) {
205
214
  }
206
215
 
207
216
  // 2. Resolve scope (working directory + skills)
208
- const scope = options.scope || null;
217
+ const scope = resolvedScope;
209
218
  const chatMode = isCodeMode ? 'code' : 'agent';
210
219
  const { workingDir, skillsDir } = resolveAgentScope(repoDir, scope);
211
220
 
@@ -335,7 +344,7 @@ async function* chatStream(threadId, message, attachments = [], options = {}) {
335
344
  try {
336
345
  const stream = await agent.stream(
337
346
  { messages: [new HumanMessage({ content: messageContent })] },
338
- { configurable: { thread_id: threadId, workspaceId, repo, branch, codeModeType, scope: options.scope || null, streamCallback }, streamMode: 'messages' }
347
+ { configurable: { thread_id: threadId, workspaceId, repo, branch, codeModeType, scope: resolvedScope, streamCallback }, streamMode: 'messages' }
339
348
  );
340
349
 
341
350
  const toolCallNames = {};
@@ -17,6 +17,7 @@ export const BUILTIN_PROVIDERS = {
17
17
  ],
18
18
  models: [
19
19
  { id: 'claude-sonnet-4-6', name: 'Claude Sonnet 4.6', default: true },
20
+ { id: 'claude-opus-4-7', name: 'Claude Opus 4.7' },
20
21
  { id: 'claude-opus-4-6', name: 'Claude Opus 4.6' },
21
22
  { id: 'claude-haiku-4-5-20251001', name: 'Claude Haiku 4.5' },
22
23
  { id: 'claude-sonnet-4-20250514', name: 'Claude Sonnet 4' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thepopebot",
3
- "version": "1.2.76-beta.13",
3
+ "version": "1.2.76-beta.14",
4
4
  "type": "module",
5
5
  "description": "Create autonomous AI agents with a two-layer architecture: Next.js Event Handler + Docker Agent.",
6
6
  "bin": {
@@ -14,7 +14,8 @@ export const PROVIDERS = {
14
14
  builtin: true,
15
15
  oauthSupported: true,
16
16
  models: [
17
- { id: 'claude-opus-4-6', name: 'Claude Opus 4.6', default: true },
17
+ { id: 'claude-opus-4-7', name: 'Claude Opus 4.7', default: true },
18
+ { id: 'claude-opus-4-6', name: 'Claude Opus 4.6' },
18
19
  { id: 'claude-sonnet-4-6', name: 'Claude Sonnet 4.6' },
19
20
  { id: 'claude-haiku-4-5-20251001', name: 'Claude Haiku 4.5' },
20
21
  ],
@@ -46,6 +46,7 @@ services:
46
46
  volumes:
47
47
  - .:/project
48
48
  - ./agent-job:/app/agent-job
49
+ - ./agents:/app/agents
49
50
  - ./event-handler:/app/event-handler
50
51
  - ./skills:/app/skills
51
52
  - ./.env:/app/.env