@hallohuman/hightea 0.1.31 → 0.1.33
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/bin.js +26 -20
- package/dist/chunk-3emak1d3.js +2 -0
- package/dist/chunk-3w7svm2r.js +2 -0
- package/dist/chunk-4gpw7vjp.js +139 -0
- package/dist/{chunk-5s85pw9m.js → chunk-88mhcx5q.js} +1 -1
- package/dist/chunk-9fxpgay8.js +9 -0
- package/dist/chunk-a1vwy98c.js +1 -0
- package/dist/chunk-axj8ef03.js +1 -0
- package/dist/chunk-dw3tmpqv.js +1 -0
- package/dist/chunk-e9s05rg6.js +4 -0
- package/dist/chunk-evg5apz3.js +2 -0
- package/dist/chunk-jaf9mk6s.js +2 -0
- package/dist/{chunk-r9yjtfhp.js → chunk-kjkww5cr.js} +4 -4
- package/dist/chunk-kq5y08g7.js +5 -0
- package/dist/chunk-ntj1fcak.js +1 -0
- package/dist/chunk-p1142ccr.js +1 -0
- package/dist/chunk-q669464j.js +13 -0
- package/dist/chunk-tay0pyz4.js +58 -0
- package/dist/chunk-vzkbknwq.js +5 -0
- package/dist/chunk-ym5anbc7.js +5 -0
- package/dist/plugin/plugin.json +4 -1
- package/dist/plugin/plugin.mjs +36 -36
- package/package.json +1 -1
- package/dist/chunk-19pwmgzg.js +0 -5
- package/dist/chunk-5zb06f9b.js +0 -2
- package/dist/chunk-69dva4cx.js +0 -58
- package/dist/chunk-8rbp82rh.js +0 -139
- package/dist/chunk-8x5daqht.js +0 -1
- package/dist/chunk-9pv1nvfv.js +0 -5
- package/dist/chunk-db8mr7mp.js +0 -1
- package/dist/chunk-dkzzzkex.js +0 -13
- package/dist/chunk-f04t1q6v.js +0 -2
- package/dist/chunk-gcqhggbh.js +0 -1
- package/dist/chunk-jdzvh3gk.js +0 -1
- package/dist/chunk-p616vcdm.js +0 -4
- package/dist/chunk-xj3c5jgm.js +0 -5
- package/dist/chunk-xy8j3npr.js +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import"./chunk-kjkww5cr.js";import{t,e}from"./chunk-vzkbknwq.js";var c=`hightea host list --origin https://your-deployment --workspace SLUG [--session-file FILE] [--json]
|
|
2
|
+
hightea host remove --origin https://your-deployment --workspace SLUG --host HOST [--remove-agents] [--session-file FILE] [--json]`;async function g(s,n=t()){if(s.workspace.trim().length===0||s.host.trim().length===0)return n.err(`HOST_REMOVE_INPUT: --workspace and --host are required.
|
|
3
|
+
${c}`),1;let r=s.host.trim(),i=s.removeAgents===!0?"?removeAgents=1":"",o=await e(s,n,{method:"DELETE",path:`/hosts/${encodeURIComponent(r)}${i}`,what:"remove",label:"HOST_REMOVE"});if("error"in o)return n.err(o.error),o.exit;if(s.json)return n.out(JSON.stringify(o.answer)),0;let a=o.answer.host??{},d=typeof a.endedDeliveries==="number"?a.endedDeliveries:0,u=String(a.hostId??r);if(a.alreadyRevoked===!0)return n.out(`host ${u} was already removed; nothing was left running`),0;n.out(`removed host ${u}: revoked, ${d} ${d===1?"delivery":"deliveries"} ended`);let h=Array.isArray(o.answer.agentsKeptUnrouted)?o.answer.agentsKeptUnrouted.length:0;return n.out(h===0?"Its agents have no host until they join again with a new join code.":`Its ${h===1?"agent is":`${String(h)} agents are`} still a member, now with no computer; a new join code routes ${h===1?"it":"them"} again. (--remove-agents deletes them with the computer.)`),0}function l(s){let n=(d)=>s[d]===null||s[d]===void 0?"none":String(s[d]),r=Array.isArray(s.agentMemberIds)&&s.agentMemberIds.length>0?s.agentMemberIds.join(","):"none",i=n("status")==="revoked"?`revoked ${n("revokedAt")}`:`last seen ${n("lastSeenAt")}`,o=typeof s.initializeNote==="string"?` ${s.initializeNote}`:"",a=n("link")==="attaching"?`connected, never initialized${n("attachedAt")==="none"?"":` since ${n("attachedAt")}`}`:s.connected===!0||n("link")==="ready"?"connected":"not connected";return`${n("hostId")} ${n("status")} ${a} plugin ${n("pluginVersion")} agents ${r} owner ${n("ownerAccountId")} ${i}${o}`}async function p(s,n=t()){if(s.workspace.trim().length===0)return n.err(`HOST_LIST_INPUT: --workspace is required.
|
|
4
|
+
${c}`),1;let r=await e(s,n,{method:"GET",path:"/hosts",what:"list",label:"HOST_LIST"});if("error"in r)return n.err(r.error),r.exit;if(s.json)return n.out(JSON.stringify(r.answer)),0;let i=Array.isArray(r.answer.hosts)?r.answer.hosts:[];if(i.length===0)return n.out(`no hosts in workspace ${s.workspace.trim()} that your account can see (a workspace owner sees every host)`),0;if(n.out(i.map(l).join(`
|
|
5
|
+
`)),i.some((a)=>a.status==="active"))n.out("A host you no longer use: `hightea host remove --workspace "+s.workspace.trim()+" --host <id>`.");m(n,r.answer);let o=r.answer.wakeCarrier;if(typeof o?.active!=="number"||typeof o.unsigned!=="number")n.err("WAKE_CARRIER_UNKNOWN: this workspace answered no wakeCarrier census (active, unsigned), so whether any host lacks signed envelopes, and so cannot be woken, is unknown. The workspace build and this CLI disagree; the list above is not evidence that every host can be woken.");else if(o.unsigned===0)n.out("every active host advertises signed envelopes and can be woken");else n.out(`${o.unsigned} of ${o.active} active hosts lack signed envelopes and cannot be woken until upgraded: \`hightea host update\` on each, or remove it`);return 0}function m(s,n){if(n.oldNames===null){s.out("the release census is readable by the workspace owner only: ask them to run `hightea host list`");return}let r=n.oldNames;if(typeof r?.mustReport!=="number"||!Array.isArray(r.behind)||!Array.isArray(r.excluded)){s.err("OLD_NAMES_UNKNOWN: this workspace answered no oldNames census (mustReport, behind, excluded), so whether the old x-hightea/* names can be deleted yet is unknown. The workspace build and this CLI disagree; the list above is not evidence that every host that must be reached reads the current frames.");return}let{behind:i,excluded:o}=r;if(i.length===0&&r.mustReport===0)s.out("0 hosts had to be checked, so nothing was decided: join the host that must read the current frames, or read this from the workspace owner");else if(i.length===0)s.out(`every host that must read the current frames does (${r.mustReport} checked): the old x-hightea/* names can be deleted`);else s.out(`${i.length} of ${r.mustReport} hosts that must read the current frames are behind: `+i.map((a)=>`${String(a.hostId)} (missing ${Array.isArray(a.missingCapabilities)?a.missingCapabilities.map(String).join(", "):"unknown"})`).join(", ")+" — `hightea host update` on each");for(let a of o)s.out(`excluded ${String(a.hostId)} (${String(a.pluginVersion)}) last seen ${String(a.lastSeenAt)}: ${String(a.reason)}`)}export{p as hostList,g as hostRemove};
|
package/dist/plugin/plugin.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "hightea-pipe",
|
|
3
3
|
"main": "./plugin.mjs",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.33",
|
|
5
5
|
"grants": [
|
|
6
6
|
"session:write",
|
|
7
7
|
"session:state",
|
|
8
8
|
"session:list",
|
|
9
9
|
"chat:turns",
|
|
10
10
|
"agent:list"
|
|
11
|
+
],
|
|
12
|
+
"callerGrants": [
|
|
13
|
+
"records:read"
|
|
11
14
|
]
|
|
12
15
|
}
|