agentic-fabriq-sdk 0.1.15__tar.gz → 0.1.16__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.
Potentially problematic release.
This version of agentic-fabriq-sdk might be problematic. Click here for more details.
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/PKG-INFO +1 -1
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/commands/tools.py +78 -78
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/pyproject.toml +1 -1
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/README.md +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/__init__.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/commands/__init__.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/commands/agents.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/commands/applications.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/commands/auth.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/commands/config.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/commands/mcp_servers.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/commands/secrets.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/core/__init__.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/core/client.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/core/config.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/core/oauth.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/core/output.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/core/token_storage.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_cli/main.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/__init__.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/auth/__init__.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/auth/application.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/auth/applications.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/auth/dpop.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/auth/oauth.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/auth/token_cache.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/connectors/__init__.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/connectors/base.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/connectors/registry.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/dx/__init__.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/dx/decorators.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/dx/runtime.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/events.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/exceptions.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/fabriq_client.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/models/__init__.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/models/audit.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/models/types.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/py.typed +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/transport/__init__.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/transport/http.py +0 -0
- {agentic_fabriq_sdk-0.1.15 → agentic_fabriq_sdk-0.1.16}/af_sdk/vault.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentic-fabriq-sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.16
|
|
4
4
|
Summary: Agentic Fabriq SDK: high-level client, CLI tool, DX helpers, and auth for AI agents
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Keywords: fabriq,agentic-fabriq,sdk,ai,agents,agentic,fabric,cli
|
|
@@ -224,30 +224,28 @@ def add(
|
|
|
224
224
|
tool: str = typer.Argument(..., help="Tool name (google_drive, google_slides, slack, notion, github, etc.)"),
|
|
225
225
|
connection_id: str = typer.Option(..., "--connection-id", help="Unique connection ID"),
|
|
226
226
|
display_name: str = typer.Option(None, "--display-name", help="Human-readable name"),
|
|
227
|
-
method: str = typer.Option(..., "--method", help="Connection method: '
|
|
227
|
+
method: str = typer.Option(..., "--method", help="Connection method: 'api_credentials' or 'oauth'"),
|
|
228
228
|
|
|
229
|
-
# API method fields
|
|
230
|
-
token: str = typer.Option(None, "--token", help="API token (for
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
client_id: str = typer.Option(None, "--client-id", help="OAuth client ID (for credentials method)"),
|
|
234
|
-
client_secret: str = typer.Option(None, "--client-secret", help="OAuth client secret (for credentials method)"),
|
|
229
|
+
# API credentials method fields (can be either a token OR client_id/secret)
|
|
230
|
+
token: str = typer.Option(None, "--token", help="API token (for simple token-based auth like Notion, Slack bot)"),
|
|
231
|
+
client_id: str = typer.Option(None, "--client-id", help="OAuth client ID (for app-based auth like Google, Slack)"),
|
|
232
|
+
client_secret: str = typer.Option(None, "--client-secret", help="OAuth client secret (for app-based auth)"),
|
|
235
233
|
redirect_uri: str = typer.Option(None, "--redirect-uri", help="OAuth redirect URI (optional, auto-generated)"),
|
|
236
234
|
):
|
|
237
235
|
"""
|
|
238
236
|
Add a new tool connection with credentials.
|
|
239
237
|
|
|
240
238
|
Examples:
|
|
241
|
-
# Notion (
|
|
242
|
-
afctl tools add notion --connection-id notion-work --method
|
|
239
|
+
# Notion (api_credentials method - single token)
|
|
240
|
+
afctl tools add notion --connection-id notion-work --method api_credentials --token "secret_abc123"
|
|
243
241
|
|
|
244
|
-
# Google (
|
|
245
|
-
afctl tools add
|
|
242
|
+
# Google (api_credentials method - OAuth app)
|
|
243
|
+
afctl tools add google_drive --connection-id google-work --method api_credentials \\
|
|
246
244
|
--client-id "123.apps.googleusercontent.com" \\
|
|
247
245
|
--client-secret "GOCSPX-abc123"
|
|
248
246
|
|
|
249
|
-
# Slack bot (
|
|
250
|
-
afctl tools add slack --connection-id slack-bot --method
|
|
247
|
+
# Slack bot (api_credentials method - single token)
|
|
248
|
+
afctl tools add slack --connection-id slack-bot --method api_credentials --token "xoxb-123..."
|
|
251
249
|
"""
|
|
252
250
|
try:
|
|
253
251
|
from af_cli.core.config import get_config
|
|
@@ -276,23 +274,24 @@ def add(
|
|
|
276
274
|
raise typer.Exit(1)
|
|
277
275
|
|
|
278
276
|
# Validate method
|
|
279
|
-
if method not in ["
|
|
280
|
-
error("Method must be '
|
|
277
|
+
if method not in ["api_credentials", "oauth"]:
|
|
278
|
+
error("Method must be 'api_credentials' or 'oauth'")
|
|
281
279
|
raise typer.Exit(1)
|
|
282
280
|
|
|
283
|
-
# Validate
|
|
284
|
-
if method == "
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
info(f"
|
|
295
|
-
info(f" --
|
|
281
|
+
# Validate api_credentials method requirements
|
|
282
|
+
if method == "api_credentials":
|
|
283
|
+
# Must have either token OR (client_id + client_secret)
|
|
284
|
+
has_token = bool(token)
|
|
285
|
+
has_oauth_creds = bool(client_id and client_secret)
|
|
286
|
+
|
|
287
|
+
if not has_token and not has_oauth_creds:
|
|
288
|
+
error("api_credentials method requires either:")
|
|
289
|
+
info(" • --token (for simple token auth like Notion, Slack bot)")
|
|
290
|
+
info(" • --client-id and --client-secret (for OAuth app auth like Google)")
|
|
291
|
+
info("")
|
|
292
|
+
info(f"Examples:")
|
|
293
|
+
info(f" afctl tools add {tool} --connection-id {connection_id} --method api_credentials --token YOUR_TOKEN")
|
|
294
|
+
info(f" afctl tools add {tool} --connection-id {connection_id} --method api_credentials --client-id ID --client-secret SECRET")
|
|
296
295
|
raise typer.Exit(1)
|
|
297
296
|
|
|
298
297
|
info(f"Creating connection: {connection_id}")
|
|
@@ -310,51 +309,59 @@ def add(
|
|
|
310
309
|
client.post("/api/v1/user-connections", data=connection_data)
|
|
311
310
|
success(f"✅ Connection entry created: {connection_id}")
|
|
312
311
|
|
|
313
|
-
# Step 2: Store credentials based on
|
|
314
|
-
if method == "
|
|
312
|
+
# Step 2: Store credentials based on what was provided
|
|
313
|
+
if method == "api_credentials":
|
|
315
314
|
# Determine the API base tool name (Google tools all use "google")
|
|
316
315
|
api_tool_name = "google" if (tool.startswith("google_") or tool == "gmail") else tool
|
|
317
316
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
f"
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
317
|
+
if token:
|
|
318
|
+
# Simple token-based auth (Notion, Slack bot, etc.)
|
|
319
|
+
info("Storing API token...")
|
|
320
|
+
|
|
321
|
+
# Tool-specific endpoint and payload mappings
|
|
322
|
+
if tool == "notion":
|
|
323
|
+
# Notion uses /config endpoint with integration_token field
|
|
324
|
+
endpoint = f"/api/v1/tools/{tool}/config?connection_id={connection_id}"
|
|
325
|
+
cred_payload = {"integration_token": token}
|
|
326
|
+
else:
|
|
327
|
+
# Generic tools use /connection endpoint with api_token field
|
|
328
|
+
endpoint = f"/api/v1/tools/{tool}/connection?connection_id={connection_id}"
|
|
329
|
+
cred_payload = {"api_token": token}
|
|
330
|
+
|
|
331
|
+
client.post(endpoint, data=cred_payload)
|
|
332
|
+
success("✅ API token stored")
|
|
333
|
+
success(f"✅ Connection '{connection_id}' is ready to use!")
|
|
334
|
+
|
|
335
|
+
elif client_id and client_secret:
|
|
336
|
+
# OAuth app credentials (Google, Slack app, etc.)
|
|
337
|
+
# Auto-generate redirect_uri if not provided
|
|
338
|
+
if not redirect_uri:
|
|
339
|
+
config = get_config()
|
|
340
|
+
redirect_uri = f"{config.gateway_url}/api/v1/tools/{api_tool_name}/oauth/callback"
|
|
341
|
+
info(f"Using default redirect URI: {redirect_uri}")
|
|
342
|
+
|
|
343
|
+
# Store OAuth app config
|
|
344
|
+
info("Storing OAuth app credentials...")
|
|
345
|
+
config_payload = {
|
|
346
|
+
"client_id": client_id,
|
|
347
|
+
"client_secret": client_secret,
|
|
348
|
+
}
|
|
349
|
+
if redirect_uri:
|
|
350
|
+
config_payload["redirect_uri"] = redirect_uri
|
|
351
|
+
|
|
352
|
+
client.post(
|
|
353
|
+
f"/api/v1/tools/{api_tool_name}/config?connection_id={connection_id}",
|
|
354
|
+
data=config_payload
|
|
355
|
+
)
|
|
356
|
+
success("✅ OAuth app credentials stored")
|
|
357
|
+
info("")
|
|
358
|
+
info(f"Next: Run 'afctl tools connect {connection_id}' to complete OAuth setup")
|
|
359
|
+
|
|
360
|
+
elif method == "oauth":
|
|
361
|
+
# OAuth flow (legacy, redirect to api_credentials)
|
|
362
|
+
error("The 'oauth' method is deprecated. Please use 'api_credentials' instead.")
|
|
363
|
+
info("All credential storage now uses the 'api_credentials' method.")
|
|
364
|
+
raise typer.Exit(1)
|
|
358
365
|
|
|
359
366
|
# Show helpful info
|
|
360
367
|
info("")
|
|
@@ -394,14 +401,7 @@ def connect(
|
|
|
394
401
|
tool = connection["tool"]
|
|
395
402
|
method = connection["method"]
|
|
396
403
|
|
|
397
|
-
#
|
|
398
|
-
if method not in ["credentials", "oauth"]:
|
|
399
|
-
error(f"Connection '{connection_id}' uses '{method}' method")
|
|
400
|
-
info("Only 'credentials' or 'oauth' method connections need OAuth setup")
|
|
401
|
-
info("API connections are already connected after 'afctl tools add'")
|
|
402
|
-
raise typer.Exit(1)
|
|
403
|
-
|
|
404
|
-
# Check if already connected
|
|
404
|
+
# Check if connection is already set up (has credentials stored)
|
|
405
405
|
if connection.get("connected"):
|
|
406
406
|
warning(f"Connection '{connection_id}' is already connected")
|
|
407
407
|
confirm = typer.confirm("Do you want to reconnect (re-authorize)?")
|
|
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
5
5
|
|
|
6
6
|
[tool.poetry]
|
|
7
7
|
name = "agentic-fabriq-sdk"
|
|
8
|
-
version = "0.1.
|
|
8
|
+
version = "0.1.16"
|
|
9
9
|
description = "Agentic Fabriq SDK: high-level client, CLI tool, DX helpers, and auth for AI agents"
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
license = "Apache-2.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|