@agentstep/gateway 0.5.19 → 0.5.20

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/gateway.js +36 -15
  2. package/package.json +1 -1
package/dist/gateway.js CHANGED
@@ -223292,7 +223292,7 @@ var init_models = __esm({
223292
223292
  }
223293
223293
  });
223294
223294
 
223295
- // ../agent-sdk/dist/chunk-37JORFNW.js
223295
+ // ../agent-sdk/dist/chunk-EH73DPPL.js
223296
223296
  function getAgentTenantId2(id) {
223297
223297
  const row = getDb().prepare(`SELECT tenant_id FROM agents WHERE id = ?`).get(id);
223298
223298
  return row?.tenant_id;
@@ -223317,17 +223317,38 @@ async function resolveSkillInputs(skills2, nowIso) {
223317
223317
  if ("skill_id" in s && s.skill_id) {
223318
223318
  const { getSkill: dbGetSkill, getSkillVersion: dbGetSkillVersion } = await Promise.resolve().then(() => (init_skills(), skills_exports));
223319
223319
  const dbSkill = dbGetSkill(s.skill_id);
223320
- if (!dbSkill) throw badRequest(`skill ${s.skill_id} not found`);
223321
- const version3 = s.version ?? dbSkill.current_version;
223322
- const sv = dbGetSkillVersion(s.skill_id, version3);
223323
- if (!sv) throw badRequest(`skill version ${version3} not found for skill ${s.skill_id}`);
223324
- resolved.push({
223325
- name: dbSkill.name,
223326
- source: `skill:${s.skill_id}@${version3}`,
223327
- content: sv.content,
223328
- ...sv.files && Object.keys(sv.files).length > 0 ? { files: sv.files } : {},
223329
- installed_at: nowIso
223330
- });
223320
+ if (dbSkill) {
223321
+ const version3 = s.version ?? dbSkill.current_version;
223322
+ const sv = dbGetSkillVersion(s.skill_id, version3);
223323
+ if (!sv) throw badRequest(`skill version ${version3} not found for skill ${s.skill_id}`);
223324
+ resolved.push({
223325
+ name: dbSkill.name,
223326
+ source: `skill:${s.skill_id}@${version3}`,
223327
+ content: sv.content,
223328
+ ...sv.files && Object.keys(sv.files).length > 0 ? { files: sv.files } : {},
223329
+ installed_at: nowIso
223330
+ });
223331
+ } else if (s.type === "anthropic" || !s.type) {
223332
+ const skillName = s.skill_id;
223333
+ try {
223334
+ const skillMdUrl = `https://raw.githubusercontent.com/anthropics/skills/main/skills/${skillName}/SKILL.md`;
223335
+ const resp = await fetch(skillMdUrl, { signal: AbortSignal.timeout(1e4) });
223336
+ if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
223337
+ const content = await resp.text();
223338
+ resolved.push({
223339
+ name: skillName,
223340
+ source: `anthropic:${skillName}`,
223341
+ content,
223342
+ installed_at: nowIso
223343
+ });
223344
+ } catch (err) {
223345
+ throw badRequest(
223346
+ `skill "${skillName}" not found in local DB or Anthropic skills repo. Upload it via POST /v1/skills or check the skill_id. Available Anthropic skills: docx, pdf, pptx, xlsx`
223347
+ );
223348
+ }
223349
+ } else {
223350
+ throw badRequest(`skill "${s.skill_id}" not found`);
223351
+ }
223331
223352
  } else {
223332
223353
  const inline = s;
223333
223354
  resolved.push({
@@ -223547,8 +223568,8 @@ function handleListAgentVersions(request2, id) {
223547
223568
  });
223548
223569
  }
223549
223570
  var InlineSkillSchema, RefSkillSchema, SkillSchema, ToolSchema, ModelConfigSchema2, CreateSchema3, UpdateSchema3;
223550
- var init_chunk_37JORFNW = __esm({
223551
- "../agent-sdk/dist/chunk-37JORFNW.js"() {
223571
+ var init_chunk_EH73DPPL = __esm({
223572
+ "../agent-sdk/dist/chunk-EH73DPPL.js"() {
223552
223573
  "use strict";
223553
223574
  init_chunk_23UKWXJH();
223554
223575
  init_chunk_HZY43FS6();
@@ -224617,7 +224638,7 @@ var init_handlers3 = __esm({
224617
224638
  init_chunk_PZRRE4CA();
224618
224639
  init_chunk_NWIMPG4M();
224619
224640
  init_chunk_STPT3SWU();
224620
- init_chunk_37JORFNW();
224641
+ init_chunk_EH73DPPL();
224621
224642
  init_chunk_XWWKOIA5();
224622
224643
  init_chunk_BSRT6GK5();
224623
224644
  init_chunk_HQMQHYZB();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentstep/gateway",
3
- "version": "0.5.19",
3
+ "version": "0.5.20",
4
4
  "description": "Self-hosted, open-source, Anthropic Managed Agents-compatible. CLI + web UI for running AI agents in sandboxed environments.",
5
5
  "keywords": [
6
6
  "anthropic",