@orgloop/connector-claude-code 0.1.9 → 0.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @orgloop/connector-claude-code
2
2
 
3
- Captures Claude Code session exit events via a webhook handler. Instead of polling an external API, this connector exposes an HTTP endpoint that receives POST requests from a Claude Code post-exit hook script.
3
+ > **Note:** This package is now a backward-compatible alias for [`@orgloop/connector-coding-agent`](../coding-agent/README.md). New projects should use `@orgloop/connector-coding-agent` directly, which supports any coding agent harness via the `platform` config field.
4
+
5
+ Captures Claude Code session lifecycle events via a webhook handler. Instead of polling an external API, this connector exposes an HTTP endpoint that receives POST requests from Claude Code hook scripts (start + stop).
4
6
 
5
7
  ## Install
6
8
 
@@ -30,13 +32,18 @@ sources:
30
32
 
31
33
  ## Events emitted
32
34
 
33
- Events are emitted as OrgLoop `actor.stopped` type.
35
+ Events follow the normalized lifecycle contract in `event.payload.lifecycle` and `event.payload.session`.
36
+
37
+ Non-terminal phases emit `resource.changed`. Terminal phases emit `actor.stopped`.
34
38
 
35
39
  ### Event kind
36
40
 
37
41
  | Platform event | Trigger | Description |
38
42
  |---|---|---|
39
- | `session.exited` | Claude Code session ends | A Claude Code session has exited, delivered via webhook |
43
+ | `session.started` | Claude Code session starts | Session launched (start hook) |
44
+ | `session.completed` | Claude Code session ends with exit 0 | Session completed successfully |
45
+ | `session.failed` | Claude Code session ends with non-zero exit | Session failed |
46
+ | `session.stopped` | Claude Code session ends via signal | Session stopped/cancelled |
40
47
 
41
48
  ### Example event payload
42
49
 
@@ -48,13 +55,29 @@ Events are emitted as OrgLoop `actor.stopped` type.
48
55
  "type": "actor.stopped",
49
56
  "provenance": {
50
57
  "platform": "claude-code",
51
- "platform_event": "session.exited",
58
+ "platform_event": "session.completed",
52
59
  "author": "claude-code",
53
60
  "author_type": "bot",
54
61
  "session_id": "sess-abc123",
55
62
  "working_directory": "/home/user/my-project"
56
63
  },
57
64
  "payload": {
65
+ "lifecycle": {
66
+ "phase": "completed",
67
+ "terminal": true,
68
+ "outcome": "success",
69
+ "reason": "exit_code_0",
70
+ "dedupe_key": "claude-code:sess-abc123:completed"
71
+ },
72
+ "session": {
73
+ "id": "sess-abc123",
74
+ "adapter": "claude-code",
75
+ "harness": "claude-code",
76
+ "cwd": "/home/user/my-project",
77
+ "started_at": "2025-01-15T10:28:00.000Z",
78
+ "ended_at": "2025-01-15T10:30:00.000Z",
79
+ "exit_status": 0
80
+ },
58
81
  "session_id": "sess-abc123",
59
82
  "working_directory": "/home/user/my-project",
60
83
  "duration_seconds": 120,
@@ -66,7 +89,7 @@ Events are emitted as OrgLoop `actor.stopped` type.
66
89
 
67
90
  ### Webhook request format
68
91
 
69
- POST a JSON body to the connector's webhook endpoint:
92
+ POST a JSON body to the connector's webhook endpoint. The same format is used for start and stop hooks.
70
93
 
71
94
  ```json
72
95
  {
@@ -81,10 +104,12 @@ POST a JSON body to the connector's webhook endpoint:
81
104
  | Field | Type | Required | Description |
82
105
  |-------|------|----------|-------------|
83
106
  | `session_id` | `string` | yes | Claude Code session identifier |
84
- | `working_directory` | `string` | yes | Working directory of the session |
85
- | `duration_seconds` | `number` | yes | Session duration in seconds |
86
- | `exit_status` | `number` | yes | Process exit code (0 = success) |
107
+ | `working_directory` | `string` | no | Working directory of the session |
108
+ | `cwd` | `string` | no | Alias for `working_directory` |
109
+ | `duration_seconds` | `number` | no | Session duration in seconds |
110
+ | `exit_status` | `number` | no | Process exit code (0 = success) |
87
111
  | `summary` | `string` | no | Optional session summary text |
112
+ | `hook_type` | `string` | no | `start` or `stop` (defaults to `stop`) |
88
113
  | `timestamp` | `string` | no | Optional ISO 8601 timestamp |
89
114
 
90
115
  ## Example route
@@ -108,11 +133,13 @@ routes:
108
133
 
109
134
  - **No API tokens needed** -- this connector receives events via HTTP webhook.
110
135
  - A Claude Code **Stop hook** must be configured to POST session data to the OrgLoop webhook endpoint when a session exits.
111
- - The connector registration includes setup metadata for the hook. You can install it with:
136
+ - An optional **Start hook** can emit `session.started` events on session launch.
137
+ - The connector registration includes setup metadata for both hooks. You can install them with:
112
138
  ```bash
113
139
  orgloop hook claude-code-stop
140
+ orgloop hook claude-code-start
114
141
  ```
115
- This registers a post-exit hook in Claude Code's settings that sends session data to OrgLoop.
142
+ This registers hooks in Claude Code's settings that send session data to OrgLoop.
116
143
 
117
144
  ## Environment Variables
118
145
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  /**
2
- * @orgloop/connector-claude-code — Claude Code hook-based source connector registration.
2
+ * @orgloop/connector-claude-code — Backward-compatible alias.
3
+ *
4
+ * This package now delegates to @orgloop/connector-coding-agent.
5
+ * The connector ID remains 'claude-code' for existing configs.
3
6
  */
4
7
  import type { ConnectorRegistration } from '@orgloop/sdk';
8
+ export { CodingAgentSource as ClaudeCodeSource } from '@orgloop/connector-coding-agent';
5
9
  export default function register(): ConnectorRegistration;
6
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAG1D,MAAM,CAAC,OAAO,UAAU,QAAQ,IAAI,qBAAqB,CAuBxD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExF,MAAM,CAAC,OAAO,UAAU,QAAQ,IAAI,qBAAqB,CA8BxD"}
package/dist/index.js CHANGED
@@ -1,11 +1,15 @@
1
1
  /**
2
- * @orgloop/connector-claude-code — Claude Code hook-based source connector registration.
2
+ * @orgloop/connector-claude-code — Backward-compatible alias.
3
+ *
4
+ * This package now delegates to @orgloop/connector-coding-agent.
5
+ * The connector ID remains 'claude-code' for existing configs.
3
6
  */
4
- import { ClaudeCodeSource } from './source.js';
7
+ import { CodingAgentSource } from '@orgloop/connector-coding-agent';
8
+ export { CodingAgentSource as ClaudeCodeSource } from '@orgloop/connector-coding-agent';
5
9
  export default function register() {
6
10
  return {
7
11
  id: 'claude-code',
8
- source: ClaudeCodeSource,
12
+ source: CodingAgentSource,
9
13
  setup: {
10
14
  env_vars: [
11
15
  {
@@ -21,6 +25,12 @@ export default function register() {
21
25
  platform: 'claude-code',
22
26
  command: 'orgloop hook claude-code-stop',
23
27
  },
28
+ {
29
+ id: 'claude-code-start-hook',
30
+ description: 'Install a Start hook in Claude Code settings so session launches notify OrgLoop (optional)',
31
+ platform: 'claude-code',
32
+ command: 'orgloop hook claude-code-start',
33
+ },
24
34
  ],
25
35
  },
26
36
  };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,OAAO,UAAU,QAAQ;IAC/B,OAAO;QACN,EAAE,EAAE,aAAa;QACjB,MAAM,EAAE,gBAAgB;QACxB,KAAK,EAAE;YACN,QAAQ,EAAE;gBACT;oBACC,IAAI,EAAE,4BAA4B;oBAClC,WAAW,EAAE,iEAAiE;oBAC9E,QAAQ,EAAE,KAAK;iBACf;aACD;YACD,YAAY,EAAE;gBACb;oBACC,EAAE,EAAE,uBAAuB;oBAC3B,WAAW,EACV,6EAA6E;oBAC9E,QAAQ,EAAE,aAAa;oBACvB,OAAO,EAAE,+BAA+B;iBACxC;aACD;SACD;KACD,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExF,MAAM,CAAC,OAAO,UAAU,QAAQ;IAC/B,OAAO;QACN,EAAE,EAAE,aAAa;QACjB,MAAM,EAAE,iBAAiB;QACzB,KAAK,EAAE;YACN,QAAQ,EAAE;gBACT;oBACC,IAAI,EAAE,4BAA4B;oBAClC,WAAW,EAAE,iEAAiE;oBAC9E,QAAQ,EAAE,KAAK;iBACf;aACD;YACD,YAAY,EAAE;gBACb;oBACC,EAAE,EAAE,uBAAuB;oBAC3B,WAAW,EACV,6EAA6E;oBAC9E,QAAQ,EAAE,aAAa;oBACvB,OAAO,EAAE,+BAA+B;iBACxC;gBACD;oBACC,EAAE,EAAE,wBAAwB;oBAC5B,WAAW,EACV,4FAA4F;oBAC7F,QAAQ,EAAE,aAAa;oBACvB,OAAO,EAAE,gCAAgC;iBACzC;aACD;SACD;KACD,CAAC;AACH,CAAC"}
package/dist/source.d.ts CHANGED
@@ -1,21 +1,10 @@
1
1
  /**
2
- * Claude Code source connector — hook-based (webhook receiver).
2
+ * Claude Code source connector — backward-compatible re-export.
3
3
  *
4
- * Instead of polling, this connector exposes a webhook handler that receives
5
- * POST requests from Claude Code's post-exit hook script.
4
+ * The implementation has moved to @orgloop/connector-coding-agent.
5
+ * This module re-exports the generalized CodingAgentSource as ClaudeCodeSource
6
+ * for backward compatibility.
6
7
  */
7
- import type { PollResult, SourceConfig, SourceConnector, WebhookHandler } from '@orgloop/sdk';
8
- export declare class ClaudeCodeSource implements SourceConnector {
9
- readonly id = "claude-code";
10
- private sourceId;
11
- private secret?;
12
- private bufferPath?;
13
- private pendingEvents;
14
- init(config: SourceConfig): Promise<void>;
15
- poll(_checkpoint: string | null): Promise<PollResult>;
16
- webhook(): WebhookHandler;
17
- shutdown(): Promise<void>;
18
- private persistEvent;
19
- private loadBufferedEvents;
20
- }
8
+ export type { CodingAgentSessionPayload as ClaudeCodeSessionPayload, CodingAgentSourceConfig as ClaudeCodeSourceConfig, } from '@orgloop/connector-coding-agent';
9
+ export { CodingAgentSource as ClaudeCodeSource } from '@orgloop/connector-coding-agent';
21
10
  //# sourceMappingURL=source.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAEX,UAAU,EACV,YAAY,EACZ,eAAe,EACf,cAAc,EACd,MAAM,cAAc,CAAC;AAiCtB,qBAAa,gBAAiB,YAAW,eAAe;IACvD,QAAQ,CAAC,EAAE,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAiB;IACjC,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,UAAU,CAAC,CAAS;IAC5B,OAAO,CAAC,aAAa,CAAsB;IAErC,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBzC,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC;IAiB3D,OAAO,IAAI,cAAc;IAwEnB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,kBAAkB;CAU1B"}
1
+ {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACX,yBAAyB,IAAI,wBAAwB,EACrD,uBAAuB,IAAI,sBAAsB,GACjD,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,MAAM,iCAAiC,CAAC"}
package/dist/source.js CHANGED
@@ -1,151 +1,9 @@
1
1
  /**
2
- * Claude Code source connector — hook-based (webhook receiver).
2
+ * Claude Code source connector — backward-compatible re-export.
3
3
  *
4
- * Instead of polling, this connector exposes a webhook handler that receives
5
- * POST requests from Claude Code's post-exit hook script.
4
+ * The implementation has moved to @orgloop/connector-coding-agent.
5
+ * This module re-exports the generalized CodingAgentSource as ClaudeCodeSource
6
+ * for backward compatibility.
6
7
  */
7
- import { createHmac, timingSafeEqual } from 'node:crypto';
8
- import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
9
- import { join } from 'node:path';
10
- import { buildEvent } from '@orgloop/sdk';
11
- /** Resolve env var references like ${WEBHOOK_SECRET} */
12
- function resolveEnvVar(value) {
13
- const match = value.match(/^\$\{(.+)\}$/);
14
- if (match) {
15
- const envValue = process.env[match[1]];
16
- if (!envValue) {
17
- throw new Error(`Environment variable ${match[1]} is not set`);
18
- }
19
- return envValue;
20
- }
21
- return value;
22
- }
23
- export class ClaudeCodeSource {
24
- id = 'claude-code';
25
- sourceId = 'claude-code';
26
- secret;
27
- bufferPath;
28
- pendingEvents = [];
29
- async init(config) {
30
- this.sourceId = config.id;
31
- const cfg = config.config;
32
- if (cfg.secret) {
33
- this.secret = resolveEnvVar(cfg.secret);
34
- }
35
- if (cfg.buffer_dir) {
36
- const dir = resolveEnvVar(cfg.buffer_dir);
37
- if (!existsSync(dir)) {
38
- mkdirSync(dir, { recursive: true });
39
- }
40
- this.bufferPath = join(dir, `claude-code-${this.sourceId}.jsonl`);
41
- this.loadBufferedEvents();
42
- }
43
- }
44
- async poll(_checkpoint) {
45
- // Drain any events received via webhook since last poll
46
- let events;
47
- if (this.bufferPath) {
48
- events = this.loadBufferedEvents();
49
- // Clear the buffer file
50
- writeFileSync(this.bufferPath, '');
51
- }
52
- else {
53
- events = [...this.pendingEvents];
54
- this.pendingEvents = [];
55
- }
56
- const checkpoint = events.length > 0 ? events[events.length - 1].timestamp : new Date().toISOString();
57
- return { events, checkpoint };
58
- }
59
- webhook() {
60
- return async (req, res) => {
61
- if (req.method !== 'POST') {
62
- res.writeHead(405, { 'Content-Type': 'application/json' });
63
- res.end(JSON.stringify({ error: 'Method not allowed' }));
64
- return [];
65
- }
66
- const body = await readBody(req);
67
- // HMAC validation if secret is configured
68
- if (this.secret) {
69
- const signature = req.headers['x-hub-signature-256'] ?? req.headers['x-signature'];
70
- if (!signature) {
71
- res.writeHead(401, { 'Content-Type': 'application/json' });
72
- res.end(JSON.stringify({ error: 'Missing signature' }));
73
- return [];
74
- }
75
- const expected = `sha256=${createHmac('sha256', this.secret).update(body).digest('hex')}`;
76
- const sigBuffer = Buffer.from(signature);
77
- const expectedBuffer = Buffer.from(expected);
78
- if (sigBuffer.length !== expectedBuffer.length ||
79
- !timingSafeEqual(sigBuffer, expectedBuffer)) {
80
- res.writeHead(401, { 'Content-Type': 'application/json' });
81
- res.end(JSON.stringify({ error: 'Invalid signature' }));
82
- return [];
83
- }
84
- }
85
- try {
86
- const payload = JSON.parse(body);
87
- // Accept cwd as alias for working_directory (Claude Code stop hook sends cwd)
88
- const workingDirectory = payload.working_directory ?? payload.cwd ?? '';
89
- const event = buildEvent({
90
- source: this.sourceId,
91
- type: 'actor.stopped',
92
- provenance: {
93
- platform: 'claude-code',
94
- platform_event: 'session.exited',
95
- author: 'claude-code',
96
- author_type: 'bot',
97
- session_id: payload.session_id,
98
- working_directory: workingDirectory,
99
- },
100
- payload: {
101
- session_id: payload.session_id,
102
- working_directory: workingDirectory,
103
- duration_seconds: payload.duration_seconds,
104
- exit_status: payload.exit_status,
105
- summary: payload.summary ?? '',
106
- transcript_path: payload.transcript_path ?? '',
107
- },
108
- });
109
- this.persistEvent(event);
110
- res.writeHead(200, { 'Content-Type': 'application/json' });
111
- res.end(JSON.stringify({ ok: true, event_id: event.id }));
112
- return [event];
113
- }
114
- catch {
115
- res.writeHead(400, { 'Content-Type': 'application/json' });
116
- res.end(JSON.stringify({ error: 'Invalid JSON payload' }));
117
- return [];
118
- }
119
- };
120
- }
121
- async shutdown() {
122
- this.pendingEvents = [];
123
- }
124
- persistEvent(event) {
125
- if (this.bufferPath) {
126
- appendFileSync(this.bufferPath, `${JSON.stringify(event)}\n`);
127
- }
128
- else {
129
- this.pendingEvents.push(event);
130
- }
131
- }
132
- loadBufferedEvents() {
133
- if (!this.bufferPath || !existsSync(this.bufferPath)) {
134
- return [];
135
- }
136
- const content = readFileSync(this.bufferPath, 'utf-8').trim();
137
- if (!content) {
138
- return [];
139
- }
140
- return content.split('\n').map((line) => JSON.parse(line));
141
- }
142
- }
143
- function readBody(req) {
144
- return new Promise((resolve, reject) => {
145
- const chunks = [];
146
- req.on('data', (chunk) => chunks.push(chunk));
147
- req.on('end', () => resolve(Buffer.concat(chunks).toString('utf-8')));
148
- req.on('error', reject);
149
- });
150
- }
8
+ export { CodingAgentSource as ClaudeCodeSource } from '@orgloop/connector-coding-agent';
151
9
  //# sourceMappingURL=source.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"source.js","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7F,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAQjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,wDAAwD;AACxD,SAAS,aAAa,CAAC,KAAa;IACnC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC1C,IAAI,KAAK,EAAE,CAAC;QACX,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,wBAAwB,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAmBD,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AC,CAAC,IAAI,EAAE,CAAC;QAC9D,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,OAAO,EAAE,CAAC;QACX,CAAC;QACD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAiB,CAAC,CAAC;IAC5E,CAAC;CACD;AAED,SAAS,QAAQ,CAAC,GAAoB;IACrC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACtD,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACtE,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,MAAM,iCAAiC,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@orgloop/connector-claude-code",
3
- "version": "0.1.9",
3
+ "version": "0.7.6",
4
4
  "description": "OrgLoop Claude Code connector — hook-based exit notifications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "dependencies": {
9
- "@orgloop/sdk": "0.1.9"
9
+ "@orgloop/connector-coding-agent": "0.7.6",
10
+ "@orgloop/sdk": "0.7.6"
10
11
  },
11
12
  "orgloop": {
12
13
  "type": "connector",