@conto_finance/create-conto-agent 0.5.0 → 0.6.0

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.
@@ -11,10 +11,9 @@ import {
11
11
  maskSecret,
12
12
  missingSdkKeyMessage,
13
13
  saveGlobalConfig,
14
- writeContoConfig,
15
14
  writeEnvLocal,
16
15
  writeSandboxSetupEnv
17
- } from "./chunk-XWUWB3FT.js";
16
+ } from "./chunk-RQ4PUBL7.js";
18
17
  export {
19
18
  SANDBOX_SETUP_ENV_FILE,
20
19
  clearGlobalConfig,
@@ -28,7 +27,6 @@ export {
28
27
  maskSecret,
29
28
  missingSdkKeyMessage,
30
29
  saveGlobalConfig,
31
- writeContoConfig,
32
30
  writeEnvLocal,
33
31
  writeSandboxSetupEnv
34
32
  };
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  runInit
3
- } from "./chunk-HDSRGTWB.js";
3
+ } from "./chunk-QJIXCSI2.js";
4
+ import "./chunk-RQ4PUBL7.js";
4
5
  import {
5
6
  isJsonMode,
6
7
  printJson,
7
8
  setJsonMode
8
- } from "./chunk-K4LBO234.js";
9
- import "./chunk-XWUWB3FT.js";
9
+ } from "./chunk-DT5NOLBD.js";
10
10
 
11
11
  // src/index.ts
12
12
  var CLI_COMMANDS = /* @__PURE__ */ new Set([
@@ -73,6 +73,8 @@ if (delegatedCommand) {
73
73
  options.resume = true;
74
74
  } else if (arg === "--restart") {
75
75
  options.restart = true;
76
+ } else if (arg === "--overwrite") {
77
+ options.overwrite = true;
76
78
  }
77
79
  }
78
80
  if (options.json) {
@@ -95,7 +97,8 @@ if (delegatedCommand) {
95
97
  apiKey: options.apiKey,
96
98
  confirmMainnet: options.confirmMainnet === true,
97
99
  resume: options.resume === true,
98
- restart: options.restart === true
100
+ restart: options.restart === true,
101
+ overwrite: options.overwrite === true
99
102
  }).catch((err) => {
100
103
  const error = err instanceof Error ? err.message : String(err);
101
104
  if (isJsonMode()) printJson({ ok: false, error });
@@ -23,6 +23,19 @@ type VelocityPeriod = (typeof VELOCITY_PERIODS)[number];
23
23
  * {"maxCount": n, "period": "HOUR" | "DAY" | "WEEK" | "MONTH"}.
24
24
  */
25
25
  declare function buildVelocityCountValue(input: string, period: string): ValidationResult;
26
+ declare const BUDGET_PERIODS: readonly ["DAILY", "WEEKLY", "MONTHLY", "QUARTERLY", "YEARLY"];
27
+ /**
28
+ * BUDGET_CAP rules are read by the server as {"amount": n, "period": ...}. A
29
+ * bare number has no amount the server can read, so it denies every payment
30
+ * the policy covers.
31
+ */
32
+ declare function buildBudgetCapValue(input: string, period: string): ValidationResult;
33
+ /**
34
+ * An example DATE_RANGE value that is current when the prompt shows it: from
35
+ * today for one year. A fixed example goes out of date and saves a range that
36
+ * has already ended.
37
+ */
38
+ declare function dateRangePlaceholder(now?: Date): string;
26
39
  interface PaymentRequestBody {
27
40
  amount: number;
28
41
  recipientAddress: string;
@@ -49,5 +62,5 @@ declare function validatePaymentRequest(input: {
49
62
  walletId?: string;
50
63
  }): PaymentValidation;
51
64
 
52
- export { VELOCITY_PERIODS, buildVelocityCountValue, parseTrustScoreInput, validatePaymentRequest };
65
+ export { BUDGET_PERIODS, VELOCITY_PERIODS, buildBudgetCapValue, buildVelocityCountValue, dateRangePlaceholder, parseTrustScoreInput, validatePaymentRequest };
53
66
  export type { PaymentRequestBody, PaymentValidation, ValidationResult, VelocityPeriod };
@@ -1,12 +1,18 @@
1
1
  import {
2
+ BUDGET_PERIODS,
2
3
  VELOCITY_PERIODS,
4
+ buildBudgetCapValue,
3
5
  buildVelocityCountValue,
6
+ dateRangePlaceholder,
4
7
  parseTrustScoreInput,
5
8
  validatePaymentRequest
6
- } from "../chunk-TJJY5NFH.js";
9
+ } from "../chunk-2M2WVAJI.js";
7
10
  export {
11
+ BUDGET_PERIODS,
8
12
  VELOCITY_PERIODS,
13
+ buildBudgetCapValue,
9
14
  buildVelocityCountValue,
15
+ dateRangePlaceholder,
10
16
  parseTrustScoreInput,
11
17
  validatePaymentRequest
12
18
  };
@@ -13,7 +13,7 @@ import {
13
13
  printWarning,
14
14
  setJsonMode,
15
15
  truncateAddress
16
- } from "./chunk-K4LBO234.js";
16
+ } from "./chunk-DT5NOLBD.js";
17
17
  export {
18
18
  isJsonMode,
19
19
  printAmount,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conto_finance/create-conto-agent",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Set up an AI agent with Conto spending controls",
5
5
  "bin": {
6
6
  "create-conto-agent": "bin/create-conto-agent.js",