hanoman 0.1.38 → 0.1.40

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.38",
3
- "sha": "31209e5",
4
- "builtAt": "2026-08-14T17:51:33.674Z"
2
+ "version": "0.1.40",
3
+ "sha": "bf5c0ae",
4
+ "builtAt": "2026-08-15T13:13:30.676Z"
5
5
  }
package/dist/cli.js CHANGED
@@ -5650,6 +5650,7 @@ var init_api = __esm({
5650
5650
  // SPEC-233 · drop commit isolasi
5651
5651
  fsBrowse: (path) => `${API}/fs/browse${path ? `?path=${encodeURIComponent(path)}` : ""}`,
5652
5652
  terminalSessions: `${API}/terminal/sessions`,
5653
+ terminalWorkspace: `${API}/terminal/workspace`,
5653
5654
  // SPEC-742 · ADR-0116 · pembersihan worktree yang masih tertunda sesudah sesi ditutup. Di bawah
5654
5655
  // prefix /terminal supaya ikut capability `sessions` yang sudah ada (cermin sessionHistory).
5655
5656
  terminalCleanups: `${API}/terminal/cleanups`,
@@ -5752,6 +5753,8 @@ var init_api = __esm({
5752
5753
  syncNow: `${API}/sync/now`,
5753
5754
  // SPEC-270 · ADR-0067 · antrean konflik rekonsil (cookie-authed)
5754
5755
  syncConflicts: `${API}/sync/conflicts`,
5756
+ // SPEC-799 · ADR-0119 · penghapusan yang menunggu jendela online (cookie-only, cermin syncNow).
5757
+ syncPending: `${API}/sync/pending`,
5755
5758
  syncConflictResolve: (entity, recordId) => `${API}/sync/conflicts/${encodeURIComponent(entity)}/${encodeURIComponent(recordId)}/resolve`,
5756
5759
  // SPEC-257 · ADR-0065 · agent token (kelola cookie-only) + katalog capability
5757
5760
  agentTokens: `${API}/agent-tokens`,
@@ -7121,6 +7124,70 @@ var init_changelog = __esm({
7121
7124
  }
7122
7125
  });
7123
7126
 
7127
+ // ../shared/src/terminal-workspace.ts
7128
+ var zSessionId, zTerminalGroup, zTerminalWorkspaceV1, zTerminalWorkspaceWrite, zTerminalWorkspaceSnapshot;
7129
+ var init_terminal_workspace = __esm({
7130
+ "../shared/src/terminal-workspace.ts"() {
7131
+ "use strict";
7132
+ init_zod();
7133
+ zSessionId = external_exports.string().trim().min(1).max(256);
7134
+ zTerminalGroup = external_exports.object({
7135
+ id: external_exports.string().trim().min(1).max(128),
7136
+ name: external_exports.string().trim().min(1).max(80),
7137
+ layout: external_exports.object({
7138
+ rows: external_exports.number().int().min(1).max(12),
7139
+ cols: external_exports.number().int().min(1).max(12),
7140
+ cells: external_exports.array(zSessionId.nullable()).max(144)
7141
+ }).strict().superRefine((layout, ctx) => {
7142
+ if (layout.cells.length !== layout.rows * layout.cols) {
7143
+ ctx.addIssue({
7144
+ code: external_exports.ZodIssueCode.custom,
7145
+ path: ["cells"],
7146
+ message: "cells must match rows \xD7 cols"
7147
+ });
7148
+ }
7149
+ })
7150
+ }).strict();
7151
+ zTerminalWorkspaceV1 = external_exports.object({
7152
+ version: external_exports.literal(1),
7153
+ groups: external_exports.array(zTerminalGroup).min(1).max(24)
7154
+ }).strict().superRefine((workspace, ctx) => {
7155
+ const groupIds = /* @__PURE__ */ new Set();
7156
+ const sessionIds = /* @__PURE__ */ new Set();
7157
+ workspace.groups.forEach((group, groupIndex) => {
7158
+ if (groupIds.has(group.id)) {
7159
+ ctx.addIssue({
7160
+ code: external_exports.ZodIssueCode.custom,
7161
+ path: ["groups", groupIndex, "id"],
7162
+ message: "group id must be unique"
7163
+ });
7164
+ }
7165
+ groupIds.add(group.id);
7166
+ group.layout.cells.forEach((sessionId, cellIndex) => {
7167
+ if (sessionId === null) return;
7168
+ if (sessionIds.has(sessionId)) {
7169
+ ctx.addIssue({
7170
+ code: external_exports.ZodIssueCode.custom,
7171
+ path: ["groups", groupIndex, "layout", "cells", cellIndex],
7172
+ message: "sessionId must be unique across the workspace"
7173
+ });
7174
+ }
7175
+ sessionIds.add(sessionId);
7176
+ });
7177
+ });
7178
+ });
7179
+ zTerminalWorkspaceWrite = external_exports.object({
7180
+ baseRevision: external_exports.number().int().min(0),
7181
+ workspace: zTerminalWorkspaceV1
7182
+ }).strict();
7183
+ zTerminalWorkspaceSnapshot = external_exports.object({
7184
+ workspace: zTerminalWorkspaceV1.nullable(),
7185
+ revision: external_exports.number().int().min(0),
7186
+ updatedAt: external_exports.string().datetime().nullable()
7187
+ }).strict();
7188
+ }
7189
+ });
7190
+
7124
7191
  // ../shared/src/index.ts
7125
7192
  var init_src = __esm({
7126
7193
  "../shared/src/index.ts"() {
@@ -7152,6 +7219,7 @@ var init_src = __esm({
7152
7219
  init_auto_merge();
7153
7220
  init_changelog();
7154
7221
  init_cron_expr();
7222
+ init_terminal_workspace();
7155
7223
  }
7156
7224
  });
7157
7225
 
@@ -29121,11 +29189,13 @@ var init_migrate_pg = __esm({
29121
29189
  "VpsItemState",
29122
29190
  "SessionResult",
29123
29191
  "SessionHistory",
29192
+ // SPEC-799 · ADR-0119 · SyncTombstone LOCAL-only, tanpa FK; letaknya bersama tabel sync lain.
29124
29193
  "SyncLog",
29125
29194
  "LocalBinding",
29126
29195
  "SyncOutbox",
29127
29196
  "SyncState",
29128
29197
  "SyncConflict",
29198
+ "SyncTombstone",
29129
29199
  // SPEC-485 · ADR-0102 · LeadFlow SEBELUM LeadDecision: `flowId` menunjuk ke sana. Tanpa FK, tapi
29130
29200
  // urutan tabel harus tetap mencerminkan arah tautannya bagi pembaca berikutnya.
29131
29201
  // SPEC-646 · ADR-0112 · SchedulerCron SEBELUM SchedulerCronRun: `cronId` menunjuk ke sana. Tanpa