@insta-dev01/insta-plugin-openclaw 1.0.4 → 1.0.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/channel/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/channel/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAkBzD,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,OAAO,IAAI,EAAE,SAAS,GACzB,IAAI,CAEN;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAE5D;AAID,eAAO,MAAM,MAAM,EAAE,aA6MpB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
|
2
2
|
import { CHANNEL_ID, DEBUG_ENABLED, POLL_INTERVAL_MS } from "./config.js";
|
|
3
3
|
import { monitorProvider } from "./connection.js";
|
|
4
4
|
import { triggerRegistrationAgent } from "./registrar.js";
|
|
5
|
-
import { setBaseDir, isAgentRunning, getPendingRegistration } from "./registration-store.js";
|
|
5
|
+
import { setBaseDir, isAgentRunning, getPendingRegistration, } from "./registration-store.js";
|
|
6
6
|
import { readProfile } from "../utils/profile.js";
|
|
7
7
|
import { createEnvelope, textToEventSequence } from "./protocol.js";
|
|
8
8
|
import { DebugLogger } from "./logger.js";
|
|
@@ -33,6 +33,35 @@ export const plugin = {
|
|
|
33
33
|
edit: false,
|
|
34
34
|
reply: false,
|
|
35
35
|
},
|
|
36
|
+
configSchema: {
|
|
37
|
+
schema: {
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {
|
|
40
|
+
enabled: {
|
|
41
|
+
type: "boolean",
|
|
42
|
+
default: true,
|
|
43
|
+
},
|
|
44
|
+
systemPrompt: {
|
|
45
|
+
type: "string",
|
|
46
|
+
},
|
|
47
|
+
debug: {
|
|
48
|
+
type: "boolean",
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
uiHints: {
|
|
54
|
+
enabled: {
|
|
55
|
+
label: "Enable InstaClaw Connector",
|
|
56
|
+
},
|
|
57
|
+
systemPrompt: {
|
|
58
|
+
label: "System Prompt",
|
|
59
|
+
},
|
|
60
|
+
debug: {
|
|
61
|
+
label: "Enable Debug Logging",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
36
65
|
config: {
|
|
37
66
|
listAccountIds: (_cfg) => [DEFAULT_ACCOUNT_ID],
|
|
38
67
|
resolveAccount: (_cfg, accountId) => ({
|
|
@@ -66,9 +95,15 @@ export const plugin = {
|
|
|
66
95
|
return;
|
|
67
96
|
}
|
|
68
97
|
const t = setTimeout(resolve, ms);
|
|
69
|
-
abortSignal.addEventListener("abort", () => {
|
|
98
|
+
abortSignal.addEventListener("abort", () => {
|
|
99
|
+
clearTimeout(t);
|
|
100
|
+
resolve();
|
|
101
|
+
}, { once: true });
|
|
102
|
+
});
|
|
103
|
+
logger.info("Gateway startup — entering credential polling loop", {
|
|
104
|
+
baseDir,
|
|
105
|
+
pollIntervalMs: POLL_INTERVAL_MS,
|
|
70
106
|
});
|
|
71
|
-
logger.info("Gateway startup — entering credential polling loop", { baseDir, pollIntervalMs: POLL_INTERVAL_MS });
|
|
72
107
|
while (!abortSignal.aborted) {
|
|
73
108
|
const profile = await readProfile(baseDir).catch((err) => {
|
|
74
109
|
logger.error("Failed to read profile", err);
|
|
@@ -98,7 +133,10 @@ export const plugin = {
|
|
|
98
133
|
});
|
|
99
134
|
if (!agentRunning && !hasPending) {
|
|
100
135
|
const result = await triggerRegistrationAgent(ctx.channelRuntime, cfg, logger, resolvedAccountId);
|
|
101
|
-
logger.info("Registration agent trigger result", {
|
|
136
|
+
logger.info("Registration agent trigger result", {
|
|
137
|
+
status: result.status,
|
|
138
|
+
error: result.error,
|
|
139
|
+
});
|
|
102
140
|
}
|
|
103
141
|
await sleep(POLL_INTERVAL_MS);
|
|
104
142
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/channel/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/channel/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,cAAc,EACd,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,iFAAiF;AAEjF,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkC,CAAC;AAEpE,MAAM,UAAU,kBAAkB,CAChC,SAAiB,EACjB,EAA0B;IA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AC,KAAK,CAAC,CAAC,CAAC;YACjC,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,UAAU;gBACnB,SAAS,EAAE,OAAO,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;gBAC5E,EAAE;aACH,CAAC;QACJ,CAAC;KACF;CACF,CAAC"}
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "insta-plugin-openclaw",
|
|
3
|
+
"name": "Insta Connector",
|
|
4
|
+
"description": "A lightweight OpenClaw channel plugin for WebSocket-based bidirectional messaging",
|
|
5
|
+
"kind": "channel",
|
|
3
6
|
"channels": ["insta-connector"],
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
+
"activation": {
|
|
8
|
+
"onStartup": false,
|
|
9
|
+
"onChannels": ["insta-connector"]
|
|
7
10
|
},
|
|
8
11
|
"configSchema": {
|
|
9
12
|
"type": "object",
|
|
@@ -11,11 +14,55 @@
|
|
|
11
14
|
"properties": {
|
|
12
15
|
"enabled": {
|
|
13
16
|
"type": "boolean",
|
|
14
|
-
"default": true
|
|
17
|
+
"default": true,
|
|
18
|
+
"description": "Enable or disable the plugin runtime"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"uiHints": {
|
|
23
|
+
"enabled": {
|
|
24
|
+
"label": "Plugin enabled",
|
|
25
|
+
"help": "Enable this plugin and allow it to handle its declared channel."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"channelConfigs": {
|
|
29
|
+
"insta-connector": {
|
|
30
|
+
"label": "Insta Connector",
|
|
31
|
+
"description": "WebSocket-based bidirectional messaging channel",
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"properties": {
|
|
36
|
+
"enabled": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"default": true,
|
|
39
|
+
"description": "Enable or disable this channel instance"
|
|
40
|
+
},
|
|
41
|
+
"systemPrompt": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "System prompt for the Insta connector"
|
|
44
|
+
},
|
|
45
|
+
"debug": {
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"default": false,
|
|
48
|
+
"description": "Enable debug logging for the channel"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
15
51
|
},
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
52
|
+
"uiHints": {
|
|
53
|
+
"enabled": {
|
|
54
|
+
"label": "Channel enabled",
|
|
55
|
+
"help": "Turn this channel instance on or off."
|
|
56
|
+
},
|
|
57
|
+
"systemPrompt": {
|
|
58
|
+
"label": "System prompt",
|
|
59
|
+
"help": "Optional default system prompt injected by this channel."
|
|
60
|
+
},
|
|
61
|
+
"debug": {
|
|
62
|
+
"label": "Debug logging",
|
|
63
|
+
"help": "Enable verbose logs for troubleshooting.",
|
|
64
|
+
"advanced": true
|
|
65
|
+
}
|
|
19
66
|
}
|
|
20
67
|
}
|
|
21
68
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insta-dev01/insta-plugin-openclaw",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Instagram Claw Connector - A lightweight OpenClaw channel plugin for WebSocket-based bidirectional messaging",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
7
|
-
"type": "module",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
10
|
"openclaw.plugin.json",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"author": "Instagram Claw Team",
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"engines": {
|
|
41
|
-
"node": ">=
|
|
41
|
+
"node": ">=22.19.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"archiver": "^8.0.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"ws": "^8.20.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"openclaw": ">=2026.
|
|
49
|
+
"openclaw": ">=2026.6.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^20.19.37",
|
|
@@ -62,9 +62,15 @@
|
|
|
62
62
|
"./dist/index.js"
|
|
63
63
|
],
|
|
64
64
|
"channel": {
|
|
65
|
-
"id": "insta-connector"
|
|
65
|
+
"id": "insta-connector",
|
|
66
|
+
"label": "Insta Connector",
|
|
67
|
+
"blurb": "WebSocket-based bidirectional messaging channel for Instagram connector flows"
|
|
66
68
|
},
|
|
67
|
-
"
|
|
69
|
+
"install": {
|
|
70
|
+
"npmSpec": "@insta-dev01/insta-plugin-openclaw@1.0.6",
|
|
71
|
+
"defaultChoice": "npm",
|
|
72
|
+
"minHostVersion": ">=2026.6.1"
|
|
73
|
+
}
|
|
68
74
|
},
|
|
69
75
|
"packageManager": "pnpm@10.25.0"
|
|
70
76
|
}
|