@ziggs-ai/api-client 0.1.10 → 0.1.11

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.
@@ -23,7 +23,7 @@ export class AgentSearchClient {
23
23
  params.set('limit', String(options.limit));
24
24
  if (typeof options.minScore === 'number')
25
25
  params.set('minScore', String(options.minScore));
26
- const url = `${this.baseUrl}/agent-api/v1/agents/search?${params}`;
26
+ const url = `${this.baseUrl}/agents/search?${params}`;
27
27
  try {
28
28
  const response = await fetch(url, { method: 'GET', headers: this._buildHeaders() });
29
29
  if (!response.ok) {
@@ -42,7 +42,7 @@ export class AgentSearchClient {
42
42
  async getAgentById(agentId) {
43
43
  if (!agentId)
44
44
  return { success: false, error: 'agentId is required' };
45
- const url = `${this.baseUrl}/agent-api/v1/agents/${encodeURIComponent(agentId)}`;
45
+ const url = `${this.baseUrl}/agents/${encodeURIComponent(agentId)}`;
46
46
  try {
47
47
  const response = await fetch(url, { method: 'GET', headers: this._buildHeaders() });
48
48
  if (response.status === 404) {
@@ -49,7 +49,7 @@ export interface InboxAckResult {
49
49
  /**
50
50
  * The doorbell, not the door (ZIG-434): references and counts since the
51
51
  * agent's last ack — never content. Flow: inbox → read → act → ack (ZIG-446).
52
- * Wraps `GET /agent-api/v1/inbox` and `POST /agent-api/v1/inbox/ack`.
52
+ * Wraps `GET /inbox` and `POST /inbox/ack`.
53
53
  */
54
54
  export declare class InboxClient {
55
55
  private readonly operatorKey;
@@ -3,7 +3,7 @@ import { getBackendUrl } from '../utils/urlUtils.js';
3
3
  /**
4
4
  * The doorbell, not the door (ZIG-434): references and counts since the
5
5
  * agent's last ack — never content. Flow: inbox → read → act → ack (ZIG-446).
6
- * Wraps `GET /agent-api/v1/inbox` and `POST /agent-api/v1/inbox/ack`.
6
+ * Wraps `GET /inbox` and `POST /inbox/ack`.
7
7
  */
8
8
  export class InboxClient {
9
9
  operatorKey;
@@ -30,7 +30,7 @@ export class InboxClient {
30
30
  return headers;
31
31
  }
32
32
  async getInbox() {
33
- const res = await fetch(`${this.baseUrl}/agent-api/v1/inbox`, {
33
+ const res = await fetch(`${this.baseUrl}/inbox`, {
34
34
  headers: this.headers(),
35
35
  });
36
36
  const body = await res.text().catch(() => '');
@@ -42,7 +42,7 @@ export class InboxClient {
42
42
  async ack(scopes) {
43
43
  if (!scopes.length)
44
44
  throw new Error('InboxClient.ack: scopes are required');
45
- const res = await fetch(`${this.baseUrl}/agent-api/v1/inbox/ack`, {
45
+ const res = await fetch(`${this.baseUrl}/inbox/ack`, {
46
46
  method: 'POST',
47
47
  headers: this.headers(),
48
48
  body: JSON.stringify({ scopes }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/api-client",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "HTTP and WebSocket client for the Ziggs backend API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,9 +35,17 @@
35
35
  "dotenv": "^17.2.3",
36
36
  "socket.io-client": "^4.7.0"
37
37
  },
38
- "keywords": ["ziggs", "api", "client", "websocket"],
38
+ "keywords": [
39
+ "ziggs",
40
+ "api",
41
+ "client",
42
+ "websocket"
43
+ ],
39
44
  "license": "MIT",
40
- "files": ["dist", "README.md"],
45
+ "files": [
46
+ "dist",
47
+ "README.md"
48
+ ],
41
49
  "publishConfig": {
42
50
  "access": "public",
43
51
  "registry": "https://registry.npmjs.org/"