@loopstack/github-oauth-example 0.1.1 → 0.2.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/tools/authenticate-github-task.tool.d.ts +9 -8
- package/dist/tools/authenticate-github-task.tool.d.ts.map +1 -1
- package/dist/tools/authenticate-github-task.tool.js +30 -62
- package/dist/tools/authenticate-github-task.tool.js.map +1 -1
- package/dist/workflows/github-agent.ui.yaml +16 -0
- package/dist/workflows/github-agent.workflow.d.ts +14 -13
- package/dist/workflows/github-agent.workflow.d.ts.map +1 -1
- package/dist/workflows/github-agent.workflow.js +155 -71
- package/dist/workflows/github-agent.workflow.js.map +1 -1
- package/dist/workflows/github-repos-overview.ui.yaml +17 -0
- package/dist/workflows/github-repos-overview.workflow.d.ts +77 -87
- package/dist/workflows/github-repos-overview.workflow.d.ts.map +1 -1
- package/dist/workflows/github-repos-overview.workflow.js +177 -228
- package/dist/workflows/github-repos-overview.workflow.js.map +1 -1
- package/dist/workflows/templates/repoOverview.md +81 -0
- package/dist/workflows/templates/systemMessage.md +23 -0
- package/package.json +7 -7
- package/src/tools/authenticate-github-task.tool.ts +34 -82
- package/src/workflows/__tests__/github-repos-overview-workflow.spec.ts +105 -249
- package/src/workflows/github-agent.ui.yaml +16 -0
- package/src/workflows/github-agent.workflow.ts +109 -27
- package/src/workflows/github-repos-overview.ui.yaml +17 -0
- package/src/workflows/github-repos-overview.workflow.ts +257 -215
- package/src/workflows/templates/repoOverview.md +81 -0
- package/src/workflows/templates/systemMessage.md +23 -0
- package/dist/workflows/github-agent.workflow.yaml +0 -154
- package/dist/workflows/github-repos-overview.workflow.yaml +0 -249
- package/src/workflows/github-agent.workflow.yaml +0 -154
- package/src/workflows/github-repos-overview.workflow.yaml +0 -249
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
3
|
declare const AuthenticateGitHubTaskInputSchema: z.ZodObject<{
|
|
4
4
|
scopes: z.ZodArray<z.ZodString>;
|
|
5
|
+
callback: z.ZodOptional<z.ZodObject<{
|
|
6
|
+
transition: z.ZodString;
|
|
7
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
8
|
+
}, z.core.$strip>>;
|
|
5
9
|
}, z.core.$strict>;
|
|
6
10
|
type AuthenticateGitHubTaskInput = z.infer<typeof AuthenticateGitHubTaskInputSchema>;
|
|
7
|
-
export declare class AuthenticateGitHubTask
|
|
11
|
+
export declare class AuthenticateGitHubTask extends BaseTool {
|
|
8
12
|
private readonly logger;
|
|
9
|
-
private
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
args: AuthenticateGitHubTaskInput;
|
|
13
|
-
execute(args: AuthenticateGitHubTaskInput, ctx: RunContext, parent: WorkflowInterface | ToolInterface, metadata: WorkflowMetadataInterface): Promise<ToolResult>;
|
|
14
|
-
complete(result: Record<string, unknown>, ctx: RunContext, parent: WorkflowInterface | ToolInterface, metadata: WorkflowMetadataInterface): Promise<ToolResult>;
|
|
13
|
+
private oAuth;
|
|
14
|
+
call(args: AuthenticateGitHubTaskInput): Promise<ToolResult>;
|
|
15
|
+
complete(result: Record<string, unknown>): Promise<ToolResult>;
|
|
15
16
|
}
|
|
16
17
|
export {};
|
|
17
18
|
//# sourceMappingURL=authenticate-github-task.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticate-github-task.tool.d.ts","sourceRoot":"","sources":["../../src/tools/authenticate-github-task.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"authenticate-github-task.tool.d.ts","sourceRoot":"","sources":["../../src/tools/authenticate-github-task.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAwB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/E,QAAA,MAAM,iCAAiC;;;;;;kBAU5B,CAAC;AAEZ,KAAK,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAErF,qBAWa,sBAAuB,SAAQ,QAAQ;IAClD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2C;IAEhD,OAAO,CAAC,KAAK,CAAgB;IAEzC,IAAI,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,CAAC;IAuB5D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;CAiBrE"}
|
|
@@ -15,93 +15,61 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const zod_1 = require("zod");
|
|
16
16
|
const common_2 = require("@loopstack/common");
|
|
17
17
|
const core_1 = require("@loopstack/core");
|
|
18
|
+
const oauth_module_1 = require("@loopstack/oauth-module");
|
|
18
19
|
const AuthenticateGitHubTaskInputSchema = zod_1.z
|
|
19
20
|
.object({
|
|
20
21
|
scopes: zod_1.z.array(zod_1.z.string()).describe('The OAuth scopes to request (e.g. repo, user, workflow, read:org)'),
|
|
22
|
+
callback: zod_1.z
|
|
23
|
+
.object({
|
|
24
|
+
transition: zod_1.z.string(),
|
|
25
|
+
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
26
|
+
})
|
|
27
|
+
.optional(),
|
|
21
28
|
})
|
|
22
29
|
.strict();
|
|
23
|
-
let AuthenticateGitHubTask = AuthenticateGitHubTask_1 = class AuthenticateGitHubTask {
|
|
30
|
+
let AuthenticateGitHubTask = AuthenticateGitHubTask_1 = class AuthenticateGitHubTask extends common_2.BaseTool {
|
|
24
31
|
logger = new common_1.Logger(AuthenticateGitHubTask_1.name);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
validate: 'skip',
|
|
36
|
-
update: {
|
|
37
|
-
content: {
|
|
38
|
-
icon: 'LockKeyhole',
|
|
39
|
-
label: 'GitHub authentication required',
|
|
40
|
-
caption: 'Complete sign-in to access GitHub',
|
|
41
|
-
href: `/pipelines/${String(taskResult.data.pipelineId)}`,
|
|
42
|
-
embed: true,
|
|
43
|
-
expanded: true,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
}, ctx, this, metadata);
|
|
47
|
-
if (linkResult.effects) {
|
|
48
|
-
effects.push(...linkResult.effects);
|
|
49
|
-
}
|
|
32
|
+
oAuth;
|
|
33
|
+
async call(args) {
|
|
34
|
+
const result = await this.oAuth.run({ provider: 'github', scopes: args.scopes }, { alias: 'oAuth', callback: args.callback });
|
|
35
|
+
await this.repository.save(core_1.LinkDocument, {
|
|
36
|
+
status: 'pending',
|
|
37
|
+
label: 'GitHub authentication required',
|
|
38
|
+
workflowId: result.workflowId,
|
|
39
|
+
embed: true,
|
|
40
|
+
expanded: true,
|
|
41
|
+
}, { id: `link_${result.workflowId}` });
|
|
50
42
|
return {
|
|
51
|
-
data:
|
|
52
|
-
effects,
|
|
43
|
+
data: { ...result, mode: 'async' },
|
|
53
44
|
};
|
|
54
45
|
}
|
|
55
|
-
async complete(result
|
|
46
|
+
async complete(result) {
|
|
56
47
|
const data = result;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
update: {
|
|
63
|
-
content: {
|
|
64
|
-
icon: 'ShieldCheck',
|
|
65
|
-
label: 'GitHub authentication completed',
|
|
66
|
-
href: `/pipelines/${data.pipelineId}`,
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
}, ctx, this, metadata);
|
|
70
|
-
if (linkResult.effects) {
|
|
71
|
-
effects.push(...linkResult.effects);
|
|
72
|
-
}
|
|
48
|
+
await this.repository.save(core_1.LinkDocument, {
|
|
49
|
+
status: 'success',
|
|
50
|
+
label: 'GitHub authentication completed',
|
|
51
|
+
workflowId: data.workflowId,
|
|
52
|
+
}, { id: `link_${data.workflowId}` });
|
|
73
53
|
return {
|
|
74
54
|
data: 'GitHub authentication completed successfully. You can now use GitHub tools.',
|
|
75
|
-
effects,
|
|
76
55
|
};
|
|
77
56
|
}
|
|
78
57
|
};
|
|
79
58
|
exports.AuthenticateGitHubTask = AuthenticateGitHubTask;
|
|
80
59
|
__decorate([
|
|
81
|
-
(0, common_2.
|
|
82
|
-
__metadata("design:type",
|
|
83
|
-
], AuthenticateGitHubTask.prototype, "
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, common_2.InjectTool)(),
|
|
86
|
-
__metadata("design:type", core_1.CreateDocument)
|
|
87
|
-
], AuthenticateGitHubTask.prototype, "createDocument", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, common_2.InjectDocument)(),
|
|
90
|
-
__metadata("design:type", core_1.LinkDocument)
|
|
91
|
-
], AuthenticateGitHubTask.prototype, "linkDocument", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, common_2.Input)({ schema: AuthenticateGitHubTaskInputSchema }),
|
|
94
|
-
__metadata("design:type", Object)
|
|
95
|
-
], AuthenticateGitHubTask.prototype, "args", void 0);
|
|
60
|
+
(0, common_2.InjectWorkflow)(),
|
|
61
|
+
__metadata("design:type", oauth_module_1.OAuthWorkflow)
|
|
62
|
+
], AuthenticateGitHubTask.prototype, "oAuth", void 0);
|
|
96
63
|
exports.AuthenticateGitHubTask = AuthenticateGitHubTask = AuthenticateGitHubTask_1 = __decorate([
|
|
97
64
|
(0, common_1.Injectable)(),
|
|
98
65
|
(0, common_2.Tool)({
|
|
99
|
-
|
|
66
|
+
uiConfig: {
|
|
100
67
|
description: 'Launches GitHub OAuth authentication. Shows the user a sign-in prompt to authorize access to GitHub. ' +
|
|
101
68
|
'Use this when a GitHub tool returns an "unauthorized" error. ' +
|
|
102
69
|
'Pass the required OAuth scopes for the GitHub APIs you need access to. ' +
|
|
103
70
|
'IMPORTANT: When using this tool, it must be the ONLY tool call in your response. Do not combine it with other tool calls.',
|
|
104
71
|
},
|
|
72
|
+
schema: AuthenticateGitHubTaskInputSchema,
|
|
105
73
|
})
|
|
106
74
|
], AuthenticateGitHubTask);
|
|
107
75
|
//# sourceMappingURL=authenticate-github-task.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticate-github-task.tool.js","sourceRoot":"","sources":["../../src/tools/authenticate-github-task.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,6BAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"authenticate-github-task.tool.js","sourceRoot":"","sources":["../../src/tools/authenticate-github-task.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,6BAAwB;AACxB,8CAA+E;AAC/E,0CAA+C;AAC/C,0DAAwD;AAExD,MAAM,iCAAiC,GAAG,OAAC;KACxC,MAAM,CAAC;IACN,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,mEAAmE,CAAC;IACzG,QAAQ,EAAE,OAAC;SACR,MAAM,CAAC;QACN,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;QACtB,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;KACvD,CAAC;SACD,QAAQ,EAAE;CACd,CAAC;KACD,MAAM,EAAE,CAAC;AAeL,IAAM,sBAAsB,8BAA5B,MAAM,sBAAuB,SAAQ,iBAAQ;IACjC,MAAM,GAAG,IAAI,eAAM,CAAC,wBAAsB,CAAC,IAAI,CAAC,CAAC;IAExC,KAAK,CAAgB;IAE/C,KAAK,CAAC,IAAI,CAAC,IA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,iCAAiC;KAC1C,CAAC;GACW,sBAAsB,CA6ClC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
title: 'GitHub Agent'
|
|
2
|
+
|
|
3
|
+
description: |
|
|
4
|
+
An interactive chat agent with access to GitHub.
|
|
5
|
+
Ask it to manage repositories, issues, pull requests, browse code, check CI/CD status,
|
|
6
|
+
search across GitHub, and more. Handles OAuth authentication automatically when needed —
|
|
7
|
+
the agent detects unauthorized errors and launches authentication on its own.
|
|
8
|
+
|
|
9
|
+
ui:
|
|
10
|
+
widgets:
|
|
11
|
+
- widget: prompt-input
|
|
12
|
+
enabledWhen:
|
|
13
|
+
- waiting_for_user
|
|
14
|
+
options:
|
|
15
|
+
transition: userMessage
|
|
16
|
+
label: Send Message
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import { ClaudeGenerateText,
|
|
2
|
-
import {
|
|
3
|
-
import { CreateDocument, LinkDocument, Task } from '@loopstack/core';
|
|
1
|
+
import { ClaudeGenerateText, ClaudeGenerateTextResult, DelegateToolCalls, DelegateToolCallsResult, UpdateToolResult } from '@loopstack/claude-module';
|
|
2
|
+
import { BaseWorkflow } from '@loopstack/common';
|
|
4
3
|
import { GitHubCreateIssueCommentTool, GitHubCreateIssueTool, GitHubCreateOrUpdateFileTool, GitHubCreatePullRequestTool, GitHubCreateRepoTool, GitHubGetAuthenticatedUserTool, GitHubGetCommitTool, GitHubGetFileContentTool, GitHubGetIssueTool, GitHubGetPullRequestTool, GitHubGetRepoTool, GitHubGetWorkflowRunTool, GitHubListBranchesTool, GitHubListDirectoryTool, GitHubListIssuesTool, GitHubListPrReviewsTool, GitHubListPullRequestsTool, GitHubListReposTool, GitHubListUserOrgsTool, GitHubListWorkflowRunsTool, GitHubMergePullRequestTool, GitHubSearchCodeTool, GitHubSearchIssuesTool, GitHubSearchReposTool, GitHubTriggerWorkflowTool } from '@loopstack/github-module';
|
|
5
4
|
import { OAuthWorkflow } from '@loopstack/oauth-module';
|
|
6
5
|
import { AuthenticateGitHubTask } from '../tools/authenticate-github-task.tool';
|
|
7
|
-
export declare class GitHubAgentWorkflow
|
|
8
|
-
createDocument: CreateDocument;
|
|
6
|
+
export declare class GitHubAgentWorkflow extends BaseWorkflow {
|
|
9
7
|
claudeGenerateText: ClaudeGenerateText;
|
|
10
8
|
delegateToolCalls: DelegateToolCalls;
|
|
11
9
|
updateToolResult: UpdateToolResult;
|
|
12
|
-
task: Task;
|
|
13
10
|
authenticateGitHub: AuthenticateGitHubTask;
|
|
14
|
-
claudeMessageDocument: ClaudeMessageDocument;
|
|
15
|
-
linkDocument: LinkDocument;
|
|
16
11
|
gitHubListRepos: GitHubListReposTool;
|
|
17
12
|
gitHubGetRepo: GitHubGetRepoTool;
|
|
18
13
|
gitHubCreateRepo: GitHubCreateRepoTool;
|
|
@@ -39,10 +34,16 @@ export declare class GitHubAgentWorkflow implements WorkflowInterface {
|
|
|
39
34
|
gitHubGetAuthenticatedUser: GitHubGetAuthenticatedUserTool;
|
|
40
35
|
gitHubListUserOrgs: GitHubListUserOrgsTool;
|
|
41
36
|
oAuth: OAuthWorkflow;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
llmResult?: ClaudeGenerateTextResult;
|
|
38
|
+
delegateResult?: DelegateToolCallsResult;
|
|
39
|
+
setup(): Promise<void>;
|
|
40
|
+
userMessage(payload: string): Promise<void>;
|
|
41
|
+
llmTurn(): Promise<void>;
|
|
42
|
+
executeToolCalls(): Promise<void>;
|
|
43
|
+
hasToolCalls(): boolean;
|
|
44
|
+
toolResultReceived(payload: Record<string, unknown>): Promise<void>;
|
|
45
|
+
allToolsCompleteTransition(): void;
|
|
46
|
+
allToolsComplete(): boolean;
|
|
47
|
+
respond(): Promise<void>;
|
|
47
48
|
}
|
|
48
49
|
//# sourceMappingURL=github-agent.workflow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-agent.workflow.d.ts","sourceRoot":"","sources":["../../src/workflows/github-agent.workflow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-agent.workflow.d.ts","sourceRoot":"","sources":["../../src/workflows/github-agent.workflow.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EAExB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,YAAY,EAQb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,4BAA4B,EAC5B,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,EACpB,8BAA8B,EAC9B,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAEhF,qBAGa,mBAAoB,SAAQ,YAAY;IACrC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,kBAAkB,EAAE,sBAAsB,CAAC;IAG3C,eAAe,EAAE,mBAAmB,CAAC;IACrC,aAAa,EAAE,iBAAiB,CAAC;IACjC,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,kBAAkB,EAAE,sBAAsB,CAAC;IAG3C,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,cAAc,EAAE,kBAAkB,CAAC;IACnC,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,wBAAwB,EAAE,4BAA4B,CAAC;IAGvD,sBAAsB,EAAE,0BAA0B,CAAC;IACnD,oBAAoB,EAAE,wBAAwB,CAAC;IAC/C,uBAAuB,EAAE,2BAA2B,CAAC;IACrD,sBAAsB,EAAE,0BAA0B,CAAC;IACnD,mBAAmB,EAAE,uBAAuB,CAAC;IAG7C,oBAAoB,EAAE,wBAAwB,CAAC;IAC/C,wBAAwB,EAAE,4BAA4B,CAAC;IACvD,mBAAmB,EAAE,uBAAuB,CAAC;IAC7C,eAAe,EAAE,mBAAmB,CAAC;IAGrC,sBAAsB,EAAE,0BAA0B,CAAC;IACnD,qBAAqB,EAAE,yBAAyB,CAAC;IACjD,oBAAoB,EAAE,wBAAwB,CAAC;IAG/C,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,kBAAkB,EAAE,sBAAsB,CAAC;IAG3C,0BAA0B,EAAE,8BAA8B,CAAC;IAC3D,kBAAkB,EAAE,sBAAsB,CAAC;IAEvC,KAAK,EAAE,aAAa,CAAC;IAEvC,SAAS,CAAC,EAAE,wBAAwB,CAAC;IACrC,cAAc,CAAC,EAAE,uBAAuB,CAAC;IAGnC,KAAK;IAYL,WAAW,CAAC,OAAO,EAAE,MAAM;IAQ3B,OAAO;IAyCP,gBAAgB;IAStB,YAAY,IAAI,OAAO;IAKjB,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAWzD,0BAA0B;IAE1B,gBAAgB,IAAI,OAAO;IAKrB,OAAO;CAGd"}
|
|
@@ -10,23 +10,17 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.GitHubAgentWorkflow = void 0;
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
13
|
const zod_1 = require("zod");
|
|
15
14
|
const claude_module_1 = require("@loopstack/claude-module");
|
|
16
|
-
const
|
|
17
|
-
const core_1 = require("@loopstack/core");
|
|
15
|
+
const common_1 = require("@loopstack/common");
|
|
18
16
|
const github_module_1 = require("@loopstack/github-module");
|
|
19
17
|
const oauth_module_1 = require("@loopstack/oauth-module");
|
|
20
18
|
const authenticate_github_task_tool_1 = require("../tools/authenticate-github-task.tool");
|
|
21
|
-
let GitHubAgentWorkflow = class GitHubAgentWorkflow {
|
|
22
|
-
createDocument;
|
|
19
|
+
let GitHubAgentWorkflow = class GitHubAgentWorkflow extends common_1.BaseWorkflow {
|
|
23
20
|
claudeGenerateText;
|
|
24
21
|
delegateToolCalls;
|
|
25
22
|
updateToolResult;
|
|
26
|
-
task;
|
|
27
23
|
authenticateGitHub;
|
|
28
|
-
claudeMessageDocument;
|
|
29
|
-
linkDocument;
|
|
30
24
|
gitHubListRepos;
|
|
31
25
|
gitHubGetRepo;
|
|
32
26
|
gitHubCreateRepo;
|
|
@@ -53,163 +47,253 @@ let GitHubAgentWorkflow = class GitHubAgentWorkflow {
|
|
|
53
47
|
gitHubGetAuthenticatedUser;
|
|
54
48
|
gitHubListUserOrgs;
|
|
55
49
|
oAuth;
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
llmResult;
|
|
51
|
+
delegateResult;
|
|
52
|
+
async setup() {
|
|
53
|
+
await this.repository.save(claude_module_1.ClaudeMessageDocument, {
|
|
54
|
+
role: 'user',
|
|
55
|
+
content: this.render(__dirname + '/templates/systemMessage.md'),
|
|
56
|
+
}, { meta: { hidden: true } });
|
|
57
|
+
}
|
|
58
|
+
async userMessage(payload) {
|
|
59
|
+
await this.repository.save(claude_module_1.ClaudeMessageDocument, {
|
|
60
|
+
role: 'user',
|
|
61
|
+
content: payload,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
async llmTurn() {
|
|
65
|
+
const result = await this.claudeGenerateText.call({
|
|
66
|
+
system: `You are a helpful GitHub assistant with access to repository, issue, PR, code, actions,
|
|
67
|
+
and search tools. When a tool returns an unauthorized error, use authenticateGitHub
|
|
68
|
+
to let the user sign in, then retry. Be concise and format results using markdown.`,
|
|
69
|
+
claude: { model: 'claude-sonnet-4-6' },
|
|
70
|
+
messagesSearchTag: 'message',
|
|
71
|
+
tools: [
|
|
72
|
+
'gitHubListRepos',
|
|
73
|
+
'gitHubGetRepo',
|
|
74
|
+
'gitHubCreateRepo',
|
|
75
|
+
'gitHubListBranches',
|
|
76
|
+
'gitHubListIssues',
|
|
77
|
+
'gitHubGetIssue',
|
|
78
|
+
'gitHubCreateIssue',
|
|
79
|
+
'gitHubCreateIssueComment',
|
|
80
|
+
'gitHubListPullRequests',
|
|
81
|
+
'gitHubGetPullRequest',
|
|
82
|
+
'gitHubCreatePullRequest',
|
|
83
|
+
'gitHubMergePullRequest',
|
|
84
|
+
'gitHubListPrReviews',
|
|
85
|
+
'gitHubGetFileContent',
|
|
86
|
+
'gitHubCreateOrUpdateFile',
|
|
87
|
+
'gitHubListDirectory',
|
|
88
|
+
'gitHubGetCommit',
|
|
89
|
+
'gitHubListWorkflowRuns',
|
|
90
|
+
'gitHubTriggerWorkflow',
|
|
91
|
+
'gitHubGetWorkflowRun',
|
|
92
|
+
'gitHubSearchCode',
|
|
93
|
+
'gitHubSearchRepos',
|
|
94
|
+
'gitHubSearchIssues',
|
|
95
|
+
'gitHubGetAuthenticatedUser',
|
|
96
|
+
'gitHubListUserOrgs',
|
|
97
|
+
'authenticateGitHub',
|
|
98
|
+
],
|
|
99
|
+
});
|
|
100
|
+
this.llmResult = result.data;
|
|
101
|
+
}
|
|
102
|
+
async executeToolCalls() {
|
|
103
|
+
const result = await this.delegateToolCalls.call({
|
|
104
|
+
message: this.llmResult,
|
|
105
|
+
document: claude_module_1.ClaudeMessageDocument,
|
|
106
|
+
callback: { transition: 'toolResultReceived' },
|
|
107
|
+
});
|
|
108
|
+
this.delegateResult = result.data;
|
|
109
|
+
}
|
|
110
|
+
hasToolCalls() {
|
|
111
|
+
return this.llmResult?.stop_reason === 'tool_use';
|
|
112
|
+
}
|
|
113
|
+
async toolResultReceived(payload) {
|
|
114
|
+
const result = await this.updateToolResult.call({
|
|
115
|
+
delegateResult: this.delegateResult,
|
|
116
|
+
completedTool: payload,
|
|
117
|
+
document: claude_module_1.ClaudeMessageDocument,
|
|
118
|
+
});
|
|
119
|
+
this.delegateResult = result.data;
|
|
120
|
+
}
|
|
121
|
+
allToolsCompleteTransition() { }
|
|
122
|
+
allToolsComplete() {
|
|
123
|
+
return this.delegateResult?.allCompleted ?? false;
|
|
124
|
+
}
|
|
125
|
+
async respond() {
|
|
126
|
+
await this.repository.save(claude_module_1.ClaudeMessageDocument, this.llmResult, { id: this.llmResult.id });
|
|
127
|
+
}
|
|
58
128
|
};
|
|
59
129
|
exports.GitHubAgentWorkflow = GitHubAgentWorkflow;
|
|
60
130
|
__decorate([
|
|
61
|
-
(0,
|
|
62
|
-
__metadata("design:type", core_1.CreateDocument)
|
|
63
|
-
], GitHubAgentWorkflow.prototype, "createDocument", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, common_2.InjectTool)(),
|
|
131
|
+
(0, common_1.InjectTool)(),
|
|
66
132
|
__metadata("design:type", claude_module_1.ClaudeGenerateText)
|
|
67
133
|
], GitHubAgentWorkflow.prototype, "claudeGenerateText", void 0);
|
|
68
134
|
__decorate([
|
|
69
|
-
(0,
|
|
135
|
+
(0, common_1.InjectTool)(),
|
|
70
136
|
__metadata("design:type", claude_module_1.DelegateToolCalls)
|
|
71
137
|
], GitHubAgentWorkflow.prototype, "delegateToolCalls", void 0);
|
|
72
138
|
__decorate([
|
|
73
|
-
(0,
|
|
139
|
+
(0, common_1.InjectTool)(),
|
|
74
140
|
__metadata("design:type", claude_module_1.UpdateToolResult)
|
|
75
141
|
], GitHubAgentWorkflow.prototype, "updateToolResult", void 0);
|
|
76
142
|
__decorate([
|
|
77
|
-
(0,
|
|
78
|
-
__metadata("design:type", core_1.Task)
|
|
79
|
-
], GitHubAgentWorkflow.prototype, "task", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, common_2.InjectTool)(),
|
|
143
|
+
(0, common_1.InjectTool)(),
|
|
82
144
|
__metadata("design:type", authenticate_github_task_tool_1.AuthenticateGitHubTask)
|
|
83
145
|
], GitHubAgentWorkflow.prototype, "authenticateGitHub", void 0);
|
|
84
146
|
__decorate([
|
|
85
|
-
(0,
|
|
86
|
-
__metadata("design:type", claude_module_1.ClaudeMessageDocument)
|
|
87
|
-
], GitHubAgentWorkflow.prototype, "claudeMessageDocument", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, common_2.InjectDocument)(),
|
|
90
|
-
__metadata("design:type", core_1.LinkDocument)
|
|
91
|
-
], GitHubAgentWorkflow.prototype, "linkDocument", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, common_2.InjectTool)(),
|
|
147
|
+
(0, common_1.InjectTool)(),
|
|
94
148
|
__metadata("design:type", github_module_1.GitHubListReposTool)
|
|
95
149
|
], GitHubAgentWorkflow.prototype, "gitHubListRepos", void 0);
|
|
96
150
|
__decorate([
|
|
97
|
-
(0,
|
|
151
|
+
(0, common_1.InjectTool)(),
|
|
98
152
|
__metadata("design:type", github_module_1.GitHubGetRepoTool)
|
|
99
153
|
], GitHubAgentWorkflow.prototype, "gitHubGetRepo", void 0);
|
|
100
154
|
__decorate([
|
|
101
|
-
(0,
|
|
155
|
+
(0, common_1.InjectTool)(),
|
|
102
156
|
__metadata("design:type", github_module_1.GitHubCreateRepoTool)
|
|
103
157
|
], GitHubAgentWorkflow.prototype, "gitHubCreateRepo", void 0);
|
|
104
158
|
__decorate([
|
|
105
|
-
(0,
|
|
159
|
+
(0, common_1.InjectTool)(),
|
|
106
160
|
__metadata("design:type", github_module_1.GitHubListBranchesTool)
|
|
107
161
|
], GitHubAgentWorkflow.prototype, "gitHubListBranches", void 0);
|
|
108
162
|
__decorate([
|
|
109
|
-
(0,
|
|
163
|
+
(0, common_1.InjectTool)(),
|
|
110
164
|
__metadata("design:type", github_module_1.GitHubListIssuesTool)
|
|
111
165
|
], GitHubAgentWorkflow.prototype, "gitHubListIssues", void 0);
|
|
112
166
|
__decorate([
|
|
113
|
-
(0,
|
|
167
|
+
(0, common_1.InjectTool)(),
|
|
114
168
|
__metadata("design:type", github_module_1.GitHubGetIssueTool)
|
|
115
169
|
], GitHubAgentWorkflow.prototype, "gitHubGetIssue", void 0);
|
|
116
170
|
__decorate([
|
|
117
|
-
(0,
|
|
171
|
+
(0, common_1.InjectTool)(),
|
|
118
172
|
__metadata("design:type", github_module_1.GitHubCreateIssueTool)
|
|
119
173
|
], GitHubAgentWorkflow.prototype, "gitHubCreateIssue", void 0);
|
|
120
174
|
__decorate([
|
|
121
|
-
(0,
|
|
175
|
+
(0, common_1.InjectTool)(),
|
|
122
176
|
__metadata("design:type", github_module_1.GitHubCreateIssueCommentTool)
|
|
123
177
|
], GitHubAgentWorkflow.prototype, "gitHubCreateIssueComment", void 0);
|
|
124
178
|
__decorate([
|
|
125
|
-
(0,
|
|
179
|
+
(0, common_1.InjectTool)(),
|
|
126
180
|
__metadata("design:type", github_module_1.GitHubListPullRequestsTool)
|
|
127
181
|
], GitHubAgentWorkflow.prototype, "gitHubListPullRequests", void 0);
|
|
128
182
|
__decorate([
|
|
129
|
-
(0,
|
|
183
|
+
(0, common_1.InjectTool)(),
|
|
130
184
|
__metadata("design:type", github_module_1.GitHubGetPullRequestTool)
|
|
131
185
|
], GitHubAgentWorkflow.prototype, "gitHubGetPullRequest", void 0);
|
|
132
186
|
__decorate([
|
|
133
|
-
(0,
|
|
187
|
+
(0, common_1.InjectTool)(),
|
|
134
188
|
__metadata("design:type", github_module_1.GitHubCreatePullRequestTool)
|
|
135
189
|
], GitHubAgentWorkflow.prototype, "gitHubCreatePullRequest", void 0);
|
|
136
190
|
__decorate([
|
|
137
|
-
(0,
|
|
191
|
+
(0, common_1.InjectTool)(),
|
|
138
192
|
__metadata("design:type", github_module_1.GitHubMergePullRequestTool)
|
|
139
193
|
], GitHubAgentWorkflow.prototype, "gitHubMergePullRequest", void 0);
|
|
140
194
|
__decorate([
|
|
141
|
-
(0,
|
|
195
|
+
(0, common_1.InjectTool)(),
|
|
142
196
|
__metadata("design:type", github_module_1.GitHubListPrReviewsTool)
|
|
143
197
|
], GitHubAgentWorkflow.prototype, "gitHubListPrReviews", void 0);
|
|
144
198
|
__decorate([
|
|
145
|
-
(0,
|
|
199
|
+
(0, common_1.InjectTool)(),
|
|
146
200
|
__metadata("design:type", github_module_1.GitHubGetFileContentTool)
|
|
147
201
|
], GitHubAgentWorkflow.prototype, "gitHubGetFileContent", void 0);
|
|
148
202
|
__decorate([
|
|
149
|
-
(0,
|
|
203
|
+
(0, common_1.InjectTool)(),
|
|
150
204
|
__metadata("design:type", github_module_1.GitHubCreateOrUpdateFileTool)
|
|
151
205
|
], GitHubAgentWorkflow.prototype, "gitHubCreateOrUpdateFile", void 0);
|
|
152
206
|
__decorate([
|
|
153
|
-
(0,
|
|
207
|
+
(0, common_1.InjectTool)(),
|
|
154
208
|
__metadata("design:type", github_module_1.GitHubListDirectoryTool)
|
|
155
209
|
], GitHubAgentWorkflow.prototype, "gitHubListDirectory", void 0);
|
|
156
210
|
__decorate([
|
|
157
|
-
(0,
|
|
211
|
+
(0, common_1.InjectTool)(),
|
|
158
212
|
__metadata("design:type", github_module_1.GitHubGetCommitTool)
|
|
159
213
|
], GitHubAgentWorkflow.prototype, "gitHubGetCommit", void 0);
|
|
160
214
|
__decorate([
|
|
161
|
-
(0,
|
|
215
|
+
(0, common_1.InjectTool)(),
|
|
162
216
|
__metadata("design:type", github_module_1.GitHubListWorkflowRunsTool)
|
|
163
217
|
], GitHubAgentWorkflow.prototype, "gitHubListWorkflowRuns", void 0);
|
|
164
218
|
__decorate([
|
|
165
|
-
(0,
|
|
219
|
+
(0, common_1.InjectTool)(),
|
|
166
220
|
__metadata("design:type", github_module_1.GitHubTriggerWorkflowTool)
|
|
167
221
|
], GitHubAgentWorkflow.prototype, "gitHubTriggerWorkflow", void 0);
|
|
168
222
|
__decorate([
|
|
169
|
-
(0,
|
|
223
|
+
(0, common_1.InjectTool)(),
|
|
170
224
|
__metadata("design:type", github_module_1.GitHubGetWorkflowRunTool)
|
|
171
225
|
], GitHubAgentWorkflow.prototype, "gitHubGetWorkflowRun", void 0);
|
|
172
226
|
__decorate([
|
|
173
|
-
(0,
|
|
227
|
+
(0, common_1.InjectTool)(),
|
|
174
228
|
__metadata("design:type", github_module_1.GitHubSearchCodeTool)
|
|
175
229
|
], GitHubAgentWorkflow.prototype, "gitHubSearchCode", void 0);
|
|
176
230
|
__decorate([
|
|
177
|
-
(0,
|
|
231
|
+
(0, common_1.InjectTool)(),
|
|
178
232
|
__metadata("design:type", github_module_1.GitHubSearchReposTool)
|
|
179
233
|
], GitHubAgentWorkflow.prototype, "gitHubSearchRepos", void 0);
|
|
180
234
|
__decorate([
|
|
181
|
-
(0,
|
|
235
|
+
(0, common_1.InjectTool)(),
|
|
182
236
|
__metadata("design:type", github_module_1.GitHubSearchIssuesTool)
|
|
183
237
|
], GitHubAgentWorkflow.prototype, "gitHubSearchIssues", void 0);
|
|
184
238
|
__decorate([
|
|
185
|
-
(0,
|
|
239
|
+
(0, common_1.InjectTool)(),
|
|
186
240
|
__metadata("design:type", github_module_1.GitHubGetAuthenticatedUserTool)
|
|
187
241
|
], GitHubAgentWorkflow.prototype, "gitHubGetAuthenticatedUser", void 0);
|
|
188
242
|
__decorate([
|
|
189
|
-
(0,
|
|
243
|
+
(0, common_1.InjectTool)(),
|
|
190
244
|
__metadata("design:type", github_module_1.GitHubListUserOrgsTool)
|
|
191
245
|
], GitHubAgentWorkflow.prototype, "gitHubListUserOrgs", void 0);
|
|
192
246
|
__decorate([
|
|
193
|
-
(0,
|
|
247
|
+
(0, common_1.InjectWorkflow)(),
|
|
194
248
|
__metadata("design:type", oauth_module_1.OAuthWorkflow)
|
|
195
249
|
], GitHubAgentWorkflow.prototype, "oAuth", void 0);
|
|
196
250
|
__decorate([
|
|
197
|
-
(0,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
(
|
|
207
|
-
|
|
208
|
-
|
|
251
|
+
(0, common_1.Initial)({ to: 'waiting_for_user' }),
|
|
252
|
+
__metadata("design:type", Function),
|
|
253
|
+
__metadata("design:paramtypes", []),
|
|
254
|
+
__metadata("design:returntype", Promise)
|
|
255
|
+
], GitHubAgentWorkflow.prototype, "setup", null);
|
|
256
|
+
__decorate([
|
|
257
|
+
(0, common_1.Transition)({ from: 'waiting_for_user', to: 'ready', wait: true, schema: zod_1.z.string() }),
|
|
258
|
+
__metadata("design:type", Function),
|
|
259
|
+
__metadata("design:paramtypes", [String]),
|
|
260
|
+
__metadata("design:returntype", Promise)
|
|
261
|
+
], GitHubAgentWorkflow.prototype, "userMessage", null);
|
|
262
|
+
__decorate([
|
|
263
|
+
(0, common_1.Transition)({ from: 'ready', to: 'prompt_executed' }),
|
|
264
|
+
__metadata("design:type", Function),
|
|
265
|
+
__metadata("design:paramtypes", []),
|
|
266
|
+
__metadata("design:returntype", Promise)
|
|
267
|
+
], GitHubAgentWorkflow.prototype, "llmTurn", null);
|
|
268
|
+
__decorate([
|
|
269
|
+
(0, common_1.Transition)({ from: 'prompt_executed', to: 'awaiting_tools', priority: 10 }),
|
|
270
|
+
(0, common_1.Guard)('hasToolCalls'),
|
|
271
|
+
__metadata("design:type", Function),
|
|
272
|
+
__metadata("design:paramtypes", []),
|
|
273
|
+
__metadata("design:returntype", Promise)
|
|
274
|
+
], GitHubAgentWorkflow.prototype, "executeToolCalls", null);
|
|
275
|
+
__decorate([
|
|
276
|
+
(0, common_1.Transition)({ from: 'awaiting_tools', to: 'awaiting_tools', wait: true, schema: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()) }),
|
|
277
|
+
__metadata("design:type", Function),
|
|
278
|
+
__metadata("design:paramtypes", [Object]),
|
|
279
|
+
__metadata("design:returntype", Promise)
|
|
280
|
+
], GitHubAgentWorkflow.prototype, "toolResultReceived", null);
|
|
281
|
+
__decorate([
|
|
282
|
+
(0, common_1.Transition)({ from: 'awaiting_tools', to: 'ready' }),
|
|
283
|
+
(0, common_1.Guard)('allToolsComplete'),
|
|
284
|
+
__metadata("design:type", Function),
|
|
285
|
+
__metadata("design:paramtypes", []),
|
|
286
|
+
__metadata("design:returntype", void 0)
|
|
287
|
+
], GitHubAgentWorkflow.prototype, "allToolsCompleteTransition", null);
|
|
288
|
+
__decorate([
|
|
289
|
+
(0, common_1.Transition)({ from: 'prompt_executed', to: 'waiting_for_user' }),
|
|
290
|
+
__metadata("design:type", Function),
|
|
291
|
+
__metadata("design:paramtypes", []),
|
|
292
|
+
__metadata("design:returntype", Promise)
|
|
293
|
+
], GitHubAgentWorkflow.prototype, "respond", null);
|
|
209
294
|
exports.GitHubAgentWorkflow = GitHubAgentWorkflow = __decorate([
|
|
210
|
-
(0, common_1.
|
|
211
|
-
|
|
212
|
-
configFile: __dirname + '/github-agent.workflow.yaml',
|
|
295
|
+
(0, common_1.Workflow)({
|
|
296
|
+
uiConfig: __dirname + '/github-agent.ui.yaml',
|
|
213
297
|
})
|
|
214
298
|
], GitHubAgentWorkflow);
|
|
215
299
|
//# sourceMappingURL=github-agent.workflow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-agent.workflow.js","sourceRoot":"","sources":["../../src/workflows/github-agent.workflow.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"github-agent.workflow.js","sourceRoot":"","sources":["../../src/workflows/github-agent.workflow.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAwB;AACxB,4DAOkC;AAClC,8CAS2B;AAC3B,4DA0BkC;AAClC,0DAAwD;AACxD,0FAAgF;AAKzE,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,qBAAY;IACrC,kBAAkB,CAAqB;IACvC,iBAAiB,CAAoB;IAC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EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IAC3E,IAAA,cAAK,EAAC,cAAc,CAAC;;;;2DAQrB;AAOK;IADL,IAAA,mBAAU,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;;;;6DAQnH;AAID;IAFC,IAAA,mBAAU,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;IACnD,IAAA,cAAK,EAAC,kBAAkB,CAAC;;;;qEACK;AAOzB;IADL,IAAA,mBAAU,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,kBAAkB,EAAE,CAAC;;;;kDAG/D;8BAlJU,mBAAmB;IAH/B,IAAA,iBAAQ,EAAC;QACR,QAAQ,EAAE,SAAS,GAAG,uBAAuB;KAC9C,CAAC;GACW,mBAAmB,CAmJ/B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
title: 'GitHub Repository Overview'
|
|
2
|
+
|
|
3
|
+
description: |
|
|
4
|
+
Comprehensive GitHub example that exercises every GitHub tool.
|
|
5
|
+
Fetches user info, repository details, issues, pull requests, branches,
|
|
6
|
+
directory contents, workflow runs, and search results for a given repository.
|
|
7
|
+
If not authenticated, launches the OAuth sub-workflow and retries.
|
|
8
|
+
|
|
9
|
+
ui:
|
|
10
|
+
form:
|
|
11
|
+
properties:
|
|
12
|
+
owner:
|
|
13
|
+
title: 'Repository Owner'
|
|
14
|
+
placeholder: 'octocat'
|
|
15
|
+
repo:
|
|
16
|
+
title: 'Repository Name'
|
|
17
|
+
placeholder: 'Hello-World'
|