@ubiquity-os/plugin-sdk 3.7.0 → 3.8.0
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/dist/configuration.d.mts +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/{context-Ckj1HMjz.d.mts → context-Dwl3aRX-.d.mts} +28 -0
- package/dist/{context-BE4WjJZf.d.ts → context-zLHgu52i.d.ts} +28 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +788 -101
- package/dist/index.mjs +788 -101
- package/dist/llm.d.mts +1 -1
- package/dist/llm.d.ts +1 -1
- package/package.json +1 -1
package/dist/configuration.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { Value } from '@sinclair/typebox/value';
|
|
|
2
2
|
import YAML from 'js-yaml';
|
|
3
3
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
4
4
|
import { StaticDecode, TLiteral } from '@sinclair/typebox';
|
|
5
|
-
import { C as Context } from './context-
|
|
5
|
+
import { C as Context } from './context-Dwl3aRX-.mjs';
|
|
6
6
|
import { Manifest } from './manifest.mjs';
|
|
7
7
|
import '@octokit/webhooks';
|
|
8
8
|
import '@ubiquity-os/ubiquity-os-logger';
|
package/dist/configuration.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Value } from '@sinclair/typebox/value';
|
|
|
2
2
|
import YAML from 'js-yaml';
|
|
3
3
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
4
4
|
import { StaticDecode, TLiteral } from '@sinclair/typebox';
|
|
5
|
-
import { C as Context } from './context-
|
|
5
|
+
import { C as Context } from './context-zLHgu52i.js';
|
|
6
6
|
import { Manifest } from './manifest.js';
|
|
7
7
|
import '@octokit/webhooks';
|
|
8
8
|
import '@ubiquity-os/ubiquity-os-logger';
|
|
@@ -7,6 +7,7 @@ import { customOctokit } from './octokit.mjs';
|
|
|
7
7
|
interface CommentOptions {
|
|
8
8
|
raw?: boolean;
|
|
9
9
|
updateComment?: boolean;
|
|
10
|
+
commentKind?: string;
|
|
10
11
|
}
|
|
11
12
|
type PostedGithubComment = RestEndpointMethodTypes["issues"]["updateComment"]["response"]["data"] | RestEndpointMethodTypes["issues"]["createComment"]["response"]["data"] | RestEndpointMethodTypes["pulls"]["createReplyForReviewComment"]["response"]["data"];
|
|
12
13
|
type WithIssueNumber<T> = T & {
|
|
@@ -18,9 +19,19 @@ interface IssueContext {
|
|
|
18
19
|
owner: string;
|
|
19
20
|
repo: string;
|
|
20
21
|
}
|
|
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
|
+
};
|
|
21
31
|
declare class CommentHandler {
|
|
22
32
|
static readonly HEADER_NAME = "UbiquityOS";
|
|
23
33
|
private _lastCommentId;
|
|
34
|
+
private _commandResponsePolicyApplied;
|
|
24
35
|
_updateIssueComment(context: Context, params: {
|
|
25
36
|
owner: string;
|
|
26
37
|
repo: string;
|
|
@@ -42,7 +53,24 @@ declare class CommentHandler {
|
|
|
42
53
|
}): Promise<WithIssueNumber<PostedGithubComment>>;
|
|
43
54
|
_getIssueNumber(context: Context): number | undefined;
|
|
44
55
|
_getCommentId(context: Context): number | undefined;
|
|
56
|
+
_getCommentNodeId(context: Context): string | null;
|
|
45
57
|
_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>;
|
|
46
74
|
_processMessage(context: Context, message: LogReturn | Error): {
|
|
47
75
|
metadata: {
|
|
48
76
|
status?: number | undefined;
|
|
@@ -7,6 +7,7 @@ import { customOctokit } from './octokit.js';
|
|
|
7
7
|
interface CommentOptions {
|
|
8
8
|
raw?: boolean;
|
|
9
9
|
updateComment?: boolean;
|
|
10
|
+
commentKind?: string;
|
|
10
11
|
}
|
|
11
12
|
type PostedGithubComment = RestEndpointMethodTypes["issues"]["updateComment"]["response"]["data"] | RestEndpointMethodTypes["issues"]["createComment"]["response"]["data"] | RestEndpointMethodTypes["pulls"]["createReplyForReviewComment"]["response"]["data"];
|
|
12
13
|
type WithIssueNumber<T> = T & {
|
|
@@ -18,9 +19,19 @@ interface IssueContext {
|
|
|
18
19
|
owner: string;
|
|
19
20
|
repo: string;
|
|
20
21
|
}
|
|
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
|
+
};
|
|
21
31
|
declare class CommentHandler {
|
|
22
32
|
static readonly HEADER_NAME = "UbiquityOS";
|
|
23
33
|
private _lastCommentId;
|
|
34
|
+
private _commandResponsePolicyApplied;
|
|
24
35
|
_updateIssueComment(context: Context, params: {
|
|
25
36
|
owner: string;
|
|
26
37
|
repo: string;
|
|
@@ -42,7 +53,24 @@ declare class CommentHandler {
|
|
|
42
53
|
}): Promise<WithIssueNumber<PostedGithubComment>>;
|
|
43
54
|
_getIssueNumber(context: Context): number | undefined;
|
|
44
55
|
_getCommentId(context: Context): number | undefined;
|
|
56
|
+
_getCommentNodeId(context: Context): string | null;
|
|
45
57
|
_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>;
|
|
46
74
|
_processMessage(context: Context, message: LogReturn | Error): {
|
|
47
75
|
metadata: {
|
|
48
76
|
status?: number | undefined;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-Dwl3aRX-.mjs';
|
|
3
|
+
export { a as CommentHandler } from './context-Dwl3aRX-.mjs';
|
|
4
4
|
import { TSchema, TAnySchema } from '@sinclair/typebox';
|
|
5
5
|
import { LogLevel } from '@ubiquity-os/ubiquity-os-logger';
|
|
6
6
|
import * as hono_types from 'hono/types';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-zLHgu52i.js';
|
|
3
|
+
export { a as CommentHandler } from './context-zLHgu52i.js';
|
|
4
4
|
import { TSchema, TAnySchema } from '@sinclair/typebox';
|
|
5
5
|
import { LogLevel } from '@ubiquity-os/ubiquity-os-logger';
|
|
6
6
|
import * as hono_types from 'hono/types';
|