@north-light/sdk 0.3.694 → 0.3.695
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/README.md +5 -72
- package/dist/client.d.ts +12 -80
- package/dist/client.js +7 -255
- package/dist/index.d.ts +3 -7
- package/dist/index.js +1 -3
- package/dist/oauth/index.d.ts +3 -6
- package/dist/oauth/index.js +6 -11
- package/dist/resources/canvas.d.ts +2 -9
- package/dist/resources/canvas.js +1 -26
- package/dist/resources/files.d.ts +0 -10
- package/dist/resources/files.js +0 -14
- package/dist/resources/identifiers.d.ts +0 -5
- package/dist/resources/identifiers.js +3 -23
- package/dist/resources/models/credentials.d.ts +1 -3
- package/dist/resources/models/credentials.js +0 -6
- package/dist/resources/models.d.ts +0 -2
- package/dist/resources/models.js +0 -3
- package/dist/resources/run-stream.d.ts +3 -29
- package/dist/resources/run-stream.js +4 -44
- package/dist/resources/runs.d.ts +0 -3
- package/dist/resources/runs.js +0 -9
- package/dist/skill/northlight/SKILL.md +2 -2
- package/dist/types.d.ts +0 -50
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -5
- package/dist/resources/activity.d.ts +0 -22
- package/dist/resources/activity.js +0 -43
- package/dist/resources/bash.d.ts +0 -9
- package/dist/resources/bash.js +0 -15
- package/dist/resources/canvas/history.d.ts +0 -11
- package/dist/resources/canvas/history.js +0 -20
- package/dist/resources/crons.d.ts +0 -15
- package/dist/resources/crons.js +0 -33
- package/dist/resources/human/inbox.d.ts +0 -14
- package/dist/resources/human/inbox.js +0 -30
- package/dist/resources/human/requests.d.ts +0 -13
- package/dist/resources/human/requests.js +0 -26
- package/dist/resources/human.d.ts +0 -8
- package/dist/resources/human.js +0 -10
- package/dist/resources/models/config.d.ts +0 -8
- package/dist/resources/models/config.js +0 -9
- package/dist/resources/node-stream.d.ts +0 -34
- package/dist/resources/node-stream.js +0 -176
- package/dist/resources/nodes/jobs.d.ts +0 -9
- package/dist/resources/nodes/jobs.js +0 -14
- package/dist/resources/nodes/result.d.ts +0 -8
- package/dist/resources/nodes/result.js +0 -11
- package/dist/resources/nodes/worktree.d.ts +0 -9
- package/dist/resources/nodes/worktree.js +0 -14
- package/dist/resources/nodes.d.ts +0 -23
- package/dist/resources/nodes.js +0 -47
- package/dist/resources/structured-requests.d.ts +0 -14
- package/dist/resources/structured-requests.js +0 -19
package/dist/resources/nodes.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { routes, } from '@north-light/api';
|
|
2
|
-
import { nodeId } from './identifiers.js';
|
|
3
|
-
import { NodeJobs } from './nodes/jobs.js';
|
|
4
|
-
import { NodeResult } from './nodes/result.js';
|
|
5
|
-
import { NodeWorktree } from './nodes/worktree.js';
|
|
6
|
-
export class NodesResource {
|
|
7
|
-
request;
|
|
8
|
-
jobs;
|
|
9
|
-
worktree;
|
|
10
|
-
result;
|
|
11
|
-
constructor(request) {
|
|
12
|
-
this.request = request;
|
|
13
|
-
this.jobs = new NodeJobs(request);
|
|
14
|
-
this.worktree = new NodeWorktree(request);
|
|
15
|
-
this.result = new NodeResult(request);
|
|
16
|
-
}
|
|
17
|
-
async update(id, patch, options) {
|
|
18
|
-
return this.request('PATCH', routes.nodeConfig(nodeId(id)), patch, options);
|
|
19
|
-
}
|
|
20
|
-
async fork(id, options) {
|
|
21
|
-
return this.request('POST', routes.nodeFork(nodeId(id)), {}, options);
|
|
22
|
-
}
|
|
23
|
-
async revive(id, body, options) {
|
|
24
|
-
return this.request('POST', routes.nodeRevive(nodeId(id)), body ?? {}, options);
|
|
25
|
-
}
|
|
26
|
-
reviveAll(options) {
|
|
27
|
-
return this.request('POST', routes.reviveAll(), {}, options);
|
|
28
|
-
}
|
|
29
|
-
async promote(id, body, options) {
|
|
30
|
-
return this.request('POST', routes.nodePromote(nodeId(id)), body ?? {}, options);
|
|
31
|
-
}
|
|
32
|
-
async demote(id, options) {
|
|
33
|
-
return this.request('POST', routes.nodeDemote(nodeId(id)), {}, options);
|
|
34
|
-
}
|
|
35
|
-
async recycle(id, options) {
|
|
36
|
-
return this.request('POST', routes.nodeRecycle(nodeId(id)), {}, options);
|
|
37
|
-
}
|
|
38
|
-
async yield(id, body, options) {
|
|
39
|
-
return this.request('POST', routes.nodeYield(nodeId(id)), body ?? {}, options);
|
|
40
|
-
}
|
|
41
|
-
async wait(id, body, options) {
|
|
42
|
-
return this.request('POST', routes.nodeWait(nodeId(id)), body, options);
|
|
43
|
-
}
|
|
44
|
-
async relaunchRoot(id, options) {
|
|
45
|
-
return this.request('POST', routes.nodeRelaunchRoot(nodeId(id)), {}, options);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { CreateStructuredRequest, CreateStructuredRequestResponse, StructuredRequestDTO } from '@north-light/api';
|
|
2
|
-
import type { RequestOptions } from '../types.js';
|
|
3
|
-
import type { Request } from './request.js';
|
|
4
|
-
/** Durable structured requests: a schema-bound question to a new or existing node, settled once. */
|
|
5
|
-
export declare class StructuredRequests {
|
|
6
|
-
private readonly request;
|
|
7
|
-
constructor(request: Request);
|
|
8
|
-
create(body: CreateStructuredRequest, options?: RequestOptions): Promise<CreateStructuredRequestResponse>;
|
|
9
|
-
/** `wait` (0–25 seconds) long-polls until the request settles. */
|
|
10
|
-
retrieve(requestId: string, query?: {
|
|
11
|
-
wait?: number;
|
|
12
|
-
}, options?: RequestOptions): Promise<StructuredRequestDTO>;
|
|
13
|
-
cancel(requestId: string, options?: RequestOptions): Promise<StructuredRequestDTO>;
|
|
14
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { pathSegment } from './identifiers.js';
|
|
2
|
-
import { withQuery } from './request.js';
|
|
3
|
-
/** Durable structured requests: a schema-bound question to a new or existing node, settled once. */
|
|
4
|
-
export class StructuredRequests {
|
|
5
|
-
request;
|
|
6
|
-
constructor(request) {
|
|
7
|
-
this.request = request;
|
|
8
|
-
}
|
|
9
|
-
create(body, options) {
|
|
10
|
-
return this.request('POST', '/v1/structured-requests', body, options);
|
|
11
|
-
}
|
|
12
|
-
/** `wait` (0–25 seconds) long-polls until the request settles. */
|
|
13
|
-
retrieve(requestId, query, options) {
|
|
14
|
-
return this.request('GET', withQuery(`/v1/structured-requests/${pathSegment(requestId, 'request id')}`, query), undefined, options);
|
|
15
|
-
}
|
|
16
|
-
cancel(requestId, options) {
|
|
17
|
-
return this.request('POST', `/v1/structured-requests/${pathSegment(requestId, 'request id')}/cancel`, {}, options);
|
|
18
|
-
}
|
|
19
|
-
}
|