@ai-sdk/harness-opencode 1.0.176 → 1.0.177

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.
@@ -172,13 +172,31 @@ export function createOpenCodeRequestTransformations({
172
172
  environmentVariableName: 'OPENCODE_API_KEY',
173
173
  matchUrl: 'https://opencode.ai/zen/go/v1',
174
174
  });
175
- case 'gitlab':
176
- return createBearerTransformation({
177
- environment,
178
- sandboxEnvironment,
179
- environmentVariableName: 'GITLAB_TOKEN',
180
- matchUrl: environment.GITLAB_INSTANCE_URL ?? 'https://gitlab.com',
181
- });
175
+ case 'gitlab': {
176
+ const credential = environment.GITLAB_TOKEN;
177
+ const sandboxCredential = sandboxEnvironment.GITLAB_TOKEN;
178
+ if (credential == null || sandboxCredential == null) return [];
179
+
180
+ const requestUrl = new URL(
181
+ `${environment.GITLAB_INSTANCE_URL ?? 'https://gitlab.com'}/api/v4/ai/third_party_agents/direct_access`,
182
+ );
183
+ return [
184
+ {
185
+ match: {
186
+ host: requestUrl.hostname,
187
+ path: { exact: requestUrl.pathname },
188
+ method: ['POST'],
189
+ headers: [
190
+ {
191
+ key: { exact: 'Authorization' },
192
+ value: { exact: `Bearer ${sandboxCredential}` },
193
+ },
194
+ ],
195
+ },
196
+ transform: { headers: { Authorization: `Bearer ${credential}` } },
197
+ },
198
+ ];
199
+ }
182
200
  }
183
201
  }
184
202
 
@@ -33,6 +33,7 @@ export const startMessageSchema = harnessV1BridgeStartBaseSchema
33
33
  .omit({ builtinToolFiltering: true })
34
34
  .extend({
35
35
  prompt: harnessPromptContentSchema,
36
+ readableSkillRoots: z.array(z.string()).optional(),
36
37
  operation: z.enum(['prompt', 'compact']).optional(),
37
38
  provider: z.string().optional(),
38
39
  variant: z.string().optional(),
@@ -1026,6 +1026,9 @@ function createSession({
1026
1026
  ? { instructions: promptOpts.instructions }
1027
1027
  : {}),
1028
1028
  skillsChanged: skillWriteResult.changed,
1029
+ readableSkillRoots: promptOpts.skills.map(
1030
+ skill => `${sandboxHomeDir}/.agents/skills/${skill.name}`,
1031
+ ),
1029
1032
  ...startBase(turnModel),
1030
1033
  });
1031
1034
  pendingResumeSessionId = undefined;
@@ -1055,6 +1058,9 @@ function createSession({
1055
1058
  ? { instructions: continueOpts.instructions }
1056
1059
  : {}),
1057
1060
  skillsChanged: skillWriteResult.changed,
1061
+ readableSkillRoots: continueOpts.skills.map(
1062
+ skill => `${sandboxHomeDir}/.agents/skills/${skill.name}`,
1063
+ ),
1058
1064
  ...startBase(turnModel),
1059
1065
  });
1060
1066
  pendingResumeSessionId = undefined;