@insta-dev01/insta-plugin-openclaw 1.0.0 → 1.0.2
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/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +171 -0
- package/dist/index.js.map +1 -0
- package/dist/src/channel/config.d.ts +9 -0
- package/dist/src/channel/config.d.ts.map +1 -0
- package/dist/src/channel/config.js +10 -0
- package/dist/src/channel/config.js.map +1 -0
- package/dist/src/channel/connection.d.ts +34 -0
- package/dist/src/channel/connection.d.ts.map +1 -0
- package/dist/src/channel/connection.js +281 -0
- package/dist/src/channel/connection.js.map +1 -0
- package/dist/src/channel/dispatcher.d.ts +43 -0
- package/dist/src/channel/dispatcher.d.ts.map +1 -0
- package/dist/src/channel/dispatcher.js +324 -0
- package/dist/src/channel/dispatcher.js.map +1 -0
- package/dist/src/channel/index.d.ts +5 -0
- package/dist/src/channel/index.d.ts.map +1 -0
- package/dist/src/channel/index.js +135 -0
- package/dist/src/channel/index.js.map +1 -0
- package/dist/src/channel/logger.d.ts +10 -0
- package/dist/src/channel/logger.d.ts.map +1 -0
- package/dist/src/channel/logger.js +30 -0
- package/dist/src/channel/logger.js.map +1 -0
- package/dist/src/channel/protocol.d.ts +15 -0
- package/dist/src/channel/protocol.d.ts.map +1 -0
- package/dist/src/channel/protocol.js +204 -0
- package/dist/src/channel/protocol.js.map +1 -0
- package/dist/src/channel/registrar.d.ts +21 -0
- package/dist/src/channel/registrar.d.ts.map +1 -0
- package/dist/src/channel/registrar.js +115 -0
- package/dist/src/channel/registrar.js.map +1 -0
- package/dist/src/channel/registration-store.d.ts +21 -0
- package/dist/src/channel/registration-store.d.ts.map +1 -0
- package/{src/channel/registration-store.ts → dist/src/channel/registration-store.js} +21 -46
- package/dist/src/channel/registration-store.js.map +1 -0
- package/dist/src/channel/types.d.ts +80 -0
- package/dist/src/channel/types.d.ts.map +1 -0
- package/dist/src/channel/types.js +3 -0
- package/dist/src/channel/types.js.map +1 -0
- package/dist/src/core/index.d.ts +5 -0
- package/dist/src/core/index.d.ts.map +1 -0
- package/dist/src/core/index.js +3 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/register-identity.d.ts +58 -0
- package/dist/src/core/register-identity.d.ts.map +1 -0
- package/dist/src/core/register-identity.js +251 -0
- package/dist/src/core/register-identity.js.map +1 -0
- package/dist/src/core/task-api.d.ts +31 -0
- package/dist/src/core/task-api.d.ts.map +1 -0
- package/dist/src/core/task-api.js +116 -0
- package/dist/src/core/task-api.js.map +1 -0
- package/dist/src/core/urls.d.ts +33 -0
- package/dist/src/core/urls.d.ts.map +1 -0
- package/dist/src/core/urls.js +40 -0
- package/dist/src/core/urls.js.map +1 -0
- package/dist/src/tools/get-plugin-profile.d.ts +7 -0
- package/dist/src/tools/get-plugin-profile.d.ts.map +1 -0
- package/dist/src/tools/get-plugin-profile.js +132 -0
- package/dist/src/tools/get-plugin-profile.js.map +1 -0
- package/dist/src/tools/grab-task.d.ts +7 -0
- package/dist/src/tools/grab-task.d.ts.map +1 -0
- package/dist/src/tools/grab-task.js +100 -0
- package/dist/src/tools/grab-task.js.map +1 -0
- package/dist/src/tools/list-tasks.d.ts +7 -0
- package/dist/src/tools/list-tasks.d.ts.map +1 -0
- package/dist/src/tools/list-tasks.js +92 -0
- package/dist/src/tools/list-tasks.js.map +1 -0
- package/dist/src/tools/propose-registration.d.ts +14 -0
- package/dist/src/tools/propose-registration.d.ts.map +1 -0
- package/dist/src/tools/propose-registration.js +103 -0
- package/dist/src/tools/propose-registration.js.map +1 -0
- package/dist/src/tools/register-identity.d.ts +11 -0
- package/dist/src/tools/register-identity.d.ts.map +1 -0
- package/dist/src/tools/register-identity.js +101 -0
- package/dist/src/tools/register-identity.js.map +1 -0
- package/dist/src/tools/submit-deliverable.d.ts +17 -0
- package/dist/src/tools/submit-deliverable.d.ts.map +1 -0
- package/dist/src/tools/submit-deliverable.js +215 -0
- package/dist/src/tools/submit-deliverable.js.map +1 -0
- package/dist/src/tools/upload-artifact.d.ts +14 -0
- package/dist/src/tools/upload-artifact.d.ts.map +1 -0
- package/dist/src/tools/upload-artifact.js +166 -0
- package/dist/src/tools/upload-artifact.js.map +1 -0
- package/dist/src/utils/file-lock.d.ts +4 -0
- package/dist/src/utils/file-lock.d.ts.map +1 -0
- package/dist/src/utils/file-lock.js +43 -0
- package/dist/src/utils/file-lock.js.map +1 -0
- package/dist/src/utils/profile.d.ts +17 -0
- package/dist/src/utils/profile.d.ts.map +1 -0
- package/dist/src/utils/profile.js +26 -0
- package/dist/src/utils/profile.js.map +1 -0
- package/dist/src/utils/session.d.ts +3 -0
- package/dist/src/utils/session.d.ts.map +1 -0
- package/dist/src/utils/session.js +26 -0
- package/dist/src/utils/session.js.map +1 -0
- package/package.json +17 -5
- package/.env.example +0 -23
- package/channel/346/265/201/347/250/213/345/233/276.md +0 -477
- package/index.ts +0 -198
- package/src/channel/config.ts +0 -27
- package/src/channel/connection.ts +0 -341
- package/src/channel/dispatcher.ts +0 -374
- package/src/channel/index.ts +0 -173
- package/src/channel/logger.ts +0 -36
- package/src/channel/protocol.ts +0 -265
- package/src/channel/registrar.ts +0 -172
- package/src/channel/types.ts +0 -102
- package/src/core/index.ts +0 -13
- package/src/core/register-identity.ts +0 -326
- package/src/core/task-api.ts +0 -168
- package/src/core/urls.ts +0 -52
- package/src/prompt/job.md +0 -21
- package/src/tools/get-plugin-profile.ts +0 -152
- package/src/tools/grab-task.ts +0 -133
- package/src/tools/list-tasks.ts +0 -135
- package/src/tools/propose-registration.ts +0 -116
- package/src/tools/register-identity.ts +0 -121
- package/src/tools/submit-deliverable.ts +0 -268
- package/src/tools/upload-artifact.ts +0 -222
- package/src/utils/file-lock.ts +0 -43
- package/src/utils/profile.ts +0 -45
- package/src/utils/session.ts +0 -30
- package/tests/profile.test.ts +0 -70
- package/tests/session.test.ts +0 -53
- package/tsconfig.json +0 -49
- package/vitest.config.ts +0 -26
package/tests/session.test.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { mkdtemp, rm } from "node:fs/promises";
|
|
2
|
-
import { tmpdir } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { describe, it, expect, afterEach, beforeEach } from "vitest";
|
|
5
|
-
import { readSession, writeSession } from "../src/utils/session.js";
|
|
6
|
-
|
|
7
|
-
let workDir: string;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
workDir = await mkdtemp(join(tmpdir(), "session-test-"));
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
afterEach(async () => {
|
|
14
|
-
await rm(workDir, { recursive: true, force: true });
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
describe("readSession", () => {
|
|
18
|
-
it("returns null when file does not exist", async () => {
|
|
19
|
-
const result = await readSession(workDir);
|
|
20
|
-
expect(result).toBeNull();
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it("returns session id after write", async () => {
|
|
24
|
-
await writeSession(workDir, "sess_abc123");
|
|
25
|
-
const result = await readSession(workDir);
|
|
26
|
-
expect(result).toBe("sess_abc123");
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
describe("writeSession", () => {
|
|
31
|
-
it("creates directory and writes file", async () => {
|
|
32
|
-
await writeSession(workDir, "sess_abc123");
|
|
33
|
-
const result = await readSession(workDir);
|
|
34
|
-
expect(result).toBe("sess_abc123");
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it("overwrites existing session", async () => {
|
|
38
|
-
await writeSession(workDir, "sess_old");
|
|
39
|
-
await writeSession(workDir, "sess_new");
|
|
40
|
-
const result = await readSession(workDir);
|
|
41
|
-
expect(result).toBe("sess_new");
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it("handles concurrent writes without corruption", async () => {
|
|
45
|
-
const writes = Array.from({ length: 20 }, (_, i) =>
|
|
46
|
-
writeSession(workDir, `sess_${i}`),
|
|
47
|
-
);
|
|
48
|
-
await Promise.all(writes);
|
|
49
|
-
const result = await readSession(workDir);
|
|
50
|
-
expect(result).not.toBeNull();
|
|
51
|
-
expect(result!.startsWith("sess_")).toBe(true);
|
|
52
|
-
});
|
|
53
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["ES2022"],
|
|
5
|
-
"module": "ES2022",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
|
|
8
|
-
"strict": true,
|
|
9
|
-
"noImplicitAny": true,
|
|
10
|
-
"strictNullChecks": true,
|
|
11
|
-
"strictFunctionTypes": true,
|
|
12
|
-
"strictBindCallApply": true,
|
|
13
|
-
"strictPropertyInitialization": true,
|
|
14
|
-
"noImplicitThis": true,
|
|
15
|
-
"alwaysStrict": true,
|
|
16
|
-
|
|
17
|
-
"noUnusedLocals": false,
|
|
18
|
-
"noUnusedParameters": false,
|
|
19
|
-
"noImplicitReturns": true,
|
|
20
|
-
"noFallthroughCasesInSwitch": true,
|
|
21
|
-
"noUncheckedIndexedAccess": true,
|
|
22
|
-
"noImplicitOverride": true,
|
|
23
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
24
|
-
|
|
25
|
-
"esModuleInterop": true,
|
|
26
|
-
"allowSyntheticDefaultImports": true,
|
|
27
|
-
"resolveJsonModule": true,
|
|
28
|
-
"isolatedModules": true,
|
|
29
|
-
|
|
30
|
-
"declaration": false,
|
|
31
|
-
"sourceMap": true,
|
|
32
|
-
"outDir": "./dist",
|
|
33
|
-
"removeComments": false,
|
|
34
|
-
"noEmit": true,
|
|
35
|
-
|
|
36
|
-
"forceConsistentCasingInFileNames": true,
|
|
37
|
-
"skipLibCheck": true
|
|
38
|
-
},
|
|
39
|
-
"include": [
|
|
40
|
-
"*.ts",
|
|
41
|
-
"src/**/*.ts",
|
|
42
|
-
"tests/**/*.ts"
|
|
43
|
-
],
|
|
44
|
-
"exclude": [
|
|
45
|
-
"node_modules",
|
|
46
|
-
"dist",
|
|
47
|
-
"coverage"
|
|
48
|
-
]
|
|
49
|
-
}
|
package/vitest.config.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
globals: true,
|
|
6
|
-
environment: 'node',
|
|
7
|
-
coverage: {
|
|
8
|
-
provider: 'v8',
|
|
9
|
-
reporter: ['text', 'json', 'html'],
|
|
10
|
-
exclude: [
|
|
11
|
-
'node_modules/',
|
|
12
|
-
'tests/',
|
|
13
|
-
'*.config.ts',
|
|
14
|
-
'dist/',
|
|
15
|
-
],
|
|
16
|
-
thresholds: {
|
|
17
|
-
lines: 80,
|
|
18
|
-
functions: 85,
|
|
19
|
-
branches: 75,
|
|
20
|
-
statements: 80,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
include: ['tests/**/*.test.ts'],
|
|
24
|
-
exclude: ['node_modules/', 'dist/'],
|
|
25
|
-
},
|
|
26
|
-
});
|