@h-ear/openclaw 0.1.0-dev.202603281753 → 0.1.0-dev.202603290313

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/SKILL.md CHANGED
@@ -1,34 +1,44 @@
1
1
  ---
2
2
  name: h-ear
3
- description: Audio classification and noise monitoring. Classify audio files, list 521+ sound classes, check usage, browse jobs, and set up sound alerts.
3
+ description: "H-ear.world transforms sound into an actionable, meaningful translation layer of the world around you. Describe, share and act upon audio as a spatiotemporal annotated soundscape that empowers you, your business and your AI flow."
4
4
  version: 0.1.0
5
5
  author: H-ear World
6
6
  homepage: https://h-ear.world
7
7
  openclaw:
8
8
  requires:
9
- env: [HEAR_API_KEY]
9
+ env: [HEAR_API_KEY, HEAR_ENV]
10
10
  bins: []
11
11
  primaryEnv: HEAR_API_KEY
12
12
  ---
13
13
 
14
14
  # H-ear — Sound Intelligence for AI Agents
15
15
 
16
- Classify audio, detect noise events, and set up real-time sound alerts through any messaging channel.
16
+ H-ear.world transforms sound into an actionable, meaningful translation layer of the world around you. Describe, share and act upon audio as a spatiotemporal annotated soundscape that empowers you, your business and your AI flow.
17
17
 
18
18
  ## Commands
19
19
 
20
20
  | Command | Description |
21
21
  |---------|-------------|
22
- | `classify <url>` | Classify audio from a URL |
23
- | `classify batch <url1> <url2>...` | Batch classify multiple audio URLs |
24
- | `sounds [search]` | List supported sound classes (521+) |
25
- | `usage` | Show API usage statistics |
26
- | `jobs [last N]` | List recent classification jobs |
27
- | `job <id>` | Show detailed job results |
28
- | `alerts on <sound>` | Enable alerts for a sound class |
29
- | `alerts off <sound>` | Disable alerts for a sound class |
30
- | `health` | Check API status |
22
+ | `classify <url>` | Classify audio from a URL. Returns detected sound classes with confidence scores. |
23
+ | `classify batch <url1> <url2>...` | Batch classify multiple audio URLs. Results delivered asynchronously via the gateway's webhook endpoint. |
24
+ | `sounds [search]` | List supported sound classes (521+ across 3 taxonomies). |
25
+ | `usage` | Show API usage statistics (minutes, calls, quota). |
26
+ | `jobs [last N]` | List recent classification jobs with status. |
27
+ | `job <id>` | Show detailed job results with classifications. |
28
+ | `alerts on <sound>` | Enable real-time alerts for a sound class. Notifications delivered to your connected channel via the gateway. |
29
+ | `alerts off <sound>` | Disable alerts for a sound class. |
30
+ | `health` | Check API status. |
31
31
 
32
32
  ## Setup
33
33
 
34
- Set `HEAR_API_KEY` to your H-ear Enterprise API key. Get one at [h-ear.world](https://h-ear.world).
34
+ | Variable | Required | Default | Description |
35
+ |----------|----------|---------|-------------|
36
+ | `HEAR_API_KEY` | Yes | | H-ear Enterprise API key. Get one at [h-ear.world](https://h-ear.world). |
37
+ | `HEAR_ENV` | Yes | | Target environment: `dev`, `staging`, or `prod`. |
38
+ | `HEAR_BASE_URL` | No | Per-environment default | Override API base URL (advanced). |
39
+
40
+ ## Webhook Delivery
41
+
42
+ Batch classification (`classify batch`) and sound alerts (`alerts on`) use webhook callbacks for asynchronous result delivery. The OpenClaw gateway manages webhook endpoints automatically -- the skill registers callbacks against the gateway's own webhook receiver, which routes results back to your connected messaging channel. No external endpoint configuration is required by the user.
43
+
44
+ Webhook events: `job.completed`, `job.failed`, `batch.completed`, `quota.warning`.
@@ -1,4 +1,6 @@
1
1
  import type { HearApiClient } from '@h-ear/core';
2
- export declare function alertOnCommand(client: HearApiClient, soundClass: string, callbackUrl: string): Promise<string>;
2
+ export declare function alertOnCommand(client: HearApiClient, soundClass: string, options?: {
3
+ callbackUrl?: string;
4
+ }): Promise<string>;
3
5
  export declare function alertOffCommand(client: HearApiClient, webhookId: string, soundClass: string): Promise<string>;
4
6
  //# sourceMappingURL=alerts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alerts.d.ts","sourceRoot":"","sources":["../../src/commands/alerts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,wBAAsB,cAAc,CAChC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAOjB;AAED,wBAAsB,eAAe,CACjC,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC,CAGjB"}
1
+ {"version":3,"file":"alerts.d.ts","sourceRoot":"","sources":["../../src/commands/alerts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,wBAAsB,cAAc,CAChC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACnC,OAAO,CAAC,MAAM,CAAC,CAOjB;AAED,wBAAsB,eAAe,CACjC,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC,CAGjB"}
@@ -1,7 +1,9 @@
1
1
  import { formatAlertRegistered, formatAlertDeregistered } from '../formatter.js';
2
- export async function alertOnCommand(client, soundClass, callbackUrl) {
2
+ /** Default gateway webhook receiver OpenClaw routes alerts back to the user's channel. */
3
+ const GATEWAY_CALLBACK = 'https://gateway.openclaw.ai/webhooks/h-ear';
4
+ export async function alertOnCommand(client, soundClass, options) {
3
5
  await client.registerWebhook({
4
- url: callbackUrl,
6
+ url: options?.callbackUrl ?? GATEWAY_CALLBACK,
5
7
  events: ['job.completed'],
6
8
  soundClass,
7
9
  });
@@ -1 +1 @@
1
- {"version":3,"file":"alerts.js","sourceRoot":"","sources":["../../src/commands/alerts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAEjF,MAAM,CAAC,KAAK,UAAU,cAAc,CAChC,MAAqB,EACrB,UAAkB,EAClB,WAAmB;IAEnB,MAAM,MAAM,CAAC,eAAe,CAAC;QACzB,GAAG,EAAE,WAAW;QAChB,MAAM,EAAE,CAAC,eAAe,CAAC;QACzB,UAAU;KACb,CAAC,CAAC;IACH,OAAO,qBAAqB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CACjC,MAAqB,EACrB,SAAiB,EACjB,UAAkB;IAElB,MAAM,MAAM,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC1C,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC/C,CAAC"}
1
+ {"version":3,"file":"alerts.js","sourceRoot":"","sources":["../../src/commands/alerts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAEjF,4FAA4F;AAC5F,MAAM,gBAAgB,GAAG,4CAA4C,CAAC;AAEtE,MAAM,CAAC,KAAK,UAAU,cAAc,CAChC,MAAqB,EACrB,UAAkB,EAClB,OAAkC;IAElC,MAAM,MAAM,CAAC,eAAe,CAAC;QACzB,GAAG,EAAE,OAAO,EAAE,WAAW,IAAI,gBAAgB;QAC7C,MAAM,EAAE,CAAC,eAAe,CAAC;QACzB,UAAU;KACb,CAAC,CAAC;IACH,OAAO,qBAAqB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CACjC,MAAqB,EACrB,SAAiB,EACjB,UAAkB;IAElB,MAAM,MAAM,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC1C,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC/C,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { HearApiClient } from '@h-ear/core';
2
- export declare function classifyBatchCommand(client: HearApiClient, urls: string[], callbackUrl: string, options?: {
2
+ export declare function classifyBatchCommand(client: HearApiClient, urls: string[], options?: {
3
3
  threshold?: number;
4
+ callbackUrl?: string;
4
5
  }): Promise<string>;
5
6
  //# sourceMappingURL=classify-batch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"classify-batch.d.ts","sourceRoot":"","sources":["../../src/commands/classify-batch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,wBAAsB,oBAAoB,CACtC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,EAAE,EACd,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACjC,OAAO,CAAC,MAAM,CAAC,CAejB"}
1
+ {"version":3,"file":"classify-batch.d.ts","sourceRoot":"","sources":["../../src/commands/classify-batch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,wBAAsB,oBAAoB,CACtC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACvD,OAAO,CAAC,MAAM,CAAC,CAejB"}
@@ -1,8 +1,10 @@
1
- export async function classifyBatchCommand(client, urls, callbackUrl, options) {
1
+ /** Default gateway webhook receiver OpenClaw routes results back to the user's channel. */
2
+ const GATEWAY_CALLBACK = 'https://gateway.openclaw.ai/webhooks/h-ear';
3
+ export async function classifyBatchCommand(client, urls, options) {
2
4
  const files = urls.map((url, i) => ({ url, id: `file-${i + 1}` }));
3
5
  const result = await client.classifyBatch({
4
6
  files,
5
- callbackUrl,
7
+ callbackUrl: options?.callbackUrl ?? GATEWAY_CALLBACK,
6
8
  threshold: options?.threshold ?? 0.3,
7
9
  });
8
10
  return [
@@ -1 +1 @@
1
- {"version":3,"file":"classify-batch.js","sourceRoot":"","sources":["../../src/commands/classify-batch.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACt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,EAAE;QAC7B,UAAU,MAAM,CAAC,SAAS,EAAE;QAC5B,eAAe,MAAM,CAAC,0BAA0B,MAAM;QACtD,WAAW,MAAM,CAAC,MAAM,EAAE;KAC7B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgB,KAAK,YAAY,EAAwB,MAAM,aAAa,CAAC;AAEpF,wBAAgB,aAAa,IAAI,YAAY,CAU5C"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgB,KAAK,YAAY,EAAwB,MAAM,aAAa,CAAC;AAEpF,wBAAgB,aAAa,IAAI,YAAY,CAY5C"}
package/dist/config.js CHANGED
@@ -4,12 +4,15 @@
4
4
  */
5
5
  import { ENVIRONMENTS } from '@h-ear/core';
6
6
  export function resolveConfig() {
7
- const apiKey = process.env.HEAR_API_KEY || '';
7
+ const apiKey = process.env.HEAR_API_KEY;
8
+ const bearerToken = process.env.HEAR_BEARER_TOKEN || undefined;
9
+ if (!apiKey && !bearerToken)
10
+ throw new Error('HEAR_API_KEY or HEAR_BEARER_TOKEN environment variable is required');
8
11
  const envStr = process.env.HEAR_ENV || 'prod';
9
12
  const environment = (Object.keys(ENVIRONMENTS).includes(envStr) ? envStr : 'prod');
10
13
  const envConfig = ENVIRONMENTS[environment];
11
14
  const baseUrl = process.env.HEAR_BASE_URL || envConfig.baseUrl;
12
15
  const apiPath = envConfig.apiPath;
13
- return { apiKey, environment, baseUrl, apiPath };
16
+ return { apiKey: apiKey || '', bearerToken, environment, baseUrl, apiPath };
14
17
  }
15
18
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA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AC,CAAC,CAAC,MAAM,CAAoB,CAAC;IACtG,MAAM,SAAS,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,SAAS,CAAC,OAAO,CAAC;IAC/D,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;IAElC,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAChF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h-ear/openclaw",
3
- "version": "0.1.0-dev.202603281753",
3
+ "version": "0.1.0-dev.202603290313",
4
4
  "description": "OpenClaw skill for H-ear World audio classification — sound intelligence in WhatsApp, Telegram, Slack, Discord, and Teams",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",