Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ S15/S16 target terms below refine product intent. Definitions explicitly marked

**Tool source (S16):** An owner-added HTTPS MCP server, OpenAPI service or GraphQL endpoint with owner-written operations (ADR 0089). Its discovered tools are data until the owner's one-time **tool review** decides, per tool, *reads only*, *changes data* (the Bot runs it), *needs my approval each time* or *off*; a server's hints are only pre-selected suggestions and a GraphQL mutation can never be a read. A changed catalog keeps the source connected but every tool waits for a new review. A source is a team resource every Bot may use unless the Bot's settings exclude it.

**Connection-membership revision (S16):** The standing-policy revision Jit installs after a tool review, a GitHub selection or a removal, only when the installed rules differ from the default proposal in nothing but connection membership. Work that does not use the changed connection stays current (ADR 0089); any other difference waits for the owner on the rules page.
**Pinned skill/plugin (S16, SKILL16-01):** In explicit skills composition (ADR 0095), an owner's inert GitHub/folder snapshot supplies reviewed know-how, resources and supported VM scripts. The exact content pin, team/Bot availability, computer-use choice, existing dependency reviews and current recipient set are reviewed together. Imported text is never authority. Actual CHAT use retains pins; updates/revocation fence further activation and loaded contexts. Deliberately released VM copies retain original private custody and recipient limits; revoking a package does not erase guest disks. DATA15 descendants preserve actual observations through TEAM/MEM, correction, delegation, continuations and artifact-derived inputs. See `s16-client-skills/v1` and [the contract](docs/contracts/s16-skills-v1.md).

**Connection-membership revision (S16):** The standing-policy revision Jit installs after a tool/package review, a GitHub selection or a removal, only when the installed rules differ from the default proposal in nothing but connection membership. Work that does not use the changed connection stays current (ADR 0089); any other difference waits for the owner on the rules page.

**Persona:** Owner-authored configuration of address, language and tone. It is trusted configuration, not model-authored memory.

Expand Down
231 changes: 231 additions & 0 deletions docs/adr/0095-s16-pinned-skills-in-working-computers.md

Large diffs are not rendered by default.

118 changes: 118 additions & 0 deletions docs/contracts/s16-skills-v1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Pinned skill/plugin contract (SKILL16-01)

Engineering contract: [ADR 0095](../adr/0095-s16-pinned-skills-in-working-computers.md). Requirement references remain
S16-AC13; FR-17, FR-20, FR-21, FR-31, FR-35, FR-38, FR-39 and NFR-01/02/07/09/14. This contract records the implementation;
release conformance and exact tested revisions belong in the PR/evidence, not an inferred live-host acceptance.

## Composition and custody

`S15RuntimeConfig.skills: true` explicitly composes `skills.sqlite`, DATA15/MEM ancestry and the shared client capability.
DATA15 is required. The new S15 installer configuration includes it; existing omitted settings, S14 default, legacy
selection, installed policies and owner-host adoption retain their own transition contracts. Missing listed journals
refuse before recreation. Additive adoption preserves an existing unlisted journal and only removes newly created
stores if boot fails. The directory and immutable snapshots stay in protected state; guest copies contain package
bytes only. No service/vault/provider credentials, installation hook, shell or protected state are copied to the guest.

Supported formats are regular `SKILL.md` or `skills/<name>/SKILL.md` instruction bodies, resources, `plugin.json` or
`.claude-plugin/plugin.json` display metadata, and inert `mcp.json`/`.mcp.json` HTTPS streamable-HTTP requirements. Required
connections must already have a current owner tool review at the same endpoint; mapping never installs a connection,
changes a tool's classification or loads unrelated playbooks. Other config/stdio/transports/hooks/install scripts are
inventoried as unsupported or ignored. Human-only units are shown as such and withheld from automatic load/staging;
there is no claim of a manual invocation workflow. The owner can inspect all bounded file bytes as escaped data.

Public GitHub imports resolve once to an immutable 40-hex commit, then verify commit/tree/blob identities, sizes and
regular paths. Imports send no account token, execute no git/archive/package-manager command and follow no redirect.
Uploaded folder labels assert no authenticated remote origin. The SHA-256 pin binds canonical origin and sorted exact
path/hash/size entries. Applicable license/notice bytes remain part of the snapshot, including a repository license
outside a selected subfolder. No upstream runtime/authority, source code or dependency is installed by this importer.

Limits: 64 retained package records, 128 files, 64 KiB/file, 2 MiB/package, 16 instruction units/dependencies, 32,000 bytes
per instruction body, 144 import requests/60 seconds. Package/command journal encoding has its own bounded 8 MiB
envelope for base64 and inspected metadata; POLICY retains its independent 128 KiB limit. Capacity refusal never evicts
revocation or command identities.

## Exact owner review and recovery

`s16-skill-command/v1` commands are `skill.import`, `skill.update`, `skill.review`, `skill.availability` and `skill.revoke`.
Every command carries its original `requestId`. Changes carry `skillId` and `expectedRevision`; review additionally binds
the exact pin, team or selected-Bot availability, working-computer choice, dependency source/catalog/review revisions
and `recipientsHash` of the displayed currently configured recipient set. These are owner commands under the existing
session, Origin and CSRF checks. Imported text, model output and ordinary messages cannot create a review.

A discovered candidate keeps the active pin unchanged until review. An unchanged active pin can be re-reviewed after
connection/provider changes without re-importing bytes. Review/availability/revoke advances the current resource and
source revision, fencing prior package-use contexts. Revocation commits without waiting behind import network work;
every awaiting update rechecks the original record revision and cannot restore revoked state. Membership reconciliation
only changes connection/package resource
membership when the installed rules otherwise match the current default proposal; custom policy differences require
the existing rules review. Replaying an old receipt cannot reinstall an old review over a later update or revocation.

Import commands save their original inert input before network work and their resolved commit before tree/blob reads.
An interrupted import resumes that saved input/commit; a changed branch or reselected local folder cannot alter it.
The compact `s16-skill-receipt/v1` is committed before policy membership reconciliation. No script is part of this queue.

Protected API paths, all under `/api/s16/client`:

| Path | Operation | Result |
| --- | --- | --- |
| `/skills` | GET | `s16-client-skills/v1` current owner records, Bots, dependency metadata and limits |
| `/skills/<id>` | GET | `s16-client-skill/v1` exact active/candidate metadata, inventories and copy count |
| `/skills/<id>/files?pin=…&path=…` | GET | One bounded file of that record's actual active/candidate pin |
| `/skills/<id>/review-preview` | POST `{pin, dependencies}` | Read-only recipient refs and exact review hash |
| `/skills/commands` | POST command | Compact durable receipt; no automatic client retry |
| `/skills/commands/<requestId>` | GET | Pure `s16-skill-command-status/v1`; starts no import, membership or work |
| `/skills/commands/<requestId>/resume` | POST `{}` | Explicit original inert import or committed membership reconciliation |

The client preserves only an opaque command ID in the Connections recovery fragment. Folder bytes, previews, CSRF and
credentials remain ephemeral. Losing the response or reloading never automatically sends another command. Every
post-wait response rechecks the owner; session loss withholds package data and ignores stale asynchronous responses.

## Scoped runtime and later data

The public tools `skills_list`, `skill_load`, `skill_resources` and `skill_resource` use actual work admission, TEAM,
POLICY read claims, bounded chunks and current exact reviews. Before bytes are released, CHAT transactionally retains
`s16-skill/v1` use provenance (`SkillUse`) and stamps its owning contract; DATA15 records the original source. Merely
composing a connection or offering the generic tools does not load a playbook. Every later send, tool, result commit,
result read and computer continuation rechecks loaded pins/dependencies. Source text remains know-how with no authority.

`skill_stage` and `skill_run` require reviewed computer use and ordinary reversible-write/effect work. The original
placed CHAT session is shared with the normal/file workflow; no second computer or host-local fallback is opened.
Exact files transfer as individually bounded regular VM writes, then assemble below that work's guest `inputs` path
in guarded command batches of at most 60,000 UTF-8 bytes. An unknown/failed batch is never retried automatically.
Only an inventoried bash/python3/node/bun script can be selected; arguments are literal bounded strings. Execution uses
the actual session's public backend, policy claims, deadline, cancellation and evidence. Missing runtimes produce actual
guest failure; Jit does not install a runtime or retry an uncertain operation. Results identify pin/script/session and
observed VM evidence, with guest-reported exit/output rather than an attestation of hostile guest root.

Working-computer use includes text guiding ordinary computer commands. DATA15 validates the admitted package source
before projecting an immutable private `s16-skill-vm-copy/v1` with actual computer custody, owner generation, original
pin/source, frozen recipients and equal-or-narrower Bot scope. Bot-only know-how requires that Bot's private computer;
shared guest root is insufficient. Ordinary later work can read released VM data under the computer resource while
retaining those private-data restrictions; it is not silently granted the original package resource. Updating or
revoking a package fences its activation/current contexts, and does not erase already released guest-root copies.
Later broader reviews cannot promote an older private copy. Other private inputs retain their independent gates.

Actual tool observations retain DATA15 descendant refs in TEAM/MEM. Equivalent source footprints within a work share
an immutable descendant while CHAT keeps each evidence identity. Inference history requires the owning FILE or DATA15
privacy port. Recent history is selected within the descendant bound before its bytes are included; excess older
fragments are omitted without aborting the new message. Selected fragments keep every ancestor, even if extraction
retained no claim. Selection is
metadata-only; actual selected bytes inherit complete source restrictions. Correction, forget, delegation, continuations
and artifact-derived inputs preserve ancestry; original S14-private scope remains S14-private. Frozen sharing covers
only this package/copy and the explicitly listed recipients, never future providers or unrelated private inputs.

Rollback format fences: CHAT 5 for loaded skill pins; TEAM 3 for DATA15 ancestry/4 with file ancestry; MEM 5/6 respectively.
TEAM can refresh only allowedBots on a newer team resource through the owning exact active-package review; all other restrictions, physical identity and S14-private scope remain unchanged.
Readers without the owning ports refuse before writable open. Later file/timing writes preserve the stronger header.

## Client and conformance

Connections has a capability-gated Skills/plugins tab for GitHub/folder inspection, exact pin/license/parts preview,
dependency mapping, team/Bot and computer-use review, update, revoke and identity-only recovery. All private reads stay
behind the existing owner session. English/Thai, keyboard focus, mobile width, unknown outcomes and authentication loss
are covered by the actual bundled client scenario suite. Chat exposes actual guarded use pins and observed tool evidence.

Deterministic tests: `s16-skills-{package,github,service,continuity,disclosure,composition,continuation}.test.ts` and the opt-in native
`s16-skills.browser.test.ts`. Broader FILE/TEAM/MEM/CHAT/connections and installer/package checks remain part of release
validation. Real subscription/account/device, hostile-root network enforcement, power-loss and owner-host cutover evidence
are independently owned by #408/#431/#432; these deterministic fixtures do not certify them or invoke a billable service.
1 change: 1 addition & 0 deletions ops/package/installer/s15.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export function s15InstallerConfig(input: { installationId: string; vmm: QemuVmm
bots: true,
// CONN16-01/MCP16-01/OPEN16-01: GitHub and HTTPS MCP/OpenAPI/GraphQL sources connected from the client.
connections: true,
skills: true,
catalog: [{ kind: "bot", ref: ref("jit"), active: true }, { kind: "resource", ref: ref("computer"), active: true }, { kind: "route", ref: selection.route, active: true }, { kind: "model", ref: selection.model, active: true }], resourceBots: [],
conversation: { ownerId: "owner", bot: ref("jit"), selection, route: { provider: "codex", model: "gpt-6.1-sol" }, limits: { modelCalls: 6, toolCalls: 16, outputBytes: 32768, activeMs: 300000 }, modelCallUpperBound: bound },
models: [{ selection, provider: "codex", modelId: "gpt-6.1-sol", account: ref("codex_account"), billing: ref("codex_subscription"), recipient: ref("codex_provider"), charge: "subscription", availability: "available", efforts: ["high"], effortEvidence: "requested_only", upperBound: bound, rank: { ordinary: 0, difficult: 0 } }],
Expand Down
59 changes: 59 additions & 0 deletions src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,65 @@ import { s15WebEn } from "./s15-web-en";

/** ui.i18n_dictionary/v1 — English. Must define every key of the Thai dictionary; values are plain text. */
export const en: Record<MessageKey, string> = {
"s16.skills.privateComputerRequired": "This package is limited to selected Bots. Give this Bot its own private computer before releasing the package there.",
"s16.skills.privateComputerUnavailable": "Private computers are not enabled on this service. The package can still be read within its reviewed scope.",
"s16.skills.title": "Skills / plugins",
"s16.skills.lead": "Import know-how, inspect its exact files and decide who may use it. Imported text never grants permissions.",
"s16.skills.unavailable": "Skills are not enabled on this service.",
"s16.skills.import": "Import a package",
"s16.skills.update": "Check or import an update",
"s16.skills.origin": "Import from",
"s16.skills.github": "Public GitHub",
"s16.skills.folder": "Local folder",
"s16.skills.url": "Repository or folder URL",
"s16.skills.label": "Folder label",
"s16.skills.chooseFolder": "Choose a package folder",
"s16.skills.selectedFiles": "{count} files selected",
"s16.skills.limits": "Up to {count} regular files and {bytes} bytes per package. Secrets, links and installation hooks are refused or marked unsupported.",
"s16.skills.inspect": "Import for inspection",
"s16.skills.imported": "Imported packages",
"s16.skills.empty": "No packages yet. Import a public repository or a folder to inspect it.",
"s16.skills.active": "Reviewed",
"s16.skills.revoked": "Revoked",
"s16.skills.needsReview": "Needs review",
"s16.skills.candidate": "An update is waiting for review. Work keeps the earlier reviewed pin.",
"s16.skills.open": "Inspect and review",
"s16.skills.pin": "Exact package pin",
"s16.skills.license": "Declared license",
"s16.skills.unknownLicense": "Not declared — inspect the license files",
"s16.skills.parts": "Instructions, scripts and resources",
"s16.skills.userOnly": "Human-only invocation is not offered to the Bot",
"s16.skills.instructions": "Instruction body",
"s16.skills.preview": "Preview file",
"s16.skills.binary": "Binary file. These bytes can be staged in the computer after review; they are not rendered as text.",
"s16.skills.unsupported": "{count} unsupported or ignored parts",
"s16.skills.dependencies": "Required connections",
"s16.skills.noDependencies": "This package declares no supported connection requirements.",
"s16.skills.missingDependency": "Select a currently reviewed matching connection",
"s16.skills.dependencyNote": "Imports never connect a service or change its tool decisions. A missing or changed connection holds use. Mapping shares only this package with that service, never other private inputs.",
"s16.skills.availability": "Who can use this package",
"s16.skills.team": "All enabled Bots",
"s16.skills.selectedBots": "Selected Bots",
"s16.skills.computer": "Allow use on the working computer",
"s16.skills.computerNote": "Includes text that guides computer commands. Bot-only packages require that Bot’s private computer. Existing permissions and action gates still apply.",
"s16.skills.recipients": "Share this exact package with",
"s16.skills.sharingNote": "This review covers only the listed, currently configured recipients. Adding a model provider later requires another review. Package text and scripts cannot approve actions.",
"s16.skills.copies": "{count} retained computer-copy records. Already released guest copies keep their original privacy and recipient limits; revoking does not erase guest disks.",
"s16.skills.confirm": "Review and enable this exact pin",
"s16.skills.revoke": "Revoke package",
"s16.skills.revokeNote": "Stop current package use and future activation. Retained evidence stays. Files already released to a computer are not erased.",
"s16.skills.revokedNote": "This package cannot be activated or used. Its review and evidence remain available here.",
"s16.skills.working": "Recording the exact command…",
"s16.skills.saved": "Command recorded. Current state is shown below.",
"s16.skills.failed": "Skills could not load: {reason}",
"s16.skills.commandFailed": "Command needs attention: {reason}. Check its original receipt before submitting again.",
"s16.skills.unknown": "The reply was lost. Check the original command ID; nothing will be retried automatically.",
"s16.skills.interrupted": "The original command has not completed. Checking status does not resume it.",
"s16.skills.checkStatus": "Check original command",
"s16.skills.resume": "Resume original import",
"s16.skills.reconcile": "Reconcile this reviewed membership",
"s16.skills.used": "Used {count} reviewed package pins",

"s15.effects.calendar_observed": "The calendar block was saved and its content was observed from the calendar.",
"s15.effects.final_message": "Review the final recipients, content and attachments before sending once.",
"s15.effects.stale_record": "The record or rule changed. Read its current version before editing.",
Expand Down
Loading
Loading