Aller au contenu principal

Copy-paste agent prompts

Give one of these prompts to a coding agent with access to the partner app and this documentation site. Replace every YOUR_* placeholder. Each disclosure has a copy button in the code block.

Start with the Partner launch checklist and End-user data isolation. The prompts make their server-owned identity boundary and two-user launch test mandatory.

Packages are publishing soon

@dataira/types, @dataira/node, @dataira/client, and @dataira/react are not public yet. Provide an explicit workspace, tarball, or prerelease artifact. An agent must never guess a version or copy private package source.

Embed SDK integrationReact, headless client, and token broker
Integrate Dataira embedded analytics into this application.

First inspect the app's framework, authentication, organization model, server
runtime, secret handling, and CSP. Locate Dataira resources in the attached
integration bundle or YOUR_DATAIRA_DOCS_BASE_URL, then read the SDK overview,
React quickstart, headless client, Node backend, Partner launch checklist,
End-user data isolation, and Embed security guides.

Packages @dataira/node, @dataira/client, and @dataira/react are public on npm
(0.1.x preview). Install them from the registry. Never copy package internals
or import private subpaths. If the docs are unavailable, stop and ask.

Implement the v1 boundary:
1. Add a same-origin backend POST endpoint that authenticates the current user.
2. Server-side, map stable endUserId/endUserOrgId and exact allowed data sources.
3. Use @dataira/node or the documented REST endpoint with DATAIRA_API_KEY to
mint a short-lived end-user token. Return only that token to the browser.
4. Use @dataira/react for the drop-in workspace or @dataira/client for a custom
UI. Import public styles and give the host a fixed or minimum height.
5. Refresh through getToken. Keep the API key out of browser code, public env,
localStorage, logs, analytics, screenshots, and error messages.
6. Preserve receipts, revisions, confirmation, Undo, and error states. Do not
recreate authorization, SQL filtering, or mutation logic client-side.

Do not trust browser-supplied identity, organization, source access, policy,
row filters, or evidence permissions. Do not mint internal tokens or proxy
analytical result rows through the token endpoint.

Create users A and B with rows in the same datasource. Prove A cannot retrieve
B's data through chat, SQL, metrics, dashboards, exports, cached results, or
altered browser inputs. Also test unauthenticated access, secret-free bundles,
deduplicated concurrent minting, expiry/revocation recovery, loading/error/empty
states, conversation reload, and mobile layout.

Deliver implementation, tests, environment variables, and a short runbook.
State blockers instead of weakening the security boundary.
Database source integrationPostgreSQL, MySQL, or ClickHouse
Connect this application's database to Dataira using a supported source flow.

Inspect the deployment topology. Locate Dataira resources in the attached
integration bundle or YOUR_DATAIRA_DOCS_BASE_URL, then read Data sources,
Node backend, private connectivity, Partner launch checklist, End-user data
isolation, governed access, and Embed security.

@dataira/node is public on npm (0.1.x preview). Never copy package source.
If the docs are unavailable, stop and ask.

Choose the simplest safe supported mode:
- Direct outbound TLS for a supported public PostgreSQL or ClickHouse endpoint.
- The documented private/tunnel path for MySQL or when inbound database access
is forbidden. Do not translate a generic MySQL TCP endpoint into an HTTP URL.

Create a dedicated least-privilege read-only database identity. Restrict it to
approved schemas, tables, or views and use a tenant-scoped view where useful.
Keep credentials in the partner secret manager and send them only from a
trusted backend with an environment-scoped Dataira server key. Create the
source, ingest schema, review semantic and PII classifications, validate it,
then create a deny-by-default policy with a row rule for every governed table,
bind trusted customer attributes server-side, and configure exact end-user
source access before activation.

Dataira does not install database-native RLS. For a sensitive shared PostgreSQL
database, add RLS, security-barrier views, or scoped credentials as an independent
second boundary; do not substitute them for the Dataira policy.

Do not use an owner/admin user, disable TLS verification, expose credentials in
the frontend/git/prompts/logs/screenshots, trust browser row filters, grant a
source-scoped key environment-wide management, open a broad public firewall
rule, or activate before schema and policy checks pass.

Create users A and B in the same physical database and prove each receives only
its own rows across aliases, joins, saved results, exports, and chat. Also test
bad/revoked credentials, write denial, unauthorized tables/columns,
pause/archive revocation, schema/PII invalidation, and secret rotation.

Deliver code/config, SQL grants or views, tests, connection and rollback
runbooks, and the exact human approval required before activation.
OpenAPI v2 + Analytical PackGoverned, reviewed, and reproducible
Integrate this partner API with Dataira through OpenAPI v2 and one published
Partner Analytical Pack. Do not request direct database access.

First locate the supplied Dataira prerelease bundle or YOUR_DATAIRA_DOCS_BASE_URL.
Read Data sources, Backend SDK, Partner launch checklist, FretGuard OpenAPI pilot,
End-user data isolation, and Embed security. Stop if any required contract or
artifact is unavailable; never guess a package version or copy private source.

Use @dataira/node only on the trusted backend. Then:
1. Call sourceConnectors.capabilities(). Require configuration, canonicalSpec,
execution, and private_pinned_ip before activation.
2. Preflight a same-origin OpenAPI 3.x JSON/YAML URL. Review suggestions, then
register only approved GET/POST operations whose kind is query/computation,
sideEffect is none, mode is sync, response projection is typed, and policy or
identity parameters come from trusted server state.
3. Store the least-privilege service credential in encrypted server headers.
Apply strict timeout, row, byte, request, and evidence limits.
4. Create an empty pack draft. Import only an exact listed preset digest, analyze
the exact registered source generation/spec revision with reviewed operation
IDs, and optionally import bounded JSON/YAML, Markdown, or agent proposals.
5. Preview diagnostics and conflicts. Never use silent last-write-wins, execute
Markdown as instructions, let a skill add permissions/tools, or auto-publish.
6. Validate, submit for review, and publish with idempotency keys, revision CAS,
and active-generation CAS. Save hashes and versioned receipts; test rollback.
7. Bind each authenticated user to exact source/policy scope, mint a short-lived
browser token, and prove two users sharing one upstream schema cannot read or
override one another's customer binding.
8. Test revoked source/token, malicious Markdown/agent content, SSRF/remote refs,
incompatible drift, over-budget output, side effects, and concurrent publish.

Keep deterministic financial/business calculations in the partner API; Dataira
selects, authorizes, orchestrates, normalizes, and explains them. Do not expose
secrets, arbitrary URLs, raw response bodies, management keys, or customer IDs
as user-controlled tool arguments.

Current track: OpenAPI + server-held service credential. Document but do not
implement without an enabled capability: partner JWT or delegated token exchange.
GraphQL persisted operations are a later transport, not an authentication mode.
Async operation execution, post-publish live conformance without an approved
server principal, public package installation, and production deployment are not
available merely because the contracts exist.

Return source-registration code, reviewed operation selections, pack lifecycle
code, policy/token boundary, adversarial tests, rollback steps, and an explicit
blocked state for every unavailable capability.
FretGuard pilotQuery, deterministic simulation, drift, and rollback
Make FretGuard ready for a Dataira sandbox pilot through OpenAPI, without direct
database access. Use the supplied prerelease artifacts; packages are not public.

Read these sources completely before editing:
- YOUR_DATAIRA_DOCS_BASE_URL/sdk/fretguard-getting-started
- /data-sources
- /sdk/node-backend
- /sdk/partner-launch-checklist
- /reference/end-user-isolation
- /reference/embed-security

Treat FretGuard as an acceptance fixture, never a core domain model. Keep every
cost calculation in FretGuard. Dataira may select, authorize, invoke, normalize,
and explain only these reviewed synchronous, side-effect-free operations:
- GET listCostVariance, scoped by server-owned costs.customer_id.
- POST simulateCostScenario, with customer_id server-owned and shipment_count,
average_weight_kg, fuel_index, and discount_percent as bounded arguments.

Implement this exact sequence:
1. Authenticate the host user. Resolve stable user, organization, and customer
scope from trusted server state.
2. Check OpenAPI capabilities and stop unless canonical configuration, execution,
and private_pinned_ip egress are enabled.
3. Preflight and register the same-origin OpenAPI 3.x JSON/YAML document with a
server-held service credential, explicit response fields, evidence IDs, and
conservative timeout/row/byte/request budgets.
4. Create an empty pack; import exact transport-control-tower@1.0.0 from the
server registry using its returned digest; analyze the exact registered source
generation/spec revision and only the two reviewed operation IDs.
5. Preview all diagnostics/conflicts. Validate, submit for review, and publish
with idempotency, revision CAS, and active-generation CAS. Never auto-publish.
6. Bind two users to different customer IDs, mint short-lived embed tokens, and
prove each sees only its own marker. Reject prompt/tool/body scope overrides.
7. Execute query and computation, verify FretGuard produced the deterministic
values, and retain normalized results plus versioned receipts and evidence.
8. Change the spec incompatibly, prove drift blocks execution, restore the exact
contract, and prove rollback to the previous published pack revision.

Add unit, integration, security, two-user conformance, smoke, and end-to-end
tests. Include SSRF, remote refs, redirects, credentials in URLs, secret leakage,
malicious Markdown/agent proposal, unreviewed operations, side effects, revocation,
budget excess, stale CAS, preset digest mismatch, and conflicting imports.

Do not add transport branches to generic Dataira code, execute imported prose,
let skills widen tools/permissions, trust browser customer IDs, expose upstream
credentials, or claim deployment/readiness from documents alone.

Current: service-credential OpenAPI preview and structural publish evaluation.
Later/gated: partner JWT, delegated token exchange, GraphQL persisted operations,
async execution, and live post-publish conformance after a server-principal
decision. Return evidence, exact commands, limitations, and a NOT READY verdict
for any missing executable acceptance proof. Do not commit, push, or deploy.

What is available now

The SDK, SQL paths, OpenAPI v2 contracts, and Analytical Pack authoring clients exist in prerelease artifacts. OpenAPI activation still requires a positive sourceConnectors.capabilities() result and an enabled environment.

Integration trackStatus
OpenAPI + server-held service credentialCurrent preview
OpenAPI + partner JWT or delegated token exchangeSpecified, later
GraphQL persisted operationsSpecified, later; transport, not authentication

Async analytical execution is not supported. Pack publication performs bounded structural evaluation; post-publish live conformance awaits an approved server-owned principal. No package publication or deployment is implied. Each prompt is collapsible and each code block has the documentation copy button.

For the complete trust boundary, also read Embed security.