@aventurevc/api-schemas 0.8.100 → 0.8.101
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
declare const HarnessRunCreateSchemaDefinition: z.ZodObject<{
|
|
3
3
|
finding: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodType<{
|
|
4
|
-
gateId
|
|
4
|
+
gateId?: string | null | undefined;
|
|
5
5
|
quote: string;
|
|
6
6
|
sourceUrl: string;
|
|
7
7
|
statement: string;
|
|
8
8
|
}, unknown, z.core.$ZodTypeInternals<{
|
|
9
|
-
gateId
|
|
9
|
+
gateId?: string | null | undefined;
|
|
10
10
|
quote: string;
|
|
11
11
|
sourceUrl: string;
|
|
12
12
|
statement: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one method-plus-path matching rule for aVenture API operations. The MCP server resolves an
|
|
3
|
+
* `aventure_*` call that names a method and path with it, and `operation/route` answers the same
|
|
4
|
+
* question for callers that only hold that method and path.
|
|
5
|
+
*
|
|
6
|
+
* @shared primitive:multi route matching for MCP and its consumers; not generated from OpenAPI
|
|
7
|
+
* @contractShape http.route
|
|
8
|
+
* @contractRole canonical
|
|
9
|
+
* @ownerModule http/route.ts
|
|
10
|
+
*/
|
|
11
|
+
/** The path a request names, without its query string or fragment. */
|
|
12
|
+
export declare function pathWithoutQuery(path: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* A concrete request path matches a template when both have the same segment count and each
|
|
15
|
+
* template segment is either the same literal or one `{name}` parameter. A path that still carries
|
|
16
|
+
* a raw or percent-encoded `{name}` segment matches nothing, because it never filled the parameter.
|
|
17
|
+
*/
|
|
18
|
+
export declare function routeTemplateMatches(template: string, path: string): boolean;
|
|
19
|
+
//# sourceMappingURL=route.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Generated alternate api-schemas support copy from TypeScript source api-schemas/http/route.ts
|
|
2
|
+
/**
|
|
3
|
+
* The one method-plus-path matching rule for aVenture API operations. The MCP server resolves an
|
|
4
|
+
* `aventure_*` call that names a method and path with it, and `operation/route` answers the same
|
|
5
|
+
* question for callers that only hold that method and path.
|
|
6
|
+
*
|
|
7
|
+
* @shared primitive:multi route matching for MCP and its consumers; not generated from OpenAPI
|
|
8
|
+
* @contractShape http.route
|
|
9
|
+
* @contractRole canonical
|
|
10
|
+
* @ownerModule http/route.ts
|
|
11
|
+
*/
|
|
12
|
+
/** The path a request names, without its query string or fragment. */
|
|
13
|
+
export function pathWithoutQuery(path) {
|
|
14
|
+
return new URL(path, "https://placeholder.invalid").pathname;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A concrete request path matches a template when both have the same segment count and each
|
|
18
|
+
* template segment is either the same literal or one `{name}` parameter. A path that still carries
|
|
19
|
+
* a raw or percent-encoded `{name}` segment matches nothing, because it never filled the parameter.
|
|
20
|
+
*/
|
|
21
|
+
export function routeTemplateMatches(template, path) {
|
|
22
|
+
const templateParts = template.split("/").filter(Boolean);
|
|
23
|
+
const pathParts = path.split("/").filter(Boolean);
|
|
24
|
+
if (templateParts.length !== pathParts.length)
|
|
25
|
+
return false;
|
|
26
|
+
if (pathParts.some(isUnresolvedTemplateSegment))
|
|
27
|
+
return false;
|
|
28
|
+
return templateParts.every((templatePart, index) => isOpenApiTemplateSegment(templatePart) || templatePart === pathParts[index]);
|
|
29
|
+
}
|
|
30
|
+
function isOpenApiTemplateSegment(pathSegment) {
|
|
31
|
+
const innerSegment = pathSegment.slice(1, -1);
|
|
32
|
+
return (pathSegment.startsWith("{") &&
|
|
33
|
+
pathSegment.endsWith("}") &&
|
|
34
|
+
innerSegment.length > 0 &&
|
|
35
|
+
!innerSegment.includes("/") &&
|
|
36
|
+
!innerSegment.includes("{") &&
|
|
37
|
+
!innerSegment.includes("}"));
|
|
38
|
+
}
|
|
39
|
+
function isUnresolvedTemplateSegment(pathSegment) {
|
|
40
|
+
if (isOpenApiTemplateSegment(pathSegment))
|
|
41
|
+
return true;
|
|
42
|
+
const lowerSegment = pathSegment.toLowerCase();
|
|
43
|
+
const innerSegment = pathSegment.slice(3, -3);
|
|
44
|
+
return (lowerSegment.startsWith("%7b") &&
|
|
45
|
+
lowerSegment.endsWith("%7d") &&
|
|
46
|
+
innerSegment.length > 0 &&
|
|
47
|
+
!innerSegment.includes("/") &&
|
|
48
|
+
!innerSegment.includes("%") &&
|
|
49
|
+
!innerSegment.includes("{") &&
|
|
50
|
+
!innerSegment.includes("}"));
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=route.js.map
|
package/dist/research/finding.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// LLM AGENTS MAY NOT EDIT THIS FILE UNDER ANY CIRCUMSTANCES. DO NOT EDIT - generated from Kotlin data classes via OpenAPI. Edit the backend owner and run: make docs-openapi && make docs-zod
|
|
2
2
|
import { z } from "zod/v4";
|
|
3
3
|
const ResearchFindingSchemaDefinition = z.object({
|
|
4
|
-
/** Completion gate
|
|
5
|
-
gateId: z.string(),
|
|
6
|
-
/** The exact text on sourceUrl that
|
|
4
|
+
/** Completion gate the fact fills, when known; omit it and the run picks the field the fact belongs to. */
|
|
5
|
+
gateId: z.string().nullish(),
|
|
6
|
+
/** The exact text on sourceUrl that states the fact, copied verbatim; a fragment short enough to appear on any page is refused. */
|
|
7
7
|
quote: z.string(),
|
|
8
8
|
/** Absolute http or https URL of the page that supports the fact; aVenture pages are refused. */
|
|
9
9
|
sourceUrl: z.string(),
|