@pmate/merry-scheduler 1.0.0 → 1.0.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/index.mjs CHANGED
@@ -34,7 +34,7 @@ export function parse(args,env={}){
34
34
  if(operation==='create'&&!body.source)throw Error('An authorized source is required (--source JSON)')
35
35
  return{agent,operation,body}
36
36
  }
37
- export function readSession(app,env){try{return JSON.parse(execFileSync('pmate',['session','read','--app',app],{env,encoding:'utf8',timeout:15000,maxBuffer:32768,stdio:['ignore','pipe','pipe']}))}catch{throw Error(`Unable to read session; run pmate login --app ${app}`)}}
37
+ export function readSession(app,env){try{return JSON.parse(execFileSync('pmate',['session','read','--app',app],{env:{...env,PMATE_SESSION_APP:app,...(env.PCS_AGENT_ID?{PMATE_EXPECTED_PROFILE_ID:env.PCS_AGENT_ID}:{})},encoding:'utf8',timeout:15000,maxBuffer:32768,stdio:['ignore','pipe','pipe']}))}catch{throw Error(`Unable to read session; run pmate login --app ${app}`)}}
38
38
  export async function scheduler(args,{env=process.env,fetcher=fetch,session=readSession}={}){
39
39
  const parsed=parse(args,env);if(parsed.help)return HELP
40
40
  const {agent,operation,body}=parsed,app=env.PMATE_SCHEDULER_APP??(env.PCS_AGENT_ID?'pmate:merry':'pmate:factory')
package/manifest.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "id": "scheduler",
4
4
  "kind": "plugin",
5
5
  "name": "Scheduler",
6
- "version": "1.0.0",
6
+ "version": "1.0.1",
7
7
  "description": "Independent authenticated Agent schedule management; no Runtime required",
8
8
  "docs": [
9
9
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmate/merry-scheduler",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "Independent authenticated Agent schedule management; no Runtime required",
6
6
  "bin": {