@alvera-ai/platform-sdk 0.10.0-rc.13 → 0.10.0-rc.15
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/.agent/custom_datasets.md +8 -3
- package/.agent/datalakes.md +4 -3
- package/.agent/tool-call-configs.md +90 -0
- package/dist/index.d.mts +445 -48
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +430 -60
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -66,7 +66,7 @@ name: 'alvera_custom_contact_us_submissions'
|
|
|
66
66
|
|
|
67
67
|
The `name` is what every downstream resource references —
|
|
68
68
|
`.get(name)`, `generic_table_id` foreign keys via the resolved
|
|
69
|
-
row, `datasets.
|
|
69
|
+
row, `datasets.metadataDetails(tenantSlug, datalakeSlug, 'generic_table', { genericTableId })`,
|
|
70
70
|
etc. Never pre-compute `name` client-side; read it back from
|
|
71
71
|
the create response. A server-side slugifier change would flip
|
|
72
72
|
every downstream binding, so specs assert the derived `name`
|
|
@@ -278,10 +278,10 @@ poll above.
|
|
|
278
278
|
tables expose `name`)
|
|
279
279
|
```
|
|
280
280
|
|
|
281
|
-
Plus the polymorphic dataset surface for
|
|
281
|
+
Plus the polymorphic dataset surface for per-table markdown:
|
|
282
282
|
|
|
283
283
|
```typescript
|
|
284
|
-
const { data: md } = await api.datasets.
|
|
284
|
+
const { data: md } = await api.datasets.metadataDetails(
|
|
285
285
|
tenantSlug,
|
|
286
286
|
datalakeSlug,
|
|
287
287
|
'generic_table',
|
|
@@ -290,6 +290,11 @@ const { data: md } = await api.datasets.metadata(
|
|
|
290
290
|
// md: string — agent-facing markdown describing the table's schema
|
|
291
291
|
```
|
|
292
292
|
|
|
293
|
+
For the whole-domain catalog (every system + custom dataset type
|
|
294
|
+
registered to this datalake) use the sibling
|
|
295
|
+
`api.datasets.metadata(tenantSlug, datalakeSlug)` — same shape as
|
|
296
|
+
`tools.metadata` / `dataSources.metadata`.
|
|
297
|
+
|
|
293
298
|
See `datalakes.md` §5 `.systemDatasets` for the system-dataset
|
|
294
299
|
sibling of this verb; the `'generic_table'` kind is the entry
|
|
295
300
|
point for custom-dataset metadata.
|
package/.agent/datalakes.md
CHANGED
|
@@ -567,8 +567,9 @@ operator-defined generic tables** — those live under
|
|
|
567
567
|
`api.genericTables.list(...)`. The
|
|
568
568
|
literal placeholder `"generic_table"` is also absent. Each name
|
|
569
569
|
can be drilled into via
|
|
570
|
-
`api.datasets.
|
|
571
|
-
agent-facing markdown
|
|
570
|
+
`api.datasets.metadataDetails(tenantSlug, datalakeSlug, name)` for
|
|
571
|
+
agent-facing markdown, or the whole-domain catalog can be fetched
|
|
572
|
+
in one shot via `api.datasets.metadata(tenantSlug, datalakeSlug)`. Pair `.systemDatasets()` with a
|
|
572
573
|
`page_size: 1` probe per name as a post-migration smoke (proves
|
|
573
574
|
each industry-built table is queryable; the post-ready probe
|
|
574
575
|
code is in §6 Gotcha 3).
|
|
@@ -581,7 +582,7 @@ const { data: catalog } = await api.datalakes.systemDatasets(
|
|
|
581
582
|
// catalog.datasets: sorted, unique array of industry-built dataset names
|
|
582
583
|
|
|
583
584
|
for (const name of catalog.datasets) {
|
|
584
|
-
const { data: md } = await api.datasets.
|
|
585
|
+
const { data: md } = await api.datasets.metadataDetails(tenantSlug, datalakeSlug, name)
|
|
585
586
|
// md is a string — agent-facing markdown describing the dataset
|
|
586
587
|
}
|
|
587
588
|
```
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<!-- alvera:doc kind="tool-call-configs" generated-by="mix alvera.dump.static_metadata" -->
|
|
2
|
+
|
|
3
|
+
# Tool Call Configurations
|
|
4
|
+
|
|
5
|
+
Per-invocation invocation-side schemas for Alvera tools. Each section
|
|
6
|
+
documents one variant of `Platform.Tools.ToolCallConfig`, identified
|
|
7
|
+
by its atom and rendered by `ToolCallConfig.metadata_details/2`.
|
|
8
|
+
|
|
9
|
+
<!-- alvera:section kind="tool-call-config" atom="restapi_request" module="Platform.Tools.ToolCallConfig.RESTAPIRequest" -->
|
|
10
|
+
|
|
11
|
+
## Tool Call Configuration (restapi_request)
|
|
12
|
+
|
|
13
|
+
Fetches data via REST API with pagination support.
|
|
14
|
+
|
|
15
|
+
- **method** (enum: head, get, put, post, delete, patch) — HTTP method
|
|
16
|
+
- **path** (TemplateConfig) — API endpoint path, rendered as Liquid template
|
|
17
|
+
- **body** (TemplateConfig, nullable) — Request body, rendered as Liquid template
|
|
18
|
+
- **params** (TemplateConfig, nullable) — Query parameters, rendered as Liquid template
|
|
19
|
+
- **pagination_context_template** (TemplateConfig) — Pagination control template, must render to JSON with `has_next` boolean field
|
|
20
|
+
|
|
21
|
+
<!-- alvera:section kind="tool-call-config" atom="sql_query" module="Platform.Tools.ToolCallConfig.SQLQuery" -->
|
|
22
|
+
|
|
23
|
+
## Tool Call Configuration (sql_query)
|
|
24
|
+
|
|
25
|
+
Fetches data via SQL query with Liquid template variables for pagination.
|
|
26
|
+
|
|
27
|
+
- **query** (TemplateConfig) — SQL query template with pagination variables
|
|
28
|
+
|
|
29
|
+
<!-- alvera:section kind="tool-call-config" atom="sftp_request" module="Platform.Tools.ToolCallConfig.SFTPRequest" -->
|
|
30
|
+
|
|
31
|
+
## Tool Call Configuration (sftp_request)
|
|
32
|
+
|
|
33
|
+
Fetches data from a remote SFTP server.
|
|
34
|
+
|
|
35
|
+
- **path** (string) — Remote file path on SFTP server
|
|
36
|
+
- **content_type** (string) — MIME type of the file
|
|
37
|
+
|
|
38
|
+
<!-- alvera:section kind="tool-call-config" atom="microsoft_share_point_excel_request" module="Platform.Tools.ToolCallConfig.MicrosoftSharePointExcelRequest" -->
|
|
39
|
+
|
|
40
|
+
## Tool Call Configuration (microsoft_share_point_excel_request)
|
|
41
|
+
|
|
42
|
+
Fetches data from a Microsoft SharePoint drive (Excel files).
|
|
43
|
+
|
|
44
|
+
- **drive_url** (string) — SharePoint drive URL
|
|
45
|
+
- **azure_tenant_id** (string) — Microsoft Azure tenant identifier
|
|
46
|
+
- **sheet_number** (integer) — 0-indexed Excel sheet number
|
|
47
|
+
- **search_params** (string) — Search parameters for locating files
|
|
48
|
+
|
|
49
|
+
<!-- alvera:section kind="tool-call-config" atom="aws_lambda_request" module="Platform.Tools.ToolCallConfig.AWSLambdaRequest" -->
|
|
50
|
+
|
|
51
|
+
## Tool Call Configuration (aws_lambda_request)
|
|
52
|
+
|
|
53
|
+
Invokes an AWS Lambda function to fetch data.
|
|
54
|
+
|
|
55
|
+
- **payload** (TemplateConfig) — Lambda JSON payload, rendered as Liquid template
|
|
56
|
+
- **timeout_ms** (integer, default: 600000, max: 900000) — Invocation timeout in milliseconds
|
|
57
|
+
|
|
58
|
+
<!-- alvera:section kind="tool-call-config" atom="s3_request" module="Platform.Tools.ToolCallConfig.S3Request" -->
|
|
59
|
+
|
|
60
|
+
## Tool Call Configuration (s3_request)
|
|
61
|
+
|
|
62
|
+
Fetches data from an S3 bucket.
|
|
63
|
+
|
|
64
|
+
- **file_path** (string) — S3 object key (no `s3://` prefix)
|
|
65
|
+
|
|
66
|
+
<!-- alvera:section kind="tool-call-config" atom="manual_upload" module="Platform.Tools.ToolCallConfig.ManualUpload" -->
|
|
67
|
+
|
|
68
|
+
## Tool Call Configuration (manual_upload)
|
|
69
|
+
|
|
70
|
+
Manual file upload — data is uploaded directly by the user. No additional configuration fields.
|
|
71
|
+
|
|
72
|
+
<!-- alvera:section kind="tool-call-config" atom="sms_request" module="Platform.Tools.ToolCallConfig.SMSRequest" -->
|
|
73
|
+
|
|
74
|
+
## Tool Call Configuration (sms_request)
|
|
75
|
+
|
|
76
|
+
Sends an SMS message via the configured SMS provider.
|
|
77
|
+
|
|
78
|
+
- **to** (TemplateConfig) — Recipient phone number in E.164 format, rendered as Liquid template
|
|
79
|
+
- **body** (TemplateConfig) — Message body, rendered as Liquid template
|
|
80
|
+
- **sms_type** (enum: transactional, promotional) — Message classification; defaults to `transactional`
|
|
81
|
+
|
|
82
|
+
<!-- alvera:section kind="tool-call-config" atom="email_request" module="Platform.Tools.ToolCallConfig.EmailRequest" -->
|
|
83
|
+
|
|
84
|
+
## Tool Call Configuration (email_request)
|
|
85
|
+
|
|
86
|
+
Sends an email message via the configured email provider.
|
|
87
|
+
|
|
88
|
+
- **to** (TemplateConfig) — Recipient email address (RFC 5322), rendered as Liquid template
|
|
89
|
+
- **subject** (TemplateConfig) — Email subject line, rendered as Liquid template
|
|
90
|
+
- **body** (TemplateConfig) — Email body, rendered as Liquid template
|