Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Guard human-only Intent commands from agent execution

未关闭
#229 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

首先定位命令注册,以及现有的 IntentAudience、agent 和 automation-context 处理逻辑。将列出的每个命令映射到一个明确的效果和权限类别,然后运行或添加针对性的测试,覆盖观察、拒绝变更、dry-run 例外、允许 automation,以及 audience 或 pseudo-TTY 不具备权限的情况;完成标准是所有已注册命令都已分类,并且验收矩阵通过。

由索引模型根据 Issue 内容生成。

描述

enhancement

Problem

IntentAudience controls presentation and redaction only. It is not authority. A TTY proves terminal interaction, not human identity. Current hooks are soft, fail-open convenience controls, not a security boundary. An agent with unrestricted shell and repository write access can bypass CLI guards or edit files directly. OS and host permissions remain the hard boundary.

Intent needs a command effect and authority classification that is separate from audience so an agent context cannot use presentation state or a pseudo-TTY to authorize trust or delivery changes.

Intent has no skill download command today. load reads an already installed permitted skill; it does not download content.

User outcome

Humans can keep existing confirmation-based trust and delivery workflows. Agents can inspect permitted Intent state and load already installed permitted skills. Automation can run its supported paths only through an explicit automation context. Audience never grants mutation authority.

In scope

  • Introduce a command effect and authority classification separate from IntentAudience: observe, trust-mutation, delivery-mutation, source-mutation, and automation.
  • Classify these as agent-safe observation:
    • list and list --json
    • load of an already installed permitted skill
    • meta
    • exclude list
    • validate and validate --check
    • stale and stale --json
    • install --dry-run
    • install --map --dry-run
    • install --print-prompt
    • scaffold
  • Classify these as human-only trust or delivery mutations:
    • install when it writes intent.skills or guidance
    • install --map when it writes guidance
    • exclude add and exclude remove
    • hooks install
    • setup and setup-github-actions
    • any future skill acquisition or download command, if introduced
  • Classify validate --fix, validate --set-version, and edit-package-json as source mutations governed by the caller's repository-write authority, not by IntentAudience.
  • Classify validate --github-summary and supported CI workflow paths as automation-only, with explicit CI identity and token permissions.
  • Require command implementations to declare their effect and authority class at registration or through one shared command policy.
  • Deny an agent context before a human-only command can prompt, scan for selectors, write package policy, write guidance, install hooks, or install workflows.
  • Preserve explicit automation paths without treating a TTY, an environment variable, or audience as authenticated human authority.
  • Add focused tests for every command class, dry-run exception, mutation denial, automation allowance, and the rule that audience cannot grant authority.

Out of scope

  • Cryptographic proof of human identity.
  • A claim that Intent can contain an actor with unrestricted shell and repository write access.
  • New dependencies or a new skill-content download command.
  • Changes to the current Clack interactive permission setup work.
  • Amendments to #220 or #228.

Acceptance criteria

  • Every registered command action has an explicit effect and authority class.
  • Agent execution can run only classified observation paths and can load only already installed permitted skills.
  • Agent execution fails before any human-only trust or delivery mutation and before its related prompt or write path.
  • IntentAudience, TTY detection, host permissions, and CI identity have separate documented roles.
  • Existing supported automation paths remain usable only through an explicit automation context.
  • Tests cover the command matrix and prove that changing audience or using a pseudo-TTY cannot grant human mutation authority.
  • The documentation states that host permissions remain the security boundary for actors with unrestricted shell and repository write access.

Dependencies

Blocked by: None

#220 and #228 remain independent. This issue must not block or alter the current Clack work.

主要语言
TypeScript
星标
331
派生
22
平均合并
12 小时 17 分钟
30 天内合并 PR
51

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TanStack/intent 的其他 Issue

查看 TanStack/intent 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。