@ibgib/web-gib 0.0.21 → 0.0.23
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 +32 -1
- package/package.json +1 -1
- package/tools/init-agents.js +8 -6
package/README.md
CHANGED
|
@@ -27,12 +27,43 @@ In lieu of a heavy framework CLI, the `@ibgib/web-gib` package comes bundled wit
|
|
|
27
27
|
|
|
28
28
|
Because AI coding assistants typically do not read files inside `node_modules`, you must initialize these skills by copying them directly into your project's root folder. You can do this manually, or we have provided a simple script to do the copying for you.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
**Option 1 (For standard projects)**
|
|
31
|
+
If `@ibgib/web-gib` is installed at your project root, you can run the executable directly via `npx`:
|
|
31
32
|
|
|
32
33
|
```bash
|
|
33
34
|
npx web-gib-init-agents
|
|
34
35
|
```
|
|
35
36
|
|
|
37
|
+
**Option 2 (For Monorepos & Workspaces)**
|
|
38
|
+
If `@ibgib/web-gib` is a dependency on a sub-app (e.g. `apps/my-app`) instead of the workspace root, package manager "hoisting" rules may prevent the executable from appearing at your root level.
|
|
39
|
+
|
|
40
|
+
To properly initialize the `.agents` folder at your monorepo's root, pull from one of the following commands:
|
|
41
|
+
|
|
42
|
+
*Choice A (Execute via npx):* Let `npx` automatically resolve and execute the binary hook from the package registry:
|
|
43
|
+
```bash
|
|
44
|
+
npx -p @ibgib/web-gib web-gib-init-agents
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
*Choice B (Execute script directly):* Bypass the broken `.bin` symlink entirely and execute the raw script locally from within the nested workspace dependency:
|
|
48
|
+
```bash
|
|
49
|
+
node ./apps/my-app/node_modules/@ibgib/web-gib/tools/init-agents.js
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Recommendation for Monorepos:**
|
|
53
|
+
To streamline future updates, it is highly recommended to map whichever execution method you prefer directly into your root `package.json` scripts:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
"scripts": {
|
|
57
|
+
"init-agents": "npx -p @ibgib/web-gib web-gib-init-agents"
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
Or for the direct script approach:
|
|
61
|
+
```json
|
|
62
|
+
"scripts": {
|
|
63
|
+
"init-agents": "node ./apps/my-app/node_modules/@ibgib/web-gib/tools/init-agents.js"
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
36
67
|
## UI Architecture: Custom @ibgib component framework
|
|
37
68
|
|
|
38
69
|
**tl;dr**: _Web Component-based components react to ibgib's unique Merkle DAG DLT time-centric data model._
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibgib/web-gib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "Framework for creating agentic ibGib web apps. Contains plumbing for ibgib components, agentic framework (currently only Gemini implemented), web-based IndexedDB storage substrate, and more.",
|
|
5
5
|
"funding": {
|
|
6
6
|
"type": "individual",
|
package/tools/init-agents.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
// ESM doesn't natively have __dirname, so we reconstruct it.
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
4
9
|
|
|
5
10
|
const logPref = '[web-gib init-agents]';
|
|
6
11
|
|
|
7
|
-
//
|
|
8
|
-
// so the package root is exactly one directory up.
|
|
12
|
+
// Target the .agents folder at the package root
|
|
9
13
|
const packageRoot = path.resolve(__dirname, '..');
|
|
10
14
|
const sourceAgentsDir = path.join(packageRoot, '.agents');
|
|
11
15
|
|
|
@@ -22,11 +26,9 @@ console.log(`${logPref} From: ${sourceAgentsDir}`);
|
|
|
22
26
|
console.log(`${logPref} To: ${targetAgentsDir}`);
|
|
23
27
|
|
|
24
28
|
try {
|
|
25
|
-
// cpSync is available in Node 16.7+
|
|
26
29
|
fs.cpSync(sourceAgentsDir, targetAgentsDir, {
|
|
27
30
|
recursive: true,
|
|
28
31
|
// Setting force to false ensures we DO NOT overwrite existing templates
|
|
29
|
-
// if the consumer has customized them for their own project!
|
|
30
32
|
force: false,
|
|
31
33
|
errorOnExist: false
|
|
32
34
|
});
|