agenttwin 0.2.2 → 0.3.1
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 +31 -15
- package/dist/api.js +797 -69
- package/dist/cli.js +693 -290
- package/dist/dashboard/assets/dashboard/agent-home.css +405 -0
- package/dist/dashboard/assets/dashboard/agent-home.js +264 -0
- package/dist/dashboard/assets/dashboard/dashboard.js +118 -133
- package/dist/dashboard/assets/dashboard/hosted.js +56 -17
- package/dist/dashboard/assets/dashboard/moonlit-coast.png +0 -0
- package/dist/dashboard/assets/dashboard/workflows.js +39 -0
- package/dist/dashboard/assets/dashboard/workspace.css +156 -0
- package/dist/dashboard/assets/vendor/dompurify.LICENSE +202 -0
- package/dist/dashboard/assets/vendor/marked.LICENSE +44 -0
- package/dist/dashboard/assets/vendor/marked.js +82 -0
- package/dist/dashboard/assets/vendor/purify.min.js +7 -0
- package/dist/dashboard/index.html +109 -32
- package/dist/gateway.js +799 -71
- package/package.json +1 -1
|
@@ -2,28 +2,56 @@
|
|
|
2
2
|
const el=id=>document.getElementById(id);
|
|
3
3
|
const safe=value=>String(value??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));
|
|
4
4
|
let connection=null,bundle=null,jobs=[],loading=false,submitting=false;
|
|
5
|
+
function clearPreparedUpload(){bundle=null;submissions.clear();el('bundle-consent').checked=false;el('bundle-review').innerHTML='<p class="coverage">Select a prepared workflow bundle to review its files and configuration.</p>';dispatchEvent(new CustomEvent('agenttwin:bundle-cleared'));}
|
|
5
6
|
const submissions=new Map();
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
const loadedReceipts=new Set();
|
|
8
|
+
let discoveryStamp="",selectedProject=null,projectGeneration=0;
|
|
9
|
+
const projectPath=path=>selectedProject?path+'?project='+encodeURIComponent(selectedProject):path;
|
|
10
|
+
async function refreshDiscovery(){try{
|
|
11
|
+
const generation=projectGeneration,current=connection;
|
|
12
|
+
const list=await request('/v1/projects');if(generation!==projectGeneration||current!==connection)return;
|
|
13
|
+
window.agentTwinProjects=list.projects??[];dispatchEvent(new CustomEvent('agenttwin:projects'));
|
|
14
|
+
if(!selectedProject&&list.latest)selectedProject=list.latest;
|
|
15
|
+
const data=await request(projectPath('/v1/discovery'));if(generation!==projectGeneration||current!==connection)return;
|
|
16
|
+
if(data.inventory){const stamp=JSON.stringify(data.inventory);if(stamp!==discoveryStamp){window.agentTwinDashboard.importDiscovery(data.inventory);discoveryStamp=stamp;message('Connected to '+data.inventory.name+'.');}}
|
|
17
|
+
}catch(error){message('Discovery sync unavailable: '+error.message+'. You can still import discovery JSON.');}}
|
|
18
|
+
async function selectProject(name){
|
|
19
|
+
if(!connection)throw new Error('Connect your account to switch repositories.');
|
|
20
|
+
const data=await request('/v1/discovery?project='+encodeURIComponent(name));
|
|
21
|
+
selectedProject=name;projectGeneration++;discoveryStamp='';clearPreparedUpload();window.agentTwinDashboard.clearProject();window.agentTwinDashboard.importDiscovery(data.inventory);discoveryStamp=JSON.stringify(data.inventory);state();
|
|
22
|
+
}
|
|
8
23
|
const message=text=>{el('api-message').textContent=text;};
|
|
24
|
+
// Live state for the Home view: real job list and connection, nothing synthesized.
|
|
25
|
+
const publish=()=>{window.agentTwinHosted={connected:!!connection,jobs:jobs.map(job=>({id:job.id,status:job.status,createdAt:job.createdAt}))};dispatchEvent(new CustomEvent('agenttwin:jobs'));};
|
|
9
26
|
const digest=async bytes=>Array.from(new Uint8Array(await crypto.subtle.digest('SHA-256',bytes)),v=>v.toString(16).padStart(2,'0')).join('');
|
|
10
27
|
const textDigest=value=>digest(new TextEncoder().encode(value));
|
|
11
|
-
function state(){el('workflow-connection').innerHTML=connection?'
|
|
28
|
+
function state(){publish();el('account-menu-status').textContent=connection?'Account connected':'Not connected';el('account-connection-status').textContent=connection?'Connected to '+connection.base:'Not connected';el('account-disconnect').disabled=!connection;el('history-view').classList.toggle('account-connected',!!connection);el('workflow-connection').innerHTML=connection?'CLI tests sync to this workspace. Cloud execution is optional.':'Connect your account before executing. <button type="button" data-action="settings">Open settings →</button>'; el('api-disconnect').disabled=!connection;el('api-sync-settings').disabled=!connection||loading;el('refresh-api-jobs').disabled=!connection||loading;el('submit-hosted-run').disabled=!connection||!bundle||!el('bundle-consent').checked||submitting;}
|
|
12
29
|
async function request(path,options={}){
|
|
13
30
|
const current=connection;if(!current)throw new Error('Connect to the API first.');
|
|
14
|
-
const response=await fetch(current.base+path,{...options,headers:{authorization:'Bearer '+current.token,'content-type':'application/json'},redirect:'error',signal:AbortSignal.timeout(20000)});
|
|
31
|
+
const response=await fetch(current.base+path,{...options,headers:{authorization:'Bearer '+current.token,'content-type':'application/json'},redirect:'error',signal:AbortSignal.timeout(path.split('?')[0]==='/v1/chat'?55000:20000)});
|
|
15
32
|
if(connection!==current)throw new Error('Connection changed.');
|
|
16
|
-
const data=await response.json();if(!response.ok)throw new Error(data.error||'API request failed: '+response.status);return data;
|
|
33
|
+
const data=await response.json();if(!response.ok)throw Object.assign(new Error(data.message||data.error||'API request failed: '+response.status),{data});return data;
|
|
34
|
+
}
|
|
35
|
+
function renderJobs(){el('api-jobs').innerHTML=jobs.length?jobs.map(job=>`<article class="candidate-row"><div><h3>${safe(window.agentTwinDashboard.getReceipts().find(r=>r.apiJobId===job.id)?.name.replaceAll('_',' ')||'Run '+job.id.slice(0,8))}</h3><p class="muted">${safe(window.agentTwinDashboard.getReceipts().find(r=>r.apiJobId===job.id)?.status||job.status)} · ${safe(job.createdAt)} · ${safe(job.id.slice(0,8))}</p></div><div class="actions">${['queued','running','cancelling'].includes(job.status)?`<button type="button" data-cancel-job="${safe(job.id)}" ${job.status==='cancelling'?'disabled':''}>${job.status==='cancelling'?'Cancelling…':'Cancel run'}</button>`:''}${job.status==='completed'?`<button type="button" data-inspect-job="${safe(job.id)}">Inspect run ↗</button>`:''}${job.status==='error'||job.status==='cancelled'?`<button type="button" data-inspect-job="${safe(job.id)}">View details</button>`:''}</div></article>`).join(''):(connection?'<div class="run-empty"><h2>Your first run starts here.</h2><p>Test a workflow through npx agenttwin run, then sync its evidence here.</p><button type="button" data-action="configure">Choose a workflow →</button></div>':'<div class="run-empty"><span class="intro-mark" aria-hidden="true">↻</span><h2>Every run leaves evidence.</h2><p>Connect your account to see execution results, state changes and what needs fixing.</p><button type="button" data-action="settings">Connect your account →</button></div>');}
|
|
36
|
+
async function loadRecentReceipts(){
|
|
37
|
+
const current=connection;
|
|
38
|
+
for(const item of jobs.filter(j=>j.status==='completed'&&!loadedReceipts.has(j.id)).slice(0,window.agentTwinPreferences?.receiptLimit??25)){
|
|
39
|
+
const job=await request('/v1/runs/'+item.id);
|
|
40
|
+
if(connection!==current)return;
|
|
41
|
+
if(job.receipt){if(job.receipt.apiJobId!==job.id)throw new Error('Receipt belongs to a different job.');window.agentTwinDashboard.importReceipt(job.receipt,{navigate:false});loadedReceipts.add(job.id);}
|
|
42
|
+
}
|
|
43
|
+
renderJobs();
|
|
17
44
|
}
|
|
18
|
-
function
|
|
19
|
-
async function refresh(){if(!connection||loading)return;loading=true;state();try{const data=await request('/v1/runs');if(!Array.isArray(data.jobs)||data.jobs.some(job=>!/^[a-f0-9-]{36}$/.test(job.id)||!['queued','running','cancelling','cancelled','completed','error'].includes(job.status)))throw new Error('Invalid API job list.');jobs=data.jobs;renderJobs();}catch(error){message('Could not load jobs: '+error.message);}finally{loading=false;state();}}
|
|
45
|
+
async function refresh(){if(!connection||loading)return;loading=true;state();try{const data=await request('/v1/runs');if(!Array.isArray(data.jobs)||data.jobs.some(job=>!/^[a-f0-9-]{36}$/.test(job.id)||!['queued','running','cancelling','cancelled','completed','error'].includes(job.status)))throw new Error('Invalid API job list.');jobs=data.jobs;renderJobs();await loadRecentReceipts();}catch(error){message('Could not load jobs: '+error.message);}finally{loading=false;state();}}
|
|
20
46
|
el('api-connect').addEventListener('submit',async event=>{event.preventDefault();try{
|
|
21
47
|
const url=new URL(el('api-url').value.trim());if(url.username||url.password||url.search||url.hash||(url.protocol!=='https:'&&!(url.protocol==='http:'&&['127.0.0.1','localhost','[::1]'].includes(url.hostname))))throw new Error('Use HTTPS; loopback HTTP is allowed for development.');
|
|
22
48
|
const token=el('api-token').value.trim();if(!/^at_user_[a-f0-9]{64}$/.test(token))throw new Error('Use an individual at_user_ account token.');
|
|
23
|
-
window.agentTwinDashboard.clearAccount();discoveryStamp='';
|
|
24
|
-
connection=
|
|
25
|
-
|
|
26
|
-
|
|
49
|
+
clearPreparedUpload();window.agentTwinDashboard.clearAccount();loadedReceipts.clear();discoveryStamp='';selectedProject=null;projectGeneration++;
|
|
50
|
+
connection=null;jobs=[];state();
|
|
51
|
+
connection={base:url.href.replace(/\/$/,''),token};el('api-token').value='';jobs=[];renderJobs();state();const data=await request('/v1/runs');if(!Array.isArray(data.jobs))throw new Error('This API does not support dashboard job listing.');jobs=data.jobs;renderJobs();await refreshDiscovery();await loadRecentReceipts();state();const project=window.agentTwinDashboard.getProject();message(project.discovered?'Connected to '+project.name+'. Discovery and run evidence refresh automatically.':'Connected. Run npx agenttwin sync in your project to populate Environment and Workflows.');
|
|
52
|
+
}catch(error){clearPreparedUpload();window.agentTwinDashboard.clearAccount();connection=null;jobs=[];renderJobs();message('Connection failed: '+error.message);state();}});
|
|
53
|
+
el('api-sync-settings').addEventListener('click',async()=>{if(!connection)return;await refresh();if(connection)await refreshDiscovery();});
|
|
54
|
+
el('api-disconnect').addEventListener('click',()=>{clearPreparedUpload();window.agentTwinDashboard.clearAccount();connection=null;jobs=[];renderJobs();submissions.clear();loadedReceipts.clear();discoveryStamp="";selectedProject=null;projectGeneration++;message('Disconnected. Account token cleared from memory.');state();});
|
|
27
55
|
el('bundle-import').addEventListener('change',async event=>{bundle=null;el('bundle-consent').checked=false;state();try{
|
|
28
56
|
const file=event.target.files[0];if(!file)return;if(file.size>28*1024*1024)throw new Error('Bundle exceeds 28 MiB.');const data=JSON.parse(await file.text());
|
|
29
57
|
if(data.schema!=='agenttwin/upload-v1'||data.spec?.schema!=='agenttwin/world-v1'||!data.files||typeof data.files!=='object'||Array.isArray(data.files)||data.manifest?.schema!=='agenttwin/prepared-v1')throw new Error('Choose a bundle generated by agenttwin prepare.');
|
|
@@ -31,20 +59,31 @@
|
|
|
31
59
|
if(data.manifest.workflowId!==data.spec.workflowId||!data.spec.workflowId||JSON.stringify(data.manifest.invocation)!==JSON.stringify(data.spec.command)||Object.keys(data.manifest.sourceDigests??{}).length!==paths.length)throw new Error('Workflow provenance does not match.');
|
|
32
60
|
if(await textDigest(JSON.stringify(data.spec))!==data.manifest.specDigest)throw new Error('World digest does not match the reviewed bundle.');
|
|
33
61
|
let total=0;for(const path of paths){if(typeof path!=='string'||!path||path.startsWith('/')||path.includes('\\')||path.includes('\0')||path.split('/').some(p=>!p||p==='.'||p==='..'||/^(\.env.*|\.git|\.ssh|\.aws|\.azure|\.config|\.npmrc|\.netrc|credentials.*)$/i.test(p))||/\.(pem|key|p12|pfx)$/i.test(path))throw new Error('Unsafe bundle file path.');const encoded=data.files[path];if(typeof encoded!=='string')throw new Error('Missing file content.');const raw=atob(encoded);if(btoa(raw)!==encoded)throw new Error('File encoding is invalid.');const bytes=Uint8Array.from(raw,c=>c.charCodeAt(0));total+=bytes.length;if(total>20*1024*1024)throw new Error('Application exceeds 20 MiB.');if(await digest(bytes)!==data.manifest.sourceDigests[path])throw new Error('Source digest mismatch: '+path);}
|
|
34
|
-
bundle=data;el('bundle-review').innerHTML=`<h3>${safe(data.spec.name)}</h3><p class="mono">${safe(data.spec.command.join(' '))}</p><p class="coverage">${paths.length} actual files · ${total.toLocaleString()} bytes · ${safe(data.spec.timeoutSeconds)} second execution limit</p><details><summary>Review explicit upload</summary><pre>${safe(JSON.stringify({files:paths,mappings:data.manifest.mappings,world:data.spec},null,2))}</pre></details>`;message('Bundle digests verified. Review files and fixtures before upload.');
|
|
62
|
+
bundle=data;dispatchEvent(new CustomEvent('agenttwin:bundle',{detail:{spec:data.spec}}));el('bundle-review').innerHTML=`<h3>${safe(data.spec.name)}</h3><p class="mono">${safe(data.spec.command.join(' '))}</p><p class="coverage">${paths.length} actual files · ${total.toLocaleString()} bytes · ${safe(data.spec.timeoutSeconds)} second execution limit</p><details><summary>Review explicit upload</summary><pre>${safe(JSON.stringify({files:paths,mappings:data.manifest.mappings,world:data.spec},null,2))}</pre></details>`;message('Bundle digests verified. Review files and fixtures before upload.');
|
|
35
63
|
}catch(error){el('bundle-review').textContent='Bundle rejected: '+error.message;message(error.message);}finally{event.target.value='';state();}});
|
|
36
64
|
el('bundle-consent').addEventListener('change',state);
|
|
37
|
-
el('submit-hosted-run').addEventListener('click',async()=>{if(!bundle||!connection||!el('bundle-consent').checked||submitting)return;submitting=true;state();const submitted=bundle;try{message('Submitting reviewed files.
|
|
65
|
+
el('submit-hosted-run').addEventListener('click',async()=>{if(!bundle||!connection||!el('bundle-consent').checked||submitting)return;submitting=true;state();const submitted=bundle;try{message('Submitting reviewed files. The cloud runner will execute this workflow.');const job=await request('/v1/runs',{method:'POST',body:JSON.stringify({spec:submitted.spec,files:submitted.files,git:submitted.manifest.git,project:submitted.manifest.project})});if(!/^[a-f0-9-]{36}$/.test(job.id))throw new Error('Invalid API job ID.');submissions.set(job.id,submitted.manifest);el('bundle-consent').checked=false;message('Run accepted: '+job.id+'. Job status refreshes while this page is visible.');await refresh();}catch(error){message('Submission could not be confirmed: '+error.message+'. Refresh your account jobs before retrying.');}finally{submitting=false;state();}});
|
|
38
66
|
el('refresh-api-jobs').addEventListener('click',refresh);
|
|
39
67
|
el('api-jobs').addEventListener('click',async event=>{const cancel=event.target.closest('[data-cancel-job]'),inspect=event.target.closest('[data-inspect-job]');try{
|
|
40
68
|
if(cancel){cancel.disabled=true;const data=await request('/v1/runs/'+cancel.dataset.cancelJob,{method:'DELETE'});message('Run '+data.status+'. Cancellation does not refund the submission quota.');await refresh();}
|
|
41
|
-
if(inspect)
|
|
69
|
+
if(inspect)await inspectJob(inspect.dataset.inspectJob);
|
|
42
70
|
}catch(error){message('API action failed: '+error.message);if(cancel)cancel.disabled=false;}});
|
|
43
|
-
|
|
44
|
-
|
|
71
|
+
async function inspectJob(id){
|
|
72
|
+
const job=await request('/v1/runs/'+id);
|
|
73
|
+
if(job.receipt){
|
|
74
|
+
if(job.receipt.apiJobId!==job.id)throw new Error('Receipt belongs to a different job.');
|
|
75
|
+
const manifest=submissions.get(job.id);
|
|
76
|
+
if(manifest&&(manifest.specDigest!==job.receipt.specDigest||JSON.stringify(Object.entries(manifest.sourceDigests).sort())!==JSON.stringify(Object.entries(job.receipt.sourceDigests??{}).sort())))throw new Error('Receipt does not match the submitted source/world.');
|
|
77
|
+
window.agentTwinDashboard.importReceipt(job.receipt);
|
|
78
|
+
}else{window.agentTwinDashboard.go('history');message(job.error||'Run '+job.status+'.');}
|
|
79
|
+
}
|
|
80
|
+
// Narrow authenticated actions; never expose the token or a generic request method.
|
|
81
|
+
window.agentTwinAccount={refreshRuns:refresh,selectProject,workflows:()=>request(projectPath('/v1/workflows')),saveWorkflow:input=>request(projectPath('/v1/workflows'),{method:'POST',body:JSON.stringify(input)}),chat:()=>request(projectPath('/v1/chat')),sendChat:input=>request(projectPath('/v1/chat'),{method:'POST',body:JSON.stringify(input)}),inspectJob};
|
|
82
|
+
setInterval(()=>{if(!document.hidden&&connection&&window.agentTwinPreferences?.autoRefresh!==false){void refreshDiscovery();void refresh();}},10000);
|
|
83
|
+
setInterval(()=>{if(!document.hidden&&connection&&window.agentTwinPreferences?.autoRefresh!==false&&jobs.some(job=>['queued','running','cancelling'].includes(job.status)))void refresh();},3000);
|
|
45
84
|
const configuredApi=document.querySelector('meta[name="agenttwin-api-url"]')?.content;
|
|
46
85
|
if(configuredApi)el('api-url').value=configuredApi;
|
|
47
86
|
else if(location.protocol==='https:'&&location.pathname.startsWith('/dashboard/'))el('api-url').value=location.origin;
|
|
48
|
-
state();
|
|
87
|
+
renderJobs();state();
|
|
49
88
|
})();
|
|
50
89
|
|
|
Binary file
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
(()=>{
|
|
2
|
+
const $=id=>document.getElementById(id);
|
|
3
|
+
const esc=value=>String(value??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));
|
|
4
|
+
let saved=[],project=null,selected=null,generation=0;
|
|
5
|
+
function faultControls(){
|
|
6
|
+
try{const spec=JSON.parse($('workflow-spec').value);$('workflow-fault-type').value=spec.fault?.type||'none';$('workflow-fault-delay').value=spec.fault?.delayMs||1200;const targets=(spec.services||[]).flatMap(service=>(service.collections||[]).map(collection=>({service:service.name,path:collection.path})));$('workflow-fault-target').innerHTML=targets.map(target=>`<option value="${esc(JSON.stringify(target))}">${esc(target.service+' '+target.path)}</option>`).join('');if(spec.fault)$('workflow-fault-target').value=JSON.stringify({service:spec.fault.service,path:spec.fault.path});}
|
|
7
|
+
catch{$('workflow-fault-target').innerHTML='<option value="">Load a valid configuration first</option>';}
|
|
8
|
+
}
|
|
9
|
+
$('workflow-spec').addEventListener('input',faultControls);
|
|
10
|
+
$('workflow-apply-fault').addEventListener('click',()=>{try{const spec=JSON.parse($('workflow-spec').value);if($('workflow-fault-type').value==='none')delete spec.fault;else{const target=JSON.parse($('workflow-fault-target').value),delayMs=Number($('workflow-fault-delay').value);if(!Number.isInteger(delayMs)||delayMs<1||delayMs>10000)throw new Error('Delay must be 1–10000 milliseconds.');spec.fault={...target,type:'timeout-after-write',delayMs};}$('workflow-spec').value=JSON.stringify(spec,null,2);faultControls();note('Scenario applied to this draft. Save or export it, rebuild your bundle, then review the new upload before running.');}catch(error){note('Scenario was not changed: '+error.message);}});
|
|
11
|
+
const note=text=>{$('workflow-save-status').textContent=text;};
|
|
12
|
+
function render(){
|
|
13
|
+
$('workflow-saved-list').innerHTML=saved.length?saved.map(w=>`<article class="candidate-row"><div><h3>${esc(w.spec.name)}</h3><p class="mono">${esc(w.spec.command.join(' '))}</p><p class="coverage">Draft · revision ${w.revision} · ${esc(w.project)} · bundle required to run</p></div><button type="button" data-edit-workflow="${esc(w.id)}">Edit configuration</button></article>`).join(''):'<p class="coverage">No saved contracts for this project.</p>';
|
|
14
|
+
}
|
|
15
|
+
async function refresh(){
|
|
16
|
+
const current=++generation;selected=null;saved=[];project=null;render();$('workflow-spec').value='';faultControls();
|
|
17
|
+
if(!window.agentTwinHosted?.connected){note('Connect an account and sync project discovery to save contracts.');return;}
|
|
18
|
+
try{const data=await window.agentTwinAccount.workflows();if(current!==generation)return;saved=data.workflows;project=data.project;render();note(project?'Project: '+project:'Run npx agenttwin init, then sync discovery first.');}
|
|
19
|
+
catch(error){if(current===generation)note('Could not load contracts: '+error.message);}
|
|
20
|
+
}
|
|
21
|
+
$('workflow-refresh').addEventListener('click',refresh);
|
|
22
|
+
$('workflow-saved-list').addEventListener('click',e=>{const button=e.target.closest('[data-edit-workflow]');if(!button)return;selected=saved.find(w=>w.id===button.dataset.editWorkflow);$('workflow-spec').value=JSON.stringify(selected.spec,null,2);$('workflow-editor').open=true;faultControls();note('Editing revision '+selected.revision+'. Saving invalidates any previous bundle approval.');});
|
|
23
|
+
$('workflow-save').addEventListener('click',async()=>{
|
|
24
|
+
if(!project){note('Connect your account and sync discovery first.');return;}
|
|
25
|
+
const current=generation;$('workflow-save').disabled=true;
|
|
26
|
+
try{const spec=JSON.parse($('workflow-spec').value);const data=await window.agentTwinAccount.saveWorkflow({project,spec,...(selected?{id:selected.id,revision:selected.revision}:{})});if(current!==generation)return;selected=data.workflow;saved=[selected,...saved.filter(w=>w.id!==selected.id)];render();note('Draft saved · revision '+selected.revision+'. Rebundle application files before execution.');}
|
|
27
|
+
catch(error){if(current===generation)note('Draft was not saved: '+error.message);}
|
|
28
|
+
finally{$('workflow-save').disabled=false;}
|
|
29
|
+
});
|
|
30
|
+
$('workflow-new').addEventListener('click',()=>{selected=null;$('workflow-spec').value='';faultControls();note('Paste a valid world contract, then save.');});
|
|
31
|
+
$('workflow-export').addEventListener('click',()=>{try{const spec=JSON.parse($('workflow-spec').value);const url=URL.createObjectURL(new Blob([JSON.stringify(spec,null,2)+'\n'],{type:'application/json'}));const a=document.createElement('a');a.href=url;a.download='agenttwin.world.json';a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);note('Configuration exported. Review it and rebuild the source bundle before running.');}catch{note('Enter valid JSON before exporting.');}});
|
|
32
|
+
addEventListener('agenttwin:bundle',e=>{selected=null;$('workflow-spec').value=JSON.stringify(e.detail.spec,null,2);$('workflow-editor').open=true;faultControls();note('Imported bundle contract. Saving stores configuration only, not source files.');});
|
|
33
|
+
addEventListener('agenttwin:bundle-cleared',()=>{selected=null;$('workflow-spec').value='';faultControls();});
|
|
34
|
+
let connected=false;
|
|
35
|
+
addEventListener('agenttwin:jobs',()=>{const next=!!window.agentTwinHosted?.connected;if(connected!==next){connected=next;void refresh();}});
|
|
36
|
+
addEventListener('agenttwin:discovery',()=>void refresh());
|
|
37
|
+
render();faultControls();
|
|
38
|
+
|
|
39
|
+
})();
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/* AgentTwin workspace: neutral surfaces, one focal action, progressive detail.
|
|
2
|
+
The sidebar and generous command surface take cues from Claude / ChatGPT. */
|
|
3
|
+
:root{--ink:#eeeae5;--stage-ink:#eeeae5;--muted:#aaa7a1;--line:#363532;--soft:#252523;--accent:#e9e5de;--good:#a7ccb2;--bad:#e8aaa0;--workspace:#20201e;--sidebar:#171715;--surface:#292927}
|
|
4
|
+
html{background:var(--workspace);color-scheme:dark}body,.app-frame{background:var(--workspace);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;-webkit-font-smoothing:antialiased}.announce-strip{display:none}.app-frame{min-height:100dvh}.app-layout{grid-template-columns:240px minmax(0,1fr);background:var(--workspace)}
|
|
5
|
+
.topbar{height:64px;background:var(--workspace);border:0;padding:0 24px 0 20px;gap:16px;box-shadow:none}.brand{width:204px;flex:none;font-size:18px;letter-spacing:-.6px;font-weight:600;gap:10px}.brand img{width:30px;height:30px;background:transparent;border:0;padding:0;border-radius:8px}.workspace-name{font-size:13px;color:var(--muted);gap:10px}.workspace-divider{opacity:.4}#current-view{font-weight:450;color:#c7c3bd}.workspace-avatar{margin-left:auto;width:28px;height:28px;border:1px solid var(--line);background:#33332f;border-radius:50%;font-size:10px;color:#d8d4ce}
|
|
6
|
+
button,.upload{font-family:inherit;transition:background 150ms ease,color 150ms ease,border-color 150ms ease,transform 100ms ease;min-height:36px;border:1px solid #42413d;background:#2a2a27;color:var(--ink);border-radius:9px;padding:8px 13px;font-size:13px;font-weight:450;line-height:1.4;box-shadow:none}button:hover,.upload:hover{background:#343430;border-color:#575650;color:#fff}button:active{transform:translateY(1px)}button:disabled{background:#2a2a27;color:#83817b;border-color:var(--line);opacity:.6;cursor:not-allowed}button.primary,.terminal-command button{background:#e9e5de;color:#232320;border-color:#e9e5de;font-weight:550}button.primary:hover,.terminal-command button:hover{background:#fffaf1;border-color:#fffaf1;color:#171715}button:focus-visible,a:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid #9891ce;outline-offset:4px}input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #9891ce;outline-offset:2px}
|
|
7
|
+
.sidebar-toggle{display:grid;place-items:center;flex:none;width:32px;height:32px;min-height:32px;padding:6px;border:0;background:transparent;color:#b3b0a9}.sidebar-toggle svg,.sidebar-create svg{width:20px;height:20px;flex:none}.app-nav{background:var(--sidebar);border:0;padding:18px 12px 20px;top:64px;height:calc(100dvh - 64px)}.app-nav .sidebar-label{font-size:11px;font-weight:450;color:#86837d;padding:0 12px;margin:27px 0 8px}.sidebar-create{display:flex;align-items:center;gap:10px;text-align:left;min-height:42px;margin:0 4px;padding:10px 9px;border:0;background:transparent;color:#eeebe5;font-size:13px}.sidebar-create:hover{background:#292925}.app-nav .nav-item{min-height:40px;padding:10px 12px;border-radius:8px;font-size:13px;color:#b9b6b0;gap:12px}.app-nav .nav-item:hover{background:#242421;color:#f5f1e9}.app-nav .nav-item.active{background:#2d2d29;color:#f3efe7;box-shadow:none;border:0}.app-nav .nav-item img,.app-nav .nav-icon{width:17px;height:17px;opacity:.85}.app-nav .sidebar-note{border-color:#31312d;color:#8b8881;gap:9px;margin-top:20px;padding-top:18px}.app-nav .sidebar-note strong{font-weight:450;color:#b9b6ae}.app-nav .sidebar-note p{font-size:11px;color:#8b8881}.runtime-dot{background:#a9b8a8}.app-nav .nav-external{color:#77756f}
|
|
8
|
+
main{padding:34px 44px 28px;max-width:1440px;margin:0 auto;width:100%;min-width:0}.heading{gap:20px;margin:0 0 32px;align-items:center}.heading h1{font-size:30px;font-weight:550;line-height:1.25;letter-spacing:-1px;color:var(--ink)}.heading .muted{font-size:14px;line-height:1.6;color:var(--muted);margin-top:9px;max-width:64ch}.eyebrow{display:none}.section-title h2,h2{font-size:15px;font-weight:550;letter-spacing:-.2px}h3{font-weight:550}p{line-height:1.65}input,textarea,select{background:#252522;color:var(--ink);border-color:#44433d;border-radius:8px;font-size:13px;padding:11px 12px}input::placeholder,textarea::placeholder{color:#87847d}label{color:#bbb7b0;font-size:12px}pre{background:#171715;border:1px solid #36352f;border-radius:10px;color:#d3cfc7;font-size:12px;line-height:1.8;padding:18px}code,.mono{font-family:var(--mono);font-variant-numeric:tabular-nums}.coverage,.setup-note{color:var(--muted);font-size:12px;line-height:1.7}.coverage-strip{border-color:var(--line);font-size:12px;padding:18px 0;gap:24px}.coverage-strip b{color:var(--ink);font-weight:500}
|
|
9
|
+
/* First-use state has one action, rather than an empty analytics dashboard. */
|
|
10
|
+
#environment-view:not(.has-discovery){padding-top:clamp(48px,10vh,110px);max-width:800px;margin:0 auto}#environment-view:not(.has-discovery)>.heading{display:block;text-align:center;margin-bottom:30px}#environment-view:not(.has-discovery) .heading h1{font-size:clamp(28px,3.2vw,42px);font-weight:500;letter-spacing:-1.5px;line-height:1.2;text-wrap:balance}#environment-view:not(.has-discovery) .heading .muted{max-width:45ch;margin:15px auto 0;font-size:15px;line-height:1.7}#environment-view:not(.has-discovery) .heading .actions{justify-content:center;margin-top:20px}#environment-view:not(.has-discovery) .heading .upload{font-size:12px;border:0;background:transparent;color:#a9a59e;text-decoration:underline;text-underline-offset:4px}#environment-view:not(.has-discovery) #configure-run{display:none}#environment-view:not(.has-discovery) .discovery-onboarding{display:block;max-width:660px;margin:0 auto}#environment-view:not(.has-discovery) .workflow-area,#environment-view:not(.has-discovery) .environment-grid,#environment-view:not(.has-discovery) #environment-coverage,#environment-view:not(.has-discovery) .catalog-drawer,#environment-view:not(.has-discovery)>.coverage-note{display:none}
|
|
11
|
+
.terminal-panel{background:var(--surface);border:1px solid #41403a;border-radius:18px;overflow:hidden;box-shadow:0 6px 24px #00000012}.terminal-title{background:transparent;border:0;padding:20px 22px 0;align-items:center}.terminal-title h2{font-size:13px;font-weight:500;color:#ccc7bd}.terminal-title>span{font-size:11px;color:#99958d}.terminal-content{padding:18px 22px 20px}.terminal-command{border:0;background:transparent;padding:0;gap:12px;align-items:center;flex-wrap:wrap}.terminal-command code{font-size:16px;color:#f2ede3;font-weight:400;letter-spacing:-.3px;flex:1;white-space:nowrap}.command-prompt{color:#969087;font-size:18px}.terminal-command button{font-size:12px;min-height:36px;border-radius:8px;padding:8px 12px;gap:8px;display:flex;align-items:center}.terminal-command button span{font-size:15px}.terminal-comment{font:11px/1.6 Inter,sans-serif;color:#a29b8f;margin:13px 0 0}.terminal-output{font:12px/1.6 Inter,sans-serif;color:#b3ada2;margin:14px 0 0;padding:0;border:0}.terminal-output p{margin:0}.discovery-help{padding-top:12px;margin-top:12px;border-top:1px solid #3b3933;color:#b8b1a7;font-size:12px}.discovery-help summary{list-style:none;color:#c2bbb0;display:flex;justify-content:space-between;align-items:center}.discovery-help summary::after{content:'+';font-size:17px;color:#9b948a}.discovery-help[open] summary::after{content:'−'}.discovery-help summary::-webkit-details-marker{display:none}.discovery-help p{font-size:12px;max-width:60ch;margin:14px 0;line-height:1.8}.discovery-help button{background:transparent;border:0;padding:0;min-height:28px;color:var(--ink)}
|
|
12
|
+
.welcome-next{max-width:660px;margin:28px auto 0;text-align:center}.welcome-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:0;padding:0;list-style:none;text-align:left}.welcome-steps li{display:flex;gap:12px;align-items:start;padding:12px 0}.welcome-steps li>span{color:#77736b;font:11px/1.9 var(--mono)}.welcome-steps strong{font-size:12px;font-weight:500;color:#ccc6bb}.welcome-steps p{font-size:11px;color:#999387;line-height:1.6;margin:4px 0 0}.welcome-next>button{background:transparent;border:0;color:#a59e93;font-size:12px;margin-top:17px;gap:8px}.welcome-next>button:hover{color:#efe8db}.has-discovery .welcome-next{display:none}.has-discovery .discovery-onboarding{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;margin-bottom:30px}.has-discovery .terminal-panel{border-radius:12px;box-shadow:none}.workflow-area{background:transparent;border:0;padding:8px 0}.workflow-area .section-title{margin-bottom:18px}.workflow-area .section-title button{padding:0;min-height:24px;background:transparent;border:0;color:#b5afa4;font-size:12px}.workflow-area .tool-entry{padding:14px 0;border-bottom:1px solid var(--line);background:transparent}.tool-entry small{display:none}.tool-entry p{font:11px/1.7 var(--mono);color:#a7a092;overflow-wrap:anywhere}.tool-entry strong{font-size:13px;font-weight:500}.tool-route{background:transparent;color:#989184;border:0;font-size:10px}
|
|
13
|
+
/* The same system continues through map, execution, receipts and settings. */
|
|
14
|
+
.topology-panel{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#232320}.topology-heading{padding:16px 18px;background:#252522;border-color:var(--line)}.topology-heading h3{font-size:14px}.topology-heading>span{color:var(--muted);font-size:11px}.map-controls button{background:transparent;border-color:#444139;color:#c1baaf;font-size:11px;padding:6px 9px;min-height:28px}.topology-canvas{background-color:#20201d;background-image:radial-gradient(#4a473e .75px,transparent .75px);background-size:18px 18px;border-color:var(--line)}.resource-card,.environment-project{background:#2b2a26;border:1px solid #4a473e;border-radius:10px;box-shadow:0 3px 9px #00000017;color:var(--ink)}.resource-card:hover,.resource-card.map-selected{background:#333129;border-color:#827b6b}.resource-card strong{font-size:12px;color:#ede6d8}.resource-card p{color:#ada495}.resource-icon{background:#e6e2da;border-radius:7px;padding:4px}.resource-badge{border-radius:4px;font-size:9px}.map-resource-rail,.map-pagination{background:#252521;border-color:var(--line)}.map-resource-rail input{background:#20201d;font-size:12px}.map-resource-row{border-color:var(--line)}.map-resource-row:hover,.map-resource-row.active{background:#333129}.map-resource-row img{background:#e4e0d7;border-radius:5px;padding:2px}.map-hint,.topology-label{background:#302e27;color:#b9b09e;border:0;border-radius:5px}.map-empty{background:#252521;border-color:#454137;border-radius:12px}.map-empty p{font-size:12px}.discovery-area>.section-title{margin-top:24px}.catalog-drawer,.coverage-note{border-color:var(--line)}.catalog-drawer{margin-top:22px}.catalog-drawer summary,.coverage-note summary{font-size:12px;color:#b8b1a4}.connector-catalog{border-color:var(--line);border-radius:12px;grid-template-columns:repeat(3,minmax(0,1fr))}.connector-option{background:#252521;border-color:var(--line)}.connector-option:hover,.connector-option[aria-pressed=true]{background:#333128}.connector-option small{color:#a79f91}.connector-check{color:#d1c6b0}.connector-initial{background:#39352d;color:#d1c6b0}.connector-option img{background:#e4e0d7;border-radius:6px;padding:3px}.app-declaration{background:#292823;border-radius:12px}.environment-project .project-icon{background:transparent}
|
|
15
|
+
.workflow-register,.workflow-path{border-color:var(--line)}.workflow-register{margin-bottom:28px}.workflow-search{max-width:420px;margin:22px 0}.workflow-search input{background:#282824;padding:11px 13px}.candidate-row{padding:20px 4px;gap:24px;border-color:#37362f;border-radius:0;background:transparent}.candidate-row:hover{background:#272721}.candidate-row h3{font-size:14px;font-weight:500;color:#e8e2d6}.candidate-row .mono{color:#989080;font-size:11px;margin-top:6px}.candidate-row .muted{font-size:12px;line-height:1.65}.candidate-row button{font-size:12px;white-space:nowrap;background:transparent;border-color:#4b463b}.workspace-empty{padding:36px 0;max-width:65ch}.workspace-empty h3{font-size:17px;font-weight:500}.workspace-empty p{font-size:13px;margin:10px 0 20px}.workflow-path{margin:24px 0 30px;padding:22px 0}.workflow-path h2{font-size:13px}.workflow-path li::before{color:#a99f8b}.workflow-path li b{color:#d5cdbd;font-size:12px;font-weight:500}.workflow-path li span{font-size:12px;color:#a79e8d}.bundle-upload,.setup-card{background:#282823;border:1px solid #3e3b32;border-radius:12px;padding:24px}.bundle-upload{margin-bottom:24px}.bundle-consent{font-size:12px;line-height:1.7;color:#bdb39f}.bundle-consent input{accent-color:#d9ceba}.connection-note{border-color:#444036;color:#b9b09e;margin:16px 0}.connection-note button{color:#e4d8c0;text-decoration:underline;text-underline-offset:3px}.run-configuration{border-color:var(--line);border-radius:12px;overflow:hidden}.configuration-body{background:#23231e;padding:22px}.service-chip{background:#292822;border-color:#494435;border-radius:9px}.service-chip[aria-pressed=true]{background:#373328;border-color:#827257}.service-chip small,.service-chip[aria-pressed=true] small{color:#b7aa94}.run-configuration summary{padding:20px 22px;background:#272620}.configuration-toggle{font-size:11px;color:#b9aa91}.session-control{color:#d0c3ac}.prepared-world{background:#25231d;border-color:var(--line)}
|
|
16
|
+
.stats{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:22px 0;gap:20px;margin:26px 0}.stat p{color:#a99d88;font-size:11px}.stat strong{font-size:28px;font-weight:450;font-variant-numeric:tabular-nums}.stat small{color:#938873}.workspace{border:1px solid #3e392e;border-radius:12px;grid-template-columns:240px minmax(0,1fr)}.run-sidebar{background:#26231d;border-color:#3e392e}.detail{background:#24221c;padding:26px}.run-row:hover,.run-row[aria-pressed=true]{background:#353027;border-color:#514635}.run-row strong{font-size:12px}.run-row .sub{color:#a59780}.tabs{gap:20px;border-color:#463c2d}.tabs button{color:#b4a388;font-size:12px}.tabs button[aria-selected=true]{color:#eee2ca;border-bottom-color:#d5c19a}.result-banner,.result-banner.passed{background:#293027;border-color:#49553f;border-radius:9px}.result-banner:not(.passed){background:#352821;border-color:#664c39}.result-banner strong{font-size:13px}.result-banner p{font-size:12px}.table-scroll{border:1px solid #41372a;border-radius:8px}table th{background:#30291f;font-size:11px;color:#b3a186}table td{border-color:#41372a;padding:13px 12px;font-size:12px}table td small{color:#a79578}.fact{border-color:#463a29}.fact dt{color:#b5a080}.fact dd{color:#dfcbaa}.metadata{color:#a99b83}.status{background:transparent!important;padding:0;color:#abc49b}.status.failed,.status.error{color:#e5b096}.section-title h2,.candidate-row h3,.workflow-path h2{color:var(--ink)}#settings-view{max-width:760px}#api-connect{padding:28px;border-radius:14px}#api-connect label{display:block;margin:0 0 8px;color:#c3b497;font-weight:450}#api-connect input{margin:0 0 24px;background:#25221b}#api-connect .actions{gap:10px}.setup-note{max-width:65ch}
|
|
17
|
+
/* All surfaces use neutral grays; status color communicates recorded state only. */
|
|
18
|
+
.workflow-path,.configuration-body,.service-chip,.bundle-upload,.setup-card,.prepared-world,.run-configuration summary,.run-sidebar,.detail,#api-connect input,.connector-option,.map-resource-rail,.map-pagination,.app-declaration{background:var(--soft);border-color:var(--line)}.candidate-row:hover,.run-row:hover,.run-row[aria-pressed=true],.connector-option:hover,.connector-option[aria-pressed=true],.service-chip[aria-pressed=true]{background:#34342f;border-color:#626158}.candidate-row .mono,.workflow-path li span,.service-chip small,.service-chip[aria-pressed=true] small,.run-row .sub,.metadata,.fact dt,.stat p,.stat small,table td small,#api-connect label,.runtime-coverage-list small{color:var(--muted)}.workflow-path li b,.fact dd,.tabs button[aria-selected=true]{color:var(--ink)}table th{background:#2d2d28;color:#bcb9b0}table td,.fact,.tabs,.table-scroll,.run-configuration{border-color:var(--line)}.tabs button[aria-selected=true]{border-bottom-color:#ddd8cd}.connector-check,.configuration-toggle,.session-control{color:#bcb6a9}#api-message:not(:empty){background:#2b2b26;color:#d8d1c2;border-left:2px solid #918776;border-radius:6px;font-size:12px;padding:12px 16px}.workspace-empty h3{color:var(--ink)}footer{border:0;color:#79766e;font-size:11px;justify-content:center;margin-top:36px;padding:12px 0}footer a{display:none}.sidebar-collapsed .app-layout{grid-template-columns:minmax(0,1fr)}.sidebar-collapsed .app-nav{display:none}.sidebar-collapsed .brand{width:auto}.sidebar-collapsed main{max-width:1440px}.welcome-next~.coverage-note{font-size:12px}
|
|
19
|
+
@media(min-width:1500px){main{padding:42px 56px}.topbar{padding-right:32px}#environment-view:not(.has-discovery){padding-top:12vh}}
|
|
20
|
+
@media(max-width:1050px){.app-layout{grid-template-columns:210px minmax(0,1fr)}.brand{width:174px}main{padding:28px}.has-discovery .discovery-onboarding{grid-template-columns:1fr}.terminal-command code{font-size:14px}.workspace{grid-template-columns:200px minmax(0,1fr)}}
|
|
21
|
+
@media(max-width:700px){.app-layout{grid-template-columns:170px minmax(0,1fr)}.brand{width:134px;font-size:15px}.brand img{width:26px;height:26px}.topbar{padding:0 14px;gap:10px}.workspace-name>span:first-child,.workspace-divider{display:none}.app-nav{padding:12px 8px}.app-nav .nav-item{font-size:12px;gap:9px;padding:10px}.sidebar-create{font-size:12px;gap:8px;margin:0;padding:10px}.sidebar-create svg{width:17px}.sidebar-note{margin-left:10px!important;margin-right:10px!important}main{padding:24px 18px}#environment-view:not(.has-discovery){padding-top:34px}.heading{display:block}.heading .actions{margin-top:16px}#environment-view:not(.has-discovery) .heading h1{font-size:29px;letter-spacing:-.9px}.heading h1{font-size:26px}.terminal-title{padding:17px 16px 0}.terminal-title>span{display:none}.terminal-content{padding:16px}.terminal-command code{font-size:13px;letter-spacing:-.5px}.terminal-command button{width:100%;justify-content:center;margin-top:5px}.welcome-steps{grid-template-columns:1fr;gap:0;max-width:240px;margin:0 auto}.welcome-next>button{text-align:center}.coverage-strip{flex-wrap:wrap;gap:12px}.candidate-row{flex-wrap:wrap;gap:12px}.candidate-row button{max-width:100%;white-space:normal}.connector-catalog{grid-template-columns:1fr}.connector-option{border-right:0}.workspace{grid-template-columns:1fr}.run-sidebar{border-right:0;border-bottom:1px solid var(--line)}.detail{padding:18px}.stats{grid-template-columns:repeat(2,1fr);gap:18px}.stat:nth-child(2){border:0}.map-controls{flex-wrap:wrap}.topology-heading{flex-wrap:wrap;padding:14px}.setup-card{padding:20px}.workflow-path ol{grid-template-columns:1fr}footer{line-height:1.6;text-align:center}.workspace-name{font-size:12px}.sidebar-collapsed #environment-view:not(.has-discovery){padding-top:8vh}}
|
|
22
|
+
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
|
|
23
|
+
main{background:var(--workspace)}
|
|
24
|
+
#environment-view:not(.has-discovery){padding-top:clamp(20px,5vh,60px)}
|
|
25
|
+
#environment-view:not(.has-discovery) .catalog-drawer[open]{display:block}
|
|
26
|
+
.workflow-intro,.run-empty{max-width:550px;margin:36px auto 44px;padding:28px 20px;text-align:center}.workflow-intro h2,.run-empty h2{font-size:25px;line-height:1.3;letter-spacing:-.6px;font-weight:500;margin:10px 0}.workflow-intro p,.run-empty p{font-size:14px;line-height:1.8;color:var(--muted);max-width:45ch;margin:12px auto 22px}.intro-mark{display:block;font-size:38px;line-height:1;color:#c4bfb3;font-weight:300;margin:0 0 22px}.workflow-intro button,.run-empty button{background:#e6e1d7;color:#252521;border-color:#e6e1d7}.workflow-intro button:hover,.run-empty button:hover{background:#f5f0e6;color:#171715}
|
|
27
|
+
#configure-view:not(.has-workflows) .workflow-path{display:none}#configure-view:not(.has-workflows) .bundle-upload{max-width:720px;margin:0 auto 24px}#configure-view:not(.has-workflows) .run-configuration,#configure-view:not(.has-workflows)>.coverage-note{max-width:720px;margin:22px auto}.workflow-search{max-width:100%;font-size:0}.workflow-search input{font-size:13px}
|
|
28
|
+
#history-view:not(.has-results) .stats,#history-view:not(.has-results) .workspace{display:none}#history-view:not(.account-connected) .submitted-jobs>.section-title{display:none}#history-view:not(.account-connected) #refresh-api-jobs{display:none}#history-view:not(.account-connected) #api-jobs{min-height:340px}.run-empty{margin:48px auto}
|
|
29
|
+
#settings-view{max-width:660px;margin:0 auto}.setup-card label{color:var(--ink)}.status.passed{color:#a8c3a8}.workflow-area .workflow-empty{padding:16px 0}.workflow-area .workflow-empty img{opacity:.5;filter:invert(1)}
|
|
30
|
+
|
|
31
|
+
@media(max-width:540px){.app-layout{grid-template-columns:64px minmax(0,1fr)}.app-nav{padding:12px 8px}.app-nav .nav-item,.sidebar-create{font-size:0;justify-content:center;padding:12px 8px;gap:0}.app-nav .sidebar-label,.app-nav .sidebar-note,.app-nav .nav-external{display:none}.app-nav .nav-item img,.app-nav .nav-icon,.sidebar-create svg{width:20px;height:20px}.brand{width:auto}.topbar{gap:12px}.terminal-command code{white-space:normal;overflow-wrap:anywhere}.heading .actions{flex-wrap:wrap}.welcome-next{padding-top:18px}#environment-view:not(.has-discovery){padding-top:20px}.workflow-intro,.run-empty{padding:20px 0;margin:24px auto}.bundle-upload{padding:16px}.service-grid{grid-template-columns:1fr}#api-connect{padding:20px}.sidebar-collapsed .app-layout{grid-template-columns:minmax(0,1fr)}}
|
|
32
|
+
|
|
33
|
+
#history-view.has-results:not(.account-connected) .submitted-jobs{display:none}
|
|
34
|
+
/* Account controls and practical browser-scoped settings. */
|
|
35
|
+
.account-control{position:relative;margin-left:auto;flex:none}.account-control .workspace-avatar{margin:0;padding:0;min-height:32px;width:32px;height:32px;cursor:pointer}.account-control .workspace-avatar:hover{background:#45453f}.account-menu{position:absolute;right:0;top:43px;width:245px;background:#292927;border:1px solid #484841;border-radius:12px;box-shadow:0 12px 40px #0006;z-index:50;padding:16px 8px 8px}.account-menu[hidden]{display:none}.account-menu .menu-label{font-size:11px;color:var(--muted);margin:0 8px 4px}.account-menu strong{display:block;font-size:14px;font-weight:500;margin:0 8px;overflow-wrap:anywhere}.account-menu p.muted{font-size:12px;margin:6px 8px 14px}.account-menu button{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:7px}.account-menu button:hover{background:#383833}.account-menu button:disabled{color:#77776f}.account-menu button:last-child{border-top:1px solid var(--line);border-radius:0 0 7px 7px;margin-top:6px;padding-top:12px}
|
|
36
|
+
#settings-view{max-width:800px}#settings-view>.heading{margin-bottom:32px}.settings-section{background:transparent;border:1px solid var(--line);border-radius:12px;margin:0 0 24px;padding:24px 28px}.settings-section-heading{margin:0 0 10px}.settings-section-heading:not(:first-child){margin-top:30px;padding-top:24px;border-top:1px solid var(--line)}.settings-section-heading h2{font-size:15px;line-height:1.5;margin:0 0 6px}.settings-section-heading p{font-size:12px;line-height:1.6;color:var(--muted);margin:0;max-width:60ch}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:28px;padding:16px 0}.setting-row>div:first-child{max-width:420px}.setting-row label{display:block;font-size:13px;font-weight:500;color:var(--ink)}.setting-row p{font-size:12px;color:var(--muted);margin:5px 0 0;line-height:1.6}.setting-row>input[type=text]{max-width:230px;min-width:0;width:100%}.setting-unit{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px;flex:none}.setting-unit input{width:80px}.setting-row input[type=checkbox]{appearance:none;flex:none;width:36px;height:21px;border:1px solid #53534b;border-radius:20px;padding:0;background:#33332f;cursor:pointer;position:relative}.setting-row input[type=checkbox]::after{content:'';position:absolute;top:3px;left:3px;width:13px;height:13px;border-radius:50%;background:#aaa79f;transition:transform 150ms ease}.setting-row input[type=checkbox]:checked{background:#e5e1d8;border-color:#e5e1d8}.setting-row input[type=checkbox]:checked::after{background:#252522;transform:translateX(15px)}.settings-save{border-top:1px solid var(--line);padding-top:20px;margin-top:16px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.settings-save p{font-size:12px;color:var(--muted);flex:1;margin:0;min-width:170px}.connection-status{font-size:12px;border-left:2px solid #817f73;padding-left:10px;color:var(--muted);margin:18px 0 24px;overflow-wrap:anywhere}#api-connect .token-input{display:flex;align-items:flex-start;gap:8px}#api-connect .token-input input{flex:1;min-width:0}#api-connect .token-input button{min-height:42px}#api-connect .settings-section-heading{margin-bottom:12px}.settings-about dl{margin:16px 0 20px}.settings-about dl>div{display:grid;grid-template-columns:140px 1fr;gap:20px;padding:10px 0;font-size:12px;line-height:1.6}.settings-about dt{color:var(--muted)}.settings-about dd{margin:0;color:var(--ink)}.settings-about a{color:var(--ink);font-size:12px;text-underline-offset:4px}.compact-density .candidate-row{padding-top:9px;padding-bottom:9px;min-height:0}.compact-density .run-row{padding-top:8px;padding-bottom:8px}.reduce-motion *,.reduce-motion *::before,.reduce-motion *::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
|
|
37
|
+
@media(max-width:700px){.settings-section{padding:20px}.setting-row{gap:18px}.setting-row:has(input[type=text]){align-items:flex-start;flex-direction:column;gap:12px}.setting-row>input[type=text]{max-width:100%}.settings-about dl>div{grid-template-columns:1fr;gap:3px}.settings-save p{flex-basis:100%}.account-control{display:block}.account-menu{width:min(245px,85vw)}.topbar .workspace-name{min-width:0;overflow:hidden}.topbar .workspace-name>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}}
|
|
38
|
+
.account-control .workspace-avatar{display:grid;place-items:center}
|
|
39
|
+
@media(max-width:540px){.setting-row:has(.setting-unit){flex-direction:column;align-items:flex-start;gap:12px}.setting-row:has(.setting-unit)>div:first-child{max-width:none}.topbar .brand{font-size:14px}.topbar{gap:10px}.topbar .workspace-name{flex:1}}
|
|
40
|
+
#api-connect{display:block}
|
|
41
|
+
/* ---- Unified cool-dark theme: workspace views share the agent-home palette ---- */
|
|
42
|
+
:root{--workspace:#101013;--sidebar:#141419;--surface:#161619;--soft:#1b1b1f;--line:#26262c;--ink:#ececee;--muted:#8f929c;--accent:#4c6fff;--good:#3fbf7f;--bad:#e5484d}
|
|
43
|
+
.topbar{background:#101013;border-bottom:1px solid #1d1d23}
|
|
44
|
+
.brand{color:var(--ink)}
|
|
45
|
+
.workspace-name{color:var(--muted)}#current-view{color:#c9ccd5}
|
|
46
|
+
.workspace-avatar{background:#26262c;border-color:#2c2c33;color:#c9ccd5}
|
|
47
|
+
.sidebar-toggle{color:#a9adb8}
|
|
48
|
+
.app-nav{background:var(--sidebar);border-right:1px solid #1d1d23}
|
|
49
|
+
.sidebar-create{color:var(--ink)}.sidebar-create:hover{background:#232330}
|
|
50
|
+
.app-nav .sidebar-label{color:#7e828d}
|
|
51
|
+
.app-nav .nav-item{color:#a9adb8;border-radius:8px}
|
|
52
|
+
.app-nav .nav-item:hover{background:#232330;color:#fff}
|
|
53
|
+
.app-nav .nav-item.active{background:#232330;color:#fff}
|
|
54
|
+
.app-nav .nav-icon{color:#a9adb8}
|
|
55
|
+
.app-nav .sidebar-note{border-color:#26262c;color:#7e828d}
|
|
56
|
+
.app-nav .sidebar-note strong{color:#c9ccd5}
|
|
57
|
+
button,.upload{background:#1b1b20;border-color:#2c2c33;color:var(--ink)}
|
|
58
|
+
button:hover,.upload:hover{background:#24242b;border-color:#3a3a44;color:#fff}
|
|
59
|
+
button.primary,.terminal-command button{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:550}
|
|
60
|
+
button.primary:hover,.terminal-command button:hover{background:#5d7dff;border-color:#5d7dff;color:#fff}
|
|
61
|
+
button:focus-visible,a:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline-color:#5d7dff}
|
|
62
|
+
input:focus-visible,textarea:focus-visible,select:focus-visible{outline-color:#5d7dff}
|
|
63
|
+
input,textarea,select{background:#141419;border-color:#2c2c33;color:var(--ink)}
|
|
64
|
+
label{color:#a9adb8}
|
|
65
|
+
pre{background:#121216;border-color:#26262c;color:#d6d7db}
|
|
66
|
+
h1,h2,h3{color:var(--ink)}
|
|
67
|
+
.coverage-strip b{color:var(--ink)}
|
|
68
|
+
.terminal-panel{background:var(--surface);border-color:#26262c;box-shadow:none;border-radius:12px}
|
|
69
|
+
.terminal-title h2{color:#d6d7db}.terminal-title>span{color:#7e828d}
|
|
70
|
+
.terminal-command{border-color:#26262c;background:#141419}
|
|
71
|
+
.terminal-command code{color:#ececee}
|
|
72
|
+
.command-prompt{color:#7e828d}
|
|
73
|
+
.terminal-output{color:#a9adb8;border-color:#26262c}
|
|
74
|
+
.discovery-help{border-color:#2c2c33;color:#a9adb8}
|
|
75
|
+
.discovery-help summary{color:#c9ccd5}
|
|
76
|
+
.welcome-steps strong{color:#c9ccd5}.welcome-steps p{color:#7e828d}.welcome-steps li>span{color:#5f626c}
|
|
77
|
+
.welcome-next>button{color:#8f929c}.welcome-next>button:hover{color:#ececee}
|
|
78
|
+
.workflow-area .section-title button{color:#a9adb8}
|
|
79
|
+
.tool-entry{border-color:#26262c}.tool-entry p{color:#8f929c}.tool-route{color:#8f929c}
|
|
80
|
+
.topology-canvas{background-color:#121216;background-image:radial-gradient(#2c2c33 .75px,transparent .75px)}
|
|
81
|
+
.resource-card,.environment-project{background:#1b1b20;border-color:#2c2c33}
|
|
82
|
+
.resource-card:hover,.resource-card.map-selected{background:#24242b;border-color:#3a3a44}
|
|
83
|
+
.resource-card strong{color:#ececee}.resource-card p{color:#8f929c}
|
|
84
|
+
.resource-icon{background:#e8eaf0}
|
|
85
|
+
.resource-badge.coverage-supported{background:#12241d;color:#3fbf7f}
|
|
86
|
+
.resource-badge.coverage-gap{background:#2a1a18;color:#e5484d}
|
|
87
|
+
.resource-badge.coverage-config{background:#1b1b20;color:#8f929c}
|
|
88
|
+
.resource-badge.example{background:#2a2214;color:#f2a33c}
|
|
89
|
+
.map-resource-rail,.map-pagination{background:#161619;border-color:#26262c}
|
|
90
|
+
.map-resource-rail input{background:#121216}
|
|
91
|
+
.map-resource-row:hover,.map-resource-row.active{background:#232330}
|
|
92
|
+
.map-resource-row img{background:#e8eaf0}
|
|
93
|
+
.map-hint,.topology-label{background:#24242b;color:#a9adb8}
|
|
94
|
+
.map-empty{background:#161619;border-color:#2c2c33}
|
|
95
|
+
.app-declaration{background:#1b1b20}
|
|
96
|
+
.connector-option{background:#161619;border-color:#26262c}
|
|
97
|
+
.connector-option:hover,.connector-option[aria-pressed=true]{background:#232330}
|
|
98
|
+
.connector-option img{background:#e8eaf0}
|
|
99
|
+
.connector-initial{background:#26262c;color:#c9ccd5}
|
|
100
|
+
.connector-check{color:#a9adb8}
|
|
101
|
+
.workflow-register,.workflow-path{border-color:#26262c}
|
|
102
|
+
.workflow-search input{background:#141419}
|
|
103
|
+
.candidate-row{border-color:#26262c}.candidate-row:hover{background:#1b1b20}
|
|
104
|
+
.candidate-row h3{color:#ececee}.candidate-row .mono{color:#8f929c}
|
|
105
|
+
.bundle-upload,.setup-card{background:#161619;border-color:#26262c}
|
|
106
|
+
.connection-note{color:#a9adb8;border-color:#2c2c33}
|
|
107
|
+
.run-configuration{border-color:#26262c}.run-configuration summary{background:#161619}
|
|
108
|
+
.configuration-body{background:#141419}
|
|
109
|
+
.service-chip{background:#1b1b20;border-color:#2c2c33}
|
|
110
|
+
.service-chip[aria-pressed=true]{background:#1c2544;border-color:#4c6fff}
|
|
111
|
+
.prepared-world{background:#161619;border-color:#26262c}
|
|
112
|
+
.workflow-intro button,.run-empty button{background:var(--accent);border-color:var(--accent);color:#fff}
|
|
113
|
+
.workflow-intro button:hover,.run-empty button:hover{background:#5d7dff;border-color:#5d7dff;color:#fff}
|
|
114
|
+
.stats{border-color:#26262c}
|
|
115
|
+
.stat p{color:#8f929c}.stat strong{color:#ececee}.stat small{color:#7e828d}
|
|
116
|
+
.workspace{border-color:#26262c;background:#121216}
|
|
117
|
+
.run-sidebar{background:#141419;border-color:#26262c}
|
|
118
|
+
.detail{background:#121216}
|
|
119
|
+
.run-row{border-color:#26262c}
|
|
120
|
+
.run-row:hover,.run-row[aria-pressed=true]{background:#232330;border-color:#3a3a44}
|
|
121
|
+
.run-row strong{color:#ececee}.run-row .sub{color:#8f929c}
|
|
122
|
+
.tabs{border-color:#26262c}
|
|
123
|
+
.tabs button{color:#8f929c}
|
|
124
|
+
.tabs button[aria-selected=true]{color:#ececee;border-bottom-color:#4c6fff}
|
|
125
|
+
.result-banner{background:#2a1a18;border-color:#5c2b28}
|
|
126
|
+
.result-banner.passed{background:#12241d;border-color:#1f4a37}
|
|
127
|
+
.table-scroll{border-color:#26262c}
|
|
128
|
+
table th{background:#1b1b20;color:#a9adb8}
|
|
129
|
+
table td{border-color:#26262c;color:#d6d7db}
|
|
130
|
+
table td small{color:#8f929c}
|
|
131
|
+
.check-pass{color:var(--good)}.check-fail{color:var(--bad)}
|
|
132
|
+
.fact{border-color:#26262c}.fact dt{color:#8f929c}.fact dd{color:#d6d7db}
|
|
133
|
+
.metadata{color:#8f929c}
|
|
134
|
+
.status{color:#3fbf7f}.status.failed,.status.error{color:#e5484d}
|
|
135
|
+
.state-pair h3{color:#c9ccd5}
|
|
136
|
+
#api-message:not(:empty){background:#1b1b20;color:#d6d7db;border-left:2px solid #4c6fff;border-radius:8px}
|
|
137
|
+
.account-menu{background:#1a1a20;border-color:#2c2c34}
|
|
138
|
+
.account-menu button:hover{background:#26262e}
|
|
139
|
+
.connection-status{border-color:#4c6fff;color:#8f929c}
|
|
140
|
+
.setting-row input[type=checkbox]{background:#1b1b20;border-color:#2c2c33}
|
|
141
|
+
.setting-row input[type=checkbox]:checked{background:#4c6fff;border-color:#4c6fff}
|
|
142
|
+
.setting-row input[type=checkbox]:checked::after{background:#fff}
|
|
143
|
+
.settings-section{border-color:#26262c}
|
|
144
|
+
footer{color:#5f626c}
|
|
145
|
+
#saved-workflows{margin-top:24px;border-top:1px solid var(--border,#303038);padding-top:24px;}
|
|
146
|
+
#workflow-spec{display:block;width:100%;box-sizing:border-box;margin:12px 0 16px;padding:16px;font:13px/1.6 monospace;color:#e1e1e6;background:#111116;border:1px solid #303038;border-radius:8px;resize:vertical;}
|
|
147
|
+
/* Workspace polish: concise hierarchy and consistent, quiet surfaces. */
|
|
148
|
+
#api-message{margin:0 0 24px;padding:10px 0;border:0;background:transparent;color:var(--muted);font-size:12px;line-height:1.6;max-width:none}
|
|
149
|
+
#api-message:empty{display:none}.heading{margin-bottom:28px}.heading h1{font-size:28px;letter-spacing:-.8px}.heading .muted{max-width:72ch;font-size:13px}.workflow-register,.setup-card{border-radius:10px}.workflow-path{margin:22px 0;padding:18px 0;border-block:1px solid var(--line)}.workflow-path summary{font-size:13px;font-weight:500;color:var(--ink);cursor:pointer}.workflow-path ol{margin-top:20px}.candidate-row{padding:18px 0;align-items:center}.candidate-row h3{font-size:14px;font-weight:550}.candidate-row .mono{font-size:11px;color:var(--muted);margin-top:6px}.candidate-row .muted{font-size:12px;margin-top:5px}.candidate-row .actions{flex-wrap:wrap;justify-content:flex-end}.candidate-row button{font-size:12px;min-height:34px}#candidate-preparation{margin-top:24px}#candidate-preparation .actions{margin-top:20px}#workflow-editor{margin-top:20px}#workflow-editor summary{cursor:pointer;font-size:13px}#workflow-spec{width:100%;font-family:var(--mono);font-size:12px;margin:12px 0}.bundle-upload{margin-top:28px}.settings-section{max-width:900px}.settings-section-heading p,.setting-row p{max-width:60ch}.run-sidebar{min-width:0}.run-sidebar .run-row strong{line-height:1.5}.resource-card strong{line-height:1.45}.coverage-strip{gap:20px;font-size:12px}.coverage-note{margin-top:20px;font-size:12px;color:var(--muted)}.coverage-note summary{cursor:pointer}.coverage-note p{max-width:85ch;margin-top:12px}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid #7487ff;outline-offset:3px}
|
|
150
|
+
@media(max-width:760px){main{padding:28px 20px}.heading{align-items:flex-start;flex-wrap:wrap}.heading .actions{justify-content:flex-start}.candidate-row{flex-direction:column;align-items:flex-start;gap:12px}.candidate-row .actions{justify-content:flex-start}.coverage-strip{gap:12px;flex-wrap:wrap}.workflow-path ol{display:block}.workflow-path li{margin:16px 0}}
|
|
151
|
+
|
|
152
|
+
.fault-controls{margin:20px 0;padding:18px;border:1px solid var(--border,#303034);border-radius:10px;display:grid;gap:12px}.fault-controls legend{padding:0 8px}.fault-controls label{display:grid;gap:6px}.fault-controls select,.fault-controls input{width:100%;padding:10px;background:#17171b;color:inherit;border:1px solid #343439;border-radius:6px}.fault-controls button{justify-self:start}
|
|
153
|
+
|
|
154
|
+
.next-step{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 24px;margin-bottom:28px;background:#19191d;border:1px solid #303034;border-radius:12px}.next-step h2{font-size:20px;margin:0 0 8px}.next-step p{color:#a2a2ac;margin:0;max-width:62ch}.next-step button{flex-shrink:0}.workflow-pagination{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:20px;color:#aaa}.advanced-workflows{margin:24px 0}.advanced-workflows>summary{cursor:pointer;color:#aaa}.advanced-workflows[open]>summary{margin-bottom:22px}.workflow-register:has(#close-preparation)~.workflow-register{display:none}@media(max-width:650px){.next-step{align-items:flex-start;flex-direction:column}.workflow-pagination{gap:8px}}
|
|
155
|
+
|
|
156
|
+
.home-action{max-width:1180px;margin:24px auto 0;width:calc(100% - 48px);text-align:left}.home-action h2{font-size:20px}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|