crewpay-goat-plugin 0.2.1 → 0.2.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/README.md CHANGED
@@ -24,7 +24,7 @@ await plugin.service.crewpay_launch({
24
24
  })
25
25
  ```
26
26
 
27
- Prefer `npx -y crewpay-mcp@1.2.3` for local signing; hosted MCP `https://mcp.crewpay.dev/mcp` for discover/autohire without a launcher secret.
27
+ Prefer `npx -y crewpay-mcp@1.2.5` for local signing; hosted MCP `https://mcp.crewpay.dev/mcp` for discover/autohire without a launcher secret.
28
28
 
29
29
  ## Safety
30
30
 
package/dist/client.d.ts CHANGED
@@ -26,6 +26,7 @@ export declare class CrewPayClient {
26
26
  label?: string;
27
27
  agentName?: string;
28
28
  model?: string;
29
+ referralCode?: string;
29
30
  }): Promise<unknown>;
30
31
  autohire(body: Record<string, unknown>): Promise<unknown>;
31
32
  /** Server dry-run — returns plan + dryRunId + approvalUrl (no approve secret). */
package/dist/client.js CHANGED
@@ -62,9 +62,17 @@ export class CrewPayClient {
62
62
  return this.fetch('/api/agent');
63
63
  }
64
64
  claimKey(body = {}) {
65
+ const referralCode = body.referralCode?.trim() ||
66
+ process.env.CREWPAY_REFERRAL_CODE?.trim() ||
67
+ process.env.CREW_REFERRAL_CODE?.trim() ||
68
+ undefined;
65
69
  return this.fetch('/api/agent/keys/claim', {
66
70
  method: 'POST',
67
- body: JSON.stringify({ label: 'agent', ...body }),
71
+ body: JSON.stringify({
72
+ label: 'agent',
73
+ ...body,
74
+ ...(referralCode ? { referralCode } : {}),
75
+ }),
68
76
  });
69
77
  }
70
78
  autohire(body) {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * GOAT SDK plugin scaffold for CrewPay.
3
- * Prefer MCP: npx -y crewpay-mcp@1.2.4 or https://mcp.crewpay.dev/mcp
3
+ * Prefer MCP: npx -y crewpay-mcp@1.2.5 or https://mcp.crewpay.dev/mcp
4
4
  */
5
5
  export type CrewPayGoatOptions = {
6
6
  apiUrl?: string;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * GOAT SDK plugin scaffold for CrewPay.
3
- * Prefer MCP: npx -y crewpay-mcp@1.2.4 or https://mcp.crewpay.dev/mcp
3
+ * Prefer MCP: npx -y crewpay-mcp@1.2.5 or https://mcp.crewpay.dev/mcp
4
4
  */
5
5
  import { CrewPayClient, loadCrewPayEnv } from './client.js';
6
6
  function api(opts = {}) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "crewpay-goat-plugin",
3
- "version": "0.2.1",
4
- "description": "GOAT SDK plugin for CrewPay REST tools. Fee map 60/15/25; buyback not live; dryRunId after approvalUrl before launch.",
3
+ "version": "0.2.2",
4
+ "description": "GOAT SDK plugin for CrewPay REST tools. Fee map 60/15/25 (60/15/5/20 with referralCode); buyback not live; dryRunId after approvalUrl before launch.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",