@octavus/agent 1.0.12 → 1.0.16
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/dist/browser-extension/assets/offscreen-B_-qKXmq.js +1 -0
- package/dist/browser-extension/src/offscreen/recording.html +1 -1
- package/dist/browser-extension-mcp.js +32 -32
- package/dist/code-mcp/index.js +89 -0
- package/dist/computer-mcp/dist/index.js +31 -31
- package/dist/filesystem-mcp.mjs +29 -29
- package/dist/index.js +116 -106
- package/package.json +1 -1
- package/dist/browser-extension/assets/offscreen-BKXLIRW6.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octavus/agent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "Octavus Agent CLI - run one of your cloud Octavus Agents on a machine you control, using that machine as the agent's computer. The agent lives in the cloud (fully configured and observable); the local machine only supplies the computer and the trigger.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"octavus",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as h,S as u}from"./messages-akAS58tQ.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))i(t);new MutationObserver(t=>{for(const n of t)if(n.type==="childList")for(const d of n.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function o(t){const n={};return t.integrity&&(n.integrity=t.integrity),t.referrerPolicy&&(n.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?n.credentials="include":t.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(t){if(t.ep)return;t.ep=!0;const n=o(t);fetch(t.href,n)}})();const m=1e3;let c=null;function l(r){chrome.runtime.sendMessage(r)}function g(){const r=["video/mp4;codecs=avc1","video/mp4;codecs=avc1.42E01E","video/mp4;codecs=vp9","video/mp4"];for(const e of r)if(MediaRecorder.isTypeSupported(e))return e;return"video/mp4"}function y(r){return new Promise((e,o)=>{const i=new FileReader;i.onload=()=>{const t=i.result,n=t.indexOf(",");e(n>=0?t.slice(n+1):t)},i.onerror=()=>o(i.error??new Error("FileReader failed")),i.readAsDataURL(r)})}function v(r,e){const o={chromeMediaSource:"tab",chromeMediaSourceId:r.streamId};return e!=="none"&&r.captureWidth!==void 0&&r.captureHeight!==void 0&&(o.maxWidth=r.captureWidth,o.maxHeight=r.captureHeight,e==="exact"&&(o.minWidth=r.captureWidth,o.minHeight=r.captureHeight)),{audio:r.audio?{mandatory:{chromeMediaSource:"tab",chromeMediaSourceId:r.streamId}}:!1,video:{mandatory:o}}}async function I(r){const e=r.captureWidth!==void 0&&r.captureHeight!==void 0?["exact","max","none"]:["none"];let o;for(const i of e)try{return await navigator.mediaDevices.getUserMedia(v(r,i))}catch(t){o=t}throw o instanceof Error?o:new Error("Failed to open tab capture stream")}async function T(r){if(c){l({target:u,type:"error",recordingId:r.recordingId,message:"A recording is already in progress"});return}try{const e=await I(r);let o=null;r.audio&&e.getAudioTracks().length>0&&(o=new AudioContext,o.createMediaStreamSource(e).connect(o.destination));const i=e.getVideoTracks()[0],t=i==null?void 0:i.getSettings(),n=g(),d=new MediaRecorder(e,{mimeType:n,videoBitsPerSecond:r.videoBitsPerSecond}),s={recordingId:r.recordingId,recorder:d,stream:e,audioContext:o,mediaType:n.split(";")[0]??"video/mp4",startedAt:Date.now(),width:(t==null?void 0:t.width)??0,height:(t==null?void 0:t.height)??0,chunkChain:Promise.resolve(),maxDurationTimer:null};c=s,d.ondataavailable=a=>{if(a.data.size===0)return;const p=a.data;s.chunkChain=s.chunkChain.then(async()=>{try{const f=await y(p);l({target:u,type:"chunk",recordingId:s.recordingId,dataB64:f})}catch(f){console.error("[recording] failed to encode chunk",f)}})},d.onstop=()=>{const a=c;c=null,a&&(a.maxDurationTimer&&clearTimeout(a.maxDurationTimer),a.chunkChain.then(()=>{l({target:u,type:"stopped",recordingId:a.recordingId,mediaType:a.mediaType,durationMs:Date.now()-a.startedAt,width:a.width,height:a.height}),S(a)}))},i==null||i.addEventListener("ended",()=>{(c==null?void 0:c.recordingId)===s.recordingId&&d.state!=="inactive"&&d.stop()}),s.maxDurationTimer=setTimeout(()=>{(c==null?void 0:c.recordingId)===s.recordingId&&d.state!=="inactive"&&d.stop()},r.maxDurationMs),d.start(m)}catch(e){c=null,l({target:u,type:"error",recordingId:r.recordingId,message:e instanceof Error?e.message:String(e)})}}function w(r){const e=c;(e==null?void 0:e.recordingId)===r&&e.recorder.state!=="inactive"&&e.recorder.stop()}function S(r){for(const e of r.stream.getTracks())e.stop();r.audioContext&&r.audioContext.close()}chrome.runtime.onMessage.addListener(r=>{const e=r;(e==null?void 0:e.target)===h&&(e.type==="start"?T(e):e.type==="stop"&&typeof e.recordingId=="string"&&w(e.recordingId))});
|