@miranda0808/maya-claude 0.1.0 → 0.1.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.
- package/README.md +39 -30
- package/package.json +1 -1
- package/payload/.env.example +9 -0
- package/payload/tools/meta/README.md +58 -55
- package/payload/tools/meta/meta-fetch.ps1 +404 -323
- package/payload/tools/meta/meta-fetch.test.ps1 +94 -38
- package/vendor/shared-installer/manifests/common-files.json +14 -13
- package/vendor/shared-installer/src/fs.js +136 -105
- package/vendor/shared-installer/src/install.js +168 -157
package/README.md
CHANGED
|
@@ -1,30 +1,39 @@
|
|
|
1
|
-
# @miranda0808/maya-claude
|
|
2
|
-
|
|
3
|
-
Install a full repo-local Maya runtime into the current project or a target directory.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npx @miranda0808/maya-claude init
|
|
9
|
-
npx @miranda0808/maya-claude init --dry-run
|
|
10
|
-
npx @miranda0808/maya-claude init --force
|
|
11
|
-
npx @miranda0808/maya-claude init --target ../some-project
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## What It Installs
|
|
15
|
-
|
|
16
|
-
- portable `CLAUDE.md`
|
|
17
|
-
- `
|
|
18
|
-
- `.
|
|
19
|
-
- `
|
|
20
|
-
-
|
|
21
|
-
- `
|
|
22
|
-
- `
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
# @miranda0808/maya-claude
|
|
2
|
+
|
|
3
|
+
Install a full repo-local Maya runtime into the current project or a target directory.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @miranda0808/maya-claude init
|
|
9
|
+
npx @miranda0808/maya-claude init --dry-run
|
|
10
|
+
npx @miranda0808/maya-claude init --force
|
|
11
|
+
npx @miranda0808/maya-claude init --target ../some-project
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## What It Installs
|
|
15
|
+
|
|
16
|
+
- portable `CLAUDE.md`
|
|
17
|
+
- `.env.example`
|
|
18
|
+
- `.gitignore` entries for `.env` and `.env.local`
|
|
19
|
+
- `commands/`
|
|
20
|
+
- `.maya/`
|
|
21
|
+
- `templates/`
|
|
22
|
+
- `campaigns/README.md`
|
|
23
|
+
- `research/README.md`
|
|
24
|
+
- `tools/`
|
|
25
|
+
- `.claude/skills/`
|
|
26
|
+
|
|
27
|
+
## Secrets
|
|
28
|
+
|
|
29
|
+
After install, copy `.env.example` to `.env` or `.env.local` in the target repo.
|
|
30
|
+
|
|
31
|
+
- `.env.local` overrides `.env` when both exist.
|
|
32
|
+
- Maya keeps `.env` and `.env.local` out of git by adding them to `.gitignore`.
|
|
33
|
+
- The Meta boundary auto-loads `META_ACCESS_TOKEN` and `META_AD_ACCOUNT_ID` from those files for each invocation.
|
|
34
|
+
|
|
35
|
+
## Options
|
|
36
|
+
|
|
37
|
+
- `--dry-run` prints the planned writes without modifying the target project.
|
|
38
|
+
- `--force` overwrites files Maya previously installed.
|
|
39
|
+
- `--target <path>` installs into a different existing directory.
|
package/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copy this file to `.env` or `.env.local` in the Maya workspace.
|
|
2
|
+
# `.env.local` overrides `.env` when both exist.
|
|
3
|
+
# Local environment only. Do not commit real secrets.
|
|
4
|
+
META_ACCESS_TOKEN=
|
|
5
|
+
META_AD_ACCOUNT_ID=
|
|
6
|
+
|
|
7
|
+
# Add other imported tool credentials only when you start using them.
|
|
8
|
+
# RESEND_API_KEY=
|
|
9
|
+
# GA4_ACCESS_TOKEN=
|
|
@@ -1,55 +1,58 @@
|
|
|
1
|
-
# Meta Tool Maintenance
|
|
2
|
-
|
|
3
|
-
## Source
|
|
4
|
-
|
|
5
|
-
- Vendored from the upstream `marketingskills` repository: [coreyhaines31/marketingskills](https://github.com/coreyhaines31/marketingskills)
|
|
6
|
-
- Local CLI file: `tools/clis/meta-ads.js`
|
|
7
|
-
- Approved Maya boundary: `tools/meta/meta-fetch.ps1`
|
|
8
|
-
- Current local API base in the vendored file: `https://graph.facebook.com/v18.0`
|
|
9
|
-
|
|
10
|
-
## Usage Boundary
|
|
11
|
-
|
|
12
|
-
- Agents should prefer `tools/meta/meta-fetch.ps1` for Meta reads.
|
|
13
|
-
- `meta-fetch.ps1` is the Maya-owned boundary for validation, read-only allowlisting, output sanitization, and cache writes.
|
|
14
|
-
- Keep secrets in environment variables
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
powershell -ExecutionPolicy Bypass -File 'tools/meta/meta-fetch.ps1'
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
1
|
+
# Meta Tool Maintenance
|
|
2
|
+
|
|
3
|
+
## Source
|
|
4
|
+
|
|
5
|
+
- Vendored from the upstream `marketingskills` repository: [coreyhaines31/marketingskills](https://github.com/coreyhaines31/marketingskills)
|
|
6
|
+
- Local CLI file: `tools/clis/meta-ads.js`
|
|
7
|
+
- Approved Maya boundary: `tools/meta/meta-fetch.ps1`
|
|
8
|
+
- Current local API base in the vendored file: `https://graph.facebook.com/v18.0`
|
|
9
|
+
|
|
10
|
+
## Usage Boundary
|
|
11
|
+
|
|
12
|
+
- Agents should prefer `tools/meta/meta-fetch.ps1` for Meta reads.
|
|
13
|
+
- `meta-fetch.ps1` is the Maya-owned boundary for validation, read-only allowlisting, output sanitization, env-file resolution, and cache writes.
|
|
14
|
+
- Keep real secrets in repo-local `.env` or `.env.local`, or in already-loaded environment variables.
|
|
15
|
+
- `meta-fetch.ps1` resolves `.env` first, then `.env.local`, while preserving explicitly set process env values.
|
|
16
|
+
- Do not place raw tokens, headers, or unsafe debug output in prompts, logs, state files, or cache files.
|
|
17
|
+
|
|
18
|
+
## Maintenance Policy
|
|
19
|
+
|
|
20
|
+
- Treat `tools/clis/meta-ads.js` as vendored upstream code.
|
|
21
|
+
- Do not hand-maintain feature changes in the vendored file unless there is an urgent local fix.
|
|
22
|
+
- When the tool stops working, Meta deprecates an API version, or we need a newer endpoint or field, check the exact upstream tool first.
|
|
23
|
+
- Prefer replacing the local vendored file from upstream over accumulating local drift.
|
|
24
|
+
|
|
25
|
+
## Update Triggers
|
|
26
|
+
|
|
27
|
+
Review the upstream `meta-ads.js` when any of the following happens:
|
|
28
|
+
|
|
29
|
+
- Meta returns version deprecation or unsupported endpoint errors.
|
|
30
|
+
- Expected fields disappear or response shapes change.
|
|
31
|
+
- We need a newer Graph API version than the one pinned in the vendored file.
|
|
32
|
+
- The upstream `marketingskills` repo updates the same tool.
|
|
33
|
+
|
|
34
|
+
## Safe Update Workflow
|
|
35
|
+
|
|
36
|
+
1. Compare the local `tools/clis/meta-ads.js` with the upstream `meta-ads.js` in `coreyhaines31/marketingskills`.
|
|
37
|
+
2. Prefer a clean vendor refresh instead of manually mixing old and new logic.
|
|
38
|
+
3. Re-run dry-run and read-only verification commands after updating.
|
|
39
|
+
4. Keep any future Maya-specific safety behavior in wrappers under `tools/meta/`, not inside the vendored CLI unless strictly necessary.
|
|
40
|
+
|
|
41
|
+
## Verification After A Bump
|
|
42
|
+
|
|
43
|
+
Run at minimum:
|
|
44
|
+
|
|
45
|
+
```powershell
|
|
46
|
+
node --check 'tools/clis/meta-ads.js'
|
|
47
|
+
powershell -ExecutionPolicy Bypass -File 'tools/meta/meta-fetch.test.ps1'
|
|
48
|
+
powershell -ExecutionPolicy Bypass -File 'tools/meta/meta-fetch.ps1' -Resource campaigns -Action list -DryRun
|
|
49
|
+
powershell -ExecutionPolicy Bypass -File 'tools/meta/meta-fetch.ps1' -Resource campaigns -Action insights -Id 123 -DatePreset last_30d -DryRun
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Confirm:
|
|
53
|
+
|
|
54
|
+
- syntax still passes
|
|
55
|
+
- dry-run masks authorization data
|
|
56
|
+
- `.env` and `.env.local` resolution works without leaking tokens
|
|
57
|
+
- command structure still matches expected usage
|
|
58
|
+
- no local secrets are written to files, prompts, logs, or outputs
|