diff --git a/typespec/agents/models.tsp b/typespec/agents/models.tsp index 1f9f7a109..c78a92965 100644 --- a/typespec/agents/models.tsp +++ b/typespec/agents/models.tsp @@ -35,7 +35,7 @@ model Agent { "model": string = ""; /** Instructions for the agent */ - instructions: string | string[] = #[]; + instructions: string | string[] = []; /** Default settings for all sessions created by this agent */ default_settings?: Record; diff --git a/typespec/chat/models.tsp b/typespec/chat/models.tsp index 66fe4bcaf..0fa677d17 100644 --- a/typespec/chat/models.tsp +++ b/typespec/chat/models.tsp @@ -69,7 +69,7 @@ model CommonChatSettings { /** Up to 4 sequences where the API will stop generating further tokens. */ @maxItems(4) - stop: string[] = #[]; + stop: string[] = []; /** If specified, the system will make a best effort to sample deterministically for that particular seed value */ @minValue(-1) @@ -234,11 +234,11 @@ model BaseChatResponse { /** Background job IDs that may have been spawned from this interaction. */ @visibility("read") - jobs: uuid[] = #[]; + jobs: uuid[] = []; /** Documents referenced for this request (for citation purposes). */ @visibility("read") - docs: DocReference[] = #[]; + docs: DocReference[] = []; ...HasCreatedAt; ...HasId; @@ -263,5 +263,5 @@ alias ChatResponse = ChunkChatResponse | MessageChatResponse; model RenderResponse extends ChatInputData { /** Documents referenced for this request (for citation purposes). */ @visibility("read") - docs: DocReference[] = #[]; + docs: DocReference[] = []; } diff --git a/typespec/common/mixins.tsp b/typespec/common/mixins.tsp index 5d74cad1e..aa4300255 100644 --- a/typespec/common/mixins.tsp +++ b/typespec/common/mixins.tsp @@ -55,5 +55,5 @@ model HasMetadata { model HasJobs { /** IDs (if any) of jobs created as part of this request */ @visibility("read") - jobs: uuid[] = #[]; + jobs: uuid[] = []; } \ No newline at end of file diff --git a/typespec/common/types.tsp b/typespec/common/types.tsp index 59209f1e1..616892b7b 100644 --- a/typespec/common/types.tsp +++ b/typespec/common/types.tsp @@ -45,7 +45,7 @@ model PaginationOptions { @query direction: sortDirection = "asc", /** Object to filter results by metadata */ - @query metadata_filter: Record = #{}, + @query metadata_filter: Record = {}, } @events diff --git a/typespec/docs/models.tsp b/typespec/docs/models.tsp index 3aaa4f57e..0188dce06 100644 --- a/typespec/docs/models.tsp +++ b/typespec/docs/models.tsp @@ -115,7 +115,7 @@ model BaseDocSearchRequest { lang: string = "en-US"; /** Metadata filter to apply to the search */ - metadata_filter: MetadataFilter = #{}; + metadata_filter: MetadataFilter = {}; } model VectorDocSearchRequest extends BaseDocSearchRequest { @@ -192,7 +192,7 @@ model DocSearchResponse { model BulkDeleteDocsRequest { /** Metadata filter to apply to the search */ - metadata_filter: MetadataFilter = #{}; + metadata_filter: MetadataFilter = {}; /** Delete all docs */ delete_all: boolean = false; diff --git a/typespec/entries/models.tsp b/typespec/entries/models.tsp index 597d9b189..7a886f49f 100644 --- a/typespec/entries/models.tsp +++ b/typespec/entries/models.tsp @@ -86,7 +86,7 @@ model ChatMLMessage { continue?: boolean; /** Tool calls generated by the model. */ - tool_calls?: ChosenToolCall[] | null = #[]; + tool_calls?: ChosenToolCall[] | null = []; ...HasCreatedAtOptional; ...HasIdOptional; diff --git a/typespec/package.json b/typespec/package.json index 659c64162..c08f114c9 100644 --- a/typespec/package.json +++ b/typespec/package.json @@ -3,14 +3,14 @@ "version": "0.4.0", "type": "module", "dependencies": { - "@typespec/compiler": "0.61.x", - "@typespec/events": "0.61.x", - "@typespec/http": "0.61.x", - "@typespec/openapi": "0.61.x", - "@typespec/openapi3": "0.61.x", - "@typespec/rest": "0.61.x", - "@typespec/sse": "0.61.x", - "@typespec/versioning": "0.61.x", + "@typespec/compiler": "^1.0.0", + "@typespec/events": "^1.0.0", + "@typespec/http": "^1.0.1", + "@typespec/openapi": "^1.0.0", + "@typespec/openapi3": "^1.0.0", + "@typespec/rest": "^1.0.0", + "@typespec/sse": "^1.0.0", + "@typespec/versioning": "^1.0.0", "typespec-compiler-new": "npm:@typespec/compiler@^1.0.0", "typespec-http-new": "npm:@typespec/http@^1.0.1", "typespec-openapi-new": "npm:@typespec/openapi@^1.0.0", diff --git a/typespec/sessions/models.tsp b/typespec/sessions/models.tsp index d1970ce56..f76460dcc 100644 --- a/typespec/sessions/models.tsp +++ b/typespec/sessions/models.tsp @@ -22,7 +22,7 @@ model BaseDocSearch { lang: string = "en-US"; /** Metadata filter to apply to the search */ - metadata_filter: MetadataFilter = #{}; + metadata_filter: MetadataFilter = {}; /** The number of search messages to use for the search. */ @minValue(1) diff --git a/typespec/tasks/models.tsp b/typespec/tasks/models.tsp index ca6b72e00..e2bbf55d4 100644 --- a/typespec/tasks/models.tsp +++ b/typespec/tasks/models.tsp @@ -68,7 +68,7 @@ model Task { input_schema: Record | null = null; /** Tools defined specifically for this task not included in the Agent itself. */ - tools: TaskTool[] = #[]; + tools: TaskTool[] = []; /** Whether to inherit tools from the parent agent or not. Defaults to false. */ inherit_tools: boolean = false; diff --git a/typespec/tasks/steps.tsp b/typespec/tasks/steps.tsp index ac08a0f99..268583a64 100644 --- a/typespec/tasks/steps.tsp +++ b/typespec/tasks/steps.tsp @@ -248,7 +248,7 @@ model MapReduceStep> extends BaseWor reduce?: ReduceExpression; /** The initial value of the reduce expression */ - initial?: unknown = #[]; + initial?: unknown = []; /** Whether to run the reduce expression in parallel and how many items to run in each batch */ @minValue(1) diff --git a/typespec/tools/algolia.tsp b/typespec/tools/algolia.tsp index c0df813ef..f54614b4c 100644 --- a/typespec/tools/algolia.tsp +++ b/typespec/tools/algolia.tsp @@ -49,13 +49,13 @@ model AlgoliaIntegrationDef extends BaseIntegrationDef { model AlgoliaProviderCard extends BaseProviderCard { provider: "algolia" = "algolia"; setup: AlgoliaSetup; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "search", description: "Search for content in an Algolia index", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://www.algolia.com/", docs: "https://www.algolia.com/doc/", icon: "https://www.algolia.com/favicon.ico", diff --git a/typespec/tools/arxiv.tsp b/typespec/tools/arxiv.tsp index 09ed8a0f1..bcdc625ed 100644 --- a/typespec/tools/arxiv.tsp +++ b/typespec/tools/arxiv.tsp @@ -50,13 +50,13 @@ model ArxivSearchOutput { model ArxivProviderCard extends BaseProviderCard { provider: "arxiv" = "arxiv"; setup: null = null; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "search", description: "Search with Arxiv", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://pypi.org/project/arxiv/", docs: "https://info.arxiv.org/help/api/index.html", icon: "https://arxiv.com/favicon.ico", diff --git a/typespec/tools/brave.tsp b/typespec/tools/brave.tsp index 289778c7c..d76084383 100644 --- a/typespec/tools/brave.tsp +++ b/typespec/tools/brave.tsp @@ -39,13 +39,13 @@ model BraveSearchOutput { model BraveProviderCard extends BaseProviderCard { provider: "brave" = "brave"; setup: BraveSearchSetup; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "search", description: "Search with Brave", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://brave.com/", docs: "https://brave.com/docs/", icon: "https://brave.com/favicon.ico", diff --git a/typespec/tools/browserbase/main.tsp b/typespec/tools/browserbase/main.tsp index 7f932ce79..8e3a7d049 100644 --- a/typespec/tools/browserbase/main.tsp +++ b/typespec/tools/browserbase/main.tsp @@ -61,32 +61,32 @@ alias BrowserbaseOutput = BrowserbaseSessionOutput | BrowserbaseContextOutput | model BrowserbaseProviderCard extends BaseProviderCard { provider: "browserbase" = "browserbase"; setup: BrowserbaseSetup; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "list_sessions", description: "List the sessions in the browserbase context", }, - #{ + { method: "create_session", description: "Create a new session in the browserbase context", }, - #{ + { method: "get_session", description: "Get a session from the browserbase context", }, - #{ + { method: "complete_session", description: "Complete a session in the browserbase context", }, - #{ + { method: "get_live_urls", description: "Get live URLs from the browserbase context", }, - #{ + { method: "install_extension_from_github", description: "Install an extension from GitHub to the browserbase context", }, - #{ + { method: "get_connect_url", description: "Get the connection URL for a session", } diff --git a/typespec/tools/browserbase/sessions.tsp b/typespec/tools/browserbase/sessions.tsp index 84fc15bc7..d5e3d91fe 100644 --- a/typespec/tools/browserbase/sessions.tsp +++ b/typespec/tools/browserbase/sessions.tsp @@ -108,7 +108,7 @@ model BrowserbaseCreateSessionArguments { extensionId?: string; /** Browser settings */ - browserSettings?: Record = #{}; + browserSettings?: Record = {}; /** Duration in seconds after which the session will automatically end. Defaults to the Project's defaultTimeout. */ timeout?: uint16 = 3600; @@ -201,5 +201,5 @@ model BrowserbaseGetSessionLiveUrlsOutput { title?: string; debuggerUrl?: url; debuggerFullscreenUrl?: url; - }[] = #[]; + }[] = []; } \ No newline at end of file diff --git a/typespec/tools/cloudinary.tsp b/typespec/tools/cloudinary.tsp index ec66962e1..809be2832 100644 --- a/typespec/tools/cloudinary.tsp +++ b/typespec/tools/cloudinary.tsp @@ -103,17 +103,17 @@ alias CloudinaryOutput = CloudinaryUploadOutput | CloudinaryEditOutput; model CloudinaryProviderCard extends BaseProviderCard { provider: "cloudinary" = "cloudinary"; setup: CloudinarySetup; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "media_upload", description: "Upload media to Cloudinary", }, - #{ + { method: "media_edit", description: "Edit media in Cloudinary", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://cloudinary.com/", docs: "https://cloudinary.com/documentation/python_quickstart", icon: "https://cloudinary.com/favicon.ico", diff --git a/typespec/tools/email.tsp b/typespec/tools/email.tsp index e0864fc7e..52e276ec6 100644 --- a/typespec/tools/email.tsp +++ b/typespec/tools/email.tsp @@ -53,13 +53,13 @@ model EmailIntegrationDef extends BaseIntegrationDef { model EmailProviderCard extends BaseProviderCard { provider: "email" = "email"; setup: EmailSetup; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "send", description: "Send an email", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://emailservice.com/", docs: "https://emailservice.com/docs/", icon: "https://emailservice.com/favicon.ico", diff --git a/typespec/tools/ffmpeg.tsp b/typespec/tools/ffmpeg.tsp index 4e7f23665..137dba370 100644 --- a/typespec/tools/ffmpeg.tsp +++ b/typespec/tools/ffmpeg.tsp @@ -33,13 +33,13 @@ model FfmpegIntegrationDef extends BaseIntegrationDef { model FfmpegProviderCard extends BaseProviderCard { provider: "ffmpeg" = "ffmpeg"; setup: null = null; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "bash_cmd", description: "Run FFmpeg bash command", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://ffmpeg.org/", docs: "https://ffmpeg.org/documentation.html", icon: "https://upload.wikimedia.org/wikipedia/commons/5/5f/FFmpeg_Logo_new.svg", diff --git a/typespec/tools/llama_parse.tsp b/typespec/tools/llama_parse.tsp index cdafed0ac..5a50c5538 100644 --- a/typespec/tools/llama_parse.tsp +++ b/typespec/tools/llama_parse.tsp @@ -47,13 +47,13 @@ model LlamaParseIntegrationDef extends BaseIntegrationDef { model LlamaParseProviderCard extends BaseProviderCard { provider: "llama_parse" = "llama_parse"; setup: LlamaParseSetup; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "parse", description: "Parse and Extract the Files", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://www.llamaindex.ai/", docs: "https://docs.cloud.llamaindex.ai/llamaparse/getting_started", icon: "https://www.llamaindex.ai/favicon.ico", diff --git a/typespec/tools/mailgun.tsp b/typespec/tools/mailgun.tsp index d7284e43c..f4630df23 100644 --- a/typespec/tools/mailgun.tsp +++ b/typespec/tools/mailgun.tsp @@ -55,13 +55,13 @@ model MailgunIntegrationDef extends BaseIntegrationDef { model MailgunProviderCard extends BaseProviderCard { provider: "mailgun" = "mailgun"; setup: MailgunSetup; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "send_email", description: "Send an email using Mailgun", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://www.mailgun.com/", docs: "https://documentation.mailgun.com/", icon: "https://mailgun.com/favicon.ico", diff --git a/typespec/tools/remote_browser.tsp b/typespec/tools/remote_browser.tsp index 88df6697d..a130c1022 100644 --- a/typespec/tools/remote_browser.tsp +++ b/typespec/tools/remote_browser.tsp @@ -83,13 +83,13 @@ model RemoteBrowserIntegrationDef extends BaseIntegrationDef { model RemoteBrowserProviderCard extends BaseProviderCard { provider: "remote_browser" = "remote_browser"; setup: RemoteBrowserSetup; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "perform_action", description: "Perform an action in the remote browser", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://playwright.dev/", docs: "https://playwright.dev/docs/api/class-page", icon: "https://playwright.dev/favicon.ico", diff --git a/typespec/tools/spider.tsp b/typespec/tools/spider.tsp index e146add61..1a7106ab8 100644 --- a/typespec/tools/spider.tsp +++ b/typespec/tools/spider.tsp @@ -51,13 +51,13 @@ model SpiderIntegrationDef extends BaseIntegrationDef { model SpiderProviderCard extends BaseProviderCard { provider: "spider" = "spider"; setup: SpiderSetup; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "crawl", description: "Crawl a website and extract data", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://spider.com/", docs: "https://spider.com/docs/", icon: "https://spider.com/favicon.ico", diff --git a/typespec/tools/unstructured.tsp b/typespec/tools/unstructured.tsp index 3fe04fa76..349ba7c04 100644 --- a/typespec/tools/unstructured.tsp +++ b/typespec/tools/unstructured.tsp @@ -56,13 +56,13 @@ model UnstructuredIntegrationDef extends BaseIntegrationDef { model UnstructuredProviderCard extends BaseProviderCard { provider: "unstructured" = "unstructured"; setup: UnstructuredSetup; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "partition", description: "Partition documents into structured elements", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://unstructured.io/", docs: "https://docs.unstructured.io/", icon: "https://unstructured.io/favicon.ico", diff --git a/typespec/tools/weather.tsp b/typespec/tools/weather.tsp index a4047c064..a009e6ece 100644 --- a/typespec/tools/weather.tsp +++ b/typespec/tools/weather.tsp @@ -35,13 +35,13 @@ model WeatherIntegrationDef extends BaseIntegrationDef { model WeatherProviderCard extends BaseProviderCard { provider: "weather" = "weather"; setup: WeatherSetup; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "get", description: "Get the current weather for a city", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://www.weatherapi.com/", docs: "https://www.weatherapi.com/docs/", icon: "https://www.weatherapi.com/favicon.ico", diff --git a/typespec/tools/wikipedia.tsp b/typespec/tools/wikipedia.tsp index 143bb519d..ea6cdeb36 100644 --- a/typespec/tools/wikipedia.tsp +++ b/typespec/tools/wikipedia.tsp @@ -34,13 +34,13 @@ model WikipediaIntegrationDef extends BaseIntegrationDef { model WikipediaProviderCard extends BaseProviderCard { provider: "wikipedia" = "wikipedia"; setup: null = null; - methods: ProviderMethod[] = #[ - #{ + methods: ProviderMethod[] = [ + { method: "search", description: "Search for a page on Wikipedia", } ]; - info: ProviderInfo = #{ + info: ProviderInfo = { url: "https://www.wikipedia.org/", docs: "https://www.wikipedia.org/wiki/Main_Page", icon: "https://www.wikipedia.org/static/favicon/wikipedia.ico",