gitlab-ai-provider 6.16.0 → 6.17.1
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/CHANGELOG.md +10 -0
- package/dist/index.d.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +17 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
- package/dist/gitlab-ai-provider-6.16.0.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## <small>6.17.1 (2026-09-23)</small>
|
|
6
|
+
|
|
7
|
+
- Merge branch 'fix/release-version-injection' into 'main' ([236d448](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/236d448))
|
|
8
|
+
- fix(release): build with the release version and drop the tarball from the package ([33e9405](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/33e9405))
|
|
9
|
+
|
|
10
|
+
## 6.17.0 (2026-09-23)
|
|
11
|
+
|
|
12
|
+
- Merge branch 'feat/discovery-cache-key' into 'main' ([e407898](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/e407898))
|
|
13
|
+
- feat(discovery): scope workflow discovery cache by optional cacheKey ([e9aac8c](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/e9aac8c))
|
|
14
|
+
|
|
5
15
|
## 6.16.0 (2026-09-22)
|
|
6
16
|
|
|
7
17
|
- Merge branch 'feature-add-opus-5-5' into 'main' ([c1a5f12](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/c1a5f12))
|
package/dist/index.d.mts
CHANGED
|
@@ -334,7 +334,13 @@ interface ModelCacheEntry {
|
|
|
334
334
|
declare class GitLabModelCache {
|
|
335
335
|
private readonly filePath;
|
|
336
336
|
private readonly key;
|
|
337
|
-
|
|
337
|
+
/**
|
|
338
|
+
* @param workDir - Workspace directory the cache entry belongs to
|
|
339
|
+
* @param instanceUrl - GitLab instance URL
|
|
340
|
+
* @param scope - Optional extra key component (e.g. an account identifier) that keeps
|
|
341
|
+
* entries for different accounts on the same workspace and instance apart
|
|
342
|
+
*/
|
|
343
|
+
constructor(workDir: string, instanceUrl?: string, scope?: string);
|
|
338
344
|
private readAll;
|
|
339
345
|
private writeAll;
|
|
340
346
|
/**
|
|
@@ -1871,6 +1877,12 @@ interface WorkflowDiscoveryConfig {
|
|
|
1871
1877
|
}
|
|
1872
1878
|
interface WorkflowDiscoveryOptions {
|
|
1873
1879
|
workingDirectory: string;
|
|
1880
|
+
/**
|
|
1881
|
+
* Optional opaque identifier of the account the discovery runs for. When set, cached
|
|
1882
|
+
* results are scoped to it so switching accounts on the same workspace and instance
|
|
1883
|
+
* never returns another account's models. The value is hashed before being stored.
|
|
1884
|
+
*/
|
|
1885
|
+
cacheKey?: string;
|
|
1874
1886
|
}
|
|
1875
1887
|
interface WorkflowDiscoveryResult {
|
|
1876
1888
|
models: DiscoveredWorkflowModel[];
|
package/dist/index.d.ts
CHANGED
|
@@ -334,7 +334,13 @@ interface ModelCacheEntry {
|
|
|
334
334
|
declare class GitLabModelCache {
|
|
335
335
|
private readonly filePath;
|
|
336
336
|
private readonly key;
|
|
337
|
-
|
|
337
|
+
/**
|
|
338
|
+
* @param workDir - Workspace directory the cache entry belongs to
|
|
339
|
+
* @param instanceUrl - GitLab instance URL
|
|
340
|
+
* @param scope - Optional extra key component (e.g. an account identifier) that keeps
|
|
341
|
+
* entries for different accounts on the same workspace and instance apart
|
|
342
|
+
*/
|
|
343
|
+
constructor(workDir: string, instanceUrl?: string, scope?: string);
|
|
338
344
|
private readAll;
|
|
339
345
|
private writeAll;
|
|
340
346
|
/**
|
|
@@ -1871,6 +1877,12 @@ interface WorkflowDiscoveryConfig {
|
|
|
1871
1877
|
}
|
|
1872
1878
|
interface WorkflowDiscoveryOptions {
|
|
1873
1879
|
workingDirectory: string;
|
|
1880
|
+
/**
|
|
1881
|
+
* Optional opaque identifier of the account the discovery runs for. When set, cached
|
|
1882
|
+
* results are scoped to it so switching accounts on the same workspace and instance
|
|
1883
|
+
* never returns another account's models. The value is hashed before being stored.
|
|
1884
|
+
*/
|
|
1885
|
+
cacheKey?: string;
|
|
1874
1886
|
}
|
|
1875
1887
|
interface WorkflowDiscoveryResult {
|
|
1876
1888
|
models: DiscoveredWorkflowModel[];
|
package/dist/index.js
CHANGED
|
@@ -2773,7 +2773,7 @@ var import_node_async_hooks = require("async_hooks");
|
|
|
2773
2773
|
var import_isomorphic_ws = __toESM(require("isomorphic-ws"));
|
|
2774
2774
|
|
|
2775
2775
|
// src/version.ts
|
|
2776
|
-
var VERSION = true ? "6.
|
|
2776
|
+
var VERSION = true ? "6.17.1" : "0.0.0-dev";
|
|
2777
2777
|
|
|
2778
2778
|
// src/gitlab-workflow-client.ts
|
|
2779
2779
|
var WS_CONNECT_TIMEOUT_MS = 3e4;
|
|
@@ -3656,16 +3656,23 @@ function getCacheFilePath() {
|
|
|
3656
3656
|
const cacheHome = process.env.XDG_CACHE_HOME || path3.join(os.homedir(), ".cache");
|
|
3657
3657
|
return path3.join(cacheHome, "opencode", "gitlab-workflow-model-cache.json");
|
|
3658
3658
|
}
|
|
3659
|
-
function computeCacheKey(workDir, instanceUrl) {
|
|
3659
|
+
function computeCacheKey(workDir, instanceUrl, scope) {
|
|
3660
3660
|
const normalizedUrl = (instanceUrl || "https://gitlab.com").replace(/\/$/, "");
|
|
3661
|
-
|
|
3661
|
+
const input = scope ? `${workDir}\0${normalizedUrl}\0${scope}` : `${workDir}\0${normalizedUrl}`;
|
|
3662
|
+
return crypto.createHash("sha256").update(input).digest("hex").slice(0, 12);
|
|
3662
3663
|
}
|
|
3663
3664
|
var GitLabModelCache = class {
|
|
3664
3665
|
filePath;
|
|
3665
3666
|
key;
|
|
3666
|
-
|
|
3667
|
+
/**
|
|
3668
|
+
* @param workDir - Workspace directory the cache entry belongs to
|
|
3669
|
+
* @param instanceUrl - GitLab instance URL
|
|
3670
|
+
* @param scope - Optional extra key component (e.g. an account identifier) that keeps
|
|
3671
|
+
* entries for different accounts on the same workspace and instance apart
|
|
3672
|
+
*/
|
|
3673
|
+
constructor(workDir, instanceUrl, scope) {
|
|
3667
3674
|
this.filePath = getCacheFilePath();
|
|
3668
|
-
this.key = computeCacheKey(workDir, instanceUrl);
|
|
3675
|
+
this.key = computeCacheKey(workDir, instanceUrl, scope);
|
|
3669
3676
|
}
|
|
3670
3677
|
readAll() {
|
|
3671
3678
|
try {
|
|
@@ -5933,7 +5940,11 @@ async function buildModels(discovered, project) {
|
|
|
5933
5940
|
return { models, project };
|
|
5934
5941
|
}
|
|
5935
5942
|
async function discoverWorkflowModels(config, options) {
|
|
5936
|
-
const cache = new GitLabModelCache(
|
|
5943
|
+
const cache = new GitLabModelCache(
|
|
5944
|
+
options.workingDirectory,
|
|
5945
|
+
config.instanceUrl,
|
|
5946
|
+
options.cacheKey
|
|
5947
|
+
);
|
|
5937
5948
|
if (!cache.isDiscoveryExpired()) {
|
|
5938
5949
|
const entry = cache.load();
|
|
5939
5950
|
if (entry?.discovery) {
|