niahere 0.2.86 → 0.2.87
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 +1 -1
- package/src/chat/engine.ts +2 -1
- package/src/core/runner.ts +2 -1
- package/src/core/skills.ts +6 -0
package/package.json
CHANGED
package/src/chat/engine.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { getConfig } from "../utils/config";
|
|
|
26
26
|
import { isRetryableApiError, sleep } from "../utils/retry";
|
|
27
27
|
import { registerActiveHandle, unregisterActiveHandle } from "../core/active-handles";
|
|
28
28
|
import { resolveJobPrompt } from "../core/job-prompt";
|
|
29
|
+
import { getSdkSkillsSetting } from "../core/skills";
|
|
29
30
|
|
|
30
31
|
const IDLE_TIMEOUT = 10 * 60 * 1000; // 10 minutes
|
|
31
32
|
const LONG_RUNNING_WARN = 30 * 60 * 1000; // 30 minutes
|
|
@@ -330,7 +331,7 @@ export async function createChatEngine(opts: EngineOptions): Promise<ChatEngine>
|
|
|
330
331
|
permissionMode: "bypassPermissions",
|
|
331
332
|
includePartialMessages: true,
|
|
332
333
|
settingSources: ["project", "user"],
|
|
333
|
-
skills:
|
|
334
|
+
skills: getSdkSkillsSetting(),
|
|
334
335
|
};
|
|
335
336
|
const model = resolveSdkModel(contextModel);
|
|
336
337
|
if (model) {
|
package/src/core/runner.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { ActiveEngine } from "../db/models";
|
|
|
17
17
|
import { log } from "../utils/log";
|
|
18
18
|
import { isRetryableApiError, sleep } from "../utils/retry";
|
|
19
19
|
import { registerActiveHandle, unregisterActiveHandle } from "./active-handles";
|
|
20
|
+
import { getSdkSkillsSetting } from "./skills";
|
|
20
21
|
|
|
21
22
|
export { buildWorkingMemory } from "./job-prompt";
|
|
22
23
|
|
|
@@ -119,7 +120,7 @@ export async function runJobWithClaude(
|
|
|
119
120
|
cwd,
|
|
120
121
|
permissionMode: "bypassPermissions",
|
|
121
122
|
sessionId,
|
|
122
|
-
skills:
|
|
123
|
+
skills: getSdkSkillsSetting(),
|
|
123
124
|
};
|
|
124
125
|
|
|
125
126
|
if (model && model !== "default") {
|
package/src/core/skills.ts
CHANGED
|
@@ -10,6 +10,8 @@ const PROJECT_ROOT = resolve(import.meta.dir, "../..");
|
|
|
10
10
|
|
|
11
11
|
export type SkillInfo = { name: string; description: string; source: string };
|
|
12
12
|
|
|
13
|
+
export const SDK_SKILLS_SETTING = "all" as const;
|
|
14
|
+
|
|
13
15
|
const SKILL_DIRS: { dir: string; source: string }[] = [
|
|
14
16
|
{ dir: join(process.cwd(), "skills"), source: "cwd" },
|
|
15
17
|
{ dir: join(PROJECT_ROOT, "skills"), source: "project" },
|
|
@@ -71,3 +73,7 @@ export function getSkillsSummary(): string {
|
|
|
71
73
|
const lines = skills.map((s) => (s.description ? `- /${s.name}: ${s.description}` : `- /${s.name}`));
|
|
72
74
|
return `Available skills:\n${lines.join("\n")}`;
|
|
73
75
|
}
|
|
76
|
+
|
|
77
|
+
export function getSdkSkillsSetting(): typeof SDK_SKILLS_SETTING {
|
|
78
|
+
return SDK_SKILLS_SETTING;
|
|
79
|
+
}
|