@sema-agent/client-core 0.106.0 → 0.107.0
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 +81 -0
- package/README.md +20 -16
- package/dist/adapter/activeRunSelfHeal.d.ts +8 -0
- package/dist/adapter/activeRunSelfHeal.js +50 -22
- package/dist/checkpointRowVerdict.d.ts +6 -0
- package/dist/checkpointRowVerdict.js +9 -0
- package/dist/decideReceipt.js +1 -1
- package/dist/displayUntrusted.d.ts +5 -3
- package/dist/displayUntrusted.js +50 -41
- package/dist/engineNoticeCodes.d.ts +12 -0
- package/dist/engineNoticeCodes.js +117 -6
- package/dist/errorSupplementRoles.js +2 -1
- package/dist/executionLaneCapability.js +3 -2
- package/dist/executionLaneWords.d.ts +1 -0
- package/dist/executionLaneWords.js +3 -0
- package/dist/generated/engineNoticeTables.js +9 -3
- package/dist/hitl/approvalResolution.d.ts +5 -1
- package/dist/hitl/approvalResolution.js +18 -1
- package/dist/hitl/approvalsFeed.js +2 -1
- package/dist/hitl/askParkRowRouting.js +12 -0
- package/dist/hitl/decisionSend.d.ts +2 -0
- package/dist/hitl/decisionSend.js +20 -6
- package/dist/hitl/hitlBridge.d.ts +5 -1
- package/dist/hitl/hitlBridge.js +27 -2
- package/dist/hitl/livePendingAsk.js +4 -2
- package/dist/hitl/parkOwnership.js +4 -5
- package/dist/hitl/parkResolver.js +9 -5
- package/dist/hitl/parkRowBirthWait.d.ts +7 -0
- package/dist/hitl/parkRowBirthWait.js +1 -1
- package/dist/hitl/parkRowDelegation.d.ts +6 -0
- package/dist/hitl/parkRowDelegation.js +33 -0
- package/dist/hitl/persistedRulesWire.d.ts +15 -3
- package/dist/hitl/persistedRulesWire.js +102 -20
- package/dist/hitl/planReviewWire.js +4 -2
- package/dist/hitl/sessionAllowRoute.d.ts +5 -0
- package/dist/hitl/sessionAllowRoute.js +42 -0
- package/dist/hitl/standingRows.js +10 -10
- package/dist/hitl/toolApprovalWire.js +22 -8
- package/dist/i18n/messages.en.d.ts +6 -0
- package/dist/i18n/messages.en.js +8 -2
- package/dist/i18n/messages.zh.js +9 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/injectionLaneNotice.js +2 -1
- package/dist/noticePresentation.js +2 -0
- package/dist/sdkWireTransit.d.ts +1 -1
- package/dist/seatContract.d.ts +1 -0
- package/dist/seatContract.js +3 -1
- package/dist/wireRefusalCopy.d.ts +6 -1
- package/dist/wireRefusalCopy.js +7 -1
- package/docs/INTEGRATION-CLIENTS.md +382 -13
- package/package.json +5 -5
package/dist/i18n/messages.en.js
CHANGED
|
@@ -246,7 +246,11 @@ const EN = {
|
|
|
246
246
|
'approval.settle.cause.broadcastLost': 'it never reached any open connection',
|
|
247
247
|
'approval.settle.cause.streamDisconnected': 'the connection carrying this card dropped',
|
|
248
248
|
'approval.settle.cause.undeliverable': 'it could not be delivered to any approval surface',
|
|
249
|
-
'approval.decide.requiresBinding': 'This decision was sent without the binding that ties it to the exact action on the approval card, so the engine refused it · Nothing was decided and the approval is still pending · Fetch the pending approvals again and decide from the card as it is listed now; if the listed card itself carries no binding,
|
|
249
|
+
'approval.decide.requiresBinding': 'This decision was sent without the binding that ties it to the exact action on the approval card, so the engine refused it · Nothing was decided and the approval is still pending · Fetch the pending approvals again and decide from the card as it is listed now; if the listed card itself carries no binding, {wayOut}',
|
|
250
|
+
'approval.decide.unboundWayOut': 'it cannot be decided here — cancel the run or let the approval expire',
|
|
251
|
+
'approval.rowUnresumable.fallback': 'this engine does not report that it can continue this pending approval, so it was not shown as a card that can be approved; nothing was sent',
|
|
252
|
+
'approval.rowUnresumable.askNotSurfaced': 'the pending row (task {taskId}) cannot be continued by this engine, so it is not surfaced as a card that can be answered: {sentence}',
|
|
253
|
+
'approval.park.stillParked': '{gate} gate could not be answered: {reason} — the run is still parked on this approval.',
|
|
250
254
|
'approval.decision.grantChanged': 'The engine refused this approval because the skill grant it was bound to has changed since the card was shown · Nothing was decided and the request is still waiting, but approving it again will be refused the same way · Deny this request so the model can activate the skill again',
|
|
251
255
|
'approval.decision.settledElsewhereContrary.deniedFirst': 'This request was already answered elsewhere and denied, so your approval did not take effect.',
|
|
252
256
|
'approval.decision.settledElsewhereContrary.approvedFirst': 'This request was already answered elsewhere and approved, so your denial did not take effect.',
|
|
@@ -408,7 +412,7 @@ const EN = {
|
|
|
408
412
|
'session.selfHeal.injected.handedOffWatch': '{lead} was passed to the reply already in progress{id} instead of starting a new one — watch that reply for what it does with it.',
|
|
409
413
|
'session.selfHeal.injected.interruptedFinishing': '{lead} was not delivered: the earlier reply{id} that was stopped is still finishing, so sema did not send it and did not retry — the model has not seen it. Give it a moment, then try again.',
|
|
410
414
|
'session.selfHeal.injected.notDelivered': '{lead} was not delivered: this session was still busy with an earlier reply{id}, and there was no open card you could answer to free it{noView}. sema did not retry, so the model has not seen it.',
|
|
411
|
-
'session.selfHeal.injected.redundant': '{lead} was not passed on:
|
|
415
|
+
'session.selfHeal.injected.redundant': '{lead} was not passed on: the reply it was about{id} resumed on its own after that decision, so it has nothing to add.',
|
|
412
416
|
'session.selfHeal.injected.deferred': '{lead} is waiting: this session is busy with an earlier reply{id}, so sema kept the message and will send it as a new message once that reply has finished or paused.',
|
|
413
417
|
'session.selfHeal.decisionInFlight': 'The previous turn is parked {parkedOn} and your answer to that card is still on its way to the engine, so sema did not show the card again — answering it a second time would send a second decision. It did NOT cancel the run. Your message was NOT sent; send it again in a moment, once the engine has applied that decision.',
|
|
414
418
|
'session.selfHeal.parkedOn.ask': 'waiting for your decision (run {taskId})',
|
|
@@ -422,6 +426,7 @@ const EN = {
|
|
|
422
426
|
'session.selfHeal.row.askDecided.inferred': 'The previous turn was parked on an approval that your permission rules decided on their own (no card was needed); run {taskId} resumed and has since finished — sema is re-sending your message; if that run has not fully let go of the session yet, you may have to send it once more.',
|
|
423
427
|
'session.selfHeal.row.askDecided.releaseUnknown': 'The previous turn was parked on an approval that your permission rules decided on their own (no card was needed), so run {taskId} should be resuming{status}. sema could not yet confirm it finished, so your message was not sent — wait a moment and send it again.',
|
|
424
428
|
'session.selfHeal.row.askReopenFailed.withKeep': 'The previous turn is parked waiting for your decision (run {taskId}) and sema could not reopen that card here{noView}. It did NOT cancel the run — that would have decided it for you. Your message was NOT sent. To keep this conversation, {keep}: the card comes back when the session resumes, if it is still waiting. Or {wayOut} if you no longer want it.{viaEngine}',
|
|
429
|
+
'session.selfHeal.row.askReopenFailed.rowUnresumable': 'The previous turn is parked waiting for your decision (run {taskId}), but this engine cannot continue that pending request, so there is no card to reopen: {sentence} · {unbound}. It did NOT cancel the run. Your message was NOT sent.',
|
|
425
430
|
'session.selfHeal.row.askReopenFailed.noKeep': 'The previous turn is parked waiting for your decision (run {taskId}) and sema could not reopen that card here{noView}. It did NOT cancel the run — that would have decided it for you. Your message was NOT sent; {wayOut} if you no longer want it.{viaEngine}',
|
|
426
431
|
'session.selfHeal.row.planReopenFailed.dismissed': 'The previous turn is parked waiting for a plan review (run {taskId}), and you closed its approval card — {closed}. It did NOT cancel the run — that would have discarded the plan for you. Your message was NOT sent; send it again to bring the card back.',
|
|
427
432
|
'session.selfHeal.row.planReopenFailed.withKeep': 'The previous turn is parked waiting for a plan review (run {taskId}) and sema could not reopen that approval card{noView}. It did NOT cancel the run — that would have discarded the plan for you. Your message was NOT sent. To keep this conversation, {keep}: the card comes back when the session resumes, if it is still waiting. Or {wayOut} if you no longer want that plan.{viaEngine}',
|
|
@@ -983,6 +988,7 @@ const EN = {
|
|
|
983
988
|
'notice.wireRefusal.hostPosture.both': "The engine refused this request before anything ran: the request asked both for the shell to inherit this machine's whole environment and for bypassPermissions, and this deployment refused at least one of them; the refusal does not say which · {notLocal}; send it again without one or both (the whole-environment setting is honored only on a single-user deployment)",
|
|
984
989
|
'notice.wireRefusal.hostPosture.unattributed': "The engine refused this request before anything ran: this deployment does not accept a setting in it that only a single-user deployment may use; the engine's own message names it · {notLocal}; send it again without that setting",
|
|
985
990
|
'notice.wireRefusal.autonomyLane': 'The engine did not start this leader run: this deployment runs in plan-only autonomy, and a leader run has no way to have its plan reviewed, so nothing was started · Submit the work as a regular run instead, or ask whoever operates the engine to change its autonomy setting',
|
|
991
|
+
'notice.wireRefusal.sessionArchiveStamped': "This session's stored archive still carries an owner stamp written by an earlier server version, so it cannot be forked or have its log replaced; nothing was written · Delete the session and push it again",
|
|
986
992
|
'notice.wireRefusal.unsupportedRule': 'The engine refused this request, so none of it took effect: a rule in it is a form the engine does not support — {detail} · Remove or rewrite that rule (to stop a tool altogether, write its name alone), then send it again',
|
|
987
993
|
'notice.wireRefusal.unsupportedRule.other': 'The engine refused this request, so none of it took effect: {count} rules in it are forms the engine does not support — {detail} · Remove or rewrite those rules (to stop a tool altogether, write its name alone), then send it again',
|
|
988
994
|
'notice.wireRefusal.unsupportedRule.stored': 'The engine refused to continue this work: the request stored for it has a rule in it that is a form the engine does not support — {detail} · It cannot continue as stored. Remove or rewrite that rule (to stop a tool altogether, write its name alone), cancel the work if it is still suspended, then submit it again as a new request',
|
package/dist/i18n/messages.zh.js
CHANGED
|
@@ -246,7 +246,11 @@ const ZH = {
|
|
|
246
246
|
'approval.settle.cause.broadcastLost': '它没有送达任何一个打开着的连接',
|
|
247
247
|
'approval.settle.cause.streamDisconnected': '承载这张卡的连接断了',
|
|
248
248
|
'approval.settle.cause.undeliverable': '它没能送达任何审批界面',
|
|
249
|
-
'approval.decide.requiresBinding': '这次决定没有带上把它绑到审批卡上那个具体动作的绑定,引擎拒绝了 · 什么都没有决定,这条审批仍在等待 ·
|
|
249
|
+
'approval.decide.requiresBinding': '这次决定没有带上把它绑到审批卡上那个具体动作的绑定,引擎拒绝了 · 什么都没有决定,这条审批仍在等待 · 请重新获取待决审批,按现在列出的那张卡再决定;如果列出的卡本身就没有绑定,{wayOut}',
|
|
250
|
+
'approval.decide.unboundWayOut': '这里决不了 —— 取消这次运行,或等这条审批过期',
|
|
251
|
+
'approval.rowUnresumable.fallback': '这台引擎没说它续得了这条待决审批,所以没有呈成可批的卡;什么都没发',
|
|
252
|
+
'approval.rowUnresumable.askNotSurfaced': '这条待决行(任务 {taskId})这台引擎续不了,所以没有呈成可作答的卡:{sentence}',
|
|
253
|
+
'approval.park.stillParked': '{gate} 这道门没能作答:{reason} —— 这一跑仍停在这条审批上。',
|
|
250
254
|
'approval.decision.grantChanged': '引擎拒收了这次批准:它绑定的技能授予在卡呈出之后已经变了 · 什么都没有决定,这一请求仍在等待,但再批一次会以同样的理由被拒 · 请拒绝这一请求,让模型重新激活那个技能',
|
|
251
255
|
'approval.decision.settledElsewhereContrary.deniedFirst': '这一请求已在别处被答复为拒绝,你的批准没有生效。',
|
|
252
256
|
'approval.decision.settledElsewhereContrary.approvedFirst': '这一请求已在别处被答复为批准,你的拒绝没有生效。',
|
|
@@ -408,7 +412,7 @@ const ZH = {
|
|
|
408
412
|
'session.selfHeal.injected.handedOffWatch': '{lead}已交给正在进行的那一轮回复{id},没有另开一轮 —— 请留意那一轮回复怎么处理它。',
|
|
409
413
|
'session.selfHeal.injected.interruptedFinishing': '{lead}没有送达:被叫停的较早那一轮回复{id}仍在收尾,sema 没有发送它也没有重试,所以模型没有看到它。稍等片刻后再试一次。',
|
|
410
414
|
'session.selfHeal.injected.notDelivered': '{lead}没有送达:这个会话还被较早的一轮回复占着{id},而且没有可以回答来放行的打开的卡{noView}。sema 没有重试,所以模型没有看到它。',
|
|
411
|
-
'session.selfHeal.injected.redundant': '{lead}
|
|
415
|
+
'session.selfHeal.injected.redundant': '{lead}没有转交:它说的那一轮回复{id}在那次决定之后已经自己接着往下走了,它没有什么可补充的。',
|
|
412
416
|
'session.selfHeal.injected.deferred': '{lead}正在等待:这个会话正被较早的一轮回复{id}占着,sema 保留了这条消息,等那一轮回复结束或暂停后再作为一条新消息发送。',
|
|
413
417
|
'session.selfHeal.decisionInFlight': '上一个 turn 处于 parked 状态,{parkedOn},而你对那张卡的回答还在送往引擎的路上,所以 sema 没有再次显示那张卡 —— 再回答一次会发出第二个决断。它没有取消这次 run。你的消息没有发出;请稍等片刻,等引擎应用了那个决断之后再发一次。',
|
|
414
418
|
'session.selfHeal.parkedOn.ask': '在等你的决断(run {taskId})',
|
|
@@ -422,6 +426,7 @@ const ZH = {
|
|
|
422
426
|
'session.selfHeal.row.askDecided.inferred': '上一个 turn 曾 parked 在一个审批上,你的权限规则自己做了决断(不需要卡);run {taskId} 已经 resume 并随后结束 —— sema 正在重新发送你的消息;如果那次 run 还没完全放开这个会话,你可能得再发一次。',
|
|
423
427
|
'session.selfHeal.row.askDecided.releaseUnknown': '上一个 turn 曾 parked 在一个审批上,你的权限规则自己做了决断(不需要卡),所以 run {taskId} 应该正在 resume{status}。sema 还不能确认它已经结束,所以你的消息没有发出 —— 请稍等片刻再发一次。',
|
|
424
428
|
'session.selfHeal.row.askReopenFailed.withKeep': '上一个 turn 处于 parked 状态,在等你的决断(run {taskId}),而 sema 没能在这里重新打开那张卡{noView}。它没有取消这次 run —— 那等于替你做了决断。你的消息没有发出。想保住这段对话,请{keep}:会话 resume 之后,如果它还在等,那张卡会回来。如果你不再需要它,也可以{wayOut}。{viaEngine}',
|
|
429
|
+
'session.selfHeal.row.askReopenFailed.rowUnresumable': '上一个 turn 处于 parked 状态,在等你的决断(run {taskId}),而这台引擎续不了那条待决请求,所以没有卡可以重新打开:{sentence} · {unbound}。它没有取消这次 run。你的消息没有发出。',
|
|
425
430
|
'session.selfHeal.row.askReopenFailed.noKeep': '上一个 turn 处于 parked 状态,在等你的决断(run {taskId}),而 sema 没能在这里重新打开那张卡{noView}。它没有取消这次 run —— 那等于替你做了决断。你的消息没有发出;如果你不再需要它,请{wayOut}。{viaEngine}',
|
|
426
431
|
'session.selfHeal.row.planReopenFailed.dismissed': '上一个 turn 处于 parked 状态,在等一次计划审阅(run {taskId}),而你关掉了它的审批卡 —— {closed}。它没有取消这次 run —— 那等于替你把计划丢掉了。你的消息没有发出;再发一次可以把卡叫回来。',
|
|
427
432
|
'session.selfHeal.row.planReopenFailed.withKeep': '上一个 turn 处于 parked 状态,在等一次计划审阅(run {taskId}),而 sema 没能重新打开那张审批卡{noView}。它没有取消这次 run —— 那等于替你把计划丢掉了。你的消息没有发出。想保住这段对话,请{keep}:会话 resume 之后,如果它还在等,那张卡会回来。如果你不再需要那份计划,也可以{wayOut}。{viaEngine}',
|
|
@@ -983,6 +988,7 @@ const ZH = {
|
|
|
983
988
|
'notice.wireRefusal.hostPosture.both': '引擎在任何东西运行之前就拒绝了这个请求:请求既要求 shell 继承这台机器的整份环境,又要求 bypassPermissions,而这个部署至少拒绝了其中一项;拒绝并没有说明是哪一项 · {notLocal};请去掉其中一项或两项后重新发送(整份环境设置只在单用户部署上才被采纳)',
|
|
984
989
|
'notice.wireRefusal.hostPosture.unattributed': '引擎在任何东西运行之前就拒绝了这个请求:这个部署不接受请求里只有单用户部署才能使用的某项设置;引擎自己的消息会点名它 · {notLocal};请去掉那项设置后重新发送',
|
|
985
990
|
'notice.wireRefusal.autonomyLane': '引擎没有启动这次 leader 运行:这个部署运行在只做计划的自主档,而 leader 运行没有办法让它的计划被审阅,所以什么也没有启动 · 请改为作为普通运行提交这项工作,或请运维这台引擎的人更改它的自主设置',
|
|
991
|
+
'notice.wireRefusal.sessionArchiveStamped': '这个会话存下的存档仍带着更早版本的服务端写下的属主戳,所以不能被 fork,也不能替换它的日志;什么都没有写入 · 请删除这个会话,然后重新推送',
|
|
986
992
|
'notice.wireRefusal.unsupportedRule': '引擎拒绝了这个请求,所以其中任何内容都没有生效:里面有一条规则是引擎不支持的写法 —— {detail} · 请删掉或改写那条规则(要整只拦下一个工具,请只写工具名),再重新发送',
|
|
987
993
|
'notice.wireRefusal.unsupportedRule.other': '引擎拒绝了这个请求,所以其中任何内容都没有生效:里面有 {count} 条规则是引擎不支持的写法 —— {detail} · 请删掉或改写这些规则(要整只拦下一个工具,请只写工具名),再重新发送',
|
|
988
994
|
'notice.wireRefusal.unsupportedRule.stored': '引擎拒绝继续这件工作:为它保存的请求里有一条规则是引擎不支持的写法 —— {detail} · 它无法按保存的样子继续。请删掉或改写那条规则(要整只拦下一个工具,请只写工具名);若这件工作仍停驻着,请先取消它,然后作为新请求重新提交',
|
|
@@ -1201,6 +1207,7 @@ export const TERM_SLOTS = Object.freeze({
|
|
|
1201
1207
|
'session.selfHeal.row.askDecided.releaseUnknown': ['parked', 'run', 'turn'],
|
|
1202
1208
|
'session.selfHeal.row.askReopenFailed.withKeep': ['parked', 'run', 'turn'],
|
|
1203
1209
|
'session.selfHeal.row.askReopenFailed.noKeep': ['parked', 'run', 'turn'],
|
|
1210
|
+
'session.selfHeal.row.askReopenFailed.rowUnresumable': ['parked', 'run', 'turn'],
|
|
1204
1211
|
'session.selfHeal.row.planReopenFailed.dismissed': ['parked', 'run', 'turn'],
|
|
1205
1212
|
'session.selfHeal.row.planReopenFailed.withKeep': ['parked', 'run', 'turn'],
|
|
1206
1213
|
'session.selfHeal.row.planReopenFailed.noKeep': ['parked', 'run', 'turn'],
|
package/dist/index.d.ts
CHANGED
|
@@ -365,6 +365,7 @@ export { readApprovalAllowRuleShadow, approvalAllowRuleShadowed, allowRuleShadow
|
|
|
365
365
|
export { projectCrashConverged } from './hitl/crashConverged.js';
|
|
366
366
|
export type { ApprovalsListEnvelope, CrashConvergedOrphanState, CrashConvergedProjection, CrashConvergedRowReading } from './hitl/crashConverged.js';
|
|
367
367
|
export type { ApprovalQueueKindedRow, ApprovalQueueRow } from './hitl/crashConverged.js';
|
|
368
|
+
export { checkpointQueueRowSortOf, type CheckpointQueueRowSort } from './hitl/approvalQueueRow.js';
|
|
368
369
|
export * from './hitl/crashConvergedNotice.js';
|
|
369
370
|
export { approvalCompleteParked } from './hitl/approvalCompleteParked.js';
|
|
370
371
|
export { approvalCompleteCauseOf } from './hitl/approvalEndingCause.js';
|
package/dist/index.js
CHANGED
|
@@ -295,6 +295,7 @@ export { noAllowCauseOf } from './hitl/noAllowCause.js';
|
|
|
295
295
|
export { policyDenyReason } from './hitl/frameRouter.js';
|
|
296
296
|
export { readApprovalAllowRuleShadow, approvalAllowRuleShadowed, allowRuleShadowSentence, } from './hitl/allowRuleShadow.js';
|
|
297
297
|
export { projectCrashConverged } from './hitl/crashConverged.js';
|
|
298
|
+
export { checkpointQueueRowSortOf } from './hitl/approvalQueueRow.js';
|
|
298
299
|
export * from './hitl/crashConvergedNotice.js';
|
|
299
300
|
export { approvalCompleteParked } from './hitl/approvalCompleteParked.js';
|
|
300
301
|
export { approvalCompleteCauseOf } from './hitl/approvalEndingCause.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { executionLaneWordIsNone } from './executionLaneWords.js';
|
|
1
2
|
import { capForDisplay } from './fleetTaskDesc.js';
|
|
2
3
|
import { msg, renderMessage } from './i18n/translate.js';
|
|
3
4
|
export const INJECTION_SOURCES = Object.freeze(['stdio_mcp', 'credentialed_mcp', 'task_hooks']);
|
|
@@ -16,7 +17,7 @@ function remoteLaneWordOf(lane) {
|
|
|
16
17
|
return undefined;
|
|
17
18
|
if (view.toolsOnThisHost !== false)
|
|
18
19
|
return undefined;
|
|
19
|
-
if (view.isolatedAbsent === 'no_hands' || view.provider
|
|
20
|
+
if (view.isolatedAbsent === 'no_hands' || executionLaneWordIsNone(view.provider))
|
|
20
21
|
return undefined;
|
|
21
22
|
if (typeof view.provider !== 'string' || view.provider === '')
|
|
22
23
|
return undefined;
|
|
@@ -102,6 +102,8 @@ const OCCURRENCE_KEY_BY_CODE = Object.freeze({
|
|
|
102
102
|
'memory.hold_released': 'reportId',
|
|
103
103
|
'memory.hold_disposed': 'reportId',
|
|
104
104
|
'memory.consolidation_recommended': 'reportId',
|
|
105
|
+
'memory.harvest_refused': 'reportId',
|
|
106
|
+
'memory.harvest_conflict': 'reportId',
|
|
105
107
|
'memory.capture_opted_out': 'sessionId',
|
|
106
108
|
'memory.delegation_static_mark_waived': 'runId',
|
|
107
109
|
});
|
package/dist/sdkWireTransit.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { AgentClient } from '@sema-agent/sdk';
|
|
|
2
2
|
export { isApprovalRequestFrameV1, isApprovalRevokeFrameV1 } from '@sema-agent/sdk';
|
|
3
3
|
export { pushSessionBundle, pullSessionBundle, importSessionBundle, APIError } from '@sema-agent/sdk';
|
|
4
4
|
export { APPROVAL_DECIDE_GATE_KINDS, PLAN_REVIEW_GATE_KINDS } from '@sema-agent/sdk';
|
|
5
|
-
export type { TaskRequest, SessionPermissionRules, SemaSettings, SkillSpec, AgentEvent, RunReceipt, CancelAck, RunRecord, ToolApprovalRespondAck, FleetTaskRow, FleetWorkflowRow, ApprovalCard, ApprovalRequestFrame, ApprovalRiskAxes, AskDecisionAck, AskDecisionBody, PolicyInfo, CcImportLayer, CcImportPrepareResult,
|
|
5
|
+
export type { TaskRequest, SessionPermissionRules, SemaSettings, SkillSpec, AgentEvent, RunReceipt, CancelAck, RunRecord, ToolApprovalRespondAck, FleetTaskRow, FleetWorkflowRow, ApprovalCard, ApprovalRequestFrame, ApprovalRiskAxes, AskDecisionAck, AskDecisionBody, PolicyInfo, CcImportLayer, CcImportPrepareResult, CcImportSettingsLayer, CcImportSkippedRule, PersistedRule, RuleRevokeRequest, RuleRevokeResult, ApprovalDecideGateKind, PlanReviewGateKind, } from '@sema-agent/sdk';
|
package/dist/seatContract.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export interface SeatValidationFailure {
|
|
|
21
21
|
field?: string;
|
|
22
22
|
}
|
|
23
23
|
export type SeatValidation = true | SeatValidationFailure;
|
|
24
|
+
export declare const isSecretKeyName: (k: string) => boolean;
|
|
24
25
|
export type EipcMethodKind = "invoke" | "event";
|
|
25
26
|
export interface EipcMethodSpec {
|
|
26
27
|
kind: EipcMethodKind;
|
package/dist/seatContract.js
CHANGED
|
@@ -192,7 +192,9 @@ const keyWords = (k) => k
|
|
|
192
192
|
.filter((w) => w.length > 0);
|
|
193
193
|
const SECRET_KEY_WORDS = new Set(["token", "secret", "password", "passwd", "authorization", "bearer", "sealed"]);
|
|
194
194
|
const SECRET_KEY_PAIRS = new Set(["api key", "device code", "access key", "private key"]);
|
|
195
|
-
const isSecretKeyName = (k) => {
|
|
195
|
+
export const isSecretKeyName = (k) => {
|
|
196
|
+
if (typeof k !== "string")
|
|
197
|
+
return false;
|
|
196
198
|
const words = keyWords(k);
|
|
197
199
|
for (let i = 0; i < words.length; i += 1) {
|
|
198
200
|
if (SECRET_KEY_WORDS.has(words[i]))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FLEET_LEASE_UNAVAILABLE, REQUEST_AUTONOMY_LANE_REFUSED, USAGE_WINDOW_EXHAUSTED, USER_ATTACHMENT_INVALID_ERROR_CODE, USER_INVOKED_SKILL_UNKNOWN_ERROR_CODE } from './engineErrorCodes.js';
|
|
1
|
+
import { CONFLICT_SESSION_ARCHIVE_STAMPED, FLEET_LEASE_UNAVAILABLE, REQUEST_AUTONOMY_LANE_REFUSED, USAGE_WINDOW_EXHAUSTED, USER_ATTACHMENT_INVALID_ERROR_CODE, USER_INVOKED_SKILL_UNKNOWN_ERROR_CODE } from './engineErrorCodes.js';
|
|
2
2
|
import type { TaskRequestLike } from './request/taskRequest.js';
|
|
3
3
|
import type { UiLanguage } from './env/uiLanguage.js';
|
|
4
4
|
export declare const CONFLICT_APPROVAL_SETTLED = "conflict.approval_settled";
|
|
@@ -139,6 +139,11 @@ export interface AutonomyLaneRefusalDetail {
|
|
|
139
139
|
}
|
|
140
140
|
export declare function autonomyLaneRefusalFromError(err: unknown): AutonomyLaneRefusalDetail | null;
|
|
141
141
|
export declare function autonomyLaneRefusalContent(lang?: UiLanguage): string;
|
|
142
|
+
export interface SessionArchiveStampedDetail {
|
|
143
|
+
readonly code: typeof CONFLICT_SESSION_ARCHIVE_STAMPED;
|
|
144
|
+
}
|
|
145
|
+
export declare function sessionArchiveStampedFromError(err: {} | null | undefined): SessionArchiveStampedDetail | null;
|
|
146
|
+
export declare function sessionArchiveStampedContent(lang?: UiLanguage): string;
|
|
142
147
|
export interface UnsupportedRuleRefusalProblem {
|
|
143
148
|
readonly code: string;
|
|
144
149
|
readonly field?: string;
|
package/dist/wireRefusalCopy.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PROTOCOL_ERROR_NAME, REFUSAL_PROBLEMS_READ_MAX, THROWN_SLOT_UNREADABLE, effectiveWireCodeReading, isSlotCarrier, protocolErrorNameOf, readErrorNumber, readErrorRecord, readErrorStrictStringList, readErrorString, readErrorStringList, readRefusalField, readThrownSlot, readThrownStatusSlot } from './wireFailureShape.js';
|
|
2
2
|
import { appendOwnElement, guardedRead, readOwnDataValue, readOwnNonEmptyString } from './ownKey.js';
|
|
3
|
-
import { ACTIVE_RUN_BUSY_ERROR_CODE, FLEET_LEASE_UNAVAILABLE, REQUEST_AUTONOMY_LANE_REFUSED, REQUEST_FIELD_CONFLICT, RESUME_OUTCOME_INVALID, USAGE_WINDOW_EXHAUSTED, USER_ATTACHMENT_INVALID_ERROR_CODE, USER_INVOKED_SKILL_UNKNOWN_ERROR_CODE } from './engineErrorCodes.js';
|
|
3
|
+
import { ACTIVE_RUN_BUSY_ERROR_CODE, CONFLICT_SESSION_ARCHIVE_STAMPED, FLEET_LEASE_UNAVAILABLE, REQUEST_AUTONOMY_LANE_REFUSED, REQUEST_FIELD_CONFLICT, RESUME_OUTCOME_INVALID, USAGE_WINDOW_EXHAUSTED, USER_ATTACHMENT_INVALID_ERROR_CODE, USER_INVOKED_SKILL_UNKNOWN_ERROR_CODE } from './engineErrorCodes.js';
|
|
4
4
|
import { capForDisplay } from './fleetTaskDesc.js';
|
|
5
5
|
import { effectiveWireErrorCode } from './wireErrorTriage.js';
|
|
6
6
|
import { CORE_TOOL_DECLARATION_CODES } from './generated/engineFactTables.js';
|
|
@@ -809,6 +809,12 @@ export function autonomyLaneRefusalFromError(err) {
|
|
|
809
809
|
export function autonomyLaneRefusalContent(lang) {
|
|
810
810
|
return renderMessage(msg('notice.wireRefusal.autonomyLane'), lang);
|
|
811
811
|
}
|
|
812
|
+
export function sessionArchiveStampedFromError(err) {
|
|
813
|
+
return effectiveWireErrorCode(err) === CONFLICT_SESSION_ARCHIVE_STAMPED ? { code: CONFLICT_SESSION_ARCHIVE_STAMPED } : null;
|
|
814
|
+
}
|
|
815
|
+
export function sessionArchiveStampedContent(lang) {
|
|
816
|
+
return renderMessage(msg('notice.wireRefusal.sessionArchiveStamped'), lang);
|
|
817
|
+
}
|
|
812
818
|
const REQUEST_UNPROCESSABLE = 'request.unprocessable';
|
|
813
819
|
const UNSUPPORTED_RULE_PROBLEMS_MAX = REFUSAL_PROBLEMS_READ_MAX;
|
|
814
820
|
const nonEmptyString = (v) => (typeof v === 'string' && v !== '' ? v : undefined);
|