@insta-dev01/insta-plugin-openclaw 1.0.0 → 1.0.1

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.
Files changed (127) hide show
  1. package/dist/index.d.ts +9 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +171 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/src/channel/config.d.ts +9 -0
  6. package/dist/src/channel/config.d.ts.map +1 -0
  7. package/dist/src/channel/config.js +10 -0
  8. package/dist/src/channel/config.js.map +1 -0
  9. package/dist/src/channel/connection.d.ts +34 -0
  10. package/dist/src/channel/connection.d.ts.map +1 -0
  11. package/dist/src/channel/connection.js +281 -0
  12. package/dist/src/channel/connection.js.map +1 -0
  13. package/dist/src/channel/dispatcher.d.ts +43 -0
  14. package/dist/src/channel/dispatcher.d.ts.map +1 -0
  15. package/dist/src/channel/dispatcher.js +324 -0
  16. package/dist/src/channel/dispatcher.js.map +1 -0
  17. package/dist/src/channel/index.d.ts +5 -0
  18. package/dist/src/channel/index.d.ts.map +1 -0
  19. package/dist/src/channel/index.js +135 -0
  20. package/dist/src/channel/index.js.map +1 -0
  21. package/dist/src/channel/logger.d.ts +10 -0
  22. package/dist/src/channel/logger.d.ts.map +1 -0
  23. package/dist/src/channel/logger.js +30 -0
  24. package/dist/src/channel/logger.js.map +1 -0
  25. package/dist/src/channel/protocol.d.ts +15 -0
  26. package/dist/src/channel/protocol.d.ts.map +1 -0
  27. package/dist/src/channel/protocol.js +204 -0
  28. package/dist/src/channel/protocol.js.map +1 -0
  29. package/dist/src/channel/registrar.d.ts +21 -0
  30. package/dist/src/channel/registrar.d.ts.map +1 -0
  31. package/dist/src/channel/registrar.js +115 -0
  32. package/dist/src/channel/registrar.js.map +1 -0
  33. package/dist/src/channel/registration-store.d.ts +21 -0
  34. package/dist/src/channel/registration-store.d.ts.map +1 -0
  35. package/{src/channel/registration-store.ts → dist/src/channel/registration-store.js} +21 -46
  36. package/dist/src/channel/registration-store.js.map +1 -0
  37. package/dist/src/channel/types.d.ts +80 -0
  38. package/dist/src/channel/types.d.ts.map +1 -0
  39. package/dist/src/channel/types.js +3 -0
  40. package/dist/src/channel/types.js.map +1 -0
  41. package/dist/src/core/index.d.ts +5 -0
  42. package/dist/src/core/index.d.ts.map +1 -0
  43. package/dist/src/core/index.js +3 -0
  44. package/dist/src/core/index.js.map +1 -0
  45. package/dist/src/core/register-identity.d.ts +58 -0
  46. package/dist/src/core/register-identity.d.ts.map +1 -0
  47. package/dist/src/core/register-identity.js +251 -0
  48. package/dist/src/core/register-identity.js.map +1 -0
  49. package/dist/src/core/task-api.d.ts +31 -0
  50. package/dist/src/core/task-api.d.ts.map +1 -0
  51. package/dist/src/core/task-api.js +116 -0
  52. package/dist/src/core/task-api.js.map +1 -0
  53. package/dist/src/core/urls.d.ts +33 -0
  54. package/dist/src/core/urls.d.ts.map +1 -0
  55. package/dist/src/core/urls.js +40 -0
  56. package/dist/src/core/urls.js.map +1 -0
  57. package/dist/src/tools/get-plugin-profile.d.ts +7 -0
  58. package/dist/src/tools/get-plugin-profile.d.ts.map +1 -0
  59. package/dist/src/tools/get-plugin-profile.js +132 -0
  60. package/dist/src/tools/get-plugin-profile.js.map +1 -0
  61. package/dist/src/tools/grab-task.d.ts +7 -0
  62. package/dist/src/tools/grab-task.d.ts.map +1 -0
  63. package/dist/src/tools/grab-task.js +100 -0
  64. package/dist/src/tools/grab-task.js.map +1 -0
  65. package/dist/src/tools/list-tasks.d.ts +7 -0
  66. package/dist/src/tools/list-tasks.d.ts.map +1 -0
  67. package/dist/src/tools/list-tasks.js +92 -0
  68. package/dist/src/tools/list-tasks.js.map +1 -0
  69. package/dist/src/tools/propose-registration.d.ts +14 -0
  70. package/dist/src/tools/propose-registration.d.ts.map +1 -0
  71. package/dist/src/tools/propose-registration.js +103 -0
  72. package/dist/src/tools/propose-registration.js.map +1 -0
  73. package/dist/src/tools/register-identity.d.ts +11 -0
  74. package/dist/src/tools/register-identity.d.ts.map +1 -0
  75. package/dist/src/tools/register-identity.js +101 -0
  76. package/dist/src/tools/register-identity.js.map +1 -0
  77. package/dist/src/tools/submit-deliverable.d.ts +17 -0
  78. package/dist/src/tools/submit-deliverable.d.ts.map +1 -0
  79. package/dist/src/tools/submit-deliverable.js +215 -0
  80. package/dist/src/tools/submit-deliverable.js.map +1 -0
  81. package/dist/src/tools/upload-artifact.d.ts +14 -0
  82. package/dist/src/tools/upload-artifact.d.ts.map +1 -0
  83. package/dist/src/tools/upload-artifact.js +166 -0
  84. package/dist/src/tools/upload-artifact.js.map +1 -0
  85. package/dist/src/utils/file-lock.d.ts +4 -0
  86. package/dist/src/utils/file-lock.d.ts.map +1 -0
  87. package/dist/src/utils/file-lock.js +43 -0
  88. package/dist/src/utils/file-lock.js.map +1 -0
  89. package/dist/src/utils/profile.d.ts +17 -0
  90. package/dist/src/utils/profile.d.ts.map +1 -0
  91. package/dist/src/utils/profile.js +26 -0
  92. package/dist/src/utils/profile.js.map +1 -0
  93. package/dist/src/utils/session.d.ts +3 -0
  94. package/dist/src/utils/session.d.ts.map +1 -0
  95. package/dist/src/utils/session.js +26 -0
  96. package/dist/src/utils/session.js.map +1 -0
  97. package/package.json +17 -5
  98. package/.env.example +0 -23
  99. package/channel/346/265/201/347/250/213/345/233/276.md +0 -477
  100. package/index.ts +0 -198
  101. package/src/channel/config.ts +0 -27
  102. package/src/channel/connection.ts +0 -341
  103. package/src/channel/dispatcher.ts +0 -374
  104. package/src/channel/index.ts +0 -173
  105. package/src/channel/logger.ts +0 -36
  106. package/src/channel/protocol.ts +0 -265
  107. package/src/channel/registrar.ts +0 -172
  108. package/src/channel/types.ts +0 -102
  109. package/src/core/index.ts +0 -13
  110. package/src/core/register-identity.ts +0 -326
  111. package/src/core/task-api.ts +0 -168
  112. package/src/core/urls.ts +0 -52
  113. package/src/prompt/job.md +0 -21
  114. package/src/tools/get-plugin-profile.ts +0 -152
  115. package/src/tools/grab-task.ts +0 -133
  116. package/src/tools/list-tasks.ts +0 -135
  117. package/src/tools/propose-registration.ts +0 -116
  118. package/src/tools/register-identity.ts +0 -121
  119. package/src/tools/submit-deliverable.ts +0 -268
  120. package/src/tools/upload-artifact.ts +0 -222
  121. package/src/utils/file-lock.ts +0 -43
  122. package/src/utils/profile.ts +0 -45
  123. package/src/utils/session.ts +0 -30
  124. package/tests/profile.test.ts +0 -70
  125. package/tests/session.test.ts +0 -53
  126. package/tsconfig.json +0 -49
  127. package/vitest.config.ts +0 -26
@@ -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
- });