@sourcegraph/amp 0.0.1748339241-g4bad6a → 0.0.1748344183-gce2b68

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 (43) hide show
  1. package/dist/amp.js +3 -3
  2. package/dist/{client-Cz8QljuN.js → client-CGgxVuSC.js} +7 -7
  3. package/dist/{client-Cz8QljuN.js.map → client-CGgxVuSC.js.map} +1 -1
  4. package/dist/{color-DH4c3nvN.js → color-BHYGC4Ar.js} +135 -124
  5. package/dist/color-BHYGC4Ar.js.map +1 -0
  6. package/dist/{create_file.node-D6Df0Urb.js → create_file.node-D3fcWUKp.js} +2 -2
  7. package/dist/{create_file.node-D6Df0Urb.js.map → create_file.node-D3fcWUKp.js.map} +1 -1
  8. package/dist/{edit_file.node-C7Ni9Xjb.js → edit_file.node-DFDvUKmK.js} +5 -5
  9. package/dist/{edit_file.node-C7Ni9Xjb.js.map → edit_file.node-DFDvUKmK.js.map} +1 -1
  10. package/dist/{executable-BJNIVWlu.js → executable-CBhkfVUL.js} +2 -2
  11. package/dist/{executable-BJNIVWlu.js.map → executable-CBhkfVUL.js.map} +1 -1
  12. package/dist/{files-DZUDelFg.js → files-BqepJuwv.js} +2 -2
  13. package/dist/{files-DZUDelFg.js.map → files-BqepJuwv.js.map} +1 -1
  14. package/dist/{glob.node-C9lKzgi-.js → glob.node-BINRiQjJ.js} +26 -26
  15. package/dist/{glob.node-C9lKzgi-.js.map → glob.node-BINRiQjJ.js.map} +1 -1
  16. package/dist/{list_directory.node-DrWI9xPT.js → list_directory.node-DPu4RhvA.js} +2 -2
  17. package/dist/{list_directory.node-DrWI9xPT.js.map → list_directory.node-DPu4RhvA.js.map} +1 -1
  18. package/dist/{load-profile-noOyWkOF.js → load-profile-DC97etcT.js} +2 -2
  19. package/dist/{load-profile-noOyWkOF.js.map → load-profile-DC97etcT.js.map} +1 -1
  20. package/dist/{main-VhmuSMX3.js → main-C22ZCKsZ.js} +5534 -5480
  21. package/dist/main-C22ZCKsZ.js.map +1 -0
  22. package/dist/{node-TK8n7MXb.js → node-BOqn899s.js} +5 -5
  23. package/dist/{node-TK8n7MXb.js.map → node-BOqn899s.js.map} +1 -1
  24. package/dist/{node-CiK6YqQn.js → node-CK2AzzJP.js} +3 -3
  25. package/dist/{node-CiK6YqQn.js.map → node-CK2AzzJP.js.map} +1 -1
  26. package/dist/{node-DtF9_How.js → node-CieDu4sj.js} +2 -2
  27. package/dist/{node-DtF9_How.js.map → node-CieDu4sj.js.map} +1 -1
  28. package/dist/{node-5s3BwyMp.js → node-Coo1Y37e.js} +3 -3
  29. package/dist/{node-5s3BwyMp.js.map → node-Coo1Y37e.js.map} +1 -1
  30. package/dist/{node-BoNPZ-4l.js → node-DW21A6nN.js} +2 -2
  31. package/dist/{node-BoNPZ-4l.js.map → node-DW21A6nN.js.map} +1 -1
  32. package/dist/{node-CR6PuGwJ.js → node-DX52svHT.js} +20 -20
  33. package/dist/{node-CR6PuGwJ.js.map → node-DX52svHT.js.map} +1 -1
  34. package/dist/{read_file.node-DugoUCiQ.js → read_file.node-M7X04JIh.js} +2 -2
  35. package/dist/{read_file.node-DugoUCiQ.js.map → read_file.node-M7X04JIh.js.map} +1 -1
  36. package/dist/{stdio-b2NNJPn1.js → stdio-BIlnCjMe.js} +9 -9
  37. package/dist/{stdio-b2NNJPn1.js.map → stdio-BIlnCjMe.js.map} +1 -1
  38. package/dist/storybook.js +1 -1
  39. package/dist/{undo_edit.node-C8KyPFqz.js → undo_edit.node-CP3LxQtf.js} +10 -10
  40. package/dist/{undo_edit.node-C8KyPFqz.js.map → undo_edit.node-CP3LxQtf.js.map} +1 -1
  41. package/package.json +1 -1
  42. package/dist/color-DH4c3nvN.js.map +0 -1
  43. package/dist/main-VhmuSMX3.js.map +0 -1
package/dist/amp.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import "./color-DH4c3nvN.js";
3
- import "./main-VhmuSMX3.js";
2
+ import "./color-BHYGC4Ar.js";
3
+ import "./main-C22ZCKsZ.js";
4
4
  import "node:crypto";
5
5
  import "node:fs/promises";
6
6
  import "node:path";
7
7
  import "node:process";
8
- import "./client-Cz8QljuN.js";
8
+ import "./client-CGgxVuSC.js";
9
9
  //# sourceMappingURL=amp.js.map
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { f as i, r as a, b7 as n, s as p, p as c } from "./color-DH4c3nvN.js";
3
- const u = a.pipe(
2
+ import { f as i, r as o, ba as n, s as p, p as c } from "./color-BHYGC4Ar.js";
3
+ const u = o.pipe(
4
4
  p(({ settings: e, secrets: t }) => c(async () => await t.getToken("apiKey", e.url) !== void 0))
5
5
  );
6
6
  async function w(e, t) {
7
- const r = await i(a, t?.signal ?? void 0);
7
+ const r = await i(o, t?.signal ?? void 0);
8
8
  return f(r, e, t);
9
9
  }
10
10
  async function f(e, t, r) {
@@ -15,8 +15,8 @@ async function f(e, t, r) {
15
15
  const s = e.settings.url;
16
16
  if (!s)
17
17
  throw new Error("amp.url is not set");
18
- const o = await e.secrets.getToken("apiKey", s);
19
- if (!o)
18
+ const a = await e.secrets.getToken("apiKey", s);
19
+ if (!a)
20
20
  throw new Error("Amp API key is not set");
21
21
  return fetch(new URL(t, s), {
22
22
  ...r,
@@ -24,7 +24,7 @@ async function f(e, t, r) {
24
24
  ...r?.headers,
25
25
  ...n(),
26
26
  "Content-Type": "application/json",
27
- Authorization: `Bearer ${o}`
27
+ Authorization: `Bearer ${a}`
28
28
  }
29
29
  });
30
30
  }
@@ -32,4 +32,4 @@ export {
32
32
  w as f,
33
33
  u as i
34
34
  };
35
- //# sourceMappingURL=client-Cz8QljuN.js.map
35
+ //# sourceMappingURL=client-CGgxVuSC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-Cz8QljuN.js","sources":["../../core/src/server-api/client.ts"],"sourcesContent":["import type { ThreadOperatorShare } from '@sourcegraph/amp-api-types'\nimport type { Observable } from '@sourcegraph/observable'\nimport {\n\tdistinctUntilChanged,\n\tfirstValueFrom,\n\tmap,\n\ttype pendingOperation,\n\tpromiseFactoryToObservable,\n\tswitchMap,\n\tswitchMapReplayOperation,\n} from '@sourcegraph/observable'\nimport { isEqualJSON } from '../common/isEqualJSON'\nimport { type PickResolvedConfiguration, resolvedConfig } from '../configuration/resolver'\nimport { clientIdentificationHeaders } from '../misc/known-clients'\nimport type { ThreadID } from '../threads/thread'\nimport type { ThreadService } from '../threads/thread-service'\n\nexport const isAmpServerConfigured = resolvedConfig.pipe(\n\tswitchMap(({ settings, secrets }) => {\n\t\treturn promiseFactoryToObservable(async () => {\n\t\t\tconst apiKey = await secrets.getToken('apiKey', settings.url)\n\t\t\treturn apiKey !== undefined\n\t\t})\n\t}),\n)\n\n/**\n * Returns the URL to a thread on the Amp server.\n */\nexport function threadURL(ampURL: URL, threadID: ThreadID): URL {\n\treturn new URL(`/threads/${threadID}`, ampURL)\n}\n\n/**\n * Makes a request to the Amp API with the proper configuration\n */\nexport async function fetchFromAmpServer(\n\tpathAndQuery: string,\n\tinit?: RequestInit,\n): Promise<Response> {\n\tconst config = await firstValueFrom(resolvedConfig, init?.signal ?? undefined)\n\treturn fetchFromAmpServerWithConfig(config, pathAndQuery, init)\n}\n\nexport function watchOnAmpServer<T>(\n\tpathAndQuery: string,\n\tinit?: Omit<RequestInit, 'signal'>,\n): Observable<T | typeof pendingOperation | Error> {\n\treturn resolvedConfig.pipe(\n\t\tmap(\n\t\t\t({ settings, secrets }) =>\n\t\t\t\t({\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\turl: settings.url,\n\t\t\t\t\t},\n\t\t\t\t\tsecrets,\n\t\t\t\t}) satisfies PickResolvedConfiguration<{\n\t\t\t\t\tsettings: 'url'\n\t\t\t\t\tsecrets: true\n\t\t\t\t}>,\n\t\t),\n\t\tdistinctUntilChanged(\n\t\t\t(a, b) => isEqualJSON(a.settings, b.settings) && a.secrets === b.secrets,\n\t\t),\n\t\tswitchMapReplayOperation((config) =>\n\t\t\tpromiseFactoryToObservable(async (signal) => {\n\t\t\t\tconst resp = await fetchFromAmpServerWithConfig(config, pathAndQuery, {\n\t\t\t\t\t...init,\n\t\t\t\t\tsignal,\n\t\t\t\t})\n\t\t\t\tif (!resp.ok) {\n\t\t\t\t\tconst text = await resp.text()\n\t\t\t\t\tif (text) {\n\t\t\t\t\t\tthrow new Error(`HTTP ${resp.status}: ${text}`)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(`HTTP ${resp.status}`)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn (await resp.json()) as T\n\t\t\t}),\n\t\t),\n\t)\n}\n\n/**\n * Share a thread with the operator (i.e., the Amp team).\n */\nexport async function shareThreadWithOperator(\n\tthreadService: ThreadService,\n\tthreadID: ThreadID,\n): Promise<void> {\n\tconst thread = await firstValueFrom(threadService.observe(threadID))\n\tif (!thread) {\n\t\tthrow new Error(`Thread not found: ${threadID}`)\n\t}\n\n\tconst response = await fetchFromAmpServer('/api/internal/share-thread-with-operator', {\n\t\tmethod: 'POST',\n\t\theaders: {\n\t\t\t'Content-Type': 'application/json',\n\t\t},\n\t\tbody: JSON.stringify({ threadData: thread } as Pick<ThreadOperatorShare, 'threadData'>),\n\t})\n\tif (!response.ok) {\n\t\tconst text = await response.text()\n\t\tthrow new Error(`Failed to share thread: ${response.status} ${text}`)\n\t}\n}\n\nasync function fetchFromAmpServerWithConfig(\n\tconfig: PickResolvedConfiguration<{\n\t\tsettings: 'url'\n\t\tsecrets: true\n\t}>,\n\tpathAndQuery: string,\n\tinit?: RequestInit,\n): Promise<Response> {\n\tif (pathAndQuery.startsWith('http:') || pathAndQuery.startsWith('https:')) {\n\t\tthrow new Error('input must be a path, not an absolute URL')\n\t}\n\tif (!pathAndQuery.startsWith('/')) {\n\t\tthrow new Error('pathAndQuery must start with /')\n\t}\n\n\tconst baseURL = config.settings.url\n\tif (!baseURL) {\n\t\tthrow new Error('amp.url is not set')\n\t}\n\n\tconst apiKey = await config.secrets.getToken('apiKey', baseURL)\n\tif (!apiKey) {\n\t\tthrow new Error('Amp API key is not set')\n\t}\n\n\treturn fetch(new URL(pathAndQuery, baseURL), {\n\t\t...init,\n\t\theaders: {\n\t\t\t...init?.headers,\n\t\t\t...clientIdentificationHeaders(),\n\t\t\t'Content-Type': 'application/json',\n\t\t\tAuthorization: `Bearer ${apiKey}`,\n\t\t},\n\t})\n}\n"],"names":["isAmpServerConfigured","resolvedConfig","switchMap","settings","secrets","promiseFactoryToObservable","fetchFromAmpServer","pathAndQuery","init","config","firstValueFrom","fetchFromAmpServerWithConfig","baseURL","apiKey","clientIdentificationHeaders"],"mappings":";;AAiBO,MAAMA,IAAwBC,EAAe;AAAA,EACnDC,EAAU,CAAC,EAAE,UAAAC,GAAU,SAAAC,QACfC,EAA2B,YAClB,MAAMD,EAAQ,SAAS,UAAUD,EAAS,GAAG,MAC1C,MAClB,CACD;AACF;AAYsB,eAAAG,EACrBC,GACAC,GACoB;AACpB,QAAMC,IAAS,MAAMC,EAAeT,GAAgBO,GAAM,UAAU,MAAS;AACtE,SAAAG,EAA6BF,GAAQF,GAAcC,CAAI;AAC/D;AAmEA,eAAeG,EACdF,GAIAF,GACAC,GACoB;AACpB,MAAID,EAAa,WAAW,OAAO,KAAKA,EAAa,WAAW,QAAQ;AACjE,UAAA,IAAI,MAAM,2CAA2C;AAE5D,MAAI,CAACA,EAAa,WAAW,GAAG;AACzB,UAAA,IAAI,MAAM,gCAAgC;AAG3C,QAAAK,IAAUH,EAAO,SAAS;AAChC,MAAI,CAACG;AACE,UAAA,IAAI,MAAM,oBAAoB;AAGrC,QAAMC,IAAS,MAAMJ,EAAO,QAAQ,SAAS,UAAUG,CAAO;AAC9D,MAAI,CAACC;AACE,UAAA,IAAI,MAAM,wBAAwB;AAGzC,SAAO,MAAM,IAAI,IAAIN,GAAcK,CAAO,GAAG;AAAA,IAC5C,GAAGJ;AAAA,IACH,SAAS;AAAA,MACR,GAAGA,GAAM;AAAA,MACT,GAAGM,EAA4B;AAAA,MAC/B,gBAAgB;AAAA,MAChB,eAAe,UAAUD,CAAM;AAAA,IAAA;AAAA,EAChC,CACA;AACF;"}
1
+ {"version":3,"file":"client-CGgxVuSC.js","sources":["../../core/src/server-api/client.ts"],"sourcesContent":["import type { ThreadOperatorShare } from '@sourcegraph/amp-api-types'\nimport type { Observable } from '@sourcegraph/observable'\nimport {\n\tdistinctUntilChanged,\n\tfirstValueFrom,\n\tmap,\n\ttype pendingOperation,\n\tpromiseFactoryToObservable,\n\tswitchMap,\n\tswitchMapReplayOperation,\n} from '@sourcegraph/observable'\nimport { isEqualJSON } from '../common/isEqualJSON'\nimport { type PickResolvedConfiguration, resolvedConfig } from '../configuration/resolver'\nimport { clientIdentificationHeaders } from '../misc/known-clients'\nimport type { ThreadID } from '../threads/thread'\nimport type { ThreadService } from '../threads/thread-service'\n\nexport const isAmpServerConfigured = resolvedConfig.pipe(\n\tswitchMap(({ settings, secrets }) => {\n\t\treturn promiseFactoryToObservable(async () => {\n\t\t\tconst apiKey = await secrets.getToken('apiKey', settings.url)\n\t\t\treturn apiKey !== undefined\n\t\t})\n\t}),\n)\n\n/**\n * Returns the URL to a thread on the Amp server.\n */\nexport function threadURL(ampURL: URL, threadID: ThreadID): URL {\n\treturn new URL(`/threads/${threadID}`, ampURL)\n}\n\n/**\n * Makes a request to the Amp API with the proper configuration\n */\nexport async function fetchFromAmpServer(\n\tpathAndQuery: string,\n\tinit?: RequestInit,\n): Promise<Response> {\n\tconst config = await firstValueFrom(resolvedConfig, init?.signal ?? undefined)\n\treturn fetchFromAmpServerWithConfig(config, pathAndQuery, init)\n}\n\nexport function watchOnAmpServer<T>(\n\tpathAndQuery: string,\n\tinit?: Omit<RequestInit, 'signal'>,\n): Observable<T | typeof pendingOperation | Error> {\n\treturn resolvedConfig.pipe(\n\t\tmap(\n\t\t\t({ settings, secrets }) =>\n\t\t\t\t({\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\turl: settings.url,\n\t\t\t\t\t},\n\t\t\t\t\tsecrets,\n\t\t\t\t}) satisfies PickResolvedConfiguration<{\n\t\t\t\t\tsettings: 'url'\n\t\t\t\t\tsecrets: true\n\t\t\t\t}>,\n\t\t),\n\t\tdistinctUntilChanged(\n\t\t\t(a, b) => isEqualJSON(a.settings, b.settings) && a.secrets === b.secrets,\n\t\t),\n\t\tswitchMapReplayOperation((config) =>\n\t\t\tpromiseFactoryToObservable(async (signal) => {\n\t\t\t\tconst resp = await fetchFromAmpServerWithConfig(config, pathAndQuery, {\n\t\t\t\t\t...init,\n\t\t\t\t\tsignal,\n\t\t\t\t})\n\t\t\t\tif (!resp.ok) {\n\t\t\t\t\tconst text = await resp.text()\n\t\t\t\t\tif (text) {\n\t\t\t\t\t\tthrow new Error(`HTTP ${resp.status}: ${text}`)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(`HTTP ${resp.status}`)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn (await resp.json()) as T\n\t\t\t}),\n\t\t),\n\t)\n}\n\n/**\n * Share a thread with the operator (i.e., the Amp team).\n */\nexport async function shareThreadWithOperator(\n\tthreadService: ThreadService,\n\tthreadID: ThreadID,\n): Promise<void> {\n\tconst thread = await firstValueFrom(threadService.observe(threadID))\n\tif (!thread) {\n\t\tthrow new Error(`Thread not found: ${threadID}`)\n\t}\n\n\tconst response = await fetchFromAmpServer('/api/internal/share-thread-with-operator', {\n\t\tmethod: 'POST',\n\t\theaders: {\n\t\t\t'Content-Type': 'application/json',\n\t\t},\n\t\tbody: JSON.stringify({ threadData: thread } as Pick<ThreadOperatorShare, 'threadData'>),\n\t})\n\tif (!response.ok) {\n\t\tconst text = await response.text()\n\t\tthrow new Error(`Failed to share thread: ${response.status} ${text}`)\n\t}\n}\n\nasync function fetchFromAmpServerWithConfig(\n\tconfig: PickResolvedConfiguration<{\n\t\tsettings: 'url'\n\t\tsecrets: true\n\t}>,\n\tpathAndQuery: string,\n\tinit?: RequestInit,\n): Promise<Response> {\n\tif (pathAndQuery.startsWith('http:') || pathAndQuery.startsWith('https:')) {\n\t\tthrow new Error('input must be a path, not an absolute URL')\n\t}\n\tif (!pathAndQuery.startsWith('/')) {\n\t\tthrow new Error('pathAndQuery must start with /')\n\t}\n\n\tconst baseURL = config.settings.url\n\tif (!baseURL) {\n\t\tthrow new Error('amp.url is not set')\n\t}\n\n\tconst apiKey = await config.secrets.getToken('apiKey', baseURL)\n\tif (!apiKey) {\n\t\tthrow new Error('Amp API key is not set')\n\t}\n\n\treturn fetch(new URL(pathAndQuery, baseURL), {\n\t\t...init,\n\t\theaders: {\n\t\t\t...init?.headers,\n\t\t\t...clientIdentificationHeaders(),\n\t\t\t'Content-Type': 'application/json',\n\t\t\tAuthorization: `Bearer ${apiKey}`,\n\t\t},\n\t})\n}\n"],"names":["isAmpServerConfigured","resolvedConfig","switchMap","settings","secrets","promiseFactoryToObservable","fetchFromAmpServer","pathAndQuery","init","config","firstValueFrom","fetchFromAmpServerWithConfig","baseURL","apiKey","clientIdentificationHeaders"],"mappings":";;AAiBO,MAAMA,IAAwBC,EAAe;AAAA,EACnDC,EAAU,CAAC,EAAE,UAAAC,GAAU,SAAAC,QACfC,EAA2B,YAClB,MAAMD,EAAQ,SAAS,UAAUD,EAAS,GAAG,MAC1C,MAClB,CACD;AACF;AAYsB,eAAAG,EACrBC,GACAC,GACoB;AACpB,QAAMC,IAAS,MAAMC,EAAeT,GAAgBO,GAAM,UAAU,MAAS;AACtE,SAAAG,EAA6BF,GAAQF,GAAcC,CAAI;AAC/D;AAmEA,eAAeG,EACdF,GAIAF,GACAC,GACoB;AACpB,MAAID,EAAa,WAAW,OAAO,KAAKA,EAAa,WAAW,QAAQ;AACjE,UAAA,IAAI,MAAM,2CAA2C;AAE5D,MAAI,CAACA,EAAa,WAAW,GAAG;AACzB,UAAA,IAAI,MAAM,gCAAgC;AAG3C,QAAAK,IAAUH,EAAO,SAAS;AAChC,MAAI,CAACG;AACE,UAAA,IAAI,MAAM,oBAAoB;AAGrC,QAAMC,IAAS,MAAMJ,EAAO,QAAQ,SAAS,UAAUG,CAAO;AAC9D,MAAI,CAACC;AACE,UAAA,IAAI,MAAM,wBAAwB;AAGzC,SAAO,MAAM,IAAI,IAAIN,GAAcK,CAAO,GAAG;AAAA,IAC5C,GAAGJ;AAAA,IACH,SAAS;AAAA,MACR,GAAGA,GAAM;AAAA,MACT,GAAGM,EAA4B;AAAA,MAC/B,gBAAgB;AAAA,MAChB,eAAe,UAAUD,CAAM;AAAA,IAAA;AAAA,EAChC,CACA;AACF;"}
@@ -7057,7 +7057,7 @@ Prefer this tool over \`edit_file\` when you want to ovewrite the entire content
7057
7057
  },
7058
7058
  source: "builtin"
7059
7059
  },
7060
- fn: import("./create_file.node-D6Df0Urb.js").then(
7060
+ fn: import("./create_file.node-D3fcWUKp.js").then(
7061
7061
  ({ nodeCreateFileTool: t }) => t
7062
7062
  )
7063
7063
  }, Xt = "Grep", GC = 15, YC = 250, qC = `Search for exact text patterns in files using ripgrep, a fast keyword search tool.
@@ -7190,7 +7190,7 @@ COMPLEMENTARY USE WITH CODEBASE_SEARCH:
7190
7190
  },
7191
7191
  source: "builtin"
7192
7192
  },
7193
- fn: import("./node-TK8n7MXb.js").then(({ nodeGrepTool: t }) => t)
7193
+ fn: import("./node-BOqn899s.js").then(({ nodeGrepTool: t }) => t)
7194
7194
  }, hr = "read_file", HC = 1e3, yn = {
7195
7195
  spec: {
7196
7196
  name: hr,
@@ -7222,7 +7222,7 @@ Returns the contents of the file with each line prefixed by its line number. For
7222
7222
  switch ("node") {
7223
7223
  case "node":
7224
7224
  case "vscode":
7225
- return import("./read_file.node-DugoUCiQ.js").then(({ nodeReadFileTool: t }) => t);
7225
+ return import("./read_file.node-M7X04JIh.js").then(({ nodeReadFileTool: t }) => t);
7226
7226
  }
7227
7227
  })()
7228
7228
  }, $C = gC({
@@ -7251,7 +7251,7 @@ If you need to replace the entire contents of a file, use \`${ni}\` instead, sin
7251
7251
  inputSchema: kD($C),
7252
7252
  source: "builtin"
7253
7253
  },
7254
- fn: import("./edit_file.node-C7Ni9Xjb.js").then(({ nodeEditFileTool: t }) => t)
7254
+ fn: import("./edit_file.node-DFDvUKmK.js").then(({ nodeEditFileTool: t }) => t)
7255
7255
  };
7256
7256
  async function cJ(t, e, r, n) {
7257
7257
  e = Zn(e);
@@ -8237,7 +8237,7 @@ Note: Results are sorted by modification time with the most recently modified fi
8237
8237
  },
8238
8238
  source: "builtin"
8239
8239
  },
8240
- fn: import("./glob.node-C9lKzgi-.js").then(({ nodeGlobTool: t }) => t)
8240
+ fn: import("./glob.node-BINRiQjJ.js").then(({ nodeGlobTool: t }) => t)
8241
8241
  }, si = "list_directory", u_ = {
8242
8242
  spec: {
8243
8243
  name: si,
@@ -8258,7 +8258,7 @@ Note: Results are sorted by modification time with the most recently modified fi
8258
8258
  switch ("node") {
8259
8259
  case "node":
8260
8260
  case "vscode":
8261
- return import("./list_directory.node-DrWI9xPT.js").then(
8261
+ return import("./list_directory.node-DPu4RhvA.js").then(
8262
8262
  ({ nodeListDirectoryTool: t }) => t
8263
8263
  );
8264
8264
  }
@@ -9082,7 +9082,7 @@ It's VERY IMPORTANT to use specific tools when searching for files, instead of i
9082
9082
  },
9083
9083
  source: "builtin"
9084
9084
  },
9085
- fn: import("./node-CiK6YqQn.js").then(({ nodeBashTool: t }) => t)
9085
+ fn: import("./node-CK2AzzJP.js").then(({ nodeBashTool: t }) => t)
9086
9086
  }, H0 = [
9087
9087
  "ls",
9088
9088
  "dir",
@@ -9413,7 +9413,7 @@ This tool converts web content to markdown format for better readability.`,
9413
9413
  requiresNetwork: !0
9414
9414
  }
9415
9415
  },
9416
- fn: import("./node-DtF9_How.js").then(({ nodeReadWebPageTool: t }) => t)
9416
+ fn: import("./node-CieDu4sj.js").then(({ nodeReadWebPageTool: t }) => t)
9417
9417
  }, uh = "think", j0 = (t, e) => An(async () => ({ status: "done", result: "Thoughts have been logged." })), X0 = {
9418
9418
  spec: {
9419
9419
  name: uh,
@@ -9478,7 +9478,7 @@ the \`${Bu}\` with the url.
9478
9478
  requiresNetwork: !0
9479
9479
  }
9480
9480
  },
9481
- fn: import("./node-5s3BwyMp.js").then(({ nodeWebSearchTool: t }) => t)
9481
+ fn: import("./node-Coo1Y37e.js").then(({ nodeWebSearchTool: t }) => t)
9482
9482
  }, Sn = "Task", Uu = [
9483
9483
  u_,
9484
9484
  sa,
@@ -9550,11 +9550,18 @@ How to use the ${Sn} tool:
9550
9550
  // If all of the tools that it can call are available in this environment, then make this tool
9551
9551
  // available as well.
9552
9552
  fn: Uu.every((t) => t.fn !== null) ? rR : null
9553
- }, En = "AGENT.md";
9554
- class OJ {
9553
+ }, En = "AGENT.md", OJ = `Please analyze this codebase and create an AGENT.md file containing:
9554
+ 1. Build/lint/test commands - especially for running a single test
9555
+ 2. Code style guidelines including imports, formatting, types, naming conventions, error handling, etc.
9556
+
9557
+ The file you create will be given to agentic coding tools (such as yourself) that operate in this repository. Make it about 20 lines long.
9558
+
9559
+ If there are Cursor rules (in .cursor/rules/ or .cursorrules), Claude rules (CLAUDE.md), Windsurf rules (.windsurfrules), Cline rules (.clinerules), Goose rules (.goosehints), or Copilot rules (in .github/copilot-instructions.md), make sure to include them. Also, first check if there is a AGENT.md file, and if so, update it instead of overwriting it.`;
9560
+ class vJ {
9555
9561
  async environment() {
9556
9562
  return {
9557
9563
  workspacePaths: [],
9564
+ workingDirectory: "",
9558
9565
  rootDirectoryListing: null
9559
9566
  };
9560
9567
  }
@@ -9870,10 +9877,11 @@ ${n}
9870
9877
  "# Environment",
9871
9878
  "Here is useful information about the environment you are running in:",
9872
9879
  `Today's date: ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`,
9880
+ `Working directory: ${r.workingDirectory}`,
9873
9881
  `Workspace paths: ${r.workspacePaths.join(", ")}`,
9874
9882
  e && e.platform ? `Operating system: ${e.platform.os}${e.platform.webBrowser ? " (running in web browser)" : ""}` : null,
9875
9883
  e ? s(e) : null,
9876
- `Directory listing of the user's workspace:
9884
+ `Directory listing of the user's workspace paths:
9877
9885
  <directoryListing>
9878
9886
  ${r.rootDirectoryListing || ""}
9879
9887
  </directoryListing>`
@@ -9892,7 +9900,7 @@ async function nR(t, e, r = !1) {
9892
9900
  text: r ? dh : ph
9893
9901
  }), n;
9894
9902
  }
9895
- async function vJ(t, e, r = !1) {
9903
+ async function IJ(t, e, r = !1) {
9896
9904
  const n = [_h(!0, r)], a = await mh(t, e);
9897
9905
  for (const s of a)
9898
9906
  n.push(s.text);
@@ -10097,7 +10105,7 @@ const Xr = "codebase_search", zu = [
10097
10105
  userPrompt: t.query,
10098
10106
  env: e,
10099
10107
  keepTranscript: !1
10100
- }), IJ = {
10108
+ }), wJ = {
10101
10109
  spec: {
10102
10110
  name: "codebase_search_agent",
10103
10111
  description: `Intelligently search your codebase with an agent that has access to: ${zu.map((t) => t.spec.name).join(", ")}.
@@ -10177,7 +10185,7 @@ This command reverts the most recent edit made to the specified file.
10177
10185
  It will restore the file to its state before the last edit was made.
10178
10186
 
10179
10187
  Returns a git-style diff showing the changes that were undone as formatted markdown.
10180
- `, gh = "undo_edit", wJ = {
10188
+ `, gh = "undo_edit", kJ = {
10181
10189
  spec: {
10182
10190
  name: gh,
10183
10191
  description: uR,
@@ -10193,9 +10201,9 @@ Returns a git-style diff showing the changes that were undone as formatted markd
10193
10201
  },
10194
10202
  source: "builtin"
10195
10203
  },
10196
- fn: import("./undo_edit.node-C8KyPFqz.js").then(({ nodeUndoEditTool: t }) => t)
10204
+ fn: import("./undo_edit.node-CP3LxQtf.js").then(({ nodeUndoEditTool: t }) => t)
10197
10205
  };
10198
- function kJ(t, e, r) {
10206
+ function MJ(t, e, r) {
10199
10207
  const n = [], a = [];
10200
10208
  for (const [s, i] of t.messages.entries())
10201
10209
  switch (i.role) {
@@ -10220,7 +10228,7 @@ function kJ(t, e, r) {
10220
10228
  }
10221
10229
  return { messages: n, toolResults: a };
10222
10230
  }
10223
- function MJ({ messages: t, toolResults: e }, r = (i) => fS.write(i + `
10231
+ function xJ({ messages: t, toolResults: e }, r = (i) => fS.write(i + `
10224
10232
  `), n, a, s) {
10225
10233
  for (const [, i] of t)
10226
10234
  if (i.role === "assistant") {
@@ -10406,7 +10414,7 @@ ${d[1].trim().split(`
10406
10414
  return null;
10407
10415
  }
10408
10416
  }
10409
- function xJ(t, e) {
10417
+ function LJ(t, e) {
10410
10418
  if (e.name === ar) {
10411
10419
  const r = e.input;
10412
10420
  return "Run " + t.print(r.cmd, {
@@ -54303,111 +54311,114 @@ class _Z {
54303
54311
  return this.print(e, r);
54304
54312
  }
54305
54313
  }
54306
- const LJ = new uZ(), PJ = new _Z();
54314
+ const PJ = new uZ(), FJ = new _Z();
54307
54315
  export {
54308
- SJ as $,
54309
- UT as A,
54316
+ TJ as $,
54317
+ JZ as A,
54310
54318
  hZ as B,
54311
- PT as C,
54312
- s0 as D,
54313
- oJ as E,
54314
- NE as F,
54315
- eJ as G,
54319
+ UT as C,
54320
+ PT as D,
54321
+ s0 as E,
54322
+ oJ as F,
54323
+ NE as G,
54316
54324
  LT as H,
54317
- BT as I,
54318
- tJ as J,
54319
- iJ as K,
54320
- sh as L,
54325
+ eJ as I,
54326
+ BT as J,
54327
+ tJ as K,
54328
+ iJ as L,
54321
54329
  Qu as M,
54322
54330
  bZ as N,
54323
54331
  Ee as O,
54324
- _J as P,
54325
- ar as Q,
54326
- CJ as R,
54327
- lJ as S,
54328
- rJ as T,
54329
- nJ as U,
54330
- sJ as V,
54331
- nE as W,
54332
- aJ as X,
54333
- Ju as Y,
54334
- qZ as Z,
54335
- TJ as _,
54332
+ sh as P,
54333
+ _J as Q,
54334
+ ar as R,
54335
+ CJ as S,
54336
+ lJ as T,
54337
+ rJ as U,
54338
+ nJ as V,
54339
+ sJ as W,
54340
+ nE as X,
54341
+ aJ as Y,
54342
+ Ju as Z,
54343
+ qZ as _,
54336
54344
  IS as a,
54337
- KC as a$,
54338
- HZ as a0,
54339
- bJ as a1,
54340
- nR as a2,
54341
- hJ as a3,
54342
- vJ as a4,
54343
- HS as a5,
54344
- i0 as a6,
54345
- pJ as a7,
54346
- mJ as a8,
54347
- dJ as a9,
54348
- rE as aA,
54349
- LJ as aB,
54350
- PJ as aC,
54351
- ZZ as aD,
54352
- xS as aE,
54353
- yZ as aF,
54354
- RZ as aG,
54355
- jZ as aH,
54356
- kJ as aI,
54357
- MJ as aJ,
54358
- xJ as aK,
54359
- Xt as aL,
54360
- YT as aM,
54361
- Y0 as aN,
54362
- T0 as aO,
54363
- MZ as aP,
54364
- fJ as aQ,
54365
- TZ as aR,
54366
- th as aS,
54367
- AJ as aT,
54368
- hn as aU,
54369
- V0 as aV,
54370
- uJ as aW,
54371
- cJ as aX,
54372
- $C as aY,
54373
- EJ as aZ,
54374
- xu as a_,
54375
- Q0 as aa,
54376
- IJ as ab,
54377
- NJ as ac,
54378
- u_ as ad,
54379
- sa as ae,
54380
- RJ as af,
54381
- yJ as ag,
54382
- yi as ah,
54383
- DJ as ai,
54384
- yn as aj,
54385
- zC as ak,
54386
- WC as al,
54387
- wJ as am,
54388
- X0 as an,
54389
- K0 as ao,
54390
- UZ as ap,
54391
- zZ as aq,
54392
- eR as ar,
54393
- nn as as,
54394
- FT as at,
54395
- p0 as au,
54396
- YZ as av,
54397
- gv as aw,
54398
- EZ as ax,
54399
- MT as ay,
54400
- CZ as az,
54345
+ $C as a$,
54346
+ SJ as a0,
54347
+ HZ as a1,
54348
+ bJ as a2,
54349
+ nR as a3,
54350
+ hJ as a4,
54351
+ IJ as a5,
54352
+ HS as a6,
54353
+ i0 as a7,
54354
+ pJ as a8,
54355
+ mJ as a9,
54356
+ CZ as aA,
54357
+ rE as aB,
54358
+ En as aC,
54359
+ OJ as aD,
54360
+ PJ as aE,
54361
+ FJ as aF,
54362
+ ZZ as aG,
54363
+ xS as aH,
54364
+ yZ as aI,
54365
+ RZ as aJ,
54366
+ jZ as aK,
54367
+ MJ as aL,
54368
+ xJ as aM,
54369
+ LJ as aN,
54370
+ Xt as aO,
54371
+ YT as aP,
54372
+ Y0 as aQ,
54373
+ T0 as aR,
54374
+ MZ as aS,
54375
+ fJ as aT,
54376
+ TZ as aU,
54377
+ th as aV,
54378
+ AJ as aW,
54379
+ hn as aX,
54380
+ V0 as aY,
54381
+ uJ as aZ,
54382
+ cJ as a_,
54383
+ dJ as aa,
54384
+ Q0 as ab,
54385
+ wJ as ac,
54386
+ NJ as ad,
54387
+ u_ as ae,
54388
+ sa as af,
54389
+ RJ as ag,
54390
+ yJ as ah,
54391
+ yi as ai,
54392
+ DJ as aj,
54393
+ yn as ak,
54394
+ zC as al,
54395
+ WC as am,
54396
+ kJ as an,
54397
+ X0 as ao,
54398
+ K0 as ap,
54399
+ UZ as aq,
54400
+ zZ as ar,
54401
+ eR as as,
54402
+ nn as at,
54403
+ FT as au,
54404
+ p0 as av,
54405
+ YZ as aw,
54406
+ gv as ax,
54407
+ EZ as ay,
54408
+ MT as az,
54401
54409
  OS as b,
54402
- YC as b0,
54403
- GC as b1,
54404
- gJ as b2,
54405
- r0 as b3,
54406
- JC as b4,
54407
- n0 as b5,
54408
- XZ as b6,
54409
- xT as b7,
54410
- OJ as b8,
54410
+ EJ as b0,
54411
+ xu as b1,
54412
+ KC as b2,
54413
+ YC as b3,
54414
+ GC as b4,
54415
+ gJ as b5,
54416
+ r0 as b6,
54417
+ JC as b7,
54418
+ n0 as b8,
54419
+ XZ as b9,
54420
+ xT as ba,
54421
+ vJ as bb,
54411
54422
  PZ as c,
54412
54423
  FZ as d,
54413
54424
  NZ as e,
@@ -54422,15 +54433,15 @@ export {
54422
54433
  AZ as n,
54423
54434
  IZ as o,
54424
54435
  An as p,
54425
- vZ as q,
54436
+ rh as q,
54426
54437
  Xu as r,
54427
54438
  X1 as s,
54428
54439
  L_ as t,
54429
- wZ as u,
54430
- SZ as v,
54431
- DZ as w,
54432
- OZ as x,
54433
- GZ as y,
54434
- JZ as z
54440
+ vZ as u,
54441
+ wZ as v,
54442
+ SZ as w,
54443
+ DZ as x,
54444
+ OZ as y,
54445
+ GZ as z
54435
54446
  };
54436
- //# sourceMappingURL=color-DH4c3nvN.js.map
54447
+ //# sourceMappingURL=color-BHYGC4Ar.js.map