@borgee/agents-host 0.2.101 → 0.2.110
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/README.md +77 -5
- package/dist/agents-host.d.ts +8 -0
- package/dist/agents-host.js +355 -23
- package/dist/catalog-worker.js +21 -0
- package/dist/catalog-worker.js.map +7 -0
- package/dist/chat/chat-control-plane.d.ts +7 -2
- package/dist/chat/normalized-input.d.ts +9 -0
- package/dist/chat/normalized-input.js +24 -0
- package/dist/chat/sdk-chat-control-plane.d.ts +18 -3
- package/dist/chat/sdk-chat-control-plane.js +44 -9
- package/dist/cli-args.d.ts +1 -1
- package/dist/cli-args.js +13 -4
- package/dist/config.d.ts +3 -1
- package/dist/config.js +25 -0
- package/dist/context/injection.d.ts +16 -0
- package/dist/context/injection.js +37 -21
- package/dist/context/prompt.d.ts +12 -0
- package/dist/context/prompt.js +25 -0
- package/dist/context/turn-preparation.d.ts +2 -1
- package/dist/context/turn-preparation.js +15 -0
- package/dist/gateway/localhost-gateway.js +33 -8
- package/dist/hosted-turn-content.js +3 -2
- package/dist/local-config.js +34 -1
- package/dist/managed-daemon.js +15 -0
- package/dist/native-environment.d.ts +2 -0
- package/dist/native-environment.js +9 -0
- package/dist/native-protocol-types/codec.d.ts +49 -0
- package/dist/native-protocol-types/commands.d.ts +71 -0
- package/dist/native-protocol-types/compatibility.d.ts +5 -0
- package/dist/native-protocol-types/cursor.d.ts +7 -0
- package/dist/native-protocol-types/envelope.d.ts +1105 -0
- package/dist/native-protocol-types/file-changes.d.ts +20 -0
- package/dist/native-protocol-types/history.d.ts +487 -0
- package/dist/native-protocol-types/index.d.ts +18 -0
- package/dist/native-protocol-types/interactions.d.ts +619 -0
- package/dist/native-protocol-types/messages.d.ts +2482 -0
- package/dist/native-protocol-types/public-validation.d.ts +10 -0
- package/dist/native-protocol-types/remote-host-uplink.d.ts +67 -0
- package/dist/native-protocol-types/resources.d.ts +126 -0
- package/dist/native-protocol-types/session-settings.d.ts +22 -0
- package/dist/native-protocol-types/snapshot.d.ts +575 -0
- package/dist/native-protocol-types/timeline.d.ts +1503 -0
- package/dist/native-protocol-types/tool-result.d.ts +26 -0
- package/dist/native-protocol-types/uplink.d.ts +56 -0
- package/dist/native-protocol-types/version.d.ts +5 -0
- package/dist/native-provider-types/commands.d.ts +51 -0
- package/dist/native-provider-types/control.d.ts +192 -0
- package/dist/native-provider-types/file-changes.d.ts +9 -0
- package/dist/native-provider-types/index.d.ts +8 -0
- package/dist/native-provider-types/interactions.d.ts +7 -0
- package/dist/native-provider-types/observation.d.ts +209 -0
- package/dist/native-provider-types/provider.d.ts +124 -0
- package/dist/native-provider-types/session-settings.d.ts +17 -0
- package/dist/native-provider-types/testing.d.ts +27 -0
- package/dist/native-provider-types/tool-result.d.ts +21 -0
- package/dist/native-providers.d.ts +21 -0
- package/dist/native-providers.js +18402 -0
- package/dist/native-providers.js.map +7 -0
- package/dist/plugin-sdk.js +10640 -225
- package/dist/plugin-sdk.js.map +4 -4
- package/dist/policy/copilot-permission.js +1 -8
- package/dist/providers/copilot/sdk-session.js +8 -1
- package/dist/providers/create-provider.js +20 -0
- package/dist/providers/normalized/adapter.d.ts +107 -0
- package/dist/providers/normalized/adapter.js +1650 -0
- package/dist/providers/normalized/control-policy.d.ts +5 -0
- package/dist/providers/normalized/control-policy.js +12 -0
- package/dist/providers/normalized/interactions.d.ts +3 -0
- package/dist/providers/normalized/interactions.js +39 -0
- package/dist/providers/normalized/legacy-input-ownership.d.ts +34 -0
- package/dist/providers/normalized/legacy-input-ownership.js +123 -0
- package/dist/providers/normalized/session-management.d.ts +67 -0
- package/dist/providers/normalized/session-management.js +334 -0
- package/dist/providers/normalized/session-ownership.d.ts +3 -0
- package/dist/providers/normalized/session-ownership.js +90 -0
- package/dist/providers/provider-adapter.d.ts +43 -1
- package/dist/providers/provider-adapter.js +8 -0
- package/dist/types.d.ts +34 -9
- package/dist/vendor/agent-provider-codex/LICENSE +211 -0
- package/dist/vendor/agent-provider-codex/NOTICE +13 -0
- package/package.json +22 -13
- package/skills/borgee-agent/SKILL.md +1 -1
- package/skills/borgee-agent/scripts/borgee-agent.mjs +24 -3
- package/skills/borgee-agent/scripts/borgee-agent.py +28 -2
|
@@ -28,7 +28,7 @@ Commands:
|
|
|
28
28
|
files
|
|
29
29
|
Files visible in this channel.
|
|
30
30
|
files cat <channel-path>
|
|
31
|
-
Print
|
|
31
|
+
Print normalized UTF-8 text, or report extraction status and warnings.
|
|
32
32
|
files download <channel-path> [--overwrite]
|
|
33
33
|
Copy one file into execution.local_directory/.borgee/channel-files.
|
|
34
34
|
files sync [<channel-path>] [--overwrite]
|
|
@@ -605,6 +605,32 @@ def call_gateway(credential: dict[str, str], request: dict[str, object]) -> obje
|
|
|
605
605
|
return json.loads(body_text) if body_text else None
|
|
606
606
|
|
|
607
607
|
|
|
608
|
+
def require_extracted_text(result: object, path: str) -> str:
|
|
609
|
+
if isinstance(result, dict) and isinstance(result.get("text"), str):
|
|
610
|
+
return result["text"]
|
|
611
|
+
extraction = result.get("extraction") if isinstance(result, dict) else None
|
|
612
|
+
status = (
|
|
613
|
+
extraction.get("status")
|
|
614
|
+
if isinstance(extraction, dict) and isinstance(extraction.get("status"), str)
|
|
615
|
+
else "unavailable"
|
|
616
|
+
)
|
|
617
|
+
warnings = extraction.get("warnings") if isinstance(extraction, dict) else None
|
|
618
|
+
details = []
|
|
619
|
+
if isinstance(warnings, list):
|
|
620
|
+
for warning in warnings:
|
|
621
|
+
if not isinstance(warning, dict):
|
|
622
|
+
continue
|
|
623
|
+
code = warning.get("code") if isinstance(warning.get("code"), str) else "UNKNOWN"
|
|
624
|
+
message = (
|
|
625
|
+
warning.get("message")
|
|
626
|
+
if isinstance(warning.get("message"), str)
|
|
627
|
+
else "No details"
|
|
628
|
+
)
|
|
629
|
+
details.append(f"{code}: {message}")
|
|
630
|
+
detail = f"; {'; '.join(details)}" if details else ""
|
|
631
|
+
raise RuntimeError(f"Cannot print {path}: text extraction is {status}{detail}")
|
|
632
|
+
|
|
633
|
+
|
|
608
634
|
def main() -> int:
|
|
609
635
|
parsed = parse_args(sys.argv[1:])
|
|
610
636
|
if parsed.get("help") is True:
|
|
@@ -617,7 +643,7 @@ def main() -> int:
|
|
|
617
643
|
credential = read_gateway_credential(str(parsed["gateway_credential_path"]))
|
|
618
644
|
result = call_gateway(credential, resolve_request(credential, parsed))
|
|
619
645
|
if parsed["command"] == "files" and parsed["file_command"] == "cat":
|
|
620
|
-
text = str(
|
|
646
|
+
text = require_extracted_text(result, str(parsed["file_path"]))
|
|
621
647
|
if not text.endswith("\n"):
|
|
622
648
|
text += "\n"
|
|
623
649
|
sys.stdout.buffer.write(text.encode("utf-8"))
|