@ubiquity-os/plugin-sdk 3.8.0 → 3.8.4
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 +109 -34
- package/dist/configuration.d.mts +12 -21
- package/dist/configuration.d.ts +12 -21
- package/dist/configuration.js +63 -2873
- package/dist/configuration.mjs +53 -2873
- package/dist/{context-zLHgu52i.d.ts → context-BbEmsEct.d.ts} +0 -29
- package/dist/{context-Dwl3aRX-.d.mts → context-sqbr2o6i.d.mts} +0 -29
- package/dist/index.d.mts +4 -5
- package/dist/index.d.ts +4 -5
- package/dist/index.js +226 -3114
- package/dist/index.mjs +218 -3106
- package/dist/llm.d.mts +44 -7
- package/dist/llm.d.ts +44 -7
- package/dist/llm.js +41 -132
- package/dist/llm.mjs +41 -132
- package/dist/octokit.d.mts +2 -2
- package/dist/octokit.d.ts +2 -2
- package/dist/octokit.js +2 -164
- package/dist/octokit.mjs +1 -163
- package/dist/signature.d.mts +3 -1
- package/dist/signature.d.ts +3 -1
- package/dist/signature.js +6 -3
- package/dist/signature.mjs +6 -3
- package/package.json +40 -43
|
@@ -7,7 +7,6 @@ import { customOctokit } from './octokit.js';
|
|
|
7
7
|
interface CommentOptions {
|
|
8
8
|
raw?: boolean;
|
|
9
9
|
updateComment?: boolean;
|
|
10
|
-
commentKind?: string;
|
|
11
10
|
}
|
|
12
11
|
type PostedGithubComment = RestEndpointMethodTypes["issues"]["updateComment"]["response"]["data"] | RestEndpointMethodTypes["issues"]["createComment"]["response"]["data"] | RestEndpointMethodTypes["pulls"]["createReplyForReviewComment"]["response"]["data"];
|
|
13
12
|
type WithIssueNumber<T> = T & {
|
|
@@ -19,19 +18,9 @@ interface IssueContext {
|
|
|
19
18
|
owner: string;
|
|
20
19
|
repo: string;
|
|
21
20
|
}
|
|
22
|
-
type GraphqlCommentNode = {
|
|
23
|
-
id: string;
|
|
24
|
-
body?: string | null;
|
|
25
|
-
isMinimized?: boolean | null;
|
|
26
|
-
minimizedReason?: string | null;
|
|
27
|
-
author?: {
|
|
28
|
-
login?: string | null;
|
|
29
|
-
} | null;
|
|
30
|
-
};
|
|
31
21
|
declare class CommentHandler {
|
|
32
22
|
static readonly HEADER_NAME = "UbiquityOS";
|
|
33
23
|
private _lastCommentId;
|
|
34
|
-
private _commandResponsePolicyApplied;
|
|
35
24
|
_updateIssueComment(context: Context, params: {
|
|
36
25
|
owner: string;
|
|
37
26
|
repo: string;
|
|
@@ -53,27 +42,9 @@ declare class CommentHandler {
|
|
|
53
42
|
}): Promise<WithIssueNumber<PostedGithubComment>>;
|
|
54
43
|
_getIssueNumber(context: Context): number | undefined;
|
|
55
44
|
_getCommentId(context: Context): number | undefined;
|
|
56
|
-
_getCommentNodeId(context: Context): string | null;
|
|
57
45
|
_extractIssueContext(context: Context): IssueContext | null;
|
|
58
|
-
_extractIssueLocator(context: Context): {
|
|
59
|
-
owner: string;
|
|
60
|
-
repo: string;
|
|
61
|
-
issueNumber: number;
|
|
62
|
-
} | null;
|
|
63
|
-
_shouldApplyCommandResponsePolicy(context: Context): boolean;
|
|
64
|
-
_isCommandResponseComment(body: string | null | undefined): boolean;
|
|
65
|
-
_getGraphqlClient(context: Context): ((query: string, variables?: Record<string, unknown>) => Promise<unknown>) | null;
|
|
66
|
-
_fetchRecentComments(context: Context, locator: {
|
|
67
|
-
owner: string;
|
|
68
|
-
repo: string;
|
|
69
|
-
issueNumber: number;
|
|
70
|
-
}, last?: number): Promise<GraphqlCommentNode[]>;
|
|
71
|
-
_findPreviousCommandResponseComment(comments: GraphqlCommentNode[], currentCommentId: string | null): GraphqlCommentNode | null;
|
|
72
|
-
_minimizeComment(context: Context, commentNodeId: string, classifier?: "RESOLVED" | "OUTDATED"): Promise<void>;
|
|
73
|
-
_applyCommandResponsePolicy(context: Context): Promise<void>;
|
|
74
46
|
_processMessage(context: Context, message: LogReturn | Error): {
|
|
75
47
|
metadata: {
|
|
76
|
-
status?: number | undefined;
|
|
77
48
|
message: string;
|
|
78
49
|
name: string;
|
|
79
50
|
stack: string | undefined;
|
|
@@ -7,7 +7,6 @@ import { customOctokit } from './octokit.mjs';
|
|
|
7
7
|
interface CommentOptions {
|
|
8
8
|
raw?: boolean;
|
|
9
9
|
updateComment?: boolean;
|
|
10
|
-
commentKind?: string;
|
|
11
10
|
}
|
|
12
11
|
type PostedGithubComment = RestEndpointMethodTypes["issues"]["updateComment"]["response"]["data"] | RestEndpointMethodTypes["issues"]["createComment"]["response"]["data"] | RestEndpointMethodTypes["pulls"]["createReplyForReviewComment"]["response"]["data"];
|
|
13
12
|
type WithIssueNumber<T> = T & {
|
|
@@ -19,19 +18,9 @@ interface IssueContext {
|
|
|
19
18
|
owner: string;
|
|
20
19
|
repo: string;
|
|
21
20
|
}
|
|
22
|
-
type GraphqlCommentNode = {
|
|
23
|
-
id: string;
|
|
24
|
-
body?: string | null;
|
|
25
|
-
isMinimized?: boolean | null;
|
|
26
|
-
minimizedReason?: string | null;
|
|
27
|
-
author?: {
|
|
28
|
-
login?: string | null;
|
|
29
|
-
} | null;
|
|
30
|
-
};
|
|
31
21
|
declare class CommentHandler {
|
|
32
22
|
static readonly HEADER_NAME = "UbiquityOS";
|
|
33
23
|
private _lastCommentId;
|
|
34
|
-
private _commandResponsePolicyApplied;
|
|
35
24
|
_updateIssueComment(context: Context, params: {
|
|
36
25
|
owner: string;
|
|
37
26
|
repo: string;
|
|
@@ -53,27 +42,9 @@ declare class CommentHandler {
|
|
|
53
42
|
}): Promise<WithIssueNumber<PostedGithubComment>>;
|
|
54
43
|
_getIssueNumber(context: Context): number | undefined;
|
|
55
44
|
_getCommentId(context: Context): number | undefined;
|
|
56
|
-
_getCommentNodeId(context: Context): string | null;
|
|
57
45
|
_extractIssueContext(context: Context): IssueContext | null;
|
|
58
|
-
_extractIssueLocator(context: Context): {
|
|
59
|
-
owner: string;
|
|
60
|
-
repo: string;
|
|
61
|
-
issueNumber: number;
|
|
62
|
-
} | null;
|
|
63
|
-
_shouldApplyCommandResponsePolicy(context: Context): boolean;
|
|
64
|
-
_isCommandResponseComment(body: string | null | undefined): boolean;
|
|
65
|
-
_getGraphqlClient(context: Context): ((query: string, variables?: Record<string, unknown>) => Promise<unknown>) | null;
|
|
66
|
-
_fetchRecentComments(context: Context, locator: {
|
|
67
|
-
owner: string;
|
|
68
|
-
repo: string;
|
|
69
|
-
issueNumber: number;
|
|
70
|
-
}, last?: number): Promise<GraphqlCommentNode[]>;
|
|
71
|
-
_findPreviousCommandResponseComment(comments: GraphqlCommentNode[], currentCommentId: string | null): GraphqlCommentNode | null;
|
|
72
|
-
_minimizeComment(context: Context, commentNodeId: string, classifier?: "RESOLVED" | "OUTDATED"): Promise<void>;
|
|
73
|
-
_applyCommandResponsePolicy(context: Context): Promise<void>;
|
|
74
46
|
_processMessage(context: Context, message: LogReturn | Error): {
|
|
75
47
|
metadata: {
|
|
76
|
-
status?: number | undefined;
|
|
77
48
|
message: string;
|
|
78
49
|
name: string;
|
|
79
50
|
stack: string | undefined;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { EmitterWebhookEventName } from '@octokit/webhooks';
|
|
2
|
-
import { C as Context } from './context-
|
|
3
|
-
export { a as CommentHandler } from './context-
|
|
2
|
+
import { C as Context } from './context-sqbr2o6i.mjs';
|
|
3
|
+
export { a as CommentHandler } from './context-sqbr2o6i.mjs';
|
|
4
4
|
import { TSchema, TAnySchema } from '@sinclair/typebox';
|
|
5
5
|
import { LogLevel } from '@ubiquity-os/ubiquity-os-logger';
|
|
6
|
+
export { LlmCallOptions, callLlm } from './llm.mjs';
|
|
6
7
|
import * as hono_types from 'hono/types';
|
|
7
8
|
import { Hono } from 'hono';
|
|
8
9
|
import { Manifest } from './manifest.mjs';
|
|
9
|
-
export { callLlm } from './llm.mjs';
|
|
10
10
|
import '@octokit/plugin-rest-endpoint-methods';
|
|
11
11
|
import './octokit.mjs';
|
|
12
12
|
import '@octokit/core/types';
|
|
13
13
|
import '@octokit/plugin-paginate-graphql';
|
|
14
14
|
import '@octokit/plugin-paginate-rest';
|
|
15
|
-
import '@octokit/request-error';
|
|
15
|
+
import '@octokit/webhooks/node_modules/@octokit/request-error';
|
|
16
16
|
import '@octokit/core';
|
|
17
17
|
import 'openai/resources/chat/completions';
|
|
18
|
-
import './signature.mjs';
|
|
19
18
|
|
|
20
19
|
type Return = Record<string, unknown> | undefined | void;
|
|
21
20
|
type HandlerReturn = Promise<Return> | Return;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { EmitterWebhookEventName } from '@octokit/webhooks';
|
|
2
|
-
import { C as Context } from './context-
|
|
3
|
-
export { a as CommentHandler } from './context-
|
|
2
|
+
import { C as Context } from './context-BbEmsEct.js';
|
|
3
|
+
export { a as CommentHandler } from './context-BbEmsEct.js';
|
|
4
4
|
import { TSchema, TAnySchema } from '@sinclair/typebox';
|
|
5
5
|
import { LogLevel } from '@ubiquity-os/ubiquity-os-logger';
|
|
6
|
+
export { LlmCallOptions, callLlm } from './llm.js';
|
|
6
7
|
import * as hono_types from 'hono/types';
|
|
7
8
|
import { Hono } from 'hono';
|
|
8
9
|
import { Manifest } from './manifest.js';
|
|
9
|
-
export { callLlm } from './llm.js';
|
|
10
10
|
import '@octokit/plugin-rest-endpoint-methods';
|
|
11
11
|
import './octokit.js';
|
|
12
12
|
import '@octokit/core/types';
|
|
13
13
|
import '@octokit/plugin-paginate-graphql';
|
|
14
14
|
import '@octokit/plugin-paginate-rest';
|
|
15
|
-
import '@octokit/request-error';
|
|
15
|
+
import '@octokit/webhooks/node_modules/@octokit/request-error';
|
|
16
16
|
import '@octokit/core';
|
|
17
17
|
import 'openai/resources/chat/completions';
|
|
18
|
-
import './signature.js';
|
|
19
18
|
|
|
20
19
|
type Return = Record<string, unknown> | undefined | void;
|
|
21
20
|
type HandlerReturn = Promise<Return> | Return;
|