Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions demos/temi-openapi-scenario-runner/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
node_modules/
*.log
44 changes: 44 additions & 0 deletions demos/temi-openapi-scenario-runner/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# temi OpenAPI scenario runner

Client-only browser demo for composing and running a small temi robot scenario.
It demonstrates the complete operator flow:

`verify → discover → validate → play → poll → stop`

The interface starts in Chinese and includes an English option. It supports the
Production and Integration temi API environments, robot selection, MOVEMENT,
SPEAK, and START_CALL actions, final run confirmation, and status polling.

## Run locally

Requires Node.js 20 or newer. From this directory:

```bash
npm ci
npm run dev
```

Open the URL printed by Vite. To verify the production build instead:

```bash
npm run build
npm run preview
```

The demo is served over HTTP; do not open the source or `dist/index.html` with
`file://`.

## Token safety

Enter your own Organization Access Token (OAT) in the page. The demo keeps it
only in page memory and sends it as `x-api-key` directly to the selected temi
API origin. It does not use a backend, cookies, Web Storage, analytics, or
third-party runtime code. The token is cleared when the connection is reset,
the environment changes, a request returns 401, or the page closes.

Never commit an OAT, put one in a URL, or include one in logs, screenshots, or
support reports. Play and Stop can control a real PRO robot; use explicit
operator confirmation and a safe test area.

For the API contract and endpoint reference, see the
[temi OpenAPI documentation](https://openapi-docs.robotemi.com).
19 changes: 19 additions & 0 deletions demos/temi-openapi-scenario-runner/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'self'; object-src 'none'; script-src 'self'; style-src 'self'; img-src 'self'; connect-src 'self' https://api.robotemi.com https://integration.dev.temi.cloud"
/>
<title>场景运行 | temi Developer</title>
<link rel="stylesheet" href="./src/styles.css" />
</head>
<body>
<main id="app">
<noscript>此 demo 需要启用 JavaScript。</noscript>
</main>
<script type="module" src="./src/main.ts"></script>
</body>
</html>
17 changes: 17 additions & 0 deletions demos/temi-openapi-scenario-runner/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading