@spotpatch/runtime 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +19 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -104,7 +104,6 @@ var CAPABILITY_STATE_VALUES = new Set(import_shared2.AGENT_CAPABILITY_STATES);
|
|
|
104
104
|
var CHECK_STATUS_VALUES = new Set(import_shared2.AGENT_CHECK_STATUSES);
|
|
105
105
|
var FILE_CHANGE_KIND_VALUES = new Set(import_shared2.AGENT_FILE_CHANGE_KINDS);
|
|
106
106
|
var JOB_STATUS_VALUES = new Set(import_shared2.AGENT_JOB_STATUSES);
|
|
107
|
-
var WORKSPACE_STATE_VALUES = new Set(import_shared2.AGENT_WORKSPACE_STATES);
|
|
108
107
|
var PROFILE_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
109
108
|
var JOB_ID_PATTERN = /^[A-Za-z0-9_-]+$/;
|
|
110
109
|
var ISO_TIMESTAMP_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,9})?Z$/;
|
|
@@ -165,7 +164,7 @@ function isAgentWorkspaceHealthSnapshot(value) {
|
|
|
165
164
|
"changes",
|
|
166
165
|
"canIncludeLocalChanges",
|
|
167
166
|
"errorCode"
|
|
168
|
-
]) ||
|
|
167
|
+
]) || value.state !== "ready" && value.state !== "consent-required" && value.state !== "blocked" || !isIsoTimestamp(value.checkedAt) || typeof value.canIncludeLocalChanges !== "boolean" || value.errorCode !== void 0 && !isAgentErrorCode(value.errorCode) || !isRecord(value.changes) || !hasOnlyKeys(value.changes, [
|
|
169
168
|
"staged",
|
|
170
169
|
"unstaged",
|
|
171
170
|
"untracked",
|
|
@@ -1617,7 +1616,7 @@ var AGENT_PANEL_STYLES = `
|
|
|
1617
1616
|
font-weight: 560;
|
|
1618
1617
|
line-height: 1.35;
|
|
1619
1618
|
outline: none;
|
|
1620
|
-
transition:
|
|
1619
|
+
transition: 160ms ease;
|
|
1621
1620
|
}
|
|
1622
1621
|
.spotpatch-agent select:hover { border-color: rgb(148 163 184 / 38%); background-color: rgb(255 255 255 / 5%); }
|
|
1623
1622
|
.spotpatch-agent select:focus-visible { border-color: rgb(139 124 247 / 76%); box-shadow: 0 0 0 3px rgb(109 93 246 / 18%); }
|
|
@@ -1628,7 +1627,7 @@ var AGENT_PANEL_STYLES = `
|
|
|
1628
1627
|
.spotpatch-agent select { padding: 10px 13px; }
|
|
1629
1628
|
.spotpatch-agent select::picker-icon {
|
|
1630
1629
|
color: #9da6b5;
|
|
1631
|
-
transition: rotate 180ms cubic-bezier(.2, .8, .2, 1)
|
|
1630
|
+
transition: rotate 180ms cubic-bezier(.2, .8, .2, 1);
|
|
1632
1631
|
}
|
|
1633
1632
|
.spotpatch-agent select:open::picker-icon { rotate: 180deg; color: #c4b5fd; }
|
|
1634
1633
|
.spotpatch-agent select::picker(select) {
|
|
@@ -1641,12 +1640,10 @@ var AGENT_PANEL_STYLES = `
|
|
|
1641
1640
|
border: 1px solid rgb(139 124 247 / 28%);
|
|
1642
1641
|
border-radius: 12px;
|
|
1643
1642
|
padding: 6px;
|
|
1644
|
-
color: #e8ebf2;
|
|
1645
1643
|
background: #10151e;
|
|
1646
|
-
box-shadow: 0 18px 50px rgb(0 0 0 / 38%)
|
|
1644
|
+
box-shadow: 0 18px 50px rgb(0 0 0 / 38%);
|
|
1647
1645
|
opacity: 0;
|
|
1648
1646
|
transform: translateY(-5px) scale(.985);
|
|
1649
|
-
transform-origin: top center;
|
|
1650
1647
|
transition: opacity 150ms ease, transform 180ms cubic-bezier(.2, .8, .2, 1), overlay 180ms allow-discrete, display 180ms allow-discrete;
|
|
1651
1648
|
}
|
|
1652
1649
|
::picker(select):popover-open { opacity: 1; transform: translateY(0) scale(1); }
|
|
@@ -1660,7 +1657,6 @@ var AGENT_PANEL_STYLES = `
|
|
|
1660
1657
|
color: #dfe4ee;
|
|
1661
1658
|
background: transparent;
|
|
1662
1659
|
cursor: pointer;
|
|
1663
|
-
transition: color 120ms ease, background-color 120ms ease;
|
|
1664
1660
|
}
|
|
1665
1661
|
.spotpatch-agent select option:hover,
|
|
1666
1662
|
.spotpatch-agent select option:focus { color: #fff; background: rgb(109 93 246 / 16%); }
|
|
@@ -2344,16 +2340,16 @@ var ERROR_MESSAGES_EN = Object.freeze({
|
|
|
2344
2340
|
[import_shared6.ERROR_CODES.AGENT_BUSY]: "Another write Agent job is still active.",
|
|
2345
2341
|
[import_shared6.ERROR_CODES.AGENT_LIMIT_EXCEEDED]: "The Agent stopped at a configured time, turn, output, or size limit.",
|
|
2346
2342
|
[import_shared6.ERROR_CODES.AGENT_CANCELLED]: "The Agent job was cancelled.",
|
|
2347
|
-
[import_shared6.ERROR_CODES.WORKTREE_DIRTY]: "
|
|
2348
|
-
[import_shared6.ERROR_CODES.WORKTREE_NOT_REPOSITORY]: "
|
|
2349
|
-
[import_shared6.ERROR_CODES.WORKTREE_OPERATION_IN_PROGRESS]: "Finish the active merge, rebase, cherry-pick, or revert
|
|
2350
|
-
[import_shared6.ERROR_CODES.WORKTREE_CONFLICTED]: "Resolve all
|
|
2351
|
-
[import_shared6.ERROR_CODES.WORKTREE_LOCAL_CHANGES_TOO_LARGE]: "
|
|
2352
|
-
[import_shared6.ERROR_CODES.WORKTREE_UNTRACKED_UNSUPPORTED]: "An untracked
|
|
2353
|
-
[import_shared6.ERROR_CODES.WORKTREE_LOCAL_CHANGES_UNSUPPORTED]: "Local changes
|
|
2343
|
+
[import_shared6.ERROR_CODES.WORKTREE_DIRTY]: "Confirm inclusion of local changes before running AI.",
|
|
2344
|
+
[import_shared6.ERROR_CODES.WORKTREE_NOT_REPOSITORY]: "Vite root must be an initialized Git repository root.",
|
|
2345
|
+
[import_shared6.ERROR_CODES.WORKTREE_OPERATION_IN_PROGRESS]: "Finish the active merge, rebase, cherry-pick, or revert.",
|
|
2346
|
+
[import_shared6.ERROR_CODES.WORKTREE_CONFLICTED]: "Resolve all Git conflicts before running AI.",
|
|
2347
|
+
[import_shared6.ERROR_CODES.WORKTREE_LOCAL_CHANGES_TOO_LARGE]: "Reduce untracked files below the safe count and size limits.",
|
|
2348
|
+
[import_shared6.ERROR_CODES.WORKTREE_UNTRACKED_UNSUPPORTED]: "An untracked path is missing, linked, or not a regular file.",
|
|
2349
|
+
[import_shared6.ERROR_CODES.WORKTREE_LOCAL_CHANGES_UNSUPPORTED]: "Local changes cannot be isolated safely.",
|
|
2354
2350
|
[import_shared6.ERROR_CODES.TOOL_DENIED]: "A model tool request violated the local safety policy.",
|
|
2355
|
-
[import_shared6.ERROR_CODES.TOOL_INPUT_INVALID]: "The model sent invalid tool arguments or reused a tool
|
|
2356
|
-
[import_shared6.ERROR_CODES.TOOL_PATH_DENIED]: "The model
|
|
2351
|
+
[import_shared6.ERROR_CODES.TOOL_INPUT_INVALID]: "The model sent invalid tool arguments or reused a tool ID.",
|
|
2352
|
+
[import_shared6.ERROR_CODES.TOOL_PATH_DENIED]: "The model requested a protected, linked, non-text, or external path.",
|
|
2357
2353
|
[import_shared6.ERROR_CODES.PATCH_REJECTED]: "The proposed patch did not pass local policy.",
|
|
2358
2354
|
[import_shared6.ERROR_CODES.VALIDATION_FAILED]: "Required project checks failed. The change cannot be applied.",
|
|
2359
2355
|
[import_shared6.ERROR_CODES.APPLY_CONFLICT]: "Project files changed after the Agent baseline; no overwrite was performed.",
|
|
@@ -2380,13 +2376,13 @@ var ERROR_MESSAGES_ZH = Object.freeze({
|
|
|
2380
2376
|
[import_shared6.ERROR_CODES.WORKTREE_DIRTY]: "\u8FD0\u884C AI \u524D\uFF0C\u8BF7\u660E\u786E\u540C\u610F\u5C06\u5F53\u524D\u672C\u5730\u4FEE\u6539\u7EB3\u5165\u9694\u79BB\u57FA\u7EBF\u3002",
|
|
2381
2377
|
[import_shared6.ERROR_CODES.WORKTREE_NOT_REPOSITORY]: "Vite \u6839\u76EE\u5F55\u4E0D\u662F\u5DF2\u521D\u59CB\u5316 Git \u4ED3\u5E93\u7684\u9876\u5C42\u76EE\u5F55\u3002",
|
|
2382
2378
|
[import_shared6.ERROR_CODES.WORKTREE_OPERATION_IN_PROGRESS]: "\u8BF7\u5148\u5B8C\u6210\u5F53\u524D merge\u3001rebase\u3001cherry-pick \u6216 revert\uFF0C\u518D\u8FD0\u884C AI\u3002",
|
|
2383
|
-
[import_shared6.ERROR_CODES.WORKTREE_CONFLICTED]: "\u8BF7\u5148\u89E3\u51B3\u5168\u90E8
|
|
2384
|
-
[import_shared6.ERROR_CODES.WORKTREE_LOCAL_CHANGES_TOO_LARGE]: "\
|
|
2385
|
-
[import_shared6.ERROR_CODES.WORKTREE_UNTRACKED_UNSUPPORTED]: "\
|
|
2386
|
-
[import_shared6.ERROR_CODES.WORKTREE_LOCAL_CHANGES_UNSUPPORTED]: "\u672C\u5730\u4FEE\u6539\
|
|
2379
|
+
[import_shared6.ERROR_CODES.WORKTREE_CONFLICTED]: "\u8BF7\u5148\u89E3\u51B3\u5168\u90E8 Git \u51B2\u7A81\uFF0C\u518D\u8FD0\u884C AI\u3002",
|
|
2380
|
+
[import_shared6.ERROR_CODES.WORKTREE_LOCAL_CHANGES_TOO_LARGE]: "\u672A\u8DDF\u8E2A\u6587\u4EF6\u8D85\u8FC7\u5B89\u5168\u6570\u91CF\u6216\u4F53\u79EF\u4E0A\u9650\uFF0C\u8BF7\u5148\u7CBE\u7B80\u3002",
|
|
2381
|
+
[import_shared6.ERROR_CODES.WORKTREE_UNTRACKED_UNSUPPORTED]: "\u672A\u8DDF\u8E2A\u9879\u5DF2\u4E22\u5931\u3001\u662F\u7B26\u53F7\u94FE\u63A5\u6216\u4E0D\u662F\u666E\u901A\u6587\u4EF6\u3002",
|
|
2382
|
+
[import_shared6.ERROR_CODES.WORKTREE_LOCAL_CHANGES_UNSUPPORTED]: "\u5F53\u524D\u672C\u5730\u4FEE\u6539\u65E0\u6CD5\u5B89\u5168\u9694\u79BB\u3002",
|
|
2387
2383
|
[import_shared6.ERROR_CODES.TOOL_DENIED]: "\u6A21\u578B\u5DE5\u5177\u8BF7\u6C42\u8FDD\u53CD\u672C\u5730\u5B89\u5168\u7B56\u7565\u3002",
|
|
2388
|
-
[import_shared6.ERROR_CODES.TOOL_INPUT_INVALID]: "\u6A21\u578B\u53D1\u9001\u4E86\u65E0\u6548\u5DE5\u5177\u53C2\u6570\uFF0C\u6216\
|
|
2389
|
-
[import_shared6.ERROR_CODES.TOOL_PATH_DENIED]: "\u6A21\u578B\
|
|
2384
|
+
[import_shared6.ERROR_CODES.TOOL_INPUT_INVALID]: "\u6A21\u578B\u53D1\u9001\u4E86\u65E0\u6548\u5DE5\u5177\u53C2\u6570\uFF0C\u6216\u590D\u7528\u4E86\u5DE5\u5177\u8C03\u7528 ID\u3002",
|
|
2385
|
+
[import_shared6.ERROR_CODES.TOOL_PATH_DENIED]: "\u6A21\u578B\u8BF7\u6C42\u4E86\u53D7\u4FDD\u62A4\u3001\u975E\u6587\u672C\u3001\u7B26\u53F7\u94FE\u63A5\u6216\u9879\u76EE\u5916\u8DEF\u5F84\u3002",
|
|
2390
2386
|
[import_shared6.ERROR_CODES.PATCH_REJECTED]: "\u5EFA\u8BAE\u8865\u4E01\u672A\u901A\u8FC7\u672C\u5730\u7B56\u7565\u68C0\u67E5\u3002",
|
|
2391
2387
|
[import_shared6.ERROR_CODES.VALIDATION_FAILED]: "\u9879\u76EE\u5FC5\u9700\u68C0\u67E5\u5931\u8D25\uFF0C\u4E0D\u80FD\u5E94\u7528\u672C\u6B21\u53D8\u66F4\u3002",
|
|
2392
2388
|
[import_shared6.ERROR_CODES.APPLY_CONFLICT]: "Agent \u5EFA\u7ACB\u57FA\u7EBF\u540E\u9879\u76EE\u6587\u4EF6\u5DF2\u53D8\u5316\uFF0C\u672A\u6267\u884C\u8986\u76D6\u3002",
|