@openpome/local-gateway 0.16.0-alpha.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/LICENSE ADDED
@@ -0,0 +1,158 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the
13
+ copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other
16
+ entities that control, are controlled by, or are under common control with
17
+ that entity. For the purposes of this definition, "control" means (i) the
18
+ power, direct or indirect, to cause the direction or management of such
19
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent
20
+ (50%) or more of the outstanding shares, or (iii) beneficial ownership of
21
+ such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
24
+ permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation source, and
28
+ configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical transformation
31
+ or translation of a Source form, including but not limited to compiled object
32
+ code, generated documentation, and conversions to other media types.
33
+
34
+ "Work" shall mean the work of authorship, whether in Source or Object form,
35
+ made available under the License, as indicated by a copyright notice that is
36
+ included in or attached to the work.
37
+
38
+ "Derivative Works" shall mean any work, whether in Source or Object form,
39
+ that is based on (or derived from) the Work and for which the editorial
40
+ revisions, annotations, elaborations, or other modifications represent, as a
41
+ whole, an original work of authorship. For the purposes of this License,
42
+ Derivative Works shall not include works that remain separable from, or
43
+ merely link (or bind by name) to the interfaces of, the Work and Derivative
44
+ Works thereof.
45
+
46
+ "Contribution" shall mean any work of authorship, including the original
47
+ version of the Work and any modifications or additions to that Work or
48
+ Derivative Works thereof, that is intentionally submitted to Licensor for
49
+ inclusion in the Work by the copyright owner or by an individual or Legal
50
+ Entity authorized to submit on behalf of the copyright owner. For the purposes
51
+ of this definition, "submitted" means any form of electronic, verbal, or
52
+ written communication sent to the Licensor or its representatives, including
53
+ but not limited to communication on electronic mailing lists, source code
54
+ control systems, and issue tracking systems that are managed by, or on behalf
55
+ of, the Licensor for the purpose of discussing and improving the Work, but
56
+ excluding communication that is conspicuously marked or otherwise designated
57
+ in writing by the copyright owner as "Not a Contribution."
58
+
59
+ "Contributor" shall mean Licensor and any individual or Legal Entity on
60
+ behalf of whom a Contribution has been received by Licensor and subsequently
61
+ incorporated within the Work.
62
+
63
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
64
+ License, each Contributor hereby grants to You a perpetual, worldwide,
65
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
66
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
67
+ sublicense, and distribute the Work and such Derivative Works in Source or
68
+ Object form.
69
+
70
+ 3. Grant of Patent License. Subject to the terms and conditions of this
71
+ License, each Contributor hereby grants to You a perpetual, worldwide,
72
+ non-exclusive, no-charge, royalty-free, irrevocable patent license to make,
73
+ have made, use, offer to sell, sell, import, and otherwise transfer the Work,
74
+ where such license applies only to those patent claims licensable by such
75
+ Contributor that are necessarily infringed by their Contribution alone or by
76
+ combination of their Contribution with the Work to which such Contribution was
77
+ submitted. If You institute patent litigation against any entity alleging that
78
+ the Work or a Contribution incorporated within the Work constitutes direct or
79
+ contributory patent infringement, then any patent licenses granted to You
80
+ under this License for that Work shall terminate as of the date such
81
+ litigation is filed.
82
+
83
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
84
+ Derivative Works thereof in any medium, with or without modifications, and in
85
+ Source or Object form, provided that You meet the following conditions:
86
+
87
+ (a) You must give any other recipients of the Work or Derivative Works a copy
88
+ of this License; and
89
+
90
+ (b) You must cause any modified files to carry prominent notices stating that
91
+ You changed the files; and
92
+
93
+ (c) You must retain, in the Source form of any Derivative Works that You
94
+ distribute, all copyright, patent, trademark, and attribution notices from the
95
+ Source form of the Work, excluding those notices that do not pertain to any
96
+ part of the Derivative Works; and
97
+
98
+ (d) If the Work includes a "NOTICE" text file as part of its distribution,
99
+ then any Derivative Works that You distribute must include a readable copy of
100
+ the attribution notices contained within such NOTICE file, excluding those
101
+ notices that do not pertain to any part of the Derivative Works, in at least
102
+ one of the following places: within a NOTICE text file distributed as part of
103
+ the Derivative Works; within the Source form or documentation, if provided
104
+ along with the Derivative Works; or, within a display generated by the
105
+ Derivative Works, if and wherever such third-party notices normally appear.
106
+ The contents of the NOTICE file are for informational purposes only and do not
107
+ modify the License. You may add Your own attribution notices within Derivative
108
+ Works that You distribute, alongside or as an addendum to the NOTICE text from
109
+ the Work, provided that such additional attribution notices cannot be construed
110
+ as modifying the License.
111
+
112
+ You may add Your own copyright statement to Your modifications and may provide
113
+ additional or different license terms and conditions for use, reproduction, or
114
+ distribution of Your modifications, or for any such Derivative Works as a
115
+ whole, provided Your use, reproduction, and distribution of the Work otherwise
116
+ complies with the conditions stated in this License.
117
+
118
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
119
+ Contribution intentionally submitted for inclusion in the Work by You to the
120
+ Licensor shall be under the terms and conditions of this License, without any
121
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
122
+ supersede or modify the terms of any separate license agreement you may have
123
+ executed with Licensor regarding such Contributions.
124
+
125
+ 6. Trademarks. This License does not grant permission to use the trade names,
126
+ trademarks, service marks, or product names of the Licensor, except as
127
+ required for reasonable and customary use in describing the origin of the Work
128
+ and reproducing the content of the NOTICE file.
129
+
130
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
131
+ writing, Licensor provides the Work on an "AS IS" BASIS, WITHOUT WARRANTIES OR
132
+ CONDITIONS OF ANY KIND, either express or implied, including, without
133
+ limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
134
+ MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
135
+ responsible for determining the appropriateness of using or redistributing the
136
+ Work and assume any risks associated with Your exercise of permissions under
137
+ this License.
138
+
139
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
140
+ tort (including negligence), contract, or otherwise, unless required by
141
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
142
+ writing, shall any Contributor be liable to You for damages, including any
143
+ direct, indirect, special, incidental, or consequential damages of any
144
+ character arising as a result of this License or out of the use or inability
145
+ to use the Work, even if such Contributor has been advised of the possibility
146
+ of such damages.
147
+
148
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work
149
+ or Derivative Works thereof, You may choose to offer, and charge a fee for,
150
+ acceptance of support, warranty, indemnity, or other liability obligations
151
+ and/or rights consistent with this License. However, in accepting such
152
+ obligations, You may act only on Your own behalf and on Your sole
153
+ responsibility, not on behalf of any other Contributor, and only if You agree
154
+ to indemnify, defend, and hold each Contributor harmless for any liability
155
+ incurred by, or claims asserted against, such Contributor by reason of your
156
+ accepting any such warranty or additional liability.
157
+
158
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,36 @@
1
+ import { createJiraCloudOAuthLogin, exchangeJiraCloudOAuthCode, refreshJiraCloudOAuthToken, type JiraCloudConfig, type JiraCloudOAuthExchangeRequest, type JiraCloudOAuthLogin, type JiraCloudOAuthLoginRequest, type JiraCloudOAuthRefreshRequest, type JiraCloudOAuthTokenSet } from "@openpome/connector-jira-cloud";
2
+ import type { WorkItemScopeConfig } from "@openpome/configuration";
3
+ import type { WorkItem } from "@openpome/work-items";
4
+ export type { JiraCloudConfig, JiraCloudOAuthExchangeRequest, JiraCloudOAuthLogin, JiraCloudOAuthLoginRequest, JiraCloudOAuthRefreshRequest, JiraCloudOAuthTokenSet };
5
+ export interface WorkItemSourceAuthStatus {
6
+ readonly mode: string;
7
+ readonly configured: boolean;
8
+ readonly detail: string;
9
+ readonly expiresAt?: string;
10
+ readonly refreshAvailable?: boolean;
11
+ }
12
+ export interface WorkItemSourceReachability {
13
+ readonly status: string;
14
+ readonly detail: string;
15
+ }
16
+ export interface WorkItemSourceAdapter {
17
+ readonly id: string;
18
+ readonly displayName: string;
19
+ getMode(): "live" | "mock";
20
+ getAuthStatus(): WorkItemSourceAuthStatus;
21
+ checkReachability(): Promise<WorkItemSourceReachability>;
22
+ listScopes(): Promise<readonly WorkItemScopeConfig[]>;
23
+ listAssigned(scope?: WorkItemScopeConfig): Promise<readonly WorkItem[]>;
24
+ getWorkItem(key: string): Promise<WorkItem | undefined>;
25
+ }
26
+ export interface WorkItemSourceRegistryOptions {
27
+ readonly activeScope?: WorkItemScopeConfig;
28
+ readonly connectorCredentials?: Readonly<Record<string, unknown>>;
29
+ }
30
+ export interface WorkItemSourceRegistry {
31
+ getActiveSource(env: NodeJS.ProcessEnv, options?: WorkItemSourceRegistryOptions): WorkItemSourceAdapter;
32
+ getSourceFromProviderConfig(providerId: string, config: unknown): WorkItemSourceAdapter;
33
+ }
34
+ export declare function createDefaultWorkItemSourceRegistry(): WorkItemSourceRegistry;
35
+ export { createJiraCloudOAuthLogin, exchangeJiraCloudOAuthCode, refreshJiraCloudOAuthToken };
36
+ //# sourceMappingURL=work-item-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-item-registry.d.ts","sourceRoot":"","sources":["../../src/connectors/work-item-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,KAAK,eAAe,EACpB,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,EAC5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,YAAY,EACV,eAAe,EACf,6BAA6B,EAC7B,mBAAmB,EACnB,0BAA0B,EAC1B,4BAA4B,EAC5B,sBAAsB,EACvB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,EAAE,MAAM,EAAE,OAAO,GAAG,qBAAqB,CAAC;CACzF;AAED,wBAAgB,mCAAmC,IAAI,sBAAsB,CAW5E;AAqFD,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC3B,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { JiraCloudWorkItemSource, createJiraCloudOAuthLogin, exchangeJiraCloudOAuthCode, refreshJiraCloudOAuthToken } from "@openpome/connector-jira-cloud";
2
+ export function createDefaultWorkItemSourceRegistry() {
3
+ return {
4
+ getActiveSource: (env, options) => createJiraCloudAdapter(createJiraCloudConfig(env, options)),
5
+ getSourceFromProviderConfig: (providerId, config) => {
6
+ if (providerId !== "jira-cloud") {
7
+ throw new Error(`Unsupported work item source provider: ${providerId}`);
8
+ }
9
+ return createJiraCloudAdapter(config);
10
+ }
11
+ };
12
+ }
13
+ function createJiraCloudAdapter(config) {
14
+ return new JiraCloudWorkItemSourceAdapter(config);
15
+ }
16
+ function createJiraCloudConfig(env, options) {
17
+ const oauthTokenSet = options?.connectorCredentials?.["jira-cloud/oauth"];
18
+ return {
19
+ baseUrl: env["OPENPOME_JIRA_BASE_URL"],
20
+ email: env["OPENPOME_JIRA_EMAIL"],
21
+ apiToken: env["OPENPOME_JIRA_API_TOKEN"],
22
+ boardId: options?.activeScope?.providerId === "jira-cloud" && options.activeScope.kind === "board"
23
+ ? options.activeScope.scopeId
24
+ : env["OPENPOME_JIRA_BOARD_ID"],
25
+ oauthAccessToken: oauthTokenSet?.accessToken ?? env["OPENPOME_JIRA_OAUTH_ACCESS_TOKEN"],
26
+ oauthRefreshToken: oauthTokenSet?.refreshToken ?? env["OPENPOME_JIRA_OAUTH_REFRESH_TOKEN"],
27
+ oauthCloudId: oauthTokenSet?.cloudId ?? env["OPENPOME_JIRA_OAUTH_CLOUD_ID"],
28
+ oauthExpiresAt: oauthTokenSet?.expiresAt ?? env["OPENPOME_JIRA_OAUTH_EXPIRES_AT"],
29
+ oauthClientId: env["OPENPOME_JIRA_OAUTH_CLIENT_ID"],
30
+ oauthClientSecret: env["OPENPOME_JIRA_OAUTH_CLIENT_SECRET"],
31
+ oauthRedirectUri: env["OPENPOME_JIRA_OAUTH_REDIRECT_URI"],
32
+ fixtureFile: env["OPENPOME_JIRA_FIXTURE_FILE"]
33
+ };
34
+ }
35
+ class JiraCloudWorkItemSourceAdapter {
36
+ config;
37
+ id = "jira-cloud";
38
+ displayName = "Jira Cloud";
39
+ constructor(config) {
40
+ this.config = config;
41
+ }
42
+ getMode() {
43
+ return this.createSource().getMode();
44
+ }
45
+ getAuthStatus() {
46
+ return this.createSource().getAuthStatus();
47
+ }
48
+ checkReachability() {
49
+ return this.createSource().checkReachability();
50
+ }
51
+ async listScopes() {
52
+ const boards = await this.createSource().listBoards();
53
+ return boards.map((board) => ({
54
+ providerId: this.id,
55
+ kind: "board",
56
+ scopeId: board.id,
57
+ displayName: board.name,
58
+ metadata: compactRecord({
59
+ jiraBoardType: board.type,
60
+ jiraProjectKey: board.projectKey
61
+ })
62
+ }));
63
+ }
64
+ listAssigned(scope) {
65
+ return this.createSource(scope).listAssigned();
66
+ }
67
+ getWorkItem(key) {
68
+ return this.createSource().getWorkItem(key);
69
+ }
70
+ createSource(scope) {
71
+ return new JiraCloudWorkItemSource({
72
+ ...this.config,
73
+ boardId: scope?.providerId === this.id && scope.kind === "board" ? scope.scopeId : this.config.boardId
74
+ });
75
+ }
76
+ }
77
+ function compactRecord(values) {
78
+ const entries = Object.entries(values).filter((entry) => Boolean(entry[1]));
79
+ if (entries.length === 0) {
80
+ return undefined;
81
+ }
82
+ return Object.fromEntries(entries);
83
+ }
84
+ export { createJiraCloudOAuthLogin, exchangeJiraCloudOAuthCode, refreshJiraCloudOAuthToken };
85
+ //# sourceMappingURL=work-item-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-item-registry.js","sourceRoot":"","sources":["../../src/connectors/work-item-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACv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,KAAK,CAAC,CAAC,YAAY,EAAE,CAAC;IACjD,CAAC;IAED,WAAW,CAAC,GAAW;QACrB,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;IAEO,YAAY,CAAC,KAA2B;QAC9C,OAAO,IAAI,uBAAuB,CAAC;YACjC,GAAG,IAAI,CAAC,MAAM;YACd,OAAO,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC,EAAE,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO;SACvG,CAAC,CAAC;IACL,CAAC;CACF;AAED,SAAS,aAAa,CAAC,MAAoD;IACzE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAA6B,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEvG,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAED,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC3B,CAAC"}
@@ -0,0 +1,335 @@
1
+ import { type OpenPomeConfig, type WorkItemScopeConfig } from "@openpome/configuration";
2
+ import type { ApprovalRequest } from "@openpome/approvals";
3
+ import { type WorkItem, type WorkItemType } from "@openpome/work-items";
4
+ import type { ImplementationPlan } from "@openpome/execution-plans";
5
+ import type { AITaskSession, TaskSessionEvent } from "@openpome/task-sessions";
6
+ import { type LearnedWorkspaceLink, type Workspace, type WorkspaceCandidate } from "@openpome/workspaces";
7
+ export interface GatewayHealth {
8
+ readonly status: "ok";
9
+ readonly version: string;
10
+ }
11
+ export interface InitResult {
12
+ readonly created: boolean;
13
+ readonly homeDirectory: string;
14
+ readonly configFile: string;
15
+ }
16
+ export interface ConfigPathResult {
17
+ readonly homeDirectory: string;
18
+ readonly configFile: string;
19
+ readonly workspaceIndexFile: string;
20
+ readonly workspaceLinksFile: string;
21
+ readonly activeTaskSessionFile: string;
22
+ readonly taskSessionHistoryFile: string;
23
+ }
24
+ export interface ConfigShowResult {
25
+ readonly exists: boolean;
26
+ readonly configFile: string;
27
+ readonly config: OpenPomeConfig;
28
+ }
29
+ export interface ConfigResetResult {
30
+ readonly configFile: string;
31
+ readonly config: OpenPomeConfig;
32
+ readonly resetAt: string;
33
+ }
34
+ export interface DoctorResult {
35
+ readonly status: "ok" | "attention";
36
+ readonly checks: readonly DoctorCheck[];
37
+ }
38
+ export interface DoctorCheck {
39
+ readonly name: string;
40
+ readonly status: "ok" | "attention";
41
+ readonly detail: string;
42
+ }
43
+ export interface AssignedWorkResult {
44
+ readonly sourceId: string;
45
+ readonly sourceDisplayName: string;
46
+ readonly sourceMode: "live" | "mock";
47
+ readonly activeScope?: WorkItemScopeConfig;
48
+ readonly groups: Readonly<Record<WorkItemType, readonly WorkItem[]>>;
49
+ }
50
+ export interface WorkItemScopeListResult {
51
+ readonly sourceId: string;
52
+ readonly sourceDisplayName: string;
53
+ readonly sourceMode: "live" | "mock";
54
+ readonly activeScope?: WorkItemScopeConfig;
55
+ readonly scopes: readonly WorkItemScopeConfig[];
56
+ }
57
+ export interface WorkItemScopeUseResult {
58
+ readonly sourceId: string;
59
+ readonly sourceDisplayName: string;
60
+ readonly activeScope: WorkItemScopeConfig;
61
+ readonly configFile: string;
62
+ }
63
+ export interface JiraBoardListResult {
64
+ readonly provider: "jira-cloud";
65
+ readonly sourceMode: "live" | "mock";
66
+ readonly activeScope?: WorkItemScopeConfig;
67
+ readonly boards: readonly WorkItemScopeConfig[];
68
+ }
69
+ export interface JiraBoardUseResult {
70
+ readonly provider: "jira-cloud";
71
+ readonly activeScope: WorkItemScopeConfig;
72
+ readonly configFile: string;
73
+ }
74
+ export interface AuthStatusResult {
75
+ readonly provider: "jira-cloud";
76
+ readonly mode: string;
77
+ readonly configured: boolean;
78
+ readonly detail: string;
79
+ readonly expiresAt?: string;
80
+ readonly refreshAvailable?: boolean;
81
+ }
82
+ export interface OAuthLoginResult {
83
+ readonly provider: "jira-cloud";
84
+ readonly authorizationUrl: string;
85
+ readonly redirectUri: string;
86
+ readonly state: string;
87
+ readonly scopes: readonly string[];
88
+ readonly nextStep: string;
89
+ }
90
+ export interface OAuthCompletionResult {
91
+ readonly provider: "jira-cloud";
92
+ readonly stored: boolean;
93
+ readonly mode: "oauth-3lo";
94
+ readonly cloudId?: string;
95
+ readonly siteUrl?: string;
96
+ readonly detail: string;
97
+ }
98
+ export interface WorkspaceScanResult {
99
+ readonly indexFile: string;
100
+ readonly scannedAt: string;
101
+ readonly scanPaths: readonly string[];
102
+ readonly workspaces: readonly Workspace[];
103
+ }
104
+ export interface WorkspaceListResult {
105
+ readonly indexFile: string;
106
+ readonly scannedAt?: string;
107
+ readonly workspaces: readonly Workspace[];
108
+ }
109
+ export interface WorkspaceResolveResult {
110
+ readonly workItem: WorkItem;
111
+ readonly indexFile: string;
112
+ readonly candidates: readonly WorkspaceCandidate[];
113
+ }
114
+ export interface WorkspaceLinkResult {
115
+ readonly workItemKey: string;
116
+ readonly workspace: Workspace;
117
+ readonly link: LearnedWorkspaceLink;
118
+ readonly indexFile: string;
119
+ readonly linksFile: string;
120
+ }
121
+ export interface TaskSessionStartResult {
122
+ readonly session: AITaskSession;
123
+ readonly workItem: WorkItem;
124
+ readonly workspaceCandidate?: WorkspaceCandidate;
125
+ readonly sessionFile: string;
126
+ }
127
+ export interface TaskSessionStatusResult {
128
+ readonly active: boolean;
129
+ readonly sessionFile: string;
130
+ readonly session?: AITaskSession;
131
+ readonly workItem?: WorkItem;
132
+ readonly workspaceCandidate?: WorkspaceCandidate;
133
+ readonly plan?: ImplementationPlan;
134
+ readonly planApproval?: ApprovalRequest;
135
+ readonly events?: readonly TaskSessionEvent[];
136
+ readonly approvalHistory?: readonly ApprovalRequest[];
137
+ }
138
+ export interface TaskSessionPlanResult {
139
+ readonly session: AITaskSession;
140
+ readonly workItem: WorkItem;
141
+ readonly workspaceCandidate?: WorkspaceCandidate;
142
+ readonly plan: ImplementationPlan;
143
+ readonly prompt: string;
144
+ readonly sessionFile: string;
145
+ }
146
+ export interface TaskSessionApprovalResult {
147
+ readonly session: AITaskSession;
148
+ readonly workItem: WorkItem;
149
+ readonly approval: ApprovalRequest;
150
+ readonly sessionFile: string;
151
+ readonly nextStep: string;
152
+ }
153
+ export interface TaskSessionTimelineResult {
154
+ readonly active: boolean;
155
+ readonly sessionFile: string;
156
+ readonly session?: AITaskSession;
157
+ readonly events: readonly TaskSessionEvent[];
158
+ }
159
+ export interface TaskSessionApprovalHistoryResult {
160
+ readonly active: boolean;
161
+ readonly sessionFile: string;
162
+ readonly session?: AITaskSession;
163
+ readonly approvals: readonly ApprovalRequest[];
164
+ }
165
+ export interface TaskSessionLifecycleResult {
166
+ readonly active: boolean;
167
+ readonly sessionFile: string;
168
+ readonly historyFile: string;
169
+ readonly session?: AITaskSession;
170
+ readonly message: string;
171
+ }
172
+ export interface TestCommandCandidate {
173
+ readonly id: string;
174
+ readonly command: string;
175
+ readonly source: "package_json" | "package_manager" | "fallback";
176
+ readonly reason: string;
177
+ readonly cwd?: string;
178
+ }
179
+ export interface TestCommandDiscoveryResult {
180
+ readonly active: boolean;
181
+ readonly sessionFile: string;
182
+ readonly session?: AITaskSession;
183
+ readonly workspace?: Workspace;
184
+ readonly candidates: readonly TestCommandCandidate[];
185
+ readonly discoveredAt?: string;
186
+ readonly nextStep: string;
187
+ }
188
+ export interface CommandApprovalEvidence {
189
+ readonly id: string;
190
+ readonly command: string;
191
+ readonly cwd?: string;
192
+ readonly approvedAt: string;
193
+ readonly approval: ApprovalRequest;
194
+ }
195
+ export interface TestCommandHistoryResult {
196
+ readonly active: boolean;
197
+ readonly sessionFile: string;
198
+ readonly session?: AITaskSession;
199
+ readonly evidence: readonly CommandApprovalEvidence[];
200
+ readonly runs: readonly TestRunEvidence[];
201
+ }
202
+ export interface TestRunEvidence {
203
+ readonly id: string;
204
+ readonly command: string;
205
+ readonly cwd?: string;
206
+ readonly startedAt: string;
207
+ readonly finishedAt: string;
208
+ readonly exitCode: number;
209
+ readonly status: "passed" | "failed";
210
+ readonly stdoutSummary: readonly string[];
211
+ readonly stderrSummary: readonly string[];
212
+ readonly approvalId: string;
213
+ }
214
+ export interface PullRequestDraft {
215
+ readonly title: string;
216
+ readonly body: string;
217
+ readonly baseBranch: string;
218
+ readonly headBranch: string;
219
+ readonly remoteUrl?: string;
220
+ readonly createdAt: string;
221
+ }
222
+ export interface PullRequestDraftResult {
223
+ readonly active: boolean;
224
+ readonly sessionFile: string;
225
+ readonly session?: AITaskSession;
226
+ readonly draft?: PullRequestDraft;
227
+ }
228
+ export interface WorkItemUpdateDraft {
229
+ readonly body: string;
230
+ readonly createdAt: string;
231
+ }
232
+ export interface WorkItemUpdateDraftResult {
233
+ readonly active: boolean;
234
+ readonly sessionFile: string;
235
+ readonly session?: AITaskSession;
236
+ readonly workItem?: WorkItem;
237
+ readonly draft?: WorkItemUpdateDraft;
238
+ }
239
+ export interface ManualCopyAIContext {
240
+ readonly createdAt: string;
241
+ readonly provider: "manual-copy";
242
+ readonly includesSourceCode: false;
243
+ readonly includesFullDiff: false;
244
+ readonly text: string;
245
+ }
246
+ export interface ManualCopyAIContextResult {
247
+ readonly active: boolean;
248
+ readonly sessionFile: string;
249
+ readonly session?: AITaskSession;
250
+ readonly context?: ManualCopyAIContext;
251
+ }
252
+ export interface ManualCopyAIPromptResult {
253
+ readonly active: boolean;
254
+ readonly sessionFile: string;
255
+ readonly session?: AITaskSession;
256
+ readonly prompt?: string;
257
+ }
258
+ export interface DiffFileSummary {
259
+ readonly path: string;
260
+ readonly status: string;
261
+ readonly added?: number;
262
+ readonly deleted?: number;
263
+ }
264
+ export interface DiffSummary {
265
+ readonly createdAt: string;
266
+ readonly workspacePath?: string;
267
+ readonly branch?: string;
268
+ readonly files: readonly DiffFileSummary[];
269
+ readonly statusLines: readonly string[];
270
+ readonly includesFullDiff: false;
271
+ }
272
+ export interface DiffSummaryResult {
273
+ readonly active: boolean;
274
+ readonly sessionFile: string;
275
+ readonly session?: AITaskSession;
276
+ readonly summary?: DiffSummary;
277
+ }
278
+ export interface GitHubAuthStatusResult {
279
+ readonly provider: "github";
280
+ readonly cliAvailable: boolean;
281
+ readonly authenticated: boolean;
282
+ readonly detail: string;
283
+ }
284
+ export interface ExternalActionGuardResult {
285
+ readonly active: boolean;
286
+ readonly sessionFile: string;
287
+ readonly session?: AITaskSession;
288
+ readonly action: "create_pr" | "update_work_item";
289
+ readonly allowed: false;
290
+ readonly detail: string;
291
+ readonly nextStep: string;
292
+ }
293
+ export declare function getGatewayHealth(): GatewayHealth;
294
+ export declare function initOpenPome(): Promise<InitResult>;
295
+ export declare function getConfigPaths(): Promise<ConfigPathResult>;
296
+ export declare function showOpenPomeConfig(): Promise<ConfigShowResult>;
297
+ export declare function resetOpenPomeConfig(): Promise<ConfigResetResult>;
298
+ export declare function runDoctor(env?: NodeJS.ProcessEnv): Promise<DoctorResult>;
299
+ export declare function listAssignedWork(env?: NodeJS.ProcessEnv): Promise<AssignedWorkResult>;
300
+ export declare function showWorkItem(key: string, env?: NodeJS.ProcessEnv): Promise<WorkItem | undefined>;
301
+ export declare function listWorkItemScopes(env?: NodeJS.ProcessEnv): Promise<WorkItemScopeListResult>;
302
+ export declare function useWorkItemScope(scopeId: string, env?: NodeJS.ProcessEnv): Promise<WorkItemScopeUseResult | undefined>;
303
+ export declare function listJiraBoards(env?: NodeJS.ProcessEnv): Promise<JiraBoardListResult>;
304
+ export declare function useJiraBoard(boardId: string, env?: NodeJS.ProcessEnv): Promise<JiraBoardUseResult | undefined>;
305
+ export declare function scanWorkspaces(env?: NodeJS.ProcessEnv): Promise<WorkspaceScanResult>;
306
+ export declare function listWorkspaces(): Promise<WorkspaceListResult>;
307
+ export declare function resolveWorkspaceForWorkItem(key: string, env?: NodeJS.ProcessEnv): Promise<WorkspaceResolveResult | undefined>;
308
+ export declare function linkWorkspaceToWorkItem(key: string, workspacePath: string, env?: NodeJS.ProcessEnv): Promise<WorkspaceLinkResult | undefined>;
309
+ export declare function startTaskSession(key: string, env?: NodeJS.ProcessEnv): Promise<TaskSessionStartResult | undefined>;
310
+ export declare function getTaskSessionStatus(): Promise<TaskSessionStatusResult>;
311
+ export declare function getTaskSessionTimeline(): Promise<TaskSessionTimelineResult>;
312
+ export declare function getTaskSessionApprovalHistory(): Promise<TaskSessionApprovalHistoryResult>;
313
+ export declare function stopTaskSession(): Promise<TaskSessionLifecycleResult>;
314
+ export declare function resumeTaskSession(sessionId?: string): Promise<TaskSessionLifecycleResult>;
315
+ export declare function resetTaskSession(): Promise<TaskSessionLifecycleResult>;
316
+ export declare function createTaskSessionPlan(): Promise<TaskSessionPlanResult | undefined>;
317
+ export declare function approveTaskSessionPlan(): Promise<TaskSessionApprovalResult | undefined>;
318
+ export declare function rejectTaskSessionPlan(reason?: string): Promise<TaskSessionApprovalResult | undefined>;
319
+ export declare function discoverTestCommands(): Promise<TestCommandDiscoveryResult>;
320
+ export declare function approveTestCommand(command?: string): Promise<CommandApprovalEvidence | undefined>;
321
+ export declare function getTestCommandHistory(): Promise<TestCommandHistoryResult>;
322
+ export declare function runApprovedTestCommand(command?: string): Promise<TestRunEvidence | undefined>;
323
+ export declare function createManualCopyAIContext(): Promise<ManualCopyAIContextResult>;
324
+ export declare function createManualCopyAIPrompt(): Promise<ManualCopyAIPromptResult>;
325
+ export declare function getDiffSummary(): Promise<DiffSummaryResult>;
326
+ export declare function getGitHubAuthStatus(): Promise<GitHubAuthStatusResult>;
327
+ export declare function createPullRequestExternalGuard(): Promise<ExternalActionGuardResult>;
328
+ export declare function postWorkItemUpdateExternalGuard(): Promise<ExternalActionGuardResult>;
329
+ export declare function createPullRequestDraft(): Promise<PullRequestDraftResult>;
330
+ export declare function createWorkItemUpdateDraft(): Promise<WorkItemUpdateDraftResult>;
331
+ export declare function getJiraAuthStatus(env?: NodeJS.ProcessEnv): Promise<AuthStatusResult>;
332
+ export declare function createJiraOAuthLogin(env?: NodeJS.ProcessEnv): OAuthLoginResult;
333
+ export declare function completeJiraOAuthCode(code: string, env?: NodeJS.ProcessEnv): Promise<OAuthCompletionResult>;
334
+ export declare function listenForJiraOAuthCallback(env?: NodeJS.ProcessEnv): Promise<OAuthCompletionResult>;
335
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEvG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAwB,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAwB,MAAM,yBAAyB,CAAC;AACrG,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,kBAAkB,EAGxB,MAAM,sBAAsB,CAAC;AAa9B,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,aAAa,EAAE,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