@ottocode/server 0.1.242 → 0.1.244
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ottocode/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.244",
|
|
4
4
|
"description": "HTTP API server for ottocode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"typecheck": "tsc --noEmit"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@ottocode/sdk": "0.1.
|
|
53
|
-
"@ottocode/database": "0.1.
|
|
52
|
+
"@ottocode/sdk": "0.1.244",
|
|
53
|
+
"@ottocode/database": "0.1.244",
|
|
54
54
|
"drizzle-orm": "^0.44.5",
|
|
55
55
|
"hono": "^4.9.9",
|
|
56
56
|
"zod": "^4.3.6"
|
package/src/routes/skills.ts
CHANGED
|
@@ -17,8 +17,18 @@ export function registerSkillsRoutes(app: Hono) {
|
|
|
17
17
|
const projectRoot = c.req.query('project') || process.cwd();
|
|
18
18
|
const repoRoot = (await findGitRoot(projectRoot)) ?? projectRoot;
|
|
19
19
|
const skills = await discoverSkills(projectRoot, repoRoot);
|
|
20
|
+
// Dedupe by name (same skill may exist in multiple source dirs like
|
|
21
|
+
// ~/.claude/skills and ~/.codex/skills). `discoverSkills` already
|
|
22
|
+
// dedupes via its internal Map, but be defensive here for UI consistency.
|
|
23
|
+
const seen = new Set<string>();
|
|
24
|
+
const unique = skills.filter((s) => {
|
|
25
|
+
const key = s.name.trim();
|
|
26
|
+
if (!key || seen.has(key)) return false;
|
|
27
|
+
seen.add(key);
|
|
28
|
+
return true;
|
|
29
|
+
});
|
|
20
30
|
return c.json({
|
|
21
|
-
skills:
|
|
31
|
+
skills: unique.map((s) => ({
|
|
22
32
|
name: s.name,
|
|
23
33
|
description: s.description,
|
|
24
34
|
scope: s.scope,
|
|
@@ -153,7 +153,7 @@ export async function setupRunner(opts: RunOpts): Promise<SetupResult> {
|
|
|
153
153
|
oneShot: opts.oneShot,
|
|
154
154
|
guidedMode: cfg.defaults.guidedMode,
|
|
155
155
|
spoofPrompt: undefined,
|
|
156
|
-
includeProjectTree:
|
|
156
|
+
includeProjectTree: false,
|
|
157
157
|
userContext: opts.userContext,
|
|
158
158
|
contextSummary,
|
|
159
159
|
isOpenAIOAuth: oauth.isOpenAIOAuth,
|
|
@@ -347,24 +347,3 @@ export async function setupRunner(opts: RunOpts): Promise<SetupResult> {
|
|
|
347
347
|
mcpToolsRecord,
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
|
|
351
|
-
export function buildMessages(
|
|
352
|
-
additionalSystemMessages: Array<{ role: string; content: string }>,
|
|
353
|
-
history: Array<{ role: string; content: string | Array<unknown> }>,
|
|
354
|
-
isFirstMessage: boolean,
|
|
355
|
-
): Array<{ role: string; content: string | Array<unknown> }> {
|
|
356
|
-
const messagesWithSystemInstructions: Array<{
|
|
357
|
-
role: string;
|
|
358
|
-
content: string | Array<unknown>;
|
|
359
|
-
}> = [...additionalSystemMessages, ...history];
|
|
360
|
-
|
|
361
|
-
if (!isFirstMessage) {
|
|
362
|
-
messagesWithSystemInstructions.push({
|
|
363
|
-
role: 'user',
|
|
364
|
-
content:
|
|
365
|
-
'SYSTEM REMINDER: You are continuing an existing session. When you have completed the task, you MUST stream a text summary of what you did to the user, and THEN call the `finish` tool. Do not call `finish` without a summary.',
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
return messagesWithSystemInstructions;
|
|
370
|
-
}
|
|
@@ -189,13 +189,13 @@ async function runAssistant(opts: RunOpts) {
|
|
|
189
189
|
messagesWithSystemInstructions.push({
|
|
190
190
|
role: 'system',
|
|
191
191
|
content:
|
|
192
|
-
'
|
|
192
|
+
'[system-reminder] Continuing an existing session. Execute directly, use tools as needed, and call `finish` at the end. For simple questions, your answer IS the response — do not add a "Summary:" recap.',
|
|
193
193
|
});
|
|
194
194
|
} else {
|
|
195
195
|
messagesWithSystemInstructions.push({
|
|
196
196
|
role: 'user',
|
|
197
197
|
content:
|
|
198
|
-
'
|
|
198
|
+
'<system-reminder>Continuing an existing session. Answer or complete the work directly, then call `finish`. For simple questions, your answer IS the response — do NOT add a labeled "Summary:" line or recap trivial replies.</system-reminder>',
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
}
|
|
@@ -204,13 +204,13 @@ async function runAssistant(opts: RunOpts) {
|
|
|
204
204
|
messagesWithSystemInstructions.push({
|
|
205
205
|
role: 'system',
|
|
206
206
|
content:
|
|
207
|
-
'
|
|
207
|
+
'[system-reminder] Your previous response stopped mid-task. Resume from where you left off and complete the actual work — not a plan-only update.',
|
|
208
208
|
});
|
|
209
209
|
} else {
|
|
210
210
|
messagesWithSystemInstructions.push({
|
|
211
211
|
role: 'user',
|
|
212
212
|
content:
|
|
213
|
-
'
|
|
213
|
+
'<system-reminder>Your previous response stopped before calling `finish`. Resume from where you left off, do the actual work (no plan-only updates), then stream a summary and call `finish`.</system-reminder>',
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
}
|