stringray-ai 1.0.24 → 1.0.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stringray-ai",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "⚡ StringRay ⚡: Bulletproof AI orchestration with systematic error prevention. Zero dead ends. Ship clean, tested, optimized code — every time.",
5
5
  "type": "module",
6
6
  "main": "./dist/plugin/index.js",
@@ -1,60 +1,89 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // Check if we're in the right directory
3
+ // Validate codex integration in both development and deployed environments
4
4
  import fs from "fs";
5
5
  import path from "path";
6
6
 
7
- if (!fs.existsSync("src/codex-injector.ts")) {
8
- process.exit(1);
7
+ // Check if we're in development or deployed environment
8
+ const isDevelopment = fs.existsSync("src/codex-injector.ts");
9
+ const isDeployed = fs.existsSync("node_modules/stringray-ai");
10
+
11
+ if (!isDevelopment && !isDeployed) {
12
+ process.exit(1); // Not in a valid environment
9
13
  }
10
14
 
11
- // Check if codex files exist
12
- const codexFiles = [
13
- "docs/framework/agents_template.md",
14
- ".strray/agents_template.md",
15
- ];
15
+ // In deployed environment, check if the plugin was installed correctly
16
+ if (isDeployed) {
17
+ // Check if .mcp.json exists (created by postinstall)
18
+ if (!fs.existsSync(".mcp.json")) {
19
+ process.exit(1);
20
+ }
16
21
 
17
- let codexFound = false;
18
- for (const file of codexFiles) {
19
- if (fs.existsSync(file)) {
20
- codexFound = true;
22
+ // Check if package.json exists
23
+ if (!fs.existsSync("package.json")) {
24
+ process.exit(1);
25
+ }
21
26
 
22
- // Basic validation of codex content
23
- try {
24
- const content = fs.readFileSync(file, "utf-8");
25
- const versionMatch = content.match(/\*\*Version\*\*:\s*(\d+\.\d+\.\d+)/);
26
- if (versionMatch) {
27
- }
28
-
29
- const termMatches = content.match(/####\s*\d+\.\s/g);
30
- if (termMatches) {
31
- }
32
- } catch (error) {}
27
+ // Check if the plugin files exist
28
+ if (!fs.existsSync("node_modules/stringray-ai/dist/plugin/plugins/stringray-codex-injection.js")) {
29
+ process.exit(1);
33
30
  }
34
- }
35
31
 
36
- if (!codexFound) {
37
- process.exit(1);
32
+ process.exit(0); // All checks passed for deployed environment
38
33
  }
39
34
 
40
- // Check if built files exist
41
- if (fs.existsSync("dist")) {
42
- } else {
43
- }
35
+ // Development environment checks
36
+ if (isDevelopment) {
37
+ // Check if codex files exist
38
+ const codexFiles = [
39
+ "docs/framework/agents_template.md",
40
+ ".strray/agents_template.md",
41
+ ];
44
42
 
45
- // Check package.json
46
- if (fs.existsSync("package.json")) {
47
- try {
48
- const pkg = JSON.parse(fs.readFileSync("package.json", "utf-8"));
49
- } catch (error) {}
50
- } else {
51
- process.exit(1);
52
- }
43
+ let codexFound = false;
44
+ for (const file of codexFiles) {
45
+ if (fs.existsSync(file)) {
46
+ codexFound = true;
47
+
48
+ // Basic validation of codex content
49
+ try {
50
+ const content = fs.readFileSync(file, "utf-8");
51
+ const versionMatch = content.match(/\*\*Version\*\*:\s*(\d+\.\d+\.\d+)/);
52
+ if (versionMatch) {
53
+ }
54
+
55
+ const termMatches = content.match(/####\s*\d+\.\s/g);
56
+ if (termMatches) {
57
+ }
58
+ } catch (error) {}
59
+ }
60
+ }
53
61
 
54
- // Check .strray directory
55
- if (fs.existsSync(".strray")) {
56
- if (fs.existsSync(".strray/codex.json")) {
62
+ if (!codexFound) {
63
+ process.exit(1);
64
+ }
65
+
66
+ // Check if built files exist
67
+ if (fs.existsSync("dist")) {
68
+ } else {
69
+ }
70
+
71
+ // Check package.json
72
+ if (fs.existsSync("package.json")) {
73
+ try {
74
+ const pkg = JSON.parse(fs.readFileSync("package.json", "utf-8"));
75
+ } catch (error) {}
76
+ } else {
77
+ process.exit(1);
78
+ }
79
+
80
+ // Check .strray directory
81
+ if (fs.existsSync(".strray")) {
82
+ if (fs.existsSync(".strray/codex.json")) {
83
+ } else {
84
+ }
57
85
  } else {
58
86
  }
59
- } else {
60
87
  }
88
+
89
+ process.exit(0); // All checks passed