@layervai/qurl-mcp 0.4.1 → 0.6.0
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 +798 -50
- package/assets/fonts/NotoSansSC-Regular.ttf +0 -0
- package/assets/fonts/OFL.txt +93 -0
- package/assets/fonts/README.md +18 -0
- package/dist/auth/request-context.d.ts +13 -0
- package/dist/auth/request-context.d.ts.map +1 -0
- package/dist/auth/request-context.js +21 -0
- package/dist/auth/request-context.js.map +1 -0
- package/dist/auth/static-bearer.d.ts +12 -0
- package/dist/auth/static-bearer.d.ts.map +1 -0
- package/dist/auth/static-bearer.js +47 -0
- package/dist/auth/static-bearer.js.map +1 -0
- package/dist/client.d.ts +66 -11
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +116 -7
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +98 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +543 -0
- package/dist/config.js.map +1 -0
- package/dist/credential-rate-limit-store.d.ts +38 -0
- package/dist/credential-rate-limit-store.d.ts.map +1 -0
- package/dist/credential-rate-limit-store.js +135 -0
- package/dist/credential-rate-limit-store.js.map +1 -0
- package/dist/email-addresses.d.ts +7 -0
- package/dist/email-addresses.d.ts.map +1 -0
- package/dist/email-addresses.js +36 -0
- package/dist/email-addresses.js.map +1 -0
- package/dist/email-types.d.ts +33 -0
- package/dist/email-types.d.ts.map +1 -0
- package/dist/email-types.js +28 -0
- package/dist/email-types.js.map +1 -0
- package/dist/emf-metrics.d.ts +25 -0
- package/dist/emf-metrics.d.ts.map +1 -0
- package/dist/emf-metrics.js +87 -0
- package/dist/emf-metrics.js.map +1 -0
- package/dist/http-config.d.ts +38 -0
- package/dist/http-config.d.ts.map +1 -0
- package/dist/http-config.js +243 -0
- package/dist/http-config.js.map +1 -0
- package/dist/http-routes.d.ts +5 -0
- package/dist/http-routes.d.ts.map +1 -0
- package/dist/http-routes.js +12 -0
- package/dist/http-routes.js.map +1 -0
- package/dist/http.d.ts +33 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +1116 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -26
- package/dist/index.js.map +1 -1
- package/dist/logging.d.ts +7 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js +110 -0
- package/dist/logging.js.map +1 -0
- package/dist/prompts/audit-links.js +1 -1
- package/dist/prompts/audit-links.js.map +1 -1
- package/dist/server.d.ts +14 -4
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +38 -8
- package/dist/server.js.map +1 -1
- package/dist/services/email.d.ts +17 -0
- package/dist/services/email.d.ts.map +1 -0
- package/dist/services/email.js +351 -0
- package/dist/services/email.js.map +1 -0
- package/dist/services/html.d.ts +5 -0
- package/dist/services/html.d.ts.map +1 -0
- package/dist/services/html.js +28 -0
- package/dist/services/html.js.map +1 -0
- package/dist/services/legal-pages.d.ts +12 -0
- package/dist/services/legal-pages.d.ts.map +1 -0
- package/dist/services/legal-pages.js +588 -0
- package/dist/services/legal-pages.js.map +1 -0
- package/dist/services/text-pdf.d.ts +16 -0
- package/dist/services/text-pdf.d.ts.map +1 -0
- package/dist/services/text-pdf.js +141 -0
- package/dist/services/text-pdf.js.map +1 -0
- package/dist/services/video-page.d.ts +4 -0
- package/dist/services/video-page.d.ts.map +1 -0
- package/dist/services/video-page.js +311 -0
- package/dist/services/video-page.js.map +1 -0
- package/dist/text.d.ts +4 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +16 -0
- package/dist/text.js.map +1 -0
- package/dist/tools/_shared.d.ts +10 -1
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/_shared.js +25 -8
- package/dist/tools/_shared.js.map +1 -1
- package/dist/tools/batch-create.d.ts +12 -11
- package/dist/tools/batch-create.d.ts.map +1 -1
- package/dist/tools/batch-create.js +6 -4
- package/dist/tools/batch-create.js.map +1 -1
- package/dist/tools/consumer-access.d.ts +235 -0
- package/dist/tools/consumer-access.d.ts.map +1 -0
- package/dist/tools/consumer-access.js +231 -0
- package/dist/tools/consumer-access.js.map +1 -0
- package/dist/tools/create-qurl.d.ts +43 -4
- package/dist/tools/create-qurl.d.ts.map +1 -1
- package/dist/tools/create-qurl.js +69 -32
- package/dist/tools/create-qurl.js.map +1 -1
- package/dist/tools/delete-qurl.d.ts +3 -2
- package/dist/tools/delete-qurl.d.ts.map +1 -1
- package/dist/tools/delete-qurl.js +9 -13
- package/dist/tools/delete-qurl.js.map +1 -1
- package/dist/tools/duration.d.ts +13 -0
- package/dist/tools/duration.d.ts.map +1 -0
- package/dist/tools/duration.js +71 -0
- package/dist/tools/duration.js.map +1 -0
- package/dist/tools/email-delivery.d.ts +36 -0
- package/dist/tools/email-delivery.d.ts.map +1 -0
- package/dist/tools/email-delivery.js +114 -0
- package/dist/tools/email-delivery.js.map +1 -0
- package/dist/tools/extend-qurl.d.ts +20 -6
- package/dist/tools/extend-qurl.d.ts.map +1 -1
- package/dist/tools/extend-qurl.js +180 -19
- package/dist/tools/extend-qurl.js.map +1 -1
- package/dist/tools/get-qurl.d.ts +13 -5
- package/dist/tools/get-qurl.d.ts.map +1 -1
- package/dist/tools/get-qurl.js +5 -3
- package/dist/tools/get-qurl.js.map +1 -1
- package/dist/tools/list-qurl-sessions.d.ts +5 -4
- package/dist/tools/list-qurl-sessions.d.ts.map +1 -1
- package/dist/tools/list-qurl-sessions.js +2 -2
- package/dist/tools/list-qurl-sessions.js.map +1 -1
- package/dist/tools/list-qurls.d.ts +15 -7
- package/dist/tools/list-qurls.d.ts.map +1 -1
- package/dist/tools/list-qurls.js +9 -7
- package/dist/tools/list-qurls.js.map +1 -1
- package/dist/tools/mint-link.d.ts +39 -3
- package/dist/tools/mint-link.d.ts.map +1 -1
- package/dist/tools/mint-link.js +26 -14
- package/dist/tools/mint-link.js.map +1 -1
- package/dist/tools/output-schemas.d.ts +154 -45
- package/dist/tools/output-schemas.d.ts.map +1 -1
- package/dist/tools/output-schemas.js +106 -30
- package/dist/tools/output-schemas.js.map +1 -1
- package/dist/tools/resolve-qurl.d.ts +4 -3
- package/dist/tools/resolve-qurl.d.ts.map +1 -1
- package/dist/tools/resolve-qurl.js +3 -3
- package/dist/tools/resolve-qurl.js.map +1 -1
- package/dist/tools/revoke-qurl-token.d.ts +3 -2
- package/dist/tools/revoke-qurl-token.d.ts.map +1 -1
- package/dist/tools/revoke-qurl-token.js +2 -2
- package/dist/tools/revoke-qurl-token.js.map +1 -1
- package/dist/tools/share-by-crid.d.ts +50 -0
- package/dist/tools/share-by-crid.d.ts.map +1 -0
- package/dist/tools/share-by-crid.js +114 -0
- package/dist/tools/share-by-crid.js.map +1 -0
- package/dist/tools/terminate-qurl-sessions.d.ts +3 -2
- package/dist/tools/terminate-qurl-sessions.d.ts.map +1 -1
- package/dist/tools/terminate-qurl-sessions.js +7 -3
- package/dist/tools/terminate-qurl-sessions.js.map +1 -1
- package/dist/tools/update-qurl-token.d.ts +5 -4
- package/dist/tools/update-qurl-token.d.ts.map +1 -1
- package/dist/tools/update-qurl-token.js +8 -9
- package/dist/tools/update-qurl-token.js.map +1 -1
- package/dist/tools/update-qurl.d.ts +13 -5
- package/dist/tools/update-qurl.d.ts.map +1 -1
- package/dist/tools/update-qurl.js +10 -11
- package/dist/tools/update-qurl.js.map +1 -1
- package/dist/tools/upload-file-data-qurl.d.ts +138 -0
- package/dist/tools/upload-file-data-qurl.d.ts.map +1 -0
- package/dist/tools/upload-file-data-qurl.js +207 -0
- package/dist/tools/upload-file-data-qurl.js.map +1 -0
- package/dist/tools/upload-file-qurl.d.ts +134 -0
- package/dist/tools/upload-file-qurl.d.ts.map +1 -0
- package/dist/tools/upload-file-qurl.js +174 -0
- package/dist/tools/upload-file-qurl.js.map +1 -0
- package/dist/tools/upload-file-shared.d.ts +53 -0
- package/dist/tools/upload-file-shared.d.ts.map +1 -0
- package/dist/tools/upload-file-shared.js +617 -0
- package/dist/tools/upload-file-shared.js.map +1 -0
- package/dist/tools/upload-mint-options.d.ts +22 -0
- package/dist/tools/upload-mint-options.d.ts.map +1 -0
- package/dist/tools/upload-mint-options.js +47 -0
- package/dist/tools/upload-mint-options.js.map +1 -0
- package/dist/tools/upload-text-qurl.d.ts +112 -0
- package/dist/tools/upload-text-qurl.d.ts.map +1 -0
- package/dist/tools/upload-text-qurl.js +106 -0
- package/dist/tools/upload-text-qurl.js.map +1 -0
- package/package.json +26 -8
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type
|
|
2
|
+
import { type IQURLClient } from "../client.js";
|
|
3
|
+
import { type ToolRuntimeOptions } from "./_shared.js";
|
|
3
4
|
export declare const extendQurlSchema: z.ZodObject<{
|
|
4
5
|
resource_id: z.ZodString;
|
|
5
6
|
extend_by: z.ZodString;
|
|
7
|
+
qurl_id: z.ZodOptional<z.ZodString>;
|
|
6
8
|
}, z.core.$strip>;
|
|
7
|
-
export declare function extendQurlTool(client: IQURLClient): {
|
|
9
|
+
export declare function extendQurlTool(client: IQURLClient, _runtime?: ToolRuntimeOptions): {
|
|
8
10
|
name: string;
|
|
9
11
|
title: string;
|
|
10
12
|
description: string;
|
|
11
13
|
inputSchema: z.ZodObject<{
|
|
12
14
|
resource_id: z.ZodString;
|
|
13
15
|
extend_by: z.ZodString;
|
|
16
|
+
qurl_id: z.ZodOptional<z.ZodString>;
|
|
14
17
|
}, z.core.$strip>;
|
|
15
18
|
outputSchema: z.ZodObject<{
|
|
19
|
+
crid: z.ZodOptional<z.ZodString>;
|
|
20
|
+
private: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
consumer_access: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
mode: z.ZodString;
|
|
23
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
contract_id: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>>;
|
|
16
26
|
resource_id: z.ZodString;
|
|
17
27
|
qurl_site: z.ZodOptional<z.ZodString>;
|
|
18
28
|
target_url: z.ZodOptional<z.ZodString>;
|
|
@@ -56,12 +66,15 @@ export declare function extendQurlTool(client: IQURLClient): {
|
|
|
56
66
|
block_all: z.ZodOptional<z.ZodBoolean>;
|
|
57
67
|
deny_categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
58
68
|
allow_categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
59
|
-
}, z.core.$
|
|
60
|
-
}, z.core.$
|
|
69
|
+
}, z.core.$loose>>;
|
|
70
|
+
}, z.core.$loose>>;
|
|
61
71
|
created_at: z.ZodOptional<z.ZodString>;
|
|
62
72
|
expires_at: z.ZodOptional<z.ZodString>;
|
|
63
|
-
}, z.core.$
|
|
64
|
-
|
|
73
|
+
}, z.core.$loose>>>;
|
|
74
|
+
extended_qurl_id: z.ZodOptional<z.ZodString>;
|
|
75
|
+
extended_link_expires_at: z.ZodOptional<z.ZodString>;
|
|
76
|
+
extend_warning: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$loose>;
|
|
65
78
|
annotations: {
|
|
66
79
|
title: string;
|
|
67
80
|
readOnlyHint: boolean;
|
|
@@ -72,6 +85,7 @@ export declare function extendQurlTool(client: IQURLClient): {
|
|
|
72
85
|
handler: (input: {
|
|
73
86
|
resource_id: string;
|
|
74
87
|
extend_by: string;
|
|
88
|
+
qurl_id?: string | undefined;
|
|
75
89
|
}) => Promise<{
|
|
76
90
|
content: Array<{
|
|
77
91
|
type: "text";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extend-qurl.d.ts","sourceRoot":"","sources":["../../src/tools/extend-qurl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"extend-qurl.d.ts","sourceRoot":"","sources":["../../src/tools/extend-qurl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAG9D,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,cAAc,CAAC;AAGtB,eAAO,MAAM,gBAAgB;;;;iBAY3B,CAAC;AAyHH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,QAAQ,GAAE,kBAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6FjD"}
|
|
@@ -1,22 +1,135 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { QURLAPIError } from "../client.js";
|
|
3
|
+
import { formatErrorForLog } from "../logging.js";
|
|
4
|
+
import { durationSchema, MAX_EXPIRY_MS, MIN_EXPIRY_MS } from "./duration.js";
|
|
5
|
+
import { isQurlDisplayId, qurlDisplayIdSchema, resourceIdSchema, toStructuredContent, withMissingApiKeyHandler, } from "./_shared.js";
|
|
3
6
|
import { extendQurlOutputSchema } from "./output-schemas.js";
|
|
4
7
|
export const extendQurlSchema = z.object({
|
|
5
|
-
resource_id: resourceIdSchema("extend"),
|
|
6
|
-
extend_by:
|
|
8
|
+
resource_id: resourceIdSchema("extend").describe("Resource ID, or a link's q_ display ID; a q_ ID selects that link, and this server reads the resource to find its parent"),
|
|
9
|
+
extend_by: durationSchema(MIN_EXPIRY_MS, MAX_EXPIRY_MS, "1m to 30d").describe('Duration to extend the link by (e.g., "24h", "7d"; 1m to 30d per call)'),
|
|
10
|
+
qurl_id: qurlDisplayIdSchema("extend")
|
|
11
|
+
.optional()
|
|
12
|
+
.describe("The link (q_ display ID) to extend. Required when the resource has more than one active link."),
|
|
7
13
|
});
|
|
8
|
-
|
|
14
|
+
// A link's lifetime is its access token's `expires_at`; the resource's own
|
|
15
|
+
// expiry is a far-future ceiling, so extending the resource never kept a link
|
|
16
|
+
// open longer (qurl-mcp#279). Resolve which link the caller means. The token
|
|
17
|
+
// route needs the parent resource ID, which only a read resolves from a q_ ID.
|
|
18
|
+
// A missing or unrecognized status is a candidate on both the named and the
|
|
19
|
+
// auto-selected path: token status is optional in the API and can drift. Only a
|
|
20
|
+
// known inactive status excludes a link.
|
|
21
|
+
const INACTIVE_LINK_STATUSES = new Set(["consumed", "expired", "revoked"]);
|
|
22
|
+
// qurl-service embeds at most this many links on a resource read
|
|
23
|
+
// (ResourceQurlPreviewLimit), revoked and expired ones included.
|
|
24
|
+
const RESOURCE_LINK_PREVIEW_LIMIT = 100;
|
|
25
|
+
// Whether resource.qurls lists every link. qurl_count counts all retained
|
|
26
|
+
// links, revoked and expired included (OpenAPI Resource.qurl_count), and the
|
|
27
|
+
// preview uses tokenRepo.ListByResourceLimited without a status filter
|
|
28
|
+
// (qurl-service internal/service/qurl_service.go), so a revoked link does not make the list look
|
|
29
|
+
// short; when qurl_count is omitted, only a list under the cap is known whole.
|
|
30
|
+
function linkListComplete(resource) {
|
|
31
|
+
// A list at the cap is never trusted as whole, whatever qurl_count says.
|
|
32
|
+
const listed = resource.qurls?.length ?? 0;
|
|
33
|
+
return (listed < RESOURCE_LINK_PREVIEW_LIMIT &&
|
|
34
|
+
(resource.qurl_count === undefined || resource.qurl_count <= listed));
|
|
35
|
+
}
|
|
36
|
+
async function linkToExtend(client, input) {
|
|
37
|
+
const resourceIsLink = isQurlDisplayId(input.resource_id);
|
|
38
|
+
if (resourceIsLink && input.qurl_id && input.qurl_id !== input.resource_id) {
|
|
39
|
+
return {
|
|
40
|
+
error: `resource_id names link ${input.resource_id} but qurl_id names ${input.qurl_id}; pass one link.`,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
// Always read before updating, even when the link is named: the read checks
|
|
44
|
+
// the link is on this resource and still active, and a missing qurl:read
|
|
45
|
+
// fails here, before the non-idempotent update, not after it.
|
|
46
|
+
let resource;
|
|
47
|
+
try {
|
|
48
|
+
resource = (await client.getQURL(input.resource_id)).data;
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
// The shared wrapper turns a missing key into its own guidance.
|
|
52
|
+
// Only not-found and forbidden are what the guidance below describes; a
|
|
53
|
+
// missing key, rate limits, 5xx, and transport failures keep their metadata.
|
|
54
|
+
if (!(error instanceof QURLAPIError && [403, 404].includes(error.statusCode)))
|
|
55
|
+
throw error;
|
|
56
|
+
return {
|
|
57
|
+
error: `Reading the resource to pick a link failed (HTTP ${error.statusCode}; ` +
|
|
58
|
+
"the resource may not exist, or the API key may lack qurl:read). Nothing was extended.",
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const named = resourceIsLink ? input.resource_id : input.qurl_id;
|
|
62
|
+
const complete = linkListComplete(resource);
|
|
63
|
+
if (named) {
|
|
64
|
+
const link = resource.qurls?.find((candidate) => candidate.qurl_id === named);
|
|
65
|
+
// Only a complete list proves absence; past the preview cap the token
|
|
66
|
+
// route decides, and the handler rereads since there is nothing to splice.
|
|
67
|
+
if (resource.qurls && !link && complete) {
|
|
68
|
+
return { error: `Link ${named} is not listed on resource ${resource.resource_id}.` };
|
|
69
|
+
}
|
|
70
|
+
const status = link?.status;
|
|
71
|
+
if (status && INACTIVE_LINK_STATUSES.has(status)) {
|
|
72
|
+
return {
|
|
73
|
+
error: `Link ${named} is ${status}, so it cannot be extended. Use mint_link to issue a new one.`,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
// A read without the link list cannot be spliced; the handler rereads.
|
|
77
|
+
return {
|
|
78
|
+
resourceId: resource.resource_id,
|
|
79
|
+
qurlId: named,
|
|
80
|
+
...(link ? { resource } : {}),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
if (!resource.qurls) {
|
|
84
|
+
return {
|
|
85
|
+
error: resource.qurl_count === 0
|
|
86
|
+
? "This resource has no link to extend. Use mint_link to issue one."
|
|
87
|
+
: "The resource read did not include its links; pass qurl_id to choose one.",
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
if (!complete) {
|
|
91
|
+
return {
|
|
92
|
+
error: `This resource's read may not list all of its links (it lists ${resource.qurls.length}, at most ${RESOURCE_LINK_PREVIEW_LIMIT}; ${resource.qurl_count ?? "unknown"} in total), so this server cannot tell which is the only active one; pass qurl_id to choose.`,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const active = resource.qurls.filter((link) => link.qurl_id && !INACTIVE_LINK_STATUSES.has(link.status));
|
|
96
|
+
if (active.length === 1) {
|
|
97
|
+
return { resourceId: resource.resource_id, qurlId: active[0].qurl_id, resource };
|
|
98
|
+
}
|
|
99
|
+
if (active.length === 0) {
|
|
100
|
+
return {
|
|
101
|
+
error: resource.qurls.length === 0
|
|
102
|
+
? resource.qurl_count === 0
|
|
103
|
+
? "This resource has no link to extend. Use mint_link to issue one."
|
|
104
|
+
: "The resource read lists no links; pass qurl_id if it has one, or use mint_link to issue one."
|
|
105
|
+
: "No link on this resource can be extended (all are consumed, expired, or revoked). Use mint_link to issue a new one.",
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
const shown = active.slice(0, 10).map((link) => link.qurl_id);
|
|
109
|
+
const more = active.length > shown.length ? ` and ${active.length - shown.length} more` : "";
|
|
110
|
+
return {
|
|
111
|
+
error: `This resource has ${active.length} active links (${shown.join(", ")}${more}); pass qurl_id to choose which one to extend.`,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
const errorResult = (text) => ({
|
|
115
|
+
isError: true,
|
|
116
|
+
content: [{ type: "text", text }],
|
|
117
|
+
});
|
|
118
|
+
export function extendQurlTool(client, _runtime = { mode: "stdio" }) {
|
|
9
119
|
return {
|
|
10
120
|
name: "extend_qurl",
|
|
11
121
|
title: "Extend qURL Expiration",
|
|
12
|
-
description: "
|
|
13
|
-
"
|
|
122
|
+
description: "Keep a qURL link open longer by pushing out the link's expiration by a relative duration. " +
|
|
123
|
+
"Pass a link's `q_` display ID as `resource_id`, or a resource ID plus `qurl_id`; a resource with exactly one active link needs no `qurl_id` (unless it has more than the 100 links a read lists). " +
|
|
14
124
|
"Use this when the only change you need is more time on the clock. " +
|
|
15
|
-
"Use `
|
|
16
|
-
"Use `delete_qurl` when you want to cut off access
|
|
17
|
-
"
|
|
18
|
-
"**Not idempotent:** calling twice with the same `extend_by` extends the
|
|
19
|
-
"
|
|
125
|
+
"Use `update_qurl_token` instead to set an absolute `expires_at` or change the link's label, policy, or sessions. " +
|
|
126
|
+
"Use `revoke_qurl_token` or `delete_qurl` when you want to cut off access. " +
|
|
127
|
+
"Links minted by the upload tools belong to the file connector and cannot be extended from this server. " +
|
|
128
|
+
"**Not idempotent:** calling twice with the same `extend_by` extends the link twice; use `update_qurl_token` with `expires_at` when retries must not double-push. " +
|
|
129
|
+
"Requires `qurl:write` and `qurl:read`: it reads the resource before updating, to check the link and to return it, so each extend costs two API calls (three when the read does not list the link). " +
|
|
130
|
+
"A link cannot outlive its resource: if the resource's own `expires_at` is sooner, raise it with `update_qurl` first; the result then carries `extend_warning`. " +
|
|
131
|
+
"Link-selection problems return an error result; a rejected update throws with its HTTP status and error code. " +
|
|
132
|
+
"Returns the resource (same shape as `get_qurl`); the extended link's new expiry is in `extended_link_expires_at` (and `qurls[].expires_at`), not the resource's own `expires_at`.",
|
|
20
133
|
inputSchema: extendQurlSchema,
|
|
21
134
|
outputSchema: extendQurlOutputSchema,
|
|
22
135
|
annotations: {
|
|
@@ -27,17 +140,65 @@ export function extendQurlTool(client) {
|
|
|
27
140
|
openWorldHint: true,
|
|
28
141
|
},
|
|
29
142
|
handler: withMissingApiKeyHandler(async (input) => {
|
|
30
|
-
const
|
|
143
|
+
const target = await linkToExtend(client, input);
|
|
144
|
+
if ("error" in target)
|
|
145
|
+
return errorResult(target.error);
|
|
146
|
+
const { resourceId, qurlId } = target;
|
|
147
|
+
const token = await client.updateQurlToken(resourceId, qurlId, {
|
|
31
148
|
extend_by: input.extend_by,
|
|
32
149
|
});
|
|
150
|
+
// A token update leaves resource fields alone, so a resource already read
|
|
151
|
+
// to pick the link only needs the updated link merged in (a merge, so a
|
|
152
|
+
// sparser update response cannot drop fields the read had). Only a read
|
|
153
|
+
// that omitted the link list is repeated after the update.
|
|
154
|
+
let resource = target.resource;
|
|
155
|
+
if (resource) {
|
|
156
|
+
resource = {
|
|
157
|
+
...resource,
|
|
158
|
+
qurls: resource.qurls?.map((link) => link.qurl_id === qurlId
|
|
159
|
+
? // Without a new expiry in the response, do not keep showing the old one.
|
|
160
|
+
{
|
|
161
|
+
...link,
|
|
162
|
+
...token.data,
|
|
163
|
+
...(token.data.expires_at ? {} : { expires_at: undefined }),
|
|
164
|
+
}
|
|
165
|
+
: link),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
try {
|
|
170
|
+
resource = (await client.getQURL(resourceId)).data;
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
// The extension already happened; a retry would push the link out twice.
|
|
174
|
+
// isError is deliberate: the declared output is the resource shape, which
|
|
175
|
+
// this path cannot produce, and a success without it would fail hosts that
|
|
176
|
+
// validate structuredContent. The text carries the new expiry.
|
|
177
|
+
console.error(`extend_qurl extended ${qurlId} but reading the resource failed (${formatErrorForLog(error)})`);
|
|
178
|
+
return errorResult(`Link ${qurlId} was extended; it now expires at ${token.data.expires_at ?? "the new time"}. ` +
|
|
179
|
+
"Do not retry. Reading the updated resource failed (the API key may lack qurl:read).");
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
// A link cannot outlive its resource. Warn when the link now ends at or past
|
|
183
|
+
// the resource's expiry: stored past it, or clamped to it on write.
|
|
184
|
+
const linkExpiry = Date.parse(token.data.expires_at ?? "");
|
|
185
|
+
const ceiling = Date.parse(resource.expires_at ?? "");
|
|
186
|
+
// The change is on the link, so name it at the top level; the resource's
|
|
187
|
+
// own expires_at is the ceiling, not the new expiry.
|
|
188
|
+
const extended = {
|
|
189
|
+
...resource,
|
|
190
|
+
extended_qurl_id: qurlId,
|
|
191
|
+
...(token.data.expires_at ? { extended_link_expires_at: token.data.expires_at } : {}),
|
|
192
|
+
};
|
|
193
|
+
const data = Number.isFinite(ceiling) && linkExpiry >= ceiling
|
|
194
|
+
? {
|
|
195
|
+
...extended,
|
|
196
|
+
extend_warning: `Link ${qurlId} expires at ${token.data.expires_at}, but its resource closes at ${resource.expires_at}, so it stops working then; raise the resource with update_qurl (extend_by up to 30d, or expires_at for further out).`,
|
|
197
|
+
}
|
|
198
|
+
: extended;
|
|
33
199
|
return {
|
|
34
|
-
content: [
|
|
35
|
-
|
|
36
|
-
type: "text",
|
|
37
|
-
text: JSON.stringify(result.data),
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
structuredContent: toStructuredContent(result.data),
|
|
200
|
+
content: [{ type: "text", text: JSON.stringify(data) }],
|
|
201
|
+
structuredContent: toStructuredContent(data),
|
|
41
202
|
};
|
|
42
203
|
}),
|
|
43
204
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extend-qurl.js","sourceRoot":"","sources":["../../src/tools/extend-qurl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"extend-qurl.js","sourceRoot":"","sources":["../../src/tools/extend-qurl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAoB,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,GAEzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,CAAC,MAAM,gBAAgB,GAA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C"}
|
package/dist/tools/get-qurl.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { IQURLClient } from "../client.js";
|
|
3
|
+
import { type ToolRuntimeOptions } from "./_shared.js";
|
|
3
4
|
export declare const getQurlSchema: z.ZodObject<{
|
|
4
5
|
resource_id: z.ZodString;
|
|
5
6
|
}, z.core.$strip>;
|
|
6
|
-
export declare function getQurlTool(client: IQURLClient): {
|
|
7
|
+
export declare function getQurlTool(client: IQURLClient, _runtime?: ToolRuntimeOptions): {
|
|
7
8
|
name: string;
|
|
8
9
|
title: string;
|
|
9
10
|
description: string;
|
|
@@ -11,6 +12,13 @@ export declare function getQurlTool(client: IQURLClient): {
|
|
|
11
12
|
resource_id: z.ZodString;
|
|
12
13
|
}, z.core.$strip>;
|
|
13
14
|
outputSchema: z.ZodObject<{
|
|
15
|
+
crid: z.ZodOptional<z.ZodString>;
|
|
16
|
+
private: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
consumer_access: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
mode: z.ZodString;
|
|
19
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
contract_id: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
14
22
|
resource_id: z.ZodString;
|
|
15
23
|
qurl_site: z.ZodOptional<z.ZodString>;
|
|
16
24
|
target_url: z.ZodOptional<z.ZodString>;
|
|
@@ -54,12 +62,12 @@ export declare function getQurlTool(client: IQURLClient): {
|
|
|
54
62
|
block_all: z.ZodOptional<z.ZodBoolean>;
|
|
55
63
|
deny_categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
64
|
allow_categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
57
|
-
}, z.core.$
|
|
58
|
-
}, z.core.$
|
|
65
|
+
}, z.core.$loose>>;
|
|
66
|
+
}, z.core.$loose>>;
|
|
59
67
|
created_at: z.ZodOptional<z.ZodString>;
|
|
60
68
|
expires_at: z.ZodOptional<z.ZodString>;
|
|
61
|
-
}, z.core.$
|
|
62
|
-
}, z.core.$
|
|
69
|
+
}, z.core.$loose>>>;
|
|
70
|
+
}, z.core.$loose>;
|
|
63
71
|
annotations: {
|
|
64
72
|
title: string;
|
|
65
73
|
readOnlyHint: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-qurl.d.ts","sourceRoot":"","sources":["../../src/tools/get-qurl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"get-qurl.d.ts","sourceRoot":"","sources":["../../src/tools/get-qurl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,cAAc,CAAC;AAGtB,eAAO,MAAM,aAAa;;iBAExB,CAAC;AAEH,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,GAAE,kBAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmChG"}
|
package/dist/tools/get-qurl.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { resourceIdSchema, toStructuredContent, withMissingApiKeyHandler } from "./_shared.js";
|
|
2
|
+
import { resourceIdSchema, toStructuredContent, withMissingApiKeyHandler, } from "./_shared.js";
|
|
3
3
|
import { getQurlOutputSchema } from "./output-schemas.js";
|
|
4
4
|
export const getQurlSchema = z.object({
|
|
5
5
|
resource_id: resourceIdSchema("fetch"),
|
|
6
6
|
});
|
|
7
|
-
export function getQurlTool(client) {
|
|
7
|
+
export function getQurlTool(client, _runtime = { mode: "stdio" }) {
|
|
8
8
|
return {
|
|
9
9
|
name: "get_qurl",
|
|
10
10
|
title: "Get qURL",
|
|
11
11
|
description: "Fetch a single qURL resource by ID and return its current state plus a bounded preview of access tokens. " +
|
|
12
|
-
"Use this when you have a specific resource ID (r_
|
|
12
|
+
"Use this when you have a specific resource ID (public key, CRID, or legacy r_ ID) or qURL display ID (q_ prefix) — q_ IDs are auto-resolved to their parent resource. " +
|
|
13
|
+
"Do not use this to create a new qURL for a freshly uploaded image, PDF, screenshot, or file attachment. For chat-uploaded file content in HTTP MCP mode, use `upload_file_data_qurl` instead. " +
|
|
13
14
|
"Use `list_qurls` instead when you need to discover qURLs by status, date range, or search query. " +
|
|
14
15
|
"Use `resolve_qurl` instead when you have an end-user access token (at_ prefix) and need to redeem it for the underlying URL. " +
|
|
16
|
+
"If the user asks for 'the qURL of this image/file', this tool is only correct when you already know the existing `resource_id` or `qurl_id`. " +
|
|
15
17
|
"`qurls[]` is an unordered preview capped by the API at 100 rows and may be omitted on list views, preview lookup failure, or redacted connector-owned resources; use `qurl_count` to detect that more token rows may exist. " +
|
|
16
18
|
"The one-shot `qurl_link` from creation is never returned here.",
|
|
17
19
|
inputSchema: getQurlSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-qurl.js","sourceRoot":"","sources":["../../src/tools/get-qurl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,
|
|
1
|
+
{"version":3,"file":"get-qurl.js","sourceRoot":"","sources":["../../src/tools/get-qurl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,GAEzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,WAAW,EAAE,gBAAgB,CAAC,OAAO,CAAC;CACvC,CAAC,CAAC;AAEH,MAAM,UAAU,WAAW,CAAC,MAAmB,EAAE,WAA+B,EAAE,IAAI,EAAE,OAAO,EAAE;IAC/F,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,2GAA2G;YAC3G,wKAAwK;YACxK,gMAAgM;YAChM,mGAAmG;YACnG,+HAA+H;YAC/H,+IAA+I;YAC/I,8NAA8N;YAC9N,gEAAgE;QAClE,WAAW,EAAE,aAAa;QAC1B,YAAY,EAAE,mBAAmB;QACjC,WAAW,EAAE;YACX,KAAK,EAAE,UAAU;YACjB,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,OAAO,EAAE,wBAAwB,CAAC,KAAK,EAAE,KAAoC,EAAE,EAAE;YAC/E,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YACvD,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC;qBAClC;iBACF;gBACD,iBAAiB,EAAE,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC;aACpD,CAAC;QACJ,CAAC,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { IQURLClient } from "../client.js";
|
|
3
|
+
import { type ToolRuntimeOptions } from "./_shared.js";
|
|
3
4
|
export declare const listQurlSessionsSchema: z.ZodObject<{
|
|
4
5
|
resource_id: z.ZodString;
|
|
5
6
|
}, z.core.$strip>;
|
|
6
|
-
export declare function listQurlSessionsTool(client: IQURLClient): {
|
|
7
|
+
export declare function listQurlSessionsTool(client: IQURLClient, _runtime?: ToolRuntimeOptions): {
|
|
7
8
|
name: string;
|
|
8
9
|
title: string;
|
|
9
10
|
description: string;
|
|
@@ -18,11 +19,11 @@ export declare function listQurlSessionsTool(client: IQURLClient): {
|
|
|
18
19
|
user_agent: z.ZodOptional<z.ZodString>;
|
|
19
20
|
created_at: z.ZodOptional<z.ZodString>;
|
|
20
21
|
last_seen_at: z.ZodOptional<z.ZodString>;
|
|
21
|
-
}, z.core.$
|
|
22
|
+
}, z.core.$loose>>;
|
|
22
23
|
meta: z.ZodOptional<z.ZodObject<{
|
|
23
24
|
request_id: z.ZodOptional<z.ZodString>;
|
|
24
|
-
}, z.core.$
|
|
25
|
-
}, z.core.$
|
|
25
|
+
}, z.core.$loose>>;
|
|
26
|
+
}, z.core.$loose>;
|
|
26
27
|
annotations: {
|
|
27
28
|
title: string;
|
|
28
29
|
readOnlyHint: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-qurl-sessions.d.ts","sourceRoot":"","sources":["../../src/tools/list-qurl-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"list-qurl-sessions.d.ts","sourceRoot":"","sources":["../../src/tools/list-qurl-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,cAAc,CAAC;AAGtB,eAAO,MAAM,sBAAsB;;iBAEjC,CAAC;AAEH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,WAAW,EACnB,QAAQ,GAAE,kBAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BjD"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { resourceOnlyIdSchema, toStructuredContent, withMissingApiKeyHandler } from "./_shared.js";
|
|
2
|
+
import { resourceOnlyIdSchema, toStructuredContent, withMissingApiKeyHandler, } from "./_shared.js";
|
|
3
3
|
import { listQurlSessionsOutputSchema } from "./output-schemas.js";
|
|
4
4
|
export const listQurlSessionsSchema = z.object({
|
|
5
5
|
resource_id: resourceOnlyIdSchema("list active sessions for"),
|
|
6
6
|
});
|
|
7
|
-
export function listQurlSessionsTool(client) {
|
|
7
|
+
export function listQurlSessionsTool(client, _runtime = { mode: "stdio" }) {
|
|
8
8
|
return {
|
|
9
9
|
name: "list_qurl_sessions",
|
|
10
10
|
title: "List qURL Sessions",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-qurl-sessions.js","sourceRoot":"","sources":["../../src/tools/list-qurl-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,
|
|
1
|
+
{"version":3,"file":"list-qurl-sessions.js","sourceRoot":"","sources":["../../src/tools/list-qurl-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,GAEzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAEnE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,WAAW,EAAE,oBAAoB,CAAC,0BAA0B,CAAC;CAC9D,CAAC,CAAC;AAEH,MAAM,UAAU,oBAAoB,CAClC,MAAmB,EACnB,WAA+B,EAAE,IAAI,EAAE,OAAO,EAAE;IAEhD,OAAO;QACL,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,mDAAmD;YACnD,wGAAwG;YACxG,gKAAgK;YAChK,mGAAmG;QACrG,WAAW,EAAE,sBAAsB;QACnC,YAAY,EAAE,4BAA4B;QAC1C,WAAW,EAAE;YACX,KAAK,EAAE,oBAAoB;YAC3B,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,OAAO,EAAE,wBAAwB,CAAC,KAAK,EAAE,KAA6C,EAAE,EAAE;YACxF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YACpE,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClE,iBAAiB,EAAE,mBAAmB,CAAC,MAAM,CAAC;aAC/C,CAAC;QACJ,CAAC,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { IQURLClient } from "../client.js";
|
|
3
|
+
import { type ToolRuntimeOptions } from "./_shared.js";
|
|
3
4
|
export declare const listQurlsSchema: z.ZodObject<{
|
|
4
5
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
5
6
|
cursor: z.ZodOptional<z.ZodString>;
|
|
@@ -11,7 +12,7 @@ export declare const listQurlsSchema: z.ZodObject<{
|
|
|
11
12
|
sort: z.ZodOptional<z.ZodString>;
|
|
12
13
|
q: z.ZodOptional<z.ZodString>;
|
|
13
14
|
}, z.core.$strip>;
|
|
14
|
-
export declare function listQurlsTool(client: IQURLClient): {
|
|
15
|
+
export declare function listQurlsTool(client: IQURLClient, _runtime?: ToolRuntimeOptions): {
|
|
15
16
|
name: string;
|
|
16
17
|
title: string;
|
|
17
18
|
description: string;
|
|
@@ -28,6 +29,13 @@ export declare function listQurlsTool(client: IQURLClient): {
|
|
|
28
29
|
}, z.core.$strip>;
|
|
29
30
|
outputSchema: z.ZodObject<{
|
|
30
31
|
data: z.ZodArray<z.ZodObject<{
|
|
32
|
+
crid: z.ZodOptional<z.ZodString>;
|
|
33
|
+
private: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
consumer_access: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
mode: z.ZodString;
|
|
36
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
contract_id: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>>;
|
|
31
39
|
resource_id: z.ZodString;
|
|
32
40
|
qurl_site: z.ZodOptional<z.ZodString>;
|
|
33
41
|
target_url: z.ZodOptional<z.ZodString>;
|
|
@@ -71,19 +79,19 @@ export declare function listQurlsTool(client: IQURLClient): {
|
|
|
71
79
|
block_all: z.ZodOptional<z.ZodBoolean>;
|
|
72
80
|
deny_categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
81
|
allow_categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
74
|
-
}, z.core.$
|
|
75
|
-
}, z.core.$
|
|
82
|
+
}, z.core.$loose>>;
|
|
83
|
+
}, z.core.$loose>>;
|
|
76
84
|
created_at: z.ZodOptional<z.ZodString>;
|
|
77
85
|
expires_at: z.ZodOptional<z.ZodString>;
|
|
78
|
-
}, z.core.$
|
|
79
|
-
}, z.core.$
|
|
86
|
+
}, z.core.$loose>>>;
|
|
87
|
+
}, z.core.$loose>>;
|
|
80
88
|
meta: z.ZodObject<{
|
|
81
89
|
next_cursor: z.ZodOptional<z.ZodString>;
|
|
82
90
|
has_more: z.ZodBoolean;
|
|
83
91
|
page_size: z.ZodOptional<z.ZodNumber>;
|
|
84
92
|
request_id: z.ZodOptional<z.ZodString>;
|
|
85
|
-
}, z.core.$
|
|
86
|
-
}, z.core.$
|
|
93
|
+
}, z.core.$loose>;
|
|
94
|
+
}, z.core.$loose>;
|
|
87
95
|
annotations: {
|
|
88
96
|
title: string;
|
|
89
97
|
readOnlyHint: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-qurls.d.ts","sourceRoot":"","sources":["../../src/tools/list-qurls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"list-qurls.d.ts","sourceRoot":"","sources":["../../src/tools/list-qurls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,cAAc,CAAC;AAGtB,eAAO,MAAM,eAAe;;;;;;;;;;iBAoD1B,CAAC;AAEH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,WAAW,EACnB,QAAQ,GAAE,kBAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDjD"}
|
package/dist/tools/list-qurls.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { toStructuredContent, withMissingApiKeyHandler } from "./_shared.js";
|
|
2
|
+
import { toStructuredContent, withMissingApiKeyHandler, } from "./_shared.js";
|
|
3
3
|
import { listQurlsOutputSchema } from "./output-schemas.js";
|
|
4
4
|
export const listQurlsSchema = z.object({
|
|
5
5
|
limit: z
|
|
@@ -16,25 +16,26 @@ export const listQurlsSchema = z.object({
|
|
|
16
16
|
.min(1)
|
|
17
17
|
.optional()
|
|
18
18
|
.describe("Filter by status (comma-separated, e.g. 'active,revoked'). " +
|
|
19
|
-
"Defaults to 'active' when omitted; pass 'revoked' or 'active,revoked' to override."
|
|
19
|
+
"Defaults to 'active' when omitted; pass 'revoked' or 'active,revoked' to override. " +
|
|
20
|
+
"Only active and revoked are valid resource filters; expired is not accepted."),
|
|
20
21
|
created_after: z
|
|
21
22
|
.string()
|
|
22
|
-
.datetime()
|
|
23
|
+
.datetime({ offset: true })
|
|
23
24
|
.optional()
|
|
24
25
|
.describe("Filter: created after this date (RFC 3339)"),
|
|
25
26
|
created_before: z
|
|
26
27
|
.string()
|
|
27
|
-
.datetime()
|
|
28
|
+
.datetime({ offset: true })
|
|
28
29
|
.optional()
|
|
29
30
|
.describe("Filter: created before this date (RFC 3339)"),
|
|
30
31
|
expires_before: z
|
|
31
32
|
.string()
|
|
32
|
-
.datetime()
|
|
33
|
+
.datetime({ offset: true })
|
|
33
34
|
.optional()
|
|
34
35
|
.describe("Filter: expires before this date (RFC 3339)"),
|
|
35
36
|
expires_after: z
|
|
36
37
|
.string()
|
|
37
|
-
.datetime()
|
|
38
|
+
.datetime({ offset: true })
|
|
38
39
|
.optional()
|
|
39
40
|
.describe("Filter: expires after this date (RFC 3339)"),
|
|
40
41
|
sort: z
|
|
@@ -46,7 +47,7 @@ export const listQurlsSchema = z.object({
|
|
|
46
47
|
"Example: 'created_at:desc'."),
|
|
47
48
|
q: z.string().min(1).optional().describe("Search query (searches description and target_url)"),
|
|
48
49
|
});
|
|
49
|
-
export function listQurlsTool(client) {
|
|
50
|
+
export function listQurlsTool(client, _runtime = { mode: "stdio" }) {
|
|
50
51
|
return {
|
|
51
52
|
name: "list_qurls",
|
|
52
53
|
title: "List qURLs",
|
|
@@ -65,6 +66,7 @@ export function listQurlsTool(client) {
|
|
|
65
66
|
// drops the epistemics caveat (overhedging invites defensive
|
|
66
67
|
// over-specification) and pinning is tracked separately.
|
|
67
68
|
"By default only `active` qURLs are returned; pass `status: 'revoked'` to see only revoked qURLs or `'active,revoked'` to see both. " +
|
|
69
|
+
"A past resource expires_at does not change its status; individual access tokens can expire. `status: 'expired'` is not a valid resource filter. " +
|
|
68
70
|
"Sort defaults to `created_at:desc`; override with `sort: 'expires_at:asc'` etc. " +
|
|
69
71
|
"**Returns:** `{ data: QURL[], meta: { has_more: boolean, next_cursor?: string, page_size?: number, request_id?: string } }` — each `data[]` item is the same stable resource shape returned by `get_qurl` minus per-token detail. " +
|
|
70
72
|
'Example: `list_qurls({ status: "active", sort: "expires_at:asc", limit: 10 })` returns the 10 active qURLs expiring soonest.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-qurls.js","sourceRoot":"","sources":["../../src/tools/list-qurls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,
|
|
1
|
+
{"version":3,"file":"list-qurls.js","sourceRoot":"","sources":["../../src/tools/list-qurls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,GAEzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,iDAAiD,CAAC;IAC9D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;IACpF,iGAAiG;IACjG,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CACP,6DAA6D;QAC3D,qFAAqF;QACrF,8EAA8E,CACjF;IACH,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,QAAQ,CAAC,EAAE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