@base-attribution-os/github-action 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.
Files changed (2) hide show
  1. package/dist/index.cjs +18 -14
  2. package/package.json +3 -3
package/dist/index.cjs CHANGED
@@ -230223,7 +230223,7 @@ var SKIPPED_DIRECTORIES = /* @__PURE__ */ new Set([
230223
230223
  "node_modules"
230224
230224
  ]);
230225
230225
  var BUILDER_CODE_REGEX = /\bbc_[A-Za-z0-9._:-]+\b/g;
230226
- var ATTRIBUTION_HELPER_REGEX = /\b(?:appendDataSuffix|attributeSendCalls|Attribution\.toDataSuffix|BuilderCodeClientExtension|builderCodeDataSuffix|createAttributionSigner|createDataSuffix|dataSuffix|declareBuilderCodeExtension|ethersBuilderCodeDataSuffix|useAttributionSuffix|withAttributionSuffix|withEthersAttribution|withViemDataSuffix)\b/;
230226
+ var ATTRIBUTION_HELPER_REGEX = /\b(?:appendDataSuffix|attributeSendCalls|attributeUserOperation|Attribution\.toDataSuffix|BuilderCodeClientExtension|builderCodeDataSuffix|createAttributionProvider|createAttributionSigner|createDataSuffix|dataSuffix|declareBuilderCodeExtension|ethersBuilderCodeDataSuffix|sendAttributedCalls|useAttributionSuffix|validateUserOperationAttribution|withAttributionSuffix|withEthersAttribution|withUserOperationAttribution|withViemDataSuffix)\b/;
230227
230227
  var AGENT_MARKER_REGEX = /\b(?:agentTransactionTool|executeTransaction|onchainAction|sendTransactionTool|transactionTool)\b/;
230228
230228
  async function analyzeProject(options) {
230229
230229
  const root = import_path.default.resolve(options.root);
@@ -230300,7 +230300,9 @@ function detectFrameworks(source) {
230300
230300
  if (/@x402\//.test(source)) {
230301
230301
  frameworks.add("x402");
230302
230302
  }
230303
- if (/\b(?:sendCalls|wallet_sendCalls|useSendCalls)\b/.test(source)) {
230303
+ if (/\b(?:createAttributionProvider|eth_sendUserOperation|sendAttributedCalls|sendCalls|sendUserOperation|wallet_getCapabilities|wallet_sendCalls|useSendCalls|withUserOperationAttribution)\b/.test(
230304
+ source
230305
+ )) {
230304
230306
  frameworks.add("smart-wallet");
230305
230307
  }
230306
230308
  if (/\b(?:window\.ethereum|eth_sendTransaction)\b/.test(source)) {
@@ -230356,7 +230358,7 @@ function collectCandidates(sourceFile, source, frameworks) {
230356
230358
  );
230357
230359
  }
230358
230360
  function classifyCall(marker, requestMethod, source, frameworks) {
230359
- if (requestMethod === "wallet_sendCalls") {
230361
+ if (requestMethod === "wallet_sendCalls" || requestMethod === "eth_sendUserOperation") {
230360
230362
  return "wallet";
230361
230363
  }
230362
230364
  if (requestMethod === "eth_sendTransaction") {
@@ -230365,7 +230367,7 @@ function classifyCall(marker, requestMethod, source, frameworks) {
230365
230367
  if (marker === "paymentMiddleware" || marker === "wrapFetchWithPayment") {
230366
230368
  return "x402";
230367
230369
  }
230368
- if (marker === "sendCalls" || marker === "useSendCalls") {
230370
+ if (marker === "sendCalls" || marker === "useSendCalls" || marker === "sendAttributedCalls" || marker === "sendUserOperation") {
230369
230371
  return "wallet";
230370
230372
  }
230371
230373
  if (!marker || ![
@@ -230488,11 +230490,15 @@ function findLocalAttribution(candidate, directSource, source) {
230488
230490
  return void 0;
230489
230491
  }
230490
230492
  if (candidate.family === "wallet") {
230491
- if (/\bcapabilities\b[\s\S]*\bdataSuffix\b|\bdataSuffix\b/.test(directSource)) {
230492
- return { kind: "config", detail: "EIP-5792 dataSuffix capability" };
230493
+ if (/\b(?:attributeUserOperation|sendAttributedCalls|withUserOperationAttribution)\b/.test(
230494
+ directSource
230495
+ ) || /\b(?:attributeUserOperation|createAttributionProvider|withUserOperationAttribution)\b/.test(
230496
+ source
230497
+ )) {
230498
+ return { kind: "helper", detail: "Smart Wallet Attribution Kit middleware" };
230493
230499
  }
230494
- if (/\battributeSendCalls\b/.test(source)) {
230495
- return { kind: "helper", detail: "attributeSendCalls helper" };
230500
+ if (/\bcapabilities\b[\s\S]*\bdataSuffix\b/.test(directSource) && /\bwallet_getCapabilities\b/.test(source)) {
230501
+ return { kind: "config", detail: "negotiated EIP-5792 dataSuffix capability" };
230496
230502
  }
230497
230503
  return void 0;
230498
230504
  }
@@ -230517,7 +230523,7 @@ function collectProjectEvidence(records, builderCodes) {
230517
230523
  const expected = codes.some((code) => builderCodes.includes(code));
230518
230524
  const location = locationOf(
230519
230525
  record.source,
230520
- /\bdataSuffix\b|BuilderCodeClientExtension|declareBuilderCodeExtension/
230526
+ /\bdataSuffix\b|attributeUserOperation|BuilderCodeClientExtension|createAttributionProvider|declareBuilderCodeExtension|withUserOperationAttribution/
230521
230527
  );
230522
230528
  const families = evidenceFamilies(record);
230523
230529
  for (const family of families) {
@@ -230552,9 +230558,7 @@ function evidenceFamilies(record) {
230552
230558
  return Array.from(families);
230553
230559
  }
230554
230560
  function hasProjectConfigEvidence(source) {
230555
- return /\b(?:createWalletClient|createConfig|PrivyProvider|privyConfig)\b[\s\S]*\bdataSuffix\b/.test(
230556
- source
230557
- ) || /\bregisterExtension\s*\([\s\S]*\bBuilderCodeClientExtension\b/.test(source) || /\bdeclareBuilderCodeExtension\s*\(/.test(source) || /\bcreateAttributionSigner\s*\(/.test(source);
230561
+ return /\b(?:createWalletClient|createConfig)\b[\s\S]*\bdataSuffix\b/.test(source) || /\bplugins\s*:[\s\S]*\bdataSuffix\s*\(/.test(source) || /\bcreateAttributionProvider\s*\(/.test(source) || /\b(?:attributeUserOperation|withUserOperationAttribution)\s*\(/.test(source) || /\bwallet_getCapabilities\b/.test(source) && /\bcapabilities\b[\s\S]*\bdataSuffix\b/.test(source) || /\bregisterExtension\s*\([\s\S]*\bBuilderCodeClientExtension\b/.test(source) || /\bdeclareBuilderCodeExtension\s*\(/.test(source) || /\bcreateAttributionSigner\s*\(/.test(source);
230558
230562
  }
230559
230563
  function missingRuleFor(family) {
230560
230564
  if (family === "wallet") return "BAO005";
@@ -230573,7 +230577,7 @@ function missingMessage(candidate) {
230573
230577
  function suggestionFor(family) {
230574
230578
  switch (family) {
230575
230579
  case "wallet":
230576
- return "Add capabilities.dataSuffix to the sendCalls request.";
230580
+ return "Use Smart Wallet Attribution Kit middleware or negotiate wallet_getCapabilities before adding capabilities.dataSuffix.";
230577
230581
  case "x402":
230578
230582
  return "Register BuilderCodeClientExtension or declareBuilderCodeExtension.";
230579
230583
  case "privy":
@@ -230743,7 +230747,7 @@ var RULES = {
230743
230747
  },
230744
230748
  BAO005: {
230745
230749
  name: "smart-wallet-data-suffix",
230746
- description: "A smart-wallet call is missing the EIP-5792 dataSuffix capability."
230750
+ description: "A smart-wallet call is missing negotiated EIP-5792 or ERC-4337 attribution middleware."
230747
230751
  },
230748
230752
  BAO006: {
230749
230753
  name: "x402-builder-code-extension",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-attribution-os/github-action",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "GitHub Action wrapper for Base Attribution OS repo scans.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -14,8 +14,8 @@
14
14
  "main": "./dist/index.cjs",
15
15
  "dependencies": {
16
16
  "@actions/core": "^3.0.1",
17
- "@base-attribution-os/cli": "0.1.0",
18
- "@base-attribution-os/scanner": "0.1.0"
17
+ "@base-attribution-os/cli": "0.2.0",
18
+ "@base-attribution-os/scanner": "0.2.0"
19
19
  },
20
20
  "scripts": {
21
21
  "build": "tsup",