@integrity-labs/agt-cli 0.28.1186 → 0.28.1188

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/dist/bin/agt.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-JCTPPI2Q.js";
43
+ } from "../chunk-3JRHSAXP.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
@@ -5200,7 +5200,7 @@ import { execFileSync, execSync } from "child_process";
5200
5200
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
5201
5201
  import chalk17 from "chalk";
5202
5202
  import ora15 from "ora";
5203
- var cliVersion = true ? "0.28.1186" : "dev";
5203
+ var cliVersion = true ? "0.28.1188" : "dev";
5204
5204
  async function fetchLatestVersion() {
5205
5205
  const host2 = getHost();
5206
5206
  if (!host2) return null;
@@ -6460,7 +6460,7 @@ function handleError(err) {
6460
6460
  }
6461
6461
 
6462
6462
  // src/bin/agt.ts
6463
- var cliVersion2 = true ? "0.28.1186" : "dev";
6463
+ var cliVersion2 = true ? "0.28.1188" : "dev";
6464
6464
  var program = new Command();
6465
6465
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
6466
6466
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -8079,7 +8079,7 @@ function exchangeFailureKind(err) {
8079
8079
  }
8080
8080
 
8081
8081
  // src/lib/api-client.ts
8082
- var agtCliVersion = true ? "0.28.1186" : "dev";
8082
+ var agtCliVersion = true ? "0.28.1188" : "dev";
8083
8083
  var lastConfigHash = null;
8084
8084
  function setConfigHash(hash) {
8085
8085
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -13614,4 +13614,4 @@ export {
13614
13614
  managerInstallSystemUnitCommand,
13615
13615
  managerUninstallSystemUnitCommand
13616
13616
  };
13617
- //# sourceMappingURL=chunk-JCTPPI2Q.js.map
13617
+ //# sourceMappingURL=chunk-3JRHSAXP.js.map
@@ -82,7 +82,7 @@ import {
82
82
  tripClass,
83
83
  writeEtcEnvironment,
84
84
  writeProfileDScript
85
- } from "../chunk-JCTPPI2Q.js";
85
+ } from "../chunk-3JRHSAXP.js";
86
86
  import {
87
87
  CLAUDE_CODE_SECURITY_FLOOR,
88
88
  SELF_UPDATE_TIMEOUTS,
@@ -16278,7 +16278,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
16278
16278
  var lastVersionCheckAt = 0;
16279
16279
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
16280
16280
  var lastResponsivenessProbeAt = 0;
16281
- var agtCliVersion = true ? "0.28.1186" : "dev";
16281
+ var agtCliVersion = true ? "0.28.1188" : "dev";
16282
16282
  function resolveBrewPath(execFileSync3) {
16283
16283
  try {
16284
16284
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -46415,86 +46415,107 @@ function supportsProjectScoping(tool) {
46415
46415
  }
46416
46416
  var ORG_SCOPED_TOOLS = [
46417
46417
  // ==========================================================================
46418
- // v1 DATA PLANE
46418
+ // DATA PLANE (v3 leads and jobs; tool names kept from v1)
46419
46419
  // ==========================================================================
46420
46420
  {
46421
46421
  name: "list_tables",
46422
- description: "List enrichment tables in the org with column metadata (v1). Use this to discover available tables and column slugs before inserting rows or reading results.",
46422
+ description: "List lead lists in the org. Use this to discover what is available and to get list ids. FREE (no credits). Returns { items, next_cursor }.",
46423
46423
  risk_tier: "Low",
46424
- input_schema: { type: "object", properties: {} },
46425
- http: { method: "GET", path_template: "/api/v1/tables" }
46424
+ input_schema: {
46425
+ type: "object",
46426
+ properties: {
46427
+ cursor: { type: "string", description: "Opaque cursor: the `next_cursor` from a previous page." },
46428
+ limit: { type: "integer", minimum: 1, maximum: 100, description: "Lists per page. Max 100." },
46429
+ name: { type: "string", description: "Optional exact, case-insensitive name filter." }
46430
+ }
46431
+ },
46432
+ http: {
46433
+ method: "GET",
46434
+ path_template: "/api/v3/leads/lists",
46435
+ query_template: { cursor: "{cursor}", limit: "{limit}", name: "{name}" }
46436
+ }
46426
46437
  },
46427
46438
  {
46428
46439
  name: "list_table_rows",
46429
- description: "Read the ROWS (records) of a table - the actual lead / cell data, not just structure. FREE (no credits consumed). Paginated: `page` is zero-based, `pageSize` defaults 50 (max 500). Returns { columns (slug -> display name), rows (flat objects keyed by column slug; empty cells omitted), total, page, pageSize }. Optional: `columns` (comma-separated slugs to project), `filters` / `sort` (JSON strings). Discover the tableId + column slugs first via list_tables / get_table. If get_table shows cells.running > 0 the table is still enriching, so rows may be incomplete.",
46440
+ description: "Read the ROWS (records) of a lead list - the actual lead / cell data, not just structure. FREE (no credits). Returns { items, next_cursor }. Pages by cursor, not page number.",
46430
46441
  risk_tier: "Low",
46431
46442
  input_schema: {
46432
46443
  type: "object",
46433
46444
  properties: {
46434
- tableId: { type: "string", minLength: 1, description: "Table id from list_tables / get_table." },
46435
- page: { type: "integer", minimum: 0, description: "Zero-based page index. Default 0." },
46436
- pageSize: { type: "integer", minimum: 1, maximum: 500, description: "Rows per page. Default 50, max 500." },
46437
- columns: { type: "string", description: "Optional: comma-separated column slugs to return (default: all columns)." },
46438
- filters: { type: "string", description: "Optional: JSON array of { column, op, value } filter objects." },
46439
- sort: { type: "string", description: 'Optional: JSON { column, direction } where direction is "asc" or "desc".' }
46445
+ tableId: { type: "string", minLength: 1, description: "List id from list_tables / get_table." },
46446
+ cursor: { type: "string", description: "Opaque cursor: the `next_cursor` from a previous page." },
46447
+ limit: { type: "integer", minimum: 1, maximum: 100, description: "Rows per page. Max 100." },
46448
+ ids: { type: "string", description: "Optional: only these row ids, comma-separated." },
46449
+ min_relevance_score: { type: "number", description: "Optional: drop rows scored below this." },
46450
+ sort: { type: "string", description: "Optional: field to sort by." },
46451
+ order: { type: "string", description: "Optional: sort direction." }
46440
46452
  },
46441
46453
  required: ["tableId"]
46442
46454
  },
46443
46455
  http: {
46444
46456
  method: "GET",
46445
- path_template: "/api/v1/tables/{tableId}/rows",
46457
+ path_template: "/api/v3/leads/lists/{tableId}/rows",
46446
46458
  query_template: {
46447
- page: "{page}",
46448
- pageSize: "{pageSize}",
46449
- columns: "{columns}",
46450
- filters: "{filters}",
46451
- sort: "{sort}"
46459
+ cursor: "{cursor}",
46460
+ limit: "{limit}",
46461
+ ids: "{ids}",
46462
+ min_relevance_score: "{min_relevance_score}",
46463
+ sort: "{sort}",
46464
+ order: "{order}"
46452
46465
  }
46453
46466
  }
46454
46467
  },
46455
46468
  {
46456
46469
  name: "submit_enrichment",
46457
- description: "Insert raw rows into an enrichment table (v1). Returns a batchId immediately - poll poll_batch for progress + enriched results. Consumes credits per row; requires reviewer approval.",
46470
+ description: "Add or update rows in a lead list and enrich them. Rows matching `match_columns` are updated, others are added. Returns an embedded `enrichment_job`: poll its id with poll_batch. CONSUMES CREDITS per row. Max 100 rows per call.",
46458
46471
  risk_tier: "Medium",
46459
46472
  input_schema: {
46460
46473
  type: "object",
46461
46474
  properties: {
46462
- tableId: { type: "string", minLength: 1, description: "Target table id from list_tables." },
46475
+ tableId: { type: "string", minLength: 1, description: "Target list id from list_tables." },
46463
46476
  rows: {
46464
46477
  type: "array",
46465
46478
  minItems: 1,
46466
46479
  maxItems: 100,
46467
46480
  items: { type: "object" },
46468
- description: "Array of input-column rows (keys are input column slugs from list_tables). Max 100 per call."
46481
+ description: "Array of rows, keyed by column slug. Max 100."
46482
+ },
46483
+ match_columns: {
46484
+ type: "array",
46485
+ minItems: 1,
46486
+ maxItems: 10,
46487
+ items: { type: "string", minLength: 1 },
46488
+ description: 'Column slugs that identify an existing row, for example ["domain"].'
46469
46489
  }
46470
46490
  },
46471
- required: ["tableId", "rows"]
46491
+ required: ["tableId", "rows", "match_columns"]
46472
46492
  },
46473
46493
  http: {
46474
46494
  method: "POST",
46475
- path_template: "/api/v1/tables/{tableId}/rows",
46476
- body_template: { rows: "{rows}" }
46495
+ path_template: "/api/v3/leads/lists/{tableId}/rows/upsert",
46496
+ // enrich is fixed on: this tool has always meant "insert and enrich".
46497
+ body_template: { rows: "{rows}", match_columns: "{match_columns}", enrich: true }
46477
46498
  }
46478
46499
  },
46479
46500
  {
46480
46501
  name: "poll_batch",
46481
- description: "Poll a v1 enrichment batch for status + enriched results. Docs recommend 2-5s intervals for fast results, 30-60s for background processing. status is processing | complete | errored.",
46502
+ description: "Read an enrichment job for status and results. Honor `next_poll_at`. A job stays running until enrichment is done, so `succeeded` means the counts are final. Ids from before the move to the v3 API will not be found.",
46482
46503
  risk_tier: "Low",
46483
46504
  input_schema: {
46484
46505
  type: "object",
46485
46506
  properties: {
46486
- batchId: { type: "string", minLength: 1, description: "Batch id returned by submit_enrichment." }
46507
+ batchId: { type: "string", minLength: 1, description: "The job id from the `enrichment_job` submit_enrichment returned." }
46487
46508
  },
46488
46509
  required: ["batchId"]
46489
46510
  },
46490
- http: { method: "GET", path_template: "/api/v1/batches/{batchId}" }
46511
+ http: { method: "GET", path_template: "/api/v3/jobs/{batchId}" }
46491
46512
  },
46492
46513
  {
46493
46514
  name: "get_credit_balance",
46494
- description: "Return the org credit balance ({ balance, currency }). Use to budget enrichment volume / agent runs before any credit-consuming call.",
46515
+ description: "Return the credit wallet balance. Use to budget enrichment volume before a credit-consuming call. The wallet is shared across the parent org, even for a project.",
46495
46516
  risk_tier: "Low",
46496
46517
  input_schema: { type: "object", properties: {} },
46497
- http: { method: "GET", path_template: "/api/v1/credits" }
46518
+ http: { method: "GET", path_template: "/api/v3/account/credits" }
46498
46519
  },
46499
46520
  // ==========================================================================
46500
46521
  // v2 AGENT PLANE
@@ -46658,21 +46679,16 @@ var ORG_SCOPED_TOOLS = [
46658
46679
  },
46659
46680
  {
46660
46681
  name: "get_table",
46661
- description: 'Get a v2 table: name, leadCount, columns, lifetime credits, and cell liveness. Pass include=stats for economics (creditsPerLead, qualification, funnel, lead sources). For programmatic row reads use the v1 read path. cells.running > 0 means enrichment is still in flight - do not conclude "no data" yet.',
46682
+ description: "Get one lead list: its name, columns and status.",
46662
46683
  risk_tier: "Low",
46663
46684
  input_schema: {
46664
46685
  type: "object",
46665
46686
  properties: {
46666
- tableId: { type: "string", minLength: 1, description: "Table id (uuid)." },
46667
- include: { type: "string", description: 'Optional: pass "stats" to attach the economics block.' }
46687
+ tableId: { type: "string", minLength: 1, description: "List id (uuid)." }
46668
46688
  },
46669
46689
  required: ["tableId"]
46670
46690
  },
46671
- http: {
46672
- method: "GET",
46673
- path_template: "/api/v2/tables/{tableId}",
46674
- query_template: { include: "{include}" }
46675
- }
46691
+ http: { method: "GET", path_template: "/api/v3/leads/lists/{tableId}" }
46676
46692
  },
46677
46693
  {
46678
46694
  name: "list_agent_tables",
@@ -46696,39 +46712,41 @@ var ORG_SCOPED_TOOLS = [
46696
46712
  var PROJECT_TOOLS = [
46697
46713
  {
46698
46714
  name: "list_projects",
46699
- description: "List the projects (child orgs) under the API key's parent org, newest first. Use this to discover the project id to pass as `project_id` on any other tool - without it every call resolves against the parent org, so a project's agents and tables are invisible. Cursor-paginated: pass the previous response's `nextCursor` as `cursor`; `nextCursor: null` means the last page. Optional `search` is a case-insensitive substring match on project name. Returns { object, items[{ id, name, monthlyCredits, usage{spent,reserved}, createdAt }], nextCursor }. Always acts on the parent org - `project_id` is not accepted here.",
46715
+ description: "List the projects (child orgs) under the API key's parent org. Use this to discover a project id. Returns { items, next_cursor }.",
46700
46716
  risk_tier: "Low",
46701
46717
  input_schema: {
46702
46718
  type: "object",
46703
46719
  properties: {
46704
- cursor: { type: "string", description: "Opaque pagination cursor - the `nextCursor` from a previous page. Omit for the first page." },
46705
- limit: { type: "integer", minimum: 1, maximum: 100, description: "Projects per page. Default 50, max 100." },
46706
- search: { type: "string", description: "Optional case-insensitive substring match on project name." }
46720
+ cursor: { type: "string", description: "Opaque cursor: the `next_cursor` from a previous page." },
46721
+ limit: { type: "integer", minimum: 1, maximum: 100, description: "Projects per page. Max 100." }
46707
46722
  }
46708
46723
  },
46709
46724
  http: {
46710
46725
  method: "GET",
46711
- path_template: "/api/v2/projects",
46712
- query_template: { cursor: "{cursor}", limit: "{limit}", search: "{search}" }
46726
+ path_template: "/api/v3/account/projects",
46727
+ query_template: { cursor: "{cursor}", limit: "{limit}" }
46713
46728
  }
46714
46729
  },
46715
46730
  {
46716
46731
  name: "get_project",
46717
- description: "Fetch a single project (child org) by id: name, optional monthlyCredits budget cap, current-period usage { spent, reserved } and createdAt. Use it to confirm a project id before scoping calls to it, or to check its remaining budget. Always acts on the parent org - `project_id` is not accepted here.",
46732
+ description: "Fetch one project (child org) by id: its name, optional monthly credit cap and usage.",
46718
46733
  risk_tier: "Low",
46719
46734
  input_schema: {
46720
46735
  type: "object",
46721
46736
  properties: {
46722
- projectId: { type: "string", minLength: 1, description: "The project (child org) id (uuid), from list_projects." }
46737
+ projectId: { type: "string", minLength: 1, description: "The project id (uuid), from list_projects." }
46723
46738
  },
46724
46739
  required: ["projectId"]
46725
46740
  },
46726
- http: { method: "GET", path_template: "/api/v2/projects/{projectId}" }
46741
+ http: { method: "GET", path_template: "/api/v3/account/projects/{projectId}" }
46727
46742
  }
46728
46743
  ];
46744
+ var NEEDS_CUSTOMER_KEY_NOTE = " Needs a customer-supplied Origami key: on a platform-managed install this returns 403.";
46745
+ var REACHABLE_WITH_BOUND_KEY_PREFIXES = ["/api/v3/leads/", "/api/v3/jobs/"];
46746
+ var withCustomerKeyNote = (tool) => REACHABLE_WITH_BOUND_KEY_PREFIXES.some((prefix) => tool.http.path_template.startsWith(prefix)) ? tool : { ...tool, description: `${tool.description}${NEEDS_CUSTOMER_KEY_NOTE}` };
46729
46747
  var ORIGAMI_TOOLS = [
46730
- ...ORG_SCOPED_TOOLS.map(withProjectScoping),
46731
- ...PROJECT_TOOLS
46748
+ ...ORG_SCOPED_TOOLS.map(withProjectScoping).map(withCustomerKeyNote),
46749
+ ...PROJECT_TOOLS.map(withCustomerKeyNote)
46732
46750
  ];
46733
46751
 
46734
46752
  // src/server.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1186",
3
+ "version": "0.28.1188",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {