@aimlsuperagent/agent 0.1.0 → 0.1.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/DEPLOYMENT_LOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Deployment Log
2
2
 
3
- This repository is currently a private release candidate and has not been publicly deployed as a package.
3
+ This repository is public. The npm package is published publicly at `@aimlsuperagent/agent`.
4
4
 
5
5
  ## 2026-05-31 - Private Repository Buildout
6
6
 
@@ -27,7 +27,7 @@ Commit or build: pending
27
27
  Change: Added MIT License and updated package metadata.
28
28
  Verification: `node bin/aiml-superagent.js check . --release --strict`
29
29
  Rollback: change `LICENSE` and `package.json` before public release if a different license is selected.
30
- Risks: repository remains private; MIT terms matter when shared or made public.
30
+ Risks: MIT terms apply to public reuse.
31
31
 
32
32
  ## 2026-05-31 - Private npm Package Preparation
33
33
 
@@ -36,4 +36,40 @@ Commit or build: pending
36
36
  Change: Prepared package metadata for `@aimlsuperagent/agent` with restricted publish config, file allowlist, dry-run script, and private publishing documentation.
37
37
  Verification: `npm run check:release`; `npm run pack:dry-run`.
38
38
  Rollback: revert package metadata to local-only package before publishing.
39
- Risks: publishing remains intentionally blocked by `private:true` until npm scope ownership and private package support are confirmed.
39
+ Risks: publishing remains blocked until npm scope ownership and private package support are confirmed.
40
+
41
+ ## 2026-06-01 - Marvin Freedman Repo Connection
42
+
43
+ Platform: GitHub and npm package metadata
44
+ Commit or build: pending
45
+ Change: Cloned `github.com/marvinbfreedman/aimlsuperagent`, updated npm package metadata for `@aimlsuperagent/agent` to point repository and issue links at `marvinbfreedman/aimlsuperagent`, and kept restricted npm publishing config.
46
+ Verification: `npm run check:release`; `npm run pack:dry-run`; `npm publish --dry-run --access restricted --cache ./.npm-cache`.
47
+ Rollback: restore `package.json` repository and bug links to the previous repository URL and publish a new patch version if npm metadata needs to move back.
48
+ Risks: npm package metadata changes only become visible on npm after publishing a new version.
49
+
50
+ ## 2026-06-01 - Trusted Publishing Workflow
51
+
52
+ Platform: GitHub Actions and npm
53
+ Commit or build: `64dc17b`; GitHub Actions run `26748684943`
54
+ Change: Added `.github/workflows/npm-publish.yml` for npm Trusted Publishing with GitHub OIDC, `id-token: write`, Node 24, release readiness checks, and restricted npm publish.
55
+ Verification: trusted publisher created for `marvinbfreedman/aimlsuperagent` and `npm-publish.yml`; workflow completed successfully; `npm view @aimlsuperagent/agent version repository.url bugs.url --json` reports version `0.1.1` with the Marvin Freedman repository URLs.
56
+ Rollback: remove the workflow file and publish manually with npm OTP or an npm token that npm accepts for package PUT writes.
57
+ Risks: public package installs no longer require npm organization authorization.
58
+
59
+ ## 2026-06-01 - Restricted npm Publish
60
+
61
+ Platform: npm
62
+ Commit or build: package version `0.1.1`
63
+ Change: Published `@aimlsuperagent/agent@0.1.1` from `marvinbfreedman/aimlsuperagent` through npm Trusted Publishing.
64
+ Verification: GitHub Actions run `26748684943` completed with `success`; npm metadata now shows repository `git+https://github.com/marvinbfreedman/aimlsuperagent.git` and bugs URL `https://github.com/marvinbfreedman/aimlsuperagent/issues`.
65
+ Rollback: publish a new patch version with corrected metadata or access policy; do not unpublish unless there is a security issue.
66
+ Risks: package remains private/restricted, so unauthorized users see npm `404`/access errors by design.
67
+
68
+ ## 2026-06-01 - Public npm Access
69
+
70
+ Platform: npm and GitHub
71
+ Commit or build: pending
72
+ Change: Changed `@aimlsuperagent/agent` access from private/restricted to public. Confirmed `github.com/marvinbfreedman/aimlsuperagent` is public.
73
+ Verification: `npm access set status=public @aimlsuperagent/agent` returned `@aimlsuperagent/agent: public`; repository API reported `visibility: public`.
74
+ Rollback: npm public access can be changed back only deliberately with `npm access set status=private`; do not do that unless distribution should become private again.
75
+ Risks: package and repository are now available to the public, so all future docs and examples must stay secret-safe.
package/README.md CHANGED
@@ -82,6 +82,7 @@ aiml-superagent/
82
82
  10-adoption-playbook.md
83
83
  11-anti-patterns.md
84
84
  12-context-budget.md
85
+ 13-package-analytics.md
85
86
  comparison-claude-md.md
86
87
  release-checklist.md
87
88
  schemas/
@@ -105,44 +106,73 @@ aiml-superagent/
105
106
 
106
107
  ## Quick Start
107
108
 
108
- From this repository:
109
+ Install the package in your project. This is the recommended setup for teams and CI because the CLI version is pinned in `package.json`:
109
110
 
110
111
  ```bash
111
- npm run check
112
+ npm i -D @aimlsuperagent/agent
112
113
  ```
113
114
 
114
115
  Copy the templates into a project:
115
116
 
116
117
  ```bash
117
- node bin/aiml-superagent.js init ../your-project
118
+ npx @aimlsuperagent/agent init .
118
119
  ```
119
120
 
120
121
  Check a project for SuperAgent readiness:
121
122
 
122
123
  ```bash
123
- node bin/aiml-superagent.js check ../your-project
124
+ npx @aimlsuperagent/agent check .
125
+ ```
126
+
127
+ For personal machine-wide use, install the CLI globally:
128
+
129
+ ```bash
130
+ npm i -g @aimlsuperagent/agent
131
+ aiml-superagent check .
124
132
  ```
125
133
 
126
134
  Freshly initialized projects are expected to show `needs-review` until template placeholders for project name, dates, and proof commands are replaced.
127
135
 
128
- Private npm package preparation:
136
+ From this repository, maintainers can run:
129
137
 
130
138
  ```bash
139
+ npm run check
131
140
  npm run pack:dry-run
132
141
  ```
133
142
 
134
143
  Before making a repo public:
135
144
 
136
145
  ```bash
137
- node bin/aiml-superagent.js check . --release
146
+ npx @aimlsuperagent/agent check . --release
138
147
  ```
139
148
 
140
149
  For CI where medium-risk findings should fail the build:
141
150
 
142
151
  ```bash
143
- node bin/aiml-superagent.js check . --strict
152
+ npx @aimlsuperagent/agent check . --strict
153
+ ```
154
+
155
+ ## Package Analytics
156
+
157
+ CLI analytics is disabled by default.
158
+
159
+ Enable it only when you want package usage events sent to the AiML SuperAgent tracking endpoint:
160
+
161
+ ```bash
162
+ AIML_SUPERAGENT_ANALYTICS=1 aiml-superagent check .
144
163
  ```
145
164
 
165
+ You can also enable or disable it per command:
166
+
167
+ ```bash
168
+ aiml-superagent check . --analytics
169
+ aiml-superagent check . --no-analytics
170
+ ```
171
+
172
+ The package sends only privacy-safe operational metadata: command name, package version, Node major version, platform, architecture, CI flag, duration, exit code, readiness label, and finding counts. It does not send file contents, absolute paths, repo names, project names, environment variable values, credentials, or note contents. Like any HTTP request, the receiving endpoint may also receive normal request metadata such as IP address and user-agent.
173
+
174
+ Use `AIML_SUPERAGENT_ANALYTICS_ENDPOINT` to point the package at a different compatible endpoint.
175
+
146
176
  ## The Operating Loop
147
177
 
148
178
  Every task follows the same loop:
@@ -215,7 +245,7 @@ The model can change. The operating discipline should remain stable.
215
245
  2. Fill in production owners, deployment surfaces, package manager, test commands, and secret names.
216
246
  3. Add `DEPLOYMENT_LOG.md` after the next live deploy.
217
247
  4. Add incident reports only for issues that change future behavior.
218
- 5. Run `node bin/aiml-superagent.js check`.
248
+ 5. Run `npx @aimlsuperagent/agent check`.
219
249
  6. Iterate until the checker reports no high-risk gaps.
220
250
 
221
251
  ## Design Principles
@@ -242,11 +272,11 @@ See [docs/comparison-claude-md.md](docs/comparison-claude-md.md).
242
272
 
243
273
  ## Status
244
274
 
245
- Private release candidate. The repository can remain private while using the MIT License; the license defines reuse terms if and when the project is shared publicly.
275
+ Public release candidate. The repository and npm package are public under the MIT License.
246
276
 
247
- Prepared package name: `@aimlsuperagent/agent`.
277
+ Package name: `@aimlsuperagent/agent`.
248
278
 
249
- Publishing is intentionally blocked by `"private": true` until npm scope ownership and private package access are confirmed. See [docs/npm-private-publishing.md](docs/npm-private-publishing.md).
279
+ Install globally with `npm i -g @aimlsuperagent/agent`, or run directly with `npx @aimlsuperagent/agent`. See [docs/npm-publishing.md](docs/npm-publishing.md).
250
280
 
251
281
  ## License
252
282
 
@@ -3,7 +3,7 @@
3
3
  "project": {
4
4
  "name": "AiML SuperAgent",
5
5
  "purpose": "A token-efficient operating framework for AI coding assistants.",
6
- "status": "private-release-candidate",
6
+ "status": "public-release-candidate",
7
7
  "primaryAudience": [
8
8
  "software teams using AI coding assistants",
9
9
  "solo builders managing long-running projects",
@@ -16,7 +16,7 @@
16
16
  "templates": "templates/",
17
17
  "docs": "docs/",
18
18
  "examples": "examples/",
19
- "privateNpmPublishing": "docs/npm-private-publishing.md"
19
+ "npmPublishing": "docs/npm-publishing.md"
20
20
  },
21
21
  "contextMinimizer": {
22
22
  "readFirst": [
@@ -57,7 +57,7 @@
57
57
  "all templates are copy-safe",
58
58
  "checker passes",
59
59
  "README links resolve",
60
- "npm private scope confirmed before removing private:true"
60
+ "npm public access confirmed before publishing"
61
61
  ]
62
62
  },
63
63
  "secrets": {
package/SECURITY.md CHANGED
@@ -6,7 +6,7 @@ AiML SuperAgent is designed around secret-safe operation.
6
6
 
7
7
  Do not open public issues containing secrets.
8
8
 
9
- If this repo is made public, use the repository security contact or private advisory flow for sensitive reports.
9
+ Use the repository security contact or private advisory flow for sensitive reports.
10
10
 
11
11
  ## Secret Policy
12
12
 
@@ -29,4 +29,3 @@ Run before release:
29
29
  ```bash
30
30
  npm run check
31
31
  ```
32
-
package/WORKING_NOTES.md CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  ## Current State
4
4
 
5
- - Repository is private.
6
- - Goal is a public-ready release candidate for AiML SuperAgent.
5
+ - Repository is public at `github.com/marvinbfreedman/aimlsuperagent`.
6
+ - npm package is public at `@aimlsuperagent/agent`.
7
+ - Goal is a public release candidate for AiML SuperAgent.
7
8
  - Positioning: not a replacement for behavior files, but the next operating layer after them.
8
9
  - Core differentiator: Context Minimizer, which reduces token waste by separating durable memory from active task context.
9
10
  - Checker now validates unresolved placeholders, source-of-truth paths, context-bloat size limits, and optional release/strict gates.
@@ -18,10 +19,10 @@
18
19
 
19
20
  ## Open Decisions
20
21
 
21
- - Whether to publish as a GitHub-only framework or an npm starter package.
22
22
  - Whether to add model-specific adapter files for Claude, Codex, Cursor, and Gemini in separate folders.
23
23
 
24
24
  ## Decisions
25
25
 
26
- - License set to MIT while repository remains private. This preserves private development while preparing clean public reuse terms.
27
- - Package name prepared as `@aimlsuperagent/agent`, but `private:true` remains as a safety brake until npm scope ownership and private package access are confirmed.
26
+ - License set to MIT for public reuse.
27
+ - Package metadata points at `github.com/marvinbfreedman/aimlsuperagent`.
28
+ - npm package public access is confirmed for `@aimlsuperagent/agent`.
@@ -74,6 +74,9 @@ const CONTEXT_SIZE_LIMITS = [
74
74
  }
75
75
  ];
76
76
 
77
+ const DEFAULT_ANALYTICS_ENDPOINT = "https://aimlsuperagent.com/api/visitor-track";
78
+ const DEFAULT_ANALYTICS_TIMEOUT_MS = 750;
79
+
77
80
  function usage() {
78
81
  console.log(`AiML SuperAgent
79
82
 
@@ -81,6 +84,10 @@ Usage:
81
84
  aiml-superagent init [target-dir]
82
85
  aiml-superagent check [target-dir] [--json] [--release] [--strict]
83
86
 
87
+ Analytics:
88
+ Disabled by default. Set AIML_SUPERAGENT_ANALYTICS=1 or pass --analytics.
89
+ Pass --no-analytics to disable analytics for one command.
90
+
84
91
  Examples:
85
92
  node bin/aiml-superagent.js init ../my-app
86
93
  node bin/aiml-superagent.js check ../my-app
@@ -97,6 +104,21 @@ function readJson(file) {
97
104
  return JSON.parse(fs.readFileSync(file, "utf8"));
98
105
  }
99
106
 
107
+ let cachedPackageVersion;
108
+
109
+ function packageVersion() {
110
+ if (cachedPackageVersion) return cachedPackageVersion;
111
+
112
+ try {
113
+ const packageJson = readJson(path.join(repoRootFromScript(), "package.json"));
114
+ cachedPackageVersion = String(packageJson.version || "0.0.0");
115
+ } catch {
116
+ cachedPackageVersion = "0.0.0";
117
+ }
118
+
119
+ return cachedPackageVersion;
120
+ }
121
+
100
122
  function ensureDir(dir) {
101
123
  fs.mkdirSync(dir, { recursive: true });
102
124
  }
@@ -429,7 +451,8 @@ function parseArgs(argv) {
429
451
  const options = {
430
452
  json: false,
431
453
  release: false,
432
- strict: false
454
+ strict: false,
455
+ analytics: null
433
456
  };
434
457
  const positionals = [];
435
458
 
@@ -440,6 +463,10 @@ function parseArgs(argv) {
440
463
  options.release = true;
441
464
  } else if (arg === "--strict") {
442
465
  options.strict = true;
466
+ } else if (arg === "--analytics") {
467
+ options.analytics = true;
468
+ } else if (arg === "--no-analytics") {
469
+ options.analytics = false;
443
470
  } else {
444
471
  positionals.push(arg);
445
472
  }
@@ -448,30 +475,170 @@ function parseArgs(argv) {
448
475
  return { command: positionals[0], targetArg: positionals[1], options };
449
476
  }
450
477
 
451
- const { command, targetArg, options } = parseArgs(process.argv.slice(2));
478
+ function isTruthy(value) {
479
+ return /^(1|true|yes|on)$/i.test(String(value || "").trim());
480
+ }
452
481
 
453
- if (!command || command === "--help" || command === "-h") {
454
- usage();
455
- process.exit(0);
482
+ function analyticsEnabled(options) {
483
+ if (options.analytics === true) return true;
484
+ if (options.analytics === false) return false;
485
+ return isTruthy(process.env.AIML_SUPERAGENT_ANALYTICS);
486
+ }
487
+
488
+ function analyticsEndpoint() {
489
+ const endpoint = String(process.env.AIML_SUPERAGENT_ANALYTICS_ENDPOINT || DEFAULT_ANALYTICS_ENDPOINT).trim();
490
+ return /^https?:\/\//i.test(endpoint) ? endpoint : null;
491
+ }
492
+
493
+ function analyticsTimeoutMs() {
494
+ const parsed = Number.parseInt(String(process.env.AIML_SUPERAGENT_ANALYTICS_TIMEOUT_MS || ""), 10);
495
+ if (Number.isFinite(parsed) && parsed > 0 && parsed <= 5000) return parsed;
496
+ return DEFAULT_ANALYTICS_TIMEOUT_MS;
497
+ }
498
+
499
+ function compactObject(object) {
500
+ return Object.fromEntries(
501
+ Object.entries(object).filter(([, value]) => value !== undefined && value !== null)
502
+ );
503
+ }
504
+
505
+ function isCiEnvironment() {
506
+ return Boolean(
507
+ process.env.CI ||
508
+ process.env.GITHUB_ACTIONS ||
509
+ process.env.GITLAB_CI ||
510
+ process.env.CIRCLECI ||
511
+ process.env.VERCEL ||
512
+ process.env.NETLIFY
513
+ );
456
514
  }
457
515
 
458
- if (command === "init") {
459
- const targetDir = path.resolve(targetArg || ".");
460
- const actions = copyTemplates(targetDir);
516
+ function actionCounts(actions) {
517
+ const counts = {};
518
+
461
519
  for (const action of actions) {
462
- console.log(`${action.type}: ${action.file}`);
520
+ counts[action.type] = (counts[action.type] || 0) + 1;
463
521
  }
464
- process.exit(0);
522
+
523
+ return counts;
465
524
  }
466
525
 
467
- if (command === "check") {
468
- const targetDir = path.resolve(targetArg || ".");
469
- const result = checkProject(targetDir, options);
470
- const readiness = score(result.findings);
471
- printCheck(result, options.json);
472
- process.exit(readiness.high > 0 || (options.strict && readiness.medium > 0) ? 1 : 0);
526
+ async function recordCliAnalytics(options, event) {
527
+ if (!analyticsEnabled(options) || typeof globalThis.fetch !== "function") return;
528
+
529
+ const endpoint = analyticsEndpoint();
530
+ if (!endpoint) return;
531
+
532
+ const command = event.command || "unknown";
533
+ const controller = new AbortController();
534
+ const timeout = setTimeout(() => controller.abort(), analyticsTimeoutMs());
535
+
536
+ const body = {
537
+ eventName: "package_cli_command",
538
+ siteName: "aimlsuperagent-package",
539
+ path: `/cli/${command}`,
540
+ title: "AiML SuperAgent CLI",
541
+ data: compactObject({
542
+ packageName: "@aimlsuperagent/agent",
543
+ packageVersion: packageVersion(),
544
+ command,
545
+ result: event.exitCode === 0 ? "success" : "failure",
546
+ exitCode: event.exitCode,
547
+ durationMs: event.durationMs,
548
+ nodeMajor: Number.parseInt(process.versions.node.split(".")[0], 10),
549
+ platform: process.platform,
550
+ arch: process.arch,
551
+ ci: isCiEnvironment(),
552
+ json: Boolean(options.json),
553
+ release: Boolean(options.release),
554
+ strict: Boolean(options.strict),
555
+ readiness: event.readiness?.label,
556
+ highFindings: event.readiness?.high,
557
+ mediumFindings: event.readiness?.medium,
558
+ lowFindings: event.readiness?.low,
559
+ actionCounts: event.actionCounts
560
+ })
561
+ };
562
+
563
+ try {
564
+ await globalThis.fetch(endpoint, {
565
+ method: "POST",
566
+ headers: {
567
+ "content-type": "application/json",
568
+ "user-agent": `aiml-superagent/${packageVersion()} node/${process.version}`
569
+ },
570
+ body: JSON.stringify(body),
571
+ signal: controller.signal
572
+ });
573
+ } catch {
574
+ // Analytics is best-effort and must never affect CLI behavior.
575
+ } finally {
576
+ clearTimeout(timeout);
577
+ }
578
+ }
579
+
580
+ async function main() {
581
+ const startedAt = Date.now();
582
+ const { command, targetArg, options } = parseArgs(process.argv.slice(2));
583
+
584
+ if (!command || command === "--help" || command === "-h") {
585
+ usage();
586
+ const exitCode = 0;
587
+ await recordCliAnalytics(options, {
588
+ command: "help",
589
+ exitCode,
590
+ durationMs: Date.now() - startedAt
591
+ });
592
+ return exitCode;
593
+ }
594
+
595
+ if (command === "init") {
596
+ const targetDir = path.resolve(targetArg || ".");
597
+ const actions = copyTemplates(targetDir);
598
+ for (const action of actions) {
599
+ console.log(`${action.type}: ${action.file}`);
600
+ }
601
+ const exitCode = 0;
602
+ await recordCliAnalytics(options, {
603
+ command,
604
+ exitCode,
605
+ durationMs: Date.now() - startedAt,
606
+ actionCounts: actionCounts(actions)
607
+ });
608
+ return exitCode;
609
+ }
610
+
611
+ if (command === "check") {
612
+ const targetDir = path.resolve(targetArg || ".");
613
+ const result = checkProject(targetDir, options);
614
+ const readiness = score(result.findings);
615
+ printCheck(result, options.json);
616
+ const exitCode = readiness.high > 0 || (options.strict && readiness.medium > 0) ? 1 : 0;
617
+ await recordCliAnalytics(options, {
618
+ command,
619
+ exitCode,
620
+ durationMs: Date.now() - startedAt,
621
+ readiness
622
+ });
623
+ return exitCode;
624
+ }
625
+
626
+ console.error(`Unknown command: ${command}`);
627
+ usage();
628
+ const exitCode = 1;
629
+ await recordCliAnalytics(options, {
630
+ command: "unknown",
631
+ exitCode,
632
+ durationMs: Date.now() - startedAt
633
+ });
634
+ return exitCode;
473
635
  }
474
636
 
475
- console.error(`Unknown command: ${command}`);
476
- usage();
477
- process.exit(1);
637
+ main()
638
+ .then((exitCode) => {
639
+ process.exit(exitCode);
640
+ })
641
+ .catch((error) => {
642
+ console.error(error instanceof Error ? error.message : String(error));
643
+ process.exit(1);
644
+ });
@@ -77,6 +77,6 @@ node scripts/validate-schema.mjs
77
77
  CLI script:
78
78
 
79
79
  ```bash
80
- node bin/aiml-superagent.js check .
80
+ npm i -D @aimlsuperagent/agent
81
+ npx @aimlsuperagent/agent check .
81
82
  ```
82
-
@@ -13,7 +13,8 @@ Add:
13
13
  Run:
14
14
 
15
15
  ```bash
16
- node bin/aiml-superagent.js check .
16
+ npm i -D @aimlsuperagent/agent
17
+ npx @aimlsuperagent/agent check .
17
18
  ```
18
19
 
19
20
  Replace every placeholder before relying on the output.
@@ -59,4 +60,3 @@ Review notes regularly:
59
60
  - mark assumptions explicitly
60
61
 
61
62
  The framework fails if notes become a junk drawer.
62
-
@@ -0,0 +1,78 @@
1
+ # Package Analytics
2
+
3
+ AiML SuperAgent package analytics is opt-in.
4
+
5
+ The CLI does not send analytics unless one of these is true:
6
+
7
+ - `AIML_SUPERAGENT_ANALYTICS=1` is set.
8
+ - The command is run with `--analytics`.
9
+
10
+ Use `--no-analytics` to disable analytics for one command even when the environment variable is enabled.
11
+
12
+ ## Why It Exists
13
+
14
+ Package analytics helps answer operational questions without weakening the framework's privacy and secret-safety rules:
15
+
16
+ - Which CLI commands are used?
17
+ - Are readiness checks passing?
18
+ - Are release checks failing before publish?
19
+ - Which Node major versions need support?
20
+ - Are commands running locally or in CI?
21
+
22
+ ## What Is Sent
23
+
24
+ When enabled, the CLI sends one best-effort event per command:
25
+
26
+ - package name
27
+ - package version
28
+ - command name
29
+ - result status
30
+ - exit code
31
+ - command duration
32
+ - Node major version
33
+ - operating system platform
34
+ - CPU architecture
35
+ - CI flag
36
+ - selected command options
37
+ - readiness label and finding counts for `check`
38
+ - action counts for `init`
39
+
40
+ ## What Is Never Sent
41
+
42
+ The CLI must not send:
43
+
44
+ - file contents
45
+ - note contents
46
+ - absolute paths
47
+ - repo names
48
+ - project names
49
+ - remote URLs
50
+ - environment variable values
51
+ - secrets or credentials
52
+ - source code snippets
53
+
54
+ ## Endpoint
55
+
56
+ By default, events are sent to:
57
+
58
+ ```bash
59
+ https://aimlsuperagent.com/api/visitor-track
60
+ ```
61
+
62
+ Use a compatible endpoint if you want to collect events somewhere else:
63
+
64
+ ```bash
65
+ AIML_SUPERAGENT_ANALYTICS=1 \
66
+ AIML_SUPERAGENT_ANALYTICS_ENDPOINT=https://example.com/api/track \
67
+ aiml-superagent check .
68
+ ```
69
+
70
+ The endpoint receives a generic tracking payload with `eventName`, `siteName`, `path`, `title`, and `data`.
71
+
72
+ Like any HTTP request, the receiving endpoint may also receive normal request metadata such as IP address and user-agent.
73
+
74
+ ## Failure Behavior
75
+
76
+ Analytics is best-effort. Network errors, timeouts, invalid endpoints, and server failures are ignored by the CLI.
77
+
78
+ Analytics must never change the command output, exit code, or readiness result.
@@ -0,0 +1,96 @@
1
+ # npm Publishing
2
+
3
+ This repository publishes a public npm package named:
4
+
5
+ ```text
6
+ @aimlsuperagent/agent
7
+ ```
8
+
9
+ The package is public. Anyone can install it from the npm registry without joining the `aimlsuperagent` npm organization.
10
+
11
+ ## Current Publish State
12
+
13
+ `package.json` includes:
14
+
15
+ ```json
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "registry": "https://registry.npmjs.org/"
19
+ }
20
+ ```
21
+
22
+ Public access is intentional for the scoped package.
23
+
24
+ ## Confirm Current Access
25
+
26
+ Check package visibility:
27
+
28
+ ```bash
29
+ npm access get status @aimlsuperagent/agent
30
+ ```
31
+
32
+ Expected current shape:
33
+
34
+ - package status: `public`
35
+ - package name: `@aimlsuperagent/agent`
36
+ - repository: `github.com/marvinbfreedman/aimlsuperagent`
37
+
38
+ ```bash
39
+ npm i -g @aimlsuperagent/agent
40
+ aiml-superagent --help
41
+ ```
42
+
43
+ ## Dry Run
44
+
45
+ Run:
46
+
47
+ ```bash
48
+ npm run check:release
49
+ npm run pack:dry-run
50
+ ```
51
+
52
+ Review the file list. It should include docs, templates, examples, schemas, the CLI, and root operating files. It should not include secrets, local logs, or build output.
53
+
54
+ ## Publishing Procedure
55
+
56
+ For a new public version:
57
+
58
+ 1. Bump the package version.
59
+ 2. Run:
60
+
61
+ ```bash
62
+ npm run check:release
63
+ npm run pack:dry-run
64
+ npm publish --access public
65
+ ```
66
+
67
+ ## Trusted Publishing
68
+
69
+ npm recommends Trusted Publishing for automation and CI/CD. This repository includes:
70
+
71
+ ```text
72
+ .github/workflows/npm-publish.yml
73
+ ```
74
+
75
+ Trusted Publishing is configured for this package:
76
+
77
+ - Provider: GitHub Actions
78
+ - Organization or user: `marvinbfreedman`
79
+ - Repository: `aimlsuperagent`
80
+ - Workflow filename: `npm-publish.yml`
81
+ - Allowed action: `npm publish`
82
+
83
+ Use GitHub Actions > Publish npm package > Run workflow. The workflow uses GitHub OIDC instead of a long-lived `NPM_TOKEN`.
84
+
85
+ ## Install
86
+
87
+ Anyone can install globally:
88
+
89
+ ```bash
90
+ npm i -g @aimlsuperagent/agent
91
+ aiml-superagent --help
92
+ ```
93
+
94
+ ## Failure Rule
95
+
96
+ If `npm run check:release` or `npm run pack:dry-run` fails, do not publish. Fix the release blocker first.
@@ -31,12 +31,15 @@ git status --short
31
31
  Optional:
32
32
 
33
33
  ```bash
34
- node bin/aiml-superagent.js init /tmp/superagent-smoke
35
- node bin/aiml-superagent.js check /tmp/superagent-smoke
34
+ mkdir -p /tmp/superagent-smoke
35
+ cd /tmp/superagent-smoke
36
+ npm i -D @aimlsuperagent/agent
37
+ npx @aimlsuperagent/agent init .
38
+ npx @aimlsuperagent/agent check .
36
39
  ```
37
40
 
38
41
  ## Publication
39
42
 
40
43
  - Confirm MIT License is still the intended public license.
41
- - Remove private release candidate wording if appropriate.
44
+ - Remove stale pre-publication wording if appropriate.
42
45
  - Tag first public release.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aimlsuperagent/agent",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "A token-efficient operating framework for AI coding assistants.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "check:json": "node bin/aiml-superagent.js check . --json",
29
29
  "check:release": "node bin/aiml-superagent.js check . --release --strict",
30
30
  "pack:dry-run": "npm pack --dry-run --cache ./.npm-cache",
31
- "prepublishOnly": "node scripts/assert-private-publish-ready.js && node bin/aiml-superagent.js check . --release --strict"
31
+ "prepublishOnly": "node scripts/assert-public-publish-ready.js && node bin/aiml-superagent.js check . --release --strict"
32
32
  },
33
33
  "keywords": [
34
34
  "ai",
@@ -41,16 +41,16 @@
41
41
  "homepage": "https://aimlsuperagent.com",
42
42
  "repository": {
43
43
  "type": "git",
44
- "url": "git+https://github.com/whisperaiml/superagent-repo.git"
44
+ "url": "git+https://github.com/marvinbfreedman/aimlsuperagent.git"
45
45
  },
46
46
  "bugs": {
47
- "url": "https://github.com/whisperaiml/superagent-repo/issues"
47
+ "url": "https://github.com/marvinbfreedman/aimlsuperagent/issues"
48
48
  },
49
49
  "engines": {
50
50
  "node": ">=18"
51
51
  },
52
52
  "publishConfig": {
53
- "access": "restricted",
53
+ "access": "public",
54
54
  "registry": "https://registry.npmjs.org/"
55
55
  },
56
56
  "license": "MIT"
@@ -1,89 +0,0 @@
1
- # Private npm Publishing
2
-
3
- This repository is prepared for a private npm package named:
4
-
5
- ```text
6
- @aimlsuperagent/agent
7
- ```
8
-
9
- Do not publish until npm confirms that the `@aimlsuperagent` scope is owned by the correct account or organization and private packages are enabled.
10
-
11
- ## Current Safety State
12
-
13
- `package.json` intentionally keeps:
14
-
15
- ```json
16
- "private": true
17
- ```
18
-
19
- That blocks accidental publishing.
20
-
21
- The package also includes:
22
-
23
- ```json
24
- "publishConfig": {
25
- "access": "restricted",
26
- "registry": "https://registry.npmjs.org/"
27
- }
28
- ```
29
-
30
- Restricted access is the npm setting required for a private scoped package.
31
-
32
- ## Confirm Scope Ownership
33
-
34
- Log in:
35
-
36
- ```bash
37
- npm login
38
- npm whoami
39
- ```
40
-
41
- Check organization or scope access:
42
-
43
- ```bash
44
- npm org ls aimlsuperagent
45
- npm access ls-packages @aimlsuperagent
46
- ```
47
-
48
- If those commands fail because the scope or organization does not exist, create or claim the npm organization/scope before publishing.
49
-
50
- ## Dry Run
51
-
52
- Run:
53
-
54
- ```bash
55
- npm run check:release
56
- npm run pack:dry-run
57
- ```
58
-
59
- Review the file list. It should include docs, templates, examples, schemas, the CLI, and root operating files. It should not include secrets, local logs, or build output.
60
-
61
- ## Publishing Procedure
62
-
63
- Only after private package access is confirmed:
64
-
65
- 1. Remove `"private": true` from `package.json` in a dedicated publish commit.
66
- 2. Run:
67
-
68
- ```bash
69
- npm run check:release
70
- npm run pack:dry-run
71
- npm publish --access restricted
72
- ```
73
-
74
- Do not run `npm publish --access public`.
75
-
76
- ## Install
77
-
78
- Authorized users can install globally:
79
-
80
- ```bash
81
- npm login
82
- npm i -g @aimlsuperagent/agent
83
- aiml-superagent --help
84
- ```
85
-
86
- ## Failure Rule
87
-
88
- If npm cannot confirm restricted/private access, do not publish. Keep using the private GitHub repo or a private tarball.
89
-