@sourcegraph/amp-sdk 0.1.0-20260125200955-gb173ebb → 0.1.0-20260126043227-gb3f9306

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/README.md CHANGED
@@ -210,6 +210,24 @@ Available modes:
210
210
  - **rush**: Faster responses with streamlined tool usage
211
211
  - **large**: 1M-token long-context workhorse
212
212
 
213
+ ### Thread Labels
214
+
215
+ Add labels to threads created by `execute()`.
216
+
217
+ ```typescript
218
+ for await (const message of execute({
219
+ prompt: 'Summarize this repo',
220
+ options: {
221
+ labels: ['sdk', 'summary'],
222
+ },
223
+ })) {
224
+ if (message.type === 'result') {
225
+ console.log(message.result)
226
+ break
227
+ }
228
+ }
229
+ ```
230
+
213
231
  ### Tool Permissions
214
232
 
215
233
  Control which tools Amp can use with fine-grained permissions:
@@ -597,6 +615,7 @@ interface AmpOptions {
597
615
  toolbox?: string
598
616
  skills?: string
599
617
  permissions?: Permission[]
618
+ labels?: string[]
600
619
  }
601
620
  ```
602
621
 
@@ -617,6 +636,7 @@ interface AmpOptions {
617
636
  | `toolbox` | `string` | - | Folder path with toolbox scripts |
618
637
  | `skills` | `string` | - | Folder path with custom skills |
619
638
  | `permissions` | [`Permission[]`](#permission) | - | Permission rules for tool usage |
639
+ | `labels` | `string[]` | - | Labels to add to the thread |
620
640
 
621
641
  ## Message Types
622
642
 
package/dist/index.js CHANGED
@@ -4069,6 +4069,7 @@ var AmpOptionsSchema = exports_external.object({
4069
4069
  toolbox: exports_external.string().describe("Folder path with toolbox scripts").optional(),
4070
4070
  skills: exports_external.string().describe("Folder path with custom skills").optional(),
4071
4071
  permissions: exports_external.array(PermissionSchema).describe("Permission rules for tool usage").optional(),
4072
+ labels: exports_external.array(exports_external.string()).describe("Labels to add to the thread (repeatable CLI --label)").optional(),
4072
4073
  enabledTools: exports_external.array(exports_external.string()).describe('Array of tool name patterns to enable. Supports glob patterns (e.g., "mcp__metabase__*"). If not provided, all tools are enabled. If provided, only matching tools are enabled.').optional(),
4073
4074
  systemPrompt: exports_external.string().describe("Custom system prompt text to append to the base system prompt for integration-specific customizations").optional()
4074
4075
  }).strict();
@@ -4196,7 +4197,7 @@ function buildEnvironmentVariables(options) {
4196
4197
  if (options.env) {
4197
4198
  Object.assign(env, options.env);
4198
4199
  }
4199
- env.AMP_SDK_VERSION = "0.1.0-20260125200955-gb173ebb";
4200
+ env.AMP_SDK_VERSION = "0.1.0-20260126043227-gb3f9306";
4200
4201
  return env;
4201
4202
  }
4202
4203
  function spawnAmpCli(args, options) {
@@ -4262,6 +4263,11 @@ function buildCliArgs(options) {
4262
4263
  if (options.mode) {
4263
4264
  args.push("--mode", options.mode);
4264
4265
  }
4266
+ if (options.labels) {
4267
+ for (const label of options.labels) {
4268
+ args.push("--label", label);
4269
+ }
4270
+ }
4265
4271
  return args;
4266
4272
  }
4267
4273
  async function* processOutputStream(stdout) {
@@ -4400,4 +4406,4 @@ export {
4400
4406
  AmpOptionsSchema
4401
4407
  };
4402
4408
 
4403
- //# debugId=024CE8BC3C6AFD9064756E2164756E21
4409
+ //# debugId=0E3BB72D9726547164756E2164756E21
package/dist/types.d.ts CHANGED
@@ -443,6 +443,7 @@ export declare const AmpOptionsSchema: z.ZodObject<{
443
443
  context?: "thread" | "subagent" | undefined;
444
444
  to?: string | undefined;
445
445
  }>, "many">>;
446
+ labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
446
447
  enabledTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
447
448
  systemPrompt: z.ZodOptional<z.ZodString>;
448
449
  }, "strict", z.ZodTypeAny, {
@@ -483,6 +484,7 @@ export declare const AmpOptionsSchema: z.ZodObject<{
483
484
  context?: "thread" | "subagent" | undefined;
484
485
  to?: string | undefined;
485
486
  }[] | undefined;
487
+ labels?: string[] | undefined;
486
488
  enabledTools?: string[] | undefined;
487
489
  systemPrompt?: string | undefined;
488
490
  }, {
@@ -523,6 +525,7 @@ export declare const AmpOptionsSchema: z.ZodObject<{
523
525
  context?: "thread" | "subagent" | undefined;
524
526
  to?: string | undefined;
525
527
  }[] | undefined;
528
+ labels?: string[] | undefined;
526
529
  enabledTools?: string[] | undefined;
527
530
  systemPrompt?: string | undefined;
528
531
  }>;
package/package.json CHANGED
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "type": "module",
46
46
  "types": "dist/index.d.ts",
47
- "version": "0.1.0-20260125200955-gb173ebb",
47
+ "version": "0.1.0-20260126043227-gb3f9306",
48
48
  "scripts": {
49
49
  "build": "bun run scripts/build.ts",
50
50
  "dev": "pnpm exec tsc -b --watch",