@asm-agent/coding-agent 0.8.6 → 0.8.7

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 (40) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/bundle/{anthropic-CILMWJ23.js → anthropic-XSMQHGYB.js} +1 -1
  3. package/dist/bundle/{azure-openai-responses-TPNZ54LG.js → azure-openai-responses-XLQAIKKH.js} +2 -2
  4. package/dist/bundle/{bundled-modules-SKYRKITN.js → bundled-modules-5OCN73BM.js} +4 -4
  5. package/dist/bundle/{chunk-EFDSSG52.js → chunk-2LPSALBF.js} +319 -292
  6. package/dist/bundle/{chunk-J6ATXG62.js → chunk-CMMSLBAW.js} +12 -8
  7. package/dist/bundle/{chunk-YYVQTKC6.js → chunk-E3YE2Q7A.js} +66 -3
  8. package/dist/bundle/{chunk-7QIBGY2R.js → chunk-IAQLPSMN.js} +576 -189
  9. package/dist/bundle/{chunk-IYXHHLR6.js → chunk-YPNK4MRU.js} +1 -1
  10. package/dist/bundle/{cli-main-O3HK7MNQ.js → cli-main-QYX5R3LF.js} +4 -4
  11. package/dist/bundle/cli.js +1 -1
  12. package/dist/bundle/{compile-UQNZ2TRI.js → compile-BYYUFOG3.js} +1 -1
  13. package/dist/bundle/{google-3TL5FKLN.js → google-ZXJEPWJA.js} +1 -1
  14. package/dist/bundle/{google-vertex-WVFMK6QO.js → google-vertex-WAF3RIJ6.js} +1 -1
  15. package/dist/bundle/{main-4QYKME2K.js → main-EOUAQCJH.js} +4 -4
  16. package/dist/bundle/{mistral-QV2OSBWW.js → mistral-GDZXSXRS.js} +1 -1
  17. package/dist/bundle/{openai-codex-responses-J2GJ2FAO.js → openai-codex-responses-7XMPW4LG.js} +2 -2
  18. package/dist/bundle/{openai-completions-W622H2EL.js → openai-completions-LNSVGDMF.js} +4 -1
  19. package/dist/bundle/{openai-responses-V75QG5T7.js → openai-responses-MFZOBMIT.js} +2 -2
  20. package/dist/core/model-registry.d.ts.map +1 -1
  21. package/dist/core/model-registry.js +8 -0
  22. package/dist/core/model-registry.js.map +1 -1
  23. package/dist/core/ollama-models.d.ts +4 -0
  24. package/dist/core/ollama-models.d.ts.map +1 -0
  25. package/dist/core/ollama-models.js +56 -0
  26. package/dist/core/ollama-models.js.map +1 -0
  27. package/dist/core/provider-display-names.d.ts.map +1 -1
  28. package/dist/core/provider-display-names.js +1 -0
  29. package/dist/core/provider-display-names.js.map +1 -1
  30. package/dist/skills/request-report/SKILL.md +19 -0
  31. package/docs/models.md +2 -0
  32. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  33. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  34. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  35. package/examples/extensions/sandbox/package-lock.json +2 -2
  36. package/examples/extensions/sandbox/package.json +1 -1
  37. package/examples/extensions/with-deps/package-lock.json +2 -2
  38. package/examples/extensions/with-deps/package.json +1 -1
  39. package/package.json +5 -5
  40. package/skills/request-report/SKILL.md +19 -0
@@ -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-2LPSALBF.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-IAQLPSMN.js";
394
394
  import {
395
395
  __commonJS,
396
396
  __export,
@@ -24787,6 +24787,61 @@ 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
+ var DEFAULT_OLLAMA_HOST = "http://127.0.0.1:11434";
24792
+ var OLLAMA_DISCOVERY_TIMEOUT_MS = 1500;
24793
+ function getOllamaBaseUrl() {
24794
+ const configured = process.env.OLLAMA_HOST?.trim() || DEFAULT_OLLAMA_HOST;
24795
+ const host = configured.replace(/\/$/, "");
24796
+ return host.endsWith("/v1") ? host : `${host}/v1`;
24797
+ }
24798
+ function getOllamaTagsUrl(baseUrl) {
24799
+ return `${baseUrl.replace(/\/v1$/, "")}/api/tags`;
24800
+ }
24801
+ function modelFromTag(tag, baseUrl) {
24802
+ if (typeof tag.name !== "string" || !tag.name.trim())
24803
+ return void 0;
24804
+ const name = tag.name.trim();
24805
+ return {
24806
+ id: name,
24807
+ name,
24808
+ api: "openai-completions",
24809
+ provider: "ollama",
24810
+ baseUrl,
24811
+ reasoning: false,
24812
+ input: ["text"],
24813
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
24814
+ contextWindow: 131072,
24815
+ maxTokens: 8192,
24816
+ compat: {
24817
+ supportsStore: false,
24818
+ supportsDeveloperRole: false,
24819
+ supportsReasoningEffort: false,
24820
+ maxTokensField: "max_tokens",
24821
+ supportsUsageInStreaming: false,
24822
+ supportsStrictMode: false
24823
+ }
24824
+ };
24825
+ }
24826
+ async function discoverOllamaModels() {
24827
+ const baseUrl = getOllamaBaseUrl();
24828
+ const controller = new AbortController();
24829
+ const timeout = setTimeout(() => controller.abort(), OLLAMA_DISCOVERY_TIMEOUT_MS);
24830
+ try {
24831
+ const response = await fetch(getOllamaTagsUrl(baseUrl), { signal: controller.signal });
24832
+ if (!response.ok)
24833
+ return [];
24834
+ const payload = await response.json();
24835
+ if (!Array.isArray(payload.models))
24836
+ return [];
24837
+ return payload.models.flatMap((tag) => tag && typeof tag === "object" ? [modelFromTag(tag, baseUrl)].filter(Boolean) : []);
24838
+ } catch {
24839
+ return [];
24840
+ } finally {
24841
+ clearTimeout(timeout);
24842
+ }
24843
+ }
24844
+
24790
24845
  // dist/core/prime-inference-models.js
24791
24846
  var PRIME_INFERENCE_BASE_URL = "https://api.pinference.ai/api/v1";
24792
24847
  var PRIVATE_MODEL_REFRESH_TIMEOUT_MS = 1e4;
@@ -24873,6 +24928,7 @@ var BUILT_IN_PROVIDER_DISPLAY_NAMES = {
24873
24928
  opencode: "OpenCode Zen",
24874
24929
  "opencode-go": "OpenCode Go",
24875
24930
  openai: "OpenAI",
24931
+ ollama: "Ollama",
24876
24932
  openrouter: "OpenRouter",
24877
24933
  "asm-agent-traces": "ASM Agent Traces",
24878
24934
  "prime-inference": "Prime Inference",
@@ -25022,7 +25078,7 @@ var ModelsConfigSchema = typebox_exports.Object({
25022
25078
  var validateModelsConfig;
25023
25079
  var modelsValidatorPromise;
25024
25080
  function preloadModelsConfigValidator() {
25025
- modelsValidatorPromise ??= import("./compile-UQNZ2TRI.js").then(({ Compile }) => {
25081
+ modelsValidatorPromise ??= import("./compile-BYYUFOG3.js").then(({ Compile }) => {
25026
25082
  validateModelsConfig = Compile(ModelsConfigSchema);
25027
25083
  });
25028
25084
  return modelsValidatorPromise;
@@ -25413,6 +25469,11 @@ File: ${modelsJsonPath}`);
25413
25469
  const previousTeamId = this.authorizedPrivatePrimeInferenceTeamId;
25414
25470
  this.refresh();
25415
25471
  await this.refreshPrivatePrimeInferenceAuthorization(previousPrivateModelIds, previousTeamId);
25472
+ const ollamaModels = await discoverOllamaModels();
25473
+ if (ollamaModels.length > 0) {
25474
+ const knownOllamaIds = new Set(this.models.filter((model) => model.provider === "ollama").map((model) => model.id));
25475
+ this.models = [...this.models, ...ollamaModels.filter((model) => !knownOllamaIds.has(model.id))];
25476
+ }
25416
25477
  return this.getAvailable();
25417
25478
  }
25418
25479
  async refreshPrivatePrimeInferenceAuthorization(previousPrivateModelIds = new Set(this.authorizedPrivatePrimeInferenceModelIds), previousTeamId = this.authorizedPrivatePrimeInferenceTeamId) {
@@ -25605,6 +25666,8 @@ File: ${modelsJsonPath}`);
25605
25666
  * Get API key for a model.
25606
25667
  */
25607
25668
  hasConfiguredAuth(model) {
25669
+ if (model.provider === "ollama")
25670
+ return true;
25608
25671
  return this.authStorage.hasAuth(model.provider) || this.hasConfiguredProviderRequestAuth(model.provider);
25609
25672
  }
25610
25673
  fingerprintProviderRequestAuthSource(source, material) {