autotouch-cli 0.2.42__tar.gz → 0.2.44__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.42 → autotouch_cli-0.2.44}/PKG-INFO +5 -5
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/README.md +4 -4
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/cli.py +59 -0
- autotouch_cli-0.2.44/autotouch_cli/commands/prompts.py +240 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/data/CLI_REFERENCE.md +195 -1
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/data/cli-manifest.json +986 -1
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/templates.py +54 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli.egg-info/PKG-INFO +5 -5
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli.egg-info/SOURCES.txt +1 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_shared/provider_registry.py +6 -1
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/pyproject.toml +1 -1
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/MANIFEST.in +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/__init__.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/cli_contracts.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/__init__.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/auth.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/cells.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/columns.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/jobs.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/leads.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/linkedin.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/rows.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/search.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/sequences.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/tables.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/tasks.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/webhooks.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/commands/workspace_secrets.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/core/__init__.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/core/auth.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/core/config.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/core/http.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/core/io.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/core/output.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/core/polling.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/mongo_status.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/parser_groups.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli/sequence_support.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli.egg-info/dependency_links.txt +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli.egg-info/entry_points.txt +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli.egg-info/requires.txt +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_cli.egg-info/top_level.txt +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_shared/__init__.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_shared/linkedin_contract.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/autotouch_shared/search_contract.py +0 -0
- {autotouch_cli-0.2.42 → autotouch_cli-0.2.44}/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.44
|
|
4
4
|
Summary: Autotouch Smart Table CLI
|
|
5
5
|
Requires-Python: >=3.9
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -137,7 +137,7 @@ Use a dedicated `AUTOTOUCH_CONFIG_PATH` if you want a clean local account instea
|
|
|
137
137
|
|
|
138
138
|
## Docs
|
|
139
139
|
|
|
140
|
-
- Full CLI reference: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.
|
|
141
|
-
- Agent playbook: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.
|
|
142
|
-
- Tables/API reference: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.
|
|
143
|
-
- Authentication/scopes: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.
|
|
140
|
+
- Full CLI reference: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.44/docs/research-table/reference/autotouch-cli.md
|
|
141
|
+
- Agent playbook: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.44/docs/research-table/guides/autotouch-cli-agent-playbook.md
|
|
142
|
+
- Tables/API reference: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.44/docs/research-table/reference/tables-api.md
|
|
143
|
+
- Authentication/scopes: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.44/docs/platform/authentication.md
|
|
@@ -128,7 +128,7 @@ Use a dedicated `AUTOTOUCH_CONFIG_PATH` if you want a clean local account instea
|
|
|
128
128
|
|
|
129
129
|
## Docs
|
|
130
130
|
|
|
131
|
-
- Full CLI reference: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.
|
|
132
|
-
- Agent playbook: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.
|
|
133
|
-
- Tables/API reference: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.
|
|
134
|
-
- Authentication/scopes: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.
|
|
131
|
+
- Full CLI reference: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.44/docs/research-table/reference/autotouch-cli.md
|
|
132
|
+
- Agent playbook: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.44/docs/research-table/guides/autotouch-cli-agent-playbook.md
|
|
133
|
+
- Tables/API reference: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.44/docs/research-table/reference/tables-api.md
|
|
134
|
+
- Authentication/scopes: https://github.com/nicolonic/autotouch_main/blob/autotouch-cli-v0.2.44/docs/platform/authentication.md
|
|
@@ -186,6 +186,15 @@ from autotouch_cli.commands.webhooks import (
|
|
|
186
186
|
cmd_webhooks_subscriptions_test as cmd_webhooks_subscriptions_test_impl,
|
|
187
187
|
cmd_webhooks_subscriptions_update as cmd_webhooks_subscriptions_update_impl,
|
|
188
188
|
)
|
|
189
|
+
from autotouch_cli.commands.prompts import (
|
|
190
|
+
PromptCommandRuntime as PromptCommandHandlerRuntime,
|
|
191
|
+
cmd_prompts_create as cmd_prompts_create_impl,
|
|
192
|
+
cmd_prompts_delete as cmd_prompts_delete_impl,
|
|
193
|
+
cmd_prompts_get as cmd_prompts_get_impl,
|
|
194
|
+
cmd_prompts_list as cmd_prompts_list_impl,
|
|
195
|
+
cmd_prompts_update as cmd_prompts_update_impl,
|
|
196
|
+
register_prompts_subcommands,
|
|
197
|
+
)
|
|
189
198
|
from autotouch_cli.commands.workspace_secrets import (
|
|
190
199
|
WorkspaceSecretCommandRuntime as WorkspaceSecretCommandHandlerRuntime,
|
|
191
200
|
cmd_workspace_secrets_delete as cmd_workspace_secrets_delete_impl,
|
|
@@ -271,6 +280,7 @@ from autotouch_cli.templates import (
|
|
|
271
280
|
ONBOARDING_SCHEMA_TYPES,
|
|
272
281
|
ORG_CONTEXT_SCHEMA_TYPES,
|
|
273
282
|
PERSONAL_CONTEXT_SCHEMA_TYPES,
|
|
283
|
+
PROMPT_TEMPLATE_SCHEMA_TYPES,
|
|
274
284
|
WORKSPACE_SECRET_SCHEMA_TYPES,
|
|
275
285
|
ROW_SCHEMA_TYPES,
|
|
276
286
|
SEQUENCE_RECIPE_TYPES,
|
|
@@ -288,6 +298,7 @@ from autotouch_cli.templates import (
|
|
|
288
298
|
emit_onboarding_schema,
|
|
289
299
|
emit_org_context_schema,
|
|
290
300
|
emit_personal_context_schema,
|
|
301
|
+
emit_prompt_templates_schema,
|
|
291
302
|
emit_workspace_secrets_schema,
|
|
292
303
|
emit_rows_schema,
|
|
293
304
|
emit_schema,
|
|
@@ -2262,6 +2273,26 @@ def cmd_auth_clear(args: argparse.Namespace) -> None:
|
|
|
2262
2273
|
cmd_auth_clear_impl(args, runtime=_auth_command_runtime())
|
|
2263
2274
|
|
|
2264
2275
|
|
|
2276
|
+
def cmd_prompts_list(args: argparse.Namespace) -> None:
|
|
2277
|
+
cmd_prompts_list_impl(args, runtime=_prompt_command_runtime())
|
|
2278
|
+
|
|
2279
|
+
|
|
2280
|
+
def cmd_prompts_get(args: argparse.Namespace) -> None:
|
|
2281
|
+
cmd_prompts_get_impl(args, runtime=_prompt_command_runtime())
|
|
2282
|
+
|
|
2283
|
+
|
|
2284
|
+
def cmd_prompts_create(args: argparse.Namespace) -> None:
|
|
2285
|
+
cmd_prompts_create_impl(args, runtime=_prompt_command_runtime())
|
|
2286
|
+
|
|
2287
|
+
|
|
2288
|
+
def cmd_prompts_update(args: argparse.Namespace) -> None:
|
|
2289
|
+
cmd_prompts_update_impl(args, runtime=_prompt_command_runtime())
|
|
2290
|
+
|
|
2291
|
+
|
|
2292
|
+
def cmd_prompts_delete(args: argparse.Namespace) -> None:
|
|
2293
|
+
cmd_prompts_delete_impl(args, runtime=_prompt_command_runtime())
|
|
2294
|
+
|
|
2295
|
+
|
|
2265
2296
|
def cmd_workspace_secrets_list(args: argparse.Namespace) -> None:
|
|
2266
2297
|
cmd_workspace_secrets_list_impl(args, runtime=_workspace_secret_command_runtime())
|
|
2267
2298
|
|
|
@@ -2648,6 +2679,10 @@ def cmd_personal_context_schema(args: argparse.Namespace) -> None:
|
|
|
2648
2679
|
emit_personal_context_schema(args, _template_runtime())
|
|
2649
2680
|
|
|
2650
2681
|
|
|
2682
|
+
def cmd_prompts_schema(args: argparse.Namespace) -> None:
|
|
2683
|
+
emit_prompt_templates_schema(args, _template_runtime())
|
|
2684
|
+
|
|
2685
|
+
|
|
2651
2686
|
def cmd_workspace_secrets_schema(args: argparse.Namespace) -> None:
|
|
2652
2687
|
emit_workspace_secrets_schema(args, _template_runtime())
|
|
2653
2688
|
|
|
@@ -2800,6 +2835,15 @@ def _auth_command_runtime() -> AuthCommandHandlerRuntime:
|
|
|
2800
2835
|
)
|
|
2801
2836
|
|
|
2802
2837
|
|
|
2838
|
+
def _prompt_command_runtime() -> PromptCommandHandlerRuntime:
|
|
2839
|
+
return PromptCommandHandlerRuntime(
|
|
2840
|
+
resolve_token=_resolve_token,
|
|
2841
|
+
request_api=_request_api,
|
|
2842
|
+
print_json=lambda data, compact=False: _print_json(data, compact=compact),
|
|
2843
|
+
load_json_input=_load_json_input,
|
|
2844
|
+
)
|
|
2845
|
+
|
|
2846
|
+
|
|
2803
2847
|
def _workspace_secret_command_runtime() -> WorkspaceSecretCommandHandlerRuntime:
|
|
2804
2848
|
return WorkspaceSecretCommandHandlerRuntime(
|
|
2805
2849
|
resolve_token=_resolve_token,
|
|
@@ -3847,6 +3891,21 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
3847
3891
|
workspace_secret_schema_types=WORKSPACE_SECRET_SCHEMA_TYPES,
|
|
3848
3892
|
)
|
|
3849
3893
|
|
|
3894
|
+
register_prompts_subcommands(
|
|
3895
|
+
sub,
|
|
3896
|
+
add_api_common_arguments=_add_api_common_arguments,
|
|
3897
|
+
add_output_formatting_arguments=_add_output_formatting_arguments,
|
|
3898
|
+
handlers={
|
|
3899
|
+
"list": cmd_prompts_list,
|
|
3900
|
+
"get": cmd_prompts_get,
|
|
3901
|
+
"create": cmd_prompts_create,
|
|
3902
|
+
"update": cmd_prompts_update,
|
|
3903
|
+
"delete": cmd_prompts_delete,
|
|
3904
|
+
"schema": cmd_prompts_schema,
|
|
3905
|
+
},
|
|
3906
|
+
prompt_template_schema_types=PROMPT_TEMPLATE_SCHEMA_TYPES,
|
|
3907
|
+
)
|
|
3908
|
+
|
|
3850
3909
|
# resolved context
|
|
3851
3910
|
pctx = sub.add_parser("context", help="Resolved requester context used by enrichment/runtime")
|
|
3852
3911
|
ctx_sub = pctx.add_subparsers(dest="context_cmd", required=True)
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import sys
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
from typing import Any, Callable, Dict, Optional, Sequence
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass(frozen=True)
|
|
10
|
+
class PromptCommandRuntime:
|
|
11
|
+
resolve_token: Callable[[Optional[str], bool], Optional[str]]
|
|
12
|
+
request_api: Callable[..., Any]
|
|
13
|
+
print_json: Callable[[Any, bool], None]
|
|
14
|
+
load_json_input: Callable[..., Any]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def cmd_prompts_list(
|
|
18
|
+
args: argparse.Namespace,
|
|
19
|
+
*,
|
|
20
|
+
runtime: PromptCommandRuntime,
|
|
21
|
+
) -> None:
|
|
22
|
+
token = runtime.resolve_token(args.token, required=True)
|
|
23
|
+
params: Dict[str, str] = {}
|
|
24
|
+
mode = getattr(args, "mode", None)
|
|
25
|
+
if mode:
|
|
26
|
+
params["mode"] = mode
|
|
27
|
+
data = runtime.request_api(
|
|
28
|
+
"GET",
|
|
29
|
+
"/api/enrichments/prompt-templates",
|
|
30
|
+
base_url=args.base_url,
|
|
31
|
+
token=token,
|
|
32
|
+
use_x_api_key=args.use_x_api_key,
|
|
33
|
+
timeout=args.timeout,
|
|
34
|
+
verbose=args.verbose,
|
|
35
|
+
params=params,
|
|
36
|
+
)
|
|
37
|
+
runtime.print_json(data, args.compact)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def cmd_prompts_get(
|
|
41
|
+
args: argparse.Namespace,
|
|
42
|
+
*,
|
|
43
|
+
runtime: PromptCommandRuntime,
|
|
44
|
+
) -> None:
|
|
45
|
+
template_id = str(getattr(args, "id", "") or "").strip()
|
|
46
|
+
if not template_id:
|
|
47
|
+
print("ERROR: --id is required", file=sys.stderr)
|
|
48
|
+
sys.exit(2)
|
|
49
|
+
|
|
50
|
+
token = runtime.resolve_token(args.token, required=True)
|
|
51
|
+
# List all and filter client-side (no dedicated GET-by-id endpoint)
|
|
52
|
+
data = runtime.request_api(
|
|
53
|
+
"GET",
|
|
54
|
+
"/api/enrichments/prompt-templates",
|
|
55
|
+
base_url=args.base_url,
|
|
56
|
+
token=token,
|
|
57
|
+
use_x_api_key=args.use_x_api_key,
|
|
58
|
+
timeout=args.timeout,
|
|
59
|
+
verbose=args.verbose,
|
|
60
|
+
)
|
|
61
|
+
if isinstance(data, list):
|
|
62
|
+
match = next((t for t in data if t.get("id") == template_id), None)
|
|
63
|
+
if not match:
|
|
64
|
+
print(f"ERROR: prompt template not found: {template_id}", file=sys.stderr)
|
|
65
|
+
sys.exit(1)
|
|
66
|
+
runtime.print_json(match, args.compact)
|
|
67
|
+
else:
|
|
68
|
+
runtime.print_json(data, args.compact)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def cmd_prompts_create(
|
|
72
|
+
args: argparse.Namespace,
|
|
73
|
+
*,
|
|
74
|
+
runtime: PromptCommandRuntime,
|
|
75
|
+
) -> None:
|
|
76
|
+
token = runtime.resolve_token(args.token, required=True)
|
|
77
|
+
payload = runtime.load_json_input(
|
|
78
|
+
inline_json=getattr(args, "data_json", None),
|
|
79
|
+
file_path=getattr(args, "data_file", None),
|
|
80
|
+
context="data",
|
|
81
|
+
default=None,
|
|
82
|
+
)
|
|
83
|
+
if not payload or not isinstance(payload, dict):
|
|
84
|
+
print("ERROR: prompts create requires a JSON payload via --data-json or --data-file", file=sys.stderr)
|
|
85
|
+
sys.exit(2)
|
|
86
|
+
|
|
87
|
+
data = runtime.request_api(
|
|
88
|
+
"POST",
|
|
89
|
+
"/api/enrichments/prompt-templates",
|
|
90
|
+
base_url=args.base_url,
|
|
91
|
+
token=token,
|
|
92
|
+
use_x_api_key=args.use_x_api_key,
|
|
93
|
+
payload=payload,
|
|
94
|
+
timeout=args.timeout,
|
|
95
|
+
verbose=args.verbose,
|
|
96
|
+
)
|
|
97
|
+
runtime.print_json(data, args.compact)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def cmd_prompts_update(
|
|
101
|
+
args: argparse.Namespace,
|
|
102
|
+
*,
|
|
103
|
+
runtime: PromptCommandRuntime,
|
|
104
|
+
) -> None:
|
|
105
|
+
template_id = str(getattr(args, "id", "") or "").strip()
|
|
106
|
+
if not template_id:
|
|
107
|
+
print("ERROR: --id is required", file=sys.stderr)
|
|
108
|
+
sys.exit(2)
|
|
109
|
+
|
|
110
|
+
token = runtime.resolve_token(args.token, required=True)
|
|
111
|
+
payload = runtime.load_json_input(
|
|
112
|
+
inline_json=getattr(args, "data_json", None),
|
|
113
|
+
file_path=getattr(args, "data_file", None),
|
|
114
|
+
context="data",
|
|
115
|
+
default=None,
|
|
116
|
+
)
|
|
117
|
+
if not payload or not isinstance(payload, dict):
|
|
118
|
+
print("ERROR: prompts update requires a JSON payload via --data-json or --data-file", file=sys.stderr)
|
|
119
|
+
sys.exit(2)
|
|
120
|
+
|
|
121
|
+
data = runtime.request_api(
|
|
122
|
+
"PATCH",
|
|
123
|
+
f"/api/enrichments/prompt-templates/{template_id}",
|
|
124
|
+
base_url=args.base_url,
|
|
125
|
+
token=token,
|
|
126
|
+
use_x_api_key=args.use_x_api_key,
|
|
127
|
+
payload=payload,
|
|
128
|
+
timeout=args.timeout,
|
|
129
|
+
verbose=args.verbose,
|
|
130
|
+
)
|
|
131
|
+
runtime.print_json(data, args.compact)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def cmd_prompts_delete(
|
|
135
|
+
args: argparse.Namespace,
|
|
136
|
+
*,
|
|
137
|
+
runtime: PromptCommandRuntime,
|
|
138
|
+
) -> None:
|
|
139
|
+
if not getattr(args, "yes", False):
|
|
140
|
+
print(
|
|
141
|
+
"ERROR: prompt template delete is destructive. Re-run with --yes to confirm.",
|
|
142
|
+
file=sys.stderr,
|
|
143
|
+
)
|
|
144
|
+
sys.exit(2)
|
|
145
|
+
|
|
146
|
+
template_id = str(getattr(args, "id", "") or "").strip()
|
|
147
|
+
if not template_id:
|
|
148
|
+
print("ERROR: --id is required", file=sys.stderr)
|
|
149
|
+
sys.exit(2)
|
|
150
|
+
|
|
151
|
+
token = runtime.resolve_token(args.token, required=True)
|
|
152
|
+
data = runtime.request_api(
|
|
153
|
+
"DELETE",
|
|
154
|
+
f"/api/enrichments/prompt-templates/{template_id}",
|
|
155
|
+
base_url=args.base_url,
|
|
156
|
+
token=token,
|
|
157
|
+
use_x_api_key=args.use_x_api_key,
|
|
158
|
+
timeout=args.timeout,
|
|
159
|
+
verbose=args.verbose,
|
|
160
|
+
)
|
|
161
|
+
runtime.print_json(data, args.compact)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def register_prompts_subcommands(
|
|
165
|
+
subparsers: argparse._SubParsersAction[argparse.ArgumentParser],
|
|
166
|
+
*,
|
|
167
|
+
add_api_common_arguments: Callable[[argparse.ArgumentParser], None],
|
|
168
|
+
add_output_formatting_arguments: Callable[[argparse.ArgumentParser], None],
|
|
169
|
+
handlers: Dict[str, Callable[[argparse.Namespace], None]],
|
|
170
|
+
prompt_template_schema_types: Sequence[str],
|
|
171
|
+
) -> None:
|
|
172
|
+
pp = subparsers.add_parser(
|
|
173
|
+
"prompts",
|
|
174
|
+
help="Manage saved prompt templates for LLM enrichment columns",
|
|
175
|
+
description=(
|
|
176
|
+
"List, create, update, and delete prompt templates used by LLM enrichment columns. "
|
|
177
|
+
"Templates can be scoped to a single user (private) or shared with the team."
|
|
178
|
+
),
|
|
179
|
+
epilog=(
|
|
180
|
+
"Developer API keys need prompts:read / prompts:write scopes (or *) for these endpoints."
|
|
181
|
+
),
|
|
182
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
183
|
+
)
|
|
184
|
+
pp._codex_examples = [
|
|
185
|
+
'autotouch prompts list',
|
|
186
|
+
'autotouch prompts list --mode agent',
|
|
187
|
+
'autotouch prompts get --id <TEMPLATE_ID>',
|
|
188
|
+
'autotouch prompts create --data-file prompt.json',
|
|
189
|
+
'autotouch prompts delete --id <TEMPLATE_ID> --yes',
|
|
190
|
+
]
|
|
191
|
+
pp_sub = pp.add_subparsers(dest="prompts_cmd", required=True)
|
|
192
|
+
|
|
193
|
+
# list
|
|
194
|
+
ppl = pp_sub.add_parser("list", help="List prompt templates")
|
|
195
|
+
ppl.add_argument("--mode", choices=["basic", "agent"], help="Filter by mode")
|
|
196
|
+
add_api_common_arguments(ppl)
|
|
197
|
+
ppl.set_defaults(func=handlers["list"])
|
|
198
|
+
|
|
199
|
+
# get
|
|
200
|
+
ppg = pp_sub.add_parser("get", help="Get a single prompt template by ID")
|
|
201
|
+
ppg.add_argument("--id", required=True, help="Prompt template ID")
|
|
202
|
+
add_api_common_arguments(ppg)
|
|
203
|
+
ppg.set_defaults(func=handlers["get"])
|
|
204
|
+
|
|
205
|
+
# create
|
|
206
|
+
ppc = pp_sub.add_parser(
|
|
207
|
+
"create",
|
|
208
|
+
help="Create a new prompt template",
|
|
209
|
+
description="Create a new prompt template. Requires a JSON payload with name, content, type, and mode.",
|
|
210
|
+
)
|
|
211
|
+
ppc.add_argument("--data-json", help="Inline JSON payload")
|
|
212
|
+
ppc.add_argument("--data-file", help="Path to JSON payload file")
|
|
213
|
+
add_api_common_arguments(ppc)
|
|
214
|
+
ppc.set_defaults(func=handlers["create"])
|
|
215
|
+
|
|
216
|
+
# update
|
|
217
|
+
ppu = pp_sub.add_parser(
|
|
218
|
+
"update",
|
|
219
|
+
help="Update an existing prompt template",
|
|
220
|
+
description="Partially update a prompt template. Only include the fields you want to change.",
|
|
221
|
+
)
|
|
222
|
+
ppu.add_argument("--id", required=True, help="Prompt template ID")
|
|
223
|
+
ppu.add_argument("--data-json", help="Inline JSON payload")
|
|
224
|
+
ppu.add_argument("--data-file", help="Path to JSON payload file")
|
|
225
|
+
add_api_common_arguments(ppu)
|
|
226
|
+
ppu.set_defaults(func=handlers["update"])
|
|
227
|
+
|
|
228
|
+
# delete
|
|
229
|
+
ppd = pp_sub.add_parser("delete", help="Delete a prompt template")
|
|
230
|
+
ppd.add_argument("--id", required=True, help="Prompt template ID")
|
|
231
|
+
ppd.add_argument("--yes", action="store_true", help="Confirm deletion")
|
|
232
|
+
add_api_common_arguments(ppd)
|
|
233
|
+
ppd.set_defaults(func=handlers["delete"])
|
|
234
|
+
|
|
235
|
+
# schema
|
|
236
|
+
pps = pp_sub.add_parser("schema", help="Print prompt template payload schemas")
|
|
237
|
+
pps.add_argument("--type", choices=["all", *prompt_template_schema_types], default="all")
|
|
238
|
+
pps.add_argument("--out-file", help="Write schema JSON to file")
|
|
239
|
+
add_output_formatting_arguments(pps)
|
|
240
|
+
pps.set_defaults(func=handlers["schema"])
|
|
@@ -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.44`.
|
|
4
4
|
|
|
5
5
|
## Output Modes
|
|
6
6
|
|
|
@@ -2289,6 +2289,200 @@ Save personal context
|
|
|
2289
2289
|
- `--json-pointer`: Extract a JSON pointer from the final result (for example: /id)
|
|
2290
2290
|
- `--verbose` (default=False): Print request metadata to stderr
|
|
2291
2291
|
|
|
2292
|
+
### `prompts`
|
|
2293
|
+
|
|
2294
|
+
#### `autotouch prompts`
|
|
2295
|
+
|
|
2296
|
+
Manage saved prompt templates for LLM enrichment columns
|
|
2297
|
+
|
|
2298
|
+
List, create, update, and delete prompt templates used by LLM enrichment columns. Templates can be scoped to a single user (private) or shared with the team.
|
|
2299
|
+
|
|
2300
|
+
- Auth: `varies_by_subcommand`
|
|
2301
|
+
- Stability: `stable`
|
|
2302
|
+
- Destructive: `no`
|
|
2303
|
+
- Subcommands: `list, get, create, update, delete, schema`
|
|
2304
|
+
- Example:
|
|
2305
|
+
- `autotouch prompts list`
|
|
2306
|
+
- `autotouch prompts list --mode agent`
|
|
2307
|
+
- `autotouch prompts get --id <TEMPLATE_ID>`
|
|
2308
|
+
- `autotouch prompts create --data-file prompt.json`
|
|
2309
|
+
- `autotouch prompts delete --id <TEMPLATE_ID> --yes`
|
|
2310
|
+
- Notes:
|
|
2311
|
+
|
|
2312
|
+
```text
|
|
2313
|
+
Developer API keys need prompts:read / prompts:write scopes (or *) for these endpoints.
|
|
2314
|
+
```
|
|
2315
|
+
|
|
2316
|
+
#### `autotouch prompts create`
|
|
2317
|
+
|
|
2318
|
+
Create a new prompt template
|
|
2319
|
+
|
|
2320
|
+
Create a new prompt template. Requires a JSON payload with name, content, type, and mode.
|
|
2321
|
+
|
|
2322
|
+
- Auth: `developer_key_or_user_session`
|
|
2323
|
+
- Stability: `stable`
|
|
2324
|
+
- Destructive: `no`
|
|
2325
|
+
- Output modes: `json, ndjson, human`
|
|
2326
|
+
- Example:
|
|
2327
|
+
- `autotouch prompts create [-h] [--data-json DATA_JSON]
|
|
2328
|
+
[--data-file DATA_FILE] [--base-url BASE_URL]
|
|
2329
|
+
[--token TOKEN] [--use-x-api-key]
|
|
2330
|
+
[--timeout TIMEOUT]
|
|
2331
|
+
[--output {json,ndjson,human}] [--compact]
|
|
2332
|
+
[--select SELECT |
|
|
2333
|
+
--json-pointer JSON_POINTER] [--verbose]`
|
|
2334
|
+
- Options:
|
|
2335
|
+
- `--data-json`: Inline JSON payload
|
|
2336
|
+
- `--data-file`: Path to JSON payload file
|
|
2337
|
+
- `--base-url` (default=https://app.autotouch.ai): API base URL (default: https://app.autotouch.ai)
|
|
2338
|
+
- `--token`: Developer API key / JWT token
|
|
2339
|
+
- `--use-x-api-key` (default=False): Send token via X-API-Key header
|
|
2340
|
+
- `--timeout` (default=30): HTTP timeout in seconds
|
|
2341
|
+
- `--output` (choices=json,ndjson,human; default=json): Output mode
|
|
2342
|
+
- `--compact` (default=False): Print compact JSON
|
|
2343
|
+
- `--select`: Extract a dotted field path from the final result (for example: id or items.0.id)
|
|
2344
|
+
- `--json-pointer`: Extract a JSON pointer from the final result (for example: /id)
|
|
2345
|
+
- `--verbose` (default=False): Print request metadata to stderr
|
|
2346
|
+
|
|
2347
|
+
#### `autotouch prompts delete`
|
|
2348
|
+
|
|
2349
|
+
Delete a prompt template
|
|
2350
|
+
|
|
2351
|
+
- Auth: `developer_key_or_user_session`
|
|
2352
|
+
- Stability: `stable`
|
|
2353
|
+
- Destructive: `yes`
|
|
2354
|
+
- Required flags: `--id`
|
|
2355
|
+
- Output modes: `json, ndjson, human`
|
|
2356
|
+
- Example:
|
|
2357
|
+
- `autotouch prompts delete [-h] --id ID [--yes] [--base-url BASE_URL]
|
|
2358
|
+
[--token TOKEN] [--use-x-api-key]
|
|
2359
|
+
[--timeout TIMEOUT]
|
|
2360
|
+
[--output {json,ndjson,human}] [--compact]
|
|
2361
|
+
[--select SELECT |
|
|
2362
|
+
--json-pointer JSON_POINTER] [--verbose]`
|
|
2363
|
+
- Options:
|
|
2364
|
+
- `--id` (required): Prompt template ID
|
|
2365
|
+
- `--yes` (default=False): Confirm deletion
|
|
2366
|
+
- `--base-url` (default=https://app.autotouch.ai): API base URL (default: https://app.autotouch.ai)
|
|
2367
|
+
- `--token`: Developer API key / JWT token
|
|
2368
|
+
- `--use-x-api-key` (default=False): Send token via X-API-Key header
|
|
2369
|
+
- `--timeout` (default=30): HTTP timeout in seconds
|
|
2370
|
+
- `--output` (choices=json,ndjson,human; default=json): Output mode
|
|
2371
|
+
- `--compact` (default=False): Print compact JSON
|
|
2372
|
+
- `--select`: Extract a dotted field path from the final result (for example: id or items.0.id)
|
|
2373
|
+
- `--json-pointer`: Extract a JSON pointer from the final result (for example: /id)
|
|
2374
|
+
- `--verbose` (default=False): Print request metadata to stderr
|
|
2375
|
+
|
|
2376
|
+
#### `autotouch prompts get`
|
|
2377
|
+
|
|
2378
|
+
Get a single prompt template by ID
|
|
2379
|
+
|
|
2380
|
+
- Auth: `developer_key_or_user_session`
|
|
2381
|
+
- Stability: `stable`
|
|
2382
|
+
- Destructive: `no`
|
|
2383
|
+
- Required flags: `--id`
|
|
2384
|
+
- Output modes: `json, ndjson, human`
|
|
2385
|
+
- Example:
|
|
2386
|
+
- `autotouch prompts get [-h] --id ID [--base-url BASE_URL]
|
|
2387
|
+
[--token TOKEN] [--use-x-api-key]
|
|
2388
|
+
[--timeout TIMEOUT]
|
|
2389
|
+
[--output {json,ndjson,human}] [--compact]
|
|
2390
|
+
[--select SELECT | --json-pointer JSON_POINTER]
|
|
2391
|
+
[--verbose]`
|
|
2392
|
+
- Options:
|
|
2393
|
+
- `--id` (required): Prompt template ID
|
|
2394
|
+
- `--base-url` (default=https://app.autotouch.ai): API base URL (default: https://app.autotouch.ai)
|
|
2395
|
+
- `--token`: Developer API key / JWT token
|
|
2396
|
+
- `--use-x-api-key` (default=False): Send token via X-API-Key header
|
|
2397
|
+
- `--timeout` (default=30): HTTP timeout in seconds
|
|
2398
|
+
- `--output` (choices=json,ndjson,human; default=json): Output mode
|
|
2399
|
+
- `--compact` (default=False): Print compact JSON
|
|
2400
|
+
- `--select`: Extract a dotted field path from the final result (for example: id or items.0.id)
|
|
2401
|
+
- `--json-pointer`: Extract a JSON pointer from the final result (for example: /id)
|
|
2402
|
+
- `--verbose` (default=False): Print request metadata to stderr
|
|
2403
|
+
|
|
2404
|
+
#### `autotouch prompts list`
|
|
2405
|
+
|
|
2406
|
+
List prompt templates
|
|
2407
|
+
|
|
2408
|
+
- Auth: `developer_key_or_user_session`
|
|
2409
|
+
- Stability: `stable`
|
|
2410
|
+
- Destructive: `no`
|
|
2411
|
+
- Output modes: `json, ndjson, human`
|
|
2412
|
+
- Example:
|
|
2413
|
+
- `autotouch prompts list [-h] [--mode {basic,agent}]
|
|
2414
|
+
[--base-url BASE_URL] [--token TOKEN]
|
|
2415
|
+
[--use-x-api-key] [--timeout TIMEOUT]
|
|
2416
|
+
[--output {json,ndjson,human}] [--compact]
|
|
2417
|
+
[--select SELECT | --json-pointer JSON_POINTER]
|
|
2418
|
+
[--verbose]`
|
|
2419
|
+
- Options:
|
|
2420
|
+
- `--mode` (choices=basic,agent): Filter by mode
|
|
2421
|
+
- `--base-url` (default=https://app.autotouch.ai): API base URL (default: https://app.autotouch.ai)
|
|
2422
|
+
- `--token`: Developer API key / JWT token
|
|
2423
|
+
- `--use-x-api-key` (default=False): Send token via X-API-Key header
|
|
2424
|
+
- `--timeout` (default=30): HTTP timeout in seconds
|
|
2425
|
+
- `--output` (choices=json,ndjson,human; default=json): Output mode
|
|
2426
|
+
- `--compact` (default=False): Print compact JSON
|
|
2427
|
+
- `--select`: Extract a dotted field path from the final result (for example: id or items.0.id)
|
|
2428
|
+
- `--json-pointer`: Extract a JSON pointer from the final result (for example: /id)
|
|
2429
|
+
- `--verbose` (default=False): Print request metadata to stderr
|
|
2430
|
+
|
|
2431
|
+
#### `autotouch prompts schema`
|
|
2432
|
+
|
|
2433
|
+
Print prompt template payload schemas
|
|
2434
|
+
|
|
2435
|
+
- Auth: `none`
|
|
2436
|
+
- Stability: `stable`
|
|
2437
|
+
- Destructive: `no`
|
|
2438
|
+
- Output modes: `json, ndjson, human`
|
|
2439
|
+
- Example:
|
|
2440
|
+
- `autotouch prompts schema [-h] [--type {all,create,update}]
|
|
2441
|
+
[--out-file OUT_FILE]
|
|
2442
|
+
[--output {json,ndjson,human}] [--compact]
|
|
2443
|
+
[--select SELECT |
|
|
2444
|
+
--json-pointer JSON_POINTER]`
|
|
2445
|
+
- Options:
|
|
2446
|
+
- `--type` (choices=all,create,update; default=all)
|
|
2447
|
+
- `--out-file`: Write schema JSON to file
|
|
2448
|
+
- `--output` (choices=json,ndjson,human; default=json): Output mode
|
|
2449
|
+
- `--compact` (default=False): Print compact JSON
|
|
2450
|
+
- `--select`: Extract a dotted field path from the final result (for example: id or items.0.id)
|
|
2451
|
+
- `--json-pointer`: Extract a JSON pointer from the final result (for example: /id)
|
|
2452
|
+
|
|
2453
|
+
#### `autotouch prompts update`
|
|
2454
|
+
|
|
2455
|
+
Update an existing prompt template
|
|
2456
|
+
|
|
2457
|
+
Partially update a prompt template. Only include the fields you want to change.
|
|
2458
|
+
|
|
2459
|
+
- Auth: `developer_key_or_user_session`
|
|
2460
|
+
- Stability: `stable`
|
|
2461
|
+
- Destructive: `no`
|
|
2462
|
+
- Required flags: `--id`
|
|
2463
|
+
- Output modes: `json, ndjson, human`
|
|
2464
|
+
- Example:
|
|
2465
|
+
- `autotouch prompts update [-h] --id ID [--data-json DATA_JSON]
|
|
2466
|
+
[--data-file DATA_FILE] [--base-url BASE_URL]
|
|
2467
|
+
[--token TOKEN] [--use-x-api-key]
|
|
2468
|
+
[--timeout TIMEOUT]
|
|
2469
|
+
[--output {json,ndjson,human}] [--compact]
|
|
2470
|
+
[--select SELECT |
|
|
2471
|
+
--json-pointer JSON_POINTER] [--verbose]`
|
|
2472
|
+
- Options:
|
|
2473
|
+
- `--id` (required): Prompt template ID
|
|
2474
|
+
- `--data-json`: Inline JSON payload
|
|
2475
|
+
- `--data-file`: Path to JSON payload file
|
|
2476
|
+
- `--base-url` (default=https://app.autotouch.ai): API base URL (default: https://app.autotouch.ai)
|
|
2477
|
+
- `--token`: Developer API key / JWT token
|
|
2478
|
+
- `--use-x-api-key` (default=False): Send token via X-API-Key header
|
|
2479
|
+
- `--timeout` (default=30): HTTP timeout in seconds
|
|
2480
|
+
- `--output` (choices=json,ndjson,human; default=json): Output mode
|
|
2481
|
+
- `--compact` (default=False): Print compact JSON
|
|
2482
|
+
- `--select`: Extract a dotted field path from the final result (for example: id or items.0.id)
|
|
2483
|
+
- `--json-pointer`: Extract a JSON pointer from the final result (for example: /id)
|
|
2484
|
+
- `--verbose` (default=False): Print request metadata to stderr
|
|
2485
|
+
|
|
2292
2486
|
### `rows`
|
|
2293
2487
|
|
|
2294
2488
|
#### `autotouch rows`
|