@north-light/cli 0.3.735 → 0.3.737

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.
@@ -1 +1 @@
1
- var a=Object.defineProperty;var r=(e,s)=>a(e,"name",{value:s,configurable:!0});const n=[{name:"conversation.create",method:"POST",path:"/v1/conversations",classes:["broker"],resource:"none"},{name:"conversation.list",method:"GET",path:"/v1/conversations",classes:["broker","person"],resource:"none"},{name:"conversation.append",method:"POST",path:"/v1/conversations/:id/entries",classes:["broker"],resource:"none"},{name:"conversation.commit",method:"POST",path:"/v1/conversations/:id/commit",classes:["broker"],resource:"none"},{name:"conversation.read",method:"GET",path:"/v1/conversations/:id",classes:["broker","person"],resource:"none"},{name:"conversation.header",method:"GET",path:"/v1/conversations/:id/header",classes:["broker","person"],resource:"none"},{name:"conversation.replace",method:"PUT",path:"/v1/conversations/:id",classes:["broker"],resource:"none"},{name:"conversation.fork",method:"POST",path:"/v1/conversations/:id/fork",classes:["broker"],resource:"none"},{name:"conversation.delete",method:"DELETE",path:"/v1/conversations/:id",classes:["broker"],resource:"none"},{name:"health",method:"GET",path:"/v1/health",classes:["anonymous"],resource:"none",stage:"v0.5"},{name:"ready",method:"GET",path:"/v1/ready",classes:["anonymous"],resource:"none",stage:"v0.5"},{name:"chat-inventory.get.1",method:"GET",path:"/v1/nodes/:id/chat-inventory",classes:["person","broker","cron"],resource:"node-read"},{name:"settings.get",method:"GET",path:"/v1/settings",classes:["person","broker"],resource:"none"},{name:"settings.put",method:"PUT",path:"/v1/settings",classes:["person","broker"],resource:"none"},{name:"model-config.put.2",method:"PUT",path:"/v1/model-config",classes:["person","broker"],resource:"none"},{name:"files.get.3",method:"GET",path:"/v1/files/peek",classes:["person","broker"],resource:"none"},{name:"files.post.4",method:"POST",path:"/v1/files/write",classes:["person","broker"],resource:"none"},{name:"files.get.5",method:"GET",path:"/v1/files/list",classes:["person","broker"],resource:"none"},{name:"reviews.post.6",method:"POST",path:"/v1/human/reviews",classes:["person","broker"],resource:"human",scope:"crtr:act"},{name:"reviews.get.7",method:"GET",path:"/v1/human/reviews",classes:["person","broker"],resource:"human"},{name:"reviews.get.8",method:"GET",path:"/v1/human/reviews/:review_id",classes:["person","broker"],resource:"human"},{name:"reviews.post.9",method:"POST",path:"/v1/human/reviews/:review_id/submit",classes:["person","broker"],resource:"human"},{name:"reviews.post.10",method:"POST",path:"/v1/human/reviews/:review_id/cancel",classes:["person","broker"],resource:"human"},{name:"reviews.get.11",method:"GET",path:"/v1/human/reviews/:review_id/document",classes:["person","broker"],resource:"human"},{name:"feedback-comments.post.12",method:"POST",path:"/v1/human/inbox/:ticket_id/feedback-comments",classes:["person","broker"],resource:"human"},{name:"feedback-comments.post.13",method:"POST",path:"/v1/human/inbox/:ticket_id/feedback-comments/:comment_id/resolve",classes:["person","broker"],resource:"human"},{name:"node.log.append",method:"POST",path:"/v1/nodes/:id/records/log",classes:["person","broker"],resource:"node-own"},{name:"node.summaries.put",method:"PUT",path:"/v1/nodes/:id/records/summaries",classes:["person","broker"],resource:"node-own"},{name:"node.attachments.list",method:"GET",path:"/v1/nodes/:id/attachments",classes:["person","broker"],resource:"node-own"},{name:"node.attachments.read",method:"GET",path:"/v1/nodes/:id/attachments/:sha256",classes:["person","broker"],resource:"node-own"},{name:"node.telemetry.put",method:"PUT",path:"/v1/nodes/:id/records/telemetry",classes:["person","broker"],resource:"node-own"},{name:"node.recap.put",method:"PUT",path:"/v1/nodes/:id/records/recap",classes:["person","broker"],resource:"node-own"},{name:"node.inbox.read",method:"GET",path:"/v1/nodes/:id/records/inbox",classes:["person","broker"],resource:"node-own"},{name:"node.passive.read",method:"GET",path:"/v1/nodes/:id/records/passive",classes:["person","broker"],resource:"node-own"},{name:"node.pushed-final",method:"POST",path:"/v1/nodes/:id/records/pushed-final",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.14",method:"POST",path:"/v1/nodes/:id/broker/session-bound",classes:["person","broker"],resource:"node-own"},{name:"broker.cycle-start",method:"POST",path:"/v1/nodes/:id/broker/cycle-start",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.15",method:"POST",path:"/v1/nodes/:id/broker/settle",classes:["person","broker"],resource:"node-own"},{name:"broker.cycle",method:"POST",path:"/v1/nodes/:id/broker/cycle",classes:["broker"],resource:"node-own"},{name:"broker.idle",method:"POST",path:"/v1/nodes/:id/broker/idle",classes:["broker"],resource:"node-own"},{name:"broker-ops.post.16",method:"POST",path:"/v1/nodes/:id/broker/park-complete",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.17",method:"POST",path:"/v1/nodes/:id/broker/park-activity",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.18",method:"POST",path:"/v1/nodes/:id/broker/telemetry",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.19",method:"POST",path:"/v1/nodes/:id/broker/model",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.get.20",method:"GET",path:"/v1/nodes/:id/broker/extension-state",classes:["person","broker"],resource:"node-own"},{name:"broker.signals",method:"GET",path:"/v1/nodes/:id/broker/signals",classes:["broker"],resource:"node-own",stream:!0},{name:"nodes.broker-structured-request",method:"GET",path:"/v1/nodes/:id/broker/structured-request",classes:["person","broker"],resource:"node-own"},{name:"nodes.broker-goal",method:"POST",path:"/v1/nodes/:id/broker/goal",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.21",method:"POST",path:"/v1/nodes/:id/broker/generated-name",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.22",method:"POST",path:"/v1/nodes/:id/broker/persona-ack",classes:["person","broker"],resource:"node-own"},{name:"objects.read",method:"GET",path:"/v1/objects/:ref",classes:["person","app","broker","cron","forwarded"],resource:"objects",stage:"objects"},{name:"objects.list",method:"GET",path:"/v1/objects",classes:["person","app","broker","cron","forwarded"],resource:"objects",stage:"objects"},{name:"objects.search",method:"POST",path:"/v1/objects/search",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"objects.watch",method:"POST",path:"/v1/objects/:ref/watch",classes:["anonymous","person","app","broker","cron","forwarded"],resource:"objects",stage:"objects"},{name:"objects.unwatch",method:"DELETE",path:"/v1/objects/:ref/watch",classes:["anonymous","person","app","broker","cron","forwarded"],resource:"objects",stage:"objects"},{name:"objects.shares",method:"GET",path:"/v1/objects/:ref/shares",classes:["person","broker"],resource:"objects",stage:"objects"},{name:"objects.share",method:"POST",path:"/v1/objects/:ref/shares",classes:["person","broker"],resource:"objects",stage:"objects"},{name:"objects.unshare",method:"DELETE",path:"/v1/objects/:ref/shares",classes:["person","broker"],resource:"objects",stage:"objects"},{name:"custom-objects.register",method:"POST",path:"/v1/custom-objects",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"custom-objects.publish",method:"POST",path:"/v1/custom-objects/:ref/events",classes:["anonymous","person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"custom-objects.unregister",method:"DELETE",path:"/v1/custom-objects/:ref",classes:["anonymous","person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"custom-objects.receive",method:"GET",path:"/v1/custom-objects/:ref/deliveries",classes:["anonymous","person","app","broker","cron"],resource:"objects",stream:!0,stage:"objects"},{name:"custom-objects.ack",method:"POST",path:"/v1/custom-objects/:ref/deliveries/ack",classes:["anonymous","person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"objects.edges",method:"GET",path:"/v1/objects/:ref/edges",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"docs.write",method:"POST",path:"/v1/docs",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"docs.edit",method:"PATCH",path:"/v1/docs/:ref",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"docs.move",method:"POST",path:"/v1/docs/:ref/move",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"docs.delete",method:"DELETE",path:"/v1/docs/:ref",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"docs.history",method:"GET",path:"/v1/docs/:ref/history",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"schemas.register",method:"POST",path:"/v1/schemas",classes:["app"],resource:"objects",stage:"objects"},{name:"relations.write",method:"POST",path:"/v1/relations",classes:["app"],resource:"objects",stage:"objects"},{name:"relations.replace",method:"PUT",path:"/v1/relations",classes:["app"],resource:"objects",stage:"objects"},{name:"relations.list",method:"GET",path:"/v1/relations",classes:["app"],resource:"objects",stage:"objects"},{name:"check",method:"POST",path:"/v1/check",classes:["app"],resource:"objects",stage:"objects"},{name:"docs.lint",method:"POST",path:"/v1/docs/lint",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"plugins.app-token",method:"GET",path:"/v1/plugins/:name/app-token",classes:["person","broker"],resource:"none"},{name:"plugins.call-headers",method:"POST",path:"/v1/plugins/:name/call-headers",classes:["person","broker"],resource:"none"},{name:"documents.browser-access",method:"GET",path:"/v1/documents/browser-access",classes:["person"],resource:"none"},{name:"documents.reconcile-packages",method:"POST",path:"/v1/documents/reconcile-packages",classes:["person","broker"],resource:"none"},{name:"nodes.delivery",method:"POST",path:"/v1/nodes/:id/delivery",classes:["person","broker"],resource:"node-own"},{name:"delivery.dry-run",method:"POST",path:"/v1/delivery/dry-run",classes:["person","broker"],resource:"none"},{name:"bash-jobs.background",method:"POST",path:"/v1/nodes/:id/jobs/:jobId/background",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"health.get.33",method:"GET",path:"/healthz",classes:["anonymous"],resource:"none"},{name:"health.get.34",method:"GET",path:"/v1/status",classes:["person","broker"],resource:"none"},{name:"daemon.due",method:"GET",path:"/v1/due",classes:["person","broker"],resource:"none"},{name:"bash-jobs.report",method:"POST",path:"/v1/nodes/:id/jobs/:jobId/report",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"bash-jobs.patch",method:"PATCH",path:"/v1/nodes/:id/jobs/:jobId",classes:["person","broker"],resource:"node-write"},{name:"files.create",method:"POST",path:"/v1/nodes/:id/files",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"files.complete",method:"POST",path:"/v1/nodes/:id/files/:fileId/complete",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"node-uploads.create",method:"POST",path:"/v1/nodes/:id/uploads",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"node-uploads.link",method:"POST",path:"/v1/nodes/:id/uploads/:uploadId/link",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"bash-jobs.start",method:"POST",path:"/v1/nodes/:id/jobs/start",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"hooks.plan",method:"GET",path:"/v1/nodes/:id/hooks/plan",classes:["broker"],resource:"node-own"},{name:"hooks.exec",method:"POST",path:"/v1/nodes/:id/hooks/exec",classes:["broker"],resource:"node-own"},{name:"hooks.exec.person",method:"POST",path:"/v1/hooks/exec",classes:["person","broker"],resource:"none"},{name:"bash-jobs.get.35",method:"GET",path:"/v1/nodes/:id/jobs",classes:["person","broker","cron"],resource:"node-read"},{name:"bash-jobs.output",method:"GET",path:"/v1/nodes/:id/jobs/:jobId/output",classes:["person","broker","cron"],resource:"node-read"},{name:"bash-jobs.delete.36",method:"DELETE",path:"/v1/nodes/:id/jobs/:jobId",classes:["person","broker"],resource:"node-write"},{name:"prospective-chat-inventory.get.37",method:"GET",path:"/v1/prospective-chat-inventory",classes:["person","broker"],resource:"none"},{name:"node-events.get.38",method:"GET",path:"/v1/nodes/:id/events",classes:["person","broker","cron"],resource:"node-read"},{name:"bash.post.39",method:"POST",path:"/v1/bash",classes:["person","broker"],resource:"daemon-bash",scope:"crtr:act"},{name:"subscriptions.post.40",method:"POST",path:"/v1/nodes/:id/subscriptions",classes:["person","broker"],resource:"node-write"},{name:"subscriptions.delete.41",method:"DELETE",path:"/v1/nodes/:id/subscriptions/:target",classes:["person","broker"],resource:"node-write"},{name:"attach.post.42",method:"POST",path:"/v1/nodes/:id/attach",classes:["person","broker"],resource:"node-write"},{name:"review-comments.post.44",method:"POST",path:"/v1/human/reviews/self/comments",classes:["person","broker"],resource:"human"},{name:"review-comments.get.45",method:"GET",path:"/v1/human/reviews/self/comments",classes:["person","broker"],resource:"human"},{name:"review-comments.post.46",method:"POST",path:"/v1/human/reviews/:review_id/comments",classes:["person","broker"],resource:"human"},{name:"review-comments.get.47",method:"GET",path:"/v1/human/reviews/:review_id/comments",classes:["person","broker"],resource:"human"},{name:"review-comments.get.48",method:"GET",path:"/v1/human/reviews/:review_id/comment-events",classes:["person","broker"],resource:"human"},{name:"review-comments.post.49",method:"POST",path:"/v1/human/reviews/:review_id/comment-ranges",classes:["person","broker"],resource:"human"},{name:"review-comments.get.50",method:"GET",path:"/v1/human/comments/:comment_id",classes:["person","broker"],resource:"human"},{name:"review-comments.post.51",method:"POST",path:"/v1/human/comments/:comment_id/edit",classes:["person","broker"],resource:"human"},{name:"review-comments.post.52",method:"POST",path:"/v1/human/comments/:comment_id/resolve",classes:["person","broker"],resource:"human"},{name:"review-comments.post.53",method:"POST",path:"/v1/human/comments/:comment_id/reopen",classes:["person","broker"],resource:"human"},{name:"review-comments.post.54",method:"POST",path:"/v1/human/comments/:comment_id/delete",classes:["person","broker"],resource:"human"},{name:"review-comments.post.55",method:"POST",path:"/v1/human/comments/:comment_id/fork",classes:["person","broker"],resource:"human"},{name:"messages.post.56",method:"POST",path:"/v1/nodes/:id/mail/claim",classes:["person","broker"],resource:"node-own"},{name:"messages.post.57",method:"POST",path:"/v1/nodes/:id/mail/acknowledge",classes:["person","broker"],resource:"node-own"},{name:"messages.post.58",method:"POST",path:"/v1/nodes/:id/messages",classes:["person","broker","cron","forwarded"],resource:"node-write"},{name:"messages.post.59",method:"POST",path:"/v1/nodes/:id/interrupt",classes:["person","broker","cron","forwarded"],resource:"node-write"},{name:"reports.post.60",method:"POST",path:"/v1/nodes/:id/reports",classes:["person","broker"],resource:"node-own"},{name:"reports.get.61",method:"GET",path:"/v1/nodes/:id/reports",classes:["person","broker","cron"],resource:"node-read"},{name:"reports.post.62",method:"POST",path:"/v1/nodes/:id/result",classes:["person","broker"],resource:"node-own"},{name:"inbox.get.63",method:"GET",path:"/v1/human/inbox",classes:["person","broker"],resource:"human"},{name:"inbox.get.64",method:"GET",path:"/v1/human/inbox/history",classes:["person","broker"],resource:"human"},{name:"inbox.get.65",method:"GET",path:"/v1/human/inbox/:ticket_id",classes:["person","broker"],resource:"human"},{name:"inbox.get.66",method:"GET",path:"/v1/human/inbox/:ticket_id/response",classes:["person","broker"],resource:"human"},{name:"inbox.post.67",method:"POST",path:"/v1/human/inbox/:ticket_id/respond",classes:["person","broker"],resource:"human"},{name:"inbox.post.68",method:"POST",path:"/v1/human/inbox/:ticket_id/progress",classes:["person","broker"],resource:"human"},{name:"inbox.post.69",method:"POST",path:"/v1/human/inbox/:ticket_id/cancel",classes:["person","broker"],resource:"human"},{name:"worktree.post.70",method:"POST",path:"/v1/nodes/:id/worktree/close",classes:["person","broker"],resource:"node-write"},{name:"worktree.post.71",method:"POST",path:"/v1/nodes/:id/worktree/abandon",classes:["person","broker"],resource:"node-write"},{name:"worktree.get.72",method:"GET",path:"/v1/worktrees/quarantined",classes:["person","broker"],resource:"none"},{name:"crons.post.73",method:"POST",path:"/v1/crons",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"crons.get.74",method:"GET",path:"/v1/crons",classes:["person","app","broker","cron"],resource:"cron"},{name:"crons.get.75",method:"GET",path:"/v1/crons/:cronId",classes:["person","app","broker","cron"],resource:"cron"},{name:"crons.post.76",method:"POST",path:"/v1/crons/:cronId/pause",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"crons.post.77",method:"POST",path:"/v1/crons/:cronId/resume",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"crons.post.78",method:"POST",path:"/v1/crons/poke",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"crons.post.79",method:"POST",path:"/v1/crons/:cronId/run",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"crons.delete.80",method:"DELETE",path:"/v1/crons/:cronId",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"modelauth.get.81",method:"GET",path:"/v1/model-auth",classes:["person","broker"],resource:"none"},{name:"modelauth.get.82",method:"GET",path:"/v1/model-auth/readiness",classes:["person","broker"],resource:"none"},{name:"modelauth.put.83",method:"PUT",path:"/v1/model-auth/:provider",classes:["person","broker"],resource:"none"},{name:"modelauth.delete.84",method:"DELETE",path:"/v1/model-auth/:provider",classes:["person","broker"],resource:"none"},{name:"modelauth.delete.account",method:"DELETE",path:"/v1/model-auth/:provider/accounts/:label",classes:["person","broker"],resource:"none"},{name:"modelauth.patch.account",method:"PATCH",path:"/v1/model-auth/:provider/accounts/:label",classes:["person","broker"],resource:"none"},{name:"model_auth.start",method:"POST",path:"/v1/model-auth/flows",classes:["person","broker"],resource:"none"},{name:"model_auth.complete",method:"POST",path:"/v1/model-auth/flows/:flow_id/complete",classes:["person","broker"],resource:"none"},{name:"model_auth.cancel",method:"POST",path:"/v1/model-auth/flows/:flow_id/cancel",classes:["person","broker"],resource:"none"},{name:"model_auth.get",method:"GET",path:"/v1/model-auth/flows/:flow_id",classes:["person","broker"],resource:"none"},{name:"nodes.post.85",method:"POST",path:"/v1/nodes",classes:["person","broker","cron"],resource:"node-own",scope:"crtr:act"},{name:"nodes.get.86",method:"GET",path:"/v1/nodes",classes:["person","broker","cron"],resource:"nodes-list"},{name:"nodes.post.87",method:"POST",path:"/v1/nodes/revive-all",classes:["person","broker"],resource:"none"},{name:"nodes.get.88",method:"GET",path:"/v1/nodes/:id",classes:["person","broker","cron","forwarded"],resource:"node-read"},{name:"nodes.get.89",method:"GET",path:"/v1/nodes/:id/snapshot",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.get.90",method:"GET",path:"/v1/nodes/:id/subject",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.get.91",method:"GET",path:"/v1/nodes/:id/messages",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.get.92",method:"GET",path:"/v1/nodes/:id/session",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.get.93",method:"GET",path:"/v1/nodes/:id/transcript",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.get.94",method:"GET",path:"/v1/nodes/:id/context",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.post.96",method:"POST",path:"/v1/nodes/:id/fork",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.97",method:"POST",path:"/v1/nodes/:id/revive",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.kick",method:"POST",path:"/v1/nodes/:id/kick",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.98",method:"POST",path:"/v1/nodes/:id/relaunch-root",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.99",method:"POST",path:"/v1/nodes/:id/close",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.read",method:"POST",path:"/v1/nodes/:id/read",classes:["person"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.100",method:"POST",path:"/v1/nodes/:id/recycle",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.101",method:"POST",path:"/v1/nodes/:id/demote",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.102",method:"POST",path:"/v1/nodes/:id/promote",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.103",method:"POST",path:"/v1/nodes/:id/yield",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.104",method:"POST",path:"/v1/nodes/:id/wait",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.patch.105",method:"PATCH",path:"/v1/nodes/:id/config",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"broker-recovery.post.106",method:"POST",path:"/v1/broker/:id/turn",classes:["person","broker"],resource:"node-own"},{name:"broker-recovery.post.107",method:"POST",path:"/v1/broker/:id/provider-retry",classes:["person","broker"],resource:"node-own"},{name:"broker-recovery.post.108",method:"POST",path:"/v1/broker/:id/fault",classes:["person","broker"],resource:"node-own"},{name:"broker-recovery.get.109",method:"GET",path:"/v1/broker/:id/recovery",classes:["person","broker"],resource:"node-own"},{name:"broker-recovery.post.110",method:"POST",path:"/v1/nodes/:id/fault",classes:["person","broker"],resource:"node-write"},{name:"broker-recovery.delete.111",method:"DELETE",path:"/v1/nodes/:id/fault",classes:["person","broker"],resource:"node-write"},{name:"profiles.put.112",method:"PUT",path:"/v1/profiles/:name",classes:["person","app","broker"],resource:"profile"},{name:"profiles.post.113",method:"POST",path:"/v1/profiles/:name/pause",classes:["person","broker"],resource:"profile"},{name:"profiles.post.114",method:"POST",path:"/v1/profiles/:name/resume",classes:["person","broker"],resource:"profile"},{name:"profiles.patch.115",method:"PATCH",path:"/v1/profiles/:name/metadata",classes:["person","app","broker"],resource:"profile"},{name:"profile.create",method:"POST",path:"/v1/profiles",classes:["person","app","broker"],resource:"profile"},{name:"profile.update",method:"PATCH",path:"/v1/profiles/:name",classes:["person","app","broker"],resource:"profile"},{name:"app.env.list",method:"GET",path:"/v1/apps/self/env",classes:["person","app","broker"],resource:"profile"},{name:"app.env.set",method:"PUT",path:"/v1/apps/self/env/:var",classes:["person","app","broker"],resource:"profile"},{name:"app.env.remove",method:"DELETE",path:"/v1/apps/self/env/:var",classes:["person","app","broker"],resource:"profile"},{name:"profile.env.list",method:"GET",path:"/v1/profiles/:name/env",classes:["person","app","broker"],resource:"profile"},{name:"profile.env.set",method:"PUT",path:"/v1/profiles/:name/env/:var",classes:["person","app","broker"],resource:"profile"},{name:"profile.env.remove",method:"DELETE",path:"/v1/profiles/:name/env/:var",classes:["person","app","broker"],resource:"profile"},{name:"profile.environment.get",method:"GET",path:"/v1/profiles/:name/environment",classes:["person","broker","cron"],resource:"profile"},{name:"profile.environment.set",method:"PUT",path:"/v1/profiles/:name/environment",classes:["person","broker"],resource:"profile"},{name:"profiles.delete.116",method:"DELETE",path:"/v1/profiles/:name",classes:["person","app","broker"],resource:"profile"},{name:"profile.list",method:"GET",path:"/v1/profiles",classes:["person","app","broker","cron"],resource:"profile",stage:"chat"},{name:"profiles.get.118",method:"GET",path:"/v1/profiles/:name",classes:["person","app","broker"],resource:"profile"},{name:"import.start",method:"POST",path:"/v1/imports",classes:["person","import"],resource:"none"},{name:"import.upload-urls",method:"POST",path:"/v1/imports/:run_id/upload-urls",classes:["person","import"],resource:"none"},{name:"import.store",method:"PUT",path:"/v1/imports/:run_id/stores/:name",classes:["person","import"],resource:"none"},{name:"import.load",method:"POST",path:"/v1/imports/:run_id/load",classes:["person","import"],resource:"none"},{name:"import.get",method:"GET",path:"/v1/imports/:run_id",classes:["person","import"],resource:"none"},{name:"import.rollback",method:"POST",path:"/v1/imports/:run_id/rollback",classes:["person"],resource:"none"},{name:"machine.register",method:"POST",path:"/v1/machines",classes:["person"],resource:"none"},{name:"import.machine-credential",method:"POST",path:"/v1/imports/:run_id/machine-credential",classes:["person"],resource:"none"},{name:"execution.import-unpacked",method:"POST",path:"/v1/executions/:execution_id/import-unpacked",classes:["broker"],resource:"none"},{name:"execution.start",method:"GET",path:"/v1/executions/:execution_id/start",classes:["broker"],resource:"none"},{name:"environment.git-credential",method:"POST",path:"/v1/environments/:environment_id/git-credential",classes:["broker"],resource:"none"},{name:"feedback.file",method:"POST",path:"/v1/feedback",classes:["broker"],resource:"none"},{name:"node-outcomes.get.119",method:"GET",path:"/v1/nodes/:id/outcome",classes:["person","broker","cron"],resource:"node-read"},{name:"node-outcomes.put.120",method:"PUT",path:"/v1/nodes/:id/outcome-delivery",classes:["person","broker"],resource:"node-write"},{name:"node-outcomes.get.121",method:"GET",path:"/v1/nodes/:id/outcome-delivery",classes:["person","broker","cron"],resource:"node-read"},{name:"node-outcomes.delete.122",method:"DELETE",path:"/v1/nodes/:id/outcome-delivery",classes:["person","broker"],resource:"node-write"},{name:"canvas.get.123",method:"GET",path:"/v1/canvas/attention",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.post.124",method:"POST",path:"/v1/canvas/attention/counts",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.post.125",method:"POST",path:"/v1/canvas/history/search",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.post.126",method:"POST",path:"/v1/canvas/history/grep",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.get.127",method:"GET",path:"/v1/canvas/history/read",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.post.128",method:"POST",path:"/v1/canvas/history/stats",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.get.129",method:"GET",path:"/v1/canvas/snapshot",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.get.130",method:"GET",path:"/v1/canvas/roster",classes:["person","broker","cron"],resource:"canvas-read"},{name:"canvas.get.view",method:"GET",path:"/v1/canvas/view/:id",classes:["person","broker"],resource:"canvas-read"},{name:"canvas.get.live-roots",method:"GET",path:"/v1/canvas/live-roots",classes:["person"],resource:"canvas-read"},{name:"canvas.get.browse",method:"GET",path:"/v1/canvas/browse",classes:["person","broker"],resource:"canvas-read"},{name:"canvas.get.analytics",method:"GET",path:"/v1/canvas/analytics",classes:["person","broker"],resource:"canvas-read"},{name:"memory-reads.post",method:"POST",path:"/v1/nodes/:id/memory-reads",classes:["person","broker"],resource:"node-own"},{name:"canvas.get.131",method:"GET",path:"/v1/canvas/graph",classes:["person","broker"],resource:"canvas-read"},{name:"canvas.post.132",method:"POST",path:"/v1/canvas/prune",classes:["person","broker"],resource:"none"},{name:"daemon.post.133",method:"POST",path:"/v1/daemon/restart",classes:["person","broker"],resource:"daemon-control"},{name:"daemon.post.134",method:"POST",path:"/v1/daemon/migrate",classes:["person","broker"],resource:"daemon-control"},{name:"daemon.drain.start",method:"POST",path:"/v1/daemon/drain",classes:["person"],resource:"daemon-control"},{name:"daemon.drain.end",method:"DELETE",path:"/v1/daemon/drain",classes:["person"],resource:"daemon-control"},{name:"daemon.post.135",method:"POST",path:"/v1/daemon/admit",classes:["person","broker"],resource:"daemon-control"},{name:"human.components.list",method:"GET",path:"/v1/human/components",classes:["person","broker"],resource:"none"},{name:"human-requests.post.136",method:"POST",path:"/v1/human/requests",classes:["person","broker"],resource:"human",scope:"crtr:act"},{name:"human-requests.get.137",method:"GET",path:"/v1/human/requests/:request_id",classes:["person","broker"],resource:"human"},{name:"human-requests.post.138",method:"POST",path:"/v1/human/requests/:request_id/replace",classes:["person","broker"],resource:"human"},{name:"human-requests.post.139",method:"POST",path:"/v1/human/requests/:request_id/respond",classes:["person","broker"],resource:"human"},{name:"human-requests.post.140",method:"POST",path:"/v1/human/requests/:request_id/dismiss",classes:["person","broker"],resource:"human"},{name:"human-requests.post.141",method:"POST",path:"/v1/human/requests/:request_id/cancel",classes:["person","broker"],resource:"human"},{name:"focus.get.142",method:"GET",path:"/v1/focuses",classes:["person","broker"],resource:"none"},{name:"focus.post.143",method:"POST",path:"/v1/focuses",classes:["person","broker"],resource:"none"},{name:"focus.get.144",method:"GET",path:"/v1/focuses/by-node",classes:["person","broker"],resource:"none"},{name:"focus.get.145",method:"GET",path:"/v1/focuses/by-pane",classes:["person","broker"],resource:"none"},{name:"focus.patch.146",method:"PATCH",path:"/v1/focuses/:focus_id",classes:["person","broker"],resource:"none"},{name:"focus.delete.147",method:"DELETE",path:"/v1/focuses/:focus_id",classes:["person","broker"],resource:"none"},{name:"delivery.retry",method:"POST",path:"/v1/deliveries/:delivery_id/retry",classes:["person","broker"],resource:"none"},{name:"limits.show",method:"GET",path:"/v1/limits",classes:["person","broker"],resource:"none"},{name:"limits.set",method:"PUT",path:"/v1/limits/apps/:app",classes:["person"],resource:"none"},{name:"limits.remove",method:"DELETE",path:"/v1/limits/apps/:app",classes:["person"],resource:"none"},{name:"charges.list",method:"GET",path:"/v1/charges",classes:["person","app","broker"],resource:"none",stage:"objects"},{name:"spend_limits.list",method:"GET",path:"/v1/spend-limits",classes:["person","broker"],resource:"none"},{name:"spend_limits.set",method:"PUT",path:"/v1/spend-limits/:id",classes:["person"],resource:"none"},{name:"spend_limits.remove",method:"DELETE",path:"/v1/spend-limits/:id",classes:["person"],resource:"none"},{name:"space.list",method:"GET",path:"/v1/spaces",classes:["person","broker"],resource:"none"},{name:"kinds.list",method:"GET",path:"/v1/kinds",classes:["person","app","broker"],resource:"none"},{name:"grant.get",method:"GET",path:"/v1/grant",classes:["app"],resource:"none",stage:"v0.5"},{name:"exec",method:"POST",path:"/v1/exec",classes:["app"],scope:"crtr:act",resource:"none",stage:"v0.5"},{name:"usage.get",method:"GET",path:"/v1/usage",classes:["person","app","broker"],resource:"none",stage:"v1"},{name:"llm",method:"POST",path:"/v1/llm",classes:["app","person","broker"],scope:"crtr:llm",resource:"none",stage:"v1"},{name:"llm.anthropic_messages",method:"POST",path:"/v1/llm/anthropic/messages",classes:["app"],scope:"crtr:llm",resource:"none",stage:"v1"},{name:"structured-request.create",method:"POST",path:"/v1/structured-requests",classes:["person","app","broker"],scope:"crtr:act",resource:"none"},{name:"structured-request.get",method:"GET",path:"/v1/structured-requests/:request_id",classes:["person","app","broker"],resource:"none"},{name:"structured-request.cancel",method:"POST",path:"/v1/structured-requests/:request_id/cancel",classes:["person","app","broker"],scope:"crtr:act",resource:"none"},{name:"run.start",method:"POST",path:"/v1/runs",classes:["app"],scope:"crtr:act",resource:"none",stage:"v0.5",idempotency:"24h"},{name:"run.list",method:"GET",path:"/v1/runs",classes:["app","person","broker","cron"],resource:"run",stage:"v0.5"},{name:"run.get",method:"GET",path:"/v1/runs/:run_id",classes:["app","person","broker","cron"],resource:"run",stage:"v0.5"},{name:"run.message",method:"POST",path:"/v1/runs/:run_id/messages",classes:["app","person","broker","cron"],scope:"crtr:act",resource:"run",stage:"v0.5",idempotency:"24h"},{name:"run.events",method:"GET",path:"/v1/runs/:run_id/events",classes:["app","person","broker","cron"],resource:"run",stage:"v0.5",stream:!0},{name:"run.interrupt",method:"POST",path:"/v1/runs/:run_id/interrupt",classes:["app","person","broker"],resource:"run",stage:"v0.5"},{name:"run.cancel",method:"POST",path:"/v1/runs/:run_id/cancel",classes:["app","person","broker"],resource:"run",stage:"v0.5"},{name:"run.delete",method:"DELETE",path:"/v1/runs/:run_id",classes:["app","person","broker"],resource:"run",stage:"v0.5"},{name:"run.rename",method:"POST",path:"/v1/runs/:run_id/rename",classes:["app"],resource:"run",stage:"chat"},{name:"question.get",method:"GET",path:"/v1/questions/:question_id",classes:["app"],resource:"none",stage:"chat"},{name:"question.answer",method:"POST",path:"/v1/questions/:question_id/answer",classes:["app"],resource:"none",stage:"chat"},{name:"question.cancel",method:"POST",path:"/v1/questions/:question_id/cancel",classes:["app"],resource:"none",stage:"chat"},{name:"trace.get",method:"GET",path:"/v1/runs/:run_id/trace",classes:["app","person","broker"],resource:"run",stage:"v0.5"},{name:"upload.create",method:"POST",path:"/v1/uploads",classes:["app"],scope:"crtr:act",resource:"none",stage:"file-transfer"},{name:"attachment.link",method:"GET",path:"/v1/attachments/link",classes:["app"],resource:"none",stage:"file-transfer"},{name:"file.link",method:"GET",path:"/v1/files/:file_id/link",classes:["app"],resource:"none",stage:"file-transfer"},{name:"share.create",method:"POST",path:"/v1/shares",classes:["app"],resource:"none",stage:"file-transfer"},{name:"share.list",method:"GET",path:"/v1/shares",classes:["app"],resource:"none",stage:"file-transfer"},{name:"share.delete",method:"DELETE",path:"/v1/shares/:share_id",classes:["app"],resource:"none",stage:"file-transfer"},{name:"memory.list",method:"GET",path:"/v1/memory",classes:["person","app","broker"],resource:"none",stage:"m13"},{name:"memory.get",method:"GET",path:"/v1/memory/document",classes:["person","app","broker"],resource:"none",stage:"m13"},{name:"audit.list",method:"GET",path:"/v1/audit",classes:["person","app"],resource:"none",stage:"v1"},{name:"provider.tools",method:"GET",path:"/v1/providers/tools",classes:["person","app","broker","cron"],resource:"none",stage:"v1"},{name:"provider.tools",method:"GET",path:"/v1/providers/:provider/tools",classes:["person","app","broker","cron"],resource:"none",stage:"v1"},{name:"provider.call",method:"POST",path:"/v1/provider/call",classes:["person","app","broker","cron"],resource:"none",stage:"v1"},{name:"peer.events",method:"POST",path:"/v1/peer/events",classes:["machine"],resource:"none"},{name:"peer.outbox.claim",method:"POST",path:"/v1/peer/outbox/claim",classes:["machine"],resource:"none"},{name:"peer.outbox.ack",method:"POST",path:"/v1/peer/outbox/ack",classes:["machine"],resource:"none"},{name:"peer.locate",method:"POST",path:"/v1/peer/locate",classes:["machine"],resource:"none"},{name:"runtime.sync-notice",method:"POST",path:"/v1/runtime/sync-notice",classes:["directory"],resource:"none",stage:"v1"},{name:"runtime.vendor-status",method:"GET",path:"/v1/runtime/vendor-status",classes:["directory"],resource:"none",stage:"v1"},{name:"runtime.vendor-account-remove",method:"POST",path:"/v1/runtime/vendor-account-remove",classes:["directory"],resource:"none",stage:"v1"}];function c(e,s){return n.find(o=>o.method===e.toUpperCase()&&o.path===s)}r(c,"operationFor");export{n as OPERATIONS,c as operationFor};
1
+ var a=Object.defineProperty;var r=(e,s)=>a(e,"name",{value:s,configurable:!0});const n=[{name:"conversation.create",method:"POST",path:"/v1/conversations",classes:["broker"],resource:"none"},{name:"conversation.list",method:"GET",path:"/v1/conversations",classes:["broker","person"],resource:"none"},{name:"conversation.append",method:"POST",path:"/v1/conversations/:id/entries",classes:["broker"],resource:"none"},{name:"conversation.commit",method:"POST",path:"/v1/conversations/:id/commit",classes:["broker"],resource:"none"},{name:"conversation.read",method:"GET",path:"/v1/conversations/:id",classes:["broker","person"],resource:"none"},{name:"conversation.header",method:"GET",path:"/v1/conversations/:id/header",classes:["broker","person"],resource:"none"},{name:"conversation.replace",method:"PUT",path:"/v1/conversations/:id",classes:["broker"],resource:"none"},{name:"conversation.fork",method:"POST",path:"/v1/conversations/:id/fork",classes:["broker"],resource:"none"},{name:"conversation.delete",method:"DELETE",path:"/v1/conversations/:id",classes:["broker"],resource:"none"},{name:"health",method:"GET",path:"/v1/health",classes:["anonymous"],resource:"none",stage:"v0.5"},{name:"ready",method:"GET",path:"/v1/ready",classes:["anonymous"],resource:"none",stage:"v0.5"},{name:"chat-inventory.get.1",method:"GET",path:"/v1/nodes/:id/chat-inventory",classes:["person","broker","cron"],resource:"node-read"},{name:"settings.get",method:"GET",path:"/v1/settings",classes:["person","broker"],resource:"none"},{name:"settings.put",method:"PUT",path:"/v1/settings",classes:["person","broker"],resource:"none"},{name:"model-config.put.2",method:"PUT",path:"/v1/model-config",classes:["person","broker"],resource:"none"},{name:"files.get.3",method:"GET",path:"/v1/files/peek",classes:["person","broker"],resource:"none"},{name:"files.post.4",method:"POST",path:"/v1/files/write",classes:["person","broker"],resource:"none"},{name:"files.get.5",method:"GET",path:"/v1/files/list",classes:["person","broker"],resource:"none"},{name:"reviews.post.6",method:"POST",path:"/v1/human/reviews",classes:["person","broker"],resource:"human",scope:"crtr:act"},{name:"reviews.get.7",method:"GET",path:"/v1/human/reviews",classes:["person","broker"],resource:"human"},{name:"reviews.get.8",method:"GET",path:"/v1/human/reviews/:review_id",classes:["person","broker"],resource:"human"},{name:"reviews.post.9",method:"POST",path:"/v1/human/reviews/:review_id/submit",classes:["person","broker"],resource:"human"},{name:"reviews.post.10",method:"POST",path:"/v1/human/reviews/:review_id/cancel",classes:["person","broker"],resource:"human"},{name:"reviews.get.11",method:"GET",path:"/v1/human/reviews/:review_id/document",classes:["person","broker"],resource:"human"},{name:"feedback-comments.post.12",method:"POST",path:"/v1/human/inbox/:ticket_id/feedback-comments",classes:["person","broker"],resource:"human"},{name:"feedback-comments.post.13",method:"POST",path:"/v1/human/inbox/:ticket_id/feedback-comments/:comment_id/resolve",classes:["person","broker"],resource:"human"},{name:"node.log.append",method:"POST",path:"/v1/nodes/:id/records/log",classes:["person","broker"],resource:"node-own"},{name:"node.summaries.put",method:"PUT",path:"/v1/nodes/:id/records/summaries",classes:["person","broker"],resource:"node-own"},{name:"node.attachments.list",method:"GET",path:"/v1/nodes/:id/attachments",classes:["person","broker"],resource:"node-own"},{name:"node.attachments.read",method:"GET",path:"/v1/nodes/:id/attachments/:sha256",classes:["person","broker"],resource:"node-own"},{name:"node.telemetry.put",method:"PUT",path:"/v1/nodes/:id/records/telemetry",classes:["person","broker"],resource:"node-own"},{name:"node.recap.put",method:"PUT",path:"/v1/nodes/:id/records/recap",classes:["person","broker"],resource:"node-own"},{name:"node.inbox.read",method:"GET",path:"/v1/nodes/:id/records/inbox",classes:["person","broker"],resource:"node-own"},{name:"node.passive.read",method:"GET",path:"/v1/nodes/:id/records/passive",classes:["person","broker"],resource:"node-own"},{name:"node.pushed-final",method:"POST",path:"/v1/nodes/:id/records/pushed-final",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.14",method:"POST",path:"/v1/nodes/:id/broker/session-bound",classes:["person","broker"],resource:"node-own"},{name:"broker.cycle-start",method:"POST",path:"/v1/nodes/:id/broker/cycle-start",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.15",method:"POST",path:"/v1/nodes/:id/broker/settle",classes:["person","broker"],resource:"node-own"},{name:"broker.cycle",method:"POST",path:"/v1/nodes/:id/broker/cycle",classes:["broker"],resource:"node-own"},{name:"broker.idle",method:"POST",path:"/v1/nodes/:id/broker/idle",classes:["broker"],resource:"node-own"},{name:"broker-ops.post.16",method:"POST",path:"/v1/nodes/:id/broker/park-complete",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.17",method:"POST",path:"/v1/nodes/:id/broker/park-activity",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.18",method:"POST",path:"/v1/nodes/:id/broker/telemetry",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.19",method:"POST",path:"/v1/nodes/:id/broker/model",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.get.20",method:"GET",path:"/v1/nodes/:id/broker/extension-state",classes:["person","broker"],resource:"node-own"},{name:"broker.signals",method:"GET",path:"/v1/nodes/:id/broker/signals",classes:["broker"],resource:"node-own",stream:!0},{name:"nodes.broker-structured-request",method:"GET",path:"/v1/nodes/:id/broker/structured-request",classes:["person","broker"],resource:"node-own"},{name:"nodes.broker-goal",method:"POST",path:"/v1/nodes/:id/broker/goal",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.21",method:"POST",path:"/v1/nodes/:id/broker/generated-name",classes:["person","broker"],resource:"node-own"},{name:"broker-ops.post.22",method:"POST",path:"/v1/nodes/:id/broker/persona-ack",classes:["person","broker"],resource:"node-own"},{name:"objects.read",method:"GET",path:"/v1/objects/:ref",classes:["person","app","broker","cron","forwarded"],resource:"objects",stage:"objects"},{name:"objects.list",method:"GET",path:"/v1/objects",classes:["person","app","broker","cron","forwarded"],resource:"objects",stage:"objects"},{name:"objects.search",method:"POST",path:"/v1/objects/search",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"objects.watch",method:"POST",path:"/v1/objects/:ref/watch",classes:["anonymous","person","app","broker","cron","forwarded"],resource:"objects",stage:"objects"},{name:"objects.unwatch",method:"DELETE",path:"/v1/objects/:ref/watch",classes:["anonymous","person","app","broker","cron","forwarded"],resource:"objects",stage:"objects"},{name:"objects.shares",method:"GET",path:"/v1/objects/:ref/shares",classes:["person","broker"],resource:"objects",stage:"objects"},{name:"objects.share",method:"POST",path:"/v1/objects/:ref/shares",classes:["person","broker"],resource:"objects",stage:"objects"},{name:"objects.unshare",method:"DELETE",path:"/v1/objects/:ref/shares",classes:["person","broker"],resource:"objects",stage:"objects"},{name:"custom-objects.register",method:"POST",path:"/v1/custom-objects",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"custom-objects.publish",method:"POST",path:"/v1/custom-objects/:ref/events",classes:["anonymous","person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"custom-objects.unregister",method:"DELETE",path:"/v1/custom-objects/:ref",classes:["anonymous","person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"custom-objects.receive",method:"GET",path:"/v1/custom-objects/:ref/deliveries",classes:["anonymous","person","app","broker","cron"],resource:"objects",stream:!0,stage:"objects"},{name:"custom-objects.ack",method:"POST",path:"/v1/custom-objects/:ref/deliveries/ack",classes:["anonymous","person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"objects.edges",method:"GET",path:"/v1/objects/:ref/edges",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"docs.write",method:"POST",path:"/v1/docs",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"docs.edit",method:"PATCH",path:"/v1/docs/:ref",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"docs.move",method:"POST",path:"/v1/docs/:ref/move",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"docs.delete",method:"DELETE",path:"/v1/docs/:ref",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"docs.history",method:"GET",path:"/v1/docs/:ref/history",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"schemas.register",method:"POST",path:"/v1/schemas",classes:["app"],resource:"objects",stage:"objects"},{name:"relations.write",method:"POST",path:"/v1/relations",classes:["app"],resource:"objects",stage:"objects"},{name:"relations.replace",method:"PUT",path:"/v1/relations",classes:["app"],resource:"objects",stage:"objects"},{name:"relations.list",method:"GET",path:"/v1/relations",classes:["app"],resource:"objects",stage:"objects"},{name:"check",method:"POST",path:"/v1/check",classes:["app"],resource:"objects",stage:"objects"},{name:"docs.lint",method:"POST",path:"/v1/docs/lint",classes:["person","app","broker","cron"],resource:"objects",stage:"objects"},{name:"plugins.app-token",method:"GET",path:"/v1/plugins/:name/app-token",classes:["person","broker"],resource:"none"},{name:"plugins.call-headers",method:"POST",path:"/v1/plugins/:name/call-headers",classes:["person","broker"],resource:"none"},{name:"documents.browser-access",method:"GET",path:"/v1/documents/browser-access",classes:["person"],resource:"none"},{name:"documents.reconcile-packages",method:"POST",path:"/v1/documents/reconcile-packages",classes:["person","broker"],resource:"none"},{name:"nodes.delivery",method:"POST",path:"/v1/nodes/:id/delivery",classes:["person","broker"],resource:"node-own"},{name:"delivery.dry-run",method:"POST",path:"/v1/delivery/dry-run",classes:["person","broker"],resource:"none"},{name:"bash-jobs.background",method:"POST",path:"/v1/nodes/:id/jobs/:jobId/background",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"health.get.33",method:"GET",path:"/healthz",classes:["anonymous"],resource:"none"},{name:"health.get.34",method:"GET",path:"/v1/status",classes:["person","broker"],resource:"none"},{name:"daemon.due",method:"GET",path:"/v1/due",classes:["person","broker"],resource:"none"},{name:"bash-jobs.report",method:"POST",path:"/v1/nodes/:id/jobs/:jobId/report",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"bash-jobs.patch",method:"PATCH",path:"/v1/nodes/:id/jobs/:jobId",classes:["person","broker"],resource:"node-write"},{name:"files.create",method:"POST",path:"/v1/nodes/:id/files",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"files.complete",method:"POST",path:"/v1/nodes/:id/files/:fileId/complete",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"node-uploads.create",method:"POST",path:"/v1/nodes/:id/uploads",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"node-uploads.link",method:"POST",path:"/v1/nodes/:id/uploads/:uploadId/link",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"bash-jobs.start",method:"POST",path:"/v1/nodes/:id/jobs/start",classes:["broker"],resource:"node-own",scope:"crtr:act"},{name:"hooks.plan",method:"GET",path:"/v1/nodes/:id/hooks/plan",classes:["broker"],resource:"node-own"},{name:"hooks.exec",method:"POST",path:"/v1/nodes/:id/hooks/exec",classes:["broker"],resource:"node-own"},{name:"hooks.exec.person",method:"POST",path:"/v1/hooks/exec",classes:["person","broker"],resource:"none"},{name:"bash-jobs.get.35",method:"GET",path:"/v1/nodes/:id/jobs",classes:["person","broker","cron"],resource:"node-read"},{name:"bash-jobs.output",method:"GET",path:"/v1/nodes/:id/jobs/:jobId/output",classes:["person","broker","cron"],resource:"node-read"},{name:"bash-jobs.delete.36",method:"DELETE",path:"/v1/nodes/:id/jobs/:jobId",classes:["person","broker"],resource:"node-write"},{name:"prospective-chat-inventory.get.37",method:"GET",path:"/v1/prospective-chat-inventory",classes:["person","broker"],resource:"none"},{name:"node-events.get.38",method:"GET",path:"/v1/nodes/:id/events",classes:["person","broker","cron"],resource:"node-read"},{name:"bash.post.39",method:"POST",path:"/v1/bash",classes:["person","broker"],resource:"daemon-bash",scope:"crtr:act"},{name:"subscriptions.post.40",method:"POST",path:"/v1/nodes/:id/subscriptions",classes:["person","broker"],resource:"node-write"},{name:"subscriptions.delete.41",method:"DELETE",path:"/v1/nodes/:id/subscriptions/:target",classes:["person","broker"],resource:"node-write"},{name:"attach.post.42",method:"POST",path:"/v1/nodes/:id/attach",classes:["person","broker"],resource:"node-write"},{name:"review-comments.post.44",method:"POST",path:"/v1/human/reviews/self/comments",classes:["person","broker"],resource:"human"},{name:"review-comments.get.45",method:"GET",path:"/v1/human/reviews/self/comments",classes:["person","broker"],resource:"human"},{name:"review-comments.post.46",method:"POST",path:"/v1/human/reviews/:review_id/comments",classes:["person","broker"],resource:"human"},{name:"review-comments.get.47",method:"GET",path:"/v1/human/reviews/:review_id/comments",classes:["person","broker"],resource:"human"},{name:"review-comments.get.48",method:"GET",path:"/v1/human/reviews/:review_id/comment-events",classes:["person","broker"],resource:"human"},{name:"review-comments.post.49",method:"POST",path:"/v1/human/reviews/:review_id/comment-ranges",classes:["person","broker"],resource:"human"},{name:"review-comments.get.50",method:"GET",path:"/v1/human/comments/:comment_id",classes:["person","broker"],resource:"human"},{name:"review-comments.post.51",method:"POST",path:"/v1/human/comments/:comment_id/edit",classes:["person","broker"],resource:"human"},{name:"review-comments.post.52",method:"POST",path:"/v1/human/comments/:comment_id/resolve",classes:["person","broker"],resource:"human"},{name:"review-comments.post.53",method:"POST",path:"/v1/human/comments/:comment_id/reopen",classes:["person","broker"],resource:"human"},{name:"review-comments.post.54",method:"POST",path:"/v1/human/comments/:comment_id/delete",classes:["person","broker"],resource:"human"},{name:"review-comments.post.55",method:"POST",path:"/v1/human/comments/:comment_id/fork",classes:["person","broker"],resource:"human"},{name:"messages.post.56",method:"POST",path:"/v1/nodes/:id/mail/claim",classes:["person","broker"],resource:"node-own"},{name:"messages.post.57",method:"POST",path:"/v1/nodes/:id/mail/acknowledge",classes:["person","broker"],resource:"node-own"},{name:"messages.post.58",method:"POST",path:"/v1/nodes/:id/messages",classes:["person","broker","cron","forwarded"],resource:"node-write"},{name:"messages.post.59",method:"POST",path:"/v1/nodes/:id/interrupt",classes:["person","broker","cron","forwarded"],resource:"node-write"},{name:"reports.post.60",method:"POST",path:"/v1/nodes/:id/reports",classes:["person","broker"],resource:"node-own"},{name:"reports.get.61",method:"GET",path:"/v1/nodes/:id/reports",classes:["person","broker","cron"],resource:"node-read"},{name:"reports.post.62",method:"POST",path:"/v1/nodes/:id/result",classes:["person","broker"],resource:"node-own"},{name:"inbox.get.63",method:"GET",path:"/v1/human/inbox",classes:["person","broker"],resource:"human"},{name:"inbox.get.64",method:"GET",path:"/v1/human/inbox/history",classes:["person","broker"],resource:"human"},{name:"inbox.get.65",method:"GET",path:"/v1/human/inbox/:ticket_id",classes:["person","broker"],resource:"human"},{name:"inbox.get.66",method:"GET",path:"/v1/human/inbox/:ticket_id/response",classes:["person","broker"],resource:"human"},{name:"inbox.post.67",method:"POST",path:"/v1/human/inbox/:ticket_id/respond",classes:["person","broker"],resource:"human"},{name:"inbox.post.68",method:"POST",path:"/v1/human/inbox/:ticket_id/progress",classes:["person","broker"],resource:"human"},{name:"inbox.post.69",method:"POST",path:"/v1/human/inbox/:ticket_id/cancel",classes:["person","broker"],resource:"human"},{name:"worktree.post.70",method:"POST",path:"/v1/nodes/:id/worktree/close",classes:["person","broker"],resource:"node-write"},{name:"worktree.post.71",method:"POST",path:"/v1/nodes/:id/worktree/abandon",classes:["person","broker"],resource:"node-write"},{name:"worktree.get.72",method:"GET",path:"/v1/worktrees/quarantined",classes:["person","broker"],resource:"none"},{name:"crons.post.73",method:"POST",path:"/v1/crons",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"crons.get.74",method:"GET",path:"/v1/crons",classes:["person","app","broker","cron"],resource:"cron"},{name:"crons.get.75",method:"GET",path:"/v1/crons/:cronId",classes:["person","app","broker","cron"],resource:"cron"},{name:"crons.post.76",method:"POST",path:"/v1/crons/:cronId/pause",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"crons.post.77",method:"POST",path:"/v1/crons/:cronId/resume",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"crons.post.78",method:"POST",path:"/v1/crons/poke",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"crons.post.79",method:"POST",path:"/v1/crons/:cronId/run",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"crons.delete.80",method:"DELETE",path:"/v1/crons/:cronId",classes:["person","app","broker","cron"],resource:"cron",scope:"crtr:schedule"},{name:"modelauth.get.81",method:"GET",path:"/v1/model-auth",classes:["person","broker"],resource:"none"},{name:"modelauth.get.82",method:"GET",path:"/v1/model-auth/readiness",classes:["person","broker"],resource:"none"},{name:"modelauth.put.83",method:"PUT",path:"/v1/model-auth/:provider",classes:["person","broker"],resource:"none"},{name:"modelauth.delete.84",method:"DELETE",path:"/v1/model-auth/:provider",classes:["person","broker"],resource:"none"},{name:"modelauth.delete.account",method:"DELETE",path:"/v1/model-auth/:provider/accounts/:label",classes:["person","broker"],resource:"none"},{name:"modelauth.patch.account",method:"PATCH",path:"/v1/model-auth/:provider/accounts/:label",classes:["person","broker"],resource:"none"},{name:"model_auth.start",method:"POST",path:"/v1/model-auth/flows",classes:["person","broker"],resource:"none"},{name:"model_auth.complete",method:"POST",path:"/v1/model-auth/flows/:flow_id/complete",classes:["person","broker"],resource:"none"},{name:"model_auth.cancel",method:"POST",path:"/v1/model-auth/flows/:flow_id/cancel",classes:["person","broker"],resource:"none"},{name:"model_auth.get",method:"GET",path:"/v1/model-auth/flows/:flow_id",classes:["person","broker"],resource:"none"},{name:"nodes.post.85",method:"POST",path:"/v1/nodes",classes:["person","broker","cron"],resource:"node-own",scope:"crtr:act"},{name:"nodes.get.86",method:"GET",path:"/v1/nodes",classes:["person","broker","cron"],resource:"nodes-list"},{name:"nodes.post.87",method:"POST",path:"/v1/nodes/revive-all",classes:["person","broker"],resource:"none"},{name:"nodes.get.88",method:"GET",path:"/v1/nodes/:id",classes:["person","broker","cron","forwarded"],resource:"node-read"},{name:"nodes.get.89",method:"GET",path:"/v1/nodes/:id/snapshot",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.get.90",method:"GET",path:"/v1/nodes/:id/subject",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.get.91",method:"GET",path:"/v1/nodes/:id/messages",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.get.92",method:"GET",path:"/v1/nodes/:id/session",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.get.93",method:"GET",path:"/v1/nodes/:id/transcript",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.get.94",method:"GET",path:"/v1/nodes/:id/context",classes:["person","broker","cron"],resource:"node-read"},{name:"nodes.post.96",method:"POST",path:"/v1/nodes/:id/fork",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.97",method:"POST",path:"/v1/nodes/:id/revive",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.kick",method:"POST",path:"/v1/nodes/:id/kick",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.98",method:"POST",path:"/v1/nodes/:id/relaunch-root",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.99",method:"POST",path:"/v1/nodes/:id/close",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.read",method:"POST",path:"/v1/nodes/:id/read",classes:["person"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.100",method:"POST",path:"/v1/nodes/:id/recycle",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.101",method:"POST",path:"/v1/nodes/:id/demote",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.102",method:"POST",path:"/v1/nodes/:id/promote",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.103",method:"POST",path:"/v1/nodes/:id/yield",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.post.104",method:"POST",path:"/v1/nodes/:id/wait",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"nodes.patch.105",method:"PATCH",path:"/v1/nodes/:id/config",classes:["person","broker"],resource:"node-write",scope:"crtr:act"},{name:"broker-recovery.post.106",method:"POST",path:"/v1/broker/:id/turn",classes:["person","broker"],resource:"node-own"},{name:"broker-recovery.post.107",method:"POST",path:"/v1/broker/:id/provider-retry",classes:["person","broker"],resource:"node-own"},{name:"broker-recovery.post.108",method:"POST",path:"/v1/broker/:id/fault",classes:["person","broker"],resource:"node-own"},{name:"broker-recovery.get.109",method:"GET",path:"/v1/broker/:id/recovery",classes:["person","broker"],resource:"node-own"},{name:"broker-recovery.post.110",method:"POST",path:"/v1/nodes/:id/fault",classes:["person","broker"],resource:"node-write"},{name:"broker-recovery.delete.111",method:"DELETE",path:"/v1/nodes/:id/fault",classes:["person","broker"],resource:"node-write"},{name:"profiles.put.112",method:"PUT",path:"/v1/profiles/:name",classes:["person","app","broker"],resource:"profile"},{name:"profiles.post.113",method:"POST",path:"/v1/profiles/:name/pause",classes:["person","broker"],resource:"profile"},{name:"profiles.post.114",method:"POST",path:"/v1/profiles/:name/resume",classes:["person","broker"],resource:"profile"},{name:"profiles.patch.115",method:"PATCH",path:"/v1/profiles/:name/metadata",classes:["person","app","broker"],resource:"profile"},{name:"profile.create",method:"POST",path:"/v1/profiles",classes:["person","app","broker"],resource:"profile"},{name:"profile.update",method:"PATCH",path:"/v1/profiles/:name",classes:["person","app","broker"],resource:"profile"},{name:"app.env.list",method:"GET",path:"/v1/apps/self/env",classes:["person","app","broker"],resource:"profile"},{name:"app.env.set",method:"PUT",path:"/v1/apps/self/env/:var",classes:["person","app","broker"],resource:"profile"},{name:"app.env.remove",method:"DELETE",path:"/v1/apps/self/env/:var",classes:["person","app","broker"],resource:"profile"},{name:"profile.env.list",method:"GET",path:"/v1/profiles/:name/env",classes:["person","app","broker"],resource:"profile"},{name:"profile.env.set",method:"PUT",path:"/v1/profiles/:name/env/:var",classes:["person","app","broker"],resource:"profile"},{name:"profile.env.remove",method:"DELETE",path:"/v1/profiles/:name/env/:var",classes:["person","app","broker"],resource:"profile"},{name:"profile.environment.get",method:"GET",path:"/v1/profiles/:name/environment",classes:["person","broker","cron"],resource:"profile"},{name:"profile.environment.set",method:"PUT",path:"/v1/profiles/:name/environment",classes:["person","broker"],resource:"profile"},{name:"profiles.delete.116",method:"DELETE",path:"/v1/profiles/:name",classes:["person","app","broker"],resource:"profile"},{name:"profile.list",method:"GET",path:"/v1/profiles",classes:["person","app","broker","cron"],resource:"profile",stage:"chat"},{name:"profiles.get.118",method:"GET",path:"/v1/profiles/:name",classes:["person","app","broker"],resource:"profile"},{name:"import.start",method:"POST",path:"/v1/imports",classes:["person","import"],resource:"none"},{name:"import.upload-urls",method:"POST",path:"/v1/imports/:run_id/upload-urls",classes:["person","import"],resource:"none"},{name:"import.store",method:"PUT",path:"/v1/imports/:run_id/stores/:name",classes:["person","import"],resource:"none"},{name:"import.load",method:"POST",path:"/v1/imports/:run_id/load",classes:["person","import"],resource:"none"},{name:"import.get",method:"GET",path:"/v1/imports/:run_id",classes:["person","import"],resource:"none"},{name:"import.rollback",method:"POST",path:"/v1/imports/:run_id/rollback",classes:["person"],resource:"none"},{name:"machine.register",method:"POST",path:"/v1/machines",classes:["person"],resource:"none"},{name:"machine.revoke",method:"DELETE",path:"/v1/machines/:environment_id",classes:["person"],resource:"none"},{name:"import.machine-credential",method:"POST",path:"/v1/imports/:run_id/machine-credential",classes:["person"],resource:"none"},{name:"execution.import-unpacked",method:"POST",path:"/v1/executions/:execution_id/import-unpacked",classes:["broker"],resource:"none"},{name:"execution.start",method:"GET",path:"/v1/executions/:execution_id/start",classes:["broker"],resource:"none"},{name:"environment.git-credential",method:"POST",path:"/v1/environments/:environment_id/git-credential",classes:["broker"],resource:"none"},{name:"feedback.file",method:"POST",path:"/v1/feedback",classes:["broker"],resource:"none"},{name:"node-outcomes.get.119",method:"GET",path:"/v1/nodes/:id/outcome",classes:["person","broker","cron"],resource:"node-read"},{name:"node-outcomes.put.120",method:"PUT",path:"/v1/nodes/:id/outcome-delivery",classes:["person","broker"],resource:"node-write"},{name:"node-outcomes.get.121",method:"GET",path:"/v1/nodes/:id/outcome-delivery",classes:["person","broker","cron"],resource:"node-read"},{name:"node-outcomes.delete.122",method:"DELETE",path:"/v1/nodes/:id/outcome-delivery",classes:["person","broker"],resource:"node-write"},{name:"canvas.get.123",method:"GET",path:"/v1/canvas/attention",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.post.124",method:"POST",path:"/v1/canvas/attention/counts",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.post.125",method:"POST",path:"/v1/canvas/history/search",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.post.126",method:"POST",path:"/v1/canvas/history/grep",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.get.127",method:"GET",path:"/v1/canvas/history/read",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.post.128",method:"POST",path:"/v1/canvas/history/stats",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.get.129",method:"GET",path:"/v1/canvas/snapshot",classes:["person","broker","forwarded"],resource:"canvas-read"},{name:"canvas.get.130",method:"GET",path:"/v1/canvas/roster",classes:["person","broker","cron"],resource:"canvas-read"},{name:"canvas.get.view",method:"GET",path:"/v1/canvas/view/:id",classes:["person","broker"],resource:"canvas-read"},{name:"canvas.get.live-roots",method:"GET",path:"/v1/canvas/live-roots",classes:["person"],resource:"canvas-read"},{name:"canvas.get.browse",method:"GET",path:"/v1/canvas/browse",classes:["person","broker"],resource:"canvas-read"},{name:"canvas.get.analytics",method:"GET",path:"/v1/canvas/analytics",classes:["person","broker"],resource:"canvas-read"},{name:"memory-reads.post",method:"POST",path:"/v1/nodes/:id/memory-reads",classes:["person","broker"],resource:"node-own"},{name:"canvas.get.131",method:"GET",path:"/v1/canvas/graph",classes:["person","broker"],resource:"canvas-read"},{name:"canvas.post.132",method:"POST",path:"/v1/canvas/prune",classes:["person","broker"],resource:"none"},{name:"daemon.post.133",method:"POST",path:"/v1/daemon/restart",classes:["person","broker"],resource:"daemon-control"},{name:"daemon.post.134",method:"POST",path:"/v1/daemon/migrate",classes:["person","broker"],resource:"daemon-control"},{name:"daemon.drain.start",method:"POST",path:"/v1/daemon/drain",classes:["person"],resource:"daemon-control"},{name:"daemon.drain.end",method:"DELETE",path:"/v1/daemon/drain",classes:["person"],resource:"daemon-control"},{name:"daemon.post.135",method:"POST",path:"/v1/daemon/admit",classes:["person","broker"],resource:"daemon-control"},{name:"human.components.list",method:"GET",path:"/v1/human/components",classes:["person","broker"],resource:"none"},{name:"human-requests.post.136",method:"POST",path:"/v1/human/requests",classes:["person","broker"],resource:"human",scope:"crtr:act"},{name:"human-requests.get.137",method:"GET",path:"/v1/human/requests/:request_id",classes:["person","broker"],resource:"human"},{name:"human-requests.post.138",method:"POST",path:"/v1/human/requests/:request_id/replace",classes:["person","broker"],resource:"human"},{name:"human-requests.post.139",method:"POST",path:"/v1/human/requests/:request_id/respond",classes:["person","broker"],resource:"human"},{name:"human-requests.post.140",method:"POST",path:"/v1/human/requests/:request_id/dismiss",classes:["person","broker"],resource:"human"},{name:"human-requests.post.141",method:"POST",path:"/v1/human/requests/:request_id/cancel",classes:["person","broker"],resource:"human"},{name:"focus.get.142",method:"GET",path:"/v1/focuses",classes:["person","broker"],resource:"none"},{name:"focus.post.143",method:"POST",path:"/v1/focuses",classes:["person","broker"],resource:"none"},{name:"focus.get.144",method:"GET",path:"/v1/focuses/by-node",classes:["person","broker"],resource:"none"},{name:"focus.get.145",method:"GET",path:"/v1/focuses/by-pane",classes:["person","broker"],resource:"none"},{name:"focus.patch.146",method:"PATCH",path:"/v1/focuses/:focus_id",classes:["person","broker"],resource:"none"},{name:"focus.delete.147",method:"DELETE",path:"/v1/focuses/:focus_id",classes:["person","broker"],resource:"none"},{name:"delivery.retry",method:"POST",path:"/v1/deliveries/:delivery_id/retry",classes:["person","broker"],resource:"none"},{name:"limits.show",method:"GET",path:"/v1/limits",classes:["person","broker"],resource:"none"},{name:"limits.set",method:"PUT",path:"/v1/limits/apps/:app",classes:["person"],resource:"none"},{name:"limits.remove",method:"DELETE",path:"/v1/limits/apps/:app",classes:["person"],resource:"none"},{name:"charges.list",method:"GET",path:"/v1/charges",classes:["person","app","broker"],resource:"none",stage:"objects"},{name:"spend_limits.list",method:"GET",path:"/v1/spend-limits",classes:["person","broker"],resource:"none"},{name:"spend_limits.set",method:"PUT",path:"/v1/spend-limits/:id",classes:["person"],resource:"none"},{name:"spend_limits.remove",method:"DELETE",path:"/v1/spend-limits/:id",classes:["person"],resource:"none"},{name:"space.list",method:"GET",path:"/v1/spaces",classes:["person","broker"],resource:"none"},{name:"kinds.list",method:"GET",path:"/v1/kinds",classes:["person","app","broker"],resource:"none"},{name:"grant.get",method:"GET",path:"/v1/grant",classes:["app"],resource:"none",stage:"v0.5"},{name:"exec",method:"POST",path:"/v1/exec",classes:["app"],scope:"crtr:act",resource:"none",stage:"v0.5"},{name:"usage.get",method:"GET",path:"/v1/usage",classes:["person","app","broker"],resource:"none",stage:"v1"},{name:"llm",method:"POST",path:"/v1/llm",classes:["app","person","broker"],scope:"crtr:llm",resource:"none",stage:"v1"},{name:"llm.anthropic_messages",method:"POST",path:"/v1/llm/anthropic/messages",classes:["app"],scope:"crtr:llm",resource:"none",stage:"v1"},{name:"structured-request.create",method:"POST",path:"/v1/structured-requests",classes:["person","app","broker"],scope:"crtr:act",resource:"none"},{name:"structured-request.get",method:"GET",path:"/v1/structured-requests/:request_id",classes:["person","app","broker"],resource:"none"},{name:"structured-request.cancel",method:"POST",path:"/v1/structured-requests/:request_id/cancel",classes:["person","app","broker"],scope:"crtr:act",resource:"none"},{name:"run.start",method:"POST",path:"/v1/runs",classes:["app"],scope:"crtr:act",resource:"none",stage:"v0.5",idempotency:"24h"},{name:"run.list",method:"GET",path:"/v1/runs",classes:["app","person","broker","cron"],resource:"run",stage:"v0.5"},{name:"run.get",method:"GET",path:"/v1/runs/:run_id",classes:["app","person","broker","cron"],resource:"run",stage:"v0.5"},{name:"run.message",method:"POST",path:"/v1/runs/:run_id/messages",classes:["app","person","broker","cron"],scope:"crtr:act",resource:"run",stage:"v0.5",idempotency:"24h"},{name:"run.events",method:"GET",path:"/v1/runs/:run_id/events",classes:["app","person","broker","cron"],resource:"run",stage:"v0.5",stream:!0},{name:"run.interrupt",method:"POST",path:"/v1/runs/:run_id/interrupt",classes:["app","person","broker"],resource:"run",stage:"v0.5"},{name:"run.cancel",method:"POST",path:"/v1/runs/:run_id/cancel",classes:["app","person","broker"],resource:"run",stage:"v0.5"},{name:"run.delete",method:"DELETE",path:"/v1/runs/:run_id",classes:["app","person","broker"],resource:"run",stage:"v0.5"},{name:"run.rename",method:"POST",path:"/v1/runs/:run_id/rename",classes:["app"],resource:"run",stage:"chat"},{name:"question.get",method:"GET",path:"/v1/questions/:question_id",classes:["app"],resource:"none",stage:"chat"},{name:"question.answer",method:"POST",path:"/v1/questions/:question_id/answer",classes:["app"],resource:"none",stage:"chat"},{name:"question.cancel",method:"POST",path:"/v1/questions/:question_id/cancel",classes:["app"],resource:"none",stage:"chat"},{name:"trace.get",method:"GET",path:"/v1/runs/:run_id/trace",classes:["app","person","broker"],resource:"run",stage:"v0.5"},{name:"upload.create",method:"POST",path:"/v1/uploads",classes:["app"],scope:"crtr:act",resource:"none",stage:"file-transfer"},{name:"attachment.link",method:"GET",path:"/v1/attachments/link",classes:["app"],resource:"none",stage:"file-transfer"},{name:"file.link",method:"GET",path:"/v1/files/:file_id/link",classes:["app"],resource:"none",stage:"file-transfer"},{name:"share.create",method:"POST",path:"/v1/shares",classes:["app"],resource:"none",stage:"file-transfer"},{name:"share.list",method:"GET",path:"/v1/shares",classes:["app"],resource:"none",stage:"file-transfer"},{name:"share.delete",method:"DELETE",path:"/v1/shares/:share_id",classes:["app"],resource:"none",stage:"file-transfer"},{name:"memory.list",method:"GET",path:"/v1/memory",classes:["person","app","broker"],resource:"none",stage:"m13"},{name:"memory.get",method:"GET",path:"/v1/memory/document",classes:["person","app","broker"],resource:"none",stage:"m13"},{name:"audit.list",method:"GET",path:"/v1/audit",classes:["person","app"],resource:"none",stage:"v1"},{name:"provider.tools",method:"GET",path:"/v1/providers/tools",classes:["person","app","broker","cron"],resource:"none",stage:"v1"},{name:"provider.tools",method:"GET",path:"/v1/providers/:provider/tools",classes:["person","app","broker","cron"],resource:"none",stage:"v1"},{name:"provider.call",method:"POST",path:"/v1/provider/call",classes:["person","app","broker","cron"],resource:"none",stage:"v1"},{name:"peer.events",method:"POST",path:"/v1/peer/events",classes:["machine"],resource:"none"},{name:"peer.outbox.claim",method:"POST",path:"/v1/peer/outbox/claim",classes:["machine"],resource:"none"},{name:"peer.outbox.ack",method:"POST",path:"/v1/peer/outbox/ack",classes:["machine"],resource:"none"},{name:"peer.locate",method:"POST",path:"/v1/peer/locate",classes:["machine"],resource:"none"},{name:"runtime.sync-notice",method:"POST",path:"/v1/runtime/sync-notice",classes:["directory"],resource:"none",stage:"v1"},{name:"runtime.vendor-status",method:"GET",path:"/v1/runtime/vendor-status",classes:["directory"],resource:"none",stage:"v1"},{name:"runtime.vendor-account-remove",method:"POST",path:"/v1/runtime/vendor-account-remove",classes:["directory"],resource:"none",stage:"v1"}];function c(e,s){return n.find(o=>o.method===e.toUpperCase()&&o.path===s)}r(c,"operationFor");export{n as OPERATIONS,c as operationFor};
@@ -1 +1 @@
1
- var Y=Object.defineProperty;var i=(t,r)=>Y(t,"name",{value:r,configurable:!0});import{chmodSync as F,closeSync as L,existsSync as G,mkdirSync as k,openSync as $,unlinkSync as J,writeFileSync as X,rmSync as R}from"node:fs";import{createServer as K}from"node:http";import{dirname as x,join as P}from"node:path";import{spawn as z}from"node:child_process";import{SELF_UPDATE_SCRIPT as C}from"../core/self-update.js";import{apiSocketPath as V,crtrHome as D}from"../core/canvas/paths.js";import{bindDaemonEventSource as W}from"../core/events/source.js";import{emitEvent as p}from"../core/events/emit.js";import{brokerCommandDeclaresCanvasHome as Q}from"../core/runtime/broker-ownership.js";import{createMachineExecutor as Z,findBrokers as q,stopAllBrokers as ee}from"../core/runtime/runner/machine/executor.js";import{machineCheckoutHandlers as ne}from"../core/checkout-identities.js";import{machineWorktreeHandlers as te}from"../core/worktree-machine.js";import{readPersonCredential as oe}from"../core/directory/person-credential.js";import{socketDir as re}from"../core/layout.js";import{isDaemonRunning as ie,pidfilePath as S,readPidfile as ae}from"./pidfile.js";import{cancelMachineCron as se,runMachineCron as ce,stopOrphanedMachineCrons as de}from"./cron/machine-exec.js";import{startMachineLink as me}from"./machine-link/client.js";import{deleteMoveRecord as O,readMachineConfig as fe,readMachineCredential as j,readMoveRecord as le,writeMoveRecord as pe}from"./machine-link/config.js";import{jobExitReporting as ue,stopMachineJob as he}from"./machine-link/job-sweep.js";import{notifyMoveFinished as ve}from"./machine-link/move-notify.js";import{machineSupervision as we,SUPERVISION_TICK_MS as ye}from"./machine-supervision.js";import{startBrokerMemoryCap as _e}from"./broker-memory-cap.js";const B=10*6e4,Se=3e4,Ie=75;let I=0;function ge(t){if(Date.now()-I<B||!/^\d+\.\d+\.\d+$/.test(t))return;I=Date.now(),p({level:"warn",event:"daemon.machine.updating",fields:{release:t}});const r=P(x(C),"..","bin","crtr"),a=$(P(D(),"crtrd.err"),"a"),n=z("/bin/sh",["-c",'"$0" "$1" --version "$2" && "$0" "$3" sys daemon restart',process.execPath,C,t,r],{detached:!0,stdio:["ignore",a,a]});n.on("exit",d=>{d===Ie&&(I=Date.now()-B+Se)}),n.unref(),L(a)}i(ge,"updateToRelease");const H=1024;function Ee(t,r){return{ok:!0,daemon_up:!0,store_accessible:!1,brokers_reconciled:!1,link_connected:t,signed_in:r,startup_phase:t?"ready":"recovering"}}i(Ee,"machineHealth");async function Qe(){const t=fe();if(t===void 0)throw new Error("crtrd --role machine needs runtime/machine.json: this install has not been imported as a machine");const r=oe()!==void 0;if(r&&j(),ie())throw new Error("a crtrd is already running for this home");W(),r||(await ee(),await de(),p({level:"info",event:"daemon.machine.signed_out",fields:{environment:t.environmentId}})),k(re(),{recursive:!0,mode:493});const a=V();G(a)&&J(a);let n;const d=ue(()=>n),s=K((e,o)=>{const c=(e.url??"").split("?")[0];if(e.method==="POST"&&(c==="/job-exit"||c==="/job-activity")){const T=[];let _=0;e.on("data",m=>{_+=m.length,_<=H&&T.push(m)}),e.on("end",()=>{if(_>H){o.writeHead(413),o.end();return}let m={};try{m=JSON.parse(Buffer.concat(T).toString("utf8"))}catch{}const b=typeof m.node=="string"&&typeof m.job=="string";o.writeHead(b?202:400,{"content-type":"application/json; charset=utf-8"}),o.end("{}"),b&&(c==="/job-exit"?d.notice:d.activity)(m.node,m.job)});return}const M=(e.method??"GET")==="GET"&&(e.url??"/").split("?")[0]==="/healthz";o.writeHead(M?200:404,{"content-type":"application/json; charset=utf-8"}),o.end(JSON.stringify(M?Ee(n?.connected()===!0,r):{error:{code:"not_found",message:"a machine-role crtrd serves only /healthz",origin:"runtime"}}))});await new Promise((e,o)=>{s.once("error",o),s.listen(a,()=>{s.off("error",o),F(a,384),e()})}),k(x(S()),{recursive:!0}),X(S(),String(process.pid),"utf8");let l;await be(t.runId,r,()=>l!==void 0);const u=new Set,v=new Set;let w=!1;const f=Z({apiUrl:t.apiUrl,environmentId:t.environmentId,onExit:i(e=>n?.reportExit(e),"onExit")}),U=i(async(e,o)=>{u.add(e.executionId);for(const c of v)c.add(e.executionId);try{return await f.start(e,o)}finally{u.delete(e.executionId)}},"start");n=r?me({apiUrl:t.apiUrl,environmentId:t.environmentId,credential:j,onOpen:i(()=>{d.onOpen(),w=!0},"onOpen"),onBehind:ge,handlers:{start:U,wake:f.wake,stop:f.stop,status:f.status,delete:f.delete,viewer:f.viewer,"cron.run":ce,"cron.cancel":se,"job.stop":i(e=>he(e),"job.stop"),...te,...ne}}):void 0;const g=n===void 0?void 0:we({link:n,brokers:i(async()=>{const e=new Set(u);v.add(e);const o=await q().finally(()=>v.delete(e));return w&&(w=!1,n?.reportRunning([...new Set([...e,...o.filter(c=>Q(c.command,D())).map(c=>c.execution)])])),o},"brokers"),stop:i((e,o)=>f.stop({execution:{executionId:e,nodeId:o,attempt:0},options:{reason:"yield_stall"}}),"stop")});let y=!1;const A=g===void 0?void 0:setInterval(()=>{y||(y=!0,g(Date.now()).catch(e=>p({level:"error",event:"daemon.machine.supervision_failed",error:e})).finally(()=>{y=!1}))},ye),N=_e();p({level:"info",event:"daemon.machine.started",fields:{environment:t.environmentId}});const E=i(()=>l??=(async()=>{n?.stop(),clearInterval(A),N(),await new Promise(e=>{s.close(()=>e()),s.closeAllConnections()}),ae()===process.pid&&(R(a,{force:!0}),R(S(),{force:!0})),process.off("SIGINT",h),process.off("SIGTERM",h)})(),"teardown"),h=i(()=>{E().then(()=>process.exit(0),()=>process.exit(1))},"onSignal");return process.on("SIGINT",h),process.on("SIGTERM",h),E}i(Qe,"runMachineDaemon");const Me=5e3,Te=3e5;async function be(t,r,a){let n;try{n=le()}catch(s){p({level:"warn",event:"daemon.machine.move_record_unreadable",fields:{error:s.message}});return}if(n===void 0||n.state==="running"||n.runId!==t)return;if(n.notified||n.notify===null){O();return}if(n.state==="committed"&&(n={...n,state:"activated"},pe(n)),!r)return;const d=n;(async()=>{let s=Me;for(;;){try{await ve(d),O();return}catch(l){p({level:"warn",event:"daemon.machine.move_notify_failed",fields:{node:d.notify??"",error:l.message}})}if(await new Promise(l=>{setTimeout(l,s).unref()}),a())return;s=Math.min(s*2,Te)}})()}i(be,"settleFinishedMove");export{Ee as machineHealth,Qe as runMachineDaemon};
1
+ var Y=Object.defineProperty;var i=(t,r)=>Y(t,"name",{value:r,configurable:!0});import{chmodSync as F,closeSync as L,existsSync as G,mkdirSync as k,openSync as $,unlinkSync as J,writeFileSync as X,rmSync as R}from"node:fs";import{createServer as K}from"node:http";import{dirname as x,join as P}from"node:path";import{spawn as z}from"node:child_process";import{SELF_UPDATE_SCRIPT as C}from"../core/self-update.js";import{apiSocketPath as V,crtrHome as D}from"../core/canvas/paths.js";import{bindDaemonEventSource as W}from"../core/events/source.js";import{emitEvent as u}from"../core/events/emit.js";import{brokerCommandDeclaresCanvasHome as Q}from"../core/runtime/broker-ownership.js";import{createMachineExecutor as Z,findBrokers as q,stopAllBrokers as ee}from"../core/runtime/runner/machine/executor.js";import{machineCheckoutHandlers as ne}from"../core/checkout-identities.js";import{machineWorktreeHandlers as te}from"../core/worktree-machine.js";import{readPersonCredential as oe}from"../core/directory/person-credential.js";import{socketDir as re}from"../core/layout.js";import{isDaemonRunning as ie,pidfilePath as S,readPidfile as ae}from"./pidfile.js";import{cancelMachineCron as se,runMachineCron as ce,stopOrphanedMachineCrons as de}from"./cron/machine-exec.js";import{startMachineLink as me}from"./machine-link/client.js";import{deleteMoveRecord as O,readMachineConfig as fe,readMachineCredential as j,readMoveRecord as le,writeMoveRecord as ue}from"./machine-link/config.js";import{jobExitReporting as pe,stopMachineJob as he}from"./machine-link/job-sweep.js";import{notifyMoveFinished as ve}from"./machine-link/move-notify.js";import{machineSupervision as we,SUPERVISION_TICK_MS as ye}from"./machine-supervision.js";import{startBrokerMemoryCap as _e}from"./broker-memory-cap.js";const B=10*6e4,Se=3e4,Ie=75;let I=0;function ge(t){if(Date.now()-I<B||!/^\d+\.\d+\.\d+$/.test(t))return;I=Date.now(),u({level:"warn",event:"daemon.machine.updating",fields:{release:t}});const r=P(x(C),"..","bin","crtr"),a=$(P(D(),"crtrd.err"),"a"),n=z("/bin/sh",["-c",'"$0" "$1" --version "$2" && "$0" "$3" sys daemon restart',process.execPath,C,t,r],{detached:!0,stdio:["ignore",a,a]});n.on("exit",d=>{d===Ie&&(I=Date.now()-B+Se)}),n.unref(),L(a)}i(ge,"updateToRelease");const H=1024;function Ee(t,r){return{ok:!0,daemon_up:!0,store_accessible:!1,brokers_reconciled:!1,link_connected:t,signed_in:r,startup_phase:t?"ready":"recovering"}}i(Ee,"machineHealth");async function Qe(){const t=fe();if(t===void 0)throw new Error("crtrd --role machine needs runtime/machine.json: this install has not been imported as a machine");const r=oe()!==void 0;if(r&&j(),ie())throw new Error("a crtrd is already running for this home");W(),r||(await ee(),await de(),u({level:"info",event:"daemon.machine.signed_out",fields:{environment:t.environmentId}})),k(re(),{recursive:!0,mode:493});const a=V();G(a)&&J(a);let n;const d=pe(()=>n),s=K((e,o)=>{const c=(e.url??"").split("?")[0];if(e.method==="POST"&&(c==="/job-exit"||c==="/job-activity")){const T=[];let _=0;e.on("data",m=>{_+=m.length,_<=H&&T.push(m)}),e.on("end",()=>{if(_>H){o.writeHead(413),o.end();return}let m={};try{m=JSON.parse(Buffer.concat(T).toString("utf8"))}catch{}const b=typeof m.node=="string"&&typeof m.job=="string";o.writeHead(b?202:400,{"content-type":"application/json; charset=utf-8"}),o.end("{}"),b&&(c==="/job-exit"?d.notice:d.activity)(m.node,m.job)});return}const M=(e.method??"GET")==="GET"&&(e.url??"/").split("?")[0]==="/healthz";o.writeHead(M?200:404,{"content-type":"application/json; charset=utf-8"}),o.end(JSON.stringify(M?Ee(n?.connected()===!0,r):{error:{code:"not_found",message:"a machine-role crtrd serves only /healthz",origin:"runtime"}}))});await new Promise((e,o)=>{s.once("error",o),s.listen(a,()=>{s.off("error",o),F(a,384),e()})}),k(x(S()),{recursive:!0}),X(S(),String(process.pid),"utf8");let l;t.runId!==void 0&&await be(t.runId,r,()=>l!==void 0);const p=new Set,v=new Set;let w=!1;const f=Z({apiUrl:t.apiUrl,environmentId:t.environmentId,onExit:i(e=>n?.reportExit(e),"onExit")}),U=i(async(e,o)=>{p.add(e.executionId);for(const c of v)c.add(e.executionId);try{return await f.start(e,o)}finally{p.delete(e.executionId)}},"start");n=r?me({apiUrl:t.apiUrl,environmentId:t.environmentId,credential:j,onOpen:i(()=>{d.onOpen(),w=!0},"onOpen"),onBehind:ge,handlers:{start:U,wake:f.wake,stop:f.stop,status:f.status,delete:f.delete,viewer:f.viewer,"cron.run":ce,"cron.cancel":se,"job.stop":i(e=>he(e),"job.stop"),...te,...ne}}):void 0;const g=n===void 0?void 0:we({link:n,brokers:i(async()=>{const e=new Set(p);v.add(e);const o=await q().finally(()=>v.delete(e));return w&&(w=!1,n?.reportRunning([...new Set([...e,...o.filter(c=>Q(c.command,D())).map(c=>c.execution)])])),o},"brokers"),stop:i((e,o)=>f.stop({execution:{executionId:e,nodeId:o,attempt:0},options:{reason:"yield_stall"}}),"stop")});let y=!1;const A=g===void 0?void 0:setInterval(()=>{y||(y=!0,g(Date.now()).catch(e=>u({level:"error",event:"daemon.machine.supervision_failed",error:e})).finally(()=>{y=!1}))},ye),N=_e();u({level:"info",event:"daemon.machine.started",fields:{environment:t.environmentId}});const E=i(()=>l??=(async()=>{n?.stop(),clearInterval(A),N(),await new Promise(e=>{s.close(()=>e()),s.closeAllConnections()}),ae()===process.pid&&(R(a,{force:!0}),R(S(),{force:!0})),process.off("SIGINT",h),process.off("SIGTERM",h)})(),"teardown"),h=i(()=>{E().then(()=>process.exit(0),()=>process.exit(1))},"onSignal");return process.on("SIGINT",h),process.on("SIGTERM",h),E}i(Qe,"runMachineDaemon");const Me=5e3,Te=3e5;async function be(t,r,a){let n;try{n=le()}catch(s){u({level:"warn",event:"daemon.machine.move_record_unreadable",fields:{error:s.message}});return}if(n===void 0||n.state==="running"||n.runId!==t)return;if(n.notified||n.notify===null){O();return}if(n.state==="committed"&&(n={...n,state:"activated"},ue(n)),!r)return;const d=n;(async()=>{let s=Me;for(;;){try{await ve(d),O();return}catch(l){u({level:"warn",event:"daemon.machine.move_notify_failed",fields:{node:d.notify??"",error:l.message}})}if(await new Promise(l=>{setTimeout(l,s).unref()}),a())return;s=Math.min(s*2,Te)}})()}i(be,"settleFinishedMove");export{Ee as machineHealth,Qe as runMachineDaemon};
@@ -5,11 +5,11 @@ export interface NorthlightAccount {
5
5
  display: string;
6
6
  }
7
7
  /** `directoryUrl` is the directory the person signs in against (`crtr sys signin`).
8
- * `account` is the account the records moved into, kept only to name it when another account signs in; a Mac moved before it existed has none. */
8
+ * `runId` is present only on a computer whose records were moved by an import. `account` is the account this computer belongs to (always written now; a Mac moved before it existed has none). */
9
9
  export interface MachineConfig {
10
10
  apiUrl: string;
11
11
  environmentId: string;
12
- runId: string;
12
+ runId?: string;
13
13
  directoryUrl: string;
14
14
  account?: NorthlightAccount;
15
15
  }
@@ -43,3 +43,8 @@ export declare function deleteMoveRecord(): void;
43
43
  export declare const isMoveCommitted: () => boolean;
44
44
  /** The one `move_unfinished` error: every command, `crtr sys import resume` and a move whose switch-over failed answer it alike (exit code USAGE, as `not_signed_in`). */
45
45
  export declare const moveUnfinishedError: (reason?: string) => CrtrError;
46
+ /** This computer's install id, kept under `runtime/` so it exists before any daemon: the machine registration names it, and a reinstall that keeps `runtime/` registers the same machine again. */
47
+ export declare const installIdPath: () => string;
48
+ export declare function readOrCreateInstallId(): string;
49
+ /** Whether this computer still holds a local canvas from before crtr was fleet-only (a supervised Postgres or a SQLite file). */
50
+ export declare const hasLocalCanvas: () => boolean;
@@ -1,3 +1,4 @@
1
- var y=Object.defineProperty;var e=(r,t)=>y(r,"name",{value:t,configurable:!0});import{chmodSync as l,existsSync as n,mkdirSync as s,readFileSync as o,rmSync as h,writeFileSync as u}from"node:fs";import{dirname as p,join as i}from"node:path";import{runtimeRoot as f,secretsDir as g}from"../../core/layout.js";import{CrtrError as v}from"../../core/errors.js";import{atomicWriteJson as U}from"../../core/fs-utils.js";import{ExitCode as x}from"../../types.js";const c=e(()=>i(f(),"machine.json"),"machineConfigPath"),m=e(()=>i(g(),"machine-credential"),"machineCredentialPath");function J(){const r=c();if(!n(r))return;const t=JSON.parse(o(r,"utf8"));if(typeof t.apiUrl!="string"||typeof t.environmentId!="string"||typeof t.runId!="string"||typeof t.directoryUrl!="string")throw new Error(`${r} must hold {apiUrl, environmentId, runId, directoryUrl}`);const a=t.account!==void 0&&typeof t.account?.id=="string"&&typeof t.account.display=="string"?{id:t.account.id,display:t.account.display}:void 0;return{apiUrl:t.apiUrl,environmentId:t.environmentId,runId:t.runId,directoryUrl:t.directoryUrl,...a===void 0?{}:{account:a}}}e(J,"readMachineConfig");function N(r){s(p(c()),{recursive:!0}),u(c(),`${JSON.stringify(r,null,2)}
2
- `)}e(N,"writeMachineConfig");function j(){const r=m();if(!n(r))throw new Error(`no machine credential at ${r}`);return o(r,"utf8").trim()}e(j,"readMachineCredential");function O(r){const t=m();s(p(t),{recursive:!0}),u(t,`${r}
3
- `,{mode:384}),l(t,384)}e(O,"writeMachineCredential");const d=e(()=>i(f(),"import","move.json"),"moveRecordPath");function w(){const r=d();if(!n(r))return;const t=JSON.parse(o(r,"utf8"));if(typeof t.runId!="string"||typeof t.apiUrl!="string"||typeof t.directoryUrl!="string"||t.state!=="running"&&t.state!=="committed"&&t.state!=="activated"||typeof t.account?.id!="string"||typeof t.account.display!="string")throw new Error(`${r} is not a move record`);return{runId:t.runId,apiUrl:t.apiUrl,directoryUrl:t.directoryUrl,account:{id:t.account.id,display:t.account.display},notify:typeof t.notify=="string"?t.notify:null,state:t.state,notified:t.notified===!0,pid:typeof t.pid=="number"?t.pid:0}}e(w,"readMoveRecord");function P(r){U(d(),r,{mode:384})}e(P,"writeMoveRecord");function b(){h(d(),{force:!0})}e(b,"deleteMoveRecord");const F=e(()=>w()?.state==="committed","isMoveCommitted"),k=e(r=>new v("move_unfinished",`crtr's records are already in your Northlight account, but this computer has not switched over${r===void 0?".":`: ${r}`}`,x.USAGE,{next:"Run `crtr sys signin` to finish."}),"moveUnfinishedError");export{b as deleteMoveRecord,F as isMoveCommitted,c as machineConfigPath,m as machineCredentialPath,d as moveRecordPath,k as moveUnfinishedError,J as readMachineConfig,j as readMachineCredential,w as readMoveRecord,N as writeMachineConfig,O as writeMachineCredential,P as writeMoveRecord};
1
+ var l=Object.defineProperty;var n=(r,t)=>l(r,"name",{value:t,configurable:!0});import{chmodSync as y,existsSync as e,mkdirSync as a,readFileSync as c,rmSync as h,writeFileSync as s}from"node:fs";import{randomBytes as v}from"node:crypto";import{dirname as u,join as o}from"node:path";import{runtimeRoot as d,secretsDir as g}from"../../core/layout.js";import{CrtrError as x}from"../../core/errors.js";import{atomicWriteJson as U}from"../../core/fs-utils.js";import{ExitCode as w}from"../../types.js";const p=n(()=>o(d(),"machine.json"),"machineConfigPath"),m=n(()=>o(g(),"machine-credential"),"machineCredentialPath");function N(){const r=p();if(!e(r))return;const t=JSON.parse(c(r,"utf8"));if(typeof t.apiUrl!="string"||typeof t.environmentId!="string"||t.runId!==void 0&&typeof t.runId!="string"||typeof t.directoryUrl!="string")throw new Error(`${r} must hold {apiUrl, environmentId, directoryUrl}`);const i=t.account!==void 0&&typeof t.account?.id=="string"&&typeof t.account.display=="string"?{id:t.account.id,display:t.account.display}:void 0;return{apiUrl:t.apiUrl,environmentId:t.environmentId,...t.runId===void 0?{}:{runId:t.runId},directoryUrl:t.directoryUrl,...i===void 0?{}:{account:i}}}n(N,"readMachineConfig");function O(r){a(u(p()),{recursive:!0}),s(p(),`${JSON.stringify(r,null,2)}
2
+ `)}n(O,"writeMachineConfig");function P(){const r=m();if(!e(r))throw new Error(`no machine credential at ${r}`);return c(r,"utf8").trim()}n(P,"readMachineCredential");function k(r){const t=m();a(u(t),{recursive:!0}),s(t,`${r}
3
+ `,{mode:384}),y(t,384)}n(k,"writeMachineCredential");const f=n(()=>o(d(),"import","move.json"),"moveRecordPath");function I(){const r=f();if(!e(r))return;const t=JSON.parse(c(r,"utf8"));if(typeof t.runId!="string"||typeof t.apiUrl!="string"||typeof t.directoryUrl!="string"||t.state!=="running"&&t.state!=="committed"&&t.state!=="activated"||typeof t.account?.id!="string"||typeof t.account.display!="string")throw new Error(`${r} is not a move record`);return{runId:t.runId,apiUrl:t.apiUrl,directoryUrl:t.directoryUrl,account:{id:t.account.id,display:t.account.display},notify:typeof t.notify=="string"?t.notify:null,state:t.state,notified:t.notified===!0,pid:typeof t.pid=="number"?t.pid:0}}n(I,"readMoveRecord");function A(r){U(f(),r,{mode:384})}n(A,"writeMoveRecord");function F(){h(f(),{force:!0})}n(F,"deleteMoveRecord");const q=n(()=>I()?.state==="committed","isMoveCommitted"),z=n(r=>new x("move_unfinished",`crtr's records are already in your Northlight account, but this computer has not switched over${r===void 0?".":`: ${r}`}`,w.USAGE,{next:"Run `crtr sys signin` to finish."}),"moveUnfinishedError"),C=n(()=>o(d(),"install-id"),"installIdPath");function B(){const r=C();if(e(r))return c(r,"utf8").trim();const t=Array.from(v(8),i=>"abcdefghijklmnopqrstuvwxyz0123456789"[i%36]).join("");return a(u(r),{recursive:!0}),s(r,`${t}
4
+ `),t}n(B,"readOrCreateInstallId");const D=n(()=>["pg","canvas.db","canvas.db.imported"].some(r=>e(o(d(),r))),"hasLocalCanvas");export{F as deleteMoveRecord,D as hasLocalCanvas,C as installIdPath,q as isMoveCommitted,p as machineConfigPath,m as machineCredentialPath,f as moveRecordPath,z as moveUnfinishedError,N as readMachineConfig,P as readMachineCredential,I as readMoveRecord,B as readOrCreateInstallId,O as writeMachineConfig,k as writeMachineCredential,A as writeMoveRecord};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/cli",
3
- "version": "0.3.735",
3
+ "version": "0.3.737",
4
4
  "description": "crtr — agent runtime with memory, plugins, and marketplaces",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -158,8 +158,8 @@
158
158
  },
159
159
  "license": "UNLICENSED",
160
160
  "dependencies": {
161
- "@north-light/identity": "0.3.735",
162
- "@north-light/plugin": "0.3.735",
161
+ "@north-light/identity": "0.3.737",
162
+ "@north-light/plugin": "0.3.737",
163
163
  "@earendil-works/chord": "1.5.2",
164
164
  "@earendil-works/pi-agent-core": "1.5.2",
165
165
  "@earendil-works/pi-ai": "1.5.2",
@@ -12,7 +12,7 @@
12
12
  //
13
13
  // PURITY (spec §3.1): Node built-ins + `src/api/*` only.
14
14
  /** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
15
- export const CONTRACT_LEVEL = '1.73';
15
+ export const CONTRACT_LEVEL = '1.74';
16
16
  /** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
17
17
  export const REQUIRED_CONTRACT_HEADER = 'Crouter-Required-Contract';
18
18
  /** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
@@ -4,14 +4,14 @@ import { mkdirSync, openSync } from 'node:fs';
4
4
  import { dirname, join } from 'node:path';
5
5
  import { defineLeaf } from '../../core/command.js';
6
6
  import { CrtrError } from '../../core/errors.js';
7
- import { signIn, signOut } from '../../core/directory/person-credential.js';
8
- import { moveRecordPath, readMachineConfig } from '../../daemon/machine-link/config.js';
9
- import { sanitizedDaemonEnv, spawnDaemon, stopAllDaemons } from '../../daemon/manage.js';
7
+ import { controlPlaneUrl, personAccount, personBearer, readPersonCredential, signIn, signOut } from '../../core/directory/person-credential.js';
8
+ import { hasLocalCanvas, moveRecordPath, readMachineConfig, readOrCreateInstallId, writeMachineConfig, writeMachineCredential } from '../../daemon/machine-link/config.js';
9
+ import { probeDaemonHealth, sanitizedDaemonEnv, spawnDaemon, stopAllDaemons } from '../../daemon/manage.js';
10
+ import { hostname } from 'node:os';
10
11
  import { northlightUnreachable } from '../../core/directory/reach.js';
11
12
  import { envNodeId } from '../../shared/env.js';
12
13
  import { ExitCode } from '../../types.js';
13
14
  import { insideBroker } from './join.js';
14
- import { cliClient } from '../api-client.js';
15
15
  import { defaultDirectoryUrl, finishMove, registerThisMac, runMove, settleEarlierMove } from './import/move.js';
16
16
  import { WAIT_FOR_PID_ENV } from './import/start.js';
17
17
  /** Open the confirm page in the person's browser; a failure to open it is harmless because the code and address are printed too. */
@@ -31,6 +31,10 @@ export function showSignIn(prompt) {
31
31
  * to the run's own person (404 `import_not_found` to anyone else). */
32
32
  function sameAccountOnly(machine) {
33
33
  return async (approved) => {
34
+ if (machine.runId === undefined) {
35
+ return machine.account === undefined || machine.account.id === approved.account.id ? undefined
36
+ : new CrtrError('signin_other_account', `This computer belongs to the Northlight account ${machine.account.display}. Sign in to that account.`, ExitCode.USAGE);
37
+ }
34
38
  let response;
35
39
  try {
36
40
  response = await fetch(new URL(`/v1/imports/${machine.runId}`, machine.apiUrl), { headers: { authorization: `Bearer ${approved.bearer}` }, signal: AbortSignal.timeout(30_000) });
@@ -59,6 +63,37 @@ function startDetachedMove(notify) {
59
63
  const args = [...process.execArgv, process.argv[1], 'sys', 'import', 'start', '--kind', 'machine', ...(notify === undefined ? [] : ['--notify', notify])];
60
64
  spawn(process.execPath, args, { detached: true, stdio: ['ignore', fd, fd], env }).unref();
61
65
  }
66
+ /** A computer with no `machine.json` and no local canvas becomes a fleet machine: `POST /v1/machines`, then `machine.json`, the credential, the directory registration and the machine daemon.
67
+ * The stored sign-in is reused when present, so running this again after `northlight_unreachable` resumes at registration. */
68
+ export async function registerFreshComputer(directoryUrl) {
69
+ const account = readPersonCredential() === undefined ? (await signIn(directoryUrl, showSignIn), await personAccount(directoryUrl)) : await personAccount(directoryUrl);
70
+ const apiUrl = await controlPlaneUrl(directoryUrl);
71
+ const bearer = await personBearer(directoryUrl);
72
+ const post = async (rotate) => {
73
+ try {
74
+ return await fetch(new URL(`/v1/machines${rotate ? '?rotate=1' : ''}`, apiUrl), { method: 'POST', headers: { authorization: `Bearer ${bearer}`, 'content-type': 'application/json' },
75
+ body: JSON.stringify({ install_id: readOrCreateInstallId(), name: hostname().slice(0, 64) }), signal: AbortSignal.timeout(30_000) });
76
+ }
77
+ catch (error) {
78
+ throw northlightUnreachable(error, apiUrl);
79
+ }
80
+ };
81
+ let response = await post(false);
82
+ if (response.status === 409 && (await response.clone().text()).includes('credential_exists'))
83
+ response = await post(true);
84
+ const text = await response.text();
85
+ if (!response.ok)
86
+ throw new CrtrError('machine_registration_failed', `Northlight refused to register this computer (HTTP ${response.status}): ${text.slice(0, 300)}`, ExitCode.GENERAL, { next: 'Run `crtr sys signin` again.' });
87
+ const body = JSON.parse(text);
88
+ if (typeof body.credential !== 'string' || typeof body.environment_id !== 'string')
89
+ throw new CrtrError('machine_registration_failed', 'Northlight answered without a credential', ExitCode.GENERAL);
90
+ writeMachineCredential(body.credential);
91
+ writeMachineConfig({ apiUrl, environmentId: body.environment_id, directoryUrl, account });
92
+ await registerThisMac(directoryUrl);
93
+ await stopAllDaemons();
94
+ await spawnDaemon();
95
+ return { account: account.display };
96
+ }
62
97
  const MOVING = (account) => `Signed in as ${account}. crtr is now moving this computer's records to Northlight; every agent here pauses for seconds to minutes. End your turn now; this conversation carries on when the move finishes.`;
63
98
  export const sysSigninLeaf = defineLeaf({
64
99
  name: 'signin',
@@ -80,6 +115,7 @@ export const sysSigninLeaf = defineLeaf({
80
115
  effects: [
81
116
  'Calls the directory (`POST /v1/developer/logins`, then polls `/v1/developer/logins/poll`) and, once approved, writes `runtime/secrets/person-credential` (0600) and replaces the cached bearer. A declined, abandoned or refused sign-in writes nothing and leaves an existing sign-in as it was.',
82
117
  'On a computer whose records are local: the move of `crtr sys import start --kind machine` (drains the daemon, uploads, restarts it in machine role); a move confirmed failed before the account holds the records ends the drain and signs this computer out again. If the account\'s result is unknown, the move record and drain remain for recovery. From inside a node it runs as a detached process logging to `runtime/import/move.log`.',
118
+ 'On a computer with no local records: registers it with `POST /v1/machines`, writes `runtime/machine.json` and `runtime/secrets/machine-credential`, and starts the machine daemon. Run again after `northlight_unreachable`, it resumes at registration with the stored sign-in.',
83
119
  'On a moved computer: restarts the daemon so it reconnects to Northlight.',
84
120
  'Unless this computer is already registered: calls `PUT <directory>/v1/runtimes/registration` with the sign-in bearer and a new public ES256 key, then writes `runtime/secrets/runtime-client.json` (0600) holding the private key and the returned runtime identity.',
85
121
  ],
@@ -103,6 +139,8 @@ export const sysSigninLeaf = defineLeaf({
103
139
  await spawnDaemon();
104
140
  return { account };
105
141
  }
142
+ if (!hasLocalCanvas())
143
+ return await registerFreshComputer(directoryUrl);
106
144
  const { account } = await signIn(directoryUrl, showSignIn);
107
145
  if (insideBroker()) {
108
146
  startDetachedMove(envNodeId());
@@ -120,8 +158,22 @@ export const sysSigninLeaf = defineLeaf({
120
158
  async function stopMovedComputer() {
121
159
  await stopAllDaemons();
122
160
  await spawnDaemon();
123
- const health = await cliClient({ local: true }).healthz();
124
- return health.signed_in === false;
161
+ return (await probeDaemonHealth()).signed_in === false;
162
+ }
163
+ /** End this computer's machine credential at the control plane with the stored sign-in, so signing out works with no daemon running. Skipped when there is no sign-in to authenticate with. */
164
+ async function revokeMachine(machine) {
165
+ if (readPersonCredential() === undefined)
166
+ return;
167
+ const bearer = await personBearer(machine.directoryUrl);
168
+ let response;
169
+ try {
170
+ response = await fetch(new URL(`/v1/machines/${machine.environmentId}`, machine.apiUrl), { method: 'DELETE', headers: { authorization: `Bearer ${bearer}` }, signal: AbortSignal.timeout(30_000) });
171
+ }
172
+ catch (error) {
173
+ throw northlightUnreachable(error, machine.apiUrl);
174
+ }
175
+ if (!response.ok && response.status !== 404)
176
+ throw new CrtrError('machine_revoke_failed', `Northlight refused to revoke this computer's machine credential (HTTP ${response.status}): ${(await response.text()).slice(0, 300)}`, ExitCode.GENERAL, { next: 'Run `crtr sys signout` again.' });
125
177
  }
126
178
  export const sysSignoutLeaf = defineLeaf({
127
179
  name: 'signout',
@@ -138,13 +190,16 @@ export const sysSignoutLeaf = defineLeaf({
138
190
  ],
139
191
  outputKind: 'object',
140
192
  effects: [
141
- 'Calls `POST /v1/developer/token/revoke` with the stored secret, then deletes `runtime/secrets/person-credential` and `person-bearer.json`. A bearer already issued stays valid for at most 5 minutes.',
193
+ 'On a fleet machine first calls `DELETE /v1/machines/<environment>` with the stored sign-in, which ends the machine credential (no running daemon needed). Then calls `POST /v1/developer/token/revoke` with the stored secret, then deletes `runtime/secrets/person-credential` and `person-bearer.json`. A bearer already issued stays valid for at most 5 minutes.',
142
194
  'On a computer whose records are in Northlight: restarts the daemon, which stops every agent and running cron here and takes no new work until `crtr sys signin`; agents keep their mail on Northlight and wake after it. Commands answer `not_signed_in`.',
143
195
  ],
144
196
  },
145
197
  run: async () => {
198
+ const machine = readMachineConfig();
199
+ if (machine !== undefined)
200
+ await revokeMachine(machine);
146
201
  const { signedOut, revoked } = await signOut();
147
- const stopped = readMachineConfig() === undefined ? false : await stopMovedComputer();
202
+ const stopped = machine === undefined ? false : await stopMovedComputer();
148
203
  return { signed_out: signedOut, revoked, stopped };
149
204
  },
150
205
  render: (r) => `<signout signed_out="${r['signed_out']}" revoked="${r['revoked']}" stopped="${r['stopped']}"/>`,
@@ -4,6 +4,7 @@ import { openDb, withCanvasWrite } from '../canvas/db.js';
4
4
  import { isUnsandboxedMachine } from '../runtime/unsandboxed.js';
5
5
  import { replaceWrittenBy, userSubject } from '../permissions/facts.js';
6
6
  import { GROUP_TYPE } from '../permissions/builtin.js';
7
+ import { shadowCheck } from './shadow.js';
7
8
  const SETUP_STATES = ['not_started', 'pending', 'ready', 'failed', 'unavailable'];
8
9
  const STRENGTHS = ['ultra', 'strong', 'medium', 'light'];
9
10
  /** The fleet's runtime principal (`CRTR_RUNTIME`): a cloud role reads only its own runtime's grants, so a person's VM or laptop grants are never used. A Mac sets none. */
@@ -104,7 +105,10 @@ function active(row) {
104
105
  if (!row || row.status !== 'active')
105
106
  return null;
106
107
  try {
107
- return activeRecord(record(row));
108
+ const grant = activeRecord(record(row));
109
+ if (grant !== null)
110
+ shadowCheck(grant);
111
+ return grant;
108
112
  }
109
113
  catch (error) {
110
114
  if (error instanceof TypeError || error instanceof SyntaxError)
@@ -278,7 +282,7 @@ export function activeRecord(grant) {
278
282
  }
279
283
  }
280
284
  /** JSON with every object's keys sorted, at every depth, and arrays kept in order. */
281
- function canonicalJson(value) {
285
+ export function canonicalJson(value) {
282
286
  if (Array.isArray(value))
283
287
  return `[${value.map(canonicalJson).join(',')}]`;
284
288
  if (value && typeof value === 'object') {