@anchrd/colab-sdk 0.1.20 → 0.1.22

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.
@@ -27,7 +27,7 @@ export type CrawlCreateInput = z.infer<typeof CrawlCreateInput>;
27
27
  export declare const CrawlGetInput: z.ZodObject<{
28
28
  crawlId: z.ZodTemplateLiteral<`crawl_${string}`>;
29
29
  query: z.ZodOptional<z.ZodString>;
30
- urls: z.ZodOptional<z.ZodArray<z.ZodString>>;
30
+ urls: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodString>, unknown>>;
31
31
  cursor: z.ZodOptional<z.ZodString>;
32
32
  limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
33
33
  errors: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
@@ -73,12 +73,12 @@ export const CrawlGetInput = z.strictObject({
73
73
  .max(200)
74
74
  .optional()
75
75
  .describe(`Search the crawl's pages instead of listing them: words to find in title and text, at least two characters; each word also finds longer words it begins. Answers the best ${maxCrawlHits} hits, each with one passage. Ask several times with other words instead of reading every page.`),
76
+ // Over REST one value, the addresses separated by spaces (`?urls=a%20b`): a query string carries
77
+ // text, and an address holds commas but never a bare space (#785, measured on colab.anchrd.sh).
76
78
  urls: z
77
- .array(z.string().min(1).max(2000))
78
- .min(1)
79
- .max(maxCrawlReads)
79
+ .preprocess((value) => (typeof value === "string" ? value.split(/\s+/).filter(Boolean) : value), z.array(z.string().min(1).max(2000)).min(1).max(maxCrawlReads))
80
80
  .optional()
81
- .describe(`Read these pages of the crawl whole, as Markdown, 1 to ${maxCrawlReads}, by the address the list or a hit named. Not together with query.`),
81
+ .describe(`Read these pages of the crawl whole, as Markdown, 1 to ${maxCrawlReads}, by the address the list or a hit named; over REST one value with the addresses separated by spaces. Not together with query.`),
82
82
  cursor: z
83
83
  .string()
84
84
  .max(200)
package/dist/sdk.d.ts CHANGED
@@ -40,7 +40,7 @@ export { RuntimeConfig } from "./runtime-config.js";
40
40
  export { rhythms, Schedule, WhileOpen, weekdays, whileOpenModes } from "./schedule/schedule.js";
41
41
  export { NodeSecret, NodeSecretCreateInput, NodeSecretDetail, NodeSecretGetInput, NodeSecretRemoveInput, NodeSecretUpdateInput, NodeUnlocked, NodeUnlockInput, unlockMinutes, } from "./secrets/secrets.js";
42
42
  export { type Authorized, type AuthorizeResult, createServiceClient, type InterfaceDeclaredResult, type InterfaceRemovedResult, type ServiceClient, type ServiceClientDeps, type ServiceClientFailure, } from "./service-client/service-client.js";
43
- export { FunctionId, InterfaceId, RightWord, Service, ServiceArchiveInput, ServiceCreateInput, ServiceFunction, ServiceId, ServiceInterface, ServiceKeyIssued, ServiceList, ServiceListInput, ServiceName, ServicePurged, ServicePurgeInput, ServiceRestoreInput, ServiceRotateInput, ServiceUpdateInput, } from "./services/services.js";
43
+ export { ConsentResource, FunctionId, InterfaceId, RightWord, Service, ServiceArchiveInput, ServiceCreateInput, ServiceFunction, ServiceId, ServiceInterface, ServiceKeyIssued, ServiceList, ServiceListInput, ServiceName, ServicePurged, ServicePurgeInput, ServiceRestoreInput, ServiceRotateInput, ServiceUpdateInput, } from "./services/services.js";
44
44
  export { SignInProviders, Sso, SsoId, SsoList, SsoListInput, SsoRemoveInput, SsoSource, SsoUpdateInput, ssoIds, } from "./sso/sso.js";
45
45
  export { TableColumn, TableColumnChange, TableColumnType, TableCreateInput, TableDetail, TableExcerpt, TableGetInput, TableId, TableSaved, TableUpdateInput, tableColumnTypes, tableFormats, } from "./tables/tables.js";
46
46
  export { type Actor, defineTool, type Permission, type Tool, type ToolAnnotations, type ToolContext, type ToolInput, type ToolSource, } from "./tool.js";
package/dist/sdk.js CHANGED
@@ -43,7 +43,7 @@ export { RuntimeConfig } from "./runtime-config.js";
43
43
  export { rhythms, Schedule, WhileOpen, weekdays, whileOpenModes } from "./schedule/schedule.js";
44
44
  export { NodeSecret, NodeSecretCreateInput, NodeSecretDetail, NodeSecretGetInput, NodeSecretRemoveInput, NodeSecretUpdateInput, NodeUnlocked, NodeUnlockInput, unlockMinutes, } from "./secrets/secrets.js";
45
45
  export { createServiceClient, } from "./service-client/service-client.js";
46
- export { FunctionId, InterfaceId, RightWord, Service, ServiceArchiveInput, ServiceCreateInput, ServiceFunction, ServiceId, ServiceInterface, ServiceKeyIssued, ServiceList, ServiceListInput, ServiceName, ServicePurged, ServicePurgeInput, ServiceRestoreInput, ServiceRotateInput, ServiceUpdateInput, } from "./services/services.js";
46
+ export { ConsentResource, FunctionId, InterfaceId, RightWord, Service, ServiceArchiveInput, ServiceCreateInput, ServiceFunction, ServiceId, ServiceInterface, ServiceKeyIssued, ServiceList, ServiceListInput, ServiceName, ServicePurged, ServicePurgeInput, ServiceRestoreInput, ServiceRotateInput, ServiceUpdateInput, } from "./services/services.js";
47
47
  export { SignInProviders, Sso, SsoId, SsoList, SsoListInput, SsoRemoveInput, SsoSource, SsoUpdateInput, ssoIds, } from "./sso/sso.js";
48
48
  export { TableColumn, TableColumnChange, TableColumnType, TableCreateInput, TableDetail, TableExcerpt, TableGetInput, TableId, TableSaved, TableUpdateInput, tableColumnTypes, tableFormats, } from "./tables/tables.js";
49
49
  export { defineTool, } from "./tool.js";
@@ -120,3 +120,9 @@ export declare const ServicePurged: z.ZodObject<{
120
120
  grants: z.ZodNumber;
121
121
  }, z.core.$strip>;
122
122
  export type ServicePurged = z.infer<typeof ServicePurged>;
123
+ export declare const ConsentResource: z.ZodObject<{
124
+ service: z.ZodNullable<z.ZodObject<{
125
+ name: z.ZodString;
126
+ }, z.core.$strip>>;
127
+ }, z.core.$strip>;
128
+ export type ConsentResource = z.infer<typeof ConsentResource>;
@@ -87,3 +87,9 @@ export const ServicePurged = z.object({
87
87
  name: z.string(),
88
88
  grants: z.number().int(),
89
89
  });
90
+ // The service a consent is asked for (E138, #633): what `GET /auth/oauth2/public-resource` answers
91
+ // the consent page for the `resource` of the authorization request. Null for `/mcp` and for anything
92
+ // that is no service's OAuth resource.
93
+ export const ConsentResource = z.object({
94
+ service: z.object({ name: z.string() }).nullable(),
95
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchrd/colab-sdk",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "Types, Zod schemas and the service client of Colab, the contract between its UI, backends and outside services.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",