@pixelml/agenticflow-cli 1.1.1 → 1.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/cli/company-blueprints.d.ts +42 -0
- package/dist/cli/company-blueprints.d.ts.map +1 -0
- package/dist/cli/company-blueprints.js +96 -0
- package/dist/cli/company-blueprints.js.map +1 -0
- package/dist/cli/gateway/connector.d.ts +31 -37
- package/dist/cli/gateway/connector.d.ts.map +1 -1
- package/dist/cli/gateway/connector.js +13 -5
- package/dist/cli/gateway/connector.js.map +1 -1
- package/dist/cli/gateway/connectors/linear.d.ts +7 -14
- package/dist/cli/gateway/connectors/linear.d.ts.map +1 -1
- package/dist/cli/gateway/connectors/linear.js +37 -82
- package/dist/cli/gateway/connectors/linear.js.map +1 -1
- package/dist/cli/gateway/connectors/paperclip.d.ts +6 -10
- package/dist/cli/gateway/connectors/paperclip.d.ts.map +1 -1
- package/dist/cli/gateway/connectors/paperclip.js +37 -80
- package/dist/cli/gateway/connectors/paperclip.js.map +1 -1
- package/dist/cli/gateway/connectors/webhook.d.ts +6 -10
- package/dist/cli/gateway/connectors/webhook.d.ts.map +1 -1
- package/dist/cli/gateway/connectors/webhook.js +15 -27
- package/dist/cli/gateway/connectors/webhook.js.map +1 -1
- package/dist/cli/gateway/server.d.ts +13 -12
- package/dist/cli/gateway/server.d.ts.map +1 -1
- package/dist/cli/gateway/server.js +118 -81
- package/dist/cli/gateway/server.js.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +308 -30
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/playbooks.d.ts.map +1 -1
- package/dist/cli/playbooks.js +169 -42
- package/dist/cli/playbooks.js.map +1 -1
- package/package.json +1 -1
- package/dist/cli/paperclip-bridge.d.ts +0 -15
- package/dist/cli/paperclip-bridge.d.ts.map +0 -1
- package/dist/cli/paperclip-bridge.js +0 -244
- package/dist/cli/paperclip-bridge.js.map +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pre-built company blueprints for Paperclip deployment.
|
|
3
|
+
*
|
|
4
|
+
* Each blueprint defines a team of AgenticFlow agents that can be
|
|
5
|
+
* deployed to Paperclip as a ready-made company. Agents are sourced
|
|
6
|
+
* from the AF marketplace templates or the user's existing agents.
|
|
7
|
+
*/
|
|
8
|
+
export interface AgentSlot {
|
|
9
|
+
/** Paperclip role */
|
|
10
|
+
role: string;
|
|
11
|
+
/** What this slot does */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Human description */
|
|
14
|
+
description: string;
|
|
15
|
+
/** Suggested AF agent name to search for (from marketplace) */
|
|
16
|
+
suggestedTemplate?: string;
|
|
17
|
+
/** Allow user to skip this slot */
|
|
18
|
+
optional?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface CompanyBlueprint {
|
|
21
|
+
/** Short slug */
|
|
22
|
+
id: string;
|
|
23
|
+
/** Display name */
|
|
24
|
+
name: string;
|
|
25
|
+
/** What this company does */
|
|
26
|
+
description: string;
|
|
27
|
+
/** Company goal */
|
|
28
|
+
goal: string;
|
|
29
|
+
/** Starter tasks */
|
|
30
|
+
starterTasks: Array<{
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
assigneeRole: string;
|
|
34
|
+
priority: string;
|
|
35
|
+
}>;
|
|
36
|
+
/** Agent slots to fill */
|
|
37
|
+
agents: AgentSlot[];
|
|
38
|
+
}
|
|
39
|
+
export declare const BLUEPRINTS: Record<string, CompanyBlueprint>;
|
|
40
|
+
export declare function listBlueprints(): CompanyBlueprint[];
|
|
41
|
+
export declare function getBlueprint(id: string): CompanyBlueprint | null;
|
|
42
|
+
//# sourceMappingURL=company-blueprints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"company-blueprints.d.ts","sourceRoot":"","sources":["../../src/cli/company-blueprints.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,SAAS;IACxB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,YAAY,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpG,0BAA0B;IAC1B,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAiFvD,CAAC;AAEF,wBAAgB,cAAc,IAAI,gBAAgB,EAAE,CAEnD;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAEhE"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pre-built company blueprints for Paperclip deployment.
|
|
3
|
+
*
|
|
4
|
+
* Each blueprint defines a team of AgenticFlow agents that can be
|
|
5
|
+
* deployed to Paperclip as a ready-made company. Agents are sourced
|
|
6
|
+
* from the AF marketplace templates or the user's existing agents.
|
|
7
|
+
*/
|
|
8
|
+
export const BLUEPRINTS = {
|
|
9
|
+
"dev-shop": {
|
|
10
|
+
id: "dev-shop",
|
|
11
|
+
name: "Software Dev Shop",
|
|
12
|
+
description: "A lean engineering team that builds and ships software products.",
|
|
13
|
+
goal: "Build and ship high-quality software products",
|
|
14
|
+
agents: [
|
|
15
|
+
{ role: "ceo", title: "CEO / Tech Lead", description: "Strategic direction, delegation, project oversight" },
|
|
16
|
+
{ role: "engineer", title: "Senior Engineer", description: "Core development, architecture, code implementation" },
|
|
17
|
+
{ role: "designer", title: "UX Designer", description: "UI/UX design, user research, visual design", optional: true },
|
|
18
|
+
{ role: "qa", title: "QA Engineer", description: "Testing, bug finding, quality assurance", optional: true },
|
|
19
|
+
],
|
|
20
|
+
starterTasks: [
|
|
21
|
+
{ title: "Define product roadmap", description: "Create a 3-month product roadmap with milestones and deliverables.", assigneeRole: "ceo", priority: "high" },
|
|
22
|
+
{ title: "Set up project architecture", description: "Design the technical architecture and set up the development environment.", assigneeRole: "engineer", priority: "high" },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
"marketing-agency": {
|
|
26
|
+
id: "marketing-agency",
|
|
27
|
+
name: "Marketing Agency",
|
|
28
|
+
description: "A full-service marketing team for content, social media, SEO, and campaigns.",
|
|
29
|
+
goal: "Drive brand awareness and customer acquisition through multi-channel marketing",
|
|
30
|
+
agents: [
|
|
31
|
+
{ role: "ceo", title: "Agency Director", description: "Strategy, client relations, campaign oversight" },
|
|
32
|
+
{ role: "cmo", title: "Content Strategist", description: "Content planning, blog posts, newsletters", suggestedTemplate: "Content Writer" },
|
|
33
|
+
{ role: "designer", title: "Visual Designer", description: "Graphics, social media visuals, brand assets", suggestedTemplate: "Visual designer" },
|
|
34
|
+
{ role: "researcher", title: "Market Researcher", description: "Competitive analysis, trend research", suggestedTemplate: "Ari, the Market Researcher", optional: true },
|
|
35
|
+
],
|
|
36
|
+
starterTasks: [
|
|
37
|
+
{ title: "Develop content calendar", description: "Create a 4-week content calendar covering blog posts, social media, and email newsletters.", assigneeRole: "cmo", priority: "high" },
|
|
38
|
+
{ title: "Create brand guidelines", description: "Define color palette, typography, logo usage, and visual style for all marketing materials.", assigneeRole: "designer", priority: "high" },
|
|
39
|
+
{ title: "Competitive landscape report", description: "Research top 5 competitors and summarize their positioning, pricing, and marketing strategies.", assigneeRole: "researcher", priority: "medium" },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
"sales-team": {
|
|
43
|
+
id: "sales-team",
|
|
44
|
+
name: "Sales Team",
|
|
45
|
+
description: "A sales operation with outreach, research, and customer management.",
|
|
46
|
+
goal: "Generate qualified leads and close deals",
|
|
47
|
+
agents: [
|
|
48
|
+
{ role: "ceo", title: "Sales Director", description: "Pipeline management, strategy, team coordination" },
|
|
49
|
+
{ role: "researcher", title: "Sales Researcher", description: "Lead research, company profiling, ICP matching", suggestedTemplate: "Olivia, the Sales Strategist" },
|
|
50
|
+
{ role: "general", title: "SDR / Outreach", description: "Email outreach, follow-ups, scheduling", suggestedTemplate: "Rachel, the Support Agent" },
|
|
51
|
+
],
|
|
52
|
+
starterTasks: [
|
|
53
|
+
{ title: "Define ICP and target list", description: "Create ideal customer profile and build a list of 50 target companies.", assigneeRole: "researcher", priority: "high" },
|
|
54
|
+
{ title: "Write outreach sequences", description: "Draft 3-step email sequences for cold outreach, follow-up, and re-engagement.", assigneeRole: "general", priority: "high" },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
"content-studio": {
|
|
58
|
+
id: "content-studio",
|
|
59
|
+
name: "Content Studio",
|
|
60
|
+
description: "A creative content production team for video, social, and written content.",
|
|
61
|
+
goal: "Produce high-quality content across video, social media, and written formats",
|
|
62
|
+
agents: [
|
|
63
|
+
{ role: "ceo", title: "Creative Director", description: "Content strategy, quality control, brand voice" },
|
|
64
|
+
{ role: "cmo", title: "Social Media Manager", description: "Social media scheduling, engagement, analytics", suggestedTemplate: "Mason, the Social Media Manager" },
|
|
65
|
+
{ role: "engineer", title: "Content Writer", description: "Blog posts, articles, scripts, copy", suggestedTemplate: "Content Writer" },
|
|
66
|
+
{ role: "designer", title: "Visual Creator", description: "Graphics, thumbnails, social visuals", suggestedTemplate: "Visual designer", optional: true },
|
|
67
|
+
],
|
|
68
|
+
starterTasks: [
|
|
69
|
+
{ title: "Create content pillars", description: "Define 3-5 content themes/pillars that align with the brand and audience.", assigneeRole: "ceo", priority: "high" },
|
|
70
|
+
{ title: "Write 5 blog posts", description: "Draft 5 blog posts of 800-1200 words each on the defined content pillars.", assigneeRole: "engineer", priority: "high" },
|
|
71
|
+
{ title: "Design social media templates", description: "Create reusable templates for Instagram, Twitter, and LinkedIn posts.", assigneeRole: "designer", priority: "medium" },
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
"support-center": {
|
|
75
|
+
id: "support-center",
|
|
76
|
+
name: "Customer Support Center",
|
|
77
|
+
description: "A customer support team with triage, resolution, and escalation.",
|
|
78
|
+
goal: "Provide fast, helpful customer support and maintain high satisfaction",
|
|
79
|
+
agents: [
|
|
80
|
+
{ role: "ceo", title: "Support Manager", description: "Escalation handling, SLA monitoring, team coordination" },
|
|
81
|
+
{ role: "general", title: "Support Agent", description: "Ticket triage, first response, common issue resolution", suggestedTemplate: "Rachel, the Support Agent" },
|
|
82
|
+
{ role: "researcher", title: "Knowledge Base Manager", description: "FAQ maintenance, documentation, self-service content", optional: true },
|
|
83
|
+
],
|
|
84
|
+
starterTasks: [
|
|
85
|
+
{ title: "Set up support playbook", description: "Create a support playbook with common issues, resolution steps, and escalation criteria.", assigneeRole: "ceo", priority: "high" },
|
|
86
|
+
{ title: "Draft FAQ document", description: "Write an FAQ with the top 20 most common customer questions and answers.", assigneeRole: "researcher", priority: "medium" },
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
export function listBlueprints() {
|
|
91
|
+
return Object.values(BLUEPRINTS);
|
|
92
|
+
}
|
|
93
|
+
export function getBlueprint(id) {
|
|
94
|
+
return BLUEPRINTS[id] ?? null;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=company-blueprints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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ACpB,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,kEAAkE;QAC/E,IAAI,EAAE,uEAAuE;QAC7E,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,wDAAwD,EAAE;YAChH,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,wDAAwD,EAAE,iBAAiB,EAAE,2BAA2B,EAAE;YAClK,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,wBAAwB,EAAE,WAAW,EAAE,sDAAsD,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC7I;QACD,YAAY,EAAE;YACZ,EAAE,KAAK,EAAE,yBAAyB,EAAE,WAAW,EAAE,0FAA0F,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE;YACpL,EAAE,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,0EAA0E,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE;SACzK;KACF;CACF,CAAC;AAEF,MAAM,UAAU,cAAc;IAC5B,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,EAAU;IACrC,OAAO,UAAU,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;AAChC,CAAC"}
|
|
@@ -1,51 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Channel connector interface
|
|
2
|
+
* Channel connector interface.
|
|
3
3
|
*
|
|
4
|
-
* A
|
|
5
|
-
*
|
|
4
|
+
* A connector is a THIN protocol translator between an external platform
|
|
5
|
+
* and the AgenticFlow runtime API. It does NOT contain business logic —
|
|
6
|
+
* the runtime handles agent execution, thread persistence, RAG, tools, etc.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
8
|
+
* Connector responsibilities:
|
|
9
|
+
* 1. Parse platform webhook → { afAgentId, message, threadId }
|
|
10
|
+
* 2. Post agent response back to platform
|
|
11
|
+
*
|
|
12
|
+
* Runtime responsibilities (NOT the connector's job):
|
|
13
|
+
* - Agent execution, streaming, tool calling
|
|
14
|
+
* - Thread/session persistence
|
|
15
|
+
* - Knowledge retrieval, sub-agents
|
|
16
|
+
* - Credit management, permissions
|
|
9
17
|
*/
|
|
10
|
-
/**
|
|
11
|
-
export interface
|
|
12
|
-
/** Stable UUID for AF thread continuity across messages. */
|
|
13
|
-
threadId: string;
|
|
14
|
-
/** Human-readable identifier, e.g. "PIX-1", "LIN-123". */
|
|
15
|
-
taskIdentifier: string;
|
|
16
|
-
/** The full message to send to the AF agent. */
|
|
17
|
-
message: string;
|
|
18
|
+
/** What the connector extracts from a platform webhook. */
|
|
19
|
+
export interface InboundTask {
|
|
18
20
|
/** AF agent ID to invoke. */
|
|
19
21
|
afAgentId: string;
|
|
20
|
-
/**
|
|
22
|
+
/** Message to send to the agent. */
|
|
23
|
+
message: string;
|
|
24
|
+
/** Thread ID for conversation continuity (reuse across calls for same task). */
|
|
25
|
+
threadId?: string;
|
|
26
|
+
/** Override AF stream URL (if stored in platform metadata). */
|
|
21
27
|
afStreamUrl?: string;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
userId?: string;
|
|
27
|
-
userName?: string;
|
|
28
|
-
};
|
|
29
|
-
/** Opaque platform data the connector needs in postResult. */
|
|
30
|
-
platformContext: Record<string, unknown>;
|
|
28
|
+
/** Human-readable task label for logging. */
|
|
29
|
+
label: string;
|
|
30
|
+
/** Opaque data the connector needs to post results back. */
|
|
31
|
+
replyContext: Record<string, unknown>;
|
|
31
32
|
}
|
|
32
|
-
/** Channel connector
|
|
33
|
+
/** Channel connector — thin protocol translator. */
|
|
33
34
|
export interface ChannelConnector {
|
|
34
|
-
/** Short slug: paperclip, linear, github, webhook
|
|
35
|
+
/** Short slug: paperclip, linear, github, webhook */
|
|
35
36
|
readonly name: string;
|
|
36
|
-
/** Human-readable display name. */
|
|
37
|
-
readonly displayName: string;
|
|
38
37
|
/**
|
|
39
|
-
* Parse incoming webhook
|
|
40
|
-
* Return null to
|
|
41
|
-
* Throw to reject with 400.
|
|
38
|
+
* Parse incoming webhook → InboundTask.
|
|
39
|
+
* Return null to acknowledge but skip.
|
|
42
40
|
*/
|
|
43
|
-
parseWebhook(headers: Record<string, string | string[] | undefined>, body: string): Promise<
|
|
44
|
-
/** Post agent response back to
|
|
45
|
-
postResult(task:
|
|
46
|
-
/** Optional: check if the channel is reachable. */
|
|
47
|
-
healthCheck?(): Promise<boolean>;
|
|
41
|
+
parseWebhook(headers: Record<string, string | string[] | undefined>, body: string): Promise<InboundTask | null>;
|
|
42
|
+
/** Post agent response back to originating platform. */
|
|
43
|
+
postResult(task: InboundTask, resultText: string): Promise<void>;
|
|
48
44
|
}
|
|
49
|
-
/** Registry of available channel connectors. */
|
|
50
|
-
export type ConnectorRegistry = Map<string, ChannelConnector>;
|
|
51
45
|
//# sourceMappingURL=connector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../../src/cli/gateway/connector.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../../src/cli/gateway/connector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IAC1B,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED,oDAAoD;AACpD,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,YAAY,CACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,EACtD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAE/B,wDAAwD;IACxD,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClE"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Channel connector interface
|
|
2
|
+
* Channel connector interface.
|
|
3
3
|
*
|
|
4
|
-
* A
|
|
5
|
-
*
|
|
4
|
+
* A connector is a THIN protocol translator between an external platform
|
|
5
|
+
* and the AgenticFlow runtime API. It does NOT contain business logic —
|
|
6
|
+
* the runtime handles agent execution, thread persistence, RAG, tools, etc.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
8
|
+
* Connector responsibilities:
|
|
9
|
+
* 1. Parse platform webhook → { afAgentId, message, threadId }
|
|
10
|
+
* 2. Post agent response back to platform
|
|
11
|
+
*
|
|
12
|
+
* Runtime responsibilities (NOT the connector's job):
|
|
13
|
+
* - Agent execution, streaming, tool calling
|
|
14
|
+
* - Thread/session persistence
|
|
15
|
+
* - Knowledge retrieval, sub-agents
|
|
16
|
+
* - Credit management, permissions
|
|
9
17
|
*/
|
|
10
18
|
export {};
|
|
11
19
|
//# sourceMappingURL=connector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector.js","sourceRoot":"","sources":["../../../src/cli/gateway/connector.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"connector.js","sourceRoot":"","sources":["../../../src/cli/gateway/connector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
|
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Linear channel connector.
|
|
2
|
+
* Linear channel connector (thin).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Setup: In Linear → Settings → API → Webhooks, add:
|
|
8
|
-
* URL: https://your-gateway/webhook/linear
|
|
9
|
-
* Events: Issues (created, updated), Comments (created)
|
|
4
|
+
* Translates Linear webhooks → AF runtime call.
|
|
5
|
+
* Linear webhook events: issue.create, issue.update, comment.create.
|
|
10
6
|
*/
|
|
11
|
-
import type { ChannelConnector,
|
|
7
|
+
import type { ChannelConnector, InboundTask } from "../connector.js";
|
|
12
8
|
export interface LinearConnectorConfig {
|
|
13
9
|
linearApiKey: string;
|
|
14
|
-
/**
|
|
10
|
+
/** Team key → AF agent ID. e.g. { "ENG": "af-uuid" } */
|
|
15
11
|
agentMapping: Record<string, string>;
|
|
16
|
-
/** Optional: AF stream URL override per agent. */
|
|
17
|
-
streamUrlMapping?: Record<string, string>;
|
|
18
12
|
}
|
|
19
13
|
export declare class LinearConnector implements ChannelConnector {
|
|
20
14
|
private config;
|
|
21
15
|
readonly name = "linear";
|
|
22
|
-
readonly displayName = "Linear";
|
|
23
16
|
constructor(config: LinearConnectorConfig);
|
|
24
|
-
parseWebhook(_headers: Record<string, string | string[] | undefined>, body: string): Promise<
|
|
25
|
-
postResult(task:
|
|
17
|
+
parseWebhook(_headers: Record<string, string | string[] | undefined>, body: string): Promise<InboundTask | null>;
|
|
18
|
+
postResult(task: InboundTask, resultText: string): Promise<void>;
|
|
26
19
|
}
|
|
27
20
|
//# sourceMappingURL=linear.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linear.d.ts","sourceRoot":"","sources":["../../../../src/cli/gateway/connectors/linear.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"linear.d.ts","sourceRoot":"","sources":["../../../../src/cli/gateway/connectors/linear.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAcD,qBAAa,eAAgB,YAAW,gBAAgB;IAG1C,OAAO,CAAC,MAAM;IAF1B,QAAQ,CAAC,IAAI,YAAY;gBAEL,MAAM,EAAE,qBAAqB;IAE3C,YAAY,CAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,EACvD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IA+CxB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAUvE"}
|
|
@@ -1,121 +1,76 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Linear channel connector.
|
|
2
|
+
* Linear channel connector (thin).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Setup: In Linear → Settings → API → Webhooks, add:
|
|
8
|
-
* URL: https://your-gateway/webhook/linear
|
|
9
|
-
* Events: Issues (created, updated), Comments (created)
|
|
4
|
+
* Translates Linear webhooks → AF runtime call.
|
|
5
|
+
* Linear webhook events: issue.create, issue.update, comment.create.
|
|
10
6
|
*/
|
|
11
|
-
|
|
12
|
-
async function linearQuery(apiKey, query, variables) {
|
|
7
|
+
async function linearGql(apiKey, query, variables) {
|
|
13
8
|
const resp = await fetch("https://api.linear.app/graphql", {
|
|
14
9
|
method: "POST",
|
|
15
|
-
headers: {
|
|
16
|
-
"Content-Type": "application/json",
|
|
17
|
-
Authorization: apiKey,
|
|
18
|
-
},
|
|
10
|
+
headers: { "Content-Type": "application/json", Authorization: apiKey },
|
|
19
11
|
body: JSON.stringify({ query, variables }),
|
|
20
12
|
});
|
|
21
13
|
if (!resp.ok)
|
|
22
|
-
throw new Error(`Linear API
|
|
14
|
+
throw new Error(`Linear API ${resp.status}`);
|
|
23
15
|
const result = (await resp.json());
|
|
24
16
|
if (result.errors)
|
|
25
|
-
throw new Error(
|
|
17
|
+
throw new Error(JSON.stringify(result.errors));
|
|
26
18
|
return result.data;
|
|
27
19
|
}
|
|
28
|
-
async function linearGetIssue(apiKey, issueId) {
|
|
29
|
-
const data = (await linearQuery(apiKey, `
|
|
30
|
-
query($id: String!) {
|
|
31
|
-
issue(id: $id) {
|
|
32
|
-
id identifier title description priority priorityLabel
|
|
33
|
-
state { name }
|
|
34
|
-
team { key name }
|
|
35
|
-
assignee { name }
|
|
36
|
-
labels { nodes { name } }
|
|
37
|
-
comments { nodes { body user { name } createdAt } }
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
`, { id: issueId }));
|
|
41
|
-
return data.issue;
|
|
42
|
-
}
|
|
43
|
-
async function linearAddComment(apiKey, issueId, body) {
|
|
44
|
-
await linearQuery(apiKey, `
|
|
45
|
-
mutation($issueId: String!, $body: String!) {
|
|
46
|
-
commentCreate(input: { issueId: $issueId, body: $body }) {
|
|
47
|
-
success
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
`, { issueId, body });
|
|
51
|
-
}
|
|
52
20
|
export class LinearConnector {
|
|
53
21
|
config;
|
|
54
22
|
name = "linear";
|
|
55
|
-
displayName = "Linear";
|
|
56
23
|
constructor(config) {
|
|
57
24
|
this.config = config;
|
|
58
25
|
}
|
|
59
26
|
async parseWebhook(_headers, body) {
|
|
60
27
|
const payload = JSON.parse(body);
|
|
61
|
-
// Only handle issue creates/updates and comment creates
|
|
62
28
|
const isIssue = payload.type === "Issue" && ["create", "update"].includes(payload.action);
|
|
63
29
|
const isComment = payload.type === "Comment" && payload.action === "create";
|
|
64
30
|
if (!isIssue && !isComment)
|
|
65
31
|
return null;
|
|
66
32
|
const issueId = isComment ? payload.data.issueId : payload.data.id;
|
|
67
|
-
// Fetch
|
|
68
|
-
const
|
|
33
|
+
// Fetch issue for context
|
|
34
|
+
const data = (await linearGql(this.config.linearApiKey, `
|
|
35
|
+
query($id: String!) {
|
|
36
|
+
issue(id: $id) {
|
|
37
|
+
id identifier title description priorityLabel
|
|
38
|
+
state { name }
|
|
39
|
+
team { key }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`, { id: issueId }));
|
|
43
|
+
const issue = data.issue;
|
|
69
44
|
const team = issue.team;
|
|
70
45
|
const teamKey = team?.key ?? "";
|
|
71
|
-
// Find AF agent for this team
|
|
72
46
|
const afAgentId = this.config.agentMapping[teamKey];
|
|
73
47
|
if (!afAgentId)
|
|
74
|
-
return null; // No agent
|
|
48
|
+
return null; // No agent for this team
|
|
75
49
|
const state = issue.state;
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (labels?.nodes?.length) {
|
|
85
|
-
parts.push(`- **Labels:** ${labels.nodes.map((l) => l.name).join(", ")}`);
|
|
86
|
-
}
|
|
87
|
-
if (issue.description) {
|
|
88
|
-
parts.push(`\n### Description\n${issue.description}`);
|
|
89
|
-
}
|
|
90
|
-
if (comments?.nodes?.length) {
|
|
91
|
-
parts.push("\n### Recent Comments");
|
|
92
|
-
for (const c of comments.nodes.slice(-5)) {
|
|
93
|
-
const user = c.user;
|
|
94
|
-
parts.push(`- **${user?.name ?? "Unknown"}:** ${c.body}`);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
if (isComment && payload.data.body) {
|
|
98
|
-
parts.push(`\n### New Comment (trigger)\n${payload.data.body}`);
|
|
99
|
-
}
|
|
100
|
-
parts.push("\n## Instructions\nComplete this task. Provide a clear summary of your work.");
|
|
50
|
+
const parts = [
|
|
51
|
+
`Task: ${issue.identifier} — ${issue.title}`,
|
|
52
|
+
`Priority: ${issue.priorityLabel ?? "medium"} | Status: ${state?.name ?? "unknown"}`,
|
|
53
|
+
];
|
|
54
|
+
if (issue.description)
|
|
55
|
+
parts.push(`Description: ${issue.description}`);
|
|
56
|
+
if (isComment && payload.data.body)
|
|
57
|
+
parts.push(`New comment: ${payload.data.body}`);
|
|
101
58
|
return {
|
|
102
|
-
threadId: issueId, // reuse Linear issue ID as thread for continuity
|
|
103
|
-
taskIdentifier: issue.identifier ?? issueId,
|
|
104
|
-
message: parts.join("\n"),
|
|
105
59
|
afAgentId,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
userName: issue.assignee?.name,
|
|
111
|
-
},
|
|
112
|
-
platformContext: { issueId, teamKey },
|
|
60
|
+
message: parts.join("\n"),
|
|
61
|
+
threadId: issueId,
|
|
62
|
+
label: issue.identifier ?? issueId,
|
|
63
|
+
replyContext: { issueId, teamKey },
|
|
113
64
|
};
|
|
114
65
|
}
|
|
115
66
|
async postResult(task, resultText) {
|
|
116
|
-
const issueId = task.
|
|
67
|
+
const issueId = task.replyContext.issueId;
|
|
117
68
|
if (issueId && resultText) {
|
|
118
|
-
await
|
|
69
|
+
await linearGql(this.config.linearApiKey, `
|
|
70
|
+
mutation($issueId: String!, $body: String!) {
|
|
71
|
+
commentCreate(input: { issueId: $issueId, body: $body }) { success }
|
|
72
|
+
}
|
|
73
|
+
`, { issueId, body: `**Agent Response:**\n\n${resultText}` });
|
|
119
74
|
}
|
|
120
75
|
}
|
|
121
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linear.js","sourceRoot":"","sources":["../../../../src/cli/gateway/connectors/linear.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"linear.js","sourceRoot":"","sources":["../../../../src/cli/gateway/connectors/linear.ts"],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UAAqB,IAAI,OAAO;YAC9C,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAiB,EAAE,UAAkB;QACpD,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,OAAiB,CAAC;QACpD,IAAI,OAAO,IAAI,UAAU,EAAE,CAAC;YAC1B,MAAM,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;;;;OAIzC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,0BAA0B,UAAU,EAAE,EAAE,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Paperclip channel connector.
|
|
2
|
+
* Paperclip channel connector (thin).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Translates Paperclip heartbeat POST → AF runtime call.
|
|
5
|
+
* All execution logic lives in the AF runtime.
|
|
6
6
|
*/
|
|
7
|
-
import type { ChannelConnector,
|
|
7
|
+
import type { ChannelConnector, InboundTask } from "../connector.js";
|
|
8
8
|
export interface PaperclipConnectorConfig {
|
|
9
9
|
paperclipUrl: string;
|
|
10
10
|
}
|
|
11
11
|
export declare class PaperclipConnector implements ChannelConnector {
|
|
12
|
-
private config;
|
|
13
12
|
readonly name = "paperclip";
|
|
14
|
-
readonly displayName = "Paperclip";
|
|
15
13
|
private pc;
|
|
16
14
|
constructor(config: PaperclipConnectorConfig);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
postResult(task: NormalizedTask, resultText: string): Promise<void>;
|
|
20
|
-
private buildMessage;
|
|
15
|
+
parseWebhook(_headers: Record<string, string | string[] | undefined>, body: string): Promise<InboundTask | null>;
|
|
16
|
+
postResult(task: InboundTask, resultText: string): Promise<void>;
|
|
21
17
|
}
|
|
22
18
|
//# sourceMappingURL=paperclip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paperclip.d.ts","sourceRoot":"","sources":["../../../../src/cli/gateway/connectors/paperclip.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"paperclip.d.ts","sourceRoot":"","sources":["../../../../src/cli/gateway/connectors/paperclip.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,kBAAmB,YAAW,gBAAgB;IACzD,QAAQ,CAAC,IAAI,eAAe;IAC5B,OAAO,CAAC,EAAE,CAAoB;gBAElB,MAAM,EAAE,wBAAwB;IAItC,YAAY,CAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,EACvD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAqDxB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAMvE"}
|