From 48e3310d7253280df1e3d7dd0259ccd0dd74049b Mon Sep 17 00:00:00 2001 From: Princeps Polycap <7855677+princepspolycap@users.noreply.github.com> Date: Sat, 18 Jul 2026 02:36:44 -0500 Subject: [PATCH 1/7] feat: add auditable Qwen Cloud integration seam --- hackathon/qwen_integration.py | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 hackathon/qwen_integration.py diff --git a/hackathon/qwen_integration.py b/hackathon/qwen_integration.py new file mode 100644 index 0000000..cb816c0 --- /dev/null +++ b/hackathon/qwen_integration.py @@ -0,0 +1,52 @@ +"""Minimal Qwen Cloud integration proof for the hackathon demo. + +This adapter uses an OpenAI-compatible endpoint, which keeps model routing +separate from the worker runtime. It intentionally fails closed when the +credentials are absent; no fake completion is returned. +""" + +from __future__ import annotations + +import os +from typing import Any + + +class QwenCloudError(RuntimeError): + """Raised when Qwen Cloud is not configured or the request fails.""" + + +def qwen_chat(messages: list[dict[str, str]], *, model: str | None = None) -> dict[str, Any]: + """Call Qwen Cloud through its OpenAI-compatible API. + + Required environment variables: + QWEN_API_KEY: API key (never committed) + QWEN_BASE_URL: OpenAI-compatible base URL + + The function is a small, auditable proof seam for the Poly worker runtime. + It does not claim a live deployment until a real key and endpoint are used. + """ + api_key = os.getenv("QWEN_API_KEY") + base_url = os.getenv("QWEN_BASE_URL") + if not api_key or not base_url: + raise QwenCloudError( + "Qwen Cloud is not configured. Set QWEN_API_KEY and QWEN_BASE_URL " + "to run the live proof; no credentials are bundled." + ) + + try: + from openai import OpenAI + except ImportError as exc: # pragma: no cover - environment dependent + raise QwenCloudError("Install the OpenAI-compatible client before running the live proof") from exc + + client = OpenAI(api_key=api_key, base_url=base_url) + response = client.chat.completions.create( + model=model or os.getenv("QWEN_MODEL", "qwen-plus"), + messages=messages, + temperature=0, + ) + return response.model_dump() if hasattr(response, "model_dump") else response.to_dict() + + +if __name__ == "__main__": + result = qwen_chat([{"role": "user", "content": "Return the word READY."}]) + print(result) From 986462682106869248fd8299a50435b0ba5ac37a Mon Sep 17 00:00:00 2001 From: Princeps Polycap <7855677+princepspolycap@users.noreply.github.com> Date: Sat, 18 Jul 2026 02:37:25 -0500 Subject: [PATCH 2/7] feat: add MIT license for hackathon proof bundle --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..823ad4c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Poly186-AI-DAO + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 0adc092216307cef6ab724c051fd0252a472779a Mon Sep 17 00:00:00 2001 From: Princeps Polycap <7855677+princepspolycap@users.noreply.github.com> Date: Sat, 18 Jul 2026 02:39:33 -0500 Subject: [PATCH 3/7] docs: add Qwen Cloud architecture diagram --- hackathon/architecture.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 hackathon/architecture.svg diff --git a/hackathon/architecture.svg b/hackathon/architecture.svg new file mode 100644 index 0000000..a152bc1 --- /dev/null +++ b/hackathon/architecture.svg @@ -0,0 +1 @@ +Poly Autopilot Workforce architectureQwen Cloud plans work, Poly routes workers and tools, verification produces a receipt, and external actions require human approval.Poly Autopilot Workforce for Qwen CloudReceipt-first autonomous operations with governed external actionBusiness objectiveoperator inputQwen Cloud plannerplan + tool selectionPoly worker runtimerouting · memoryCelery · artifactsTools + recordsresearch · CRMartifact persistenceEvidence + verificationsource checks · receiptHuman approval gatebefore send / spendOutcomereceipt or handoffNo credentials or live deployment claims are embedded in this proof bundle. From 311b03af6aaad36d31d46717cbf6cc25e4956f12 Mon Sep 17 00:00:00 2001 From: Princeps Polycap <7855677+princepspolycap@users.noreply.github.com> Date: Sat, 18 Jul 2026 02:40:04 -0500 Subject: [PATCH 4/7] docs: add Qwen Cloud proof bundle README --- hackathon/README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 hackathon/README.md diff --git a/hackathon/README.md b/hackathon/README.md new file mode 100644 index 0000000..a1182f3 --- /dev/null +++ b/hackathon/README.md @@ -0,0 +1,38 @@ +# Qwen Cloud Global AI Hackathon Proof Bundle + +## Project +**Poly Autopilot Workforce for Qwen Cloud**, Autopilot Agent track. + +Poly is a governed digital workforce pattern for real business operations. A Qwen-backed planner turns an operator objective into tasks, routes work to specialized workers and tools, verifies source evidence, persists a receipt, and holds external sends or spend behind human approval. + +This directory is a bounded proof bundle. It does not claim a live Qwen deployment without credentials. The integration seam is executable when `QWEN_API_KEY` and `QWEN_BASE_URL` are supplied by the operator. + +## Evidence map + +- [`qwen_integration.py`](qwen_integration.py): OpenAI-compatible Qwen Cloud adapter. Fails closed when credentials are absent. +- [`architecture.svg`](architecture.svg): rendered architecture diagram. +- [`demo_script.md`](demo_script.md): three-minute recording plan. +- [`../LICENSE`](../LICENSE): MIT license for the repository. + +## Run the integration proof + +```bash +export QWEN_API_KEY='your-key-from-a-secret-store' +export QWEN_BASE_URL='https://your-qwen-compatible-endpoint/v1' +export QWEN_MODEL='qwen-plus' # optional +python hackathon/qwen_integration.py +``` + +Do not commit credentials. A live run requires a valid Qwen Cloud endpoint, API key, network access, and the OpenAI-compatible Python client. No such credentials are included in this repository. + +## Architecture and claims boundary + +The demo is designed to show: planning, tool routing, source grounding, durable artifact creation, verification, and a human checkpoint before external action. It does not claim that this repository alone contains Poly's production runtime, CRM, or cloud deployment. Those are described as integration targets in the submission packet and must be demonstrated with separate, verifiable links before Devpost submission. + +## Local validation + +```bash +python -m py_compile hackathon/qwen_integration.py +``` + +Expected behavior without credentials is a clear `QwenCloudError`, not a fabricated response. This is intentional receipt-first behavior. From 7abf476373802720f668426173736b0f8468f2b1 Mon Sep 17 00:00:00 2001 From: Princeps Polycap <7855677+princepspolycap@users.noreply.github.com> Date: Sat, 18 Jul 2026 02:40:24 -0500 Subject: [PATCH 5/7] docs: add hackathon demo recording plan --- hackathon/demo_script.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 hackathon/demo_script.md diff --git a/hackathon/demo_script.md b/hackathon/demo_script.md new file mode 100644 index 0000000..1d6d3c7 --- /dev/null +++ b/hackathon/demo_script.md @@ -0,0 +1,24 @@ +# Three-minute demo recording plan + +## 0:00-0:20, problem +State that business automation often stops at a generated answer. Poly closes the loop from objective to evidence, action, and receipt, while keeping risky external actions governed. + +## 0:20-1:00, objective and planning +Enter one bounded objective: qualify an opportunity, collect source evidence, draft the next action, and save a handoff. Show the Qwen Cloud model configuration without revealing secrets. Show the planner output and selected worker lane. + +## 1:00-2:00, execution and evidence +Show the research/tool step, the grounded source snippets, the structured internal record, and the durable artifact receipt. Call out that unsupported claims are excluded and that the run is resumable from its artifacts. + +## 2:00-2:35, governance +Show the external-action decision. The system classifies a send, spend, or submission as requiring approval and pauses. Show the approval payload, not a real external submission. + +## 2:35-3:00, Qwen tie-in +Show `hackathon/qwen_integration.py`, the architecture diagram, and the successful local validation. If a live Qwen credential is available, show the actual model response and timestamped request receipt. Otherwise state plainly that the repository contains the integration proof seam and that live deployment proof remains a pre-submission blocker. + +## Recording checklist + +- Use a clean browser/terminal capture and crop secrets. +- Capture the repository URL, LICENSE, README, integration code, architecture diagram, and validation output. +- If live deployment is shown, retain the request/response receipt and endpoint evidence. +- Upload as a public or unlisted video to an accepted host before Devpost submission. +- Do not claim a live deployment, public video, or accepted submission until the corresponding URL or receipt exists. From f18ff881da9fc068cad919476496c1c7a39bb70d Mon Sep 17 00:00:00 2001 From: Princeps Polycap <7855677+princepspolycap@users.noreply.github.com> Date: Sat, 18 Jul 2026 05:05:49 -0500 Subject: [PATCH 6/7] docs: add placeholder-safe Qwen deployment proof record --- hackathon/deployment_proof.md | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 hackathon/deployment_proof.md diff --git a/hackathon/deployment_proof.md b/hackathon/deployment_proof.md new file mode 100644 index 0000000..c79fbc1 --- /dev/null +++ b/hackathon/deployment_proof.md @@ -0,0 +1,41 @@ +# Qwen Cloud deployment proof record + +> **Status: NOT VERIFIED.** This file is a submission-safe template. It contains no API key, endpoint secret, fabricated response, or claim of a live Alibaba Cloud/Qwen deployment. + +## What must be recorded before Devpost submission + +Complete every field from the actual run and attach the resulting receipt or public evidence. Do not replace `NOT VERIFIED` with `VERIFIED` based on a local compile or a mocked response. + +| Field | Value | +| --- | --- | +| Deployment status | `NOT VERIFIED` | +| Qwen service / model | `[record the service and model returned by the provider]` | +| Base URL host | `[record host only, never the API key or query secrets]` | +| Request timestamp (UTC) | `[ISO-8601 timestamp from the real run]` | +| Request receipt / provider request ID | `[provider-returned ID, if available]` | +| Response verification | `[record the observed response and validation method]` | +| Public evidence URL | `[public URL to an accepted proof artifact, or leave NOT AVAILABLE]` | + +## Reproducible run + +The live proof requires credentials supplied out-of-band. Do not commit them or paste them into an issue, pull request, recording, or this file. + +```bash +export QWEN_API_KEY='[from a secret manager; do not commit]' +export QWEN_BASE_URL='[provider-issued OpenAI-compatible endpoint]/v1' +export QWEN_MODEL='qwen-plus' # optional; use the model enabled for the account +python hackathon/qwen_integration.py +``` + +A successful local compile proves only that the adapter parses. A run without both required variables must fail closed with `QwenCloudError`; it is not deployment evidence. + +## Evidence checklist + +- [ ] A real Qwen Cloud endpoint and API key were supplied out-of-band. +- [ ] The request reached the provider and returned a response. +- [ ] The provider response or request ID was saved as an auditable receipt. +- [ ] Secrets were removed from logs, screenshots, and video. +- [ ] The public evidence URL resolves without exposing credentials. +- [ ] The Devpost packet links this record and the public repository. + +Until all applicable boxes are checked, retain `Deployment status: NOT VERIFIED` and describe the remaining blocker rather than claiming live deployment. From d5cc68dd93d2549e6dbf383979e2e45c60981a3f Mon Sep 17 00:00:00 2001 From: Princeps Polycap <7855677+princepspolycap@users.noreply.github.com> Date: Sat, 18 Jul 2026 05:06:23 -0500 Subject: [PATCH 7/7] docs: link Qwen deployment proof template from bundle README --- hackathon/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hackathon/README.md b/hackathon/README.md index a1182f3..fe5eaa4 100644 --- a/hackathon/README.md +++ b/hackathon/README.md @@ -10,6 +10,7 @@ This directory is a bounded proof bundle. It does not claim a live Qwen deployme ## Evidence map - [`qwen_integration.py`](qwen_integration.py): OpenAI-compatible Qwen Cloud adapter. Fails closed when credentials are absent. +- [`deployment_proof.md`](deployment_proof.md): placeholder-safe live deployment receipt template. It remains explicitly unverified until a real provider response exists. - [`architecture.svg`](architecture.svg): rendered architecture diagram. - [`demo_script.md`](demo_script.md): three-minute recording plan. - [`../LICENSE`](../LICENSE): MIT license for the repository. @@ -35,4 +36,4 @@ The demo is designed to show: planning, tool routing, source grounding, durable python -m py_compile hackathon/qwen_integration.py ``` -Expected behavior without credentials is a clear `QwenCloudError`, not a fabricated response. This is intentional receipt-first behavior. +Expected behavior without credentials is a clear `QwenCloudError`, not a fabricated response. This is intentional receipt-first behavior. See [`deployment_proof.md`](deployment_proof.md) for the exact evidence still required for a live claim.