@w6w/embed 0.2.22 → 0.2.23
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/dist/{ModelRoutesManager-BUw_sm-M.js → ModelRoutesManager-Bv6qefnq.js} +2 -2
- package/dist/{ModelRoutesManager-BUw_sm-M.js.map → ModelRoutesManager-Bv6qefnq.js.map} +1 -1
- package/dist/forms.mjs +22 -22
- package/dist/index.mjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/lists.mjs +3 -3
- package/dist/{models-bAayQPJ_.js → models-CK1KHd39.js} +146 -105
- package/dist/models-CK1KHd39.js.map +1 -0
- package/dist/repos/models.d.ts +55 -0
- package/dist/repos.mjs +133 -129
- package/dist/workflow-blank-CorOIrSj.js +21 -0
- package/dist/workflow-blank-CorOIrSj.js.map +1 -0
- package/package.json +3 -3
- package/dist/models-bAayQPJ_.js.map +0 -1
- package/dist/workflow-blank-DFpGObrn.js +0 -14
- package/dist/workflow-blank-DFpGObrn.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models-bAayQPJ_.js","sources":["../src/repos/models.ts"],"sourcesContent":["/**\n * The model-registry repo — catalog, routes, budgets and usage over `W6WClient.request()`\n * (the stable ops for these land in the SDK separately; `request()` is the public escape hatch,\n * same as `vars.ts`). Shapes are the server's pinned wire shapes (project plan §Wire shapes).\n *\n * Scope: the catalog is tenant-wide and NEVER sends `project`. Routes, budgets and usage are\n * project-scoped, so their hooks are `enabled: projectId != null` and every fetcher sends\n * `?project=`; a project-scoped page therefore never queries before the project resolves.\n */\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport type { W6WClient } from \"@w6w/sdk\";\nimport { path } from \"@w6w/sdk\";\nimport { useEmbedClient } from \"../draft/client-context.ts\";\n\nexport interface ModelRates {\n input?: number;\n output?: number;\n cachedInput?: number;\n cacheWrite?: number;\n perRequest?: number;\n currency?: string;\n}\nexport interface ModelRate {\n id: string;\n modelId: string;\n effectiveFrom: string;\n rates: ModelRates;\n source: \"seed\" | \"tenant\";\n}\nexport interface Model {\n id: string;\n providerAppId: string;\n provider: string;\n nativeId: string;\n displayName: string;\n capabilities: unknown;\n limits: { maxInputTokens?: number; maxOutputTokens?: number };\n status: \"active\" | \"deprecated\" | \"blocked\";\n source: \"discovered\" | \"manual\";\n currentRate: ModelRate | null;\n discoveredAt: string | null;\n createdAt: string;\n updatedAt: string;\n}\nexport interface ModelFallback {\n model: string;\n connection: string;\n}\nexport interface ModelRoute {\n id: string;\n name: string;\n project: string;\n modelId: string;\n connectionId: string;\n fallbacks: ModelFallback[];\n defaults: Record<string, unknown>;\n status: \"active\" | \"broken\";\n createdAt: string;\n updatedAt: string;\n}\nexport interface ModelRouteInput {\n name: string;\n model: string;\n connection: string;\n fallbacks?: ModelFallback[];\n defaults?: Record<string, unknown>;\n}\nexport type ModelRoutePatch = Partial<Omit<ModelRouteInput, \"name\">>;\nexport interface ModelBudgetLimits {\n requests?: number;\n tokens?: number;\n costMinor?: number;\n currency?: string;\n}\nexport interface ModelBudget {\n id: string;\n scopeKind: string;\n scopeId: string | null;\n window: string;\n limits: ModelBudgetLimits;\n onBreach: \"block\" | \"warn\";\n}\nexport interface ModelBudgetInput {\n scopeKind: string;\n scopeId?: string;\n window: string;\n limits: ModelBudgetLimits;\n onBreach: \"block\" | \"warn\";\n}\nexport type ModelBudgetPatch = Partial<Omit<ModelBudgetInput, \"scopeKind\" | \"scopeId\">>;\nexport interface ModelBudgetUsageCounts {\n requests: number;\n tokens: number;\n costMinor: number;\n}\nexport interface ModelBudgetUsage {\n budgetId: string;\n window: string;\n windowStart: string;\n limits: ModelBudgetLimits;\n used: ModelBudgetUsageCounts;\n reserved: ModelBudgetUsageCounts;\n}\nexport interface ModelCost {\n currency: string;\n amountMinor: number;\n}\nexport interface ModelUsageGroup {\n key: string;\n requests: number;\n totalTokens: number;\n cost: ModelCost[];\n}\nexport interface ModelUsageTotals {\n requests: number;\n inputTokens: number;\n outputTokens: number;\n cachedInputTokens: number;\n cacheWriteTokens: number;\n totalTokens: number;\n cost: ModelCost[];\n unpriced: number;\n}\nexport interface ModelUsageItem {\n id: string;\n routeId: string | null;\n modelId: string;\n connectionId: string;\n provider: string;\n nativeId: string;\n inputTokens: number;\n outputTokens: number;\n cachedInputTokens: number;\n cacheWriteTokens: number;\n totalTokens: number;\n costMinor: number | null;\n currency: string | null;\n rateVersion: string | null;\n durationMs: number;\n ok: boolean;\n errorCode: string | null;\n invocationId: string | null;\n runId: string | null;\n occurredAt: string;\n}\nexport interface ModelUsageReport {\n totals: ModelUsageTotals;\n totalsTruncated?: boolean | null;\n groups?: ModelUsageGroup[];\n items: ModelUsageItem[];\n nextCursor: string | null;\n}\nexport interface ModelUsageFilter {\n route?: string;\n model?: string;\n from?: string;\n to?: string;\n groupBy?: \"route\" | \"model\" | \"day\";\n limit?: number;\n cursor?: string;\n}\nexport interface ModelCatalogFilter {\n provider?: string;\n status?: string;\n limit?: number;\n cursor?: string;\n}\nexport interface ModelCatalogPage {\n models: Model[];\n nextCursor: string | null;\n}\n\nexport const modelCatalogKey = (filter: ModelCatalogFilter = {}) =>\n [\"model-catalog\", filter] as const;\nexport const modelProvidersKey = [\"model-providers\"] as const;\nexport const modelRoutesKey = (projectId?: string) => [\"model-routes\", projectId] as const;\nexport const modelBudgetsKey = (projectId?: string) => [\"model-budgets\", projectId] as const;\nexport const modelBudgetUsageKey = (id: string, projectId?: string) =>\n [\"model-budget-usage\", id, projectId] as const;\nexport const modelUsageKey = (projectId?: string, filter: ModelUsageFilter = {}) =>\n [\"model-usage\", projectId, filter] as const;\n\nexport async function listModelCatalog(\n client: W6WClient,\n filter: ModelCatalogFilter = {},\n): Promise<ModelCatalogPage> {\n // Tenant-wide: deliberately no `project` here.\n const res = await client.request<ModelCatalogPage>({\n method: \"GET\",\n path: \"/models\",\n query: { ...filter },\n });\n return res.body;\n}\n\n/** One row of `GET /models/providers` — the descriptor the model pickers are driven by. */\nexport interface ModelProviderRow {\n appId: string;\n provider: string | null;\n installed: boolean;\n designation?: { modelTypes: string[]; modelFamilies?: string[] } | null;\n operations?: {\n discover: { supported: boolean; reason?: string };\n complete: {\n supported: boolean;\n reason?: string;\n features?: Partial<Record<ModelFeature, ModelFeatureState>>;\n };\n };\n /** A2 (optional): the bridge adapter serving this app; `null` = none. */\n adapter?: { provider: string; contractVersion: number } | null;\n /** A2 (optional): why this app cannot serve the caller right now. */\n reasons?: ModelProviderReason[];\n}\nexport type ModelFeature = \"toolCalls\" | \"structuredOutput\" | \"streaming\";\nexport type ModelFeatureState = \"supported\" | \"unsupported\" | \"unknown\";\nexport type ModelProviderReasonCode =\n | \"not_installed\"\n | \"no_adapter\"\n | \"not_entitled\"\n | \"no_connection\";\nexport interface ModelProviderReason {\n code: ModelProviderReasonCode;\n message: string;\n}\nexport interface CompleteSupport {\n supported: boolean;\n features: Partial<Record<ModelFeature, ModelFeatureState>>;\n reasons: ModelProviderReason[];\n}\n\n/**\n * THE support policy for `operations.complete`. Unsupported when the descriptor says so or the\n * row names no adapter (`adapter: null`); a pre-A2 row (no `adapter`/`features`/`reasons`) falls\n * back to `operations.complete.supported`. Unsupported rows always carry a reason.\n */\nexport function completeSupport(row: ModelProviderRow): CompleteSupport {\n const op = row.operations?.complete;\n const noAdapter = row.adapter === null;\n const supported = op?.supported === true && !noAdapter;\n const reasons = [...(row.reasons ?? [])];\n if (!supported && reasons.length === 0) {\n reasons.push({\n code:\n noAdapter || op?.supported === true\n ? \"no_adapter\"\n : row.installed\n ? \"no_adapter\"\n : \"not_installed\",\n message: op?.reason ?? \"Not supported for this provider\",\n });\n }\n return { supported, features: op?.features ?? {}, reasons };\n}\n\n/** Follow `nextCursor` until null (or `maxPages`), concatenating `models`. */\nexport async function loadAllModelCatalogPages(\n fetchPage: (cursor?: string) => Promise<ModelCatalogPage>,\n opts: { maxPages?: number } = {},\n): Promise<{ models: Model[]; truncated: boolean }> {\n const maxPages = opts.maxPages ?? 50;\n const models: Model[] = [];\n let cursor: string | undefined;\n for (let i = 0; i < maxPages; i++) {\n const page = await fetchPage(cursor);\n models.push(...page.models);\n if (!page.nextCursor) return { models, truncated: false };\n cursor = page.nextCursor;\n }\n return { models, truncated: true };\n}\nexport type ModelOperation = \"discover\" | \"complete\";\nexport interface ConnectionChoice {\n id: string;\n appId: string;\n displayName: string;\n /** Present only when the descriptor says the operation is unsupported for this provider. */\n disabledReason?: string;\n}\n\nexport async function listModelProviders(client: W6WClient): Promise<ModelProviderRow[]> {\n const res = await client.request<{ providers?: ModelProviderRow[] } | ModelProviderRow[]>({\n method: \"GET\",\n path: \"/models/providers\",\n });\n const b = res.body;\n return Array.isArray(b) ? b : (b?.providers ?? []);\n}\n\n/**\n * The connections a model picker may offer for `operation`, decided by the descriptor alone:\n * a connection whose app has no designated provider row never appears (an `ai`-category app is\n * not a provider); a designated row whose `discover` is unsupported appears disabled with the\n * descriptor's reason; for `complete` the shared `completeSupport` policy decides (unsupported => disabled, never selectable).\n */\nexport function connectionChoices<C extends { id: string; appId: string; displayName: string }>(\n connections: C[],\n providers: ModelProviderRow[],\n operation: ModelOperation,\n): ConnectionChoice[] {\n const byApp = new Map<string, ModelProviderRow>();\n for (const p of providers) if (p.designation) byApp.set(p.appId, p);\n const out: ConnectionChoice[] = [];\n for (const c of connections) {\n const row = byApp.get(c.appId);\n if (!row) continue;\n const op = row.operations?.[operation];\n const choice: ConnectionChoice = { id: c.id, appId: c.appId, displayName: c.displayName };\n if (operation === \"complete\") {\n const sup = completeSupport(row);\n if (!sup.supported) {\n choice.disabledReason =\n op?.reason ?? sup.reasons[0]?.message ?? \"Not supported for this provider\";\n }\n } else if (!op?.supported) {\n choice.disabledReason = op?.reason ?? \"Not supported for this provider\";\n }\n out.push(choice);\n }\n return out;\n}\n\n/** The server answers fallbacks as `{modelId, connectionId}`; the editor works in `{model, connection}`. */\nexport function normaliseRoute(r: ModelRoute): ModelRoute {\n const fallbacks = (r.fallbacks ?? []).map((f) => {\n const x = f as ModelFallback & { modelId?: string; connectionId?: string };\n return { model: x.model ?? x.modelId ?? \"\", connection: x.connection ?? x.connectionId ?? \"\" };\n });\n return { ...r, fallbacks };\n}\n\nexport async function listModelRoutes(client: W6WClient, project: string): Promise<ModelRoute[]> {\n const res = await client.request<{ routes: ModelRoute[] }>({\n method: \"GET\",\n path: \"/model-routes\",\n query: { project },\n });\n return res.body.routes.map(normaliseRoute);\n}\nexport async function createModelRoute(\n client: W6WClient,\n project: string,\n input: ModelRouteInput,\n): Promise<ModelRoute> {\n const res = await client.request<{ route: ModelRoute }>({\n method: \"POST\",\n path: \"/model-routes\",\n query: { project },\n body: input,\n });\n return normaliseRoute(res.body.route);\n}\nexport async function updateModelRoute(\n client: W6WClient,\n project: string,\n name: string,\n patch: ModelRoutePatch,\n): Promise<ModelRoute> {\n const res = await client.request<{ route: ModelRoute }>({\n method: \"PATCH\",\n path: path`/model-routes/${name}`,\n query: { project },\n body: patch,\n });\n return normaliseRoute(res.body.route);\n}\nexport async function deleteModelRoute(\n client: W6WClient,\n project: string,\n name: string,\n): Promise<void> {\n await client.request<{ ok: true }>({\n method: \"DELETE\",\n path: path`/model-routes/${name}`,\n query: { project },\n });\n}\n\nexport async function listModelBudgets(client: W6WClient, project: string): Promise<ModelBudget[]> {\n const res = await client.request<{ budgets: ModelBudget[] }>({\n method: \"GET\",\n path: \"/model-budgets\",\n query: { project },\n });\n return res.body.budgets;\n}\nexport async function createModelBudget(\n client: W6WClient,\n project: string,\n input: ModelBudgetInput,\n): Promise<ModelBudget> {\n // The server answers with the budget row itself (201), not a `{ budget }` wrapper.\n const res = await client.request<ModelBudget>({\n method: \"POST\",\n path: \"/model-budgets\",\n query: { project },\n body: input,\n });\n return res.body;\n}\nexport async function updateModelBudget(\n client: W6WClient,\n project: string,\n id: string,\n patch: ModelBudgetPatch,\n): Promise<ModelBudget> {\n // The server answers with the updated budget row itself, not a `{ budget }` wrapper.\n const res = await client.request<ModelBudget>({\n method: \"PATCH\",\n path: path`/model-budgets/${id}`,\n query: { project },\n body: patch,\n });\n return res.body;\n}\nexport async function deleteModelBudget(\n client: W6WClient,\n project: string,\n id: string,\n): Promise<void> {\n await client.request<{ ok: true }>({\n method: \"DELETE\",\n path: path`/model-budgets/${id}`,\n query: { project },\n });\n}\nexport async function getModelBudgetUsage(\n client: W6WClient,\n project: string,\n id: string,\n): Promise<ModelBudgetUsage> {\n const res = await client.request<ModelBudgetUsage>({\n method: \"GET\",\n path: path`/model-budgets/${id}/usage`,\n query: { project },\n });\n return res.body;\n}\nexport async function getModelUsage(\n client: W6WClient,\n project: string,\n filter: ModelUsageFilter = {},\n): Promise<ModelUsageReport> {\n const res = await client.request<ModelUsageReport>({\n method: \"GET\",\n path: \"/model-usage\",\n query: { project, ...filter },\n });\n return res.body;\n}\n\nexport function useModelCatalogQuery(filter: ModelCatalogFilter = {}) {\n const client = useEmbedClient();\n return useQuery({\n queryKey: modelCatalogKey(filter),\n queryFn: () => listModelCatalog(client, filter),\n });\n}\nexport function useAllModelCatalogQuery(filter: Omit<ModelCatalogFilter, \"cursor\"> = {}) {\n const client = useEmbedClient();\n return useQuery({\n queryKey: [\"model-catalog-all\", filter] as const,\n queryFn: () =>\n loadAllModelCatalogPages((cursor) => listModelCatalog(client, { ...filter, cursor })),\n });\n}\nexport function useModelProvidersQuery() {\n const client = useEmbedClient();\n return useQuery({ queryKey: modelProvidersKey, queryFn: () => listModelProviders(client) });\n}\nexport function useModelRoutesQuery(projectId?: string) {\n const client = useEmbedClient();\n return useQuery({\n queryKey: modelRoutesKey(projectId),\n enabled: projectId != null,\n queryFn: () => listModelRoutes(client, projectId as string),\n });\n}\nexport function useModelBudgetsQuery(projectId?: string) {\n const client = useEmbedClient();\n return useQuery({\n queryKey: modelBudgetsKey(projectId),\n enabled: projectId != null,\n queryFn: () => listModelBudgets(client, projectId as string),\n });\n}\nexport function useModelBudgetUsageQuery(id: string, projectId?: string) {\n const client = useEmbedClient();\n return useQuery({\n queryKey: modelBudgetUsageKey(id, projectId),\n enabled: projectId != null,\n queryFn: () => getModelBudgetUsage(client, projectId as string, id),\n });\n}\nexport function useModelUsageQuery(projectId?: string, filter: ModelUsageFilter = {}) {\n const client = useEmbedClient();\n return useQuery({\n queryKey: modelUsageKey(projectId, filter),\n enabled: projectId != null,\n queryFn: () => getModelUsage(client, projectId as string, filter),\n });\n}\n\nexport function useCreateModelRouteMutation() {\n const client = useEmbedClient();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (v: { project: string; input: ModelRouteInput }) =>\n createModelRoute(client, v.project, v.input),\n onSuccess: () => qc.invalidateQueries({ queryKey: [\"model-routes\"] }),\n });\n}\nexport function useUpdateModelRouteMutation() {\n const client = useEmbedClient();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (v: { project: string; name: string; patch: ModelRoutePatch }) =>\n updateModelRoute(client, v.project, v.name, v.patch),\n onSuccess: () => qc.invalidateQueries({ queryKey: [\"model-routes\"] }),\n });\n}\nexport function useDeleteModelRouteMutation() {\n const client = useEmbedClient();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (v: { project: string; name: string }) =>\n deleteModelRoute(client, v.project, v.name),\n onSuccess: () => qc.invalidateQueries({ queryKey: [\"model-routes\"] }),\n });\n}\nexport function useCreateModelBudgetMutation() {\n const client = useEmbedClient();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (v: { project: string; input: ModelBudgetInput }) =>\n createModelBudget(client, v.project, v.input),\n onSuccess: () => qc.invalidateQueries({ queryKey: [\"model-budgets\"] }),\n });\n}\nexport function useUpdateModelBudgetMutation() {\n const client = useEmbedClient();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (v: { project: string; id: string; patch: ModelBudgetPatch }) =>\n updateModelBudget(client, v.project, v.id, v.patch),\n // The row meter reads its limit from the per-budget usage query, so refresh it too.\n onSuccess: (_b, v) =>\n Promise.all([\n qc.invalidateQueries({ queryKey: [\"model-budgets\"] }),\n qc.invalidateQueries({ queryKey: [\"model-budget-usage\", v.id] }),\n ]),\n });\n}\nexport function useDeleteModelBudgetMutation() {\n const client = useEmbedClient();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (v: { project: string; id: string }) => deleteModelBudget(client, v.project, v.id),\n onSuccess: () => qc.invalidateQueries({ queryKey: [\"model-budgets\"] }),\n });\n}\n"],"names":["modelCatalogKey","filter","modelProvidersKey","modelRoutesKey","projectId","modelBudgetsKey","modelBudgetUsageKey","id","modelUsageKey","listModelCatalog","client","completeSupport","row","op","_a","noAdapter","supported","reasons","loadAllModelCatalogPages","fetchPage","opts","maxPages","models","cursor","i","page","listModelProviders","b","connectionChoices","connections","providers","operation","byApp","p","out","c","choice","sup","_b","normaliseRoute","r","fallbacks","f","x","listModelRoutes","project","createModelRoute","input","res","updateModelRoute","name","patch","path","deleteModelRoute","listModelBudgets","createModelBudget","updateModelBudget","deleteModelBudget","getModelBudgetUsage","getModelUsage","useModelCatalogQuery","useEmbedClient","useQuery","useAllModelCatalogQuery","useModelProvidersQuery","useModelRoutesQuery","useModelBudgetsQuery","useModelBudgetUsageQuery","useModelUsageQuery","useCreateModelRouteMutation","qc","useQueryClient","useMutation","v","useUpdateModelRouteMutation","useDeleteModelRouteMutation","useCreateModelBudgetMutation","useUpdateModelBudgetMutation","useDeleteModelBudgetMutation"],"mappings":";;;AA4KO,MAAMA,IAAkB,CAACC,IAA6B,OAC3D,CAAC,iBAAiBA,CAAM,GACbC,IAAoB,CAAC,iBAAiB,GACtCC,IAAiB,CAACC,MAAuB,CAAC,gBAAgBA,CAAS,GACnEC,IAAkB,CAACD,MAAuB,CAAC,iBAAiBA,CAAS,GACrEE,IAAsB,CAACC,GAAYH,MAC9C,CAAC,sBAAsBG,GAAIH,CAAS,GACzBI,IAAgB,CAACJ,GAAoBH,IAA2B,CAAA,MAC3E,CAAC,eAAeG,GAAWH,CAAM;AAEnC,eAAsBQ,EACpBC,GACAT,IAA6B,IACF;AAO3B,UALY,MAAMS,EAAO,QAA0B;AAAA,IACjD,QAAQ;AAA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AC,eAAe,EAAA,CAAG;AAAA,EAAA,CACtE;AACH;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-blank-DFpGObrn.js","sources":["../src/lib/workflow-blank.ts"],"sourcesContent":["/** A fresh, minimal workflow definition for a brand-new id (a new object on every call). */\nexport function blankDefinition(id: string): Record<string, unknown> {\n // Every workflow starts with a manual trigger (rfcs/node-types.md); the server\n // defaults it too, but seeding it keeps the editor's JSON authoritative.\n return {\n manifestVersion: \"2\",\n id,\n name: id,\n displayName: \"Untitled workflow\",\n trigger: { type: \"manual\" },\n nodes: [],\n };\n}\n"],"names":["blankDefinition","id"],"mappings":"AACO,SAASA,EAAgBC,GAAqC;AAGnE,SAAO;AAAA,IACL,iBAAiB;AAAA,IACjB,IAAAA;AAAA,IACA,MAAMA;AAAA,IACN,aAAa;AAAA,IACb,SAAS,EAAE,MAAM,SAAA;AAAA,IACjB,OAAO,CAAA;AAAA,EAAC;AAEZ;"}
|