@fungi.computer/agar 0.1.0 → 0.2.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.
Files changed (52) hide show
  1. package/dist/agent-message-meta.d.ts +15 -15
  2. package/dist/agent-message-meta.js +5 -5
  3. package/dist/agents.d.ts +86 -13
  4. package/dist/agents.js +48 -25
  5. package/dist/apps.js +4 -4
  6. package/dist/backend-definition.d.ts +41 -4
  7. package/dist/backend-definition.js +70 -10
  8. package/dist/backend.js +4 -4
  9. package/dist/channels.js +4 -4
  10. package/dist/computer-contracts.d.ts +15 -15
  11. package/dist/computer-contracts.js +14 -14
  12. package/dist/computer.js +16 -16
  13. package/dist/game-servers.js +2 -2
  14. package/dist/git-rpc.d.ts +23 -23
  15. package/dist/git-rpc.js +14 -16
  16. package/dist/git.d.ts +9 -9
  17. package/dist/git.js +8 -8
  18. package/dist/host.d.ts +3 -1
  19. package/dist/host.js +5 -1
  20. package/dist/index.d.ts +5 -4
  21. package/dist/index.js +3 -2
  22. package/dist/inference.js +2 -1
  23. package/dist/internal/app-session.js +37 -1
  24. package/dist/internal/protocol.d.ts +4 -4
  25. package/dist/internal/schemas.d.ts +33 -7
  26. package/dist/internal/schemas.js +107 -16
  27. package/dist/marketplace.js +7 -5
  28. package/dist/media-request-id.d.ts +1 -1
  29. package/dist/media-request-id.js +2 -2
  30. package/dist/media.js +2 -2
  31. package/dist/method-presentation.d.ts +7 -0
  32. package/dist/method-presentation.js +14 -0
  33. package/dist/method-refusal.d.ts +5 -5
  34. package/dist/method-refusal.js +4 -4
  35. package/dist/react.d.ts +14 -2
  36. package/dist/react.js +40 -4
  37. package/dist/read-copy.d.ts +1 -1
  38. package/dist/read-copy.js +3 -6
  39. package/dist/storage.js +1 -1
  40. package/dist/test-kit/git.js +19 -2
  41. package/dist/window.d.ts +64 -0
  42. package/dist/window.js +31 -0
  43. package/docs/api/backend-definition.md +83 -9
  44. package/docs/api/backend.md +44 -38
  45. package/docs/api/git-rpc.md +35 -35
  46. package/docs/api/git.md +66 -80
  47. package/docs/api/index.md +775 -128
  48. package/docs/api/media-request-id.md +1 -1
  49. package/docs/api/method-presentation.md +21 -0
  50. package/docs/api/modules.md +1 -0
  51. package/docs/api/react.md +10 -4
  52. package/package.json +10 -5
package/docs/api/git.md CHANGED
@@ -290,25 +290,27 @@ Requested installation-scoped Git authority; a declaration is never a grant.
290
290
  ### repositoryRefSchema
291
291
 
292
292
  ```ts
293
- const repositoryRefSchema: ZodDiscriminatedUnion<
294
- [
295
- ZodObject<
296
- {
297
- kind: ZodLiteral<"installation">;
298
- installationId: ZodString;
299
- repository: ZodString;
300
- },
301
- $strict
302
- >,
303
- ZodObject<
304
- {
305
- kind: ZodLiteral<"team-source">;
306
- repository: ZodString;
307
- },
308
- $strict
309
- >,
310
- ],
311
- "kind"
293
+ const repositoryRefSchema: ZodLazy<
294
+ ZodDiscriminatedUnion<
295
+ [
296
+ ZodObject<
297
+ {
298
+ kind: ZodLiteral<"installation">;
299
+ installationId: ZodString;
300
+ repository: ZodString;
301
+ },
302
+ $strict
303
+ >,
304
+ ZodObject<
305
+ {
306
+ kind: ZodLiteral<"team-source">;
307
+ repository: ZodString;
308
+ },
309
+ $strict
310
+ >,
311
+ ],
312
+ "kind"
313
+ >
312
314
  >;
313
315
  ```
314
316
 
@@ -375,7 +377,7 @@ Canonical Git writer decoder; identity is attested by a host, never by an App.
375
377
  ### gitPushQuestionSchema
376
378
 
377
379
  ```ts
378
- const gitPushQuestionSchema: ZodObject<{
380
+ const gitPushQuestionSchema: ZodLazy<ZodObject<{
379
381
  repository: ZodString;
380
382
  writer: ZodObject<{
381
383
  kind: ZodLiteral<"actor">;
@@ -394,16 +396,7 @@ const gitPushQuestionSchema: ZodObject<{
394
396
  owner: "owner";
395
397
  }>>;
396
398
  workflow: ZodOptional<ZodObject<{
397
- armedBy: ZodDiscriminatedUnion<[ZodObject<{
398
- kind: ...;
399
- memberId: ...;
400
- }, $strict>, ZodObject<{
401
- kind: ...;
402
- agentId: ...;
403
- }, $strict>, ZodObject<{
404
- kind: ...;
405
- keyId: ...;
406
- }, $strict>], "kind">;
399
+ armedBy: ZodDiscriminatedUnion<[ZodObject<..., ...>, ZodObject<..., ...>, ZodObject<..., ...>], "kind">;
407
400
  branches: ZodArray<ZodString>;
408
401
  workflowId: ZodMiniString<string>;
409
402
  runId: ZodMiniString<string>;
@@ -415,7 +408,7 @@ const gitPushQuestionSchema: ZodObject<{
415
408
  before: ZodString;
416
409
  after: ZodString;
417
410
  }, $strict>>;
418
- }, $strict>;
411
+ }, $strict>>;
419
412
  ```
420
413
 
421
414
  The App's question covers the whole push, under host-held attribution.
@@ -425,31 +418,33 @@ The App's question covers the whole push, under host-held attribution.
425
418
  ### gitPushVerdictSchema
426
419
 
427
420
  ```ts
428
- const gitPushVerdictSchema: ZodDiscriminatedUnion<
429
- [
430
- ZodObject<
431
- {
432
- allowed: ZodLiteral<true>;
433
- },
434
- $strict
435
- >,
436
- ZodObject<
437
- {
438
- allowed: ZodLiteral<false>;
439
- refused: ZodArray<
440
- ZodObject<
441
- {
442
- ref: ZodString;
443
- message: ZodString;
444
- },
445
- $strict
446
- >
447
- >;
448
- },
449
- $strict
450
- >,
451
- ],
452
- "allowed"
421
+ const gitPushVerdictSchema: ZodLazy<
422
+ ZodDiscriminatedUnion<
423
+ [
424
+ ZodObject<
425
+ {
426
+ allowed: ZodLiteral<true>;
427
+ },
428
+ $strict
429
+ >,
430
+ ZodObject<
431
+ {
432
+ allowed: ZodLiteral<false>;
433
+ refused: ZodArray<
434
+ ZodObject<
435
+ {
436
+ ref: ZodString;
437
+ message: ZodString;
438
+ },
439
+ $strict
440
+ >
441
+ >;
442
+ },
443
+ $strict
444
+ >,
445
+ ],
446
+ "allowed"
447
+ >
453
448
  >;
454
449
  ```
455
450
 
@@ -460,44 +455,35 @@ A whole push verdict; refusal messages are shown by ordinary Git clients.
460
455
  ### appGitPushFactSchema
461
456
 
462
457
  ```ts
463
- const appGitPushFactSchema: ZodObject<{
458
+ const appGitPushFactSchema: ZodLazy<ZodObject<{
464
459
  repository: ZodString;
465
460
  writer: ZodDiscriminatedUnion<[ZodObject<{
466
461
  kind: ZodLiteral<"actor">;
467
462
  actor: ZodDiscriminatedUnion<[ZodObject<{
468
- kind: ZodMiniLiteral<...>;
469
- memberId: ZodMiniString<...>;
463
+ kind: ...;
464
+ memberId: ...;
470
465
  }, $strict>, ZodObject<{
471
- kind: ZodMiniLiteral<...>;
472
- agentId: ZodMiniString<...>;
466
+ kind: ...;
467
+ agentId: ...;
473
468
  }, $strict>, ZodObject<{
474
- kind: ZodMiniLiteral<...>;
475
- keyId: ZodMiniString<...>;
469
+ kind: ...;
470
+ keyId: ...;
476
471
  }, $strict>], "kind">;
477
472
  role: ZodMiniOptional<ZodMiniEnum<{
478
473
  member: "member";
479
474
  owner: "owner";
480
475
  }>>;
481
476
  workflow: ZodOptional<ZodObject<{
482
- armedBy: ZodDiscriminatedUnion<[..., ..., ...], "kind">;
483
- branches: ZodArray<ZodString>;
484
- workflowId: ZodMiniString<string>;
485
- runId: ZodMiniString<string>;
486
- nodeId: ZodMiniString<string>;
477
+ armedBy: ZodDiscriminatedUnion<..., ...>;
478
+ branches: ZodArray<...>;
479
+ workflowId: ZodMiniString<...>;
480
+ runId: ZodMiniString<...>;
481
+ nodeId: ZodMiniString<...>;
487
482
  }, $strict>>;
488
483
  }, $strict>, ZodObject<{
489
484
  kind: ZodLiteral<"installation">;
490
485
  installationId: ZodString;
491
- onBehalfOf: ZodNullable<ZodDiscriminatedUnion<[ZodObject<{
492
- kind: ...;
493
- memberId: ...;
494
- }, $strict>, ZodObject<{
495
- kind: ...;
496
- agentId: ...;
497
- }, $strict>, ZodObject<{
498
- kind: ...;
499
- keyId: ...;
500
- }, $strict>], "kind">>;
486
+ onBehalfOf: ZodNullable<ZodDiscriminatedUnion<[ZodObject<..., ...>, ZodObject<..., ...>, ZodObject<..., ...>], "kind">>;
501
487
  }, $strict>], "kind">;
502
488
  updates: ZodArray<ZodObject<{
503
489
  ref: ZodString;
@@ -508,8 +494,8 @@ const appGitPushFactSchema: ZodObject<{
508
494
  ref: ZodString;
509
495
  journaled: ZodNullable<ZodString>;
510
496
  }, $strict>>>;
511
- eventId: ZodString;
512
- }, $strict>;
497
+ eventId: ZodLazy<ZodString>;
498
+ }, $strict>>;
513
499
  ```
514
500
 
515
501
  One accepted push, with host attribution and no remote or credential.