autotouch-cli 0.2.114__tar.gz → 0.2.115__tar.gz
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.
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/PKG-INFO +6 -6
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/README.md +5 -5
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/cli.py +19 -0
- autotouch_cli-0.2.115/autotouch_cli/commands/capacity.py +308 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/data/CLI_REFERENCE.md +127 -1
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/data/cli-manifest.json +798 -1
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/parser.py +12 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/templates.py +4 -2
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli.egg-info/PKG-INFO +6 -6
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli.egg-info/SOURCES.txt +1 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/pyproject.toml +1 -1
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/MANIFEST.in +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/__init__.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/cli_contracts.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/__init__.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/agents.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/auth.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/cells.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/columns.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/integrations.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/jobs.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/leads.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/linkedin.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/list_build.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/outreach.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/prompts.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/rows.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/search.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/sender_accounts.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/sequences.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/tables.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/tasks.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/webhooks.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/commands/workspace_secrets.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/core/__init__.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/core/auth.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/core/config.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/core/csv_import.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/core/http.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/core/io.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/core/output.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/core/polling.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/core/run.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/core/validation.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/exceptions.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/mongo_status.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/parser_groups.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/sequence_support.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/workflows/__init__.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli/workflows/registry.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli.egg-info/dependency_links.txt +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli.egg-info/entry_points.txt +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli.egg-info/requires.txt +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_cli.egg-info/top_level.txt +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_shared/__init__.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_shared/linkedin_contract.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_shared/linkedin_filters.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_shared/list_build_contract.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_shared/product_lifecycle.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_shared/provider_registry.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/autotouch_shared/search_contract.py +0 -0
- {autotouch_cli-0.2.114 → autotouch_cli-0.2.115}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: autotouch-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.115
|
|
4
4
|
Summary: Autotouch Smart Table CLI
|
|
5
5
|
Project-URL: Homepage, https://app.autotouch.ai
|
|
6
6
|
Project-URL: Documentation, https://github.com/nicolonic/autotouch_main/tree/main/docs/research-table/reference
|
|
@@ -52,11 +52,11 @@ Smart Table is the operating layer. Most workflows should land records there bef
|
|
|
52
52
|
Released package:
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
pipx install autotouch-cli
|
|
55
|
+
pipx install --force autotouch-cli
|
|
56
56
|
# or
|
|
57
|
-
pip install autotouch-cli
|
|
57
|
+
python -m pip install autotouch-cli
|
|
58
58
|
# upgrade
|
|
59
|
-
pip install -U autotouch-cli
|
|
59
|
+
python -m pip install -U autotouch-cli
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Unreleased branch or pre-publish build:
|
|
@@ -193,7 +193,7 @@ Keep `requiredVariables` limited to variables that the sequence actually needs.
|
|
|
193
193
|
|
|
194
194
|
Version guard:
|
|
195
195
|
|
|
196
|
-
- Use `autotouch --version` before relying on recipe defaults. This repo expects `autotouch-cli` `0.2.
|
|
196
|
+
- Use `autotouch --version` before relying on recipe defaults. This repo expects `autotouch-cli` `0.2.115` or newer.
|
|
197
197
|
- If `python3 -m pip install -U autotouch-cli` upgrades the package but `which autotouch` still points at an older shim, run the upgraded binary directly or fix PATH before creating production sequences.
|
|
198
198
|
- Before authoring a LinkedIn sequence, inspect the live recipe:
|
|
199
199
|
|
|
@@ -322,7 +322,7 @@ For automation or agent-driven setup, use:
|
|
|
322
322
|
- `autotouch cli-manifest --output json` for the local machine-readable command contract
|
|
323
323
|
- `autotouch cli-reference` for the shipped parser-generated reference
|
|
324
324
|
- `autotouch capabilities --output json` for provider/workflow contracts
|
|
325
|
-
- `autotouch --version` should be `0.2.
|
|
325
|
+
- `autotouch --version` should be `0.2.115` or newer for structured company list builds without user-supplied keywords, stored list-build input lookup, research-workspace list-build guidance, the cleaned single LinkedIn-sourced list-build path, Exa Company Search up to 100 results, scheduled agent `--target ACCOUNTS|LEADS`, `agents signals --target`, the `agent-to-sequence` and `agent-to-leads` workflow scaffolds, paced HTTP Request column contracts, branch-aware LinkedIn sequence recipes, `LINKEDIN_MESSAGE` best-available delivery versus `LINKEDIN_CHAT_MESSAGE` chat-only guidance, sequence campaign intake guards before mutating objects, real agent soft-delete with associated-table handling, research-table sequence handoff assignee and active-sequence-conflict guard config, backend-owned directional source/destination helpers, goal-level workflow plans, website visitor/external intent webhook workflow guidance, create-time agent assignment defaults, company-page signal configuration guidance, sequence authoring warnings when AI draft is mixed with fixed templates, sender-account discovery/management for explicit sequence routing, mixed parent-row/child-list Sync to Table and Sync to Leads recipe configs, and company variable guidance for `company_name_clean` versus internal match keys
|
|
326
326
|
- `autotouch capabilities --output json --select list_builds` for documented list-build inputs such as geography IDs, company size buckets, profile language, and company IDs
|
|
327
327
|
- `autotouch integrations list` and `autotouch integrations status --provider <provider>` before choosing source/destination workflows
|
|
328
328
|
- `autotouch workflows plan --type bulk-outreach` and `autotouch workflows scaffold --type bulk-outreach --out-dir workflow` for goal-level workflow planning
|
|
@@ -27,11 +27,11 @@ Smart Table is the operating layer. Most workflows should land records there bef
|
|
|
27
27
|
Released package:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
pipx install autotouch-cli
|
|
30
|
+
pipx install --force autotouch-cli
|
|
31
31
|
# or
|
|
32
|
-
pip install autotouch-cli
|
|
32
|
+
python -m pip install autotouch-cli
|
|
33
33
|
# upgrade
|
|
34
|
-
pip install -U autotouch-cli
|
|
34
|
+
python -m pip install -U autotouch-cli
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
Unreleased branch or pre-publish build:
|
|
@@ -168,7 +168,7 @@ Keep `requiredVariables` limited to variables that the sequence actually needs.
|
|
|
168
168
|
|
|
169
169
|
Version guard:
|
|
170
170
|
|
|
171
|
-
- Use `autotouch --version` before relying on recipe defaults. This repo expects `autotouch-cli` `0.2.
|
|
171
|
+
- Use `autotouch --version` before relying on recipe defaults. This repo expects `autotouch-cli` `0.2.115` or newer.
|
|
172
172
|
- If `python3 -m pip install -U autotouch-cli` upgrades the package but `which autotouch` still points at an older shim, run the upgraded binary directly or fix PATH before creating production sequences.
|
|
173
173
|
- Before authoring a LinkedIn sequence, inspect the live recipe:
|
|
174
174
|
|
|
@@ -297,7 +297,7 @@ For automation or agent-driven setup, use:
|
|
|
297
297
|
- `autotouch cli-manifest --output json` for the local machine-readable command contract
|
|
298
298
|
- `autotouch cli-reference` for the shipped parser-generated reference
|
|
299
299
|
- `autotouch capabilities --output json` for provider/workflow contracts
|
|
300
|
-
- `autotouch --version` should be `0.2.
|
|
300
|
+
- `autotouch --version` should be `0.2.115` or newer for structured company list builds without user-supplied keywords, stored list-build input lookup, research-workspace list-build guidance, the cleaned single LinkedIn-sourced list-build path, Exa Company Search up to 100 results, scheduled agent `--target ACCOUNTS|LEADS`, `agents signals --target`, the `agent-to-sequence` and `agent-to-leads` workflow scaffolds, paced HTTP Request column contracts, branch-aware LinkedIn sequence recipes, `LINKEDIN_MESSAGE` best-available delivery versus `LINKEDIN_CHAT_MESSAGE` chat-only guidance, sequence campaign intake guards before mutating objects, real agent soft-delete with associated-table handling, research-table sequence handoff assignee and active-sequence-conflict guard config, backend-owned directional source/destination helpers, goal-level workflow plans, website visitor/external intent webhook workflow guidance, create-time agent assignment defaults, company-page signal configuration guidance, sequence authoring warnings when AI draft is mixed with fixed templates, sender-account discovery/management for explicit sequence routing, mixed parent-row/child-list Sync to Table and Sync to Leads recipe configs, and company variable guidance for `company_name_clean` versus internal match keys
|
|
301
301
|
- `autotouch capabilities --output json --select list_builds` for documented list-build inputs such as geography IDs, company size buckets, profile language, and company IDs
|
|
302
302
|
- `autotouch integrations list` and `autotouch integrations status --provider <provider>` before choosing source/destination workflows
|
|
303
303
|
- `autotouch workflows plan --type bulk-outreach` and `autotouch workflows scaffold --type bulk-outreach --out-dir workflow` for goal-level workflow planning
|
|
@@ -71,6 +71,12 @@ from autotouch_cli.commands.auth import (
|
|
|
71
71
|
cmd_auth_show as cmd_auth_show_impl,
|
|
72
72
|
cmd_auth_whoami as cmd_auth_whoami_impl,
|
|
73
73
|
)
|
|
74
|
+
from autotouch_cli.commands.capacity import (
|
|
75
|
+
CapacityCommandRuntime as CapacityCommandHandlerRuntime,
|
|
76
|
+
cmd_capacity_channels as cmd_capacity_channels_impl,
|
|
77
|
+
cmd_capacity_overview as cmd_capacity_overview_impl,
|
|
78
|
+
cmd_capacity_recommend as cmd_capacity_recommend_impl,
|
|
79
|
+
)
|
|
74
80
|
from autotouch_cli.commands.jobs import (
|
|
75
81
|
JobCommandRuntime as JobCommandHandlerRuntime,
|
|
76
82
|
cmd_jobs_get as cmd_jobs_get_impl,
|
|
@@ -1349,6 +1355,14 @@ def _prompt_command_runtime() -> PromptCommandHandlerRuntime:
|
|
|
1349
1355
|
)
|
|
1350
1356
|
|
|
1351
1357
|
|
|
1358
|
+
def _capacity_command_runtime() -> CapacityCommandHandlerRuntime:
|
|
1359
|
+
return CapacityCommandHandlerRuntime(
|
|
1360
|
+
resolve_token=_resolve_token,
|
|
1361
|
+
request_api=_request_api,
|
|
1362
|
+
print_json=lambda data, compact=False: _print_json(data, compact=compact),
|
|
1363
|
+
)
|
|
1364
|
+
|
|
1365
|
+
|
|
1352
1366
|
def _workspace_secret_command_runtime() -> WorkspaceSecretCommandHandlerRuntime:
|
|
1353
1367
|
return WorkspaceSecretCommandHandlerRuntime(
|
|
1354
1368
|
resolve_token=_resolve_token,
|
|
@@ -1490,6 +1504,11 @@ _register("prompts_create", cmd_prompts_create_impl, _prompt_command_runtime)
|
|
|
1490
1504
|
_register("prompts_update", cmd_prompts_update_impl, _prompt_command_runtime)
|
|
1491
1505
|
_register("prompts_delete", cmd_prompts_delete_impl, _prompt_command_runtime)
|
|
1492
1506
|
|
|
1507
|
+
# -- Capacity commands --
|
|
1508
|
+
_register("capacity_overview", cmd_capacity_overview_impl, _capacity_command_runtime)
|
|
1509
|
+
_register("capacity_channels", cmd_capacity_channels_impl, _capacity_command_runtime)
|
|
1510
|
+
_register("capacity_recommend", cmd_capacity_recommend_impl, _capacity_command_runtime)
|
|
1511
|
+
|
|
1493
1512
|
# -- Workspace secrets commands --
|
|
1494
1513
|
_register("workspace_secrets_list", cmd_workspace_secrets_list_impl, _workspace_secret_command_runtime)
|
|
1495
1514
|
_register("workspace_secrets_set", cmd_workspace_secrets_set_impl, _workspace_secret_command_runtime)
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
from typing import Any, Callable, Dict, List, Optional
|
|
6
|
+
|
|
7
|
+
from autotouch_cli.exceptions import AutotouchInputError
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass(frozen=True)
|
|
11
|
+
class CapacityCommandRuntime:
|
|
12
|
+
resolve_token: Callable[[Optional[str], bool], Optional[str]]
|
|
13
|
+
request_api: Callable[..., Any]
|
|
14
|
+
print_json: Callable[[Any, bool], None]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _overview_params(args: argparse.Namespace) -> Dict[str, Any]:
|
|
18
|
+
scope = str(getattr(args, "scope", "org") or "org")
|
|
19
|
+
params: Dict[str, Any] = {
|
|
20
|
+
"surface": str(getattr(args, "surface", "admin_command_center") or "admin_command_center"),
|
|
21
|
+
"scope": scope,
|
|
22
|
+
}
|
|
23
|
+
user_id = str(getattr(args, "user_id", "") or "").strip()
|
|
24
|
+
user_email = str(getattr(args, "user_email", "") or "").strip()
|
|
25
|
+
if (user_id or user_email) and scope != "me":
|
|
26
|
+
raise AutotouchInputError("--user-id and --user-email require --scope me")
|
|
27
|
+
if user_id:
|
|
28
|
+
params["user_id"] = user_id
|
|
29
|
+
if user_email:
|
|
30
|
+
params["user_email"] = user_email
|
|
31
|
+
date = str(getattr(args, "date", "") or "").strip()
|
|
32
|
+
if date:
|
|
33
|
+
params["date"] = date
|
|
34
|
+
timezone = str(getattr(args, "timezone", "") or "").strip()
|
|
35
|
+
if timezone:
|
|
36
|
+
params["timezone"] = timezone
|
|
37
|
+
return params
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _fetch_overview(args: argparse.Namespace, *, runtime: CapacityCommandRuntime) -> Dict[str, Any]:
|
|
41
|
+
token = runtime.resolve_token(args.token, required=True)
|
|
42
|
+
data = runtime.request_api(
|
|
43
|
+
"GET",
|
|
44
|
+
"/api/command-center/overview",
|
|
45
|
+
base_url=args.base_url,
|
|
46
|
+
token=token,
|
|
47
|
+
use_x_api_key=args.use_x_api_key,
|
|
48
|
+
params=_overview_params(args),
|
|
49
|
+
timeout=args.timeout,
|
|
50
|
+
verbose=args.verbose,
|
|
51
|
+
)
|
|
52
|
+
if not isinstance(data, dict):
|
|
53
|
+
raise AutotouchInputError("command center overview response must be a JSON object")
|
|
54
|
+
if data.get("error"):
|
|
55
|
+
raise AutotouchInputError(f"command center overview unavailable: {data.get('error')}")
|
|
56
|
+
if not isinstance(data.get("capacity"), dict):
|
|
57
|
+
raise AutotouchInputError("command center overview response is missing capacity")
|
|
58
|
+
return data
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _capacity(data: Dict[str, Any]) -> Dict[str, Any]:
|
|
62
|
+
capacity = data.get("capacity")
|
|
63
|
+
return capacity if isinstance(capacity, dict) else {}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _channels(data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
|
67
|
+
channels = _capacity(data).get("channels")
|
|
68
|
+
return [channel for channel in channels if isinstance(channel, dict)] if isinstance(channels, list) else []
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _channel_summary(channel: Dict[str, Any]) -> Dict[str, Any]:
|
|
72
|
+
blockers = channel.get("blockers") if isinstance(channel.get("blockers"), list) else []
|
|
73
|
+
accounts = channel.get("accounts") if isinstance(channel.get("accounts"), list) else []
|
|
74
|
+
lanes = channel.get("lanes") if isinstance(channel.get("lanes"), list) else []
|
|
75
|
+
output = {
|
|
76
|
+
"id": channel.get("id"),
|
|
77
|
+
"label": channel.get("label"),
|
|
78
|
+
"model": channel.get("model"),
|
|
79
|
+
"visible": bool(channel.get("visible")),
|
|
80
|
+
"configured": bool(channel.get("configured")),
|
|
81
|
+
"status": channel.get("status"),
|
|
82
|
+
"used": channel.get("used"),
|
|
83
|
+
"planned": channel.get("planned"),
|
|
84
|
+
"limit": channel.get("limit"),
|
|
85
|
+
"remaining": channel.get("remaining"),
|
|
86
|
+
"utilizationPct": channel.get("utilizationPct"),
|
|
87
|
+
"blockerCount": sum(int(blocker.get("count") or 1) for blocker in blockers if isinstance(blocker, dict)),
|
|
88
|
+
"accountCount": len(accounts),
|
|
89
|
+
"laneCount": len(lanes),
|
|
90
|
+
}
|
|
91
|
+
if channel.get("estimated") is not None:
|
|
92
|
+
output["estimated"] = bool(channel.get("estimated"))
|
|
93
|
+
if blockers:
|
|
94
|
+
output["blockers"] = blockers
|
|
95
|
+
notes = channel.get("notes")
|
|
96
|
+
if isinstance(notes, list) and notes:
|
|
97
|
+
output["notes"] = notes
|
|
98
|
+
return output
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _priority_actions(data: Dict[str, Any]) -> Dict[str, Any]:
|
|
102
|
+
summary = _capacity(data).get("summary")
|
|
103
|
+
if not isinstance(summary, dict):
|
|
104
|
+
return {}
|
|
105
|
+
priority = summary.get("priorityActions")
|
|
106
|
+
return priority if isinstance(priority, dict) else {}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def _add_recommendation(
|
|
110
|
+
recommendations: List[Dict[str, Any]],
|
|
111
|
+
*,
|
|
112
|
+
action: str,
|
|
113
|
+
priority: str,
|
|
114
|
+
message: str,
|
|
115
|
+
evidence: Dict[str, Any],
|
|
116
|
+
next_commands: Optional[List[str]] = None,
|
|
117
|
+
) -> None:
|
|
118
|
+
recommendations.append(
|
|
119
|
+
{
|
|
120
|
+
"action": action,
|
|
121
|
+
"priority": priority,
|
|
122
|
+
"message": message,
|
|
123
|
+
"evidence": evidence,
|
|
124
|
+
"nextCommands": next_commands or [],
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def _recommendations(data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
|
130
|
+
recommendations: List[Dict[str, Any]] = []
|
|
131
|
+
priority = _priority_actions(data)
|
|
132
|
+
review_tasks = int(priority.get("reviewTasks") or 0)
|
|
133
|
+
if review_tasks > 0:
|
|
134
|
+
_add_recommendation(
|
|
135
|
+
recommendations,
|
|
136
|
+
action="review_tasks",
|
|
137
|
+
priority="high",
|
|
138
|
+
message=f"Review {review_tasks} queued task(s) before adding more work.",
|
|
139
|
+
evidence={"priorityActions": priority},
|
|
140
|
+
next_commands=[
|
|
141
|
+
"autotouch tasks query --output json",
|
|
142
|
+
"autotouch tasks count --output json",
|
|
143
|
+
],
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
for channel in _channels(data):
|
|
147
|
+
channel_id = str(channel.get("id") or "")
|
|
148
|
+
label = str(channel.get("label") or channel_id or "Channel")
|
|
149
|
+
status = str(channel.get("status") or "unknown")
|
|
150
|
+
remaining = int(channel.get("remaining") or 0)
|
|
151
|
+
planned = int(channel.get("planned") or 0)
|
|
152
|
+
limit = int(channel.get("limit") or 0)
|
|
153
|
+
used = int(channel.get("used") or 0)
|
|
154
|
+
blockers = channel.get("blockers") if isinstance(channel.get("blockers"), list) else []
|
|
155
|
+
configured = bool(channel.get("configured"))
|
|
156
|
+
visible = bool(channel.get("visible"))
|
|
157
|
+
evidence = {
|
|
158
|
+
"channel": channel_id,
|
|
159
|
+
"status": status,
|
|
160
|
+
"used": used,
|
|
161
|
+
"planned": planned,
|
|
162
|
+
"limit": limit,
|
|
163
|
+
"remaining": remaining,
|
|
164
|
+
"blockers": blockers,
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if not configured and visible:
|
|
168
|
+
_add_recommendation(
|
|
169
|
+
recommendations,
|
|
170
|
+
action="connect_capacity",
|
|
171
|
+
priority="high",
|
|
172
|
+
message=f"{label} has demand but no configured capacity.",
|
|
173
|
+
evidence=evidence,
|
|
174
|
+
)
|
|
175
|
+
continue
|
|
176
|
+
if blockers:
|
|
177
|
+
_add_recommendation(
|
|
178
|
+
recommendations,
|
|
179
|
+
action="fix_blockers",
|
|
180
|
+
priority="high",
|
|
181
|
+
message=f"{label} has blocker(s) that should be resolved before scaling more work.",
|
|
182
|
+
evidence=evidence,
|
|
183
|
+
)
|
|
184
|
+
continue
|
|
185
|
+
if limit > 0 and remaining <= 0:
|
|
186
|
+
_add_recommendation(
|
|
187
|
+
recommendations,
|
|
188
|
+
action="wait_or_add_capacity",
|
|
189
|
+
priority="medium",
|
|
190
|
+
message=f"{label} is at capacity for the selected window.",
|
|
191
|
+
evidence=evidence,
|
|
192
|
+
)
|
|
193
|
+
continue
|
|
194
|
+
if limit > 0 and planned == 0 and remaining > 0 and configured:
|
|
195
|
+
_add_recommendation(
|
|
196
|
+
recommendations,
|
|
197
|
+
action="add_or_prioritize_work",
|
|
198
|
+
priority="medium",
|
|
199
|
+
message=f"{label} has unused capacity; add eligible leads/tasks or prioritize existing work.",
|
|
200
|
+
evidence=evidence,
|
|
201
|
+
)
|
|
202
|
+
continue
|
|
203
|
+
|
|
204
|
+
if not recommendations:
|
|
205
|
+
_add_recommendation(
|
|
206
|
+
recommendations,
|
|
207
|
+
action="monitor",
|
|
208
|
+
priority="low",
|
|
209
|
+
message="No immediate capacity blocker was found in the selected scope.",
|
|
210
|
+
evidence={"summary": _capacity(data).get("summary") or {}},
|
|
211
|
+
)
|
|
212
|
+
return recommendations
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
def _capacity_metadata(data: Dict[str, Any]) -> Dict[str, Any]:
|
|
216
|
+
capacity = _capacity(data)
|
|
217
|
+
return {
|
|
218
|
+
"organizationId": data.get("organizationId"),
|
|
219
|
+
"generatedAt": data.get("generatedAt"),
|
|
220
|
+
"surface": data.get("surface"),
|
|
221
|
+
"scope": data.get("scope"),
|
|
222
|
+
"date": data.get("date"),
|
|
223
|
+
"timezone": data.get("timezone"),
|
|
224
|
+
"window": capacity.get("window") if isinstance(capacity.get("window"), dict) else None,
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def cmd_capacity_overview(args: argparse.Namespace, *, runtime: CapacityCommandRuntime) -> None:
|
|
229
|
+
runtime.print_json(_fetch_overview(args, runtime=runtime), args.compact)
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def cmd_capacity_channels(args: argparse.Namespace, *, runtime: CapacityCommandRuntime) -> None:
|
|
233
|
+
data = _fetch_overview(args, runtime=runtime)
|
|
234
|
+
output = {
|
|
235
|
+
**_capacity_metadata(data),
|
|
236
|
+
"summary": _capacity(data).get("summary") or {},
|
|
237
|
+
"channels": [_channel_summary(channel) for channel in _channels(data)],
|
|
238
|
+
}
|
|
239
|
+
if getattr(args, "include_details", False):
|
|
240
|
+
output["details"] = {"channels": _channels(data)}
|
|
241
|
+
runtime.print_json(output, args.compact)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def cmd_capacity_recommend(args: argparse.Namespace, *, runtime: CapacityCommandRuntime) -> None:
|
|
245
|
+
data = _fetch_overview(args, runtime=runtime)
|
|
246
|
+
output = {
|
|
247
|
+
**_capacity_metadata(data),
|
|
248
|
+
"source": "command_center_overview",
|
|
249
|
+
"scopeNote": "Capacity-only recommendation. Pair with lead/table/task inspection when deciding exactly what to build next.",
|
|
250
|
+
"summary": _capacity(data).get("summary") or {},
|
|
251
|
+
"recommendations": _recommendations(data),
|
|
252
|
+
"channels": [_channel_summary(channel) for channel in _channels(data)],
|
|
253
|
+
}
|
|
254
|
+
runtime.print_json(output, args.compact)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
def _add_capacity_common_arguments(parser: argparse.ArgumentParser) -> None:
|
|
258
|
+
parser.add_argument("--scope", choices=["org", "me"], default="org", help="Capacity scope (default: org)")
|
|
259
|
+
parser.add_argument("--user-id", help="Target org user id for --scope me")
|
|
260
|
+
parser.add_argument("--user-email", help="Target org user email for --scope me")
|
|
261
|
+
parser.add_argument(
|
|
262
|
+
"--surface",
|
|
263
|
+
choices=["admin_command_center", "sales_home"],
|
|
264
|
+
default="admin_command_center",
|
|
265
|
+
help="Command Center surface model to read",
|
|
266
|
+
)
|
|
267
|
+
parser.add_argument("--date", help="Capacity date in YYYY-MM-DD; default is today in the requested timezone")
|
|
268
|
+
parser.add_argument("--timezone", help="IANA timezone for the date window, for example America/New_York")
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
def register_capacity_subcommands(
|
|
272
|
+
subparsers: argparse._SubParsersAction[argparse.ArgumentParser],
|
|
273
|
+
*,
|
|
274
|
+
add_api_common_arguments: Callable[[argparse.ArgumentParser], None],
|
|
275
|
+
handlers: Dict[str, Callable[[argparse.Namespace], None]],
|
|
276
|
+
) -> None:
|
|
277
|
+
parser = subparsers.add_parser(
|
|
278
|
+
"capacity",
|
|
279
|
+
help="Inspect sender and task capacity",
|
|
280
|
+
description=(
|
|
281
|
+
"Read the backend-owned Command Center capacity model for LinkedIn, provider email, "
|
|
282
|
+
"personal email, and calls. These commands are read-only and require the tasks:read "
|
|
283
|
+
"developer-key scope."
|
|
284
|
+
),
|
|
285
|
+
)
|
|
286
|
+
parser._codex_examples = [
|
|
287
|
+
"autotouch capacity overview --scope org --output json",
|
|
288
|
+
"autotouch capacity channels --scope me --output json",
|
|
289
|
+
"autotouch capacity overview --scope me --user-email rep@example.com --output json",
|
|
290
|
+
"autotouch capacity recommend --scope org --output json",
|
|
291
|
+
]
|
|
292
|
+
capacity_sub = parser.add_subparsers(dest="capacity_cmd", required=True)
|
|
293
|
+
|
|
294
|
+
overview = capacity_sub.add_parser("overview", help="Return the full Command Center overview payload")
|
|
295
|
+
_add_capacity_common_arguments(overview)
|
|
296
|
+
add_api_common_arguments(overview)
|
|
297
|
+
overview.set_defaults(func=handlers["overview"])
|
|
298
|
+
|
|
299
|
+
channels = capacity_sub.add_parser("channels", help="Summarize channel capacity and blockers")
|
|
300
|
+
_add_capacity_common_arguments(channels)
|
|
301
|
+
channels.add_argument("--include-details", action="store_true", help="Also include raw channel details")
|
|
302
|
+
add_api_common_arguments(channels)
|
|
303
|
+
channels.set_defaults(func=handlers["channels"])
|
|
304
|
+
|
|
305
|
+
recommend = capacity_sub.add_parser("recommend", help="Recommend the next capacity action from current usage")
|
|
306
|
+
_add_capacity_common_arguments(recommend)
|
|
307
|
+
add_api_common_arguments(recommend)
|
|
308
|
+
recommend.set_defaults(func=handlers["recommend"])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Autotouch CLI Reference
|
|
2
2
|
|
|
3
|
-
Generated from the installed parser for `autotouch-cli` `0.2.
|
|
3
|
+
Generated from the installed parser for `autotouch-cli` `0.2.115`.
|
|
4
4
|
Manifest schema version: `2`.
|
|
5
5
|
|
|
6
6
|
## Output Modes
|
|
@@ -939,6 +939,132 @@ Get machine-readable API capabilities
|
|
|
939
939
|
- `--json-pointer` (kind=string): Extract a JSON pointer from the final result (for example: /id)
|
|
940
940
|
- `--verbose` (kind=boolean; when omitted=False; when present=True): Print request metadata to stderr
|
|
941
941
|
|
|
942
|
+
### `capacity`
|
|
943
|
+
|
|
944
|
+
#### `autotouch capacity`
|
|
945
|
+
|
|
946
|
+
Inspect sender and task capacity
|
|
947
|
+
|
|
948
|
+
Read the backend-owned Command Center capacity model for LinkedIn, provider email, personal email, and calls. These commands are read-only and require the tasks:read developer-key scope.
|
|
949
|
+
|
|
950
|
+
- Auth: `varies_by_subcommand`
|
|
951
|
+
- Stability: `stable`
|
|
952
|
+
- Destructive: `no`
|
|
953
|
+
- Subcommands: `overview, channels, recommend`
|
|
954
|
+
- Example:
|
|
955
|
+
- `autotouch capacity overview --scope org --output json`
|
|
956
|
+
- `autotouch capacity channels --scope me --output json`
|
|
957
|
+
- `autotouch capacity overview --scope me --user-email rep@example.com --output json`
|
|
958
|
+
- `autotouch capacity recommend --scope org --output json`
|
|
959
|
+
|
|
960
|
+
#### `autotouch capacity channels`
|
|
961
|
+
|
|
962
|
+
Summarize channel capacity and blockers
|
|
963
|
+
|
|
964
|
+
- Auth: `developer_key_or_user_session`
|
|
965
|
+
- Stability: `stable`
|
|
966
|
+
- Destructive: `no`
|
|
967
|
+
- Output modes: `json, ndjson, human`
|
|
968
|
+
- Example:
|
|
969
|
+
- `autotouch capacity channels [-h] [--scope {org,me}] [--user-id USER_ID]
|
|
970
|
+
[--user-email USER_EMAIL]
|
|
971
|
+
[--surface {admin_command_center,sales_home}]
|
|
972
|
+
[--date DATE] [--timezone TIMEZONE]
|
|
973
|
+
[--include-details] [--base-url BASE_URL]
|
|
974
|
+
[--token TOKEN] [--use-x-api-key]
|
|
975
|
+
[--timeout TIMEOUT]
|
|
976
|
+
[--output {json,ndjson,human}] [--compact]
|
|
977
|
+
[--select SELECT |
|
|
978
|
+
--json-pointer JSON_POINTER] [--verbose]`
|
|
979
|
+
- Options:
|
|
980
|
+
- `--scope` (kind=string; choices=org,me; default=org): Capacity scope (default: org)
|
|
981
|
+
- `--user-id` (kind=string): Target org user id for --scope me
|
|
982
|
+
- `--user-email` (kind=string): Target org user email for --scope me
|
|
983
|
+
- `--surface` (kind=string; choices=admin_command_center,sales_home; default=admin_command_center): Command Center surface model to read
|
|
984
|
+
- `--date` (kind=string): Capacity date in YYYY-MM-DD; default is today in the requested timezone
|
|
985
|
+
- `--timezone` (kind=string): IANA timezone for the date window, for example America/New_York
|
|
986
|
+
- `--include-details` (kind=boolean; when omitted=False; when present=True): Also include raw channel details
|
|
987
|
+
- `--base-url` (kind=string; default=https://app.autotouch.ai): API base URL (default: https://app.autotouch.ai)
|
|
988
|
+
- `--token` (kind=string; sensitive): Developer API key / JWT token
|
|
989
|
+
- `--use-x-api-key` (kind=boolean; when omitted=False; when present=True): Send token via X-API-Key header
|
|
990
|
+
- `--timeout` (kind=integer; default=30): HTTP timeout in seconds
|
|
991
|
+
- `--output` (kind=string; choices=json,ndjson,human; default=json): Output mode
|
|
992
|
+
- `--compact` (kind=boolean; when omitted=False; when present=True): Print compact JSON
|
|
993
|
+
- `--select` (kind=string): Extract a dotted field path from the final result (for example: id or items.0.id)
|
|
994
|
+
- `--json-pointer` (kind=string): Extract a JSON pointer from the final result (for example: /id)
|
|
995
|
+
- `--verbose` (kind=boolean; when omitted=False; when present=True): Print request metadata to stderr
|
|
996
|
+
|
|
997
|
+
#### `autotouch capacity overview`
|
|
998
|
+
|
|
999
|
+
Return the full Command Center overview payload
|
|
1000
|
+
|
|
1001
|
+
- Auth: `developer_key_or_user_session`
|
|
1002
|
+
- Stability: `stable`
|
|
1003
|
+
- Destructive: `no`
|
|
1004
|
+
- Output modes: `json, ndjson, human`
|
|
1005
|
+
- Example:
|
|
1006
|
+
- `autotouch capacity overview [-h] [--scope {org,me}] [--user-id USER_ID]
|
|
1007
|
+
[--user-email USER_EMAIL]
|
|
1008
|
+
[--surface {admin_command_center,sales_home}]
|
|
1009
|
+
[--date DATE] [--timezone TIMEZONE]
|
|
1010
|
+
[--base-url BASE_URL] [--token TOKEN]
|
|
1011
|
+
[--use-x-api-key] [--timeout TIMEOUT]
|
|
1012
|
+
[--output {json,ndjson,human}] [--compact]
|
|
1013
|
+
[--select SELECT |
|
|
1014
|
+
--json-pointer JSON_POINTER] [--verbose]`
|
|
1015
|
+
- Options:
|
|
1016
|
+
- `--scope` (kind=string; choices=org,me; default=org): Capacity scope (default: org)
|
|
1017
|
+
- `--user-id` (kind=string): Target org user id for --scope me
|
|
1018
|
+
- `--user-email` (kind=string): Target org user email for --scope me
|
|
1019
|
+
- `--surface` (kind=string; choices=admin_command_center,sales_home; default=admin_command_center): Command Center surface model to read
|
|
1020
|
+
- `--date` (kind=string): Capacity date in YYYY-MM-DD; default is today in the requested timezone
|
|
1021
|
+
- `--timezone` (kind=string): IANA timezone for the date window, for example America/New_York
|
|
1022
|
+
- `--base-url` (kind=string; default=https://app.autotouch.ai): API base URL (default: https://app.autotouch.ai)
|
|
1023
|
+
- `--token` (kind=string; sensitive): Developer API key / JWT token
|
|
1024
|
+
- `--use-x-api-key` (kind=boolean; when omitted=False; when present=True): Send token via X-API-Key header
|
|
1025
|
+
- `--timeout` (kind=integer; default=30): HTTP timeout in seconds
|
|
1026
|
+
- `--output` (kind=string; choices=json,ndjson,human; default=json): Output mode
|
|
1027
|
+
- `--compact` (kind=boolean; when omitted=False; when present=True): Print compact JSON
|
|
1028
|
+
- `--select` (kind=string): Extract a dotted field path from the final result (for example: id or items.0.id)
|
|
1029
|
+
- `--json-pointer` (kind=string): Extract a JSON pointer from the final result (for example: /id)
|
|
1030
|
+
- `--verbose` (kind=boolean; when omitted=False; when present=True): Print request metadata to stderr
|
|
1031
|
+
|
|
1032
|
+
#### `autotouch capacity recommend`
|
|
1033
|
+
|
|
1034
|
+
Recommend the next capacity action from current usage
|
|
1035
|
+
|
|
1036
|
+
- Auth: `developer_key_or_user_session`
|
|
1037
|
+
- Stability: `stable`
|
|
1038
|
+
- Destructive: `no`
|
|
1039
|
+
- Output modes: `json, ndjson, human`
|
|
1040
|
+
- Example:
|
|
1041
|
+
- `autotouch capacity recommend [-h] [--scope {org,me}]
|
|
1042
|
+
[--user-id USER_ID]
|
|
1043
|
+
[--user-email USER_EMAIL]
|
|
1044
|
+
[--surface {admin_command_center,sales_home}]
|
|
1045
|
+
[--date DATE] [--timezone TIMEZONE]
|
|
1046
|
+
[--base-url BASE_URL] [--token TOKEN]
|
|
1047
|
+
[--use-x-api-key] [--timeout TIMEOUT]
|
|
1048
|
+
[--output {json,ndjson,human}] [--compact]
|
|
1049
|
+
[--select SELECT |
|
|
1050
|
+
--json-pointer JSON_POINTER] [--verbose]`
|
|
1051
|
+
- Options:
|
|
1052
|
+
- `--scope` (kind=string; choices=org,me; default=org): Capacity scope (default: org)
|
|
1053
|
+
- `--user-id` (kind=string): Target org user id for --scope me
|
|
1054
|
+
- `--user-email` (kind=string): Target org user email for --scope me
|
|
1055
|
+
- `--surface` (kind=string; choices=admin_command_center,sales_home; default=admin_command_center): Command Center surface model to read
|
|
1056
|
+
- `--date` (kind=string): Capacity date in YYYY-MM-DD; default is today in the requested timezone
|
|
1057
|
+
- `--timezone` (kind=string): IANA timezone for the date window, for example America/New_York
|
|
1058
|
+
- `--base-url` (kind=string; default=https://app.autotouch.ai): API base URL (default: https://app.autotouch.ai)
|
|
1059
|
+
- `--token` (kind=string; sensitive): Developer API key / JWT token
|
|
1060
|
+
- `--use-x-api-key` (kind=boolean; when omitted=False; when present=True): Send token via X-API-Key header
|
|
1061
|
+
- `--timeout` (kind=integer; default=30): HTTP timeout in seconds
|
|
1062
|
+
- `--output` (kind=string; choices=json,ndjson,human; default=json): Output mode
|
|
1063
|
+
- `--compact` (kind=boolean; when omitted=False; when present=True): Print compact JSON
|
|
1064
|
+
- `--select` (kind=string): Extract a dotted field path from the final result (for example: id or items.0.id)
|
|
1065
|
+
- `--json-pointer` (kind=string): Extract a JSON pointer from the final result (for example: /id)
|
|
1066
|
+
- `--verbose` (kind=boolean; when omitted=False; when present=True): Print request metadata to stderr
|
|
1067
|
+
|
|
942
1068
|
### `cells`
|
|
943
1069
|
|
|
944
1070
|
#### `autotouch cells`
|