loki-mode-sdk 5.52.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Loki Mode Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # loki-mode-sdk
2
+
3
+ TypeScript/JavaScript SDK for [Loki Mode](https://github.com/asklokesh/loki-mode), the autonomous multi-agent development platform.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install loki-mode-sdk
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```typescript
14
+ import { AutonomiClient } from 'loki-mode-sdk';
15
+
16
+ const client = new AutonomiClient({
17
+ baseUrl: 'http://localhost:57374',
18
+ token: 'loki_xxx',
19
+ });
20
+
21
+ // Check dashboard health
22
+ const status = await client.getStatus();
23
+ console.log(status);
24
+
25
+ // List projects
26
+ const projects = await client.listProjects();
27
+ for (const p of projects) {
28
+ console.log(p.name, p.status);
29
+ }
30
+ ```
31
+
32
+ ## API Reference
33
+
34
+ The SDK wraps the Loki Mode Dashboard API (default port 57374).
35
+
36
+ ### Client Methods
37
+
38
+ - `client.getStatus()` - Dashboard status and version
39
+ - `client.listProjects()` - List all projects
40
+ - `client.createProject(name)` - Create a new project
41
+ - `client.getProject(id)` - Get project details
42
+ - `client.listRuns(projectId)` - List runs
43
+ - `client.cancelRun(runId)` - Cancel a running execution
44
+ - `client.queryAudit()` - Query audit trail
45
+ - `client.createApiKey(name)` - Create API key
46
+ - `client.rotateApiKey(keyId)` - Rotate API key
47
+
48
+ ## Requirements
49
+
50
+ - Node.js 18+
51
+ - Running Loki Mode instance (`npm install -g loki-mode`)
52
+
53
+ ## License
54
+
55
+ MIT
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Autonomi SDK - Audit Log Queries
3
+ *
4
+ * Audit-related operations. These are implemented as methods on AutonomiClient
5
+ * directly (see client.ts). This module re-exports the relevant types and
6
+ * documents the audit management interface for reference.
7
+ *
8
+ * Audit methods on AutonomiClient:
9
+ * - queryAudit(params?): Promise<AuditEntry[]>
10
+ * - verifyAudit(): Promise<AuditVerifyResult>
11
+ */
12
+ export type { AuditEntry, AuditQueryParams, AuditVerifyResult } from './types.js';
13
+ //# sourceMappingURL=audit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
package/dist/audit.js ADDED
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * Autonomi SDK - Audit Log Queries
4
+ *
5
+ * Audit-related operations. These are implemented as methods on AutonomiClient
6
+ * directly (see client.ts). This module re-exports the relevant types and
7
+ * documents the audit management interface for reference.
8
+ *
9
+ * Audit methods on AutonomiClient:
10
+ * - queryAudit(params?): Promise<AuditEntry[]>
11
+ * - verifyAudit(): Promise<AuditVerifyResult>
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ //# sourceMappingURL=audit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.js","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Autonomi SDK - Main Client
3
+ *
4
+ * Core client class for interacting with the Autonomi Control Plane API.
5
+ * Uses Node.js built-in fetch (Node 18+). No external dependencies.
6
+ */
7
+ import type { ClientOptions, Project, Task, ApiKey, AuditEntry, AuditQueryParams, AuditVerifyResult, Run, RunEvent, Tenant } from './types.js';
8
+ export declare class AutonomiClient {
9
+ private baseUrl;
10
+ private token?;
11
+ private timeout;
12
+ constructor(options: ClientOptions);
13
+ _request<T>(method: string, path: string, body?: unknown, params?: Record<string, string>): Promise<T>;
14
+ getStatus(): Promise<Record<string, unknown>>;
15
+ listProjects(): Promise<Project[]>;
16
+ getProject(projectId: number): Promise<Project>;
17
+ createProject(name: string, description?: string): Promise<Project>;
18
+ listTasks(projectId?: number, status?: string): Promise<Task[]>;
19
+ getTask(taskId: number): Promise<Task>;
20
+ createTask(projectId: number, title: string, description?: string): Promise<Task>;
21
+ listApiKeys(): Promise<ApiKey[]>;
22
+ createApiKey(name: string, role?: string): Promise<ApiKey & {
23
+ token: string;
24
+ }>;
25
+ rotateApiKey(identifier: string, gracePeriodHours?: number): Promise<Record<string, unknown>>;
26
+ deleteApiKey(identifier: string): Promise<void>;
27
+ listRuns(projectId?: number, status?: string): Promise<Run[]>;
28
+ getRun(runId: number): Promise<Run>;
29
+ cancelRun(runId: number): Promise<Run>;
30
+ replayRun(runId: number): Promise<Run>;
31
+ getRunTimeline(runId: number): Promise<RunEvent[]>;
32
+ listTenants(): Promise<Tenant[]>;
33
+ getTenant(tenantId: number): Promise<Tenant>;
34
+ createTenant(name: string, description?: string): Promise<Tenant>;
35
+ deleteTenant(tenantId: number): Promise<void>;
36
+ queryAudit(params?: AuditQueryParams): Promise<AuditEntry[]>;
37
+ verifyAudit(): Promise<AuditVerifyResult>;
38
+ }
39
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EACP,IAAI,EACJ,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,GAAG,EACH,QAAQ,EACR,MAAM,EACP,MAAM,YAAY,CAAC;AASpB,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,aAAa;IAU5B,QAAQ,CAAC,CAAC,EACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,CAAC,CAAC;IAsEP,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAQ7C,YAAY,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAIlC,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI/C,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYnE,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAO/D,OAAO,CAAC,MAAM,EAA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AAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAS5D,WAAW,IAAI,OAAO,CAAC,iBAAiB,CAAC;CAGhD"}
package/dist/client.js ADDED
@@ -0,0 +1,209 @@
1
+ "use strict";
2
+ /**
3
+ * Autonomi SDK - Main Client
4
+ *
5
+ * Core client class for interacting with the Autonomi Control Plane API.
6
+ * Uses Node.js built-in fetch (Node 18+). No external dependencies.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AutonomiClient = void 0;
10
+ const errors_js_1 = require("./errors.js");
11
+ class AutonomiClient {
12
+ baseUrl;
13
+ token;
14
+ timeout;
15
+ constructor(options) {
16
+ this.baseUrl = options.baseUrl.replace(/\/$/, '');
17
+ this.token = options.token;
18
+ this.timeout = options.timeout ?? 30000;
19
+ }
20
+ // ------------------------------------------------------------------
21
+ // Private request helper
22
+ // ------------------------------------------------------------------
23
+ async _request(method, path, body, params) {
24
+ let url = `${this.baseUrl}${path}`;
25
+ if (params && Object.keys(params).length > 0) {
26
+ const search = new URLSearchParams(params);
27
+ url += `?${search.toString()}`;
28
+ }
29
+ const headers = {
30
+ 'Content-Type': 'application/json',
31
+ };
32
+ if (this.token) {
33
+ headers['Authorization'] = `Bearer ${this.token}`;
34
+ }
35
+ const controller = new AbortController();
36
+ const timeoutId = setTimeout(() => controller.abort(), this.timeout);
37
+ let response;
38
+ try {
39
+ response = await fetch(url, {
40
+ method,
41
+ headers,
42
+ body: body != null ? JSON.stringify(body) : undefined,
43
+ signal: controller.signal,
44
+ });
45
+ }
46
+ catch (err) {
47
+ clearTimeout(timeoutId);
48
+ const msg = err instanceof Error ? err.message : 'Network error';
49
+ throw new errors_js_1.AutonomiError(msg, 0);
50
+ }
51
+ finally {
52
+ clearTimeout(timeoutId);
53
+ }
54
+ const responseText = await response.text();
55
+ if (!response.ok) {
56
+ const statusCode = response.status;
57
+ let message = responseText;
58
+ try {
59
+ const parsed = JSON.parse(responseText);
60
+ message = parsed.error || parsed.message || parsed.detail || responseText;
61
+ }
62
+ catch {
63
+ // use raw text
64
+ }
65
+ switch (statusCode) {
66
+ case 401:
67
+ throw new errors_js_1.AuthenticationError(message, responseText);
68
+ case 403:
69
+ throw new errors_js_1.ForbiddenError(message, responseText);
70
+ case 404:
71
+ throw new errors_js_1.NotFoundError(message, responseText);
72
+ default:
73
+ throw new errors_js_1.AutonomiError(message, statusCode, responseText);
74
+ }
75
+ }
76
+ if (responseText.length === 0) {
77
+ return undefined;
78
+ }
79
+ return JSON.parse(responseText);
80
+ }
81
+ // ------------------------------------------------------------------
82
+ // Status
83
+ // ------------------------------------------------------------------
84
+ async getStatus() {
85
+ return this._request('GET', '/api/status');
86
+ }
87
+ // ------------------------------------------------------------------
88
+ // Projects
89
+ // ------------------------------------------------------------------
90
+ async listProjects() {
91
+ return this._request('GET', '/api/projects');
92
+ }
93
+ async getProject(projectId) {
94
+ return this._request('GET', `/api/projects/${projectId}`);
95
+ }
96
+ async createProject(name, description) {
97
+ const body = { name };
98
+ if (description !== undefined) {
99
+ body.description = description;
100
+ }
101
+ return this._request('POST', '/api/projects', body);
102
+ }
103
+ // ------------------------------------------------------------------
104
+ // Tasks
105
+ // ------------------------------------------------------------------
106
+ async listTasks(projectId, status) {
107
+ const params = {};
108
+ if (projectId !== undefined)
109
+ params.project_id = String(projectId);
110
+ if (status !== undefined)
111
+ params.status = status;
112
+ return this._request('GET', '/api/tasks', undefined, params);
113
+ }
114
+ async getTask(taskId) {
115
+ return this._request('GET', `/api/tasks/${taskId}`);
116
+ }
117
+ async createTask(projectId, title, description) {
118
+ const body = { project_id: projectId, title };
119
+ if (description !== undefined) {
120
+ body.description = description;
121
+ }
122
+ return this._request('POST', '/api/tasks', body);
123
+ }
124
+ // ------------------------------------------------------------------
125
+ // API Keys
126
+ // ------------------------------------------------------------------
127
+ async listApiKeys() {
128
+ return this._request('GET', '/api/v2/api-keys');
129
+ }
130
+ async createApiKey(name, role) {
131
+ const body = { name };
132
+ if (role !== undefined) {
133
+ body.role = role;
134
+ }
135
+ return this._request('POST', '/api/v2/api-keys', body);
136
+ }
137
+ async rotateApiKey(identifier, gracePeriodHours) {
138
+ const body = {};
139
+ if (gracePeriodHours !== undefined) {
140
+ body.grace_period_hours = gracePeriodHours;
141
+ }
142
+ return this._request('POST', `/api/v2/api-keys/${identifier}/rotate`, body);
143
+ }
144
+ async deleteApiKey(identifier) {
145
+ return this._request('DELETE', `/api/v2/api-keys/${identifier}`);
146
+ }
147
+ // ------------------------------------------------------------------
148
+ // Runs
149
+ // ------------------------------------------------------------------
150
+ async listRuns(projectId, status) {
151
+ const params = {};
152
+ if (projectId !== undefined)
153
+ params.project_id = String(projectId);
154
+ if (status !== undefined)
155
+ params.status = status;
156
+ return this._request('GET', '/api/v2/runs', undefined, params);
157
+ }
158
+ async getRun(runId) {
159
+ return this._request('GET', `/api/v2/runs/${runId}`);
160
+ }
161
+ async cancelRun(runId) {
162
+ return this._request('POST', `/api/v2/runs/${runId}/cancel`);
163
+ }
164
+ async replayRun(runId) {
165
+ return this._request('POST', `/api/v2/runs/${runId}/replay`);
166
+ }
167
+ async getRunTimeline(runId) {
168
+ return this._request('GET', `/api/v2/runs/${runId}/timeline`);
169
+ }
170
+ // ------------------------------------------------------------------
171
+ // Tenants
172
+ // ------------------------------------------------------------------
173
+ async listTenants() {
174
+ return this._request('GET', '/api/v2/tenants');
175
+ }
176
+ async getTenant(tenantId) {
177
+ return this._request('GET', `/api/v2/tenants/${tenantId}`);
178
+ }
179
+ async createTenant(name, description) {
180
+ const body = { name };
181
+ if (description !== undefined) {
182
+ body.description = description;
183
+ }
184
+ return this._request('POST', '/api/v2/tenants', body);
185
+ }
186
+ async deleteTenant(tenantId) {
187
+ return this._request('DELETE', `/api/v2/tenants/${tenantId}`);
188
+ }
189
+ // ------------------------------------------------------------------
190
+ // Audit
191
+ // ------------------------------------------------------------------
192
+ async queryAudit(params) {
193
+ const queryParams = {};
194
+ if (params?.start_date)
195
+ queryParams.start_date = params.start_date;
196
+ if (params?.end_date)
197
+ queryParams.end_date = params.end_date;
198
+ if (params?.action)
199
+ queryParams.action = params.action;
200
+ if (params?.limit !== undefined)
201
+ queryParams.limit = String(params.limit);
202
+ return this._request('GET', '/api/v2/audit', undefined, queryParams);
203
+ }
204
+ async verifyAudit() {
205
+ return this._request('GET', '/api/audit/verify');
206
+ }
207
+ }
208
+ exports.AutonomiClient = AutonomiClient;
209
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAeH,2CAKqB;AAErB,MAAa,cAAc;IACjB,OAAO,CAAS;IAChB,KAAK,CAAU;IACf,OAAO,CAAS;IAExB,YAAY,OAAsB;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC;IAC1C,CAAC;IAED,qEAAqE;IACrE,yBAAyB;IACzB,qEAAqE;IAErE,KAAK,CAAC,QAAQ,CACZ,MAAc,EACd,IAAY,EACZ,IAAc,EACd,MAA+B;QAE/B,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;QAEnC,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7C,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;YAC3C,GAAG,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;QACjC,CAAC;QAED,MAAM,OAAO,GAA2B;YACtC,cAAc,EAAE,kBAAkB;SACnC,CAAC;QAEF,IAAI,IAAI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C;QAC7D,IAAI,MAAM,EAAE,MAAM;YAAE,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QACvD,IAAI,MAAM,EAAE,KAAK,KAAK,SAAS;YAAE,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC1E,OAAO,IAAI,CAAC,QAAQ,CAAe,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;IACrF,CAAC;IAED,KAAK,CAAC,WAAW;QACf,OAAO,IAAI,CAAC,QAAQ,CAAoB,KAAK,EAAE,mBAAmB,CAAC,CAAC;IACtE,CAAC;CACF;AAxOD,wCAwOC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Autonomi SDK - Error Classes
3
+ *
4
+ * Typed error hierarchy for API error handling.
5
+ */
6
+ export declare class AutonomiError extends Error {
7
+ statusCode: number;
8
+ responseBody?: string;
9
+ constructor(message: string, statusCode: number, responseBody?: string);
10
+ }
11
+ export declare class AuthenticationError extends AutonomiError {
12
+ constructor(message?: string, responseBody?: string);
13
+ }
14
+ export declare class ForbiddenError extends AutonomiError {
15
+ constructor(message?: string, responseBody?: string);
16
+ }
17
+ export declare class NotFoundError extends AutonomiError {
18
+ constructor(message?: string, responseBody?: string);
19
+ }
20
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qBAAa,aAAc,SAAQ,KAAK;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEjB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;CAMvE;AAED,qBAAa,mBAAoB,SAAQ,aAAa;gBACxC,OAAO,GAAE,MAAkC,EAAE,YAAY,CAAC,EAAE,MAAM;CAI/E;AAED,qBAAa,cAAe,SAAQ,aAAa;gBACnC,OAAO,GAAE,MAA2B,EAAE,YAAY,CAAC,EAAE,MAAM;CAIxE;AAED,qBAAa,aAAc,SAAQ,aAAa;gBAClC,OAAO,GAAE,MAA6B,EAAE,YAAY,CAAC,EAAE,MAAM;CAI1E"}
package/dist/errors.js ADDED
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * Autonomi SDK - Error Classes
4
+ *
5
+ * Typed error hierarchy for API error handling.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.NotFoundError = exports.ForbiddenError = exports.AuthenticationError = exports.AutonomiError = void 0;
9
+ class AutonomiError extends Error {
10
+ statusCode;
11
+ responseBody;
12
+ constructor(message, statusCode, responseBody) {
13
+ super(message);
14
+ this.name = 'AutonomiError';
15
+ this.statusCode = statusCode;
16
+ this.responseBody = responseBody;
17
+ }
18
+ }
19
+ exports.AutonomiError = AutonomiError;
20
+ class AuthenticationError extends AutonomiError {
21
+ constructor(message = 'Authentication required', responseBody) {
22
+ super(message, 401, responseBody);
23
+ this.name = 'AuthenticationError';
24
+ }
25
+ }
26
+ exports.AuthenticationError = AuthenticationError;
27
+ class ForbiddenError extends AutonomiError {
28
+ constructor(message = 'Access forbidden', responseBody) {
29
+ super(message, 403, responseBody);
30
+ this.name = 'ForbiddenError';
31
+ }
32
+ }
33
+ exports.ForbiddenError = ForbiddenError;
34
+ class NotFoundError extends AutonomiError {
35
+ constructor(message = 'Resource not found', responseBody) {
36
+ super(message, 404, responseBody);
37
+ this.name = 'NotFoundError';
38
+ }
39
+ }
40
+ exports.NotFoundError = NotFoundError;
41
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,MAAa,aAAc,SAAQ,KAAK;IAC/B,UAAU,CAAS;IACnB,YAAY,CAAU;IAE7B,YAAY,OAAe,EAAE,UAAkB,EAAE,YAAqB;QACpE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AAVD,sCAUC;AAED,MAAa,mBAAoB,SAAQ,aAAa;IACpD,YAAY,UAAkB,yBAAyB,EAAE,YAAqB;QAC5E,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AALD,kDAKC;AAED,MAAa,cAAe,SAAQ,aAAa;IAC/C,YAAY,UAAkB,kBAAkB,EAAE,YAAqB;QACrE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AALD,wCAKC;AAED,MAAa,aAAc,SAAQ,aAAa;IAC9C,YAAY,UAAkB,oBAAoB,EAAE,YAAqB;QACvE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AALD,sCAKC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Loki Mode SDK - Public API
3
+ *
4
+ * loki-mode-sdk - TypeScript/Node.js SDK for the Loki Mode Control Plane API.
5
+ *
6
+ * Usage:
7
+ * import { AutonomiClient } from 'loki-mode-sdk';
8
+ * const client = new AutonomiClient({ baseUrl: 'http://localhost:57374', token: 'loki_xxx' });
9
+ * const projects = await client.listProjects();
10
+ */
11
+ export { AutonomiClient } from './client.js';
12
+ export type { ClientOptions, Project, Task, Run, RunEvent, Tenant, ApiKey, AuditEntry, AuditQueryParams, AuditVerifyResult, } from './types.js';
13
+ export { AutonomiError, AuthenticationError, ForbiddenError, NotFoundError, } from './errors.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,YAAY,EACV,aAAa,EACb,OAAO,EACP,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,MAAM,EACN,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,aAAa,GACd,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * Loki Mode SDK - Public API
4
+ *
5
+ * loki-mode-sdk - TypeScript/Node.js SDK for the Loki Mode Control Plane API.
6
+ *
7
+ * Usage:
8
+ * import { AutonomiClient } from 'loki-mode-sdk';
9
+ * const client = new AutonomiClient({ baseUrl: 'http://localhost:57374', token: 'loki_xxx' });
10
+ * const projects = await client.listProjects();
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.NotFoundError = exports.ForbiddenError = exports.AuthenticationError = exports.AutonomiError = exports.AutonomiClient = void 0;
14
+ // Main client
15
+ var client_js_1 = require("./client.js");
16
+ Object.defineProperty(exports, "AutonomiClient", { enumerable: true, get: function () { return client_js_1.AutonomiClient; } });
17
+ // Errors
18
+ var errors_js_1 = require("./errors.js");
19
+ Object.defineProperty(exports, "AutonomiError", { enumerable: true, get: function () { return errors_js_1.AutonomiError; } });
20
+ Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: function () { return errors_js_1.AuthenticationError; } });
21
+ Object.defineProperty(exports, "ForbiddenError", { enumerable: true, get: function () { return errors_js_1.ForbiddenError; } });
22
+ Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return errors_js_1.NotFoundError; } });
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,cAAc;AACd,yCAA6C;AAApC,2GAAA,cAAc,OAAA;AAgBvB,SAAS;AACT,yCAKqB;AAJnB,0GAAA,aAAa,OAAA;AACb,gHAAA,mBAAmB,OAAA;AACnB,2GAAA,cAAc,OAAA;AACd,0GAAA,aAAa,OAAA"}
package/dist/runs.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Autonomi SDK - Run Management
3
+ *
4
+ * Run-related operations. These are implemented as methods on AutonomiClient
5
+ * directly (see client.ts). This module re-exports the relevant types and
6
+ * documents the run management interface for reference.
7
+ *
8
+ * Run methods on AutonomiClient:
9
+ * - listRuns(projectId?, status?): Promise<Run[]>
10
+ * - getRun(runId): Promise<Run>
11
+ * - cancelRun(runId): Promise<Run>
12
+ * - replayRun(runId): Promise<Run>
13
+ * - getRunTimeline(runId): Promise<RunEvent[]>
14
+ */
15
+ export type { Run, RunEvent } from './types.js';
16
+ //# sourceMappingURL=runs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../src/runs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,YAAY,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
package/dist/runs.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * Autonomi SDK - Run Management
4
+ *
5
+ * Run-related operations. These are implemented as methods on AutonomiClient
6
+ * directly (see client.ts). This module re-exports the relevant types and
7
+ * documents the run management interface for reference.
8
+ *
9
+ * Run methods on AutonomiClient:
10
+ * - listRuns(projectId?, status?): Promise<Run[]>
11
+ * - getRun(runId): Promise<Run>
12
+ * - cancelRun(runId): Promise<Run>
13
+ * - replayRun(runId): Promise<Run>
14
+ * - getRunTimeline(runId): Promise<RunEvent[]>
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ //# sourceMappingURL=runs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs.js","sourceRoot":"","sources":["../src/runs.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Autonomi SDK - Tenant Management
3
+ *
4
+ * Tenant-related operations. These are implemented as methods on AutonomiClient
5
+ * directly (see client.ts). This module re-exports the relevant types and
6
+ * documents the tenant management interface for reference.
7
+ *
8
+ * Tenant methods on AutonomiClient:
9
+ * - listTenants(): Promise<Tenant[]>
10
+ * - getTenant(tenantId): Promise<Tenant>
11
+ * - createTenant(name, description?): Promise<Tenant>
12
+ * - deleteTenant(tenantId): Promise<void>
13
+ */
14
+ export type { Tenant } from './types.js';
15
+ //# sourceMappingURL=tenants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenants.d.ts","sourceRoot":"","sources":["../src/tenants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,YAAY,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * Autonomi SDK - Tenant Management
4
+ *
5
+ * Tenant-related operations. These are implemented as methods on AutonomiClient
6
+ * directly (see client.ts). This module re-exports the relevant types and
7
+ * documents the tenant management interface for reference.
8
+ *
9
+ * Tenant methods on AutonomiClient:
10
+ * - listTenants(): Promise<Tenant[]>
11
+ * - getTenant(tenantId): Promise<Tenant>
12
+ * - createTenant(name, description?): Promise<Tenant>
13
+ * - deleteTenant(tenantId): Promise<void>
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ //# sourceMappingURL=tenants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenants.js","sourceRoot":"","sources":["../src/tenants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Autonomi SDK - TypeScript Interfaces
3
+ *
4
+ * Core data types for the Autonomi Control Plane API.
5
+ */
6
+ export interface Project {
7
+ id: number;
8
+ name: string;
9
+ description?: string;
10
+ status: string;
11
+ tenant_id?: number;
12
+ created_at: string;
13
+ updated_at: string;
14
+ }
15
+ export interface Task {
16
+ id: number;
17
+ project_id: number;
18
+ title: string;
19
+ description?: string;
20
+ status: string;
21
+ priority: string;
22
+ }
23
+ export interface Run {
24
+ id: number;
25
+ project_id: number;
26
+ status: string;
27
+ trigger: string;
28
+ config?: Record<string, unknown>;
29
+ started_at: string;
30
+ ended_at?: string;
31
+ }
32
+ export interface RunEvent {
33
+ id: number;
34
+ run_id: number;
35
+ event_type: string;
36
+ phase?: string;
37
+ details?: Record<string, unknown>;
38
+ timestamp: string;
39
+ }
40
+ export interface Tenant {
41
+ id: number;
42
+ name: string;
43
+ slug: string;
44
+ description?: string;
45
+ created_at: string;
46
+ }
47
+ export interface ApiKey {
48
+ id: string;
49
+ name: string;
50
+ scopes: string[];
51
+ role?: string;
52
+ created_at: string;
53
+ expires_at?: string;
54
+ last_used?: string;
55
+ }
56
+ export interface AuditEntry {
57
+ timestamp: string;
58
+ action: string;
59
+ resource_type: string;
60
+ resource_id?: string;
61
+ user_id?: string;
62
+ success: boolean;
63
+ }
64
+ export interface AuditQueryParams {
65
+ start_date?: string;
66
+ end_date?: string;
67
+ action?: string;
68
+ limit?: number;
69
+ }
70
+ export interface AuditVerifyResult {
71
+ valid: boolean;
72
+ entries_checked: number;
73
+ }
74
+ export interface ClientOptions {
75
+ baseUrl: string;
76
+ token?: string;
77
+ timeout?: number;
78
+ }
79
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAA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,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
package/dist/types.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ /**
3
+ * Autonomi SDK - TypeScript Interfaces
4
+ *
5
+ * Core data types for the Autonomi Control Plane API.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "loki-mode-sdk",
3
+ "version": "5.52.2",
4
+ "description": "TypeScript SDK for Loki Mode - autonomous multi-agent development platform",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist/",
9
+ "README.md",
10
+ "LICENSE"
11
+ ],
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "prepublishOnly": "npm run build",
15
+ "test": "node --test tests/client.test.js"
16
+ },
17
+ "keywords": [
18
+ "loki-mode",
19
+ "autonomous",
20
+ "ai-agents",
21
+ "multi-agent",
22
+ "developer-tools",
23
+ "sdk",
24
+ "devtools",
25
+ "automation",
26
+ "claude",
27
+ "anthropic"
28
+ ],
29
+ "author": "Lokesh Mure <lokesh@autonomi.dev>",
30
+ "license": "MIT",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/asklokesh/loki-mode.git",
34
+ "directory": "sdk/typescript"
35
+ },
36
+ "homepage": "https://github.com/asklokesh/loki-mode",
37
+ "bugs": {
38
+ "url": "https://github.com/asklokesh/loki-mode/issues"
39
+ },
40
+ "engines": {
41
+ "node": ">=18"
42
+ },
43
+ "devDependencies": {
44
+ "typescript": "^5.9.3"
45
+ }
46
+ }