madeby 0.1.0 → 0.2.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 CHANGED
@@ -97,7 +97,7 @@ on its own error, and never invents a stricter gate than the maintainer wrote.
97
97
 
98
98
  A ready-made GitHub Action, an Azure DevOps Pipelines template, and a GitLab CI job wrap
99
99
  `madeby check` — nothing hosted, nothing leaves your CI. See
100
- [`packages/action`](https://github.com/MacDougherty/MadeBy/tree/main/packages/action#readme).
100
+ [`packages/action`](https://github.com/MadeByFYI/MadeBy/tree/main/packages/action#readme).
101
101
 
102
102
  ## Extend it anywhere — primitives you run, not code you ship
103
103
 
@@ -179,4 +179,4 @@ Disclosure and accountability, **not** an AI slop-blocker or detector. A `requir
179
179
  low-effort drive-bys (as the DCO does) and gives a basis to triage — it does not, and will never,
180
180
  claim to detect AI.
181
181
 
182
- MIT · part of [MadeBy](https://github.com/MacDougherty/MadeBy)
182
+ MIT · part of [MadeBy](https://github.com/MadeByFYI/MadeBy)
package/dist/madeby.mjs CHANGED
@@ -1582,7 +1582,7 @@ To disclose: add a Co-Authored-By / Generated-by trailer, affirm your own author
1582
1582
  }
1583
1583
 
1584
1584
  // src/commands/ai.ts
1585
- var ISSUE_URL = "https://github.com/MacDougherty/MadeBy/issues/new";
1585
+ var ISSUE_URL = "https://github.com/MadeByFYI/MadeBy/issues/new";
1586
1586
  function aiCommand(args) {
1587
1587
  const root = repoRoot();
1588
1588
  if (!root) {
@@ -1633,11 +1633,20 @@ function aiCommand(args) {
1633
1633
 
1634
1634
  // src/commands/me.ts
1635
1635
  import { execFileSync as execFileSync5 } from "node:child_process";
1636
+ function parseWithAi(args) {
1637
+ const i = args.findIndex((a2) => a2 === "--with-ai" || a2.startsWith("--with-ai="));
1638
+ if (i === -1) return { withAi: false, tool: "AI" };
1639
+ const a = args[i];
1640
+ if (a.startsWith("--with-ai=")) return { withAi: true, tool: a.slice("--with-ai=".length).trim() || "AI" };
1641
+ const next = args[i + 1];
1642
+ return { withAi: true, tool: next && !next.startsWith("-") ? next : "AI" };
1643
+ }
1636
1644
  function git3(root, args) {
1637
1645
  return execFileSync5("git", ["-C", root, ...args], { encoding: "utf8" }).trim();
1638
1646
  }
1639
1647
  var HUMAN_ATTEST = /^[ \t]*(?:Authored-by-human|Human-authored(?:-by)?)[ \t]*:/im;
1640
- function meCommand(_args) {
1648
+ function meCommand(args) {
1649
+ const { withAi, tool } = parseWithAi(args);
1641
1650
  const root = repoRoot();
1642
1651
  if (!root) {
1643
1652
  console.error("madeby me: not a git repository.");
@@ -1673,13 +1682,21 @@ function meCommand(_args) {
1673
1682
  process.exit(1);
1674
1683
  return;
1675
1684
  }
1676
- if (HUMAN_ATTEST.test(message)) {
1677
- console.log("madeby me: HEAD already affirms human authorship. Nothing to do.");
1685
+ const hasHuman = HUMAN_ATTEST.test(message);
1686
+ const hasAssist = /^[ \t]*Assisted-by[ \t]*:/im.test(message);
1687
+ const trailers = [];
1688
+ if (!hasHuman) trailers.push("--trailer", `Authored-by-human: ${name} <${email}>`);
1689
+ if (withAi && !hasAssist) trailers.push("--trailer", `Assisted-by: ${tool}`);
1690
+ if (trailers.length === 0) {
1691
+ const already = withAi ? "already affirms human authorship and discloses AI assistance" : "already affirms human authorship";
1692
+ console.log(`madeby me: HEAD ${already}. Nothing to do.`);
1678
1693
  process.exit(0);
1679
1694
  return;
1680
1695
  }
1681
- execFileSync5("git", ["-C", root, "commit", "--amend", "--no-edit", "--trailer", `Authored-by-human: ${name} <${email}>`]);
1682
- console.log(`madeby me: affirmed human authorship on HEAD \u2014 "${subject}" (Authored-by-human: ${name}).`);
1696
+ execFileSync5("git", ["-C", root, "commit", "--amend", "--no-edit", ...trailers]);
1697
+ console.log(
1698
+ withAi ? `madeby me: made by me, with AI \u2014 affirmed human authorship + disclosed AI assistance on HEAD \u2014 "${subject}" (Authored-by-human: ${name}; Assisted-by: ${tool}).` : `madeby me: affirmed human authorship on HEAD \u2014 "${subject}" (Authored-by-human: ${name}).`
1699
+ );
1683
1700
  }
1684
1701
 
1685
1702
  // src/commands/who.ts
@@ -1741,7 +1758,7 @@ jobs:
1741
1758
  - uses: actions/checkout@v4
1742
1759
  with:
1743
1760
  fetch-depth: 0
1744
- - uses: MacDougherty/MadeBy/packages/action@v0.1.0
1761
+ - uses: MadeByFYI/MadeBy/packages/action@v0.2.0
1745
1762
  `;
1746
1763
  function writeIfAbsent(abs, rel, content, created, skipped) {
1747
1764
  if (existsSync3(abs)) {
@@ -2054,6 +2071,8 @@ Usage:
2054
2071
  <log> defaults to the auto-discovered Claude Code transcript.
2055
2072
  madeby me Made by me: affirm you authored HEAD yourself (an Authored-by-human
2056
2073
  trailer \u2014 the symmetric human claim to \`ai\`).
2074
+ madeby me --with-ai [tool] Made by me, with AI: also disclose AI assistance (Assisted-by:
2075
+ <tool>, default "AI") \u2014 the assisted middle state, classified with_ai.
2057
2076
  madeby mcp Run the MCP server (stdio) \u2014 the tools, agent-callable.
2058
2077
  madeby help Show this help.
2059
2078
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "madeby",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "MadeBy — verifiable content provenance. Disclose your AI use (madeby ai) and gate PRs on disclosure (madeby check).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -10,10 +10,10 @@
10
10
  "contributors": [
11
11
  "Claude, Anthropic (AI-assisted — see the Co-Authored-By trailers in the git history)"
12
12
  ],
13
- "homepage": "https://github.com/MacDougherty/MadeBy/tree/main/packages/cli#readme",
13
+ "homepage": "https://github.com/MadeByFYI/MadeBy/tree/main/packages/cli#readme",
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "git+https://github.com/MacDougherty/MadeBy.git",
16
+ "url": "git+https://github.com/MadeByFYI/MadeBy.git",
17
17
  "directory": "packages/cli"
18
18
  },
19
19
  "keywords": [