@ycodium-ai/agent-claude 0.2.2854 → 0.2.2856

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 (2) hide show
  1. package/dist/index.js +33 -29
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -20487,6 +20487,36 @@ function claudeSignInCommand(credentialsPath, platform2) {
20487
20487
  return withClaudeCredentialsDir({ command, credentialsDirPath, platform: platform2 });
20488
20488
  }
20489
20489
 
20490
+ // src/claudeSkillDispatch.ts
20491
+ var SKILL_MENTION_PATTERN = /(^|\s)\$([a-zA-Z][a-zA-Z0-9:_-]*)(?=\s|$)/g;
20492
+ function planClaudeSkillDispatch(prompt, skillNames) {
20493
+ const mentions = [...prompt.matchAll(SKILL_MENTION_PATTERN)].flatMap((match) => {
20494
+ const name = match[2] ?? "";
20495
+ if (!skillNames.has(name)) return [];
20496
+ const start = (match.index ?? 0) + (match[1]?.length ?? 0);
20497
+ return [{ name, start, end: start + name.length + 1 }];
20498
+ });
20499
+ const last = mentions.at(-1);
20500
+ if (last === void 0) return void 0;
20501
+ const leading = prompt.slice(0, last.start);
20502
+ const trailing = prompt.slice(last.end);
20503
+ const leadingWithInlineSlashes = mentions.slice(0, -1).reduceRight(
20504
+ (text, mention) => `${text.slice(0, mention.start)}/${text.slice(mention.start + 1)}`,
20505
+ leading
20506
+ ).trimEnd();
20507
+ return {
20508
+ leadingText: leadingWithInlineSlashes.length > 0 ? leadingWithInlineSlashes : void 0,
20509
+ commandText: `/${last.name}${trailing}`.trimEnd(),
20510
+ skillName: last.name
20511
+ };
20512
+ }
20513
+ function dispatchableSkillNames(discovered, sessionSkills) {
20514
+ const hostExpanded = new Set(sessionSkills?.names ?? []);
20515
+ return new Set(
20516
+ discovered.filter((skill) => skill.enabled && skill.userInvocable !== false).map((skill) => skill.name).filter((name) => !hostExpanded.has(name))
20517
+ );
20518
+ }
20519
+
20490
20520
  // src/claudeWorkspaceInventory.ts
20491
20521
  import * as NodeFSP2 from "node:fs/promises";
20492
20522
  import * as NodePath6 from "node:path";
@@ -24152,30 +24182,6 @@ var createClaudeUsage = (input) => {
24152
24182
  };
24153
24183
  };
24154
24184
 
24155
- // src/claudeSkillDispatch.ts
24156
- var SKILL_MENTION_PATTERN = /(^|\s)\$([a-zA-Z][a-zA-Z0-9:_-]*)(?=\s|$)/g;
24157
- function planClaudeSkillDispatch(prompt, skillNames) {
24158
- const mentions = [...prompt.matchAll(SKILL_MENTION_PATTERN)].flatMap((match) => {
24159
- const name = match[2] ?? "";
24160
- if (!skillNames.has(name)) return [];
24161
- const start = (match.index ?? 0) + (match[1]?.length ?? 0);
24162
- return [{ name, start, end: start + name.length + 1 }];
24163
- });
24164
- const last = mentions.at(-1);
24165
- if (last === void 0) return void 0;
24166
- const leading = prompt.slice(0, last.start);
24167
- const trailing = prompt.slice(last.end);
24168
- const leadingWithInlineSlashes = mentions.slice(0, -1).reduceRight(
24169
- (text, mention) => `${text.slice(0, mention.start)}/${text.slice(mention.start + 1)}`,
24170
- leading
24171
- ).trimEnd();
24172
- return {
24173
- leadingText: leadingWithInlineSlashes.length > 0 ? leadingWithInlineSlashes : void 0,
24174
- commandText: `/${last.name}${trailing}`.trimEnd(),
24175
- skillName: last.name
24176
- };
24177
- }
24178
-
24179
24185
  // src/imageMime.ts
24180
24186
  var IMAGE_EXTENSION_BY_MIME_TYPE = {
24181
24187
  "image/avif": ".avif",
@@ -26256,7 +26262,7 @@ function createClaudeAdapter(recipe, host, options) {
26256
26262
  context.spawnEnvironment,
26257
26263
  desired.spawnEnvironment
26258
26264
  );
26259
- const reusable = !context.stopped && context.session.status !== "closed" && context.session.cwd === input.cwd && context.session.runtimeMode === input.runtimeMode && context.basePermissionMode === desired.permissionMode && context.launchEffort === desired.effectiveEffort && context.skillsPluginDir === input.skills?.pluginDir && (resumeTarget === void 0 || resumeTarget === context.resumeSessionId) && changedEnvironmentKeys.length === 0;
26265
+ const reusable = !context.stopped && context.session.status !== "closed" && context.session.cwd === input.cwd && context.session.runtimeMode === input.runtimeMode && context.basePermissionMode === desired.permissionMode && context.launchEffort === desired.effectiveEffort && context.sessionSkills?.pluginDir === input.skills?.pluginDir && (resumeTarget === void 0 || resumeTarget === context.resumeSessionId) && changedEnvironmentKeys.length === 0;
26260
26266
  if (!reusable) {
26261
26267
  if (changedEnvironmentKeys.length > 0) {
26262
26268
  (options?.log ?? host.log).info("claude.session.environment-changed", {
@@ -26785,7 +26791,7 @@ function createClaudeAdapter(recipe, host, options) {
26785
26791
  lastKnownContextWindow: void 0,
26786
26792
  currentEffort: effectiveEffort ?? void 0,
26787
26793
  launchEffort: effectiveEffort ?? void 0,
26788
- skillsPluginDir: input.skills?.pluginDir,
26794
+ sessionSkills: input.skills,
26789
26795
  spawnEnvironment,
26790
26796
  currentSettings: settings,
26791
26797
  interruptSettled: void 0,
@@ -26982,9 +26988,7 @@ function createClaudeAdapter(recipe, host, options) {
26982
26988
  text: buildPromptText(turnCapsForPrompt, input, boundInstanceId),
26983
26989
  attachments: input.attachments,
26984
26990
  attachmentsApi: options?.attachments,
26985
- skillNames: new Set(
26986
- skills.filter((skill) => skill.enabled && skill.userInvocable !== false).map((skill) => skill.name)
26987
- )
26991
+ skillNames: dispatchableSkillNames(skills, context.sessionSkills)
26988
26992
  });
26989
26993
  validateSteeringTarget();
26990
26994
  context.promptQueue.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-claude",
3
- "version": "0.2.2854",
3
+ "version": "0.2.2856",
4
4
  "description": "Claude executor: Claude Code CLI via @anthropic-ai/claude-agent-sdk.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -24,9 +24,9 @@
24
24
  "@types/node": "24.12.4",
25
25
  "esbuild": "0.28.1",
26
26
  "vite-plus": "0.2.2",
27
- "@ycodium-ai/plugin-api": "0.2.2854",
28
- "ycodium-jsonl-stream": "0.0.0",
29
- "ycodium-executor-testing": "0.0.0"
27
+ "@ycodium-ai/plugin-api": "0.2.2856",
28
+ "ycodium-executor-testing": "0.0.0",
29
+ "ycodium-jsonl-stream": "0.0.0"
30
30
  },
31
31
  "ycodium": {
32
32
  "plugin": "./dist/index.js",