@asm-agent/coding-agent 0.8.6 → 0.8.8

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 (55) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/asm-agent-runtime/src/rlm/__pycache__/__init__.cpython-313.pyc +0 -0
  3. package/dist/asm-agent-runtime/src/rlm/__pycache__/_winjob.cpython-313.pyc +0 -0
  4. package/dist/asm-agent-runtime/src/rlm/__pycache__/bash.cpython-313.pyc +0 -0
  5. package/dist/asm-agent-runtime/src/rlm/__pycache__/harness.cpython-313.pyc +0 -0
  6. package/dist/asm-agent-runtime/src/rlm/__pycache__/mcp.cpython-313.pyc +0 -0
  7. package/dist/asm-agent-runtime/src/rlm/__pycache__/mcp_base.cpython-313.pyc +0 -0
  8. package/dist/asm-agent-runtime/src/rlm/__pycache__/repl.cpython-313.pyc +0 -0
  9. package/dist/asm-agent-runtime/test/__pycache__/test_agent_message_skill.cpython-313.pyc +0 -0
  10. package/dist/asm-agent-runtime/test/__pycache__/test_bash.cpython-313.pyc +0 -0
  11. package/dist/asm-agent-runtime/test/__pycache__/test_harness.cpython-313.pyc +0 -0
  12. package/dist/asm-agent-runtime/test/__pycache__/test_mcp.cpython-313.pyc +0 -0
  13. package/dist/asm-agent-runtime/test/__pycache__/test_mcp_base.cpython-313.pyc +0 -0
  14. package/dist/asm-agent-runtime/test/__pycache__/test_repl.cpython-313.pyc +0 -0
  15. package/dist/asm-agent-runtime/test/__pycache__/test_subagent_registry.cpython-313.pyc +0 -0
  16. package/dist/asm-agent-runtime/test/__pycache__/test_winjob.cpython-313.pyc +0 -0
  17. package/dist/bundle/{anthropic-CILMWJ23.js → anthropic-OFECORE7.js} +1 -1
  18. package/dist/bundle/{azure-openai-responses-TPNZ54LG.js → azure-openai-responses-AOVTLR6N.js} +2 -2
  19. package/dist/bundle/{bundled-modules-SKYRKITN.js → bundled-modules-JQCJDEIY.js} +4 -4
  20. package/dist/bundle/{chunk-EFDSSG52.js → chunk-7TB7CGPV.js} +319 -292
  21. package/dist/bundle/{chunk-IYXHHLR6.js → chunk-A65OM3TZ.js} +1 -1
  22. package/dist/bundle/{chunk-J6ATXG62.js → chunk-CMMSLBAW.js} +12 -8
  23. package/dist/bundle/{chunk-YYVQTKC6.js → chunk-JC2TT4MZ.js} +88 -4
  24. package/dist/bundle/{chunk-7QIBGY2R.js → chunk-M67RGWDQ.js} +597 -191
  25. package/dist/bundle/{cli-main-O3HK7MNQ.js → cli-main-FNHDQGQD.js} +4 -4
  26. package/dist/bundle/cli.js +1 -1
  27. package/dist/bundle/{compile-UQNZ2TRI.js → compile-BYYUFOG3.js} +1 -1
  28. package/dist/bundle/{google-3TL5FKLN.js → google-RVJL6RIQ.js} +1 -1
  29. package/dist/bundle/{google-vertex-WVFMK6QO.js → google-vertex-EZTRRRH6.js} +1 -1
  30. package/dist/bundle/{main-4QYKME2K.js → main-IYXIIAJN.js} +4 -4
  31. package/dist/bundle/{mistral-QV2OSBWW.js → mistral-FSGKSMA7.js} +1 -1
  32. package/dist/bundle/{openai-codex-responses-J2GJ2FAO.js → openai-codex-responses-VM5Y564D.js} +2 -2
  33. package/dist/bundle/{openai-completions-W622H2EL.js → openai-completions-X46FOQDN.js} +5 -2
  34. package/dist/bundle/{openai-responses-V75QG5T7.js → openai-responses-SOQNEPBE.js} +2 -2
  35. package/dist/core/model-registry.d.ts.map +1 -1
  36. package/dist/core/model-registry.js +9 -1
  37. package/dist/core/model-registry.js.map +1 -1
  38. package/dist/core/ollama-models.d.ts +6 -0
  39. package/dist/core/ollama-models.d.ts.map +1 -0
  40. package/dist/core/ollama-models.js +77 -0
  41. package/dist/core/ollama-models.js.map +1 -0
  42. package/dist/core/provider-display-names.d.ts.map +1 -1
  43. package/dist/core/provider-display-names.js +1 -0
  44. package/dist/core/provider-display-names.js.map +1 -1
  45. package/dist/skills/request-report/SKILL.md +19 -0
  46. package/docs/models.md +2 -0
  47. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  48. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  49. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  50. package/examples/extensions/sandbox/package-lock.json +2 -2
  51. package/examples/extensions/sandbox/package.json +1 -1
  52. package/examples/extensions/with-deps/package-lock.json +2 -2
  53. package/examples/extensions/with-deps/package.json +1 -1
  54. package/package.json +5 -5
  55. package/skills/request-report/SKILL.md +19 -0
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-GG7GAQ5N.js";
16
16
  import {
17
17
  calculateCost
18
- } from "./chunk-7QIBGY2R.js";
18
+ } from "./chunk-M67RGWDQ.js";
19
19
 
20
20
  // ../ai/src/providers/openai-responses-shared.ts
21
21
  function encodeTextSignatureV1(id, phase) {
@@ -1536,7 +1536,7 @@ function IsDuration(value) {
1536
1536
  }
1537
1537
 
1538
1538
  // ../../node_modules/typebox/build/format/email.mjs
1539
- var Email = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\.)*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;
1539
+ var Email = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\[\x20-\x7e])*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;
1540
1540
  function IsEmail(value) {
1541
1541
  return Email.test(value);
1542
1542
  }
@@ -1861,7 +1861,7 @@ function IsLabel2(value) {
1861
1861
  return IsValidLabelLength2(value) && (IsPunyLabel(value) || IsUnicodeLabel(value));
1862
1862
  }
1863
1863
  function NormalizeHostname(value) {
1864
- return value.normalize("NFC").replace(/[\u002E\u3002\uFF0E\uFF61]/g, ".");
1864
+ return value.replace(/[\uff01-\uff5e]/g, (char) => String.fromCharCode(char.charCodeAt(0) - 65248)).normalize("NFC").replace(/[\u00ad\u034f\u180b-\u180d\u200b\ufe00-\ufe0f\u{e0100}-\u{e01ef}]/gu, "").replace(/[\u002E\u3002\uFF0E\uFF61]/g, ".");
1865
1865
  }
1866
1866
  function IsIdnHostname(value) {
1867
1867
  if (value.length === 0 || value.includes(" "))
@@ -3863,10 +3863,15 @@ var Metrics = {
3863
3863
  update: 0
3864
3864
  };
3865
3865
 
3866
+ // ../../node_modules/typebox/build/system/memory/freeze.mjs
3867
+ function Freeze(value) {
3868
+ return settings_exports.Get().immutableTypes ? Object.freeze(value) : value;
3869
+ }
3870
+
3866
3871
  // ../../node_modules/typebox/build/system/memory/assign.mjs
3867
3872
  function Assign(left, right) {
3868
3873
  Metrics.assign += 1;
3869
- return { ...left, ...right };
3874
+ return Freeze({ ...left, ...right });
3870
3875
  }
3871
3876
 
3872
3877
  // ../../node_modules/typebox/build/system/memory/clone.mjs
@@ -3946,10 +3951,9 @@ function Merge(left, right) {
3946
3951
  }
3947
3952
  function Create(hidden, enumerable, options = {}) {
3948
3953
  Metrics.create += 1;
3949
- const settings2 = settings_exports.Get();
3950
3954
  const withOptions = Merge(enumerable, options);
3951
- const withHidden = settings2.enumerableKind ? Merge(withOptions, hidden) : MergeHidden(withOptions, hidden);
3952
- return settings2.immutableTypes ? Object.freeze(withHidden) : withHidden;
3955
+ const withHidden = settings_exports.Get().enumerableKind ? Merge(withOptions, hidden) : MergeHidden(withOptions, hidden);
3956
+ return Freeze(withHidden);
3953
3957
  }
3954
3958
 
3955
3959
  // ../../node_modules/typebox/build/system/memory/discard.mjs
@@ -3963,7 +3967,7 @@ function Discard(value, propertyKeys) {
3963
3967
  descriptor.value = Clone(descriptor.value);
3964
3968
  Object.defineProperty(result, key, descriptor);
3965
3969
  }
3966
- return result;
3970
+ return Freeze(result);
3967
3971
  }
3968
3972
 
3969
3973
  // ../../node_modules/typebox/build/system/memory/update.mjs
@@ -3987,7 +3991,7 @@ function Update(current, hidden, enumerable) {
3987
3991
  value: enumerable[key]
3988
3992
  });
3989
3993
  }
3990
- return result;
3994
+ return Freeze(result);
3991
3995
  }
3992
3996
 
3993
3997
  // ../../node_modules/typebox/build/type/types/schema.mjs
@@ -353,7 +353,7 @@ import {
353
353
  waitForPromptAdmission,
354
354
  watchWithErrorHandler,
355
355
  wrapTextWithAnsi
356
- } from "./chunk-EFDSSG52.js";
356
+ } from "./chunk-7TB7CGPV.js";
357
357
  import {
358
358
  array,
359
359
  boolean,
@@ -390,7 +390,7 @@ import {
390
390
  getProviders,
391
391
  modelsAreEqual,
392
392
  supportsFastMode
393
- } from "./chunk-7QIBGY2R.js";
393
+ } from "./chunk-M67RGWDQ.js";
394
394
  import {
395
395
  __commonJS,
396
396
  __export,
@@ -24787,6 +24787,82 @@ import { createHash as createHash5 } from "node:crypto";
24787
24787
  import { existsSync as existsSync7, readFileSync as readFileSync8, renameSync as renameSync4, writeFileSync as writeFileSync6 } from "fs";
24788
24788
  import { dirname as dirname8, join as join8 } from "path";
24789
24789
 
24790
+ // dist/core/ollama-models.js
24791
+ import { get as httpGet } from "node:http";
24792
+ import { get as httpsGet } from "node:https";
24793
+ var DEFAULT_OLLAMA_HOST = "http://127.0.0.1:11434";
24794
+ var OLLAMA_DISCOVERY_TIMEOUT_MS = 1500;
24795
+ function getOllamaBaseUrl() {
24796
+ const configured = process.env.OLLAMA_HOST?.trim() || DEFAULT_OLLAMA_HOST;
24797
+ const host = configured.replace(/\/$/, "");
24798
+ return host.endsWith("/v1") ? host : `${host}/v1`;
24799
+ }
24800
+ function getOllamaTagsUrl(baseUrl) {
24801
+ return `${baseUrl.replace(/\/v1$/, "")}/api/tags`;
24802
+ }
24803
+ function requestJson(url2, timeoutMs) {
24804
+ return new Promise((resolve21, reject) => {
24805
+ const parsed = new URL(url2);
24806
+ const get = parsed.protocol === "https:" ? httpsGet : httpGet;
24807
+ const request = get(parsed, { timeout: timeoutMs }, (response) => {
24808
+ let body = "";
24809
+ response.setEncoding("utf8");
24810
+ response.on("data", (chunk) => {
24811
+ body += chunk;
24812
+ });
24813
+ response.on("end", () => {
24814
+ if (response.statusCode !== 200) {
24815
+ reject(new Error(`Ollama returned HTTP ${response.statusCode ?? "unknown"}`));
24816
+ return;
24817
+ }
24818
+ try {
24819
+ resolve21(JSON.parse(body));
24820
+ } catch (error) {
24821
+ reject(error);
24822
+ }
24823
+ });
24824
+ });
24825
+ request.on("error", reject);
24826
+ request.on("timeout", () => request.destroy(new Error("Ollama discovery timed out")));
24827
+ });
24828
+ }
24829
+ function modelFromTag(tag, baseUrl) {
24830
+ if (typeof tag.name !== "string" || !tag.name.trim())
24831
+ return void 0;
24832
+ const name = tag.name.trim();
24833
+ return {
24834
+ id: name,
24835
+ name,
24836
+ api: "openai-completions",
24837
+ provider: "ollama",
24838
+ baseUrl,
24839
+ reasoning: false,
24840
+ input: ["text"],
24841
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
24842
+ contextWindow: 131072,
24843
+ maxTokens: 8192,
24844
+ compat: {
24845
+ supportsStore: false,
24846
+ supportsDeveloperRole: false,
24847
+ supportsReasoningEffort: false,
24848
+ maxTokensField: "max_tokens",
24849
+ supportsUsageInStreaming: false,
24850
+ supportsStrictMode: false
24851
+ }
24852
+ };
24853
+ }
24854
+ async function discoverOllamaModels(request = requestJson) {
24855
+ const baseUrl = getOllamaBaseUrl();
24856
+ try {
24857
+ const payload = await request(getOllamaTagsUrl(baseUrl), OLLAMA_DISCOVERY_TIMEOUT_MS);
24858
+ if (!Array.isArray(payload.models))
24859
+ return [];
24860
+ return payload.models.flatMap((tag) => tag && typeof tag === "object" ? [modelFromTag(tag, baseUrl)].filter(Boolean) : []);
24861
+ } catch {
24862
+ return [];
24863
+ }
24864
+ }
24865
+
24790
24866
  // dist/core/prime-inference-models.js
24791
24867
  var PRIME_INFERENCE_BASE_URL = "https://api.pinference.ai/api/v1";
24792
24868
  var PRIVATE_MODEL_REFRESH_TIMEOUT_MS = 1e4;
@@ -24873,6 +24949,7 @@ var BUILT_IN_PROVIDER_DISPLAY_NAMES = {
24873
24949
  opencode: "OpenCode Zen",
24874
24950
  "opencode-go": "OpenCode Go",
24875
24951
  openai: "OpenAI",
24952
+ ollama: "Ollama",
24876
24953
  openrouter: "OpenRouter",
24877
24954
  "asm-agent-traces": "ASM Agent Traces",
24878
24955
  "prime-inference": "Prime Inference",
@@ -25022,7 +25099,7 @@ var ModelsConfigSchema = typebox_exports.Object({
25022
25099
  var validateModelsConfig;
25023
25100
  var modelsValidatorPromise;
25024
25101
  function preloadModelsConfigValidator() {
25025
- modelsValidatorPromise ??= import("./compile-UQNZ2TRI.js").then(({ Compile }) => {
25102
+ modelsValidatorPromise ??= import("./compile-BYYUFOG3.js").then(({ Compile }) => {
25026
25103
  validateModelsConfig = Compile(ModelsConfigSchema);
25027
25104
  });
25028
25105
  return modelsValidatorPromise;
@@ -25413,6 +25490,11 @@ File: ${modelsJsonPath}`);
25413
25490
  const previousTeamId = this.authorizedPrivatePrimeInferenceTeamId;
25414
25491
  this.refresh();
25415
25492
  await this.refreshPrivatePrimeInferenceAuthorization(previousPrivateModelIds, previousTeamId);
25493
+ const ollamaModels = await discoverOllamaModels();
25494
+ if (ollamaModels.length > 0) {
25495
+ const knownOllamaIds = new Set(this.models.filter((model) => model.provider === "ollama").map((model) => model.id));
25496
+ this.models = [...this.models, ...ollamaModels.filter((model) => !knownOllamaIds.has(model.id))];
25497
+ }
25416
25498
  return this.getAvailable();
25417
25499
  }
25418
25500
  async refreshPrivatePrimeInferenceAuthorization(previousPrivateModelIds = new Set(this.authorizedPrivatePrimeInferenceModelIds), previousTeamId = this.authorizedPrivatePrimeInferenceTeamId) {
@@ -25605,6 +25687,8 @@ File: ${modelsJsonPath}`);
25605
25687
  * Get API key for a model.
25606
25688
  */
25607
25689
  hasConfiguredAuth(model) {
25690
+ if (model.provider === "ollama")
25691
+ return true;
25608
25692
  return this.authStorage.hasAuth(model.provider) || this.hasConfiguredProviderRequestAuth(model.provider);
25609
25693
  }
25610
25694
  fingerprintProviderRequestAuthSource(source, material) {
@@ -25802,7 +25886,7 @@ File: ${modelsJsonPath}`);
25802
25886
  const authStorageAuth = await this.authStorage.getApiKeyWithSourceToken(model.provider, {
25803
25887
  includeFallback: false
25804
25888
  });
25805
- let apiKey = authStorageAuth.apiKey;
25889
+ let apiKey = model.provider === "ollama" ? "ollama" : authStorageAuth.apiKey;
25806
25890
  let authSourceToken = authStorageAuth.sourceToken;
25807
25891
  if (apiKey === void 0 && providerConfig?.apiKey) {
25808
25892
  const resolvedApiKey = resolveConfigValueOrThrow(providerConfig.apiKey, `API key for provider "${model.provider}"`);