humanish 0.95.0 → 0.96.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.
Files changed (88) hide show
  1. package/README.md +4 -2
  2. package/dist/comms-agentmail.d.ts +25 -0
  3. package/dist/comms-agentmail.js +418 -0
  4. package/dist/comms-agentmail.js.map +1 -0
  5. package/dist/comms-connections.d.ts +4 -2
  6. package/dist/comms-connections.js +3 -3
  7. package/dist/comms-connections.js.map +1 -1
  8. package/dist/comms-lease-store.d.ts +90 -0
  9. package/dist/comms-lease-store.js +489 -0
  10. package/dist/comms-lease-store.js.map +1 -0
  11. package/dist/comms-receiving-evidence.d.ts +46 -0
  12. package/dist/comms-receiving-evidence.js +35 -0
  13. package/dist/comms-receiving-evidence.js.map +1 -0
  14. package/dist/comms-receiving-inbox.d.ts +16 -0
  15. package/dist/comms-receiving-inbox.js +410 -0
  16. package/dist/comms-receiving-inbox.js.map +1 -0
  17. package/dist/comms-receiving-runtime.d.ts +25 -0
  18. package/dist/comms-receiving-runtime.js +45 -0
  19. package/dist/comms-receiving-runtime.js.map +1 -0
  20. package/dist/comms-receiving-types.d.ts +98 -0
  21. package/dist/comms-receiving-types.js +2 -0
  22. package/dist/comms-receiving-types.js.map +1 -0
  23. package/dist/comms-receiving.d.ts +58 -0
  24. package/dist/comms-receiving.js +554 -0
  25. package/dist/comms-receiving.js.map +1 -0
  26. package/dist/comms-setup.d.ts +40 -0
  27. package/dist/comms-setup.js +121 -0
  28. package/dist/comms-setup.js.map +1 -0
  29. package/dist/concurrent-shared-world-lab.js +662 -624
  30. package/dist/concurrent-shared-world-lab.js.map +1 -1
  31. package/dist/cua-actor-lab.d.ts +6 -1
  32. package/dist/cua-actor-lab.js +149 -52
  33. package/dist/cua-actor-lab.js.map +1 -1
  34. package/dist/doctor-lab.js +11 -0
  35. package/dist/doctor-lab.js.map +1 -1
  36. package/dist/e2b-terminal-lab.js +3 -0
  37. package/dist/e2b-terminal-lab.js.map +1 -1
  38. package/dist/index.d.ts +2 -0
  39. package/dist/index.js +1 -0
  40. package/dist/index.js.map +1 -1
  41. package/dist/lab-config.d.ts +20 -3
  42. package/dist/lab-config.js +59 -6
  43. package/dist/lab-config.js.map +1 -1
  44. package/dist/lab-engine.js +8 -3
  45. package/dist/lab-engine.js.map +1 -1
  46. package/dist/lab-summary.d.ts +1 -0
  47. package/dist/lab-summary.js +8 -2
  48. package/dist/lab-summary.js.map +1 -1
  49. package/dist/observer-app.html +1 -1
  50. package/dist/observer-data.js +14 -1
  51. package/dist/observer-data.js.map +1 -1
  52. package/dist/oss-lab.d.ts +1 -1
  53. package/dist/oss-lab.js.map +1 -1
  54. package/dist/oss-meta-lab.d.ts +1 -1
  55. package/dist/oss-meta-lab.js.map +1 -1
  56. package/dist/program.d.ts +2 -0
  57. package/dist/program.js +100 -4
  58. package/dist/program.js.map +1 -1
  59. package/dist/run-narration-secrets.d.ts +5 -0
  60. package/dist/run-narration-secrets.js +68 -0
  61. package/dist/run-narration-secrets.js.map +1 -0
  62. package/dist/run.d.ts +8 -3
  63. package/dist/run.js +26 -4
  64. package/dist/run.js.map +1 -1
  65. package/dist/scripted-browser-lab.js +7 -0
  66. package/dist/scripted-browser-lab.js.map +1 -1
  67. package/dist/shared-world-lab.js +4 -0
  68. package/dist/shared-world-lab.js.map +1 -1
  69. package/dist/study-analysis-engine.js +30 -1
  70. package/dist/study-analysis-engine.js.map +1 -1
  71. package/dist/study-analysis-evidence.js +9 -1
  72. package/dist/study-analysis-evidence.js.map +1 -1
  73. package/dist/tui-app.js +134 -134
  74. package/dist/tui-contract.d.ts +13 -0
  75. package/dist/tui-contract.js.map +1 -1
  76. package/dist/tui-launch.d.ts +2 -0
  77. package/dist/tui-launch.js +9 -1
  78. package/dist/tui-launch.js.map +1 -1
  79. package/docs/architecture/comms-inbox.md +4 -0
  80. package/docs/architecture/real-email-receiving.md +135 -0
  81. package/docs/contracts/run-bundle.md +16 -5
  82. package/docs/contracts/schemas.md +20 -3
  83. package/docs/goals/current.md +5 -5
  84. package/docs/ramp/README.md +13 -5
  85. package/docs/release/0.96.0-real-email-receiving.md +47 -0
  86. package/docs/release/0.96.1-browser-navigation.md +22 -0
  87. package/package.json +2 -1
  88. package/skills/humanish/SKILL.md +33 -13
@@ -0,0 +1,98 @@
1
+ /** Internal receiving-only contract. Provider identifiers and content are host/runtime-only. */
2
+ import type { CommsInlineImage } from "./comms-types.js";
3
+ export interface ReceivingContext {
4
+ signal?: AbortSignal;
5
+ timeoutMs?: number;
6
+ }
7
+ export interface ReceivingIdentity {
8
+ provider: "agentmail";
9
+ accountId: string;
10
+ scopeType: "organization" | "pod" | "inbox";
11
+ scopeId: string;
12
+ }
13
+ export interface ReceivingLease {
14
+ resourceId: string;
15
+ address: string;
16
+ clientId: string;
17
+ }
18
+ export interface ReceivedEmail {
19
+ channel: "email";
20
+ providerMessageId: string;
21
+ providerTimestamp?: string;
22
+ from: string;
23
+ subject?: string;
24
+ text: string;
25
+ html?: string;
26
+ inlineImages: CommsInlineImage[];
27
+ limitations: string[];
28
+ }
29
+ export interface ReceivingBatch {
30
+ messages: ReceivedEmail[];
31
+ complete: boolean;
32
+ /** Stable safe codes only, never provider error bodies or identifiers. */
33
+ limitations: string[];
34
+ }
35
+ export interface ReceivingAdapter {
36
+ readonly provider: "agentmail";
37
+ authenticate(context?: ReceivingContext): Promise<ReceivingIdentity>;
38
+ acquire(clientId: string, context?: ReceivingContext): Promise<ReceivingLease>;
39
+ read(lease: ReceivingLease, context?: ReceivingContext): Promise<ReceivingBatch>;
40
+ release(lease: ReceivingLease, context?: ReceivingContext): Promise<{
41
+ status: "absent" | "deleting";
42
+ }>;
43
+ }
44
+ /** Content provided to a single participant's desktop; no provider identifiers. */
45
+ export interface ParticipantEmail extends Omit<ReceivedEmail, "providerMessageId"> {
46
+ id: string;
47
+ }
48
+ export interface ReceivingSurfaceFile {
49
+ path: string;
50
+ body: string;
51
+ contentType: "text/html; charset=utf-8" | "application/json; charset=utf-8";
52
+ }
53
+ export interface RenderedReceivingInbox {
54
+ files: ReceivingSurfaceFile[];
55
+ blockedAssetCount: number;
56
+ blockedLinkCount: number;
57
+ /** Register before publishing; never persist this array. */
58
+ secrets: string[];
59
+ linkCount: number;
60
+ codeCount: number;
61
+ }
62
+ export interface ReceivingSurface {
63
+ url: string;
64
+ publish(files: ReceivingSurfaceFile[]): Promise<void>;
65
+ stop(): Promise<void>;
66
+ }
67
+ export declare const COMMS_RECEIVING_SCHEMA = "humanish.comms-receiving.v2";
68
+ export interface ReceivingMessageEvidence {
69
+ id: string;
70
+ firstObservedAt: string;
71
+ providerTimestamp?: string;
72
+ publishedAt?: string;
73
+ }
74
+ export interface ReceivingParticipantEvidence {
75
+ participantId: string;
76
+ leaseId: string;
77
+ acquisition: "pending" | "active" | "failed";
78
+ cleanup: "pending" | "absent" | "deleting" | "unresolved";
79
+ observed: number;
80
+ published: number;
81
+ linkCount: number;
82
+ codeCount: number;
83
+ blockedAssetCount: number;
84
+ blockedLinkCount: number;
85
+ messages: ReceivingMessageEvidence[];
86
+ limitations: string[];
87
+ }
88
+ export interface CommsReceivingEvidence {
89
+ schema: typeof COMMS_RECEIVING_SCHEMA;
90
+ channel: "email";
91
+ provider: "agentmail";
92
+ publication: "restricted-real-communications";
93
+ state: "acquiring" | "running" | "finished";
94
+ participants: ReceivingParticipantEvidence[];
95
+ limitations: string[];
96
+ /** Inbox links are constrained; the rest of the browser is not network-confined. */
97
+ browserConfinement: "mail-surface-only";
98
+ }
@@ -0,0 +1,2 @@
1
+ export const COMMS_RECEIVING_SCHEMA = "humanish.comms-receiving.v2";
2
+ //# sourceMappingURL=comms-receiving-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comms-receiving-types.js","sourceRoot":"","sources":["../src/comms-receiving-types.ts"],"names":[],"mappings":"AAsDA,MAAM,CAAC,MAAM,sBAAsB,GAAG,6BAA6B,CAAC"}
@@ -0,0 +1,58 @@
1
+ /** Run-scoped real-email receiving. Resource authority and message content stay on the host. */
2
+ import { type CommsRecoveryEntry } from "./comms-lease-store.js";
3
+ import { type CommsReceivingEvidence, type ParticipantEmail, type ReceivingAdapter, type ReceivingSurface, type RenderedReceivingInbox } from "./comms-receiving-types.js";
4
+ export type { CommsRecoveryEntry } from "./comms-lease-store.js";
5
+ export declare class CommsReceivingError extends Error {
6
+ readonly code: string;
7
+ constructor(code: string);
8
+ }
9
+ type RenderInput = {
10
+ address: string;
11
+ messages: ParticipantEmail[];
12
+ allowedOrigins: string[];
13
+ originMap?: Array<[string, string]>;
14
+ };
15
+ export interface StartCommsReceivingOptions {
16
+ cwd: string;
17
+ runId: string;
18
+ connectionName: string;
19
+ apiKeyEnv: string;
20
+ adapter: ReceivingAdapter;
21
+ participants: string[];
22
+ writeEvidence: (evidence: CommsReceivingEvidence) => Promise<void>;
23
+ registerSecrets: (secrets: string[]) => void;
24
+ render: (input: RenderInput) => RenderedReceivingInbox;
25
+ signal?: AbortSignal;
26
+ stateDir?: string;
27
+ }
28
+ export interface CommsReceivingRun {
29
+ address(participantId: string): string;
30
+ attach(participantId: string, options: {
31
+ surface: ReceivingSurface;
32
+ allowedOrigins: string[];
33
+ originMap?: Array<[string, string]>;
34
+ }): Promise<void>;
35
+ finishParticipant(participantId: string): Promise<void>;
36
+ finish(): Promise<CommsReceivingEvidence>;
37
+ snapshot(): CommsReceivingEvidence;
38
+ }
39
+ export declare function startCommsReceiving(options: StartCommsReceivingOptions): Promise<CommsReceivingRun>;
40
+ /** Side-effect-free local inspection: does not authenticate, enumerate provider resources or replay creation. */
41
+ export declare function inspectCommsRecovery(options: {
42
+ cwd: string;
43
+ stateDir?: string;
44
+ }): Promise<CommsRecoveryEntry[]>;
45
+ /** Explicit mutation: may replay an uncertain original create, then immediately dispose that exact resource. */
46
+ export declare function recoverCommsReceiving(options: {
47
+ cwd: string;
48
+ runId: string;
49
+ connectionName: string;
50
+ apiKeyEnv: string;
51
+ adapter: ReceivingAdapter;
52
+ stateDir?: string;
53
+ }): Promise<{
54
+ ok: boolean;
55
+ recovered: number;
56
+ unresolved: number;
57
+ message: string;
58
+ }>;