@skrr-ai/cli 0.1.207 → 0.1.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/agent/message/resolve.d.ts +31 -0
- package/dist/commands/agent/message/resolve.js +111 -0
- package/dist/commands/agent/message/send.d.ts +17 -5
- package/dist/commands/agent/message/send.js +77 -26
- package/dist/commands/agent/request/list.d.ts +15 -0
- package/dist/commands/agent/request/list.js +82 -0
- package/dist/commands/agent/request/send.d.ts +18 -0
- package/dist/commands/agent/request/send.js +56 -0
- package/dist/commands/agents/access/approve.d.ts +17 -0
- package/dist/commands/agents/access/approve.js +94 -0
- package/dist/commands/agents/access/deny.d.ts +10 -0
- package/dist/commands/agents/access/deny.js +36 -0
- package/dist/commands/agents/access/list.d.ts +10 -0
- package/dist/commands/agents/access/list.js +53 -0
- package/dist/commands/agents/access/reach.d.ts +13 -0
- package/dist/commands/agents/access/reach.js +53 -0
- package/dist/commands/agents/access/revoke.d.ts +13 -0
- package/dist/commands/agents/access/revoke.js +50 -0
- package/dist/commands/agents/import.d.ts +15 -1
- package/dist/commands/agents/import.js +211 -23
- package/dist/commands/agents/intuitions/accept.d.ts +0 -1
- package/dist/commands/agents/intuitions/accept.js +22 -7
- package/dist/commands/agents/intuitions/generate.d.ts +0 -1
- package/dist/commands/agents/intuitions/generate.js +4 -16
- package/dist/commands/agents/intuitions/list.js +9 -3
- package/dist/commands/agents/intuitions/resume.d.ts +11 -0
- package/dist/commands/agents/intuitions/resume.js +37 -0
- package/dist/commands/agents/shared-memory.d.ts +24 -0
- package/dist/commands/agents/shared-memory.js +67 -0
- package/dist/commands/agents/visibility.d.ts +1 -0
- package/dist/commands/agents/visibility.js +14 -0
- package/dist/commands/code/migrate.js +3 -1
- package/dist/commands/duties/advance-next.js +15 -6
- package/dist/commands/followups/show.js +9 -0
- package/dist/commands/followups/watch-pr.d.ts +27 -0
- package/dist/commands/followups/watch-pr.js +123 -0
- package/dist/commands/memory/consolidation/index.d.ts +20 -0
- package/dist/commands/memory/consolidation/index.js +78 -0
- package/dist/commands/memory/consolidation/resume.d.ts +14 -0
- package/dist/commands/memory/consolidation/resume.js +46 -0
- package/dist/commands/memory/consolidation/undo.d.ts +18 -0
- package/dist/commands/memory/consolidation/undo.js +60 -0
- package/dist/commands/slack/mutes.d.ts +10 -0
- package/dist/commands/slack/mutes.js +62 -0
- package/dist/commands/slack/unmute.d.ts +12 -0
- package/dist/commands/slack/unmute.js +44 -0
- package/dist/commands/tasks/actionability.js +9 -0
- package/dist/commands/tasks/ask.d.ts +50 -0
- package/dist/commands/tasks/ask.js +190 -0
- package/dist/commands/tasks/handover.js +14 -0
- package/dist/commands/tasks/input/answer.js +8 -2
- package/dist/commands/tasks/input/show.d.ts +26 -0
- package/dist/commands/tasks/input/show.js +185 -17
- package/dist/commands/tasks/move.d.ts +11 -0
- package/dist/commands/tasks/move.js +82 -1
- package/dist/commands/tasks/result/submit.js +3 -0
- package/dist/commands/tasks/runs.d.ts +4 -1
- package/dist/commands/tasks/runs.js +22 -3
- package/dist/commands/tasks/show.js +22 -1
- package/dist/commands/tasks/update.d.ts +1 -0
- package/dist/commands/tasks/update.js +52 -1
- package/dist/commands/tasks/updates/add.js +3 -0
- package/dist/commands/tasks/wait.d.ts +20 -0
- package/dist/commands/tasks/wait.js +102 -1
- package/dist/generated/agent-guides.json +501 -92
- package/dist/generated/managed-instruction-guides.json +1 -1
- package/dist/lib/agent-access-command.d.ts +19 -0
- package/dist/lib/agent-access-command.js +44 -0
- package/dist/lib/agent-access.d.ts +18 -0
- package/dist/lib/agent-access.js +48 -0
- package/dist/lib/agent-import/apply.d.ts +50 -0
- package/dist/lib/agent-import/apply.js +85 -0
- package/dist/lib/agent-import/plan.d.ts +132 -0
- package/dist/lib/agent-import/plan.js +504 -0
- package/dist/lib/agent-import/reader.d.ts +94 -0
- package/dist/lib/agent-import/reader.js +326 -0
- package/dist/lib/agent-import/schedule.d.ts +46 -0
- package/dist/lib/agent-import/schedule.js +220 -0
- package/dist/lib/agent-import/sources.d.ts +124 -0
- package/dist/lib/agent-import/sources.js +797 -0
- package/dist/lib/followups.d.ts +61 -0
- package/dist/lib/followups.js +39 -0
- package/dist/lib/handover-interview.d.ts +18 -0
- package/dist/lib/handover-interview.js +53 -0
- package/dist/lib/input-queue.js +2 -1
- package/dist/lib/intuition-look.d.ts +10 -0
- package/dist/lib/intuition-look.js +64 -0
- package/dist/lib/record-output.d.ts +1 -1
- package/dist/lib/record-output.js +2 -0
- package/dist/lib/skill-import.d.ts +19 -0
- package/dist/lib/skill-import.js +34 -0
- package/dist/lib/slack-thread-mutes.d.ts +25 -0
- package/dist/lib/slack-thread-mutes.js +12 -0
- package/dist/lib/task-carriers.d.ts +18 -0
- package/dist/lib/task-carriers.js +43 -0
- package/dist/lib/task-extras.d.ts +5 -0
- package/dist/lib/task-extras.js +5 -0
- package/dist/lib/task-recurrence-summary.d.ts +15 -0
- package/dist/lib/task-recurrence-summary.js +22 -0
- package/dist/lib/task-version.d.ts +44 -0
- package/dist/lib/task-version.js +73 -0
- package/dist/lib/task-write-attribution.d.ts +7 -0
- package/dist/lib/task-write-attribution.js +14 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/turnPacing.d.ts +75 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/turnPacing.js +124 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/turnPacing.d.ts +75 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/turnPacing.js +141 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +10 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +13323 -12577
- package/oclif.manifest.json +1787 -107
- package/package.json +5 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"oversky-task-management": {
|
|
3
3
|
"key": "oversky-task-management",
|
|
4
4
|
"name": "skrr Task Management",
|
|
5
|
-
"templateVersion":
|
|
5
|
+
"templateVersion": 25,
|
|
6
6
|
"body": "## OverSky Task Management\n\nUse `skrr` as the durable record for work that must outlive this conversation.\n\n### One concept, one record\n\n- **Task** says what is owed and where it stands.\n- **Expectation** says what must be true before the Task can close.\n- **Update** says what meaningfully changed during execution.\n- **Resume Point** says where one Run can safely continue after interruption.\n- **Result** says what the work concluded or returned.\n- **Deliverable** identifies a concrete Resource version produced by the work.\n- **Review** says whether another actor accepted one exact Result.\n- **Comment** is replyable collaboration.\n- **Activity** is the immutable audit projection. A Run transcript is detailed telemetry, not Activity.\n\nDo not put a Result in a Comment, use an Update as a transcript, or use review words such as\n“approved” for a domain conclusion such as NO-SHIP.\n\nThe platform derives Human, Agent, Run, session, and recording provenance from the authenticated\nruntime. Never supply or invent an Agent identity. An Update has one author; a multi-Agent summary\nmay cite contributors and their source Runs or Updates.\n\n### During execution: write Updates at meaningful boundaries\n\nDo not log routine reads, tool calls, heartbeats, token counts, or repeated “still working” narration.\nRecord an Update only when a future reader or replacement Run needs to know that shared state changed:\n\nEach type has a REQUIRED `--data` shape, and the array fields are required even when empty.\nOptional fields are marked `?`. The server rejects a missing required field, so guessing from the\nprose costs a round trip:\n\n- `progress`: a material part is complete.\n `{completedSinceLast: string[], nextActions: string[], currentFocus?}`\n- `finding`: a newly discovered fact. `impact` is optional; the evidence references are not.\n `{finding, evidenceRefs: [], impact?, severity?}`\n- `decision`: a choice now constrains the work.\n `{decision, rationale, alternativesConsidered?: string[]}`\n- `blocker`: work cannot continue. `nextOwner` is a principal OBJECT, not a name.\n `{cause, requiredAction, nextOwner: {kind: \"human\", userId}}`\n- `verification`: a claim was checked. `result` is one of `passed`, `failed`, `inconclusive`.\n `{claim, result, evidenceRefs: []}`\n- `ready_for_review`: created by Result submission; do not author it separately.\n\n`--reference <kind>:<id>` sets the Update's OWN references. It does not populate\n`data.evidenceRefs`, which belongs inside `--data`.\n\nUse one stable idempotency key only for retries of the identical write. Reusing it for different\ncontent is rejected.\n\nExample:\n\n```bash\nskrr tasks updates add <task-id> \\\n --type progress \\\n --summary \"Migration review complete\" \\\n --data '{\"completedSinceLast\":[\"Checked migrations 001-014\"],\"currentFocus\":\"Authorization review\",\"nextActions\":[\"Inspect legacy adapters\"]}' \\\n --idempotency-key \"<task-id>:migration-review\"\n```\n\nFor a decision:\n\n```bash\nskrr tasks updates add <task-id> \\\n --type decision \\\n --summary \"Use a first-class Resource identity\" \\\n --data '{\"decision\":\"Use WorkResource plus immutable versions\",\"rationale\":\"A URL can move and cannot identify the version a reviewer accepted\"}' \\\n --idempotency-key \"<task-id>:resource-model\"\n```\n\nFor a finding — `evidenceRefs` is required and may be empty:\n\n```bash\nskrr tasks updates add <task-id> \\\n --type finding \\\n --summary \"The closure gate reads assessments by exact specVersion\" \\\n --data '{\"finding\":\"A cosmetic title edit bumps specVersion, so every prior assessment stops counting\",\"impact\":\"A task with expectations cannot be closed after a rename\",\"evidenceRefs\":[{\"kind\":\"code\",\"uri\":\"api/server/services/TaskClosurePolicy/index.js\"}]}' \\\n --idempotency-key \"<task-id>:spec-bump-revocation\"\n```\n\nFor a blocker — `nextOwner` is a principal object:\n\n```bash\nskrr tasks updates add <task-id> \\\n --type blocker \\\n --summary \"Waiting on production database credentials\" \\\n --data '{\"cause\":\"The migration needs write access to the prod cluster\",\"requiredAction\":\"Grant the deploy role write access, or run the migration yourself\",\"nextOwner\":{\"kind\":\"human\",\"userId\":\"<user-id>\"}}' \\\n --idempotency-key \"<task-id>:needs-prod-credentials\"\n```\n\nFor a verification:\n\n```bash\nskrr tasks updates add <task-id> \\\n --type verification \\\n --summary \"Re-ran the closure flow end to end after the fix\" \\\n --data '{\"claim\":\"A renamed task with one assessed expectation can close\",\"result\":\"passed\",\"evidenceRefs\":[{\"kind\":\"task\",\"id\":\"<task-id>\"}]}' \\\n --idempotency-key \"<task-id>:closure-reverify\"\n```\n\n### Media: screenshots and recordings\n\n`--attach <path>` (repeatable) on `updates add`, `result submit`, `complete`, or `comments add`\nuploads a file as a Task asset and cites it; identical bytes dedupe. In-run proof goes on a\n`verification` or `progress` Update, the final before/after on the Result, never the description.\nAn upload is `self_reported` evidence and counts toward the storage quota. Images keep full\nresolution minus metadata (Runs get a model-sized copy); undecodable bytes get 422, a type the bytes\ncontradict 415, and SVG downloads as a file. An agent uploads evidence (the default) or\n`--role deliverable`; `input` is refused (403): ask a person to run `attachments set-role`. Cite a\ndeliverable as `--evidence task_attachment:<asset-id>` when you assess its Expectation.\n\n### Recovery: Update delta and Resume Point snapshot\n\nWhen a semantic boundary should also be resumable, add `--run-id` and `--resume` to the same Update\ncommand. The server commits the visible Update and the Run-bound Resume Point together. The snapshot\nmust be self-contained enough for another capable Agent to continue without replaying the transcript:\ncompleted work, current focus, next actions, open questions, and references to decisions, evidence,\nDeliverables, and durable workspace state.\n\nThe runtime may save a silent crash-safety snapshot with:\n\n```bash\nskrr tasks resume save <task-id> --run-id <run-id> --snapshot '<resume-json>'\n```\n\nNever put credentials, secrets, permission grants, bearer tokens, or leases in a Resume Point. A\nresumed Run reloads the current Task Revision, re-authorizes, validates referenced files/commits, and\nreads Updates recorded after the snapshot:\n\n```bash\nskrr tasks resume show <task-id> --run-id <run-id>\n```\n\n### Deliverables: lightweight input, first-class identity\n\nA user may provide one coordinate, but the platform records a WorkResource, its exact version, the\nTask relationship, and an evidence-backed availability observation. External reference is the\ndefault; OverSky-managed content is used only when retention, stable access, preview/search, or\npolicy requires a copy.\n\n```bash\nskrr tasks deliverable add <task-id> \\\n file/markdown:docs/reviews/report.md@docs/reviews/report.md \\\n --status in_review\n```\n\nA recording made by its producer is always self-reported; the caller cannot promote itself to a\nHuman confirmation, system observation, or provider receipt. A local path is only local availability. A commit, provider revision, digest, or managed object\nfreezes the exact version. Do not call “in the conversation” a Deliverable.\n\nA Human confirms the exact linked version, not a retyped URL or name:\n\n```bash\nskrr tasks deliverable confirm <task-id> <task-resource-link-id> --reason \"Opened and checked this exact version\"\n```\n\n### Result and Review are separate\n\nSubmit the finished answer once:\n\n```bash\nskrr tasks result submit <task-id> \\\n --summary \"NO-SHIP until remediation Gates A-D pass\" \\\n --conclusion-type release_recommendation \\\n --conclusion-json '{\"posture\":\"no_ship\"}' \\\n --deliverable <task-resource-link-id>\n```\n\nAn amendment creates a new Result version and explicitly supersedes the previous one. There is one\ncurrent Result; old versions remain in Activity and are not ordinary Updates.\n\nOnly another actor records acceptance, against that exact Result:\n\n```bash\nskrr tasks review <task-id> --result-id <result-id> --decision accepted --rationale \"Evidence checked\"\n```\n\n“Accepted” means the submitted work was accepted. NO-SHIP, BUY, REJECT, root cause, experiment\ndecision, and similar subject-matter conclusions belong in `Result.conclusion`, never in Review.\n\nUse `skrr tasks complete` only when submitting the Result and advancing workflow in one closeout.\nDo not call `tasks report` before or after it; `tasks complete` already creates the canonical Result.\n\nSubmitting a Result is not the same as closing the Task, and being an Agent is not by itself a\nreason to stop. Closing is always the closer's call — unmet Expectations or a Changes-requested\nReview do not prevent it; they are RECORDED on the close (`resolution.closure`), so closing over\nthem hides nothing and settles nothing. The one exception is an owner-declared required Review\n(`--review-policy required`): a non-owner cannot close without it — unless they close with\n`--force`, which records the override on the resolution — and the owner always can.\n\nSo do not predict the outcome. `result submit` reports where the Task stands after the write —\nread that, and if you need to ask again later:\n\n```bash\nskrr tasks expectations <task-id> # what is owed, and why the Result cannot be accepted yet\n```\n\nSay “ready for review” only when something you read actually said so.\n\n### Expectations\n\nExpectations are free text first. A typed check explains how the statement can be assessed; it never\nreplaces the sentence.\n\nAn Expectation is an obligation, not a lock: it does not stop a close, it is recorded on one — and\nclosing over it settles nothing. Write each one so it can\nbe judged — say what would satisfy it and how that could be checked — because an Expectation authored\nwithout a thought about verification is one you will later be unable to settle honestly. When you\ncreate several across several Tasks, say how many you created and who they fall to; a set of gates\nnobody was told about is work assigned by accident. A Deliverable requirement is one typed Expectation, not a second\n`requiredDeliverables` list. Actual Deliverables are recorded only after something exists.\n\nRead what is owed, then settle it — never rewrite the declaration to make it settleable:\n\n```bash\nskrr tasks expectations <task-id> # what is owed, and how far each one got\nskrr tasks expectations assess <task-id> <expectation-id> \\\n --decision met \\\n --reason \"Ran the suite named in the statement; 49/49 pass\" \\\n --evidence code:<commit>\nskrr tasks expectations assess <task-id> --all \\\n --decision met --reason \"...\" # every one still awaiting a judgement\n```\n\n**You may assess any Expectation that takes a judgement.** A `deliverable` Expectation is not one —\nit settles through its linked Resource and evidence, so record the Deliverable rather than\nassessing it. The assessment is recorded as YOURS — every surface shows `met (agent)` against\n`met (person)` — and a human can override it. The control is attribution, not permission, so what\nyou owe is not restraint but evidence: cite what you actually checked, and prefer `--evidence` and\n`--resource-link-id` over prose.\n\nAssess what you VERIFIED. Not what you intended, not what you inferred from having finished the\nwork. “I could not check this” is a real and useful answer — record it `unmet` with the reason\nrather than leaving it silent, because an unassessed Expectation and one you tried and failed to\nverify send the next reader to different places.\n\nA waiver is a judgement about scope — that this is no longer owed — and it stays a person's call:\nif the honest answer is \"this should be waived,\" say so in an Update or Comment and let a person\nrecord it. Do not delete the Expectation to hide that it was owed.\n\nChanging an Expectation's wording advances the Task specification and **revokes every assessment\nalready recorded** — fix the statement before people start settling it, not after.\n\n### Labels — say what PROGRAM this belongs to\n\nA label is cross-cutting classification: which recurring program a Space or Task\nbelongs to (`dogfood`, `incident`, `experiment`, `migration`), not what state it\nis in. Status, priority and assignee are first-class fields and already answer\ntheir own questions — a label that restates one is noise that will drift out of\nsync with the field it copies.\n\nThe vocabulary is DECLARED, not invented. Read it before you use it:\n\n```bash\nskrr labels list\n```\n\nAttach from that list, never a name you made up. A second spelling of an\nexisting label (`dog-food` beside `dogfood`) is worse than no label at all,\nbecause the whole value of one is that filtering on it returns everything:\n\n```bash\nskrr spaces labels add <space-id> --label <label-id>\nskrr tasks labels attach <task-id> --label <label-id>\n```\n\nCreate a label only when the program it names is real and recurring, and say\nwhich entities it applies to — a label created without `--applicable-to space`\ncannot be attached to a Space, which is how a vocabulary comes to exist that\nnothing can use:\n\n```bash\nskrr labels create --name <name> --applicable-to space --applicable-to task\n```\n\nWhen you create a Space or Task for a recurring program, label it as you create\nit (`--label <id>` on `spaces`, `tasks` and `goals create`). The create\nresponse carries a `_labelGuidance` hint naming the applicable vocabulary WITH\nITS IDS when you attached none — read it, and attach in one follow-up call if\none of them fits. It may also carry `suggested` — a proposal, not a decision;\nattach is your call. `skrr tasks labels suggest <task-id>` asks it of a Task.\n\nIf nothing in the vocabulary fits, attach nothing. \"No label\" is a correct\nanswer and a wrong label is not.\n\n### Comments and blockers\n\nUse a Comment only for a question, answer, or review discussion where a reply is useful. For a\nblocker, first record the typed blocker Update, then move the Task to blocked. Add a Comment only if\nsomeone actually needs to respond.\n\n### Creating and placing Tasks\n\nCreate a Task without asking when work needs tracking across meaningful steps, sessions, or\nfollow-up. Avoid duplicates and do not create Tasks for trivial actions that finish immediately.\n\n```bash\nskrr tasks list --q \"<relevant title>\"\nskrr tasks create --title \"<concise requested result>\" --description \"<scope and constraints>\" --json\nskrr tasks move <task-id> --status in_progress\n```\n\nA Space is a durable ownership, collaboration, and authorization boundary. Use an identified Space\nwhen the work clearly belongs there; otherwise create the Task unscoped. Ask before creating a new\nSpace. An Agent works a Task in a Space only as a Space member, or when it is shared with no one\nelse and its owner assigns and starts it; anything else is refused. Do not widen Agent membership\nmerely to force one task assignment.\n\n### Closing a Task out\n\nThe model above says what each record IS. This is the order they go in, and what each step can\nrefuse:\n\n1. **Record what exists** — `skrr tasks deliverable add`, binding it to the Expectation it answers\n with `--expectation <id>` whenever one applies. Evidence that arrives bound is evidence the next\n reader does not have to reconstruct.\n2. **Submit the answer** — `skrr tasks result submit`. This does not close the Task. Read what it\n reports back.\n3. **Read what is still owed** — `skrr tasks expectations <task-id>`.\n4. **Settle what you verified** — `skrr tasks expectations assess`, citing evidence. `--all` covers\n every Expectation still awaiting a judgement.\n5. **Read the Task state again and report THAT** — not what you intended it to be.\n\nTwo things still matter regardless of how complete the work is: an unmet Expectation, and a\n`changes_requested` Review. Neither blocks a close — but both are stamped onto it\n(`resolution.closure`), so closing over them is a recorded choice, not a clean finish. Neither is\na failure state; both are somebody's turn.\n\nStep 5 is the one that goes wrong quietly, and not only here: before reporting a check as passed,\nconfirm you measured what you think you measured. A pipeline's exit status is the LAST command's, so\n`cmd | tail` reports on `tail`. A filter may match something other than what you meant — a path\npattern can match the directory you are working in. When a result will be reported to a person as\nfact, re-run it in the simplest form that can only mean one thing.\n\nAcross a whole Space, `skrr tasks review-queue --space <space-id>` names every outstanding\njudgement at once, with its evidence and the command that settles it.\n\n### Share readable links and close the loop\n\nShare clickable Task, Space, Goal, and Duty URLs, never bare IDs. Use the URL returned by the\nCLI; do not construct one. If needed:\n\n```bash\nskrr tasks show <task-id> --json\nskrr spaces show <space-id> --json\nskrr goals show <goal-id> --json\nskrr duties show <duty-id> --json\n```\n\nBefore your final response, verify every Task you created or touched reflects reality. If work is\nready for independent review, leave it in review. If blocked, record the blocker and required action.\nIf genuinely complete and accepted under the Task's policy, close it. Include the Task URL in the\nfinal handoff. Never claim a write succeeded unless the CLI returned success.\n\n### Coming back later\n\nYou can arrange to return to something. Four shapes, and picking the right one\nmatters more than the wording:\n\n**Reminder** — the user asked to be reminded. Keep their words; a reminder you\nhave rephrased into your own voice is no longer the thing they asked for.\n\n**Watch** — something has an asynchronous tail: CI, a review, an approval, a\nlong job, a metric. If the condition is machine-checkable (an endpoint plus a\npredicate), say so — that costs nothing and is guaranteed to terminate. Only\nwrite a prose check recipe when the check genuinely needs your judgement or your\ntools, because that one burns a full turn every time it runs. Always give it an\nabort condition: a watch that cannot stop is a leak.\n\n**Check-in** — you decided the conversation is worth returning to. This is\npermission AND restraint. Come back when you will have something worth saying —\na result that will have arrived, a decision that will be ripe, a thread you left\ngenuinely open. When you see one, arrange the return yourself and say in one\nline when you will look again. Do not ask whether you should: that hands the\nperson a decision they did not come to make. Do not come back to ask how it is\ngoing. A legacy check-in holds one pending return per conversation. For a sequence\nof checks, use one scheduled lookback plan with 1–10 lifetime steps. When you\nwake, read the original goal, current state and earlier outcomes. Saying\nnothing is a legitimate outcome and often the right one. Stop or cancel\nremaining checks when the work resolves, becomes obsolete or the person cancels.\n\n**Act** — a specific action you already know how to take and the user has already\nagreed to. Not for anything you would still need to ask about.\n\nSettle what you arranged. When you wake and the thing resolved, say so and close\nit out; when it did not, either come back once more with a reason or hand it to\nthe person. Leaving one armed forever is the failure mode here.\n\nFrom a local session, arrange these with `skrr followups` —\n`remind`, `watch`, `checkin`, `act` — and settle them with\n`skrr followups resolve <id> --outcome resolved`.\nFor a bounded lookback plan, use `skrr followups plans create --from-json plan.json`\nand inspect, revise or cancel it with `skrr followups plans` (read `--help`).\nUse 1–10 concrete checks, relative offsets from the completed reply or explicit\nabsolute/local times, and a stop condition. Omit a plan when none is useful.\nA saved plan is not necessarily armed; read the returned receipt before promising a return.\n",
|
|
7
7
|
"hash": "6804d01c68782b97a16920c43f6b9104a8b0c0a512514b25a7622b371055f669"
|
|
8
8
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AgentAccessResponse } from '@skrr-ai/data-provider';
|
|
2
|
+
import { BaseCommand } from '../base-command';
|
|
3
|
+
/**
|
|
4
|
+
* What every `skrr agents access *` command shares: which agent (the `--agent`
|
|
5
|
+
* flag, else the session agent), JSON output, and reading the access page.
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class AgentAccessCommand extends BaseCommand {
|
|
8
|
+
static baseFlags: {
|
|
9
|
+
agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
bare: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
raw: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
};
|
|
17
|
+
protected accessAgentId(agentFlag: string | undefined): Promise<string>;
|
|
18
|
+
protected readAccess(agentId: string): Promise<AgentAccessResponse>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentAccessCommand = void 0;
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
6
|
+
const base_command_1 = require("../base-command");
|
|
7
|
+
const agent_resolver_1 = require("./agent-resolver");
|
|
8
|
+
/**
|
|
9
|
+
* What every `skrr agents access *` command shares: which agent (the `--agent`
|
|
10
|
+
* flag, else the session agent), JSON output, and reading the access page.
|
|
11
|
+
*/
|
|
12
|
+
class AgentAccessCommand extends base_command_1.BaseCommand {
|
|
13
|
+
static baseFlags = {
|
|
14
|
+
...base_command_1.BaseCommand.baseFlags,
|
|
15
|
+
agent: core_1.Flags.string({
|
|
16
|
+
description: 'Agent ID. Omit to use the session agent (OVERSKY_SESSION_AGENT_ID).',
|
|
17
|
+
}),
|
|
18
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
19
|
+
};
|
|
20
|
+
async accessAgentId(agentFlag) {
|
|
21
|
+
try {
|
|
22
|
+
return await (0, agent_resolver_1.resolveAgentId)(agentFlag);
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
const failure = (0, agent_resolver_1.agentResolutionFailure)(err);
|
|
26
|
+
return this.failWithCliError({
|
|
27
|
+
message: failure.message,
|
|
28
|
+
code: failure.code,
|
|
29
|
+
exit: 2,
|
|
30
|
+
retryable: false,
|
|
31
|
+
details: { suggestion: failure.suggestion, context: failure.details },
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async readAccess(agentId) {
|
|
36
|
+
try {
|
|
37
|
+
return await data_provider_1.dataService.getAgentAccess(agentId);
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
return this.handleApiError(err);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.AgentAccessCommand = AgentAccessCommand;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `skrr agents access`: who may ask an agent for work in its channels, and what
|
|
3
|
+
* with (OSK-33148). The vocabulary, the honest confirm and the views are
|
|
4
|
+
* `@skrr-ai/data-provider`'s (`channelDelegation.ts`); this module only words
|
|
5
|
+
* them for a terminal and reaches the API through `dataService`.
|
|
6
|
+
*/
|
|
7
|
+
import { TRUSTED_ASKER_REACH } from '@skrr-ai/data-provider';
|
|
8
|
+
import type { AccessRequestView, ReachLine, TrustedAskerReach, TrustedAskerView } from '@skrr-ai/data-provider';
|
|
9
|
+
export { TRUSTED_ASKER_REACH };
|
|
10
|
+
/** `--reach connected_apps,agent_tools` (or repeated flags), validated against the contract. */
|
|
11
|
+
export declare function parseReachFlag(values: string[] | undefined): {
|
|
12
|
+
reach: TrustedAskerReach[];
|
|
13
|
+
unknown: string[];
|
|
14
|
+
};
|
|
15
|
+
export declare function reachSummary(reach: readonly TrustedAskerReach[]): string;
|
|
16
|
+
export declare function requestLine(request: AccessRequestView): string;
|
|
17
|
+
export declare function trustedAskerLine(asker: TrustedAskerView): string;
|
|
18
|
+
export declare function confirmLines(lines: readonly ReachLine[]): string[];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TRUSTED_ASKER_REACH = void 0;
|
|
4
|
+
exports.parseReachFlag = parseReachFlag;
|
|
5
|
+
exports.reachSummary = reachSummary;
|
|
6
|
+
exports.requestLine = requestLine;
|
|
7
|
+
exports.trustedAskerLine = trustedAskerLine;
|
|
8
|
+
exports.confirmLines = confirmLines;
|
|
9
|
+
/**
|
|
10
|
+
* `skrr agents access`: who may ask an agent for work in its channels, and what
|
|
11
|
+
* with (OSK-33148). The vocabulary, the honest confirm and the views are
|
|
12
|
+
* `@skrr-ai/data-provider`'s (`channelDelegation.ts`); this module only words
|
|
13
|
+
* them for a terminal and reaches the API through `dataService`.
|
|
14
|
+
*/
|
|
15
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
16
|
+
Object.defineProperty(exports, "TRUSTED_ASKER_REACH", { enumerable: true, get: function () { return data_provider_1.TRUSTED_ASKER_REACH; } });
|
|
17
|
+
/** `--reach connected_apps,agent_tools` (or repeated flags), validated against the contract. */
|
|
18
|
+
function parseReachFlag(values) {
|
|
19
|
+
const raw = (values || [])
|
|
20
|
+
.flatMap((value) => value.split(','))
|
|
21
|
+
.map((value) => value.trim())
|
|
22
|
+
.filter(Boolean);
|
|
23
|
+
if (raw.length === 1 && raw[0] === 'none')
|
|
24
|
+
return { reach: [], unknown: [] };
|
|
25
|
+
const reach = (0, data_provider_1.normalizeTrustedAskerReach)(raw);
|
|
26
|
+
const unknown = raw.filter((value) => !data_provider_1.TRUSTED_ASKER_REACH.includes(value));
|
|
27
|
+
return { reach, unknown };
|
|
28
|
+
}
|
|
29
|
+
function reachSummary(reach) {
|
|
30
|
+
return reach.length
|
|
31
|
+
? reach.map((value) => data_provider_1.TRUSTED_ASKER_REACH_LABELS[value].title).join(', ')
|
|
32
|
+
: 'Conversation only';
|
|
33
|
+
}
|
|
34
|
+
function channelLabel(channel) {
|
|
35
|
+
return channel ? `${channel.charAt(0).toUpperCase()}${channel.slice(1)}` : 'a channel';
|
|
36
|
+
}
|
|
37
|
+
function requestLine(request) {
|
|
38
|
+
const who = request.requesterName || request.platformUserId;
|
|
39
|
+
const times = request.requestCount > 1 ? `, asked ${request.requestCount} times` : '';
|
|
40
|
+
return `${request.id} ${who} (${channelLabel(request.channel)} ${request.platformUserId}) ${data_provider_1.ACCESS_REQUEST_STATE_LABELS[request.state]}${times}\n ${data_provider_1.ACCESS_REQUEST_ORIGIN_LABELS[request.origin] ?? request.origin}`;
|
|
41
|
+
}
|
|
42
|
+
function trustedAskerLine(asker) {
|
|
43
|
+
const who = asker.displayName || asker.platformUserId;
|
|
44
|
+
return `${asker.id} ${who} (${channelLabel(asker.channel)} ${asker.platformUserId})\n Reach: ${reachSummary(asker.reach)}`;
|
|
45
|
+
}
|
|
46
|
+
function confirmLines(lines) {
|
|
47
|
+
return lines.flatMap((line) => [` - ${line.title}`, ` ${line.detail}`]);
|
|
48
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writing a confirmed import plan to one Skrr agent.
|
|
3
|
+
*
|
|
4
|
+
* Only `comes` and `changed` items are written, each through the surface that owns its kind (see
|
|
5
|
+
* `plan.ts`). An item that fails does not stop the others, and running the same import again
|
|
6
|
+
* finishes the job without writing anything twice: a repeated proposal key replays, a repeated Duty
|
|
7
|
+
* key is refused as a conflict (read here as "already"), and persona files and skills are compared
|
|
8
|
+
* again when the plan is rebuilt.
|
|
9
|
+
*/
|
|
10
|
+
import { createImportedSkill } from '../skill-import';
|
|
11
|
+
import { type ImportPlan, type ImportPlanArea, type MemoryObserveInput } from './plan';
|
|
12
|
+
import type { ImportPersonaFileType } from './sources';
|
|
13
|
+
export type ImportWriters = {
|
|
14
|
+
updatePersonaFile: (params: {
|
|
15
|
+
agentId: string;
|
|
16
|
+
fileType: ImportPersonaFileType;
|
|
17
|
+
content: string;
|
|
18
|
+
reason: string;
|
|
19
|
+
}) => Promise<unknown>;
|
|
20
|
+
observeMemory: (agentId: string, input: MemoryObserveInput) => Promise<{
|
|
21
|
+
proposal?: {
|
|
22
|
+
id?: string;
|
|
23
|
+
status?: string;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
createSkill: typeof createImportedSkill;
|
|
27
|
+
importDuty: (body: {
|
|
28
|
+
manifest: Record<string, unknown>;
|
|
29
|
+
agentId: string;
|
|
30
|
+
}) => Promise<{
|
|
31
|
+
duty?: {
|
|
32
|
+
id?: string;
|
|
33
|
+
status?: string;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
37
|
+
export type ImportApplyOutcome = 'written' | 'already' | 'failed';
|
|
38
|
+
export type ImportApplyResult = {
|
|
39
|
+
area: ImportPlanArea;
|
|
40
|
+
what: string;
|
|
41
|
+
from?: string;
|
|
42
|
+
outcome: ImportApplyOutcome;
|
|
43
|
+
/** The id of what was written: a proposal, a skill, a Duty. */
|
|
44
|
+
id?: string;
|
|
45
|
+
message?: string;
|
|
46
|
+
};
|
|
47
|
+
/** Write every item of `plan` that brings something over. */
|
|
48
|
+
export declare function applyImportPlan(plan: ImportPlan, agentId: string, writers: ImportWriters): Promise<ImportApplyResult[]>;
|
|
49
|
+
/** The results in words: one line per item, failures last. */
|
|
50
|
+
export declare function renderApplyResults(results: readonly ImportApplyResult[]): string[];
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyImportPlan = applyImportPlan;
|
|
4
|
+
exports.renderApplyResults = renderApplyResults;
|
|
5
|
+
const plan_1 = require("./plan");
|
|
6
|
+
function errorStatus(err) {
|
|
7
|
+
const status = err?.response?.status ??
|
|
8
|
+
err?.status;
|
|
9
|
+
return typeof status === 'number' ? status : undefined;
|
|
10
|
+
}
|
|
11
|
+
function errorMessage(err) {
|
|
12
|
+
const data = err?.response?.data;
|
|
13
|
+
const text = [data?.message, data?.error, err?.message].find((value) => typeof value === 'string' && value.trim().length > 0);
|
|
14
|
+
return text ?? 'the server refused it';
|
|
15
|
+
}
|
|
16
|
+
/** Write every item of `plan` that brings something over. */
|
|
17
|
+
async function applyImportPlan(plan, agentId, writers) {
|
|
18
|
+
const results = [];
|
|
19
|
+
// Persona first (who the agent is), then skills, then notes, then the drafts that may name them.
|
|
20
|
+
const order = { persona: 0, skill: 1, memory: 2, duty: 3 };
|
|
21
|
+
const writes = (0, plan_1.planWrites)(plan).sort((a, b) => (order[a.action.kind] ?? 9) - (order[b.action.kind] ?? 9));
|
|
22
|
+
for (const item of writes) {
|
|
23
|
+
const action = item.action;
|
|
24
|
+
const base = { area: item.area, what: item.what, from: item.from };
|
|
25
|
+
try {
|
|
26
|
+
if (action.kind === 'persona') {
|
|
27
|
+
await writers.updatePersonaFile({
|
|
28
|
+
agentId,
|
|
29
|
+
fileType: action.fileType,
|
|
30
|
+
content: action.content,
|
|
31
|
+
reason: action.reason,
|
|
32
|
+
});
|
|
33
|
+
results.push({ ...base, outcome: 'written' });
|
|
34
|
+
}
|
|
35
|
+
else if (action.kind === 'memory') {
|
|
36
|
+
const out = await writers.observeMemory(agentId, action.input);
|
|
37
|
+
// A replayed key returns the proposal it made; one already decided is not new.
|
|
38
|
+
const decided = out?.proposal?.status && out.proposal.status !== 'proposed';
|
|
39
|
+
results.push({ ...base, outcome: decided ? 'already' : 'written', id: out?.proposal?.id });
|
|
40
|
+
}
|
|
41
|
+
else if (action.kind === 'skill') {
|
|
42
|
+
const { skillId } = await writers.createSkill(action.skill, agentId);
|
|
43
|
+
results.push({ ...base, outcome: 'written', id: skillId });
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const out = await writers.importDuty({ manifest: action.manifest, agentId });
|
|
47
|
+
results.push({ ...base, outcome: 'written', id: out?.duty?.id });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
if (errorStatus(err) === 409 && (action.kind === 'duty' || action.kind === 'skill')) {
|
|
52
|
+
results.push({ ...base, outcome: 'already', message: 'it was already here' });
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
results.push({ ...base, outcome: 'failed', message: errorMessage(err) });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return results;
|
|
59
|
+
}
|
|
60
|
+
/** The results in words: one line per item, failures last. */
|
|
61
|
+
function renderApplyResults(results) {
|
|
62
|
+
const written = results.filter((result) => result.outcome === 'written');
|
|
63
|
+
const already = results.filter((result) => result.outcome === 'already');
|
|
64
|
+
const failed = results.filter((result) => result.outcome === 'failed');
|
|
65
|
+
const lines = [];
|
|
66
|
+
const count = (area) => written.filter((result) => result.area === area).length;
|
|
67
|
+
const parts = [
|
|
68
|
+
count('persona') && `${count('persona')} persona file${count('persona') === 1 ? '' : 's'}`,
|
|
69
|
+
count('skill') && `${count('skill')} skill${count('skill') === 1 ? '' : 's'}`,
|
|
70
|
+
count('memory') && `${count('memory')} Memory proposal${count('memory') === 1 ? '' : 's'}`,
|
|
71
|
+
count('duty') && `${count('duty')} draft Dut${count('duty') === 1 ? 'y' : 'ies'}`,
|
|
72
|
+
].filter(Boolean);
|
|
73
|
+
lines.push(parts.length ? `Imported ${parts.join(', ')}.` : 'Nothing new was written.');
|
|
74
|
+
for (const result of written) {
|
|
75
|
+
if (result.area === 'memory')
|
|
76
|
+
continue;
|
|
77
|
+
lines.push(` + ${result.what}${result.id ? ` ${result.id}` : ''}`);
|
|
78
|
+
}
|
|
79
|
+
if (already.length)
|
|
80
|
+
lines.push(`${already.length} already here.`);
|
|
81
|
+
for (const result of failed) {
|
|
82
|
+
lines.push(` x ${result.what}${result.from ? ` (${result.from})` : ''}: ${result.message}`);
|
|
83
|
+
}
|
|
84
|
+
return lines;
|
|
85
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { type BootstrapHistoryEntry, type BootstrapResponse, type SecretLineKind } from '@skrr-ai/data-provider';
|
|
2
|
+
import { type ImportedSkill } from '../skill-import';
|
|
3
|
+
import { type AgentImportApp, type ImportPersonaFileType, type ImportSource } from './sources';
|
|
4
|
+
/** The persona endpoint's limit (`BootstrapController`). */
|
|
5
|
+
export declare const PERSONA_FILE_MAX_CHARS = 20000;
|
|
6
|
+
/** The Memory proposal limit (`WorkspaceService.validateMemoryInput`). */
|
|
7
|
+
export declare const MEMORY_CLAIM_MAX_CHARS = 50000;
|
|
8
|
+
/**
|
|
9
|
+
* What `POST /api/duties/import` accepts (`api/server/services/Duties/dutyTextLimits.js`). The server
|
|
10
|
+
* refuses longer text rather than cutting it, and so does the plan: an instruction cut short is a
|
|
11
|
+
* different instruction.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DUTY_DIRECTIVE_MAX_CHARS = 8000;
|
|
14
|
+
/** Every persona edit the importer makes starts with this, so a re-import can find its own. */
|
|
15
|
+
export declare const IMPORT_REASON_PREFIX = "Imported from ";
|
|
16
|
+
export declare const IMPORT_PLAN_GROUPS: readonly ["comes", "changed", "already", "kept", "stays"];
|
|
17
|
+
export type ImportPlanGroup = (typeof IMPORT_PLAN_GROUPS)[number];
|
|
18
|
+
export declare const IMPORT_PLAN_GROUP_TITLES: Readonly<Record<ImportPlanGroup, string>>;
|
|
19
|
+
/** What a left-out line looked like, in words. Never the line. */
|
|
20
|
+
export declare const SECRET_KIND_WORDS: Readonly<Record<SecretLineKind, string>>;
|
|
21
|
+
export type MemoryObserveInput = {
|
|
22
|
+
path: string;
|
|
23
|
+
claim: string;
|
|
24
|
+
title: string;
|
|
25
|
+
memoryKind: string;
|
|
26
|
+
confidence: number;
|
|
27
|
+
evidence: Array<Record<string, unknown>>;
|
|
28
|
+
idempotencyKey: string;
|
|
29
|
+
};
|
|
30
|
+
export type ImportPlanAction = {
|
|
31
|
+
kind: 'persona';
|
|
32
|
+
fileType: ImportPersonaFileType;
|
|
33
|
+
content: string;
|
|
34
|
+
reason: string;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'memory';
|
|
37
|
+
input: MemoryObserveInput;
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'skill';
|
|
40
|
+
skill: ImportedSkill;
|
|
41
|
+
} | {
|
|
42
|
+
kind: 'duty';
|
|
43
|
+
externalKey: string;
|
|
44
|
+
manifest: Record<string, unknown>;
|
|
45
|
+
};
|
|
46
|
+
export type ImportPlanArea = 'persona' | 'memory' | 'skill' | 'duty' | 'source' | 'file' | 'secret';
|
|
47
|
+
export type ImportPlanItem = {
|
|
48
|
+
group: ImportPlanGroup;
|
|
49
|
+
area: ImportPlanArea;
|
|
50
|
+
what: string;
|
|
51
|
+
from?: string;
|
|
52
|
+
line?: number;
|
|
53
|
+
to?: string;
|
|
54
|
+
why?: string;
|
|
55
|
+
/** Present on `comes` and `changed` items: the one write that brings the item over. */
|
|
56
|
+
action?: ImportPlanAction;
|
|
57
|
+
};
|
|
58
|
+
export type ImportPlan = {
|
|
59
|
+
app: AgentImportApp;
|
|
60
|
+
appLabel: string;
|
|
61
|
+
folder: string;
|
|
62
|
+
sourceAgent: string;
|
|
63
|
+
name: string;
|
|
64
|
+
/** The Skrr agent compared against; null for a plan made without one (nothing to compare). */
|
|
65
|
+
agentId: string | null;
|
|
66
|
+
items: ImportPlanItem[];
|
|
67
|
+
};
|
|
68
|
+
/** What one Skrr agent already holds, as far as an import needs to know. */
|
|
69
|
+
export type ImportTargetState = {
|
|
70
|
+
agentId: string;
|
|
71
|
+
bootstrap: Partial<BootstrapResponse>;
|
|
72
|
+
/** Each persona file's history, newest first. */
|
|
73
|
+
personaHistory: Partial<Record<ImportPersonaFileType, BootstrapHistoryEntry[]>>;
|
|
74
|
+
skills: Array<{
|
|
75
|
+
name: string;
|
|
76
|
+
content?: string;
|
|
77
|
+
}>;
|
|
78
|
+
/** Memory proposals this importer made before, by key, with their status. */
|
|
79
|
+
importedProposals: Map<string, string>;
|
|
80
|
+
/** Duties made by an earlier import, by externalKey. */
|
|
81
|
+
importedDuties: Map<string, {
|
|
82
|
+
id: string;
|
|
83
|
+
status: string;
|
|
84
|
+
}>;
|
|
85
|
+
};
|
|
86
|
+
/** The services the target is read through; the command passes the real ones, tests fakes. */
|
|
87
|
+
export type ImportTargetReaders = {
|
|
88
|
+
getBootstrap: (agentId: string) => Promise<Partial<BootstrapResponse>>;
|
|
89
|
+
getBootstrapHistory: (agentId: string, options: {
|
|
90
|
+
fileType: ImportPersonaFileType;
|
|
91
|
+
limit: number;
|
|
92
|
+
}) => Promise<{
|
|
93
|
+
history?: BootstrapHistoryEntry[];
|
|
94
|
+
}>;
|
|
95
|
+
getSkillsByAgent: (agentId: string) => Promise<{
|
|
96
|
+
data?: Array<{
|
|
97
|
+
name: string;
|
|
98
|
+
content?: string;
|
|
99
|
+
}>;
|
|
100
|
+
}>;
|
|
101
|
+
listProposals: (agentId: string, status: string) => Promise<{
|
|
102
|
+
proposals?: Array<{
|
|
103
|
+
status?: string;
|
|
104
|
+
evidence?: unknown;
|
|
105
|
+
}>;
|
|
106
|
+
}>;
|
|
107
|
+
listDuties: (query: Record<string, unknown>) => Promise<{
|
|
108
|
+
data?: Array<{
|
|
109
|
+
id: string;
|
|
110
|
+
status: string;
|
|
111
|
+
externalKey?: string;
|
|
112
|
+
}>;
|
|
113
|
+
has_more?: boolean;
|
|
114
|
+
next_cursor?: string | null;
|
|
115
|
+
}>;
|
|
116
|
+
};
|
|
117
|
+
/** Read what `agentId` already holds. Any failure is the caller's: a plan on a partial read could overwrite. */
|
|
118
|
+
export declare function loadImportTarget(agentId: string, readers: ImportTargetReaders, personaFiles: ImportPersonaFileType[]): Promise<ImportTargetState>;
|
|
119
|
+
/** The proposal key: one note, from one file of one bot, in these words. */
|
|
120
|
+
export declare function memoryImportKey(source: ImportSource, from: string, claim: string): string;
|
|
121
|
+
/** The Duty key: one job of one bot. Stable across re-imports even when the job's words change. */
|
|
122
|
+
export declare function dutyImportKey(source: ImportSource, sourceId: string): string;
|
|
123
|
+
/** Decide every item. `target` null makes a plan with nothing to compare against. */
|
|
124
|
+
export declare function buildImportPlan(source: ImportSource, target: ImportTargetState | null, options?: {
|
|
125
|
+
replacePersona?: boolean;
|
|
126
|
+
}): ImportPlan;
|
|
127
|
+
/** Whether the plan has anything to write. */
|
|
128
|
+
export declare function planWrites(plan: ImportPlan): ImportPlanItem[];
|
|
129
|
+
/** The plan as JSON output: every item, without the content it would write. */
|
|
130
|
+
export declare function planForOutput(plan: ImportPlan): Record<string, unknown>;
|
|
131
|
+
/** The plan in words, grouped, memory notes from one file folded into one line. */
|
|
132
|
+
export declare function renderImportPlan(plan: ImportPlan): string[];
|