agenthooksprotocol 0.1.0 → 0.1.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.
- package/README.md +41 -0
- package/dist/src/client/composition.d.ts +2 -0
- package/dist/src/client/composition.d.ts.map +1 -1
- package/dist/src/client/composition.js +14 -6
- package/dist/src/client/composition.js.map +1 -1
- package/dist/src/client/content.d.ts +2 -0
- package/dist/src/client/content.d.ts.map +1 -1
- package/dist/src/client/content.js +18 -7
- package/dist/src/client/content.js.map +1 -1
- package/dist/src/client/hooks.d.ts +4 -0
- package/dist/src/client/hooks.d.ts.map +1 -1
- package/dist/src/client/hooks.js +115 -28
- package/dist/src/client/hooks.js.map +1 -1
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/client/index.d.ts.map +1 -1
- package/dist/src/client/index.js +1 -0
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/client/types.d.ts +2 -2
- package/dist/src/client/types.d.ts.map +1 -1
- package/dist/src/content-upload.d.ts +9 -10
- package/dist/src/content-upload.d.ts.map +1 -1
- package/dist/src/content-upload.js +8 -4
- package/dist/src/content-upload.js.map +1 -1
- package/dist/src/draft/generated.d.ts +73 -47
- package/dist/src/draft/generated.d.ts.map +1 -1
- package/dist/src/draft/generated.js +502 -251
- package/dist/src/draft/generated.js.map +1 -1
- package/dist/src/draft/index.d.ts +4 -1
- package/dist/src/draft/index.d.ts.map +1 -1
- package/dist/src/draft/index.js +2 -0
- package/dist/src/draft/index.js.map +1 -1
- package/dist/src/draft/schemas.d.ts +112 -40
- package/dist/src/draft/schemas.d.ts.map +1 -1
- package/dist/src/draft/schemas.js +158 -120
- package/dist/src/draft/schemas.js.map +1 -1
- package/dist/src/draft-runtime.d.ts +5 -5
- package/dist/src/draft-runtime.d.ts.map +1 -1
- package/dist/src/draft-runtime.js +3 -5
- package/dist/src/draft-runtime.js.map +1 -1
- package/dist/src/server/attachments.d.ts +2 -2
- package/dist/src/server/attachments.d.ts.map +1 -1
- package/dist/src/server/attachments.js +3 -3
- package/dist/src/server/attachments.js.map +1 -1
- package/dist/src/server/hooks.d.ts.map +1 -1
- package/dist/src/server/hooks.js +4 -2
- package/dist/src/server/hooks.js.map +1 -1
- package/dist/src/server/index.d.ts +3 -1
- package/dist/src/server/index.d.ts.map +1 -1
- package/dist/src/server/index.js +1 -0
- package/dist/src/server/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client/composition.ts +15 -6
- package/src/client/content.ts +19 -7
- package/src/client/hooks.ts +138 -29
- package/src/client/index.ts +2 -0
- package/src/client/types.ts +2 -2
- package/src/content-upload.ts +14 -13
- package/src/draft/ahp-codegen.lock.json +14 -6
- package/src/draft/generated.ts +733 -427
- package/src/draft/index.ts +6 -1
- package/src/draft/schemas.ts +160 -120
- package/src/draft-runtime.ts +7 -9
- package/src/server/attachments.ts +5 -5
- package/src/server/hooks.ts +3 -2
- package/src/server/index.ts +5 -0
|
@@ -2642,22 +2642,24 @@ export const schemas = [
|
|
|
2642
2642
|
type: "string",
|
|
2643
2643
|
minLength: 1,
|
|
2644
2644
|
},
|
|
2645
|
-
size: {
|
|
2646
|
-
type: "integer",
|
|
2647
|
-
minimum: 0,
|
|
2648
|
-
},
|
|
2649
|
-
sha256: {
|
|
2650
|
-
type: "string",
|
|
2651
|
-
pattern: "^[a-f0-9]{64}$",
|
|
2652
|
-
minLength: 64,
|
|
2653
|
-
maxLength: 64,
|
|
2654
|
-
},
|
|
2655
2645
|
synthesized: {
|
|
2656
2646
|
type: "boolean",
|
|
2657
2647
|
description: "True when this object identity was synthesized by the adapter; identity remains stable for its lifetime.",
|
|
2658
2648
|
},
|
|
2659
2649
|
},
|
|
2660
2650
|
additionalProperties: false,
|
|
2651
|
+
allOf: [
|
|
2652
|
+
{
|
|
2653
|
+
not: {
|
|
2654
|
+
required: ["size"],
|
|
2655
|
+
},
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
not: {
|
|
2659
|
+
required: ["sha256"],
|
|
2660
|
+
},
|
|
2661
|
+
},
|
|
2662
|
+
],
|
|
2661
2663
|
},
|
|
2662
2664
|
{
|
|
2663
2665
|
type: "object",
|
|
@@ -2846,26 +2848,28 @@ export const schemas = [
|
|
|
2846
2848
|
$id: "https://agenthooksprotocol.org/schemas/draft/content-reference.schema.json",
|
|
2847
2849
|
title: "AHP content-reference (Draft)",
|
|
2848
2850
|
type: "object",
|
|
2849
|
-
required: ["ref"
|
|
2851
|
+
required: ["ref"],
|
|
2850
2852
|
properties: {
|
|
2851
2853
|
ref: {
|
|
2852
2854
|
type: "string",
|
|
2853
2855
|
minLength: 1,
|
|
2854
2856
|
},
|
|
2855
|
-
size: {
|
|
2856
|
-
type: "integer",
|
|
2857
|
-
minimum: 0,
|
|
2858
|
-
},
|
|
2859
|
-
sha256: {
|
|
2860
|
-
type: "string",
|
|
2861
|
-
pattern: "^[a-f0-9]{64}$",
|
|
2862
|
-
minLength: 64,
|
|
2863
|
-
maxLength: 64,
|
|
2864
|
-
},
|
|
2865
2857
|
},
|
|
2866
2858
|
additionalProperties: false,
|
|
2867
2859
|
$comment: "Mutable AHP draft. ",
|
|
2868
|
-
description: "Receiver-allocated immutable
|
|
2860
|
+
description: "Receiver-allocated immutable content reference. ref is opaque, not a URL or authorization grant; access is authorized by credential-derived scope. Upload size and digest belong only in the separate content-upload-receipt, never this event reference.",
|
|
2861
|
+
allOf: [
|
|
2862
|
+
{
|
|
2863
|
+
not: {
|
|
2864
|
+
required: ["size"],
|
|
2865
|
+
},
|
|
2866
|
+
},
|
|
2867
|
+
{
|
|
2868
|
+
not: {
|
|
2869
|
+
required: ["sha256"],
|
|
2870
|
+
},
|
|
2871
|
+
},
|
|
2872
|
+
],
|
|
2869
2873
|
},
|
|
2870
2874
|
{
|
|
2871
2875
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -2902,6 +2906,32 @@ export const schemas = [
|
|
|
2902
2906
|
$comment: "Mutable AHP draft. ",
|
|
2903
2907
|
description: "Select by descriptor category; reasoning takes its own category, otherwise classify by media type, not enclosing message role. Unlisted categories use required default. Selection never grants authorization.",
|
|
2904
2908
|
},
|
|
2909
|
+
{
|
|
2910
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2911
|
+
$id: "https://agenthooksprotocol.org/schemas/draft/content-upload-receipt.schema.json",
|
|
2912
|
+
title: "AHP ContentUploadReceipt (Draft)",
|
|
2913
|
+
type: "object",
|
|
2914
|
+
required: ["ref", "size", "sha256"],
|
|
2915
|
+
properties: {
|
|
2916
|
+
ref: {
|
|
2917
|
+
type: "string",
|
|
2918
|
+
minLength: 1,
|
|
2919
|
+
},
|
|
2920
|
+
size: {
|
|
2921
|
+
type: "integer",
|
|
2922
|
+
minimum: 0,
|
|
2923
|
+
},
|
|
2924
|
+
sha256: {
|
|
2925
|
+
type: "string",
|
|
2926
|
+
pattern: "^[a-f0-9]{64}$",
|
|
2927
|
+
minLength: 64,
|
|
2928
|
+
maxLength: 64,
|
|
2929
|
+
},
|
|
2930
|
+
},
|
|
2931
|
+
additionalProperties: false,
|
|
2932
|
+
$comment: "Mutable AHP draft. ",
|
|
2933
|
+
description: "HTTP 201 upload confirmation. ref identifies receiver-allocated immutable bytes; size counts exact octets and sha256 is their lowercase SHA-256 digest. Senders verify both before publishing only ref in an event body. This receipt is not event acknowledgement or proof of durable storage.",
|
|
2934
|
+
},
|
|
2905
2935
|
{
|
|
2906
2936
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2907
2937
|
$id: "https://agenthooksprotocol.org/schemas/draft/content-upload.schema.json",
|
|
@@ -3123,6 +3153,110 @@ export const schemas = [
|
|
|
3123
3153
|
],
|
|
3124
3154
|
title: "AHP Effect (Draft)",
|
|
3125
3155
|
},
|
|
3156
|
+
{
|
|
3157
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
3158
|
+
$id: "https://agenthooksprotocol.org/schemas/draft/event.schema.json",
|
|
3159
|
+
title: "AHP Event (Draft)",
|
|
3160
|
+
$comment: "Mutable AHP draft. One shared event union; intercept eligibility is constrained at the request level.",
|
|
3161
|
+
oneOf: [
|
|
3162
|
+
{
|
|
3163
|
+
$ref: "tool-before.schema.json",
|
|
3164
|
+
},
|
|
3165
|
+
{
|
|
3166
|
+
$ref: "tool-after.schema.json",
|
|
3167
|
+
},
|
|
3168
|
+
{
|
|
3169
|
+
$ref: "session-start.schema.json",
|
|
3170
|
+
},
|
|
3171
|
+
{
|
|
3172
|
+
$ref: "session-end.schema.json",
|
|
3173
|
+
},
|
|
3174
|
+
{
|
|
3175
|
+
$ref: "catalogue-event.schema.json#/$defs/config.change.before",
|
|
3176
|
+
},
|
|
3177
|
+
{
|
|
3178
|
+
$ref: "catalogue-event.schema.json#/$defs/config.change.after",
|
|
3179
|
+
},
|
|
3180
|
+
{
|
|
3181
|
+
$ref: "catalogue-event.schema.json#/$defs/turn.start",
|
|
3182
|
+
},
|
|
3183
|
+
{
|
|
3184
|
+
$ref: "catalogue-event.schema.json#/$defs/turn.finish.before",
|
|
3185
|
+
},
|
|
3186
|
+
{
|
|
3187
|
+
$ref: "catalogue-event.schema.json#/$defs/turn.end",
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
$ref: "catalogue-event.schema.json#/$defs/turn.progress",
|
|
3191
|
+
},
|
|
3192
|
+
{
|
|
3193
|
+
$ref: "catalogue-event.schema.json#/$defs/model.request.before",
|
|
3194
|
+
},
|
|
3195
|
+
{
|
|
3196
|
+
$ref: "catalogue-event.schema.json#/$defs/model.response.after",
|
|
3197
|
+
},
|
|
3198
|
+
{
|
|
3199
|
+
$ref: "catalogue-event.schema.json#/$defs/model.error",
|
|
3200
|
+
},
|
|
3201
|
+
{
|
|
3202
|
+
$ref: "catalogue-event.schema.json#/$defs/model.switch.before",
|
|
3203
|
+
},
|
|
3204
|
+
{
|
|
3205
|
+
$ref: "catalogue-event.schema.json#/$defs/model.switch.after",
|
|
3206
|
+
},
|
|
3207
|
+
{
|
|
3208
|
+
$ref: "catalogue-event.schema.json#/$defs/tool.permission.request",
|
|
3209
|
+
},
|
|
3210
|
+
{
|
|
3211
|
+
$ref: "catalogue-event.schema.json#/$defs/tool.permission.resolved",
|
|
3212
|
+
},
|
|
3213
|
+
{
|
|
3214
|
+
$ref: "catalogue-event.schema.json#/$defs/tool.progress",
|
|
3215
|
+
},
|
|
3216
|
+
{
|
|
3217
|
+
$ref: "catalogue-event.schema.json#/$defs/tool.batch.after",
|
|
3218
|
+
},
|
|
3219
|
+
{
|
|
3220
|
+
$ref: "catalogue-event.schema.json#/$defs/context.compact.before",
|
|
3221
|
+
},
|
|
3222
|
+
{
|
|
3223
|
+
$ref: "catalogue-event.schema.json#/$defs/context.compact.after",
|
|
3224
|
+
},
|
|
3225
|
+
{
|
|
3226
|
+
$ref: "catalogue-event.schema.json#/$defs/task.change.before",
|
|
3227
|
+
},
|
|
3228
|
+
{
|
|
3229
|
+
$ref: "catalogue-event.schema.json#/$defs/task.change.after",
|
|
3230
|
+
},
|
|
3231
|
+
{
|
|
3232
|
+
$ref: "catalogue-event.schema.json#/$defs/user.attention",
|
|
3233
|
+
},
|
|
3234
|
+
{
|
|
3235
|
+
$ref: "catalogue-event.schema.json#/$defs/user.elicitation.request",
|
|
3236
|
+
},
|
|
3237
|
+
{
|
|
3238
|
+
$ref: "catalogue-event.schema.json#/$defs/user.elicitation.result",
|
|
3239
|
+
},
|
|
3240
|
+
{
|
|
3241
|
+
$ref: "catalogue-event.schema.json#/$defs/user.message.inbound",
|
|
3242
|
+
},
|
|
3243
|
+
{
|
|
3244
|
+
$ref: "catalogue-event.schema.json#/$defs/user.message.outbound",
|
|
3245
|
+
},
|
|
3246
|
+
{
|
|
3247
|
+
$ref: "catalogue-event.schema.json#/$defs/workspace.change.before",
|
|
3248
|
+
},
|
|
3249
|
+
{
|
|
3250
|
+
$ref: "catalogue-event.schema.json#/$defs/workspace.change.after",
|
|
3251
|
+
},
|
|
3252
|
+
{
|
|
3253
|
+
$ref: "catalogue-event.schema.json#/$defs/file.changed",
|
|
3254
|
+
},
|
|
3255
|
+
{
|
|
3256
|
+
$ref: "catalogue-event.schema.json#/$defs/hook.failure",
|
|
3257
|
+
},
|
|
3258
|
+
],
|
|
3259
|
+
},
|
|
3126
3260
|
{
|
|
3127
3261
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
3128
3262
|
$id: "https://agenthooksprotocol.org/schemas/draft/execution-event.schema.json",
|
|
@@ -6284,6 +6418,7 @@ export const schemas = [
|
|
|
6284
6418
|
$ref: "common.schema.json#/$defs/protocolVersion",
|
|
6285
6419
|
},
|
|
6286
6420
|
event: {
|
|
6421
|
+
$ref: "event.schema.json",
|
|
6287
6422
|
oneOf: [
|
|
6288
6423
|
{
|
|
6289
6424
|
$ref: "tool-before.schema.json",
|
|
@@ -7396,104 +7531,7 @@ export const schemas = [
|
|
|
7396
7531
|
$ref: "common.schema.json#/$defs/protocolVersion",
|
|
7397
7532
|
},
|
|
7398
7533
|
event: {
|
|
7399
|
-
|
|
7400
|
-
{
|
|
7401
|
-
$ref: "tool-before.schema.json",
|
|
7402
|
-
},
|
|
7403
|
-
{
|
|
7404
|
-
$ref: "tool-after.schema.json",
|
|
7405
|
-
},
|
|
7406
|
-
{
|
|
7407
|
-
$ref: "session-start.schema.json",
|
|
7408
|
-
},
|
|
7409
|
-
{
|
|
7410
|
-
$ref: "session-end.schema.json",
|
|
7411
|
-
},
|
|
7412
|
-
{
|
|
7413
|
-
$ref: "catalogue-event.schema.json#/$defs/config.change.before",
|
|
7414
|
-
},
|
|
7415
|
-
{
|
|
7416
|
-
$ref: "catalogue-event.schema.json#/$defs/config.change.after",
|
|
7417
|
-
},
|
|
7418
|
-
{
|
|
7419
|
-
$ref: "catalogue-event.schema.json#/$defs/turn.start",
|
|
7420
|
-
},
|
|
7421
|
-
{
|
|
7422
|
-
$ref: "catalogue-event.schema.json#/$defs/turn.finish.before",
|
|
7423
|
-
},
|
|
7424
|
-
{
|
|
7425
|
-
$ref: "catalogue-event.schema.json#/$defs/turn.end",
|
|
7426
|
-
},
|
|
7427
|
-
{
|
|
7428
|
-
$ref: "catalogue-event.schema.json#/$defs/turn.progress",
|
|
7429
|
-
},
|
|
7430
|
-
{
|
|
7431
|
-
$ref: "catalogue-event.schema.json#/$defs/model.request.before",
|
|
7432
|
-
},
|
|
7433
|
-
{
|
|
7434
|
-
$ref: "catalogue-event.schema.json#/$defs/model.response.after",
|
|
7435
|
-
},
|
|
7436
|
-
{
|
|
7437
|
-
$ref: "catalogue-event.schema.json#/$defs/model.error",
|
|
7438
|
-
},
|
|
7439
|
-
{
|
|
7440
|
-
$ref: "catalogue-event.schema.json#/$defs/model.switch.before",
|
|
7441
|
-
},
|
|
7442
|
-
{
|
|
7443
|
-
$ref: "catalogue-event.schema.json#/$defs/model.switch.after",
|
|
7444
|
-
},
|
|
7445
|
-
{
|
|
7446
|
-
$ref: "catalogue-event.schema.json#/$defs/tool.permission.request",
|
|
7447
|
-
},
|
|
7448
|
-
{
|
|
7449
|
-
$ref: "catalogue-event.schema.json#/$defs/tool.permission.resolved",
|
|
7450
|
-
},
|
|
7451
|
-
{
|
|
7452
|
-
$ref: "catalogue-event.schema.json#/$defs/tool.progress",
|
|
7453
|
-
},
|
|
7454
|
-
{
|
|
7455
|
-
$ref: "catalogue-event.schema.json#/$defs/tool.batch.after",
|
|
7456
|
-
},
|
|
7457
|
-
{
|
|
7458
|
-
$ref: "catalogue-event.schema.json#/$defs/context.compact.before",
|
|
7459
|
-
},
|
|
7460
|
-
{
|
|
7461
|
-
$ref: "catalogue-event.schema.json#/$defs/context.compact.after",
|
|
7462
|
-
},
|
|
7463
|
-
{
|
|
7464
|
-
$ref: "catalogue-event.schema.json#/$defs/task.change.before",
|
|
7465
|
-
},
|
|
7466
|
-
{
|
|
7467
|
-
$ref: "catalogue-event.schema.json#/$defs/task.change.after",
|
|
7468
|
-
},
|
|
7469
|
-
{
|
|
7470
|
-
$ref: "catalogue-event.schema.json#/$defs/user.attention",
|
|
7471
|
-
},
|
|
7472
|
-
{
|
|
7473
|
-
$ref: "catalogue-event.schema.json#/$defs/user.elicitation.request",
|
|
7474
|
-
},
|
|
7475
|
-
{
|
|
7476
|
-
$ref: "catalogue-event.schema.json#/$defs/user.elicitation.result",
|
|
7477
|
-
},
|
|
7478
|
-
{
|
|
7479
|
-
$ref: "catalogue-event.schema.json#/$defs/user.message.inbound",
|
|
7480
|
-
},
|
|
7481
|
-
{
|
|
7482
|
-
$ref: "catalogue-event.schema.json#/$defs/user.message.outbound",
|
|
7483
|
-
},
|
|
7484
|
-
{
|
|
7485
|
-
$ref: "catalogue-event.schema.json#/$defs/workspace.change.before",
|
|
7486
|
-
},
|
|
7487
|
-
{
|
|
7488
|
-
$ref: "catalogue-event.schema.json#/$defs/workspace.change.after",
|
|
7489
|
-
},
|
|
7490
|
-
{
|
|
7491
|
-
$ref: "catalogue-event.schema.json#/$defs/file.changed",
|
|
7492
|
-
},
|
|
7493
|
-
{
|
|
7494
|
-
$ref: "catalogue-event.schema.json#/$defs/hook.failure",
|
|
7495
|
-
},
|
|
7496
|
-
],
|
|
7534
|
+
$ref: "event.schema.json",
|
|
7497
7535
|
},
|
|
7498
7536
|
},
|
|
7499
7537
|
},
|