Skip to content

Commit a9b503f

Browse files
committed
first commit
0 parents  commit a9b503f

File tree

932 files changed

+107663
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

932 files changed

+107663
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# AugmentOS-Cloud-Example-App

bun.lock

+196
Large diffs are not rendered by default.

index.ts

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { TpaServer, TpaSession } from '@augmentos/sdk';
2+
3+
class ExampleAugmentOSApp extends TpaServer {
4+
protected async onSession(session: TpaSession, sessionId: string, userId: string): Promise<void> {
5+
// Show welcome message
6+
session.layouts.showTextWall("Example Captions App Ready!");
7+
8+
// Handle real-time transcription
9+
const cleanup = [
10+
session.events.onTranscription((data) => {
11+
session.layouts.showTextWall(data.text, {
12+
durationMs: data.isFinal ? 3000 : undefined
13+
});
14+
}),
15+
16+
session.events.onButtonPress((data) => {}),
17+
18+
session.events.onPhoneNotifications((data) => {}),
19+
20+
session.events.onGlassesBattery((data) => {}),
21+
22+
session.events.onError((error) => {
23+
console.error('Error:', error);
24+
})
25+
];
26+
27+
// Add cleanup handlers
28+
cleanup.forEach(handler => this.addCleanupHandler(handler));
29+
}
30+
}
31+
32+
// Start the server
33+
// DEV CONSOLE URL: https://augmentos.dev/
34+
// Get your webhook URL from ngrok (or whatever public URL you have)
35+
const app = new ExampleAugmentOSApp({
36+
packageName: 'org.augmentos.exampleapp', // make sure this matches your app in dev console
37+
apiKey: 'your_api_key', // Not used right now, play nice
38+
port: 3000, // The port you're hosting the server on
39+
augmentOSWebsocketUrl: 'wss://dev.augmentos.org/tpa-ws' //AugmentOS url
40+
});
41+
42+
app.start().catch(console.error);

node_modules/.bin/mime

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/semver

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)