agentlas 1.0.2 → 1.0.3
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.3 — 2026-07-27
|
|
4
|
+
|
|
5
|
+
Live `workforce` runs surfaced four defects that no unit gate could reach.
|
|
6
|
+
|
|
7
|
+
- **A slash after Korean/Japanese/Chinese text no longer reads as a file
|
|
8
|
+
path.** The hub-boundary guard's absolute-path lookbehind excluded only
|
|
9
|
+
ASCII, so ordinary phrases ("진단/멱등키", "한국어/영어") were rejected as
|
|
10
|
+
private paths — and the phrase being the task itself meant no repair was
|
|
11
|
+
possible. Shared fixtures now pin this in both this engine and the server
|
|
12
|
+
(`scripts/sync-privacy-guard.sh`).
|
|
13
|
+
- **Bundle preparation is no longer killed by the connect timeout.** The
|
|
14
|
+
15s "connect" budget actually measured time-to-response-headers, and the
|
|
15
|
+
server computes a multi-slot roster before its first byte, so preparation
|
|
16
|
+
died as a transport error. Workforce calls now use their own budget.
|
|
17
|
+
- **Selection cycle rules match the Hub exactly.** Local validation only
|
|
18
|
+
checked handsOffTo/reportsTo, so a `reviews` cycle passed locally and came
|
|
19
|
+
back as a Hub rejection. All relations and self-edges now count.
|
|
20
|
+
- **A worker that exits non-zero reports its stdout tail too**, so a failure
|
|
21
|
+
whose stderr holds only unrelated warnings is no longer a dead end.
|
|
22
|
+
|
|
23
|
+
Also in this release:
|
|
24
|
+
|
|
25
|
+
- **Live narration**: a `workforce` run now prints the slot count and hub
|
|
26
|
+
menu size, the picked agent per slot by name, hub acceptance, each worker
|
|
27
|
+
as it starts, and the synthesis→verification transition.
|
|
28
|
+
- **One name per feature across platforms**: `hep-network`, `hep-cloud`,
|
|
29
|
+
`hep-build`, `hep-call`, `hep-search`, `hep-upload`, `hep-storm`,
|
|
30
|
+
`hep-browser`, `hep-connect` now work as terminal commands, matching the
|
|
31
|
+
skill names used from Claude Code and Codex. The typo guard suggests them.
|
|
32
|
+
|
|
3
33
|
## 1.0.2 — 2026-07-27
|
|
4
34
|
|
|
5
35
|
Workforce execution-contract fixes. Every worker in a `workforce` run now
|
|
@@ -100,7 +100,11 @@ const HUB_PATH_PATTERNS = [
|
|
|
100
100
|
/(?:^|[\s"'`()\[\]{}=:,;])~[/\\](?=\S)/,
|
|
101
101
|
/(?<![A-Za-z0-9])[A-Za-z]:[/\\](?=\S)/,
|
|
102
102
|
/(?:^|[\s"'`()\[\]{}=:,;])\\\\[^\\/\s]+[\\/][^\\/\s]+/,
|
|
103
|
-
|
|
103
|
+
// lookbehind가 ASCII만 제외하면 한글 단어 뒤 슬래시("진단/멱등키", "한국어/영어")가
|
|
104
|
+
// 절대경로로 오탐된다(2026-07-27 실측 — 한국어 워크오더 전멸 원인). 문자·숫자
|
|
105
|
+
// 전반(\p{L}\p{N})을 제외해 "A/B" 표기는 통과시키고, 공백·행머리 뒤 실제 경로는
|
|
106
|
+
// 그대로 잡는다.
|
|
107
|
+
/(?<![\p{L}\p{N}$])\/(?!\/|\s)(?:[^/\s"'`<>]+\/)*[^/\s"'`<>]+/u,
|
|
104
108
|
];
|
|
105
109
|
const HUB_SECRET_PATTERNS = [
|
|
106
110
|
["provider_token", /\b(?:sk-[A-Za-z0-9_-]{20,}|gh[pousr]_[A-Za-z0-9_]{20,}|github_pat_[A-Za-z0-9_]{20,}|AKIA[0-9A-Z]{16}|xox[baprs]-[A-Za-z0-9-]{10,})\b/],
|
|
@@ -1133,12 +1137,16 @@ function validateSelection(value, candidateSet, workOrder, identity, options = {
|
|
|
1133
1137
|
if (!["reportsTo", "handsOffTo", "reviews", "coordinatesWith"].includes(edge.relation)) fail("selection_invalid", "selection edge relation is invalid");
|
|
1134
1138
|
assertIds(edge.artifactKinds, "selection edge artifactKinds");
|
|
1135
1139
|
}
|
|
1136
|
-
//
|
|
1137
|
-
//
|
|
1140
|
+
// 엣지 사이클은 Hub validate가 task_force_cycle로 거절한다. 서버 규칙과 동일하게:
|
|
1141
|
+
// 관계 종류 불문 모든 엣지 + 자기참조가 사이클이다(reviews 맞교환도 거절 —
|
|
1142
|
+
// 2026-07-27 실측: handsOffTo만 검사하던 로컬 검증이 reviews 사이클을 통과시켜
|
|
1143
|
+
// 서버 거절로 되돌아왔다). 로컬에서 먼저 걸어야 재시도 루프가 왕복 없이 교정한다.
|
|
1138
1144
|
{
|
|
1139
|
-
const directed = selection.edges.filter((edge) => edge.relation === "handsOffTo" || edge.relation === "reportsTo");
|
|
1140
1145
|
const adjacency = new Map();
|
|
1141
|
-
for (const edge of
|
|
1146
|
+
for (const edge of selection.edges) {
|
|
1147
|
+
if (edge.fromSlot === edge.toSlot) {
|
|
1148
|
+
fail("selection_invalid", `edges form a circular task force: ${edge.fromSlot} points at itself`);
|
|
1149
|
+
}
|
|
1142
1150
|
if (!adjacency.has(edge.fromSlot)) adjacency.set(edge.fromSlot, []);
|
|
1143
1151
|
adjacency.get(edge.fromSlot).push(edge.toSlot);
|
|
1144
1152
|
}
|
|
@@ -1147,7 +1155,7 @@ function validateSelection(value, candidateSet, workOrder, identity, options = {
|
|
|
1147
1155
|
const state = states.get(slot);
|
|
1148
1156
|
if (state === "done") return;
|
|
1149
1157
|
if (state === "visiting") {
|
|
1150
|
-
fail("selection_invalid", `
|
|
1158
|
+
fail("selection_invalid", `edges form a circular task force: ${[...trail, slot].join(" -> ")}`);
|
|
1151
1159
|
}
|
|
1152
1160
|
states.set(slot, "visiting");
|
|
1153
1161
|
for (const next of adjacency.get(slot) || []) walk(next, [...trail, slot]);
|
|
@@ -1628,7 +1636,7 @@ function buildPrompts(task, identity) {
|
|
|
1628
1636
|
`Exact direct Selection example: ${stableJson(selectionShape)}`,
|
|
1629
1637
|
"decisionAuthor must contain exactly kind, modelId, and runtimeId. Every required slot must have exactly its cardinality in assignments. Every assignment must contain exactly slotId, an exact candidate agentReleaseId, and a non-empty reasonCodes array.",
|
|
1630
1638
|
"edges, alternativesConsidered, and requestExpansionForSlots must be explicitly authored arrays. Every edge must contain exactly fromSlot, toSlot, relation (one of reportsTo|handsOffTo|reviews|coordinatesWith), and artifactKinds. The host will not add or normalize fields.",
|
|
1631
|
-
"
|
|
1639
|
+
"edges must form an acyclic directed graph regardless of relation — reviews and coordinatesWith count too, and a slot may never point at itself. Never author a circular chain (for example A reviews B while B reviews A); the Hub rejects circular task forces.",
|
|
1632
1640
|
].join("\n");
|
|
1633
1641
|
const plannerSchemaRequirements = [
|
|
1634
1642
|
`Return exactly one object: ${stableJson(plannerShape)}`,
|
|
@@ -2701,10 +2709,28 @@ function create(deps = {}) {
|
|
|
2701
2709
|
workOrderInvocationId,
|
|
2702
2710
|
};
|
|
2703
2711
|
|
|
2712
|
+
// 실황 내레이션: 사용자는 "누가 소집됐고 지금 뭘 하는지"를 보면서 신뢰를
|
|
2713
|
+
// 형성한다(2026-07-27 오너 요구). 결과에 영향 없는 표시 전용 — silent 존중.
|
|
2714
|
+
if (!ctx.silent) {
|
|
2715
|
+
const nameByRelease = new Map();
|
|
2716
|
+
for (const slotRow of candidateSet.slots) {
|
|
2717
|
+
for (const cand of slotRow.candidates) nameByRelease.set(cand.agentReleaseId, cand.name || cand.agentReleaseId);
|
|
2718
|
+
}
|
|
2719
|
+
const menuCount = candidateSet.slots.reduce((sum, slotRow) => sum + slotRow.candidates.length, 0);
|
|
2720
|
+
ui.info(ui.lang === "ko"
|
|
2721
|
+
? `워크오더 ${workOrder.roleSlots.length}슬롯 · 허브 후보 ${menuCount}명 메뉴 수신`
|
|
2722
|
+
: `work order: ${workOrder.roleSlots.length} slot(s) · hub menu of ${menuCount} candidates`);
|
|
2723
|
+
for (const row of selection.assignments) {
|
|
2724
|
+
ui.info(ui.lang === "ko"
|
|
2725
|
+
? ` 선발 ${row.slotId} ← ${nameByRelease.get(row.agentReleaseId) || row.agentReleaseId}`
|
|
2726
|
+
: ` picked ${row.slotId} ← ${nameByRelease.get(row.agentReleaseId) || row.agentReleaseId}`);
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2704
2729
|
const validationRaw = await hubStage("workforce.validate_selection", { workOrder, candidateSet, selection });
|
|
2705
2730
|
validationReceipt = validateSelectionReceipt(validationRaw, selection, candidateSet, workOrder);
|
|
2706
2731
|
benchmarkState.selectionValidation = validationReceipt;
|
|
2707
2732
|
receipt.selectionReceiptId = validationReceipt.selectionReceiptId;
|
|
2733
|
+
if (!ctx.silent) ui.info(ui.lang === "ko" ? "허브 검증 수락 — 번들 준비 중" : "hub validation accepted — preparing bundles");
|
|
2708
2734
|
|
|
2709
2735
|
const preparedRaw = await hubStage("workforce.prepare_execution", { workOrder, candidateSet, selection, validationReceipt });
|
|
2710
2736
|
({ prepared, rosterByPair } = validatePreparedExecution(preparedRaw, workOrder, selection, candidateSet, validationReceipt));
|
|
@@ -2996,6 +3022,7 @@ function create(deps = {}) {
|
|
|
2996
3022
|
const packet = delegationPlan.packets[index];
|
|
2997
3023
|
const pair = `${packet.slotId}\0${packet.agentReleaseId}`;
|
|
2998
3024
|
const pinned = rosterByPair.get(pair);
|
|
3025
|
+
if (!ctx.silent) ui.info(ui.lang === "ko" ? ` 워커 실행 중: ${packet.slotId}` : ` worker running: ${packet.slotId}`);
|
|
2999
3026
|
const capabilityBindings = bindingsByPair.get(pair) || [];
|
|
3000
3027
|
const grantedToolIds = [...new Set(capabilityBindings.map((row) => row.toolId))].sort();
|
|
3001
3028
|
const startedAt = nowIso(D.now);
|
|
@@ -3152,6 +3179,7 @@ function create(deps = {}) {
|
|
|
3152
3179
|
let verifierInvocationId = null;
|
|
3153
3180
|
let priorAttempt = null;
|
|
3154
3181
|
receipt.correctiveHistory = [];
|
|
3182
|
+
if (!ctx.silent) ui.info(ui.lang === "ko" ? "합성 → 검증 단계" : "synthesis → verification");
|
|
3155
3183
|
for (let verifyAttempt = 1; verifyAttempt <= 2; verifyAttempt += 1) {
|
|
3156
3184
|
const synthesisStarted = nowIso(D.now);
|
|
3157
3185
|
synthesisInvocationId = `workforce-invocation:${crypto.randomUUID()}`;
|
package/engine/agentlas.cjs
CHANGED
|
@@ -127,7 +127,9 @@ function main() {
|
|
|
127
127
|
*/
|
|
128
128
|
if (!agent && normalized.length === 1 && /^[A-Za-z0-9][A-Za-z0-9._:-]*$/.test(normalized[0])) {
|
|
129
129
|
const token = normalized[0];
|
|
130
|
-
const names = Object.keys(commands.COMMANDS)
|
|
130
|
+
const names = Object.keys(commands.COMMANDS)
|
|
131
|
+
.concat(Object.keys(commands.COMMAND_ALIASES || {}))
|
|
132
|
+
.concat(commands.NOT_YET_PORTED || []);
|
|
131
133
|
const near = nearestCommands(token, names);
|
|
132
134
|
const ko = ctx.lang === "ko";
|
|
133
135
|
ctx.err(ko
|
|
@@ -103,9 +103,32 @@ const DESKTOP_ONLY_SURFACES = {
|
|
|
103
103
|
// 무인자 호출이 프롬프트로 오라우팅되면 안 되는 명령 (smoke 가드 대상)
|
|
104
104
|
const GUARDED_NO_ARG = new Set(["search", "install", "upload"]);
|
|
105
105
|
|
|
106
|
+
// 플랫폼 간 이름 통일(오너 결정 2026-07-27): 클로드코드/코덱스에서 부르는 hep-*
|
|
107
|
+
// 스킬명과 터미널 명령이 서로 다르면 사용자가 어느 표면에 있는지에 따라 이름을
|
|
108
|
+
// 바꿔 써야 한다. 같은 기능은 어디서든 같은 이름으로 부른다.
|
|
109
|
+
const COMMAND_ALIASES = {
|
|
110
|
+
"hep-network": "workforce",
|
|
111
|
+
network: "workforce",
|
|
112
|
+
"hep-cloud": "cloud",
|
|
113
|
+
"hep-build": "build",
|
|
114
|
+
"hep-call": "call",
|
|
115
|
+
"hep-search": "search",
|
|
116
|
+
"hep-upload": "upload",
|
|
117
|
+
"hep-storm": "storm",
|
|
118
|
+
"hep-browser": "browser",
|
|
119
|
+
"hep-connect": "connect",
|
|
120
|
+
"hep-local": "workforce",
|
|
121
|
+
"hep-hub": "search",
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
function resolveCommandName(cmd) {
|
|
125
|
+
return COMMAND_ALIASES[cmd] || cmd;
|
|
126
|
+
}
|
|
127
|
+
|
|
106
128
|
function dispatch(ctx, argv) {
|
|
107
|
-
const [
|
|
108
|
-
if (!
|
|
129
|
+
const [rawCmd, ...rest] = argv;
|
|
130
|
+
if (!rawCmd) return null; // 엔진이 REPL로 진입
|
|
131
|
+
const cmd = resolveCommandName(rawCmd);
|
|
109
132
|
|
|
110
133
|
if (COMMANDS[cmd]) {
|
|
111
134
|
return COMMANDS[cmd]().run(ctx, rest);
|
|
@@ -133,4 +156,4 @@ function dispatch(ctx, argv) {
|
|
|
133
156
|
return undefined; // 알 수 없는 토큰 — 엔진이 에이전트 이름/프롬프트로 해석 시도
|
|
134
157
|
}
|
|
135
158
|
|
|
136
|
-
module.exports = { dispatch, COMMANDS, NOT_YET_PORTED, GUARDED_NO_ARG, DESKTOP_ONLY_SURFACES };
|
|
159
|
+
module.exports = { dispatch, COMMANDS, COMMAND_ALIASES, resolveCommandName, NOT_YET_PORTED, GUARDED_NO_ARG, DESKTOP_ONLY_SURFACES };
|
|
@@ -359,7 +359,13 @@ function captureRuntime(kind, systemPrompt, prompt, opts) {
|
|
|
359
359
|
const stdout = Buffer.concat(stdoutChunks).toString("utf8");
|
|
360
360
|
const stderr = Buffer.concat(stderrChunks).toString("utf8");
|
|
361
361
|
if (code && code !== 0) {
|
|
362
|
-
|
|
362
|
+
// stderr가 경고문뿐이면 진짜 원인이 stdout(JSON 오류 응답 등)에 있을 수 있다 —
|
|
363
|
+
// 2026-07-27 실측: 워커 exit 1이 설정 경고 2줄만 남기고 원인 불명이 됐다.
|
|
364
|
+
// 두 스트림의 꼬리를 모두 싣는다.
|
|
365
|
+
const stdoutTail = stdout.trim().slice(-400);
|
|
366
|
+
finishReject(new Error(
|
|
367
|
+
`${kind} exited ${code}: ${stderr.slice(-500)}${stdoutTail ? `\n--- stdout tail ---\n${stdoutTail}` : ""}`,
|
|
368
|
+
));
|
|
363
369
|
return;
|
|
364
370
|
}
|
|
365
371
|
const raw = stdout.trim() || stderr.trim();
|
|
@@ -425,7 +425,13 @@ function buildWorkforceDeps(ctx = {}) {
|
|
|
425
425
|
// v1과 동일: callHubTool은 주입하지 않는다. 워크포스 모듈 내부의 jsonrpc 경로가
|
|
426
426
|
// 거절 코드 원문 전파·retryClass 계약을 소유하며, fetchHub는 버퍼드
|
|
427
427
|
// {ok,status,headers,text} 어댑터 형태를 만족한다(3중 타임아웃 + 16MB 상한).
|
|
428
|
-
|
|
428
|
+
// 워크포스 전용 타임아웃: prepare_execution은 서버가 로스터 번들을 조립하는 동안
|
|
429
|
+
// 첫 바이트 없이 계산한다(1슬롯 실측 7.2s, 다슬롯은 그 배수). 기본 connect 15s는
|
|
430
|
+
// 실제로는 "응답 헤더까지"를 재므로 다슬롯 준비를 처형한다(2026-07-27 전송오류
|
|
431
|
+
// 2연속의 진범). 준비 상한을 여유 있게 준다 — idle/total 계약은 유지.
|
|
432
|
+
fetchHub: (url, init) => hubClient.fetchHub(url, init, {
|
|
433
|
+
timeoutConfig: { connectMs: 120_000, idleMs: 60_000, totalMs: 300_000 },
|
|
434
|
+
}),
|
|
429
435
|
resolveRuntime: resolveWorkforceRuntime,
|
|
430
436
|
captureRuntime: capture.captureRuntime,
|
|
431
437
|
runApi: capture.runApi,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentlas",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Agentlas agent terminal — chat with your installed AI agents and teams from the terminal, Claude Code style. Standalone: no desktop app required.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"agentlas": "bin/agentlas.cjs"
|