@circuitwall/jarela 2.5.1 → 2.5.2
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +5 -5
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/events/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +22 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +22 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +22 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +19 -2
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +19 -2
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +19 -2
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +12 -2
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js +12 -2
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/route.js +12 -2
- package/.next/standalone/.next/server/app/api/v1/packages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +7 -0
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +52 -45
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page.js +72982 -72980
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +5 -5
- package/.next/standalone/.next/server/chunks/1433.js +1 -1
- package/.next/standalone/.next/server/chunks/210.js +6 -6
- package/.next/standalone/.next/server/chunks/2471.js +17 -17
- package/.next/standalone/.next/server/chunks/3524.js +31 -15
- package/.next/standalone/.next/server/chunks/3566.js +1 -1
- package/.next/standalone/.next/server/chunks/4189.js +1 -1
- package/.next/standalone/.next/server/chunks/{9590.js → 423.js} +10 -3
- package/.next/standalone/.next/server/chunks/4508.js +2 -2
- package/.next/standalone/.next/server/chunks/4596.js +5 -2
- package/.next/standalone/.next/server/chunks/46.js +7 -0
- package/.next/standalone/.next/server/chunks/540.js +29 -5
- package/.next/standalone/.next/server/chunks/5585.js +41 -3
- package/.next/standalone/.next/server/chunks/5908.js +10 -10
- package/.next/standalone/.next/server/chunks/{3399.js → 6058.js} +882 -400
- package/.next/standalone/.next/server/chunks/{9164.js → 6190.js} +13777 -13530
- package/.next/standalone/.next/server/chunks/6649.js +1 -1
- package/.next/standalone/.next/server/chunks/{1388.js → 8842.js} +5961 -5793
- package/.next/standalone/.next/server/chunks/9032.js +5 -5
- package/.next/standalone/.next/server/chunks/{7547.js → 9217.js} +485 -3
- package/.next/standalone/.next/server/instrumentation.js +7 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/standalone/.next/server/middleware.js +7 -0
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/app/{page-dd05bcb5f5b81157.js → page-4112e14360a9909e.js} +1576 -1574
- package/.next/standalone/docs/adoption/changesets.json +139 -0
- package/.next/standalone/package.json +2 -1
- package/CHANGELOG.md +38 -0
- package/browser-extension/background.js +5 -539
- package/browser-extension/lib/form-editing.mjs +541 -0
- package/components/chat/MessageBubble.tsx +4 -736
- package/components/chat/MessageContent.tsx +749 -0
- package/components/layout/MenuPanel.tsx +1 -1
- package/hooks/useSSE.test.ts +46 -0
- package/lib/agents/llm.ts +1 -1
- package/lib/agents/output-validator/validator.test.ts +4 -0
- package/lib/agents/output-validator/validator.ts +1 -1
- package/lib/agents/prompt-registry.test.ts +11 -0
- package/lib/agents/prompt-registry.ts +13 -0
- package/lib/agents/retry-prompts.ts +17 -0
- package/lib/agents/run-retry.ts +671 -0
- package/lib/agents/run-thread.retry.test.ts +176 -2
- package/lib/agents/run-thread.test.ts +6 -6
- package/lib/agents/run-thread.ts +9 -717
- package/lib/agents/stream-collector.test.ts +28 -4
- package/lib/agents/stream-collector.ts +5 -28
- package/lib/agents/tool-outcomes.ts +61 -0
- package/lib/documents/remote/confluence.test.ts +65 -0
- package/lib/documents/remote/confluence.ts +35 -9
- package/lib/documents/remote/jira.ts +1 -1
- package/lib/health/probes.test.ts +32 -0
- package/lib/health/probes.ts +29 -14
- package/lib/integrations/atlassian/manifest.ts +5 -3
- package/lib/integrations/github/manifest.ts +7 -4
- package/lib/integrations/gmail-oauth.ts +16 -1
- package/lib/integrations/microsoft-oauth.ts +17 -2
- package/lib/integrations/outlook/manifest.ts +10 -8
- package/lib/stores/integrations.ts +1 -0
- package/lib/tools/communications/calendar-aliases.test.ts +77 -1
- package/lib/tools/communications/gmail.test.ts +13 -0
- package/lib/tools/communications/ms-graph.test.ts +26 -3
- package/lib/tools/communications/ms-graph.ts +9 -11
- package/lib/tools/communications/outlook-calendar.ts +94 -17
- package/lib/tools/packages/default-packages/atlassian.ts +8 -2
- package/package.json +2 -1
- package/scripts/standalone-footprint.mjs +1 -1
- /package/.next/standalone/.next/static/{XFZTDssHBZKKX2mzH2ld0 → VZXMorlOmSmi3dUr7K5UX}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{XFZTDssHBZKKX2mzH2ld0 → VZXMorlOmSmi3dUr7K5UX}/_ssgManifest.js +0 -0
|
@@ -392,7 +392,7 @@ var lazy_json = __webpack_require__(62112);
|
|
|
392
392
|
// EXTERNAL MODULE: ./node_modules/@smithy/core/dist-es/submodules/serde/index.js + 2 modules
|
|
393
393
|
var serde = __webpack_require__(34538);
|
|
394
394
|
// EXTERNAL MODULE: ./node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js
|
|
395
|
-
var SerdeContext = __webpack_require__(
|
|
395
|
+
var SerdeContext = __webpack_require__(71966);
|
|
396
396
|
// EXTERNAL MODULE: ./node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js
|
|
397
397
|
var determineTimestampFormat = __webpack_require__(67055);
|
|
398
398
|
;// ./node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js
|
|
@@ -793,7 +793,7 @@ var NumericValue = __webpack_require__(3999);
|
|
|
793
793
|
// EXTERNAL MODULE: ./node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.js
|
|
794
794
|
var toUtf8 = __webpack_require__(63332);
|
|
795
795
|
// EXTERNAL MODULE: ./node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js
|
|
796
|
-
var SerdeContext = __webpack_require__(
|
|
796
|
+
var SerdeContext = __webpack_require__(71966);
|
|
797
797
|
// EXTERNAL MODULE: ./node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js
|
|
798
798
|
var determineTimestampFormat = __webpack_require__(67055);
|
|
799
799
|
;// ./node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js
|
|
@@ -1177,9 +1177,12 @@ const atlassianDefaultPackage = {
|
|
|
1177
1177
|
mapStoreFields: (raw)=>raw.url && raw.email && raw.api_token ? {
|
|
1178
1178
|
url: raw.url.replace(/\/+$/, ""),
|
|
1179
1179
|
email: raw.email,
|
|
1180
|
-
apiToken: raw.api_token
|
|
1180
|
+
apiToken: raw.api_token,
|
|
1181
|
+
...raw.cloud_id ? {
|
|
1182
|
+
cloudId: raw.cloud_id
|
|
1183
|
+
} : {}
|
|
1181
1184
|
} : null,
|
|
1182
|
-
notConfiguredError: "Atlassian not configured. Open Settings → Credentials and add your Atlassian site URL, " + "email, and API token. (Or set ATLASSIAN_URL / ATLASSIAN_EMAIL / ATLASSIAN_API_TOKEN env vars.)"
|
|
1185
|
+
notConfiguredError: "Atlassian not configured. Open Settings → Credentials and add your Atlassian site URL, " + "email, and API token. Scoped API tokens also need the Cloud ID. " + "(Or set ATLASSIAN_URL / ATLASSIAN_EMAIL / ATLASSIAN_API_TOKEN and optional ATLASSIAN_CLOUD_ID env vars.)"
|
|
1183
1186
|
}
|
|
1184
1187
|
})
|
|
1185
1188
|
};
|
|
@@ -9357,6 +9357,13 @@ const INTEGRATIONS = {
|
|
|
9357
9357
|
secret: false,
|
|
9358
9358
|
required: true
|
|
9359
9359
|
},
|
|
9360
|
+
{
|
|
9361
|
+
key: "cloud_id",
|
|
9362
|
+
label: "Cloud ID (scoped API tokens only)",
|
|
9363
|
+
placeholder: "UUID from your Atlassian cloudId",
|
|
9364
|
+
secret: false,
|
|
9365
|
+
required: false
|
|
9366
|
+
},
|
|
9360
9367
|
{
|
|
9361
9368
|
key: "email",
|
|
9362
9369
|
label: "Account email",
|
|
@@ -227,16 +227,32 @@ async function runConfluenceIndexer(source) {
|
|
|
227
227
|
const auth = (0,auth_registry/* resolvePackageAuth */.pR)("atlassian");
|
|
228
228
|
if ("error" in auth) throw new Error(auth.error);
|
|
229
229
|
const cql = buildCql(source, source.last_cursor);
|
|
230
|
-
let
|
|
230
|
+
let cursor;
|
|
231
|
+
const seenCursors = new Set();
|
|
231
232
|
let highWater = source.last_cursor;
|
|
232
233
|
while(stats.scanned < MAX_PAGES_PER_RUN){
|
|
233
|
-
|
|
234
|
+
if (cursor) {
|
|
235
|
+
if (seenCursors.has(cursor)) break;
|
|
236
|
+
seenCursors.add(cursor);
|
|
237
|
+
}
|
|
238
|
+
const params = new URLSearchParams({
|
|
239
|
+
cql,
|
|
240
|
+
expand: "content.body.storage,content.version,content.history.lastUpdated",
|
|
241
|
+
limit: String(PAGE_LIMIT)
|
|
242
|
+
});
|
|
243
|
+
if (cursor) params.set("cursor", cursor);
|
|
244
|
+
const url = `/wiki/rest/api/search?${params}`;
|
|
234
245
|
const data = await atlassianFetch(auth, url);
|
|
235
246
|
if (data.error) throw new Error(data.error);
|
|
236
247
|
const results = data.results ?? [];
|
|
237
248
|
if (results.length === 0) break;
|
|
238
|
-
for (const
|
|
249
|
+
for (const result of results){
|
|
239
250
|
stats.scanned++;
|
|
251
|
+
const page = result.content;
|
|
252
|
+
if (!page?.id || !page.title) {
|
|
253
|
+
stats.errors++;
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
240
256
|
try {
|
|
241
257
|
const text = `${page.title}\n\n${htmlToText(page.body?.storage?.value ?? "")}`.trim();
|
|
242
258
|
const updatedAt = pageUpdatedAt(page);
|
|
@@ -256,8 +272,16 @@ async function runConfluenceIndexer(source) {
|
|
|
256
272
|
stats.errors++;
|
|
257
273
|
}
|
|
258
274
|
}
|
|
259
|
-
|
|
260
|
-
if (
|
|
275
|
+
const next = data._links?.next;
|
|
276
|
+
if (!next) break;
|
|
277
|
+
let nextCursor = null;
|
|
278
|
+
try {
|
|
279
|
+
nextCursor = new URL(next, auth.url).searchParams.get("cursor");
|
|
280
|
+
} catch {
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
if (!nextCursor || seenCursors.has(nextCursor)) break;
|
|
284
|
+
cursor = nextCursor;
|
|
261
285
|
}
|
|
262
286
|
if (highWater && highWater !== source.last_cursor) {
|
|
263
287
|
(0,document_sources/* updateDocumentSourceCursor */.wC)(source.id, highWater);
|
|
@@ -705,9 +705,30 @@ async function getGoogleAccessToken(auth) {
|
|
|
705
705
|
* @param baseUrl Base for relative `path` (e.g. `https://gmail.googleapis.com/gmail/v1/users/me`).
|
|
706
706
|
* @param path Either a full URL (starts with `http`) or path appended to baseUrl.
|
|
707
707
|
*/ async function googleFetch(auth, service, baseUrl, path, init) {
|
|
708
|
+
let target;
|
|
709
|
+
try {
|
|
710
|
+
target = path.startsWith("http") ? new URL(path) : new URL(`${baseUrl}${path}`);
|
|
711
|
+
} catch {
|
|
712
|
+
return {
|
|
713
|
+
error: `${service} request URL is invalid.`
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
let base;
|
|
717
|
+
try {
|
|
718
|
+
base = new URL(baseUrl);
|
|
719
|
+
} catch {
|
|
720
|
+
return {
|
|
721
|
+
error: `${service} API base URL is invalid.`
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
if (target.origin !== base.origin || target.username || target.password) {
|
|
725
|
+
return {
|
|
726
|
+
error: `${service} requests must target ${base.hostname}; refusing to forward credentials.`
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
const url = target.toString();
|
|
708
730
|
const token = await getGoogleAccessToken(auth);
|
|
709
731
|
if (typeof token !== "string") return token;
|
|
710
|
-
const url = path.startsWith("http") ? path : `${baseUrl}${path}`;
|
|
711
732
|
try {
|
|
712
733
|
const res = await fetch(url, {
|
|
713
734
|
...init,
|
|
@@ -812,6 +833,8 @@ const TENANT = process.env.OUTLOOK_TENANT?.trim() || "common";
|
|
|
812
833
|
// - Mail.ReadWrite → search/read mail, create drafts, mark read,
|
|
813
834
|
// move to folders (incl. DeletedItems).
|
|
814
835
|
// - Mail.Send → send mail when the user explicitly asks for it.
|
|
836
|
+
// - Files.Read.All → Microsoft Search over OneDrive/SharePoint files.
|
|
837
|
+
// - Sites.Read.All → Microsoft Search over SharePoint lists and sites.
|
|
815
838
|
// - Calendars.ReadWrite → list/get/create/update/delete events on the
|
|
816
839
|
// user's existing calendars.
|
|
817
840
|
// - Tasks.ReadWrite → list/get/create/update/complete/delete Microsoft
|
|
@@ -823,6 +846,8 @@ const MICROSOFT_SCOPES = [
|
|
|
823
846
|
"User.Read",
|
|
824
847
|
"Mail.ReadWrite",
|
|
825
848
|
"Mail.Send",
|
|
849
|
+
"Files.Read.All",
|
|
850
|
+
"Sites.Read.All",
|
|
826
851
|
"Calendars.ReadWrite",
|
|
827
852
|
"Tasks.ReadWrite",
|
|
828
853
|
"People.Read"
|
|
@@ -998,7 +1023,7 @@ const SCOPE_HINTS = [
|
|
|
998
1023
|
},
|
|
999
1024
|
{
|
|
1000
1025
|
prefix: "/search/query",
|
|
1001
|
-
scope: "Mail.Read Files.Read.All"
|
|
1026
|
+
scope: "Mail.Read / Calendars.Read for mail and events; Files.Read.All for files; Sites.Read.All for lists and sites"
|
|
1002
1027
|
},
|
|
1003
1028
|
{
|
|
1004
1029
|
prefix: "/me",
|
|
@@ -1036,7 +1061,20 @@ function backoffFor(attempt) {
|
|
|
1036
1061
|
// - 403 Forbidden → surface a scope hint ("reconnect with X") so the
|
|
1037
1062
|
// operator knows what to grant.
|
|
1038
1063
|
async function graphFetch(auth, path, init) {
|
|
1039
|
-
|
|
1064
|
+
let target;
|
|
1065
|
+
try {
|
|
1066
|
+
target = path.startsWith("http") ? new URL(path) : new URL(`https://graph.microsoft.com/v1.0${path}`);
|
|
1067
|
+
} catch {
|
|
1068
|
+
return {
|
|
1069
|
+
error: "Microsoft Graph request URL is invalid."
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
if (target.origin !== "https://graph.microsoft.com" || target.username || target.password) {
|
|
1073
|
+
return {
|
|
1074
|
+
error: "Microsoft Graph requests must target graph.microsoft.com; refusing to forward credentials."
|
|
1075
|
+
};
|
|
1076
|
+
}
|
|
1077
|
+
const url = target.toString();
|
|
1040
1078
|
let attempt = 0;
|
|
1041
1079
|
let triedReauth = false;
|
|
1042
1080
|
while(true){
|
|
@@ -784,8 +784,8 @@ const atlassianManifest = {
|
|
|
784
784
|
},
|
|
785
785
|
{
|
|
786
786
|
check: "credentials",
|
|
787
|
-
detail: "An API token created at id.atlassian.com → Security → API tokens. " + "The token is bound to your account email — you'll provide both.",
|
|
788
|
-
docs_url: "https://
|
|
787
|
+
detail: "An API token created at id.atlassian.com → Security → API tokens. " + "The token is bound to your account email — you'll provide both. For a scoped token, " + "also provide the Atlassian Cloud ID so Jira and Confluence use their product API gateways.",
|
|
788
|
+
docs_url: "https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/"
|
|
789
789
|
}
|
|
790
790
|
],
|
|
791
791
|
steps: [
|
|
@@ -798,7 +798,7 @@ const atlassianManifest = {
|
|
|
798
798
|
{
|
|
799
799
|
id: "save-credentials",
|
|
800
800
|
title: "Save the credentials in Jarela",
|
|
801
|
-
description: "Propose enabling the integration. The user will be asked for the site URL, " + "their account email, and the API token. The token is stored encrypted at rest.",
|
|
801
|
+
description: "Propose enabling the integration. The user will be asked for the site URL, " + "their account email, and the API token. Scoped tokens also need the Cloud ID. " + "The token is stored encrypted at rest.",
|
|
802
802
|
proposes: "enable_integration"
|
|
803
803
|
},
|
|
804
804
|
{
|
|
@@ -836,15 +836,15 @@ const githubManifest = {
|
|
|
836
836
|
},
|
|
837
837
|
{
|
|
838
838
|
check: "credentials",
|
|
839
|
-
detail: "A Personal Access Token (classic or fine-grained) created at github.com/settings/tokens. " + "
|
|
840
|
-
docs_url: "https://github.com/
|
|
839
|
+
detail: "A Personal Access Token (classic or fine-grained) created at github.com/settings/tokens. " + "Classic tokens need `repo` (or `public_repo` for public-only). Fine-grained tokens need " + "Contents: read, Issues: read/write, and Pull requests: read/write on the selected repositories. " + "`read:org` is only needed for organization-specific operations such as team reviewer lookup.",
|
|
840
|
+
docs_url: "https://docs.github.com/en/rest/overview/permissions-required-for-fine-grained-personal-access-tokens"
|
|
841
841
|
}
|
|
842
842
|
],
|
|
843
843
|
steps: [
|
|
844
844
|
{
|
|
845
845
|
id: "create-pat",
|
|
846
846
|
title: "Create a GitHub Personal Access Token",
|
|
847
|
-
description: "Open github.com/settings/tokens → Generate new token. For classic tokens, tick `repo` (or " + "`public_repo` for public repos only)
|
|
847
|
+
description: "Open github.com/settings/tokens → Generate new token. For classic tokens, tick `repo` (or " + "`public_repo` for public repos only); add `read:org` only if you need organization team reviewer " + "lookup. For fine-grained tokens, pick the repos and grant Contents: Read-only, Issues: Read+Write, " + "and Pull requests: Read+Write. Copy the token immediately — GitHub only " + "shows it once.",
|
|
848
848
|
docs_url: "https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens"
|
|
849
849
|
},
|
|
850
850
|
{
|
|
@@ -1131,13 +1131,13 @@ const openaiCodexManifest = {
|
|
|
1131
1131
|
const outlookManifest = {
|
|
1132
1132
|
id: "outlook",
|
|
1133
1133
|
name: "Outlook + Microsoft Calendar + To Do",
|
|
1134
|
-
summary: "Lets the agent search/read mail, create drafts
|
|
1134
|
+
summary: "Lets the agent search/read mail, create drafts, and send mail when explicitly asked, move messages between " + "folders, read or modify Microsoft 365 calendar events, and manage Microsoft To Do " + "task lists and tasks.",
|
|
1135
1135
|
category: "mail",
|
|
1136
1136
|
prerequisites: [
|
|
1137
1137
|
{
|
|
1138
1138
|
check: "oauth_app",
|
|
1139
|
-
detail: "An Azure app registration with delegated Mail.ReadWrite, Calendars.ReadWrite, " + "Tasks.ReadWrite, User.Read, and offline_access permissions.
|
|
1140
|
-
docs_url: "https://
|
|
1139
|
+
detail: "An Azure app registration with delegated Mail.ReadWrite, Mail.Send, Calendars.ReadWrite, " + "Tasks.ReadWrite, People.Read, Files.Read.All, Sites.Read.All, User.Read, and offline_access " + "permissions. Files.Read.All and Sites.Read.All enable Microsoft Search across OneDrive/SharePoint. " + "Mail, calendar, and To Do work with personal and M365 accounts; Microsoft Search requires a " + "work/school account. Both account types are supported via the 'common' tenant.",
|
|
1140
|
+
docs_url: "https://learn.microsoft.com/en-us/graph/api/search-query?view=graph-rest-1.0"
|
|
1141
1141
|
},
|
|
1142
1142
|
{
|
|
1143
1143
|
check: "custom",
|
|
@@ -1159,7 +1159,7 @@ const outlookManifest = {
|
|
|
1159
1159
|
{
|
|
1160
1160
|
id: "grant-scopes",
|
|
1161
1161
|
title: "Grant the required Graph permissions",
|
|
1162
|
-
description: "API permissions → Add a permission → Microsoft Graph → Delegated permissions. " + "Add Mail.ReadWrite, Calendars.ReadWrite, Tasks.ReadWrite, User.Read, offline_access. " + "No admin consent required for personal accounts; M365 tenants may need an admin to consent."
|
|
1162
|
+
description: "API permissions → Add a permission → Microsoft Graph → Delegated permissions. " + "Add Mail.ReadWrite, Mail.Send, Calendars.ReadWrite, Tasks.ReadWrite, People.Read, " + "Files.Read.All, Sites.Read.All, User.Read, offline_access. " + "No admin consent required for personal accounts; M365 tenants may need an admin to consent."
|
|
1163
1163
|
},
|
|
1164
1164
|
{
|
|
1165
1165
|
id: "save-client",
|